UI delivery, stage A: rebuild deploy/ui-dist from current APP_UI sources

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
ayurishchevandClaude Sonnet 5.5 committed 2026-10-07 13:19:27 +03:00
1 parent 9443ab6fce
commit d38acd74de
26 files changed
+26 -88

No files matched your search

+1 -1
View File
@@ -1 +1 @@
796072800fd2abd0a674c02ef1c626b796e587b263818d13f1159561c7a7d724 d778aa16a39cb4e11ae1f146e51de44cff0b248c20b876ed8a18492c62bcde72
@@ -0,0 +1 @@
import{G as $,H as N,r as S,I as te,o as re,F as ie,a as J,d as x,e as u,q as V,g as T,J as Y,m as D,t as le,w as U,x as O,A as q,z as j,j as de,C as ue,k as I}from"./index-CrxOIffM.js";import{a as ce,_ as ee}from"./ConfirmModal-C1vwv-4S.js";import"./vendor-ui-Dumif2LN.js";var z=function(){return z=Object.assign||function(h){for(var c,l=1,f=arguments.length;l<f;l++){c=arguments[l];for(var p in c)Object.prototype.hasOwnProperty.call(c,p)&&(h[p]=c[p])}return h},z.apply(this,arguments)};var B;(function(s){var h=(function(){function a(e,t,r,n){if(this.version=e,this.errorCorrectionLevel=t,this.modules=[],this.isFunction=[],e<a.MIN_VERSION||e>a.MAX_VERSION)throw new RangeError("Version value out of range");if(n<-1||n>7)throw new RangeError("Mask value out of range");this.size=e*4+17;for(var i=[],o=0;o<this.size;o++)i.push(!1);for(var o=0;o<this.size;o++)this.modules.push(i.slice()),this.isFunction.push(i.slice());this.drawFunctionPatterns();var v=this.addEccAndInterleave(r);if(this.drawCodewords(v),n==-1)for(var C=1e9,o=0;o<8;o++){this.applyMask(o),this.drawFormatBits(o);var y=this.getPenaltyScore();y<C&&(n=o,C=y),this.applyMask(o)}f(0<=n&&n<=7),this.mask=n,this.applyMask(n),this.drawFormatBits(n),this.isFunction=[]}return a.encodeText=function(e,t){var r=s.QrSegment.makeSegments(e);return a.encodeSegments(r,t)},a.encodeBinary=function(e,t){var r=s.QrSegment.makeBytes(e);return a.encodeSegments([r],t)},a.encodeSegments=function(e,t,r,n,i,o){if(r===void 0&&(r=1),n===void 0&&(n=40),i===void 0&&(i=-1),o===void 0&&(o=!0),!(a.MIN_VERSION<=r&&r<=n&&n<=a.MAX_VERSION)||i<-1||i>7)throw new RangeError("Invalid value");var v,C;for(v=r;;v++){var y=a.getNumDataCodewords(v,t)*8,E=p.getTotalBits(e,v);if(E<=y){C=E;break}if(v>=n)throw new RangeError("Data too long")}for(var m=0,A=[a.Ecc.MEDIUM,a.Ecc.QUARTILE,a.Ecc.HIGH];m<A.length;m++){var g=A[m];o&&C<=a.getNumDataCodewords(v,g)*8&&(t=g)}for(var b=[],M=0,R=e;M<R.length;M++){var P=R[M];c(P.mode.modeBits,4,b),c(P.numChars,P.mode.numCharCountBits(v),b);for(var k=0,w=P.getData();k<w.length;k++){var d=w[k];b.push(d)}}f(b.length==C);var _=a.getNumDataCodewords(v,t)*8;f(b.length<=_),c(0,Math.min(4,_-b.length),b),c(0,(8-b.length%8)%8,b),f(b.length%8==0);for(var F=236;b.length<_;F^=253)c(F,8,b);for(var L=[];L.length*8<b.length;)L.push(0);return b.forEach(function(G,H){return L[H>>>3]|=G<<7-(H&7)}),new a(v,t,L,i)},a.prototype.getModule=function(e,t){return 0<=e&&e<this.size&&0<=t&&t<this.size&&this.modules[t][e]},a.prototype.getModules=function(){return this.modules},a.prototype.drawFunctionPatterns=function(){for(var e=0;e<this.size;e++)this.setFunctionModule(6,e,e%2==0),this.setFunctionModule(e,6,e%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);for(var t=this.getAlignmentPatternPositions(),r=t.length,e=0;e<r;e++)for(var n=0;n<r;n++)e==0&&n==0||e==0&&n==r-1||e==r-1&&n==0||this.drawAlignmentPattern(t[e],t[n]);this.drawFormatBits(0),this.drawVersion()},a.prototype.drawFormatBits=function(e){for(var t=this.errorCorrectionLevel.formatBits<<3|e,r=t,n=0;n<10;n++)r=r<<1^(r>>>9)*1335;var i=(t<<10|r)^21522;f(i>>>15==0);for(var n=0;n<=5;n++)this.setFunctionModule(8,n,l(i,n));this.setFunctionModule(8,7,l(i,6)),this.setFunctionModule(8,8,l(i,7)),this.setFunctionModule(7,8,l(i,8));for(var n=9;n<15;n++)this.setFunctionModule(14-n,8,l(i,n));for(var n=0;n<8;n++)this.setFunctionModule(this.size-1-n,8,l(i,n));for(var n=8;n<15;n++)this.setFunctionModule(8,this.size-15+n,l(i,n));this.setFunctionModule(8,this.size-8,!0)},a.prototype.drawVersion=function(){if(!(this.version<7)){for(var e=this.version,t=0;t<12;t++)e=e<<1^(e>>>11)*7973;var r=this.version<<12|e;f(r>>>18==0);for(var t=0;t<18;t++){var n=l(r,t),i=this.size-11+t%3,o=Math.floor(t/3);this.setFunctionModule(i,o,n),this.setFunctionModule(o,i,n)}}},a.prototype.drawFinderPattern=function(e,t){for(var r=-4;r<=4;r++)for(var n=-4;n<=4;n++){var i=Math.max(Math.abs(n),Math.abs(r)),o=e+n,v=t+r;0<=o&&o<this.size&&0<=v&&v<this.size&&this.setFunctionModule(o,v,i!=2&&i!=4)}},a.prototype.drawAlignmentPattern=function(e,t){for(var r=-2;r<=2;r++)for(var n=-2;n<=2;n++)this.setFunctionModule(e+n,t+r,Math.max(Math.abs(n),Math.abs(r))!=1)},a.prototype.setFunctionModule=function(e,t,r){this.modules[t][e]=r,this.isFunction[t][e]=!0},a.prototype.addEccAndInterleave=function(e){var t=this.version,r=this.errorCorrectionLevel;if(e.length!=a.getNumDataCodewords(t,r))throw new RangeError("Invalid argument");for(var n=a.NUM_ERROR_CORRECTION_BLOCKS[r.ordinal][t],i=a.ECC_CODEWORDS_PER_BLOCK[r.ordinal][t],o=Math.floor(a.getNumRawDataModules(t)/8),v=n-o%n,C=Math.floor(o/n),y=[],E=a.reedSolomonComputeDivisor(i),m=0,A=0;m<n;m++){var g=e.slice(A,A+C-i+(m<v?0:1));A+=g.length;var b=a.reedSolomonComputeRemainder(g,E);m<v&&g.push(0),y.push(g.concat(b))}for(var M=[],R=function(P){y.forEach(function(k,w){(P!=C-i||w>=v)&&M.push(k[P])})},m=0;m<y[0].length;m++)R(m);return f(M.length==o),M},a.prototype.drawCodewords=function(e){if(e.lLine truncated
@@ -1 +0,0 @@
import{G as $,H as N,r as S,I as ae,o as ne,F as ue,a as j,c as x,d,A as V,g as z,J as K,x as Q,t as de,w as B,q as U,m as q,C as ee,j as ce,k}from"./index-BsVv6gaD.js";import{S as O}from"./vendor-ui-jlFFG6nm.js";import{a as te,_ as re}from"./ConfirmModal-CzamKe9d.js";import"./vendor-charts-Bcjh2pZL.js";var T=function(){return T=Object.assign||function(c){for(var f,u=1,h=arguments.length;u<h;u++){f=arguments[u];for(var m in f)Object.prototype.hasOwnProperty.call(f,m)&&(c[m]=f[m])}return c},T.apply(this,arguments)};var D;(function(s){var c=(function(){function a(e,t,r,n){if(this.version=e,this.errorCorrectionLevel=t,this.modules=[],this.isFunction=[],e<a.MIN_VERSION||e>a.MAX_VERSION)throw new RangeError("Version value out of range");if(n<-1||n>7)throw new RangeError("Mask value out of range");this.size=e*4+17;for(var o=[],i=0;i<this.size;i++)o.push(!1);for(var i=0;i<this.size;i++)this.modules.push(o.slice()),this.isFunction.push(o.slice());this.drawFunctionPatterns();var v=this.addEccAndInterleave(r);if(this.drawCodewords(v),n==-1)for(var p=1e9,i=0;i<8;i++){this.applyMask(i),this.drawFormatBits(i);var M=this.getPenaltyScore();M<p&&(n=i,p=M),this.applyMask(i)}h(0<=n&&n<=7),this.mask=n,this.applyMask(n),this.drawFormatBits(n),this.isFunction=[]}return a.encodeText=function(e,t){var r=s.QrSegment.makeSegments(e);return a.encodeSegments(r,t)},a.encodeBinary=function(e,t){var r=s.QrSegment.makeBytes(e);return a.encodeSegments([r],t)},a.encodeSegments=function(e,t,r,n,o,i){if(r===void 0&&(r=1),n===void 0&&(n=40),o===void 0&&(o=-1),i===void 0&&(i=!0),!(a.MIN_VERSION<=r&&r<=n&&n<=a.MAX_VERSION)||o<-1||o>7)throw new RangeError("Invalid value");var v,p;for(v=r;;v++){var M=a.getNumDataCodewords(v,t)*8,w=m.getTotalBits(e,v);if(w<=M){p=w;break}if(v>=n)throw new RangeError("Data too long")}for(var C=0,A=[a.Ecc.MEDIUM,a.Ecc.QUARTILE,a.Ecc.HIGH];C<A.length;C++){var y=A[C];i&&p<=a.getNumDataCodewords(v,y)*8&&(t=y)}for(var b=[],_=0,R=e;_<R.length;_++){var P=R[_];f(P.mode.modeBits,4,b),f(P.numChars,P.mode.numCharCountBits(v),b);for(var F=0,g=P.getData();F<g.length;F++){var l=g[F];b.push(l)}}h(b.length==p);var E=a.getNumDataCodewords(v,t)*8;h(b.length<=E),f(0,Math.min(4,E-b.length),b),f(0,(8-b.length%8)%8,b),h(b.length%8==0);for(var I=236;b.length<E;I^=253)f(I,8,b);for(var L=[];L.length*8<b.length;)L.push(0);return b.forEach(function(Y,G){return L[G>>>3]|=Y<<7-(G&7)}),new a(v,t,L,o)},a.prototype.getModule=function(e,t){return 0<=e&&e<this.size&&0<=t&&t<this.size&&this.modules[t][e]},a.prototype.getModules=function(){return this.modules},a.prototype.drawFunctionPatterns=function(){for(var e=0;e<this.size;e++)this.setFunctionModule(6,e,e%2==0),this.setFunctionModule(e,6,e%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);for(var t=this.getAlignmentPatternPositions(),r=t.length,e=0;e<r;e++)for(var n=0;n<r;n++)e==0&&n==0||e==0&&n==r-1||e==r-1&&n==0||this.drawAlignmentPattern(t[e],t[n]);this.drawFormatBits(0),this.drawVersion()},a.prototype.drawFormatBits=function(e){for(var t=this.errorCorrectionLevel.formatBits<<3|e,r=t,n=0;n<10;n++)r=r<<1^(r>>>9)*1335;var o=(t<<10|r)^21522;h(o>>>15==0);for(var n=0;n<=5;n++)this.setFunctionModule(8,n,u(o,n));this.setFunctionModule(8,7,u(o,6)),this.setFunctionModule(8,8,u(o,7)),this.setFunctionModule(7,8,u(o,8));for(var n=9;n<15;n++)this.setFunctionModule(14-n,8,u(o,n));for(var n=0;n<8;n++)this.setFunctionModule(this.size-1-n,8,u(o,n));for(var n=8;n<15;n++)this.setFunctionModule(8,this.size-15+n,u(o,n));this.setFunctionModule(8,this.size-8,!0)},a.prototype.drawVersion=function(){if(!(this.version<7)){for(var e=this.version,t=0;t<12;t++)e=e<<1^(e>>>11)*7973;var r=this.version<<12|e;h(r>>>18==0);for(var t=0;t<18;t++){var n=u(r,t),o=this.size-11+t%3,i=Math.floor(t/3);this.setFunctionModule(o,i,n),this.setFunctionModule(i,o,n)}}},a.prototype.drawFinderPattern=function(e,t){for(var r=-4;r<=4;r++)for(var n=-4;n<=4;n++){var o=Math.max(Math.abs(n),Math.abs(r)),i=e+n,v=t+r;0<=i&&i<this.size&&0<=v&&v<this.size&&this.setFunctionModule(i,v,o!=2&&o!=4)}},a.prototype.drawAlignmentPattern=function(e,t){for(var r=-2;r<=2;r++)for(var n=-2;n<=2;n++)this.setFunctionModule(e+n,t+r,Math.max(Math.abs(n),Math.abs(r))!=1)},a.prototype.setFunctionModule=function(e,t,r){this.modules[t][e]=r,this.isFunction[t][e]=!0},a.prototype.addEccAndInterleave=function(e){var t=this.version,r=this.errorCorrectionLevel;if(e.length!=a.getNumDataCodewords(t,r))throw new RangeError("Invalid argument");for(var n=a.NUM_ERROR_CORRECTION_BLOCKS[r.ordinal][t],o=a.ECC_CODEWORDS_PER_BLOCK[r.ordinal][t],i=Math.floor(a.getNumRawDataModules(t)/8),v=n-i%n,p=Math.floor(i/n),M=[],w=a.reedSolomonComputeDivisor(o),C=0,A=0;C<n;C++){var y=e.slice(A,A+p-o+(C<v?0:1));A+=y.length;var b=a.reedSolomonComputeRemainder(y,w);C<v&&y.push(0),M.push(y.concat(b))}for(var _=[],R=function(P){M.forEach(function(F,g){(P!=p-o||g>=v)&&_.push(F[P])})},C=0;C<M[0].length;C++)R(C);return h(_.length==i),_},a.prototype.dLine truncated
@@ -1 +0,0 @@
import{r as _,a as U,o as G,u as Z,b as q,c as r,d as t,t as i,e as I,f as J,g as f,w as z,v as K,h as Q,F as E,i as j,j as Y,k as d,n as $}from"./index-BsVv6gaD.js";import{C as H}from"./vendor-charts-Bcjh2pZL.js";import"./vendor-ui-jlFFG6nm.js";const tt={class:"kpi-grid mb-4"},et={class:"stat-item"},st={class:"stat-content"},at={class:"stat-item"},ot={class:"stat-content"},lt={class:"stat-item"},nt={class:"stat-content"},it={class:"card mb-4"},rt={class:"card-header d-flex justify-content-between align-items-center flex-wrap"},dt={class:"chart-header-controls"},ct={class:"d-flex align-items-center"},ut={class:"toggle-wrapper me-2"},mt={class:"toggle-switch"},ft={class:"card-body"},pt={class:"chart-container"},vt={class:"row"},ht={class:"col-lg-7"},_t={class:"card"},gt={class:"card-body p-0"},bt={class:"table-responsive"},xt={class:"table"},yt={key:0},Ct={key:1},kt={class:"user-select-all fw-bold",style:{color:"var(--text-heading)"}},wt={class:"font-monospace text-muted"},St={class:"d-flex align-items-center"},Rt={class:"progress flex-grow-1",style:{height:"6px"}},Tt={class:"ms-2 small text-muted w-25 text-end"},At={class:"col-lg-5"},Dt={class:"card mb-4"},Mt={class:"card-body p-3",style:{"min-height":"120px","max-height":"200px","overflow-y":"auto"}},Et={key:0,class:"text-muted text-center py-3 mb-0"},Nt={key:1,class:"text-muted text-center py-3 mb-0"},Lt={key:2,class:"list-group list-group-flush"},Bt={class:"fw-bold small"},Ut={class:"text-muted",style:{"font-size":"0.75rem"}},It={class:"badge status-warning text-dark"},zt={class:"card"},jt={class:"card-body d-flex align-items-center justify-content-around p-4",style:{"min-height":"200px"}},Ht={class:"pie-container",style:{width:"140px",height:"140px",flex:"0 0 auto"}},Ot={class:"ms-3 flex-grow-1"},Vt={class:"mb-3"},Ft={class:"h5 mb-0",style:{color:"var(--text-heading)"}},Pt={class:"h5 mb-0",style:{color:"var(--text-heading)"}},Wt=96,Jt={__name:"Analytics",setup(Xt){const{fetchAnalytics:O,fetchCertificates:V}=Y(),{formatBytes:C,parseServerDate:F}=J(),{config:P}=Z(),w=_(null),S=_(null);let g=null,b=null;const p=U({analytics:!0,certs:!0}),x=_("24h"),y=_(!1),o=U({concurrentUsers:"-",totalTraffic:0,expiringCerts:"-",totalReceived:0,totalSent:0,totalReceivedString:"-",totalSentString:"-"}),R=_([]),T=_([]);let N=null;const A=async()=>{p.analytics=!0;try{const a=await O(x.value);a.success&&W(a.data)}catch(a){console.error(a)}finally{p.analytics=!1}},L=async()=>{p.certs=!0;try{const a=await V();if(a.success&&Array.isArray(a.data)){const e=a.data.filter(s=>!s.is_revoked&&!s.is_expired&&s.days_remaining!==null&&s.days_remaining<=45);o.expiringCerts=e.length,T.value=e.sort((s,n)=>(s.days_remaining||0)-(n.days_remaining||0))}}catch(a){console.error(a)}finally{p.certs=!1}},W=a=>{o.concurrentUsers=a.max_concurrent_24h||0;const e=a.traffic_distribution||{rx:0,tx:0};o.totalReceived=Number(e.rx||0),o.totalSent=Number(e.tx||0),o.totalTraffic=o.totalReceived+o.totalSent,o.totalReceivedString=C(o.totalReceived),o.totalSentString=C(o.totalSent),R.value=(a.top_clients_24h||[]).map(s=>({name:s.common_name,total:Number(s.total_traffic||0),percent:o.totalTraffic>0?(Number(s.total_traffic)/o.totalTraffic*100).toFixed(1):0})),N=a.global_history_24h||[],D(),B()},D=()=>{if(!w.value)return;g&&g.destroy();const a=X(N,Wt),e=[],s=[],n=[];a.forEach(c=>{const m=F(c.timestamp);let u="";x.value.includes("h")||x.value==="1d"?u=m.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):u=m.toLocaleDateString([],{month:"short",day:"numeric"})+" "+m.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}),e.push(u),y.value?(s.push(c.rx_rate_mbps||0),n.push(c.tx_rate_mbps||0)):(s.push(c.bytes_received/(1024*1024)),n.push(c.bytes_sent/(1024*1024)))});const l=document.documentElement.getAttribute("data-theme")==="dark",v=l?"rgba(240, 246, 252, 0.1)":"rgba(0,0,0,0.05)",h=l?"#8b949e":"#6c757d",k=w.value.getContext("2d");g=new H(k,{type:"line",data:{labels:e,datasets:[{label:y.value?"RX Mbps":"Received (MB)",data:s,borderColor:"#1652B8",backgroundColor:"rgba(22, 82, 184, 0.15)",borderWidth:2,fill:!0,tension:.3,pointRadius:3,pointHoverRadius:4},{label:y.value?"TX Mbps":"Sent (MB)",data:n,borderColor:"#EC7C31",backgroundColor:"rgba(236, 124, 49, 0.15)",borderWidth:2,fill:!0,tension:.3,pointRadius:3,pointHoverRadius:4}]},options:{responsive:!0,maintainAspectRatio:!1,interaction:{mode:"index",intersect:!1},plugins:{legend:{labels:{color:h}}},scales:{x:{ticks:{color:h,maxTicksLimit:8},grid:{color:v}},y:{beginAtZero:!0,ticks:{color:h},grid:{color:v}}}}})},B=()=>{if(!S.value)return;b&&b.destroy();const a=S.value.getContext("2d"),s=document.documentElement.getAttribute("data-theme")==="dark"?"#161b22":"#ffffff";b=new H(a,{type:"doughnut",data:{labels:["Received","Sent"],datasets:[{data:[o.totalReceived,o.totalSent],backgroundColor:["#1652B8","#EC7C31"],borderColor:s,borderWidth:2,hoverOffset:4}]},options:{responsive:!0,maintainAspectRatio:!1,cutout:"70%",plugins:{legend:{display:!1}}}})},X=(a,e)=>{if(!a||a.lLine truncated
@@ -0,0 +1 @@
import{r as c,a as T,u as z,o as B,b as E,c as I,d as n,e as t,t as o,f as R,g as r,w as A,v as V,h as F,F as b,i as D,j as P,k as i,n as H}from"./index-CrxOIffM.js";import{u as X,g as G,C as W,a as q}from"./useTrafficChart-CIDQzDiF.js";import{u as J}from"./useFormatters-CKGG-YVI.js";import{C as K}from"./vendor-charts-Bcjh2pZL.js";const Q={class:"kpi-grid mb-4"},Y={class:"stat-item"},Z={class:"stat-content"},$={class:"stat-item"},tt={class:"stat-content"},et={class:"stat-item"},st={class:"stat-content"},at={class:"card mb-4"},lt={class:"card-header d-flex justify-content-between align-items-center flex-wrap"},ot={class:"chart-header-controls"},nt={class:"d-flex align-items-center"},it={class:"toggle-wrapper me-2"},rt={class:"toggle-switch"},dt={class:"card-body"},ct={class:"chart-container"},ut={class:"row"},ft={class:"col-lg-7"},mt={class:"card"},vt={class:"card-body p-0"},pt={class:"table-responsive"},_t={class:"table"},ht={key:0},gt={key:1},yt={class:"user-select-all fw-bold",style:{color:"var(--text-heading)"}},xt={class:"font-monospace text-muted"},bt={class:"d-flex align-items-center"},Ct={class:"progress flex-grow-1",style:{height:"6px"}},kt={class:"ms-2 small text-muted w-25 text-end"},wt={class:"col-lg-5"},St={class:"card mb-4"},Tt={class:"card-body p-3",style:{"min-height":"120px","max-height":"200px","overflow-y":"auto"}},Rt={key:0,class:"text-muted text-center py-3 mb-0"},At={key:1,class:"text-muted text-center py-3 mb-0"},Dt={key:2,class:"list-group list-group-flush"},Nt={class:"fw-bold small"},Lt={class:"text-muted",style:{"font-size":"0.75rem"}},Ot={class:"badge status-warning text-dark"},Ut={class:"card"},Mt={class:"card-body d-flex align-items-center justify-content-around p-4",style:{"min-height":"200px"}},jt={class:"pie-container",style:{width:"140px",height:"140px",flex:"0 0 auto"}},zt={class:"ms-3 flex-grow-1"},Bt={class:"mb-3"},Et={class:"h5 mb-0",style:{color:"var(--text-heading)"}},It={class:"h5 mb-0",style:{color:"var(--text-heading)"}},Gt={__name:"Analytics",setup(Vt){const{fetchAnalytics:N,fetchCertificates:L}=P(),{formatBytes:f}=J(),{config:O}=E(),C=c(null),v=c(null);let u=null;const U=X(C,{maxPoints:96}),d=T({analytics:!0,certs:!0}),m=c("24h"),p=c(!1),a=T({concurrentUsers:"-",totalTraffic:0,expiringCerts:"-",totalReceived:0,totalSent:0,totalReceivedString:"-",totalSentString:"-"}),_=c([]),h=c([]);let k=[];const g=async()=>{d.analytics=!0;try{const l=await N(m.value);l.success&&M(l.data)}catch(l){console.error(l)}finally{d.analytics=!1}},w=async()=>{d.certs=!0;try{const e=(await L()).filter(s=>!s.is_revoked&&!s.is_expired&&s.days_remaining!=null&&s.days_remaining<=45);a.expiringCerts=e.length,h.value=e.sort((s,j)=>s.days_remaining-j.days_remaining)}catch(l){console.error(l)}finally{d.certs=!1}},M=l=>{a.concurrentUsers=l.max_concurrent_24h||0;const e=l.traffic_distribution||{rx:0,tx:0};a.totalReceived=Number(e.rx||0),a.totalSent=Number(e.tx||0),a.totalTraffic=a.totalReceived+a.totalSent,a.totalReceivedString=f(a.totalReceived),a.totalSentString=f(a.totalSent),_.value=(l.top_clients_24h||[]).map(s=>({name:s.common_name,total:Number(s.total_traffic||0),percent:a.totalTraffic>0?(Number(s.total_traffic)/a.totalTraffic*100).toFixed(1):0})),k=(l.global_history_24h||[]).map(s=>({timestamp:s.timestamp,bytes_received:s.total_rx,bytes_sent:s.total_tx,rx_rate_mbps:s.total_rx_rate,tx_rate_mbps:s.total_tx_rate})),y(),S()},y=()=>{U.render(k,{range:m.value,speedMode:p.value})},S=()=>{if(!v.value)return;u&&u.destroy();const l=v.value.getContext("2d"),e=G().isDark?"#161b22":"#ffffff";u=new K(l,{type:"doughnut",data:{labels:["Received","Sent"],datasets:[{data:[a.totalReceived,a.totalSent],backgroundColor:[W,q],borderColor:e,borderWidth:2,hoverOffset:4}]},options:{responsive:!0,maintainAspectRatio:!1,cutout:"70%",plugins:{legend:{display:!1}}}})};let x;return z(()=>{y(),S()}),B(()=>{g(),w();const l=O.value?.refresh_interval||3e4;x=setInterval(()=>{g(),w()},l)}),I(()=>{x&&clearInterval(x),u&&u.destroy()}),(l,e)=>(i(),n(b,null,[t("div",Q,[t("div",Y,[t("div",Z,[t("h3",null,o(a.concurrentUsers),1),e[2]||(e[2]=t("p",{class:"stat-label"},"Concurrent Users (Peak)",-1))])]),t("div",$,[t("div",tt,[t("h3",null,o(R(f)(a.totalTraffic)),1),e[3]||(e[3]=t("p",{class:"stat-label"},"Traffic Volume (Total)",-1))])]),t("div",et,[t("div",st,[t("h3",null,o(a.expiringCerts),1),e[4]||(e[4]=t("p",{class:"stat-label"},"Expiring Soon (In 45 Days)",-1))])])]),t("div",at,[t("div",lt,[e[8]||(e[8]=t("span",null,[t("i",{class:"fas fa-chart-area me-2"}),r("Traffic Overview")],-1)),t("div",ot,[A(t("select",{class:"form-select form-select-sm",style:{width:"auto"},"onUpdate:modelValue":e[0]||(e[0]=s=>m.value=s),onChange:g},[...e[5]||(e[5]=[t("option",{value:"24h"},"Last 24 Hours",-1),t("option",{value:"7d"},"Last 7 Days",-1),t("option",{value:"30d"},"Last 1 Month",-1)])],544),[[V,m.value]]),t("div",nt,[t("div",it,[t("label",rt,[A(t("input",{type:"checkbox",id:"vizToggle","onUpdate:modelValue":e[1]||(e[1]=s=>p.value=s),onChange:y},nuLine truncated
@@ -1,15 +1,15 @@
import{r as v,a as B,s as N,D as ze,o as qe,B as We,b as Ye,c as n,d as t,A as F,g as c,x as u,F as b,i as _,t as o,w as g,q as x,p as Ge,y as C,v as X,m as q,h as ee,C as ge,j as Je,k as l,f as Ze}from"./index-BsVv6gaD.js";import{_ as ye,a as te}from"./ConfirmModal-CzamKe9d.js";import"./vendor-charts-Bcjh2pZL.js";import"./vendor-ui-jlFFG6nm.js";const Qe={class:"backup-page"},Xe={class:"config-card backup-card"},et={class:"d-flex justify-content-between align-items-center mb-3 flex-wrap gap-2"},tt=["disabled"],st={class:"table-responsive"},at={class:"table table-hover mb-0"},nt={key:0},lt={key:1},ot={class:"fw-semibold",style:{color:"var(--text-heading)"}},it={class:"text-muted small"},rt={key:0,class:"small mt-1"},dt=["title"],ct={key:1,class:"status-badge status-warning"},ut={key:1,class:"small mt-1"},pt={class:"status-badge status-client"},mt=["title"],bt={key:1,class:"text-muted small"},ft={key:2,class:"text-muted small"},gt=["onClick","disabled"],yt={key:0,class:"fas fa-spinner fa-spin"},vt={key:1,class:"fas fa-plug"},kt=["onClick","disabled"],ht=["onClick","disabled"],_t={class:"config-card backup-card"},wt={class:"d-flex justify-content-between align-items-center flex-wrap gap-2 mb-2"},xt={key:0,class:"status-badge status-valid"},St={key:1,class:"status-badge status-warning"},Ct=["disabled"],$t={class:"text-muted small mb-3"},Tt={class:"config-input-group"},Pt=["disabled"],Nt=["disabled"],Vt={class:"text-muted small mt-2 mb-0"},It={class:"text-main"},Dt={key:0},Ut={key:1},At={key:0,class:"text-muted small mb-3"},Et={key:1,class:"mb-3"},Rt=["id","value","disabled"],Bt=["for"],Ft={class:"text-muted small"},Mt={key:0,class:"text-muted small"},jt={class:"btn-action-group justify-content-center mt-3"},Lt=["disabled"],Ot={key:0,class:"fas fa-spinner fa-spin"},Ht={key:1,class:"fas fa-box-archive"},Kt={key:2,class:"nested-box fade-in mt-4"},zt={class:"nested-label d-flex justify-content-between"},qt={class:"backup-steps"},Wt={key:0,class:"fas fa-spinner fa-spin me-1"},Yt={class:"fw-semibold ms-2",style:{color:"var(--text-heading)"}},Gt={key:0,class:"text-muted small ms-1 mt-1"},Jt={key:0,class:"text-muted small mt-2"},Zt={key:3,class:"mt-4"},Qt={class:"table-responsive"},Xt={class:"table table-hover mb-0"},es={class:"text-capitalize"},ts={class:"small text-muted"},ss={class:"config-card backup-card"},as={class:"config-row"},ns={class:"config-col"},ls={class:"select-container"},os=["disabled"],is=["value"],rs={key:0,class:"text-muted small mt-2"},ds={key:1,class:"mt-2"},cs={class:"text-muted small mt-1"},us={key:2,class:"mt-2"},ps={class:"text-muted small ms-2"},ms={class:"config-row"},bs={class:"config-col"},fs={class:"select-container"},gs=["disabled"],ys={value:"",disabled:""},vs=["value"],ks={key:0,class:"config-row"},hs={class:"config-col"},_s={class:"btn-action-group justify-content-center"},ws=["disabled"],xs={key:0,class:"fas fa-spinner fa-spin"},Ss={key:1,class:"fas fa-rotate-left"},Cs={key:1,class:"nested-box fade-in mt-4"},$s={class:"nested-label d-flex justify-content-between"},Ts={class:"backup-steps"},Ps={class:"status-badge status-warning"},Ns={key:1,class:"mt-3"},Vs={class:"mb-3"},Is={class:"mb-3"},Ds={class:"select-container"},Us=["value"],As={key:0,class:"form-text mt-2 small text-warning"},Es={class:"form-label small fw-bold text-muted text-uppercase d-block"},Rs={class:"toggle-wrapper"},Bs={class:"toggle-switch"},Fs=["onUpdate:modelValue"],Ms={class:"form-label small fw-bold text-muted text-uppercase"},js=["onUpdate:modelValue","placeholder"],Ls={key:0,class:"form-text mt-1 text-muted small"},Os={class:"form-label small fw-bold text-muted text-uppercase"},Hs=["onUpdate:modelValue","placeholder"],Ks={class:"form-label small fw-bold text-muted text-uppercase"},zs=["onUpdate:modelValue"],qs={class:"form-label small fw-bold text-muted text-uppercase"},Ws=["onUpdate:modelValue","placeholder"],Ys={key:0,class:"form-text mt-1 text-muted small"},Gs={key:5,class:"form-text mt-2 small text-warning"},Js={key:0,class:"mb-3"},Zs={key:0,class:"small text-main",style:{"word-break":"break-all"}},Qs={key:1,class:"form-text small text-warning"},Xs={class:"mb-3"},ea={class:"mb-1 d-flex align-items-center"},ta={class:"toggle-wrapper me-2"},sa={class:"toggle-switch"},aa=["disabled"],na={key:0,class:"spinner-border spinner-border-sm me-2"},la={class:"mb-3"},oa={class:"mb-2"},ia=["disabled"],ra=["disabled"],da={key:0,class:"spinner-border spinner-border-sm me-2"},fa={__name:"BackupRestore",setup(ca){const{profilesApiClient:y}=Je(),m=We(),{formatBytes:ve}=Ze(),se=v(!0),k=v(!1),M=v(null),p=B({encryption_enabled:!1,default_retention:14,local_root:"",types:[],server_name:"",effective_server_name:"",server_name_source:"hostname"}),P=v(""),V=v([]),W=v([]),$=v([]),i=B({kind:null,state:"idle",stages:[],results:[],warnings:[],message:null,relogin:!1}),j=v(!1),I=v(null),L=v(null),ae=v(null),ne=v(null),le=v(null),r=B({id:null,name:"",type:"local",enabled:!0,retention_count:14,params:{},secrets:{}}),O=v({}),S=B({value:"",cLine truncated import{r as v,a as F,p as N,D as ze,o as qe,C as We,c as Ye,d as n,e as t,q as B,g as c,m as u,F as b,i as _,t as o,w as g,x,y as Ge,s as C,v as X,A as q,h as ee,z as ge,j as Je,k as l}from"./index-CrxOIffM.js";import{u as Ze}from"./useFormatters-CKGG-YVI.js";import{_ as ye,a as te}from"./ConfirmModal-C1vwv-4S.js";import"./vendor-ui-Dumif2LN.js";const Qe={class:"backup-page"},Xe={class:"config-card backup-card"},et={class:"d-flex justify-content-between align-items-center mb-3 flex-wrap gap-2"},tt=["disabled"],st={class:"table-responsive"},at={class:"table table-hover mb-0"},nt={key:0},lt={key:1},ot={class:"fw-semibold",style:{color:"var(--text-heading)"}},it={class:"text-muted small"},rt={key:0,class:"small mt-1"},dt=["title"],ct={key:1,class:"status-badge status-warning"},ut={key:1,class:"small mt-1"},pt={class:"status-badge status-client"},mt=["title"],bt={key:1,class:"text-muted small"},ft={key:2,class:"text-muted small"},gt=["onClick","disabled"],yt={key:0,class:"fas fa-spinner fa-spin"},vt={key:1,class:"fas fa-plug"},kt=["onClick","disabled"],ht=["onClick","disabled"],_t={class:"config-card backup-card"},wt={class:"d-flex justify-content-between align-items-center flex-wrap gap-2 mb-2"},xt={key:0,class:"status-badge status-valid"},St={key:1,class:"status-badge status-warning"},Ct=["disabled"],$t={class:"text-muted small mb-3"},Tt={class:"config-input-group"},Pt=["disabled"],Nt=["disabled"],Vt={class:"text-muted small mt-2 mb-0"},It={class:"text-main"},Dt={key:0},Ut={key:1},At={key:0,class:"text-muted small mb-3"},Et={key:1,class:"mb-3"},Rt=["id","value","disabled"],Ft=["for"],Bt={class:"text-muted small"},Mt={key:0,class:"text-muted small"},jt={class:"btn-action-group justify-content-center mt-3"},Lt=["disabled"],Ot={key:0,class:"fas fa-spinner fa-spin"},Ht={key:1,class:"fas fa-box-archive"},Kt={key:2,class:"nested-box fade-in mt-4"},zt={class:"nested-label d-flex justify-content-between"},qt={class:"backup-steps"},Wt={key:0,class:"fas fa-spinner fa-spin me-1"},Yt={class:"fw-semibold ms-2",style:{color:"var(--text-heading)"}},Gt={key:0,class:"text-muted small ms-1 mt-1"},Jt={key:0,class:"text-muted small mt-2"},Zt={key:3,class:"mt-4"},Qt={class:"table-responsive"},Xt={class:"table table-hover mb-0"},es={class:"text-capitalize"},ts={class:"small text-muted"},ss={class:"config-card backup-card"},as={class:"config-row"},ns={class:"config-col"},ls={class:"select-container"},os=["disabled"],is=["value"],rs={key:0,class:"text-muted small mt-2"},ds={key:1,class:"mt-2"},cs={class:"text-muted small mt-1"},us={key:2,class:"mt-2"},ps={class:"text-muted small ms-2"},ms={class:"config-row"},bs={class:"config-col"},fs={class:"select-container"},gs=["disabled"],ys={value:"",disabled:""},vs=["value"],ks={key:0,class:"config-row"},hs={class:"config-col"},_s={class:"btn-action-group justify-content-center"},ws=["disabled"],xs={key:0,class:"fas fa-spinner fa-spin"},Ss={key:1,class:"fas fa-rotate-left"},Cs={key:1,class:"nested-box fade-in mt-4"},$s={class:"nested-label d-flex justify-content-between"},Ts={class:"backup-steps"},Ps={class:"status-badge status-warning"},Ns={key:1,class:"mt-3"},Vs={class:"mb-3"},Is={class:"mb-3"},Ds={class:"select-container"},Us=["value"],As={key:0,class:"form-text mt-2 small text-warning"},Es={class:"form-label small fw-bold text-muted text-uppercase d-block"},Rs={class:"toggle-wrapper"},Fs={class:"toggle-switch"},Bs=["onUpdate:modelValue"],Ms={class:"form-label small fw-bold text-muted text-uppercase"},js=["onUpdate:modelValue","placeholder"],Ls={key:0,class:"form-text mt-1 text-muted small"},Os={class:"form-label small fw-bold text-muted text-uppercase"},Hs=["onUpdate:modelValue","placeholder"],Ks={class:"form-label small fw-bold text-muted text-uppercase"},zs=["onUpdate:modelValue"],qs={class:"form-label small fw-bold text-muted text-uppercase"},Ws=["onUpdate:modelValue","placeholder"],Ys={key:0,class:"form-text mt-1 text-muted small"},Gs={key:5,class:"form-text mt-2 small text-warning"},Js={key:0,class:"mb-3"},Zs={key:0,class:"small text-main",style:{"word-break":"break-all"}},Qs={key:1,class:"form-text small text-warning"},Xs={class:"mb-3"},ea={class:"mb-1 d-flex align-items-center"},ta={class:"toggle-wrapper me-2"},sa={class:"toggle-switch"},aa=["disabled"],na={key:0,class:"spinner-border spinner-border-sm me-2"},la={class:"mb-3"},oa={class:"mb-2"},ia=["disabled"],ra=["disabled"],da={key:0,class:"spinner-border spinner-border-sm me-2"},fa={__name:"BackupRestore",setup(ca){const{profilesApiClient:y}=Je(),m=We(),{formatBytes:ve}=Ze(),se=v(!0),k=v(!1),M=v(null),p=F({encryption_enabled:!1,default_retention:14,local_root:"",types:[],server_name:"",effective_server_name:"",server_name_source:"hostname"}),P=v(""),V=v([]),W=v([]),$=v([]),i=F({kind:null,state:"idle",stages:[],results:[],warnings:[],message:null,relogin:!1}),j=v(!1),I=v(null),L=v(null),ae=v(null),ne=v(null),le=v(null),r=F({id:null,name:"",type:"local",enabled:!0,retention_count:14,params:{},secrets:{}}),O=v({}),S=F({value:"",cLine truncated
`:`The server of "${a.name}" showed this host key. Compare it with the fingerprint you know (ssh-keygen -lf on the server) before you trust it. `:`The server of "${a.name}" showed this host key. Compare it with the fingerprint you know (ssh-keygen -lf on the server) before you trust it.
`)+`Type: ${e.key_type} `)+`Type: ${e.key_type}
SHA-256: ${e.fingerprint} SHA-256: ${e.fingerprint}
Packages are sent only to a server with exactly this key.`,confirmText:e.key_changed?"Trust the new key":"Trust",confirmBtnClass:e.key_changed?"btn-action-danger":"btn-action-primary",data:{id:a.id,name:a.name,fingerprint:e.fingerprint}})},Ee=async a=>{try{await y.post(`/backup/destinations/${a.id}/trust-host-key`,{fingerprint:a.fingerprint}),m.show(`Host key of ${a.name} trusted. Press Test to check the connection.`,"success"),await T()}catch(e){m.show(w(e),"error")}},Re=a=>{ae.value.open({title:"Delete Destination?",message:`Delete "${a.name}"? Packages already stored there are not deleted.`,confirmText:"Yes, Delete",data:a})},Be=async a=>{try{await y.delete(`/backup/destinations/${a.id}`),m.show(`${a.name} deleted.`,"success"),d.sourceId===a.id&&(d.sourceId=null),await T()}catch(e){m.show(w(e),"error")}},Fe=()=>{S.value="",S.confirm="",L.value.show()},Me=async()=>{if(S.value!==S.confirm){m.show("Passphrases do not match.","error");return}await be({passphrase:S.value},"Passphrase saved.")},je=async()=>{await be({clear_passphrase:!0},"Passphrase removed. New packages are not encrypted.")},me=async()=>{const a=P.value.trim();if(a!==(p.server_name||"")){k.value=!0;try{const e=await y.put("/backup/settings",{server_name:a});Object.assign(p,e.data),P.value=p.server_name||"",m.show(a?"Server name saved.":"Server name cleared.","success")}catch(e){m.show(w(e),"error")}finally{k.value=!1}}},be=async(a,e)=>{k.value=!0;try{const s=await y.put("/backup/settings",a);Object.assign(p,s.data),m.show(e,"success"),L.value.hide(),await T()}catch(s){m.show(w(s),"error")}finally{k.value=!1}},Le=async()=>{try{await y.post("/backup/run",{destination_ids:$.value}),j.value=!1,i.kind="backup",i.state="running",await R(),Z()}catch(a){a.response?.status===409&&await R(),m.show(w(a),"error")}},fe=async()=>{if(d.packages=[],d.packageName="",d.passphrase="",d.sourceError="",d.sourceId!==null){d.checking=!0;try{const a=await y.get(`/backup/destinations/${d.sourceId}/packages`);d.packages=a.data.packages}catch(a){d.sourceError=w(a)}finally{d.checking=!1}}};ze(()=>d.sourceId,fe);const Oe=()=>{const a=E.value;ne.value.open({title:"Restore from Backup?",message:`Package: ${a.server_name}, ${oe(a.created_at)} (${z(a.created_at)} local) Packages are sent only to a server with exactly this key.`,confirmText:e.key_changed?"Trust the new key":"Trust",confirmBtnClass:e.key_changed?"btn-action-danger":"btn-action-primary",data:{id:a.id,name:a.name,fingerprint:e.fingerprint}})},Ee=async a=>{try{await y.post(`/backup/destinations/${a.id}/trust-host-key`,{fingerprint:a.fingerprint}),m.show(`Host key of ${a.name} trusted. Press Test to check the connection.`,"success"),await T()}catch(e){m.show(w(e),"error")}},Re=a=>{ae.value.open({title:"Delete Destination?",message:`Delete "${a.name}"? Packages already stored there are not deleted.`,confirmText:"Yes, Delete",data:a})},Fe=async a=>{try{await y.delete(`/backup/destinations/${a.id}`),m.show(`${a.name} deleted.`,"success"),d.sourceId===a.id&&(d.sourceId=null),await T()}catch(e){m.show(w(e),"error")}},Be=()=>{S.value="",S.confirm="",L.value.show()},Me=async()=>{if(S.value!==S.confirm){m.show("Passphrases do not match.","error");return}await be({passphrase:S.value},"Passphrase saved.")},je=async()=>{await be({clear_passphrase:!0},"Passphrase removed. New packages are not encrypted.")},me=async()=>{const a=P.value.trim();if(a!==(p.server_name||"")){k.value=!0;try{const e=await y.put("/backup/settings",{server_name:a});Object.assign(p,e.data),P.value=p.server_name||"",m.show(a?"Server name saved.":"Server name cleared.","success")}catch(e){m.show(w(e),"error")}finally{k.value=!1}}},be=async(a,e)=>{k.value=!0;try{const s=await y.put("/backup/settings",a);Object.assign(p,s.data),m.show(e,"success"),L.value.hide(),await T()}catch(s){m.show(w(s),"error")}finally{k.value=!1}},Le=async()=>{try{await y.post("/backup/run",{destination_ids:$.value}),j.value=!1,i.kind="backup",i.state="running",await R(),Z()}catch(a){a.response?.status===409&&await R(),m.show(w(a),"error")}},fe=async()=>{if(d.packages=[],d.packageName="",d.passphrase="",d.sourceError="",d.sourceId!==null){d.checking=!0;try{const a=await y.get(`/backup/destinations/${d.sourceId}/packages`);d.packages=a.data.packages}catch(a){d.sourceError=w(a)}finally{d.checking=!1}}};ze(()=>d.sourceId,fe);const Oe=()=>{const a=E.value;ne.value.open({title:"Restore from Backup?",message:`Package: ${a.server_name}, ${oe(a.created_at)} (${z(a.created_at)} local)
This replaces: This replaces:
- the monitoring database (statistics, administrator accounts, 2FA), - the monitoring database (statistics, administrator accounts, 2FA),
- the profiler database and the server settings, - the profiler database and the server settings,
- the PKI (CA, keys, certificates) and the client profiles. - the PKI (CA, keys, certificates) and the client profiles.
OpenVPN is stopped and started again; connected clients are disconnected. The current state is saved to a local safety copy first. You will have to log in again.`,confirmText:"Yes, Restore",confirmBtnClass:"btn-action-danger",data:a})},He=async a=>{try{await y.post("/backup/restore",{destination_id:d.sourceId,package:a.name,passphrase:a.encrypted?d.passphrase:null}),j.value=!1,d.passphrase="",i.kind="restore",i.state="running",await R(),Z()}catch(e){m.show(w(e),"error")}},Ke=()=>{localStorage.removeItem("ovpmon_token"),localStorage.removeItem("ovpmon_user"),window.location.href="/login"};return qe(async()=>{try{await Te(),await T(),ce(),await Promise.all([de(),R()])}catch(a){m.show(`Failed to load backup settings: ${w(a)}`,"error")}finally{se.value=!1}}),Ye(ue),(a,e)=>(l(),n("div",Qe,[t("div",Xe,[e[23]||(e[23]=t("div",{class:"config-header"},[t("h1",null,"Backup Destinations")],-1)),t("div",et,[e[14]||(e[14]=t("span",{class:"text-muted small"},"Where backup packages are stored. A backup goes to every selected destination.",-1)),t("button",{type:"button",class:"btn-action btn-action-save btn-sm",onClick:Ne,disabled:!p.types.length},[...e[13]||(e[13]=[t("i",{class:"fas fa-plus"},null,-1),c(" Add destination ",-1)])],8,tt)]),t("div",st,[t("table",at,[e[22]||(e[22]=t("thead",null,[t("tr",null,[t("th",null,"Name"),t("th",null,"Type"),t("th",null,"Status"),t("th",null,"Last result"),t("th",null,"Actions")])],-1)),t("tbody",null,[se.value?(l(),n("tr",nt,[...e[15]||(e[15]=[t("td",{colspan:"5",class:"text-center py-4"},[t("div",{class:"spinner-border spinner-border-sm text-primary",role:"status"},[t("span",{class:"visually-hidden"},"Loading...")])],-1)])])):V.value.length===0?(l(),n("tr",lt,[...e[16]||(e[16]=[t("td",{colspan:"5",class:"empty-state text-center py-4"},[t("i",{class:"fas fa-box-archive fa-2x mb-3 text-muted"}),t("p",{class:"text-muted mb-0"},"No destinations yet. Add one to start making backups.")],-1)])])):u("",!0),(l(!0),n(b,null,_(V.value,s=>(l(),n("tr",{key:s.id},[t("td",null,[t("div",ot,o(s.name),1),t("div",it,o(we(s)),1),U(s.type)?.pins_host_key?(l(),n("div",rt,[s.params.host_key?(l(),n("span",{key:0,class:"status-badge status-valid",title:s.params.host_key},[...e[17]||(e[17]=[t("i",{class:"fas fa-fingerprint me-1"},null,-1),c("Host key trusted ",-1)])],8,dt)):(l(),n("span",ct,[...e[18]||(e[18]=[t("i",{class:"fas fa-triangle-exclamation me-1"},null,-1),c("Host key not trusted: press Test and confirm it ",-1)])]))])):u("",!0),xe(s)?(l(),n("div",ut,[...e[19]||(e[19]=[t("span",{class:"status-badge status-warning"},[t("i",{class:"fas fa-triangle-exclamation me-1"}),c("No TLS: clear text")],-1)])])):u("",!0)]),t("td",null,[t("span",pt,o(Y(s.type)),1)]),t("td",null,[t("span",{class:C(["status-badge",s.enabled?"status-valid":"status-secondary"])},o(s.enabled?"Enabled":"Disabled"),3)]),t("td",null,[s.last_status?(l(),n("span",{key:0,class:C(["status-badge",s.last_status==="ok"?"status-valid":"status-expired"]),title:s.last_message},o(s.last_status==="ok"?"OK":"Failed"),11,mt)):(l(),n("span",bt,"never used")),s.last_at?(l(),n("div",ft,o(z(s.last_at)),1)):u("",!0)]),t("td",null,[t("button",{class:"btn btn-sm btn-link text-primary p-0 me-2",title:"Test connection",onClick:f=>Ue(s),disabled:M.value===s.id},[M.value===s.id?(l(),n("i",yt)):(l(),n("i",vt))],8,gt),t("button",{class:"btn btn-sm btn-link text-warning p-0 me-2",title:"Edit",onClick:f=>Ve(s),disabled:h.value},[...e[20]||(e[20]=[t("i",{class:"fas fa-pen"},null,-1)])],8,kt),t("button",{class:"btn btn-sm btn-link text-danger p-0",title:"Delete",onClick:f=>Re(s),disabled:h.value},[...e[21]||(e[21]=[t("i",{class:"fas fa-trash"},null,-1)])],8,ht)])]))),128))])])])]),t("div",_t,[e[34]||(e[34]=t("div",{class:"config-header"},[t("h1",null,"Backup")],-1)),t("div",wt,[t("div",null,[p.encryption_enabled?(l(),n("span",xt,[...e[24]||(e[24]=[t("i",{class:"fas fa-lock me-1"},null,-1),c("Packages are encrypted ",-1)])])):(l(),n("span",St,[...e[25]||(e[25]=[t("i",{class:"fas fa-triangle-exclamation me-1"},null,-1),c("Packages are NOT encrypted ",-1)])]))]),t("button",{type:"button",class:"btn-action btn-action-secondary btn-sm",onClick:Fe,disabled:h.value},[e[26]||(e[26]=t("i",{class:"fas fa-key"},null,-1)),c(" "+o(p.encryption_enabled?"Change passphrase":"Set passphrase"),1)],8,Ct)]),t("p",$t,[e[27]||(e[27]=c(" A package contains the CA private key, the certificates and the password hashes of the administrators. ",-1)),p.encryption_enabled?(l(),n(b,{key:1},[c("Keep the passphrase: a package cannot be restored without it, and it is not stored in the package.")],64)):(l(),n(b,{key:0},[c("Remote destinations need an encryption passphrase; a local folder can be used without it.")],64))]),e[35]||(e[35]=t("div",{class:"config-divider"},null,-1)),e[36]||(e[36]=t("label",{class:"config-label"},"Server name",-1)),t("div",Tt,[g(t("input",{type:"text",class:"config-input","onUpdate:modelValue":e[0]||(e[0]=s=>P.value=s),maxlength:"63",autocomplete:"off",placeholder:"e.g. vpn-m Line truncated OpenVPN is stopped and started again; connected clients are disconnected. The current state is saved to a local safety copy first. You will have to log in again.`,confirmText:"Yes, Restore",confirmBtnClass:"btn-action-danger",data:a})},He=async a=>{try{await y.post("/backup/restore",{destination_id:d.sourceId,package:a.name,passphrase:a.encrypted?d.passphrase:null}),j.value=!1,d.passphrase="",i.kind="restore",i.state="running",await R(),Z()}catch(e){m.show(w(e),"error")}},Ke=()=>{localStorage.removeItem("ovpmon_token"),localStorage.removeItem("ovpmon_user"),window.location.href="/login"};return qe(async()=>{try{await Te(),await T(),ce(),await Promise.all([de(),R()])}catch(a){m.show(`Failed to load backup settings: ${w(a)}`,"error")}finally{se.value=!1}}),Ye(ue),(a,e)=>(l(),n("div",Qe,[t("div",Xe,[e[23]||(e[23]=t("div",{class:"config-header"},[t("h1",null,"Backup Destinations")],-1)),t("div",et,[e[14]||(e[14]=t("span",{class:"text-muted small"},"Where backup packages are stored. A backup goes to every selected destination.",-1)),t("button",{type:"button",class:"btn-action btn-action-save btn-sm",onClick:Ne,disabled:!p.types.length},[...e[13]||(e[13]=[t("i",{class:"fas fa-plus"},null,-1),c(" Add destination ",-1)])],8,tt)]),t("div",st,[t("table",at,[e[22]||(e[22]=t("thead",null,[t("tr",null,[t("th",null,"Name"),t("th",null,"Type"),t("th",null,"Status"),t("th",null,"Last result"),t("th",null,"Actions")])],-1)),t("tbody",null,[se.value?(l(),n("tr",nt,[...e[15]||(e[15]=[t("td",{colspan:"5",class:"text-center py-4"},[t("div",{class:"spinner-border spinner-border-sm text-primary",role:"status"},[t("span",{class:"visually-hidden"},"Loading...")])],-1)])])):V.value.length===0?(l(),n("tr",lt,[...e[16]||(e[16]=[t("td",{colspan:"5",class:"empty-state text-center py-4"},[t("i",{class:"fas fa-box-archive fa-2x mb-3 text-muted"}),t("p",{class:"text-muted mb-0"},"No destinations yet. Add one to start making backups.")],-1)])])):u("",!0),(l(!0),n(b,null,_(V.value,s=>(l(),n("tr",{key:s.id},[t("td",null,[t("div",ot,o(s.name),1),t("div",it,o(we(s)),1),U(s.type)?.pins_host_key?(l(),n("div",rt,[s.params.host_key?(l(),n("span",{key:0,class:"status-badge status-valid",title:s.params.host_key},[...e[17]||(e[17]=[t("i",{class:"fas fa-fingerprint me-1"},null,-1),c("Host key trusted ",-1)])],8,dt)):(l(),n("span",ct,[...e[18]||(e[18]=[t("i",{class:"fas fa-triangle-exclamation me-1"},null,-1),c("Host key not trusted: press Test and confirm it ",-1)])]))])):u("",!0),xe(s)?(l(),n("div",ut,[...e[19]||(e[19]=[t("span",{class:"status-badge status-warning"},[t("i",{class:"fas fa-triangle-exclamation me-1"}),c("No TLS: clear text")],-1)])])):u("",!0)]),t("td",null,[t("span",pt,o(Y(s.type)),1)]),t("td",null,[t("span",{class:C(["status-badge",s.enabled?"status-valid":"status-secondary"])},o(s.enabled?"Enabled":"Disabled"),3)]),t("td",null,[s.last_status?(l(),n("span",{key:0,class:C(["status-badge",s.last_status==="ok"?"status-valid":"status-expired"]),title:s.last_message},o(s.last_status==="ok"?"OK":"Failed"),11,mt)):(l(),n("span",bt,"never used")),s.last_at?(l(),n("div",ft,o(z(s.last_at)),1)):u("",!0)]),t("td",null,[t("button",{class:"btn btn-sm btn-link text-primary p-0 me-2",title:"Test connection",onClick:f=>Ue(s),disabled:M.value===s.id},[M.value===s.id?(l(),n("i",yt)):(l(),n("i",vt))],8,gt),t("button",{class:"btn btn-sm btn-link text-warning p-0 me-2",title:"Edit",onClick:f=>Ve(s),disabled:h.value},[...e[20]||(e[20]=[t("i",{class:"fas fa-pen"},null,-1)])],8,kt),t("button",{class:"btn btn-sm btn-link text-danger p-0",title:"Delete",onClick:f=>Re(s),disabled:h.value},[...e[21]||(e[21]=[t("i",{class:"fas fa-trash"},null,-1)])],8,ht)])]))),128))])])])]),t("div",_t,[e[34]||(e[34]=t("div",{class:"config-header"},[t("h1",null,"Backup")],-1)),t("div",wt,[t("div",null,[p.encryption_enabled?(l(),n("span",xt,[...e[24]||(e[24]=[t("i",{class:"fas fa-lock me-1"},null,-1),c("Packages are encrypted ",-1)])])):(l(),n("span",St,[...e[25]||(e[25]=[t("i",{class:"fas fa-triangle-exclamation me-1"},null,-1),c("Packages are NOT encrypted ",-1)])]))]),t("button",{type:"button",class:"btn-action btn-action-secondary btn-sm",onClick:Be,disabled:h.value},[e[26]||(e[26]=t("i",{class:"fas fa-key"},null,-1)),c(" "+o(p.encryption_enabled?"Change passphrase":"Set passphrase"),1)],8,Ct)]),t("p",$t,[e[27]||(e[27]=c(" A package contains the CA private key, the certificates and the password hashes of the administrators. ",-1)),p.encryption_enabled?(l(),n(b,{key:1},[c("Keep the passphrase: a package cannot be restored without it, and it is not stored in the package.")],64)):(l(),n(b,{key:0},[c("Remote destinations need an encryption passphrase; a local folder can be used without it.")],64))]),e[35]||(e[35]=t("div",{class:"config-divider"},null,-1)),e[36]||(e[36]=t("label",{class:"config-label"},"Server name",-1)),t("div",Tt,[g(t("input",{type:"text",class:"config-input","onUpdate:modelValue":e[0]||(e[0]=s=>P.value=s),maxlength:"63",autocomplete:"off",placeholder:"e.g. vpn-m Line truncated
@@ -0,0 +1 @@
import{r as v,p as g,l as F,k as r,A as S,e,d as c,m as C,w as D,y as O,s as z,x as q,g as k,t as i,F as T,o as oe,B as ie,q as L,f as j,h as re,i as Z,j as de,C as ue,z as V}from"./index-CrxOIffM.js";import{_ as W,a as ce}from"./ConfirmModal-C1vwv-4S.js";import{T as pe}from"./vendor-ui-Dumif2LN.js";const fe={class:"mb-3"},ve={class:"input-group"},me={key:0,class:"text-danger small mt-2"},_e=["disabled"],be={__name:"NewClientModal",emits:["create"],setup(d,{expose:u,emit:x}){const m=x,y=v(null),n=v(""),f=v(null),w=/^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$/,_=g(()=>w.test(n.value)),$=()=>{n.value="",y.value.show()},N=()=>{y.value.hide()},h=()=>{_.value&&(m("create",n.value),N())};return u({open:$,close:N}),(b,a)=>(r(),F(W,{id:"newClientModal",title:"Create New Client",ref_key:"modal",ref:y,onOpened:a[1]||(a[1]=o=>f.value?.focus())},{body:S(()=>[e("div",fe,[a[3]||(a[3]=e("label",{for:"clientName",class:"form-label small text-muted text-uppercase fw-bold"},"Client Name",-1)),e("div",ve,[a[2]||(a[2]=e("span",{class:"input-group-text"},[e("i",{class:"fas fa-user"})],-1)),D(e("input",{type:"text",class:z(["form-control",{"is-invalid":n.value&&!_.value}]),id:"clientName","onUpdate:modelValue":a[0]||(a[0]=o=>n.value=o),placeholder:"e.g. laptop-user",maxlength:"64",autocomplete:"off",onKeyup:O(h,["enter"]),ref_key:"inputRef",ref:f},null,34),[[q,n.value]])]),n.value&&!_.value?(r(),c("div",me," Letters, digits, dashes and underscores only; the first character must be a letter or a digit. ")):C("",!0),a[4]||(a[4]=e("div",{class:"form-text mt-2 text-muted small"},[e("i",{class:"fas fa-info-circle me-1"}),k(" Use only alphanumeric characters, dashes, or underscores. ")],-1))])]),footer:S(()=>[e("button",{type:"button",class:"btn-action btn-action-secondary",onClick:N},"Cancel"),e("button",{type:"button",class:"btn-action btn-action-save",onClick:h,disabled:!_.value}," Create Client ",8,_e)]),_:1},512))}},I={__name:"StatusBadge",props:{profile:{type:Object,required:!0}},setup(d){const u=d,x=g(()=>{const m=u.profile;return m.is_revoked?{label:"Revoked",cls:"status-expired",icon:"fa-ban"}:m.is_expired?{label:"Expired",cls:"status-expired",icon:"fa-times-circle"}:m.days_remaining!=null&&m.days_remaining<=30?{label:"Expiring Soon",cls:"status-warning",icon:"fa-exclamation-triangle"}:{label:"Active",cls:"status-valid",icon:"fa-check-circle"}});return(m,y)=>(r(),c("span",{class:z(["status-badge",x.value.cls])},[e("i",{class:z(["fas me-1",x.value.icon])},null,2),k(i(x.value.label),1)],2))}},ye={class:"d-flex align-items-center gap-2 flex-wrap"},ge={class:"modal-title fw-bold mb-0",style:{color:"var(--text-heading)"}},xe={key:0},he={class:"profile-meta"},ke={key:0,class:"text-muted"},Ce={class:"certificate-file text-muted small text-break mt-0"},we={class:"form-text text-end"},$e=["disabled"],Ne={__name:"ProfileDetailsModal",emits:["save"],setup(d,{expose:u,emit:x}){const m=x,y=v(null),n=v(null),f=v(""),w=g(()=>f.value!==(n.value?.note||"")),_=g(()=>{const a=n.value?.days_remaining;return a==null?"":a>0?`${a} d`:"expired"}),$=a=>{if(!a)return"N/A";const o=new Date(a);if(isNaN(o))return a;const A=U=>String(U).padStart(2,"0");return`${o.getFullYear()}-${A(o.getMonth()+1)}-${A(o.getDate())} ${A(o.getHours())}:${A(o.getMinutes())}`},N=a=>{n.value=a,f.value=a.note||"",y.value.show()},h=()=>{y.value.hide()},b=()=>{m("save",{id:n.value.id,note:f.value}),h()};return u({open:N,close:h}),(a,o)=>(r(),F(W,{id:"profileDetailsModal",title:"Profile Details",ref_key:"modal",ref:y},{header:S(()=>[e("div",ye,[e("h5",ge,i(n.value?.username),1),n.value?(r(),F(I,{key:0,profile:n.value},null,8,["profile"])):C("",!0)])]),body:S(()=>[n.value?(r(),c("div",xe,[e("dl",he,[o[2]||(o[2]=e("dt",null,"Created",-1)),e("dd",null,i($(n.value.created_at)),1),o[3]||(o[3]=e("dt",null,"Expires",-1)),e("dd",null,[k(i($(n.value.expiration_date)),1),_.value?(r(),c("span",ke," ("+i(_.value)+")",1)):C("",!0)]),n.value.revoked_at?(r(),c(T,{key:0},[o[1]||(o[1]=e("dt",null,"Revoked",-1)),e("dd",null,i($(n.value.revoked_at)),1)],64)):C("",!0),o[4]||(o[4]=e("dt",null,"File",-1)),e("dd",Ce,i(n.value.file_path||"N/A"),1)]),o[5]||(o[5]=e("label",{for:"profileNote",class:"form-label small text-muted text-uppercase fw-bold"},"Note",-1)),D(e("textarea",{class:"form-control",id:"profileNote",rows:"3",maxlength:"1000","onUpdate:modelValue":o[0]||(o[0]=A=>f.value=A),placeholder:"Add a note about this profile..."},null,512),[[q,f.value]]),e("div",we,i(f.value.length)+" / 1000",1)])):C("",!0)]),footer:S(()=>[e("button",{type:"button",class:"btn-action btn-action-secondary",onClick:h},"Close"),e("button",{type:"button",class:"btn-action btn-action-save",onClick:b,disabled:!w.value},"Save",8,$e)]),_:1},512))}},Q=(d,u)=>{d._noteTooltip=new pe(d,{title:u,placement:"top",container:"body",html:!1,trigger:"hover",customClass:"note-tooltip"})},G=d=>{d._noteTooltip?.dispose(),d._noteTooltip=null},Ae=d=>d._noteTooltip?.hide(),J={mounted(d,u){d.addEventListener("click",()=>Ae(d)),u.value&&Q(d,u.value)},updLine truncated
@@ -1 +0,0 @@
import{r as m,l as Q,k as i,m as R,d as e,w as D,p as ne,q as j,g as C,s as y,c,x as w,t as n,F as A,y as G,o as oe,z as ie,A as P,e as H,h as re,i as K,j as de,B as ue,C as F}from"./index-BsVv6gaD.js";import{_ as J,a as ce}from"./ConfirmModal-CzamKe9d.js";import{T as pe}from"./vendor-ui-jlFFG6nm.js";import"./vendor-charts-Bcjh2pZL.js";const fe={class:"mb-3"},ve={class:"input-group"},me=["disabled"],_e={__name:"NewClientModal",emits:["create"],setup(r,{expose:d,emit:E}){const T=E,g=m(null),l=m(""),f=m(null),x=()=>{l.value="",g.value.show(),setTimeout(()=>f.value?.focus(),500)},b=()=>{g.value.hide()},k=()=>{l.value&&(T("create",l.value),b())};return d({open:x,close:b}),($,v)=>(i(),Q(J,{id:"newClientModal",title:"Create New Client",ref_key:"modal",ref:g},{body:R(()=>[e("div",fe,[v[2]||(v[2]=e("label",{for:"clientName",class:"form-label small text-muted text-uppercase fw-bold"},"Client Name",-1)),e("div",ve,[v[1]||(v[1]=e("span",{class:"input-group-text"},[e("i",{class:"fas fa-user"})],-1)),D(e("input",{type:"text",class:"form-control",id:"clientName","onUpdate:modelValue":v[0]||(v[0]=p=>l.value=p),placeholder:"e.g. laptop-user",onKeyup:ne(k,["enter"]),ref_key:"inputRef",ref:f},null,544),[[j,l.value]])]),v[3]||(v[3]=e("div",{class:"form-text mt-2 text-muted small"},[e("i",{class:"fas fa-info-circle me-1"}),C(" Use only alphanumeric characters, dashes, or underscores. ")],-1))])]),footer:R(()=>[e("button",{type:"button",class:"btn-action btn-action-secondary",onClick:b},"Cancel"),e("button",{type:"button",class:"btn-action btn-action-save",onClick:k,disabled:!l.value}," Create Client ",8,me)]),_:1},512))}},be={class:"d-flex align-items-center gap-2 flex-wrap"},ge={class:"modal-title fw-bold mb-0",style:{color:"var(--text-heading)"}},ye={key:0},xe={class:"profile-meta"},ke={key:0,class:"text-muted"},he={class:"certificate-file text-muted small text-break mt-0"},Ce={class:"form-text text-end"},we=["disabled"],$e={__name:"ProfileDetailsModal",emits:["save"],setup(r,{expose:d,emit:E}){const T=E,g=m(null),l=m(null),f=m(""),x=y(()=>f.value!==(l.value?.note||"")),b=y(()=>{const u=l.value;return u?.is_revoked?{label:"Revoked",cls:"status-expired"}:u?.is_expired?{label:"Expired",cls:"status-expired"}:u?.days_remaining!=null&&u.days_remaining<=30?{label:"Expiring Soon",cls:"status-warning"}:{label:"Active",cls:"status-valid"}}),k=y(()=>{const u=l.value?.days_remaining;return u==null?"":u>0?`${u} d`:"expired"}),$=u=>{if(!u)return"N/A";const o=new Date(u);if(isNaN(o))return u;const h=V=>String(V).padStart(2,"0");return`${o.getFullYear()}-${h(o.getMonth()+1)}-${h(o.getDate())} ${h(o.getHours())}:${h(o.getMinutes())}`},v=u=>{l.value=u,f.value=u.note||"",g.value.show()},p=()=>{g.value.hide()},S=()=>{T("save",{id:l.value.id,note:f.value}),p()};return d({open:v,close:p}),(u,o)=>(i(),Q(J,{id:"profileDetailsModal",title:"Profile Details",ref_key:"modal",ref:g},{header:R(()=>[e("div",be,[e("h5",ge,n(l.value?.username),1),l.value?(i(),c("span",{key:0,class:G(["status-badge",b.value.cls])},n(b.value.label),3)):w("",!0)])]),body:R(()=>[l.value?(i(),c("div",ye,[e("dl",xe,[o[2]||(o[2]=e("dt",null,"Created",-1)),e("dd",null,n($(l.value.created_at)),1),o[3]||(o[3]=e("dt",null,"Expires",-1)),e("dd",null,[C(n($(l.value.expiration_date)),1),k.value?(i(),c("span",ke," ("+n(k.value)+")",1)):w("",!0)]),l.value.revoked_at?(i(),c(A,{key:0},[o[1]||(o[1]=e("dt",null,"Revoked",-1)),e("dd",null,n($(l.value.revoked_at)),1)],64)):w("",!0),o[4]||(o[4]=e("dt",null,"File",-1)),e("dd",he,n(l.value.file_path||"N/A"),1)]),o[5]||(o[5]=e("label",{for:"profileNote",class:"form-label small text-muted text-uppercase fw-bold"},"Note",-1)),D(e("textarea",{class:"form-control",id:"profileNote",rows:"3",maxlength:"1000","onUpdate:modelValue":o[0]||(o[0]=h=>f.value=h),placeholder:"Add a note about this profile..."},null,512),[[j,f.value]]),e("div",Ce,n(f.value.length)+" / 1000",1)])):w("",!0)]),footer:R(()=>[e("button",{type:"button",class:"btn-action btn-action-secondary",onClick:p},"Close"),e("button",{type:"button",class:"btn-action btn-action-save",onClick:S,disabled:!x.value},"Save",8,we)]),_:1},512))}},O=(r,d)=>{r._noteTooltip=new pe(r,{title:d,placement:"top",container:"body",html:!1,trigger:"hover",customClass:"note-tooltip"})},Y=r=>{r._noteTooltip?.dispose(),r._noteTooltip=null},Ne=r=>r._noteTooltip?.hide(),q={mounted(r,d){r.addEventListener("click",()=>Ne(r)),d.value&&O(r,d.value)},updated(r,d){d.value!==d.oldValue&&(Y(r),d.value&&O(r,d.value))},unmounted(r){Y(r)}},Te={class:"stats-info mb-4",id:"statsInfo"},Me={class:"stat-item"},Ae={class:"stat-value"},De={class:"stat-item"},Ee={class:"stat-value"},Le={class:"stat-item"},Re={class:"stat-value"},Se={class:"stat-item"},Ve={class:"stat-value"},Be={class:"d-flex justify-content-between align-items-center mb-3 flex-wrap gap-3"},He={class:"d-flex gap-3 align-items-center flex-wrap"},Ue={class:"input-group input-group-sm",style:{width:"250px"}},Pe=["disabled","title"],Fe={class:"d-flex align-items-center"},je={Line truncated
@@ -0,0 +1 @@
import{r as u,o as z,c as E,l as K,k as i,e as t,t as r,w as T,g as $,v as q,h as I,d,m as V,T as G,j,p as U,b as P,q as Q,f as C,s as b,x as J,y as H,F as N,i as B,z as O}from"./index-CrxOIffM.js";import{u as W}from"./useFormatters-CKGG-YVI.js";import{u as X}from"./useTrafficChart-CIDQzDiF.js";import{M as Y}from"./vendor-ui-Dumif2LN.js";import"./vendor-charts-Bcjh2pZL.js";const Z={class:"modal-dialog modal-xl modal-dialog-centered"},tt={class:"modal-content"},et={class:"modal-header"},st={class:"modal-title"},lt={class:"modal-body"},at={class:"chart-controls"},ot={class:"d-flex align-items-center gap-2"},nt={class:"d-flex align-items-center gap-3 bg-white-custom px-3 py-1 border rounded"},it={class:"d-flex align-items-center"},rt={class:"toggle-wrapper me-2"},dt={class:"toggle-switch"},ut={class:"text-main user-select-none",style:{cursor:"pointer"},for:"vizToggle"},ct={class:"modal-chart-container"},vt={key:0,class:"position-absolute top-50 start-50 translate-middle"},mt={__name:"HistoryModal",setup(F,{expose:R}){const{fetchClientHistory:h}=j(),x=u(null),D=u(null),w=u(""),m=u("24h"),y=u(!1),g=u(!1);let p=null,f=null,o=0;const k=X(D,{maxPoints:48}),A=_=>{w.value=_,m.value="24h",y.value=!1,p?.show(),S()},M=()=>{p?.hide()},S=async()=>{if(!w.value)return;const _=++o;g.value=!0;try{const l=await h(w.value,m.value);if(_!==o)return;l.success&&l.data.history?(f=l.data.history.map(c=>({timestamp:c.timestamp,bytes_received:c.bytes_received,bytes_sent:c.bytes_sent,rx_rate_mbps:c.bytes_received_rate_mbps,tx_rate_mbps:c.bytes_sent_rate_mbps})),L()):(f=[],k.destroy())}catch(l){_===o&&console.error(l)}finally{_===o&&(g.value=!1)}},L=()=>{f&&k.render(f,{range:m.value,speedMode:y.value})};return z(()=>{p=new Y(x.value),x.value.addEventListener("hidden.bs.modal",()=>{o++,g.value=!1,f=null,k.destroy()})}),E(()=>{o++,p?.dispose()}),R({open:A,close:M}),(_,l)=>(i(),K(G,{to:"body"},[t("div",{class:"modal fade",id:"historyModal",tabindex:"-1","aria-hidden":"true",ref_key:"modalRef",ref:x},[t("div",Z,[t("div",tt,[t("div",et,[t("h5",st,[l[2]||(l[2]=t("i",{class:"fas fa-chart-area me-2 text-primary"},null,-1)),t("span",null,r(w.value),1)]),l[3]||(l[3]=t("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"},null,-1))]),t("div",lt,[t("div",at,[t("div",ot,[l[5]||(l[5]=t("label",{class:"text-muted"},[t("i",{class:"far fa-clock me-1"}),$(" Range:")],-1)),T(t("select",{"onUpdate:modelValue":l[0]||(l[0]=c=>m.value=c),class:"form-select form-select-sm",style:{width:"auto","min-width":"200px"},onChange:S},[...l[4]||(l[4]=[t("option",{value:"1h"},"Last 1 Hour (30s agg)",-1),t("option",{value:"3h"},"Last 3 Hours (1m agg)",-1),t("option",{value:"24h"},"Last 24 Hours (15m agg)",-1),t("option",{value:"7d"},"Last 7 Days (1h agg)",-1),t("option",{value:"30d"},"Last 30 Days (6h agg)",-1)])],544),[[q,m.value]])]),t("div",nt,[l[7]||(l[7]=t("span",{class:"small fw-bold text-muted"},"Metric:",-1)),t("div",it,[t("div",rt,[t("label",dt,[T(t("input",{type:"checkbox",id:"vizToggle","onUpdate:modelValue":l[1]||(l[1]=c=>y.value=c),onChange:L},null,544),[[I,y.value]]),l[6]||(l[6]=t("span",{class:"toggle-slider"},null,-1))])]),t("label",ut,r(y.value?"Speed (Mbps)":"Data Volume"),1)])])]),t("div",ct,[t("canvas",{ref_key:"chartCanvas",ref:D},null,512),g.value?(i(),d("div",vt,[...l[8]||(l[8]=[t("div",{class:"spinner-border text-primary",role:"status"},null,-1)])])):V("",!0)])])])])],512)]))}},pt={class:"stats-info mb-4"},ft={class:"stat-item"},_t={class:"stat-value"},yt={class:"stat-item"},bt={class:"stat-value"},gt={class:"stat-item"},ht={class:"stat-value"},xt={class:"d-flex justify-content-between align-items-center mb-3 flex-wrap gap-3"},wt={class:"d-flex gap-3 align-items-center flex-wrap"},kt={class:"sort-btn-group"},Ct={class:"input-group input-group-sm",style:{width:"250px"}},$t={class:"d-flex align-items-center"},At={class:"toggle-wrapper me-2"},Mt={class:"toggle-switch"},St={class:"card"},Dt={class:"card-header d-flex justify-content-between align-items-center"},Lt={class:"text-muted"},Nt={class:"table-responsive"},Tt={class:"table table-hover mb-0"},Rt={key:0,class:"fas fa-sort-down ms-1"},Ut={key:0,class:"fas fa-sort-down ms-1"},Vt={key:0},Ht={key:1},Bt={class:"section-divider"},zt={colspan:"8"},Et=["onClick"],It={class:"small text-muted"},jt={class:"font-monospace small"},Ft={class:"font-monospace small"},Kt={class:"font-monospace small"},qt={key:1,class:"text-muted opacity-25"},Gt={class:"font-monospace small"},Pt={key:1,class:"text-muted opacity-25"},Qt={class:"small text-muted"},te={__name:"Clients",setup(F){const{fetchStats:R}=j(),{formatBytes:h,formatRate:x,parseServerDate:D}=W(),{config:w}=P(),m=u([]),y=u(!0),g=u("Updating..."),p=u(""),f=u(!1),o=u("sent"),k=u(null);let A=null;const M=U(()=>{let s=0,e=0,a=0;return m.value.forEach(v=>{s+=v.total_bytes_received||0,e+=v.total_bytes_sent||0,v.status==="Active"&&a++}),{totalReceived:s,totalSent:e,activeClients:a}}),S=U(()=>m.value.filter(s=>!(f.value&&s.status!=="ALine truncated
@@ -0,0 +1 @@
import{M as $}from"./vendor-ui-Dumif2LN.js";import{r as o,p as M,o as S,c as z,l as C,k as u,e,s as g,d as k,m as w,K as p,T,t as _,L as E,A as y}from"./index-CrxOIffM.js";const L=["id"],A={class:"modal-content"},I={class:"modal-header border-0 pb-0"},N={class:"modal-title fw-bold",style:{color:"var(--text-heading)"}},R={class:"modal-body"},V={key:0,class:"modal-footer border-0 pt-0"},q={__name:"BaseModal",props:{id:{type:String,required:!0},title:{type:String,default:""},size:{type:String,default:""}},emits:["opened","closed"],setup(d,{expose:f,emit:v}){const b=d,i=v,t=o(null);let s=null;const c=M(()=>b.size||""),r=()=>{s?.show()},m=()=>{s?.hide()};return S(()=>{s=new $(t.value),t.value.addEventListener("shown.bs.modal",()=>{i("opened")}),t.value.addEventListener("hidden.bs.modal",()=>{i("closed")})}),z(()=>{s?.dispose()}),f({show:r,hide:m}),(a,l)=>(u(),C(T,{to:"body"},[e("div",{class:"modal fade",id:d.id,tabindex:"-1","aria-hidden":"true",ref_key:"modalRef",ref:t},[e("div",{class:g(["modal-dialog modal-dialog-centered",c.value])},[e("div",A,[e("div",I,[p(a.$slots,"header",{},()=>[e("h5",N,_(d.title),1)]),l[0]||(l[0]=e("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"},null,-1))]),e("div",R,[p(a.$slots,"body")]),a.$slots.footer?(u(),k("div",V,[p(a.$slots,"footer")])):w("",!0)])],2)],8,L)]))}},D={class:"text-main",style:{"white-space":"pre-line"}},F={__name:"ConfirmModal",emits:["confirm"],setup(d,{expose:f,emit:v}){const b=`confirm-${E()}`,i=v,t=o(null),s=o(""),c=o(""),r=o("Confirm"),m=o("btn-action-danger"),a=o(!0),l=o(null),x=n=>{s.value=n.title||"Are you sure?",c.value=n.message||"",r.value=n.confirmText||"Confirm",m.value=n.confirmBtnClass||"btn-action-danger",a.value=n.showCancel!==!1,l.value=n.data||null,t.value.show()},h=()=>{t.value.hide()},B=()=>{i("confirm",l.value),h()};return f({open:x,close:h}),(n,K)=>(u(),C(q,{id:b,title:s.value,ref_key:"modal",ref:t},{body:y(()=>[e("p",D,_(c.value),1)]),footer:y(()=>[a.value?(u(),k("button",{key:0,type:"button",class:"btn-action btn-action-secondary",onClick:h},"Cancel")):w("",!0),e("button",{type:"button",class:g(["btn-action",m.value]),onClick:B},_(r.value),3)]),_:1},8,["title"]))}};export{q as _,F as a};
@@ -1 +0,0 @@
import{M as B}from"./vendor-ui-jlFFG6nm.js";import{r as t,o as M,b as $,l as C,k as u,d as e,y as g,e as S,c as k,x as w,K as p,T as z,t as _,m as y}from"./index-BsVv6gaD.js";const T=["id"],E={class:"modal-content"},L={class:"modal-header border-0 pb-0"},N={class:"modal-title fw-bold",style:{color:"var(--text-heading)"}},R={class:"modal-body"},V={key:0,class:"modal-footer border-0 pt-0"},q={__name:"BaseModal",props:{id:{type:String,required:!0},title:{type:String,default:""},size:{type:String,default:""}},emits:["close","opened","closed"],setup(d,{expose:f,emit:b}){const v=d,o=b,s=t(null);let a=null;const i=v.size||"",c=()=>{a?.show()},r=()=>{a?.hide()};return M(()=>{a=new B(s.value),s.value.addEventListener("shown.bs.modal",()=>{o("opened")}),s.value.addEventListener("hidden.bs.modal",()=>{o("closed"),o("close")})}),$(()=>{a?.dispose()}),f({show:c,hide:r}),(n,m)=>(u(),C(z,{to:"body"},[e("div",{class:"modal fade",id:d.id,tabindex:"-1","aria-hidden":"true",ref_key:"modalRef",ref:s},[e("div",{class:g(["modal-dialog modal-dialog-centered",S(i)])},[e("div",E,[e("div",L,[p(n.$slots,"header",{},()=>[e("h5",N,_(d.title),1)]),m[0]||(m[0]=e("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"},null,-1))]),e("div",R,[p(n.$slots,"body")]),n.$slots.footer?(u(),k("div",V,[p(n.$slots,"footer")])):w("",!0)])],2)],8,T)]))}},A={class:"text-main",style:{"white-space":"pre-line"}},j={__name:"ConfirmModal",emits:["confirm"],setup(d,{expose:f,emit:b}){const v=b,o=t(null),s=t(""),a=t(""),i=t("Confirm"),c=t("btn-action-danger"),r=t(!0),n=t(null),m=l=>{s.value=l.title||"Are you sure?",a.value=l.message||"",i.value=l.confirmText||"Confirm",c.value=l.confirmBtnClass||"btn-action-danger",r.value=l.showCancel!==!1,n.value=l.data||null,o.value.show()},h=()=>{o.value.hide()},x=()=>{v("confirm",n.value),h()};return f({open:m,close:h}),(l,D)=>(u(),C(q,{id:"confirmModal",title:s.value,ref_key:"modal",ref:o},{body:y(()=>[e("p",A,_(a.value),1)]),footer:y(()=>[r.value?(u(),k("button",{key:0,type:"button",class:"btn-action btn-action-secondary",onClick:h},"Cancel")):w("",!0),e("button",{type:"button",class:g(["btn-action",c.value]),onClick:x},_(i.value),3)]),_:1},8,["title"]))}};export{q as _,j as a};
@@ -1 +0,0 @@
import{a as I,r as P,s as m,o as A,b as T,c,d as t,C as D,x as N,w as l,q as a,v as V,h as B,g as w,t as R,j as L,B as M,z as O,k as p}from"./index-BsVv6gaD.js";import"./vendor-charts-Bcjh2pZL.js";import"./vendor-ui-jlFFG6nm.js";const G={class:"config-wrapper"},j={class:"config-card"},F={class:"config-row"},Q={class:"config-col"},Y={class:"config-col"},H={class:"config-row"},X={class:"config-col",style:{"max-width":"50%"}},J={class:"select-container"},W={class:"config-row"},Z={class:"config-col"},h={class:"config-col"},ss={class:"config-row"},ts={class:"config-col"},es={class:"config-col"},ns={class:"config-row"},is={class:"config-col"},ls={class:"config-col"},as={class:"config-row"},os={class:"config-col"},rs={class:"select-container"},us={class:"config-col"},ds={class:"number-input-container"},cs={class:"number-input-controls"},ps={class:"config-row"},fs={class:"config-col"},ys={class:"number-input-container"},vs={class:"number-input-controls"},gs={class:"config-col"},bs={class:"number-input-container"},_s={class:"number-input-controls"},ms={class:"config-row"},ws={class:"config-col"},Cs={class:"number-input-container"},ks={class:"number-input-controls"},xs={class:"config-col"},qs={class:"toggle-wrapper"},Is={class:"toggle-switch"},Ps={class:"btn-action-group"},Vs=["disabled"],zs=["disabled","title"],Us={key:0,class:"fas fa-spinner fa-spin"},Ss={key:1,class:"fas fa-play-circle"},Ks=["disabled"],Es={key:0,class:"fas fa-spinner fa-spin"},$s={key:1,class:"fas fa-trash-alt"},As={key:0,class:"config-label"},Rs={__name:"PKIConfig",setup(Ts){const{profilesApiClient:f}=L(),z=M(),{refresh:C}=O(),n=I({fqdn_ca:"",fqdn_server:"",easyrsa_dn:"cn_only",easyrsa_req_country:"",easyrsa_req_province:"",easyrsa_req_city:"",easyrsa_req_org:"",easyrsa_req_email:"",easyrsa_req_ou:"",easyrsa_key_size:2048,easyrsa_ca_expire:null,easyrsa_cert_expire:null,easyrsa_cert_renew:null,easyrsa_crl_days:null,easyrsa_batch:!0}),r=P(!1),u=P(""),o=I({state:"idle",step:null,initialized:!1,error:null}),g=m(()=>o.state==="running"||u.value==="init"),b=m(()=>r.value||g.value),U={"init-pki":"Initializing PKI...",ca:"Building CA...","server-cert":"Building server certificate...",dh:"Generating DH parameters (this can take several minutes)...","ta-key":"Generating TLS key...",crl:"Generating CRL..."},S=m(()=>U[o.step]||"Initializing PKI...");let y=null;const d=(i,s="success")=>z.show(i,s),K=async()=>{try{const s=(await f.get("/config",{params:{section:"pki"}})).data,e=s.pki?s.pki:s;Object.keys(e).forEach(_=>{n.hasOwnProperty(_)&&(n[_]=e[_])})}catch(i){console.error(i),d("Failed to load PKI config from Management API.","error")}},k=()=>{y&&(clearInterval(y),y=null)},x=()=>{y||(y=setInterval(()=>v(),3e3))},v=async(i=!1)=>{const s=o.state==="running";try{const e=await f.get("/system/init/status");Object.assign(o,e.data)}catch(e){console.error(e);return}if(o.state==="running"){x();return}k(),s&&C(),s&&o.state==="done"?d("PKI initialized successfully!","success"):(s||i)&&o.state==="error"&&d(`Error initializing: ${o.error}`,"error")},q=async()=>{r.value=!0,u.value="save";try{await f.put("/config/pki",n),d("Configuration saved successfully!","success")}catch(i){d(`Error saving: ${i.message}`,"error")}finally{r.value=!1,u.value=""}},E=async()=>{if(confirm("Are you sure you want to Initialize system? This will start the PKI initialization process.")){r.value=!0,u.value="init";try{await f.post("/system/init"),o.state="running",x()}catch(i){i.response&&i.response.status===409?await v():d(`Error initializing: ${i.response?.data?.detail||i.message}`,"error")}finally{r.value=!1,u.value=""}}},$=async()=>{if(confirm("Are you sure you want to CLEAR PKI? This will delete all certificates and cannot be undone.")){r.value=!0,u.value="clear";try{const s=(await f.delete("/system/pki")).data;d(s.message||"PKI cleared successfully!","warning"),await v(),C()}catch(i){d(`Error clearing PKI: ${i.response?.data?.detail||i.message}`,"error")}finally{r.value=!1,u.value=""}}};return A(()=>{K(),v(!0)}),T(k),(i,s)=>(p(),c("div",G,[t("div",j,[s[58]||(s[58]=t("div",{class:"config-header"},[t("h1",null,"PKI Infrastructure Configuration")],-1)),t("form",{onSubmit:D(q,["prevent"])},[t("div",F,[t("div",Q,[s[23]||(s[23]=t("label",{class:"config-label"},"FQDN: CA Cert CN",-1)),l(t("input",{type:"text",class:"config-input","onUpdate:modelValue":s[0]||(s[0]=e=>n.fqdn_ca=e)},null,512),[[a,n.fqdn_ca]])]),t("div",Y,[s[24]||(s[24]=t("label",{class:"config-label"},"FQDN: Server Cert CN",-1)),l(t("input",{type:"text",class:"config-input","onUpdate:modelValue":s[1]||(s[1]=e=>n.fqdn_server=e)},null,512),[[a,n.fqdn_server]])])]),s[55]||(s[55]=t("div",{class:"config-divider"},null,-1)),t("div",H,[t("div",X,[s[27]||(s[27]=t("label",{class:"config-label"},"EASYRSA DN",-1)),t("div",J,[l(t("select",{class:"config-select","onUpdate:modelValue":s[2]||(s[2]=e=>n.easyrsa_dn=e)},[...s[25]||(s[25]=[t("option",{value:"cn_only"},"CN_ONLY",-1),t("option",{value:"org"},"ORG",-1)])],512),[[V,n.easyrsa_dn]]),s[26]|Line truncated
@@ -0,0 +1 @@
import{a as V,r as g,p as w,o as O,c as R,d as c,e,q as K,z as L,m as j,w as l,x as a,v as U,h as G,g as C,t as Y,j as F,C as Q,B as H,k as p}from"./index-CrxOIffM.js";import{a as S}from"./ConfirmModal-C1vwv-4S.js";import"./vendor-ui-Dumif2LN.js";const X={class:"config-wrapper"},J={class:"config-card"},W={class:"config-row"},Z={class:"config-col"},h={class:"config-col"},ss={class:"config-row"},es={class:"config-col",style:{"max-width":"50%"}},ts={class:"select-container"},ns={class:"config-row"},is={class:"config-col"},ls={class:"config-col"},as={class:"config-row"},os={class:"config-col"},rs={class:"config-col"},us={class:"config-row"},ds={class:"config-col"},cs={class:"config-col"},ps={class:"config-row"},fs={class:"config-col"},ys={class:"select-container"},vs={class:"config-col"},gs={class:"number-input-container"},bs={class:"number-input-controls"},ms={class:"config-row"},_s={class:"config-col"},ws={class:"number-input-container"},Cs={class:"number-input-controls"},ks={class:"config-col"},xs={class:"number-input-container"},Is={class:"number-input-controls"},qs={class:"config-row"},Ps={class:"config-col"},zs={class:"number-input-container"},Vs={class:"number-input-controls"},Ks={class:"config-col"},Us={class:"toggle-wrapper"},Ss={class:"toggle-switch"},Es={class:"btn-action-group"},Ts=["disabled"],$s=["disabled","title"],As={key:0,class:"fas fa-spinner fa-spin"},Bs={key:1,class:"fas fa-play-circle"},Ms=["disabled"],Ns={key:0,class:"fas fa-spinner fa-spin"},Ds={key:1,class:"fas fa-trash-alt"},Os={key:0,class:"config-label"},Ys={__name:"PKIConfig",setup(Rs){const{profilesApiClient:f}=F(),E=Q(),{refresh:k}=H(),n=V({fqdn_ca:"",fqdn_server:"",easyrsa_dn:"cn_only",easyrsa_req_country:"",easyrsa_req_province:"",easyrsa_req_city:"",easyrsa_req_org:"",easyrsa_req_email:"",easyrsa_req_ou:"",easyrsa_key_size:2048,easyrsa_ca_expire:null,easyrsa_cert_expire:null,easyrsa_cert_renew:null,easyrsa_crl_days:null,easyrsa_batch:!0}),x=g(null),I=g(null),r=g(!1),u=g(""),o=V({state:"idle",step:null,initialized:!1,error:null}),b=w(()=>o.state==="running"||u.value==="init"),m=w(()=>r.value||b.value),T={"init-pki":"Initializing PKI...",ca:"Building CA...","server-cert":"Building server certificate...",dh:"Generating DH parameters (this can take several minutes)...","ta-key":"Generating TLS key...",crl:"Generating CRL..."},$=w(()=>T[o.step]||"Initializing PKI...");let y=null;const d=(i,s="success")=>E.show(i,s),A=async()=>{try{const s=(await f.get("/config",{params:{section:"pki"}})).data,t=s.pki?s.pki:s;Object.keys(t).forEach(_=>{Object.hasOwn(n,_)&&(n[_]=t[_])})}catch(i){console.error(i),d("Failed to load PKI config from Management API.","error")}},q=()=>{y&&(clearInterval(y),y=null)},P=()=>{y||(y=setInterval(()=>v(),3e3))},v=async(i=!1)=>{const s=o.state==="running";try{const t=await f.get("/system/init/status");Object.assign(o,t.data)}catch(t){console.error(t);return}if(o.state==="running"){P();return}q(),s&&k(),s&&o.state==="done"?d("PKI initialized successfully!","success"):(s||i)&&o.state==="error"&&d(`Error initializing: ${o.error}`,"error")},z=async()=>{r.value=!0,u.value="save";try{await f.put("/config/pki",n),d("Configuration saved successfully!","success")}catch(i){d(`Error saving: ${i.message}`,"error")}finally{r.value=!1,u.value=""}},B=()=>{x.value.open({title:"Initialize PKI?",message:"Are you sure you want to initialize the system? This will start the PKI initialization process.",confirmText:"Yes, initialize",confirmBtnClass:"btn-action-primary"})},M=async()=>{r.value=!0,u.value="init";try{await f.post("/system/init"),o.state="running",P()}catch(i){i.response&&i.response.status===409?await v():d(`Error initializing: ${i.response?.data?.detail||i.message}`,"error")}finally{r.value=!1,u.value=""}},N=()=>{I.value.open({title:"Clear PKI?",message:"Are you sure you want to CLEAR the PKI? This will delete all certificates and cannot be undone.",confirmText:"Yes, clear",confirmBtnClass:"btn-action-danger"})},D=async()=>{r.value=!0,u.value="clear";try{const s=(await f.delete("/system/pki")).data;d(s.message||"PKI cleared successfully!","warning"),await v(),k()}catch(i){d(`Error clearing PKI: ${i.response?.data?.detail||i.message}`,"error")}finally{r.value=!1,u.value=""}};return O(()=>{A(),v(!0)}),R(q),(i,s)=>(p(),c("div",X,[e("div",J,[s[58]||(s[58]=e("div",{class:"config-header"},[e("h1",null,"PKI Infrastructure Configuration")],-1)),e("form",{onSubmit:L(z,["prevent"])},[e("div",W,[e("div",Z,[s[23]||(s[23]=e("label",{class:"config-label"},"FQDN: CA Cert CN",-1)),l(e("input",{type:"text",class:"config-input","onUpdate:modelValue":s[0]||(s[0]=t=>n.fqdn_ca=t)},null,512),[[a,n.fqdn_ca]])]),e("div",h,[s[24]||(s[24]=e("label",{class:"config-label"},"FQDN: Server Cert CN",-1)),l(e("input",{type:"text",class:"config-input","onUpdate:modelValue":s[1]||(s[1]=t=>n.fqdn_server=t)},null,512),[[a,n.fqdn_server]])])]),s[55]||(s[55]=e("div",{class:"config-divider"},null,-1)),e("div",ss,[e("div",es,[s[27]||(s[27]=e("label",{class:"confiLine truncated
@@ -0,0 +1 @@
import{p as w,B as M,a as x,r as f,o as A,c as I,d as o,e as t,q as N,t as c,n as P,s as U,f as h,g as _,j as B,k as i,C as j}from"./index-CrxOIffM.js";import{a as T}from"./ConfirmModal-C1vwv-4S.js";import"./vendor-ui-Dumif2LN.js";const V={class:"config-wrapper"},z={class:"config-card"},F={class:"stats-grid mb-4"},O={class:"stat-item full-width cpu-progress"},R={class:"stat-label d-flex justify-content-between"},D={class:"progress"},E=["aria-valuenow"],L={class:"stat-item"},q={class:"d-flex align-items-center"},H={class:"stat-item"},K={class:"stat-value"},Y={class:"stat-item"},G={class:"stat-value"},J={class:"stat-item"},Q={class:"stat-value monospace"},W={class:"btn-action-group justify-content-center"},X=["disabled","title"],Z={key:0,class:"fas fa-spinner fa-spin"},ss={key:1,class:"fas fa-play"},ts=["disabled","title"],es={key:0,class:"fas fa-spinner fa-spin"},as={key:1,class:"fas fa-sync-alt"},ns=["disabled"],os={key:0,class:"fas fa-spinner fa-spin"},is={key:1,class:"fas fa-stop"},ds={__name:"ServerManagement",setup(rs){const{profilesApiClient:b}=B(),S=j(),{status:r,refresh:k}=M(),m=w(()=>r.server_ready?"":r.pki_ready&&r.missing.length?`Missing server files: ${r.missing.join(", ")}`:"Initialize PKI first"),a=x({status:"unknown",pid:null,cpu_percent:0,memory_mb:0,uptime:null}),g=f(null),n=f(!1),l=f("");let d=null;const y=(e,s="success")=>S.show(e,s),p=async()=>{try{const e=await b.get("/server/process/stats");Object.assign(a,e.data)}catch(e){console.error("Failed to fetch stats:",e)}},C={start:"btn-action-primary",restart:"btn-action-save",stop:"btn-action-danger"},v=e=>{g.value.open({title:`${e.charAt(0).toUpperCase()}${e.slice(1)} the service?`,message:`Are you sure you want to ${e.toUpperCase()} the OpenVPN service?`,confirmText:`Yes, ${e}`,confirmBtnClass:C[e],data:e})},$=async e=>{n.value=!0,l.value=e;try{const s=await b.post(`/server/process/${e}`);y(s.data.message||`Service ${e} successful`,"success"),setTimeout(p,1e3)}catch(s){const u=s.response?.data?.detail||s.message;y(`Failed to ${e}: ${u}`,"error")}finally{n.value=!1,l.value=""}};return A(()=>{k(),p(),d=setInterval(p,5e3)}),I(()=>{d&&clearInterval(d)}),(e,s)=>(i(),o("div",V,[t("div",z,[s[11]||(s[11]=t("div",{class:"config-header"},[t("h1",null,"Server Process Management")],-1)),t("div",F,[t("div",O,[t("label",R,[s[3]||(s[3]=t("span",null,"CPU Usage",-1)),t("span",null,c(a.cpu_percent)+"%",1)]),t("div",D,[t("div",{class:"progress-bar progress-bar-brand",role:"progressbar",style:P({width:Math.min(a.cpu_percent,100)+"%"}),"aria-valuenow":a.cpu_percent,"aria-valuemin":"0","aria-valuemax":"100"},null,12,E)])]),t("div",L,[s[4]||(s[4]=t("label",{class:"stat-label"},"Status",-1)),t("div",q,[t("span",{class:U(["status-badge","status-"+(a.status==="running"?"active":"revoked")])},c(a.status.toUpperCase()),3)])]),t("div",H,[s[5]||(s[5]=t("label",{class:"stat-label"},"Process ID",-1)),t("div",K,c(a.pid||"N/A"),1)]),t("div",Y,[s[6]||(s[6]=t("label",{class:"stat-label"},"Memory (RSS)",-1)),t("div",G,c(a.memory_mb)+" MB",1)]),t("div",J,[s[7]||(s[7]=t("label",{class:"stat-label"},"Uptime",-1)),t("div",Q,c(a.uptime||"N/A"),1)])]),t("div",W,[t("button",{type:"button",class:"btn-action btn-action-primary",onClick:s[0]||(s[0]=u=>v("start")),disabled:n.value||a.status==="running"||!h(r).server_ready,title:m.value},[n.value&&l.value==="start"?(i(),o("i",Z)):(i(),o("i",ss)),s[8]||(s[8]=_(" Start Service ",-1))],8,X),t("button",{type:"button",class:"btn-action btn-action-save",onClick:s[1]||(s[1]=u=>v("restart")),disabled:n.value||!h(r).server_ready,title:m.value},[n.value&&l.value==="restart"?(i(),o("i",es)):(i(),o("i",as)),s[9]||(s[9]=_(" Restart Service ",-1))],8,ts),t("button",{type:"button",class:"btn-action btn-action-danger",onClick:s[2]||(s[2]=u=>v("stop")),disabled:n.value||a.status!=="running"},[n.value&&l.value==="stop"?(i(),o("i",os)):(i(),o("i",is)),s[10]||(s[10]=_(" Stop Service ",-1))],8,ns)])]),N(T,{ref_key:"confirmModal",ref:g,onConfirm:$},null,512)]))}};export{ds as default};
@@ -1 +0,0 @@
import{s as S,z as w,a as C,r as g,o as M,b as $,c as o,d as t,t as c,n as P,y as x,e as y,g as _,j as I,B as U,k as i}from"./index-BsVv6gaD.js";import"./vendor-charts-Bcjh2pZL.js";import"./vendor-ui-jlFFG6nm.js";const j={class:"config-wrapper"},A={class:"config-card"},B={class:"stats-grid mb-4"},N={class:"stat-item full-width cpu-progress"},z={class:"stat-label d-flex justify-content-between"},T={class:"progress"},V=["aria-valuenow"],D={class:"stat-item"},F={class:"d-flex align-items-center"},O={class:"stat-item"},R={class:"stat-value"},E={class:"stat-item"},H={class:"stat-value"},K={class:"stat-item"},L={class:"stat-value monospace"},q={class:"btn-action-group justify-content-center"},G=["disabled","title"],J={key:0,class:"fas fa-spinner fa-spin"},Q={key:1,class:"fas fa-play"},W=["disabled","title"],X={key:0,class:"fas fa-spinner fa-spin"},Y={key:1,class:"fas fa-sync-alt"},Z=["disabled"],ss={key:0,class:"fas fa-spinner fa-spin"},ts={key:1,class:"fas fa-stop"},is={__name:"ServerManagement",setup(es){const{profilesApiClient:f}=I(),h=U(),{status:r,refresh:k}=w(),b=S(()=>r.server_ready?"":r.pki_ready&&r.missing.length?`Missing server files: ${r.missing.join(", ")}`:"Initialize PKI first"),a=C({status:"unknown",pid:null,cpu_percent:0,memory_mb:0,uptime:null}),n=g(!1),l=g("");let d=null;const m=(e,s="success")=>h.show(e,s),p=async()=>{try{const e=await f.get("/server/process/stats");Object.assign(a,e.data)}catch(e){console.error("Failed to fetch stats:",e)}},v=async e=>{if(confirm(`Are you sure you want to ${e.toUpperCase()} the OpenVPN service?`)){n.value=!0,l.value=e;try{const s=await f.post(`/server/process/${e}`);m(s.data.message||`Service ${e} successful`,"success"),setTimeout(p,1e3)}catch(s){const u=s.response?.data?.detail||s.message;m(`Failed to ${e}: ${u}`,"error")}finally{n.value=!1,l.value=""}}};return M(()=>{k(),p(),d=setInterval(p,5e3)}),$(()=>{d&&clearInterval(d)}),(e,s)=>(i(),o("div",j,[t("div",A,[s[11]||(s[11]=t("div",{class:"config-header"},[t("h1",null,"Server Process Management")],-1)),t("div",B,[t("div",N,[t("label",z,[s[3]||(s[3]=t("span",null,"CPU Usage",-1)),t("span",null,c(a.cpu_percent)+"%",1)]),t("div",T,[t("div",{class:"progress-bar progress-bar-brand",role:"progressbar",style:P({width:Math.min(a.cpu_percent,100)+"%"}),"aria-valuenow":a.cpu_percent,"aria-valuemin":"0","aria-valuemax":"100"},null,12,V)])]),t("div",D,[s[4]||(s[4]=t("label",{class:"stat-label"},"Status",-1)),t("div",F,[t("span",{class:x(["status-badge","status-"+(a.status==="running"?"active":"revoked")])},c(a.status.toUpperCase()),3)])]),t("div",O,[s[5]||(s[5]=t("label",{class:"stat-label"},"Process ID",-1)),t("div",R,c(a.pid||"N/A"),1)]),t("div",E,[s[6]||(s[6]=t("label",{class:"stat-label"},"Memory (RSS)",-1)),t("div",H,c(a.memory_mb)+" MB",1)]),t("div",K,[s[7]||(s[7]=t("label",{class:"stat-label"},"Uptime",-1)),t("div",L,c(a.uptime||"N/A"),1)])]),t("div",q,[t("button",{type:"button",class:"btn-action btn-action-primary",onClick:s[0]||(s[0]=u=>v("start")),disabled:n.value||a.status==="running"||!y(r).server_ready,title:b.value},[n.value&&l.value==="start"?(i(),o("i",J)):(i(),o("i",Q)),s[8]||(s[8]=_(" Start Service ",-1))],8,G),t("button",{type:"button",class:"btn-action btn-action-save",onClick:s[1]||(s[1]=u=>v("restart")),disabled:n.value||!y(r).server_ready,title:b.value},[n.value&&l.value==="restart"?(i(),o("i",X)):(i(),o("i",Y)),s[9]||(s[9]=_(" Restart Service ",-1))],8,W),t("button",{type:"button",class:"btn-action btn-action-danger",onClick:s[2]||(s[2]=u=>v("stop")),disabled:n.value||a.status!=="running"},[n.value&&l.value==="stop"?(i(),o("i",ss)):(i(),o("i",ts)),s[10]||(s[10]=_(" Stop Service ",-1))],8,Z)])])]))}};export{is as default};
@@ -0,0 +1 @@
import{a as A,r as V,D as E,o as R,B as j,d as a,f as B,e as t,q as O,g as k,A as z,E as K,m as x,w as i,v as q,x as p,h as b,F as U,i as F,z as G,j as X,C as H,k as r}from"./index-CrxOIffM.js";const P=/^(25[0-5]|2[0-4]\d|1?\d?\d)(\.(25[0-5]|2[0-4]\d|1?\d?\d)){3}$/;function J(c){const d=Number(c);if(c===""||c===null||!Number.isInteger(d)||d<0||d>32)return null;const u=d===0?0:4294967295<<32-d>>>0;return[24,16,8,0].map(v=>u>>>v&255).join(".")}function Q(c){if(typeof c!="string"||!P.test(c))return null;const d=c.split(".").reduce((m,n)=>(m<<8|Number(n))>>>0,0);let u=0;for(;u<32&&d&2147483648>>>u;)u++;const v=u===0?0:4294967295<<32-u>>>0;return d===v?u:null}function W(c){const d=String(c??"").trim(),[u,v,...m]=d.split("/");if(m.length||!P.test(u))return null;if(v===void 0)return{network:u,netmask:null};const n=J(v);return n?{network:u,netmask:n}:null}const Y={class:"config-wrapper"},Z={key:0,class:"config-card"},h={key:1,class:"config-card"},ss={class:"config-row"},ts={class:"config-col"},ns={class:"select-container"},es={class:"config-col"},os={class:"number-input-container"},ls={class:"number-input-controls"},is={class:"config-row"},as={class:"config-col"},rs={class:"config-col"},ds={class:"config-row"},us={class:"config-col"},ps={class:"number-input-container"},cs={class:"number-input-controls"},fs={class:"config-col"},vs={class:"number-input-container"},gs={class:"number-input-controls"},bs={class:"config-row"},ms={class:"config-col"},_s={class:"toggle-wrapper"},ys={class:"toggle-switch"},ks={key:0,class:"nested-box fade-in"},ws={class:"config-row mb-2"},Cs={class:"config-col"},xs={class:"list-container"},Ss=["onUpdate:modelValue"],Vs=["onClick"],Us={class:"config-row"},Fs={class:"config-col"},Ps={class:"toggle-wrapper"},Is={class:"toggle-switch"},Ds={key:1,class:"nested-box fade-in"},Ns={class:"config-row mb-2"},Ts={class:"config-col"},$s={class:"list-container"},Ls=["onUpdate:modelValue"],Ms=["onClick"],As={class:"config-row"},Es={class:"config-col"},Rs={class:"toggle-wrapper"},js={class:"toggle-switch"},Bs={class:"config-col"},Os={class:"toggle-wrapper"},zs={class:"toggle-switch"},Ks={class:"config-col"},qs={class:"toggle-wrapper"},Gs={class:"toggle-switch"},Xs={class:"config-row"},Hs={class:"config-col"},Js={class:"toggle-wrapper"},Qs={class:"toggle-switch"},Ws={key:2,class:"nested-box fade-in"},Ys={class:"config-row"},Zs={class:"config-col"},hs={class:"config-row mt-3"},st={class:"config-col"},tt={class:"config-row mt-4"},nt={class:"config-col"},et={class:"toggle-wrapper"},ot={class:"toggle-switch"},lt={key:3,class:"nested-box fade-in"},it={class:"config-row"},at={class:"config-col"},rt={class:"config-col"},dt={class:"number-input-container"},ut={class:"number-input-controls"},pt={class:"btn-action-group"},ct=["disabled"],ft={key:0,class:"fas fa-spinner fa-spin"},vt={key:1,class:"fas fa-save"},gt=["disabled"],bt={key:0,class:"fas fa-spinner fa-spin"},mt={key:1,class:"fas fa-rocket"},yt={__name:"VPNConfig",setup(c){const{profilesApiClient:d}=X(),u=H(),{status:v,refresh:m}=j(),n=A({protocol:"udp",port:1194,vpn_network:"",public_ip:"",tun_mtu:0,mssfix:0,tunnel_type:"FULL",split_routes:[],user_defined_dns:!1,dns_servers:[],duplicate_cn:!1,client_to_client:!1,crl_verify:!1,user_defined_cdscripts:!1,connect_script:"",disconnect_script:"",management_interface:!1,management_interface_address:"",management_port:7505}),w=V(!1),g=V(!1),_=V("");E(w,o=>{n.tunnel_type=o?"SPLIT":"FULL"});let S="";const y=(o,s="success")=>u.show(o,s),I=()=>n.split_routes.push(""),D=o=>n.split_routes.splice(o,1),N=()=>n.dns_servers.push(""),T=o=>n.dns_servers.splice(o,1),$=async()=>{try{const s=(await d.get("/config",{params:{section:"server"}})).data,l=s.server?s.server:s;if(Object.keys(l).forEach(e=>{Object.hasOwn(n,e)&&(e==="tunnel_type"&&(w.value=l[e]==="SPLIT"),n[e]=l[e])}),S=l.vpn_netmask||"",l.vpn_network&&l.vpn_netmask){const e=Q(l.vpn_netmask);e!==null&&(n.vpn_network=`${l.vpn_network}/${e}`)}}catch(o){console.error(o),y("Failed to load Server config from Management API.","error")}},L=async()=>{const o=W(n.vpn_network);if(!o){y("VPN subnet must be an IPv4 network in CIDR format, e.g. 172.20.1.0/24","error");return}g.value=!0,_.value="save";const s={...n};s.split_routes=s.split_routes.filter(l=>l&&l.trim()!==""),s.dns_servers=s.dns_servers.filter(l=>l&&l.trim()!==""),s.vpn_network=o.network,s.vpn_netmask=o.netmask||S||"255.255.255.0";try{await d.put("/config/server",s),S=s.vpn_netmask,y("Server configuration saved!","success")}catch(l){y(`Error saving: ${l.response?.data?.detail||l.message}`,"error")}finally{g.value=!1,_.value=""}},M=async()=>{g.value=!0,_.value="apply";try{const s=(await d.post("/server/configure")).data;y(s.message||"Configuration applied!","success")}catch(o){y(`Error applying: ${o.response?.data?.detail||o.message}`,"error"),m()}finally{g.value=!1,_.value=""}};return R(()=>{m(),$()}),(o,s)=>{const l=K("router-link");return r(),a("div",Y,[B(v).pki_ready?(r(),a("div",h,[s[75]||(s[75]=t("div",{class:"config-Line truncated
@@ -1 +0,0 @@
import{a as N,r as k,D as A,o as E,z as F,c as i,e as R,d as t,A as B,g as v,m as j,E as z,x as _,w as l,v as K,q as u,h as c,F as C,i as x,C as O,j as q,B as G,k as a}from"./index-BsVv6gaD.js";import"./vendor-charts-Bcjh2pZL.js";import"./vendor-ui-jlFFG6nm.js";const X={class:"config-wrapper"},H={key:0,class:"config-card"},J={key:1,class:"config-card"},Q={class:"config-row"},W={class:"config-col"},Y={class:"select-container"},Z={class:"config-col"},h={class:"number-input-container"},ss={class:"number-input-controls"},ts={class:"config-row"},ns={class:"config-col"},os={class:"config-col"},es={class:"config-row"},ls={class:"config-col"},is={class:"number-input-container"},as={class:"number-input-controls"},rs={class:"config-col"},ds={class:"number-input-container"},us={class:"number-input-controls"},ps={class:"config-row"},cs={class:"config-col"},fs={class:"toggle-wrapper"},vs={class:"toggle-switch"},gs={key:0,class:"nested-box fade-in"},bs={class:"config-row mb-2"},ms={class:"config-col"},_s={class:"list-container"},ys=["onUpdate:modelValue"],ks=["onClick"],ws={class:"config-row"},Cs={class:"config-col"},xs={class:"toggle-wrapper"},Ss={class:"toggle-switch"},Vs={key:1,class:"nested-box fade-in"},Us={class:"config-row mb-2"},Ps={class:"config-col"},Ds={class:"list-container"},Ts=["onUpdate:modelValue"],$s=["onClick"],Is={class:"config-row"},Ls={class:"config-col"},Ms={class:"toggle-wrapper"},Ns={class:"toggle-switch"},As={class:"config-col"},Es={class:"toggle-wrapper"},Fs={class:"toggle-switch"},Rs={class:"config-col"},Bs={class:"toggle-wrapper"},js={class:"toggle-switch"},zs={class:"config-row"},Ks={class:"config-col"},Os={class:"toggle-wrapper"},qs={class:"toggle-switch"},Gs={key:2,class:"nested-box fade-in"},Xs={class:"config-row"},Hs={class:"config-col"},Js={class:"config-row mt-3"},Qs={class:"config-col"},Ws={class:"config-row mt-4"},Ys={class:"config-col"},Zs={class:"toggle-wrapper"},hs={class:"toggle-switch"},st={key:3,class:"nested-box fade-in"},tt={class:"config-row"},nt={class:"config-col"},ot={class:"config-col"},et={class:"number-input-container"},lt={class:"number-input-controls"},it={class:"btn-action-group"},at=["disabled"],rt={key:0,class:"fas fa-spinner fa-spin"},dt={key:1,class:"fas fa-save"},ut=["disabled"],pt={key:0,class:"fas fa-spinner fa-spin"},ct={key:1,class:"fas fa-rocket"},mt={__name:"VPNConfig",setup(ft){const{profilesApiClient:y}=q(),S=G(),{status:V,refresh:w}=F(),n=N({protocol:"udp",port:1194,vpn_network:"",public_ip:"",tun_mtu:0,mssfix:0,tunnel_type:"FULL",split_routes:[],user_defined_dns:!1,dns_servers:[],duplicate_cn:!1,client_to_client:!1,crl_verify:!1,user_defined_cdscripts:!1,connect_script:"",disconnect_script:"",management_interface:!1,management_interface_address:"",management_port:7505}),g=k(!1),p=k(!1),f=k("");A(g,e=>{n.tunnel_type=e?"SPLIT":"FULL"});function U(e){if(!e)return"";const s=e.split(".");let r=0;const o={255:8,254:7,252:6,248:5,240:4,224:3,192:2,128:1,0:0};for(let d of s)r+=o[parseInt(d)]||0;return r}const b=(e,s="success")=>S.show(e,s),P=()=>n.split_routes.push(""),D=e=>n.split_routes.splice(e,1),T=()=>n.dns_servers.push(""),$=e=>n.dns_servers.splice(e,1),I=async()=>{try{const s=(await y.get("/config",{params:{section:"server"}})).data,r=s.server?s.server:s;if(Object.keys(r).forEach(o=>{n.hasOwnProperty(o)&&(o==="tunnel_type"&&(g.value=r[o]==="SPLIT"),n[o]=r[o])}),r.vpn_network&&r.vpn_netmask){const o=U(r.vpn_netmask);o&&(n.vpn_network=`${r.vpn_network}/${o}`)}}catch(e){console.error(e),b("Failed to load Server config from Management API.","error")}},L=async()=>{p.value=!0,f.value="save";const e={...n};if(e.split_routes=e.split_routes.filter(s=>s&&s.trim()!==""),e.dns_servers=e.dns_servers.filter(s=>s&&s.trim()!==""),e.vpn_network.includes("/")){const[s,r]=e.vpn_network.split("/");e.vpn_network=s}try{await y.put("/config/server",e),b("Server configuration saved!","success")}catch(s){b(`Error saving: ${s.response?.data?.detail||s.message}`,"error")}finally{p.value=!1,f.value=""}},M=async()=>{p.value=!0,f.value="apply";try{const s=(await y.post("/server/configure")).data;b(s.message||"Configuration applied!","success")}catch(e){b(`Error applying: ${e.response?.data?.detail||e.message}`,"error"),w()}finally{p.value=!1,f.value=""}};return E(()=>{w(),I()}),(e,s)=>{const r=z("router-link");return a(),i("div",X,[R(V).pki_ready?(a(),i("div",J,[s[75]||(s[75]=t("div",{class:"config-header"},[t("h1",null,"Server Infrastructure Configuration")],-1)),t("form",{onSubmit:O(L,["prevent"])},[t("div",Q,[t("div",W,[s[30]||(s[30]=t("label",{class:"config-label"},"Tunnel Protocol",-1)),t("div",Y,[l(t("select",{class:"config-select","onUpdate:modelValue":s[0]||(s[0]=o=>n.protocol=o)},[...s[28]||(s[28]=[t("option",{value:"tcp"},"TCP",-1),t("option",{value:"udp"},"UDP",-1)])],512),[[K,n.protocol]]),s[29]||(s[29]=t("div",{class:"select-arrow"},[t("i",{class:"fas fa-chevron-down"})],-1))])]),t("div",Z,[s[33]||(s[33]=t("label",{class:"config-label"},"Tunnel Port",-1)),t("div",h,[l(Line truncated
@@ -1 +1 @@
@charset "UTF-8";:root,[data-bs-theme=light]{--bs-blue:#0d6efd;--bs-indigo:#6610f2;--bs-purple:#6f42c1;--bs-pink:#d63384;--bs-red:#dc3545;--bs-orange:#fd7e14;--bs-yellow:#ffc107;--bs-green:#198754;--bs-teal:#20c997;--bs-cyan:#0dcaf0;--bs-black:#000;--bs-white:#fff;--bs-gray:#6c757d;--bs-gray-dark:#343a40;--bs-gray-100:#f8f9fa;--bs-gray-200:#e9ecef;--bs-gray-300:#dee2e6;--bs-gray-400:#ced4da;--bs-gray-500:#adb5bd;--bs-gray-600:#6c757d;--bs-gray-700:#495057;--bs-gray-800:#343a40;--bs-gray-900:#212529;--bs-primary:#0d6efd;--bs-secondary:#6c757d;--bs-success:#198754;--bs-info:#0dcaf0;--bs-warning:#ffc107;--bs-danger:#dc3545;--bs-light:#f8f9fa;--bs-dark:#212529;--bs-primary-rgb:13,110,253;--bs-secondary-rgb:108,117,125;--bs-success-rgb:25,135,84;--bs-info-rgb:13,202,240;--bs-warning-rgb:255,193,7;--bs-danger-rgb:220,53,69;--bs-light-rgb:248,249,250;--bs-dark-rgb:33,37,41;--bs-primary-text-emphasis:#052c65;--bs-secondary-text-emphasis:#2b2f32;--bs-success-text-emphasis:#0a3622;--bs-info-text-emphasis:#055160;--bs-warning-text-emphasis:#664d03;--bs-danger-text-emphasis:#58151c;--bs-light-text-emphasis:#495057;--bs-dark-text-emphasis:#495057;--bs-primary-bg-subtle:#cfe2ff;--bs-secondary-bg-subtle:#e2e3e5;--bs-success-bg-subtle:#d1e7dd;--bs-info-bg-subtle:#cff4fc;--bs-warning-bg-subtle:#fff3cd;--bs-danger-bg-subtle:#f8d7da;--bs-light-bg-subtle:#fcfcfd;--bs-dark-bg-subtle:#ced4da;--bs-primary-border-subtle:#9ec5fe;--bs-secondary-border-subtle:#c4c8cb;--bs-success-border-subtle:#a3cfbb;--bs-info-border-subtle:#9eeaf9;--bs-warning-border-subtle:#ffe69c;--bs-danger-border-subtle:#f1aeb5;--bs-light-border-subtle:#e9ecef;--bs-dark-border-subtle:#adb5bd;--bs-white-rgb:255,255,255;--bs-black-rgb:0,0,0;--bs-font-sans-serif:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue","Noto Sans","Liberation Sans",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--bs-font-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--bs-gradient:linear-gradient(180deg, rgba(255, 255, 255, .15), rgba(255, 255, 255, 0));--bs-body-font-family:var(--bs-font-sans-serif);--bs-body-font-size:1rem;--bs-body-font-weight:400;--bs-body-line-height:1.5;--bs-body-color:#212529;--bs-body-color-rgb:33,37,41;--bs-body-bg:#fff;--bs-body-bg-rgb:255,255,255;--bs-emphasis-color:#000;--bs-emphasis-color-rgb:0,0,0;--bs-secondary-color:rgba(33, 37, 41, .75);--bs-secondary-color-rgb:33,37,41;--bs-secondary-bg:#e9ecef;--bs-secondary-bg-rgb:233,236,239;--bs-tertiary-color:rgba(33, 37, 41, .5);--bs-tertiary-color-rgb:33,37,41;--bs-tertiary-bg:#f8f9fa;--bs-tertiary-bg-rgb:248,249,250;--bs-heading-color:inherit;--bs-link-color:#0d6efd;--bs-link-color-rgb:13,110,253;--bs-link-decoration:underline;--bs-link-hover-color:#0a58ca;--bs-link-hover-color-rgb:10,88,202;--bs-code-color:#d63384;--bs-highlight-color:#212529;--bs-highlight-bg:#fff3cd;--bs-border-width:1px;--bs-border-style:solid;--bs-border-color:#dee2e6;--bs-border-color-translucent:rgba(0, 0, 0, .175);--bs-border-radius:.375rem;--bs-border-radius-sm:.25rem;--bs-border-radius-lg:.5rem;--bs-border-radius-xl:1rem;--bs-border-radius-xxl:2rem;--bs-border-radius-2xl:var(--bs-border-radius-xxl);--bs-border-radius-pill:50rem;--bs-box-shadow:0 .5rem 1rem rgba(0, 0, 0, .15);--bs-box-shadow-sm:0 .125rem .25rem rgba(0, 0, 0, .075);--bs-box-shadow-lg:0 1rem 3rem rgba(0, 0, 0, .175);--bs-box-shadow-inset:inset 0 1px 2px rgba(0, 0, 0, .075);--bs-focus-ring-width:.25rem;--bs-focus-ring-opacity:.25;--bs-focus-ring-color:rgba(13, 110, 253, .25);--bs-form-valid-color:#198754;--bs-form-valid-border-color:#198754;--bs-form-invalid-color:#dc3545;--bs-form-invalid-border-color:#dc3545}[data-bs-theme=dark]{color-scheme:dark;--bs-body-color:#dee2e6;--bs-body-color-rgb:222,226,230;--bs-body-bg:#212529;--bs-body-bg-rgb:33,37,41;--bs-emphasis-color:#fff;--bs-emphasis-color-rgb:255,255,255;--bs-secondary-color:rgba(222, 226, 230, .75);--bs-secondary-color-rgb:222,226,230;--bs-secondary-bg:#343a40;--bs-secondary-bg-rgb:52,58,64;--bs-tertiary-color:rgba(222, 226, 230, .5);--bs-tertiary-color-rgb:222,226,230;--bs-tertiary-bg:#2b3035;--bs-tertiary-bg-rgb:43,48,53;--bs-primary-text-emphasis:#6ea8fe;--bs-secondary-text-emphasis:#a7acb1;--bs-success-text-emphasis:#75b798;--bs-info-text-emphasis:#6edff6;--bs-warning-text-emphasis:#ffda6a;--bs-danger-text-emphasis:#ea868f;--bs-light-text-emphasis:#f8f9fa;--bs-dark-text-emphasis:#dee2e6;--bs-primary-bg-subtle:#031633;--bs-secondary-bg-subtle:#161719;--bs-success-bg-subtle:#051b11;--bs-info-bg-subtle:#032830;--bs-warning-bg-subtle:#332701;--bs-danger-bg-subtle:#2c0b0e;--bs-light-bg-subtle:#343a40;--bs-dark-bg-subtle:#1a1d20;--bs-primary-border-subtle:#084298;--bs-secondary-border-subtle:#41464b;--bs-success-border-subtle:#0f5132;--bs-info-border-subtle:#087990;--bs-warning-border-subtle:#997404;--bs-danger-border-subtle:#842029;--bs-light-border-subtle:#495057;--bs-dark-border-subtle:#343a40;--bs-heading-color:inherit;--Line truncated @charset "UTF-8";:root,[data-bs-theme=light]{--bs-blue:#0d6efd;--bs-indigo:#6610f2;--bs-purple:#6f42c1;--bs-pink:#d63384;--bs-red:#dc3545;--bs-orange:#fd7e14;--bs-yellow:#ffc107;--bs-green:#198754;--bs-teal:#20c997;--bs-cyan:#0dcaf0;--bs-black:#000;--bs-white:#fff;--bs-gray:#6c757d;--bs-gray-dark:#343a40;--bs-gray-100:#f8f9fa;--bs-gray-200:#e9ecef;--bs-gray-300:#dee2e6;--bs-gray-400:#ced4da;--bs-gray-500:#adb5bd;--bs-gray-600:#6c757d;--bs-gray-700:#495057;--bs-gray-800:#343a40;--bs-gray-900:#212529;--bs-primary:#0d6efd;--bs-secondary:#6c757d;--bs-success:#198754;--bs-info:#0dcaf0;--bs-warning:#ffc107;--bs-danger:#dc3545;--bs-light:#f8f9fa;--bs-dark:#212529;--bs-primary-rgb:13,110,253;--bs-secondary-rgb:108,117,125;--bs-success-rgb:25,135,84;--bs-info-rgb:13,202,240;--bs-warning-rgb:255,193,7;--bs-danger-rgb:220,53,69;--bs-light-rgb:248,249,250;--bs-dark-rgb:33,37,41;--bs-primary-text-emphasis:#052c65;--bs-secondary-text-emphasis:#2b2f32;--bs-success-text-emphasis:#0a3622;--bs-info-text-emphasis:#055160;--bs-warning-text-emphasis:#664d03;--bs-danger-text-emphasis:#58151c;--bs-light-text-emphasis:#495057;--bs-dark-text-emphasis:#495057;--bs-primary-bg-subtle:#cfe2ff;--bs-secondary-bg-subtle:#e2e3e5;--bs-success-bg-subtle:#d1e7dd;--bs-info-bg-subtle:#cff4fc;--bs-warning-bg-subtle:#fff3cd;--bs-danger-bg-subtle:#f8d7da;--bs-light-bg-subtle:#fcfcfd;--bs-dark-bg-subtle:#ced4da;--bs-primary-border-subtle:#9ec5fe;--bs-secondary-border-subtle:#c4c8cb;--bs-success-border-subtle:#a3cfbb;--bs-info-border-subtle:#9eeaf9;--bs-warning-border-subtle:#ffe69c;--bs-danger-border-subtle:#f1aeb5;--bs-light-border-subtle:#e9ecef;--bs-dark-border-subtle:#adb5bd;--bs-white-rgb:255,255,255;--bs-black-rgb:0,0,0;--bs-font-sans-serif:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue","Noto Sans","Liberation Sans",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--bs-font-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--bs-gradient:linear-gradient(180deg, rgba(255, 255, 255, .15), rgba(255, 255, 255, 0));--bs-body-font-family:var(--bs-font-sans-serif);--bs-body-font-size:1rem;--bs-body-font-weight:400;--bs-body-line-height:1.5;--bs-body-color:#212529;--bs-body-color-rgb:33,37,41;--bs-body-bg:#fff;--bs-body-bg-rgb:255,255,255;--bs-emphasis-color:#000;--bs-emphasis-color-rgb:0,0,0;--bs-secondary-color:rgba(33, 37, 41, .75);--bs-secondary-color-rgb:33,37,41;--bs-secondary-bg:#e9ecef;--bs-secondary-bg-rgb:233,236,239;--bs-tertiary-color:rgba(33, 37, 41, .5);--bs-tertiary-color-rgb:33,37,41;--bs-tertiary-bg:#f8f9fa;--bs-tertiary-bg-rgb:248,249,250;--bs-heading-color:inherit;--bs-link-color:#0d6efd;--bs-link-color-rgb:13,110,253;--bs-link-decoration:underline;--bs-link-hover-color:#0a58ca;--bs-link-hover-color-rgb:10,88,202;--bs-code-color:#d63384;--bs-highlight-color:#212529;--bs-highlight-bg:#fff3cd;--bs-border-width:1px;--bs-border-style:solid;--bs-border-color:#dee2e6;--bs-border-color-translucent:rgba(0, 0, 0, .175);--bs-border-radius:.375rem;--bs-border-radius-sm:.25rem;--bs-border-radius-lg:.5rem;--bs-border-radius-xl:1rem;--bs-border-radius-xxl:2rem;--bs-border-radius-2xl:var(--bs-border-radius-xxl);--bs-border-radius-pill:50rem;--bs-box-shadow:0 .5rem 1rem rgba(0, 0, 0, .15);--bs-box-shadow-sm:0 .125rem .25rem rgba(0, 0, 0, .075);--bs-box-shadow-lg:0 1rem 3rem rgba(0, 0, 0, .175);--bs-box-shadow-inset:inset 0 1px 2px rgba(0, 0, 0, .075);--bs-focus-ring-width:.25rem;--bs-focus-ring-opacity:.25;--bs-focus-ring-color:rgba(13, 110, 253, .25);--bs-form-valid-color:#198754;--bs-form-valid-border-color:#198754;--bs-form-invalid-color:#dc3545;--bs-form-invalid-border-color:#dc3545}[data-bs-theme=dark]{color-scheme:dark;--bs-body-color:#dee2e6;--bs-body-color-rgb:222,226,230;--bs-body-bg:#212529;--bs-body-bg-rgb:33,37,41;--bs-emphasis-color:#fff;--bs-emphasis-color-rgb:255,255,255;--bs-secondary-color:rgba(222, 226, 230, .75);--bs-secondary-color-rgb:222,226,230;--bs-secondary-bg:#343a40;--bs-secondary-bg-rgb:52,58,64;--bs-tertiary-color:rgba(222, 226, 230, .5);--bs-tertiary-color-rgb:222,226,230;--bs-tertiary-bg:#2b3035;--bs-tertiary-bg-rgb:43,48,53;--bs-primary-text-emphasis:#6ea8fe;--bs-secondary-text-emphasis:#a7acb1;--bs-success-text-emphasis:#75b798;--bs-info-text-emphasis:#6edff6;--bs-warning-text-emphasis:#ffda6a;--bs-danger-text-emphasis:#ea868f;--bs-light-text-emphasis:#f8f9fa;--bs-dark-text-emphasis:#dee2e6;--bs-primary-bg-subtle:#031633;--bs-secondary-bg-subtle:#161719;--bs-success-bg-subtle:#051b11;--bs-info-bg-subtle:#032830;--bs-warning-bg-subtle:#332701;--bs-danger-bg-subtle:#2c0b0e;--bs-light-bg-subtle:#343a40;--bs-dark-bg-subtle:#1a1d20;--bs-primary-border-subtle:#084298;--bs-secondary-border-subtle:#41464b;--bs-success-border-subtle:#0f5132;--bs-info-border-subtle:#087990;--bs-warning-border-subtle:#997404;--bs-danger-border-subtle:#842029;--bs-light-border-subtle:#495057;--bs-dark-border-subtle:#343a40;--bs-heading-color:inherit;--Line truncated
-7
View File
@@ -1,7 +0,0 @@
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Analytics-D8_MsU7I.js","assets/vendor-charts-Bcjh2pZL.js","assets/vendor-ui-jlFFG6nm.js","assets/Certificates-DI1YjC4x.js","assets/ConfirmModal-CzamKe9d.js","assets/PKIConfig-DcX7kknv.js","assets/VPNConfig-hH9toHBV.js","assets/ServerManagement-DcQnn0e_.js","assets/BackupRestore-p02MFVQ3.js","assets/Account-D01xrOy_.js"])))=>i.map(i=>d[i]);
import{C as zu,r as om}from"./vendor-charts-Bcjh2pZL.js";import{M as lm}from"./vendor-ui-jlFFG6nm.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))s(r);new MutationObserver(r=>{for(const o of r)if(o.type==="childList")for(const l of o.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&s(l)}).observe(document,{childList:!0,subtree:!0});function n(r){const o={};return r.integrity&&(o.integrity=r.integrity),r.referrerPolicy&&(o.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?o.credentials="include":r.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function s(r){if(r.ep)return;r.ep=!0;const o=n(r);fetch(r.href,o)}})();function wl(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const Be={},Ds=[],gn=()=>{},Gu=()=>!1,ki=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),El=e=>e.startsWith("onUpdate:"),rt=Object.assign,Al=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},am=Object.prototype.hasOwnProperty,ke=(e,t)=>am.call(e,t),oe=Array.isArray,Ms=e=>Or(e)==="[object Map]",zs=e=>Or(e)==="[object Set]",Cc=e=>Or(e)==="[object Date]",me=e=>typeof e=="function",Xe=e=>typeof e=="string",Zt=e=>typeof e=="symbol",$e=e=>e!==null&&typeof e=="object",Ju=e=>($e(e)||me(e))&&me(e.then)&&me(e.catch),Xu=Object.prototype.toString,Or=e=>Xu.call(e),cm=e=>Or(e).slice(8,-1),Yu=e=>Or(e)==="[object Object]",Cl=e=>Xe(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,ur=wl(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Ni=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},um=/-\w/g,zt=Ni(e=>e.replace(um,t=>t.slice(1).toUpperCase())),fm=/\B([A-Z])/g,qn=Ni(e=>e.replace(fm,"-$1").toLowerCase()),Ii=Ni(e=>e.charAt(0).toUpperCase()+e.slice(1)),ko=Ni(e=>e?`on${Ii(e)}`:""),Un=(e,t)=>!Object.is(e,t),fi=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},Qu=(e,t,n,s=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},Li=e=>{const t=parseFloat(e);return isNaN(t)?e:t},dm=e=>{const t=Xe(e)?Number(e):NaN;return isNaN(t)?e:t};let xc;const Di=()=>xc||(xc=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Mi(e){if(oe(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],r=Xe(s)?gm(s):Mi(s);if(r)for(const o in r)t[o]=r[o]}return t}else if(Xe(e)||$e(e))return e}const hm=/;(?![^(]*\))/g,pm=/:([^]+)/,mm=/\/\*[^]*?\*\//g;function gm(e){const t={};return e.replace(mm,"").split(hm).forEach(n=>{if(n){const s=n.split(pm);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function ft(e){let t="";if(Xe(e))t=e;else if(oe(e))for(let n=0;n<e.length;n++){const s=ft(e[n]);s&&(t+=s+" ")}else if($e(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const _m="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",bm=wl(_m);function Zu(e){return!!e||e===""}function vm(e,t){if(e.length!==t.length)return!1;let n=!0;for(let s=0;n&&s<e.length;s++)n=Rr(e[s],t[s]);return n}function Rr(e,t){if(e===t)return!0;let n=Cc(e),s=Cc(t);if(n||s)return n&&s?e.getTime()===t.getTime():!1;if(n=Zt(e),s=Zt(t),n||s)return e===t;if(n=oe(e),s=oe(t),n||s)return n&&s?vm(e,t):!1;if(n=$e(e),s=$e(t),n||s){if(!n||!s)return!1;const r=Object.keys(e).length,o=Object.keys(t).length;if(r!==o)return!1;for(const l in e){const c=e.hasOwnProperty(l),u=t.hasOwnProperty(l);if(c&&!u||!c&&u||!Rr(e[l],t[l]))return!1}}return String(e)===String(t)}function xl(e,t){return e.findIndex(n=>Rr(n,t))}const ef=e=>!!(e&&e.__v_isRef===!0),Ge=e=>Xe(e)?e:e==null?"":oe(e)||$e(e)&&(e.toString===Xu||!me(e.toString))?ef(e)?Ge(e.value):JSON.stringify(e,tf,2):String(e),tf=(e,t)=>ef(t)?tf(e,t.value):Ms(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,r],o)=>(n[No(s,o)+" =>"]=r,n),{})}:zs(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>No(n))}:Zt(t)?No(t):$e(t)&&!oe(t)&&!Yu(t)?String(t):t,No=(e,t="")=>{var n;return Zt(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};let Rt;class ym{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=Rt,!t&&Rt&&(this.index=(Rt.scopes||(Rt.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].pause();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].resume();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].resume()}}run(t){if(this._active){const n=Rt;try{return Rt=this,t()}finally{Rt=n}}}on(){++this._on===1&&(this.prevScope=Rt,Rt=this)}off(){this._on>0&&--this._on===0&&(Rt=this.prevScope,this.pLine truncated
`).forEach(function(l){r=l.indexOf(":"),n=l.substring(0,r).trim().toLowerCase(),s=l.substring(r+1).trim(),!(!n||t[n]&&Wb[n])&&(n==="set-cookie"?t[n]?t[n].push(s):t[n]=[s]:t[n]=t[n]?t[n]+", "+s:s)}),t},_u=Symbol("internals");function ir(e){return e&&String(e).trim().toLowerCase()}function vi(e){return e===!1||e==null?e:S.isArray(e)?e.map(vi):String(e)}function zb(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=n.exec(e);)t[s[1]]=s[2];return t}const Gb=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Vo(e,t,n,s,r){if(S.isFunction(s))return s.call(this,t,n);if(r&&(t=n),!!S.isString(t)){if(S.isString(s))return t.indexOf(s)!==-1;if(S.isRegExp(s))return s.test(t)}}function Jb(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,s)=>n.toUpperCase()+s)}function Xb(e,t){const n=S.toCamelCase(" "+t);["get","set","has"].forEach(s=>{Object.defineProperty(e,s+n,{value:function(r,o,l){return this[s].call(this,t,r,o,l)},configurable:!0})})}let kt=class{constructor(t){t&&this.set(t)}set(t,n,s){const r=this;function o(c,u,h){const d=ir(u);if(!d)throw new Error("header name must be a non-empty string");const p=S.findKey(r,d);(!p||r[p]===void 0||h===!0||h===void 0&&r[p]!==!1)&&(r[p||u]=vi(c))}const l=(c,u)=>S.forEach(c,(h,d)=>o(h,d,u));if(S.isPlainObject(t)||t instanceof this.constructor)l(t,n);else if(S.isString(t)&&(t=t.trim())&&!Gb(t))l(Kb(t),n);else if(S.isObject(t)&&S.isIterable(t)){let c={},u,h;for(const d of t){if(!S.isArray(d))throw TypeError("Object iterator must return a key-value pair");c[h=d[0]]=(u=c[h])?S.isArray(u)?[...u,d[1]]:[u,d[1]]:d[1]}l(c,n)}else t!=null&&o(n,t,s);return this}get(t,n){if(t=ir(t),t){const s=S.findKey(this,t);if(s){const r=this[s];if(!n)return r;if(n===!0)return zb(r);if(S.isFunction(n))return n.call(this,r,s);if(S.isRegExp(n))return n.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=ir(t),t){const s=S.findKey(this,t);return!!(s&&this[s]!==void 0&&(!n||Vo(this,this[s],s,n)))}return!1}delete(t,n){const s=this;let r=!1;function o(l){if(l=ir(l),l){const c=S.findKey(s,l);c&&(!n||Vo(s,s[c],c,n))&&(delete s[c],r=!0)}}return S.isArray(t)?t.forEach(o):o(t),r}clear(t){const n=Object.keys(this);let s=n.length,r=!1;for(;s--;){const o=n[s];(!t||Vo(this,this[o],o,t,!0))&&(delete this[o],r=!0)}return r}normalize(t){const n=this,s={};return S.forEach(this,(r,o)=>{const l=S.findKey(s,o);if(l){n[l]=vi(r),delete n[o];return}const c=t?Jb(o):String(o).trim();c!==o&&delete n[o],n[c]=vi(r),s[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return S.forEach(this,(s,r)=>{s!=null&&s!==!1&&(n[r]=t&&S.isArray(s)?s.join(", "):s)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const s=new this(t);return n.forEach(r=>s.set(r)),s}static accessor(t){const s=(this[_u]=this[_u]={accessors:{}}).accessors,r=this.prototype;function o(l){const c=ir(l);s[c]||(Xb(r,l),s[c]=!0)}return S.isArray(t)?t.forEach(o):o(t),this}};kt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);S.reduceDescriptors(kt.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(s){this[n]=s}}});S.freezeMethods(kt);function qo(e,t){const n=this||Mr,s=t||n,r=kt.from(s.headers);let o=s.data;return S.forEach(e,function(c){o=c.call(n,o,r.normalize(),t?t.status:void 0)}),r.normalize(),o}function Sd(e){return!!(e&&e.__CANCEL__)}function Js(e,t,n){ge.call(this,e??"canceled",ge.ERR_CANCELED,t,n),this.name="CanceledError"}S.inherits(Js,ge,{__CANCEL__:!0});function Td(e,t,n){const s=n.config.validateStatus;!n.status||!s||s(n.status)?e(n):t(new ge("Request failed with status code "+n.status,[ge.ERR_BAD_REQUEST,ge.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Yb(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Qb(e,t){e=e||10;const n=new Array(e),s=new Array(e);let r=0,o=0,l;return t=t!==void 0?t:1e3,function(u){const h=Date.now(),d=s[o];l||(l=h),n[r]=u,s[r]=h;let p=o,_=0;for(;p!==r;)_+=n[p++],p=p%e;if(r=(r+1)%e,r===o&&(o=(o+1)%e),h-l<t)return;const v=d&&h-d;return v?Math.round(_*1e3/v):void 0}}function Zb(e,t){let n=0,s=1e3/t,r,o;const l=(h,d=Date.now())=>{n=d,r=null,o&&(clearTimeout(o),o=null),e(...h)};return[(...h)=>{const d=Date.now(),p=d-n;p>=s?l(h,d):(r=h,o||(o=setTimeout(()=>{o=null,l(r)},s-p)))},()=>r&&l(r)]}const Pi=(e,t,n=3)=>{let s=0;const r=Qb(50,250);return Zb(o=>{const l=o.loaded,c=o.lengthComputable?o.total:void 0,u=l-s,h=r(u),d=l<=c;s=l;const p={loaded:l,total:c,progress:c?l/c:void 0,bytes:u,rate:h||void 0,estimated:h&&c&&d?(c-l)/h:void 0,event:o,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(p)},n)},bu=(e,t)=>{const n=e!=null;return[s=>t[0]({lengthComputable:n,total:e,loaded:s}),t[1]]},vu=e=>(...t)=>S.asap(()=>e(...t)),ev=gt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,gt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(gt.origin),gt.navigator&&/(msie|trident)/i.test(gt.navigator.userAgent)):()=>!0,tv=gt.hasStandardBrowserEnv?{write(e,t,n,s,r,o,l){if(typeof document>"u")return;const c=[`${e}=${encodeURIComponent(t)}`];S.isNumber(n)&&c.push(`expires=${new Date(n).toUTCString()}`),S.isString(s)&&c.push(`path=${s}`),S.isString(r)&&c.push(`domain=${r}`),o===!0&&c.push("secure"),S.isString(l)&&c.push(`SameSite=${l}`),document.cookie=c.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function nv(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function sv(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Od(e,t,n){let s=!nv(t);return e&&(s||n==!1)?sv(e,t):t}const yu=e=>e instanceof kt?{...e}:e;function ms(e,t){t=t||{};const n={};function s(h,d,p,_){return S.isPlainObject(h)&&S.isPlainObject(d)?S.merge.call({caseless:_},h,d):S.isPlainObject(d)?S.merge({},d):S.isArray(d)?d.slice():d}function r(h,d,p,_){if(S.isUndefined(d)){if(!S.isUndefined(h))return s(void 0,h,p,_)}else return s(h,d,p,_)}function o(h,d){if(!S.isUndefined(d))return s(void 0,d)}function l(h,d){if(S.isUndefined(d)){if(!S.isUndefined(h))return s(void 0,h)}else return s(void 0,d)}function c(h,d,p){if(p in t)return s(h,d);if(p in e)return s(void 0,h)}const u={url:o,method:o,data:o,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,withXSRFToken:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:c,headers:(h,d,p)=>r(yu(h),yu(d),p,!0)};return S.forEach(Object.keys({...e,...t}),function(d){const p=u[d]||r,_=p(e[d],t[d],d);S.isUndefined(_)&&p!==c||(n[d]=_)}),n}const Rd=e=>{const t=ms({},e);let{data:n,withXSRFToken:s,xsrfHeaderName:r,xsrfCookieName:o,headers:l,auth:c}=t;if(t.headers=l=kt.from(l),t.url=Ad(Od(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&l.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),S.isFormData(n)){if(gt.hasStandardBrowserEnv||gt.hasStandardBrowserWebWorkerEnv)l.setContentType(void 0);else if(S.isFunction(n.getHeaders)){const u=n.getHeaders(),h=["content-type","content-length"];Object.entries(u).forEach(([d,p])=>{h.inclu Line truncated
`+l.map(Su).join(`
`):" "+Su(l[0]):"as no adapter specified";throw new ge("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return r}const kd={getAdapter:pv,adapters:ql};function Wo(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Js(null,e)}function Tu(e){return Wo(e),e.headers=kt.from(e.headers),e.data=qo.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),kd.getAdapter(e.adapter||Mr.adapter,e)(e).then(function(s){return Wo(e),s.data=qo.call(e,e.transformResponse,s),s.headers=kt.from(s.headers),s},function(s){return Sd(s)||(Wo(e),s&&s.response&&(s.response.data=qo.call(e,e.transformResponse,s.response),s.response.headers=kt.from(s.response.headers))),Promise.reject(s)})}const Nd="1.13.2",Gi={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Gi[e]=function(s){return typeof s===e||"a"+(t<1?"n ":" ")+e}});const Ou={};Gi.transitional=function(t,n,s){function r(o,l){return"[Axios v"+Nd+"] Transitional option '"+o+"'"+l+(s?". "+s:"")}return(o,l,c)=>{if(t===!1)throw new ge(r(l," has been removed"+(n?" in "+n:"")),ge.ERR_DEPRECATED);return n&&!Ou[l]&&(Ou[l]=!0,console.warn(r(l," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,l,c):!0}};Gi.spelling=function(t){return(n,s)=>(console.warn(`${s} is likely a misspelling of ${t}`),!0)};function mv(e,t,n){if(typeof e!="object")throw new ge("options must be an object",ge.ERR_BAD_OPTION_VALUE);const s=Object.keys(e);let r=s.length;for(;r-- >0;){const o=s[r],l=t[o];if(l){const c=e[o],u=c===void 0||l(c,o,e);if(u!==!0)throw new ge("option "+o+" must be "+u,ge.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new ge("Unknown option "+o,ge.ERR_BAD_OPTION)}}const yi={assertOptions:mv,validators:Gi},fn=yi.validators;let hs=class{constructor(t){this.defaults=t||{},this.interceptors={request:new gu,response:new gu}}async request(t,n){try{return await this._request(t,n)}catch(s){if(s instanceof Error){let r={};Error.captureStackTrace?Error.captureStackTrace(r):r=new Error;const o=r.stack?r.stack.replace(/^.+\n/,""):"";try{s.stack?o&&!String(s.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(s.stack+=`
`+o):s.stack=o}catch{}}throw s}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=ms(this.defaults,n);const{transitional:s,paramsSerializer:r,headers:o}=n;s!==void 0&&yi.assertOptions(s,{silentJSONParsing:fn.transitional(fn.boolean),forcedJSONParsing:fn.transitional(fn.boolean),clarifyTimeoutError:fn.transitional(fn.boolean)},!1),r!=null&&(S.isFunction(r)?n.paramsSerializer={serialize:r}:yi.assertOptions(r,{encode:fn.function,serialize:fn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),yi.assertOptions(n,{baseUrl:fn.spelling("baseURL"),withXsrfToken:fn.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let l=o&&S.merge(o.common,o[n.method]);o&&S.forEach(["delete","get","head","post","put","patch","common"],y=>{delete o[y]}),n.headers=kt.concat(l,o);const c=[];let u=!0;this.interceptors.request.forEach(function(x){typeof x.runWhen=="function"&&x.runWhen(n)===!1||(u=u&&x.synchronous,c.unshift(x.fulfilled,x.rejected))});const h=[];this.interceptors.response.forEach(function(x){h.push(x.fulfilled,x.rejected)});let d,p=0,_;if(!u){const y=[Tu.bind(this),void 0];for(y.unshift(...c),y.push(...h),_=y.length,d=Promise.resolve(n);p<_;)d=d.then(y[p++],y[p++]);return d}_=c.length;let v=n;for(;p<_;){const y=c[p++],x=c[p++];try{v=y(v)}catch(O){x.call(this,O);break}}try{d=Tu.call(this,v)}catch(y){return Promise.reject(y)}for(p=0,_=h.length;p<_;)d=d.then(h[p++],h[p++]);return d}getUri(t){t=ms(this.defaults,t);const n=Od(t.baseURL,t.url,t.allowAbsoluteUrls);return Ad(n,t.params,t.paramsSerializer)}};S.forEach(["delete","get","head","options"],function(t){hs.prototype[t]=function(n,s){return this.request(ms(s||{},{method:t,url:n,data:(s||{}).data}))}});S.forEach(["post","put","patch"],function(t){function n(s){return function(o,l,c){return this.request(ms(c||{},{method:t,headers:s?{"Content-Type":"multipart/form-data"}:{},url:o,data:l}))}}hs.prototype[t]=n(),hs.prototype[t+"Form"]=n(!0)});let gv=class Id{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const s=this;this.promise.then(r=>{if(!s._listeners)return;let o=s._listeners.length;for(;o-- >0;)s._listeners[o](r);s._listeners=null}),this.promise.then=r=>{let o;const l=new Promise(c=>{s.subscribe(c),o=c}).then(r);return l.cancel=function(){s.unsubscribe(o)},l},t(function(o,l,c){s.reason||(s.reason=new Js(o,l,c),n(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=s=>{t.abort(s)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Id(function(r){t=r}),cancel:t}}};function _v(e){return function(n){return e.apply(null,n)}}function bv(e){return S.isObject(e)&&e.isAxiosError===!0}const ml={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(ml).forEach(([e,t])=>{ml[t]=e});function Ld(e){const t=new hs(e),n=fd(hs.prototype.request,t);return S.extend(n,hs.prototype,t,{allOwnKeys:!0}),S.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return Ld(ms(e,r))},n}const Ke=Ld(Mr);Ke.Axios=hs;Ke.CanceledError=Js;Ke.CancelToken=gv;Ke.isCancel=Sd;Ke.VERSION=Nd;Ke.toFormData=zi;Ke.AxiosError=ge;Ke.Cancel=Ke.CanceledError;Ke.all=function(t){return Promise.all(t)};Ke.spread=_v;Ke.isAxiosError=bv;Ke.mergeConfig=ms;Ke.AxiosH Line truncated
+7
View File
@@ -0,0 +1,7 @@
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Analytics-H7RJd3XI.js","assets/useTrafficChart-CIDQzDiF.js","assets/vendor-charts-Bcjh2pZL.js","assets/useFormatters-CKGG-YVI.js","assets/Clients-CStvXsIi.js","assets/vendor-ui-Dumif2LN.js","assets/Certificates-CvzlZTkL.js","assets/ConfirmModal-C1vwv-4S.js","assets/PKIConfig-JFPo7Sda.js","assets/ServerManagement-DNceDkxp.js","assets/BackupRestore-BYlEiEUE.js","assets/Account-B0bhkgF0.js"])))=>i.map(i=>d[i]);
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))s(r);new MutationObserver(r=>{for(const o of r)if(o.type==="childList")for(const l of o.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&s(l)}).observe(document,{childList:!0,subtree:!0});function n(r){const o={};return r.integrity&&(o.integrity=r.integrity),r.referrerPolicy&&(o.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?o.credentials="include":r.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function s(r){if(r.ep)return;r.ep=!0;const o=n(r);fetch(r.href,o)}})();function bl(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const $e={},Ls=[],hn=()=>{},Gu=()=>!1,xi=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),yl=e=>e.startsWith("onUpdate:"),Ze=Object.assign,vl=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},lm=Object.prototype.hasOwnProperty,Re=(e,t)=>lm.call(e,t),re=Array.isArray,Ds=e=>xr(e)==="[object Map]",Ws=e=>xr(e)==="[object Set]",Sc=e=>xr(e)==="[object Date]",pe=e=>typeof e=="function",ze=e=>typeof e=="string",Xt=e=>typeof e=="symbol",Me=e=>e!==null&&typeof e=="object",Ju=e=>(Me(e)||pe(e))&&pe(e.then)&&pe(e.catch),Xu=Object.prototype.toString,xr=e=>Xu.call(e),am=e=>xr(e).slice(8,-1),Yu=e=>xr(e)==="[object Object]",wl=e=>ze(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,ar=bl(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Oi=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},cm=/-\w/g,Wt=Oi(e=>e.replace(cm,t=>t.slice(1).toUpperCase())),um=/\B([A-Z])/g,qn=Oi(e=>e.replace(um,"-$1").toLowerCase()),Ri=Oi(e=>e.charAt(0).toUpperCase()+e.slice(1)),xo=Oi(e=>e?`on${Ri(e)}`:""),Un=(e,t)=>!Object.is(e,t),ai=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},Qu=(e,t,n,s=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},Pi=e=>{const t=parseFloat(e);return isNaN(t)?e:t},fm=e=>{const t=ze(e)?Number(e):NaN;return isNaN(t)?e:t};let Tc;const Ni=()=>Tc||(Tc=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Ii(e){if(re(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],r=ze(s)?mm(s):Ii(s);if(r)for(const o in r)t[o]=r[o]}return t}else if(ze(e)||Me(e))return e}const dm=/;(?![^(]*\))/g,hm=/:([^]+)/,pm=/\/\*[^]*?\*\//g;function mm(e){const t={};return e.replace(pm,"").split(dm).forEach(n=>{if(n){const s=n.split(hm);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function An(e){let t="";if(ze(e))t=e;else if(re(e))for(let n=0;n<e.length;n++){const s=An(e[n]);s&&(t+=s+" ")}else if(Me(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const gm="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",_m=bl(gm);function Zu(e){return!!e||e===""}function bm(e,t){if(e.length!==t.length)return!1;let n=!0;for(let s=0;n&&s<e.length;s++)n=Or(e[s],t[s]);return n}function Or(e,t){if(e===t)return!0;let n=Sc(e),s=Sc(t);if(n||s)return n&&s?e.getTime()===t.getTime():!1;if(n=Xt(e),s=Xt(t),n||s)return e===t;if(n=re(e),s=re(t),n||s)return n&&s?bm(e,t):!1;if(n=Me(e),s=Me(t),n||s){if(!n||!s)return!1;const r=Object.keys(e).length,o=Object.keys(t).length;if(r!==o)return!1;for(const l in e){const c=e.hasOwnProperty(l),u=t.hasOwnProperty(l);if(c&&!u||!c&&u||!Or(e[l],t[l]))return!1}}return String(e)===String(t)}function El(e,t){return e.findIndex(n=>Or(n,t))}const ef=e=>!!(e&&e.__v_isRef===!0),cs=e=>ze(e)?e:e==null?"":re(e)||Me(e)&&(e.toString===Xu||!pe(e.toString))?ef(e)?cs(e.value):JSON.stringify(e,tf,2):String(e),tf=(e,t)=>ef(t)?tf(e,t.value):Ds(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,r],o)=>(n[Oo(s,o)+" =>"]=r,n),{})}:Ws(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Oo(n))}:Xt(t)?Oo(t):Me(t)&&!re(t)&&!Yu(t)?String(t):t,Oo=(e,t="")=>{var n;return Xt(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};let St;class ym{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=St,!t&&St&&(this.index=(St.scopes||(St.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].pause();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].resume();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].resume()}}run(t){if(this._active){const n=St;try{return St=this,t()}finally{St=n}}}on(){++this._on===1&&(this.prevScope=St,St=this)}off(){this._on>0&&--this._on===0&&(St=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let n,s;for(n=0,s=this.effects.length;n<s;n+Line truncated
`).forEach(function(l){r=l.indexOf(":"),n=l.substring(0,r).trim().toLowerCase(),s=l.substring(r+1).trim(),!(!n||t[n]&&Vb[n])&&(n==="set-cookie"?t[n]?t[n].push(s):t[n]=[s]:t[n]=t[n]?t[n]+", "+s:s)}),t},bu=Symbol("internals");function sr(e){return e&&String(e).trim().toLowerCase()}function mi(e){return e===!1||e==null?e:C.isArray(e)?e.map(mi):String(e)}function Wb(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=n.exec(e);)t[s[1]]=s[2];return t}const Kb=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ho(e,t,n,s,r){if(C.isFunction(s))return s.call(this,t,n);if(r&&(t=n),!!C.isString(t)){if(C.isString(s))return t.indexOf(s)!==-1;if(C.isRegExp(s))return s.test(t)}}function zb(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,s)=>n.toUpperCase()+s)}function Gb(e,t){const n=C.toCamelCase(" "+t);["get","set","has"].forEach(s=>{Object.defineProperty(e,s+n,{value:function(r,o,l){return this[s].call(this,t,r,o,l)},configurable:!0})})}let Ot=class{constructor(t){t&&this.set(t)}set(t,n,s){const r=this;function o(c,u,h){const d=sr(u);if(!d)throw new Error("header name must be a non-empty string");const m=C.findKey(r,d);(!m||r[m]===void 0||h===!0||h===void 0&&r[m]!==!1)&&(r[m||u]=mi(c))}const l=(c,u)=>C.forEach(c,(h,d)=>o(h,d,u));if(C.isPlainObject(t)||t instanceof this.constructor)l(t,n);else if(C.isString(t)&&(t=t.trim())&&!Kb(t))l(qb(t),n);else if(C.isObject(t)&&C.isIterable(t)){let c={},u,h;for(const d of t){if(!C.isArray(d))throw TypeError("Object iterator must return a key-value pair");c[h=d[0]]=(u=c[h])?C.isArray(u)?[...u,d[1]]:[u,d[1]]:d[1]}l(c,n)}else t!=null&&o(n,t,s);return this}get(t,n){if(t=sr(t),t){const s=C.findKey(this,t);if(s){const r=this[s];if(!n)return r;if(n===!0)return Wb(r);if(C.isFunction(n))return n.call(this,r,s);if(C.isRegExp(n))return n.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=sr(t),t){const s=C.findKey(this,t);return!!(s&&this[s]!==void 0&&(!n||Ho(this,this[s],s,n)))}return!1}delete(t,n){const s=this;let r=!1;function o(l){if(l=sr(l),l){const c=C.findKey(s,l);c&&(!n||Ho(s,s[c],c,n))&&(delete s[c],r=!0)}}return C.isArray(t)?t.forEach(o):o(t),r}clear(t){const n=Object.keys(this);let s=n.length,r=!1;for(;s--;){const o=n[s];(!t||Ho(this,this[o],o,t,!0))&&(delete this[o],r=!0)}return r}normalize(t){const n=this,s={};return C.forEach(this,(r,o)=>{const l=C.findKey(s,o);if(l){n[l]=mi(r),delete n[o];return}const c=t?zb(o):String(o).trim();c!==o&&delete n[o],n[c]=mi(r),s[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return C.forEach(this,(s,r)=>{s!=null&&s!==!1&&(n[r]=t&&C.isArray(s)?s.join(", "):s)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const s=new this(t);return n.forEach(r=>s.set(r)),s}static accessor(t){const s=(this[bu]=this[bu]={accessors:{}}).accessors,r=this.prototype;function o(l){const c=sr(l);s[c]||(Gb(r,l),s[c]=!0)}return C.isArray(t)?t.forEach(o):o(t),this}};Ot.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);C.reduceDescriptors(Ot.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(s){this[n]=s}}});C.freezeMethods(Ot);function Uo(e,t){const n=this||Lr,s=t||n,r=Ot.from(s.headers);let o=s.data;return C.forEach(e,function(c){o=c.call(n,o,r.normalize(),t?t.status:void 0)}),r.normalize(),o}function Sd(e){return!!(e&&e.__CANCEL__)}function zs(e,t,n){me.call(this,e??"canceled",me.ERR_CANCELED,t,n),this.name="CanceledError"}C.inherits(zs,me,{__CANCEL__:!0});function Td(e,t,n){const s=n.config.validateStatus;!n.status||!s||s(n.status)?e(n):t(new me("Request failed with status code "+n.status,[me.ERR_BAD_REQUEST,me.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Jb(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Xb(e,t){e=e||10;const n=new Array(e),s=new Array(e);let r=0,o=0,l;return t=t!==void 0?t:1e3,function(u){const h=Date.now(),d=s[o];l||(l=h),n[r]=u,s[r]=h;let m=o,_=0;for(;m!==r;)_+=n[m++],m=m%e;if(r=(r+1)%e,r===o&&(o=(o+1)%e),h-l<t)return;const y=d&&h-d;return y?Math.round(_*1e3/y):void 0}}function Yb(e,t){let n=0,s=1e3/t,r,o;const l=(h,d=Date.now())=>{n=d,r=null,o&&(clearTimeout(o),o=null),e(...h)};return[(...h)=>{const d=Date.now(),m=d-n;m>=s?l(h,d):(r=h,o||(o=setTimeout(()=>{o=null,l(r)},s-m)))},()=>r&&l(r)]}const Ti=(e,t,n=3)=>{let s=0;const r=Xb(50,250);return Yb(o=>{const l=o.loaded,c=o.lengthComputable?o.total:void 0,u=l-s,h=r(u),d=l<=c;s=l;const m={loaded:l,total:c,progress:c?l/c:void 0,bytes:u,rate:h||void 0,estimated:h&&c&&d?(c-l)/h:void 0,event:o,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(m)},n)},yu=(e,t)=>{const n=e!=null;return[s=>t[0]({lengthComputable:n,total:e,loaded:s}),t[1]]},vu=e=>(...t)=>C.asap(()=>e(...t)),Qb=ft.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,ft.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(ft.origin),ft.navigator&&/(msie|trident)/i.test(ft.navigator.userAgent)):()=>!0,Zb=ft.hasStandardBrowserEnv?{write(e,t,n,s,r,o,l){if(typeof document>"u")return;const c=[`${e}=${encodeURIComponent(t)}`];C.isNumber(n)&&c.push(`expires=${new Date(n).toUTCString()}`),C.isString(s)&&c.push(`path=${s}`),C.isString(r)&&c.push(`domain=${r}`),o===!0&&c.push("secure"),C.isString(l)&&c.push(`SameSite=${l}`),document.cookie=c.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function ey(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function ty(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function xd(e,t,n){let s=!ey(t);return e&&(s||n==!1)?ty(e,t):t}const wu=e=>e instanceof Ot?{...e}:e;function ps(e,t){t=t||{};const n={};function s(h,d,m,_){return C.isPlainObject(h)&&C.isPlainObject(d)?C.merge.call({caseless:_},h,d):C.isPlainObject(d)?C.merge({},d):C.isArray(d)?d.slice():d}function r(h,d,m,_){if(C.isUndefined(d)){if(!C.isUndefined(h))return s(void 0,h,m,_)}else return s(h,d,m,_)}function o(h,d){if(!C.isUndefined(d))return s(void 0,d)}function l(h,d){if(C.isUndefined(d)){if(!C.isUndefined(h))return s(void 0,h)}else return s(void 0,d)}function c(h,d,m){if(m in t)return s(h,d);if(m in e)return s(void 0,h)}const u={url:o,method:o,data:o,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,withXSRFToken:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:c,headers:(h,d,m)=>r(wu(h),wu(d),m,!0)};return C.forEach(Object.keys({...e,...t}),function(d){const m=u[d]||r,_=m(e[d],t[d],d);C.isUndefined(_)&&m!==c||(n[d]=_)}),n}const Od=e=>{const t=ps({},e);let{data:n,withXSRFToken:s,xsrfHeaderName:r,xsrfCookieName:o,headers:l,auth:c}=t;if(t.headers=l=Ot.from(l),t.url=Ed(xd(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&l.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),C.isFormData(n)){if(ft.hasStandardBrowserEnv||ft.hasStandardBrowserWebWorkerEnv)l.setContentType(void 0);else if(C.isFunction(n.getHeaders)){const u=n.getHeaders(),h=["content-type","content-length"];Object.entries(u).forEach(([d,m])=>{h.inclu Line truncated
`+l.map(xu).join(`
`):" "+xu(l[0]):"as no adapter specified";throw new me("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return r}const Pd={getAdapter:dy,adapters:Ul};function Vo(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new zs(null,e)}function Ou(e){return Vo(e),e.headers=Ot.from(e.headers),e.data=Uo.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Pd.getAdapter(e.adapter||Lr.adapter,e)(e).then(function(s){return Vo(e),s.data=Uo.call(e,e.transformResponse,s),s.headers=Ot.from(s.headers),s},function(s){return Sd(s)||(Vo(e),s&&s.response&&(s.response.data=Uo.call(e,e.transformResponse,s.response),s.response.headers=Ot.from(s.response.headers))),Promise.reject(s)})}const Nd="1.13.2",qi={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{qi[e]=function(s){return typeof s===e||"a"+(t<1?"n ":" ")+e}});const Ru={};qi.transitional=function(t,n,s){function r(o,l){return"[Axios v"+Nd+"] Transitional option '"+o+"'"+l+(s?". "+s:"")}return(o,l,c)=>{if(t===!1)throw new me(r(l," has been removed"+(n?" in "+n:"")),me.ERR_DEPRECATED);return n&&!Ru[l]&&(Ru[l]=!0,console.warn(r(l," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,l,c):!0}};qi.spelling=function(t){return(n,s)=>(console.warn(`${s} is likely a misspelling of ${t}`),!0)};function hy(e,t,n){if(typeof e!="object")throw new me("options must be an object",me.ERR_BAD_OPTION_VALUE);const s=Object.keys(e);let r=s.length;for(;r-- >0;){const o=s[r],l=t[o];if(l){const c=e[o],u=c===void 0||l(c,o,e);if(u!==!0)throw new me("option "+o+" must be "+u,me.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new me("Unknown option "+o,me.ERR_BAD_OPTION)}}const gi={assertOptions:hy,validators:qi},an=gi.validators;let ds=class{constructor(t){this.defaults=t||{},this.interceptors={request:new _u,response:new _u}}async request(t,n){try{return await this._request(t,n)}catch(s){if(s instanceof Error){let r={};Error.captureStackTrace?Error.captureStackTrace(r):r=new Error;const o=r.stack?r.stack.replace(/^.+\n/,""):"";try{s.stack?o&&!String(s.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(s.stack+=`
`+o):s.stack=o}catch{}}throw s}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=ps(this.defaults,n);const{transitional:s,paramsSerializer:r,headers:o}=n;s!==void 0&&gi.assertOptions(s,{silentJSONParsing:an.transitional(an.boolean),forcedJSONParsing:an.transitional(an.boolean),clarifyTimeoutError:an.transitional(an.boolean)},!1),r!=null&&(C.isFunction(r)?n.paramsSerializer={serialize:r}:gi.assertOptions(r,{encode:an.function,serialize:an.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),gi.assertOptions(n,{baseUrl:an.spelling("baseURL"),withXsrfToken:an.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let l=o&&C.merge(o.common,o[n.method]);o&&C.forEach(["delete","get","head","post","put","patch","common"],w=>{delete o[w]}),n.headers=Ot.concat(l,o);const c=[];let u=!0;this.interceptors.request.forEach(function(S){typeof S.runWhen=="function"&&S.runWhen(n)===!1||(u=u&&S.synchronous,c.unshift(S.fulfilled,S.rejected))});const h=[];this.interceptors.response.forEach(function(S){h.push(S.fulfilled,S.rejected)});let d,m=0,_;if(!u){const w=[Ou.bind(this),void 0];for(w.unshift(...c),w.push(...h),_=w.length,d=Promise.resolve(n);m<_;)d=d.then(w[m++],w[m++]);return d}_=c.length;let y=n;for(;m<_;){const w=c[m++],S=c[m++];try{y=w(y)}catch(x){S.call(this,x);break}}try{d=Ou.call(this,y)}catch(w){return Promise.reject(w)}for(m=0,_=h.length;m<_;)d=d.then(h[m++],h[m++]);return d}getUri(t){t=ps(this.defaults,t);const n=xd(t.baseURL,t.url,t.allowAbsoluteUrls);return Ed(n,t.params,t.paramsSerializer)}};C.forEach(["delete","get","head","options"],function(t){ds.prototype[t]=function(n,s){return this.request(ps(s||{},{method:t,url:n,data:(s||{}).data}))}});C.forEach(["post","put","patch"],function(t){function n(s){return function(o,l,c){return this.request(ps(c||{},{method:t,headers:s?{"Content-Type":"multipart/form-data"}:{},url:o,data:l}))}}ds.prototype[t]=n(),ds.prototype[t+"Form"]=n(!0)});let py=class Id{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const s=this;this.promise.then(r=>{if(!s._listeners)return;let o=s._listeners.length;for(;o-- >0;)s._listeners[o](r);s._listeners=null}),this.promise.then=r=>{let o;const l=new Promise(c=>{s.subscribe(c),o=c}).then(r);return l.cancel=function(){s.unsubscribe(o)},l},t(function(o,l,c){s.reason||(s.reason=new zs(o,l,c),n(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=s=>{t.abort(s)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Id(function(r){t=r}),cancel:t}}};function my(e){return function(n){return e.apply(null,n)}}function gy(e){return C.isObject(e)&&e.isAxiosError===!0}const dl={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(dl).forEach(([e,t])=>{dl[t]=e});function kd(e){const t=new ds(e),n=ud(ds.prototype.request,t);return C.extend(n,ds.prototype,t,{allOwnKeys:!0}),C.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return kd(ps(e,r))},n}const qe=kd(Lr);qe.Axios=ds;qe.CanceledError=zs;qe.CancelToken=py;qe.isCancel=Sd;qe.VERSION=Nd;qe.toFormData=Vi;qe.AxiosError=me;qe.Cancel=qe.CanceledError;qe.all=function(t){return Promise.all(t)};qe.spread=my;qe.isAxiosError=gy;qe.mergeConfig=ps;qe.AxiosH Line truncated
@@ -0,0 +1 @@
function p(){function l(t,n=2){const e=Number(t);if(!Number.isFinite(e)||e<=0)return"0 B";const r=1024,a=n<0?0:n,i=["B","KB","MB","GB","TB"],o=Math.min(Math.max(Math.floor(Math.log(e)/Math.log(r)),0),i.length-1);return parseFloat((e/Math.pow(r,o)).toFixed(a))+" "+i[o]}function m(t){return(parseFloat(t)||0).toFixed(3)+" Mbps"}function c(t){if(!t)return null;if(t.endsWith("Z"))return new Date(t);const[n,e]=t.split(" ");if(!n||!e){let s=t.replace(" ","T");return!s.endsWith("Z")&&!s.includes("+")&&(s+="Z"),new Date(s)}const[r,a,i]=n.split("-").map(Number),[o,f,u]=e.split(":").map(Number);return new Date(Date.UTC(r,a-1,i,o,f,u!==void 0?u:0))}return{formatBytes:l,formatRate:m,parseServerDate:c}}export{p as u};
@@ -0,0 +1 @@
import{C as f,r as y}from"./vendor-charts-Bcjh2pZL.js";import{u as T}from"./useFormatters-CKGG-YVI.js";import{c as k}from"./index-CrxOIffM.js";f.register(...y);const v="#1652B8",L="#EC7C31",_=1024*1024,M=()=>{const t=document.documentElement.getAttribute("data-theme")==="dark";return{isDark:t,gridColor:t?"rgba(240, 246, 252, 0.1)":"rgba(0,0,0,0.05)",textColor:t?"#8b949e":"#6c757d"}},S=(t,l)=>{if(!t||t.length===0)return[];if(t.length<=l)return t;const u=Math.ceil(t.length/l),a=[];for(let s=0;s<t.length;s+=u){const c=t.slice(s,s+u);if(c.length===0)continue;let m=0,i=0,o=0,e=0;c.forEach(r=>{m+=r.bytes_received||0,i+=r.bytes_sent||0,o=Math.max(o,r.rx_rate_mbps||0),e=Math.max(e,r.tx_rate_mbps||0)}),a.push({timestamp:c[0].timestamp,bytes_received:m,bytes_sent:i,rx_rate_mbps:o,tx_rate_mbps:e})}return a};function X(t,{maxPoints:l}){const{parseServerDate:u}=T();let a=null;const s=()=>{a&&(a.destroy(),a=null)},c=(i,o)=>{const e=u(i),r=e.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"});return o.includes("h")||o==="1d"?r:e.toLocaleDateString([],{month:"short",day:"numeric"})+" "+r},m=(i,{range:o,speedMode:e})=>{if(!t.value)return;s();const r=[],d=[],b=[];S(i,l).forEach(n=>{r.push(c(n.timestamp,o)),e?(d.push(n.rx_rate_mbps||0),b.push(n.tx_rate_mbps||0)):(d.push(n.bytes_received/_),b.push(n.bytes_sent/_))});const{gridColor:h,textColor:g}=M(),x=(n,C,p,R)=>({label:n,data:C,borderColor:p,backgroundColor:R,borderWidth:2,fill:!0,tension:.3,pointRadius:3,pointHoverRadius:4});a=new f(t.value.getContext("2d"),{type:"line",data:{labels:r,datasets:[x(e?"RX Mbps":"Received (MB)",d,v,"rgba(22, 82, 184, 0.15)"),x(e?"TX Mbps":"Sent (MB)",b,L,"rgba(236, 124, 49, 0.15)")]},options:{responsive:!0,maintainAspectRatio:!1,interaction:{mode:"index",intersect:!1},plugins:{legend:{labels:{color:g}}},scales:{x:{ticks:{color:g,maxTicksLimit:8},grid:{color:h}},y:{beginAtZero:!0,ticks:{color:g},grid:{color:h}}}}})};return k(s),{render:m,destroy:s}}export{v as C,L as a,M as g,X as u};
@@ -0,0 +1 @@
var L="top",R="bottom",x="right",I="left",fe="auto",It=[L,R,x,I],pt="start",Ot="end",is="clippingParents",Ge="viewport",At="popper",rs="reference",Be=It.reduce(function(n,t){return n.concat([t+"-"+pt,t+"-"+Ot])},[]),qe=[].concat(It,[fe]).reduce(function(n,t){return n.concat([t,t+"-"+pt,t+"-"+Ot])},[]),os="beforeRead",as="read",cs="afterRead",ls="beforeMain",us="main",hs="afterMain",ds="beforeWrite",fs="write",ps="afterWrite",_s=[os,as,cs,ls,us,hs,ds,fs,ps];function z(n){return n?(n.nodeName||"").toLowerCase():null}function k(n){if(n==null)return window;if(n.toString()!=="[object Window]"){var t=n.ownerDocument;return t&&t.defaultView||window}return n}function _t(n){var t=k(n).Element;return n instanceof t||n instanceof Element}function V(n){var t=k(n).HTMLElement;return n instanceof t||n instanceof HTMLElement}function Xe(n){if(typeof ShadowRoot>"u")return!1;var t=k(n).ShadowRoot;return n instanceof t||n instanceof ShadowRoot}function ui(n){var t=n.state;Object.keys(t.elements).forEach(function(e){var s=t.styles[e]||{},i=t.attributes[e]||{},r=t.elements[e];!V(r)||!z(r)||(Object.assign(r.style,s),Object.keys(i).forEach(function(o){var a=i[o];a===!1?r.removeAttribute(o):r.setAttribute(o,a===!0?"":a)}))})}function hi(n){var t=n.state,e={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,e.popper),t.styles=e,t.elements.arrow&&Object.assign(t.elements.arrow.style,e.arrow),function(){Object.keys(t.elements).forEach(function(s){var i=t.elements[s],r=t.attributes[s]||{},o=Object.keys(t.styles.hasOwnProperty(s)?t.styles[s]:e[s]),a=o.reduce(function(l,h){return l[h]="",l},{});!V(i)||!z(i)||(Object.assign(i.style,a),Object.keys(r).forEach(function(l){i.removeAttribute(l)}))})}}const Qe={name:"applyStyles",enabled:!0,phase:"write",fn:ui,effect:hi,requires:["computeStyles"]};function Y(n){return n.split("-")[0]}var ft=Math.max,le=Math.min,Ct=Math.round;function je(){var n=navigator.userAgentData;return n!=null&&n.brands&&Array.isArray(n.brands)?n.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function ms(){return!/^((?!chrome|android).)*safari/i.test(je())}function Nt(n,t,e){t===void 0&&(t=!1),e===void 0&&(e=!1);var s=n.getBoundingClientRect(),i=1,r=1;t&&V(n)&&(i=n.offsetWidth>0&&Ct(s.width)/n.offsetWidth||1,r=n.offsetHeight>0&&Ct(s.height)/n.offsetHeight||1);var o=_t(n)?k(n):window,a=o.visualViewport,l=!ms()&&e,h=(s.left+(l&&a?a.offsetLeft:0))/i,u=(s.top+(l&&a?a.offsetTop:0))/r,p=s.width/i,_=s.height/r;return{width:p,height:_,top:u,right:h+p,bottom:u+_,left:h,x:h,y:u}}function Ze(n){var t=Nt(n),e=n.offsetWidth,s=n.offsetHeight;return Math.abs(t.width-e)<=1&&(e=t.width),Math.abs(t.height-s)<=1&&(s=t.height),{x:n.offsetLeft,y:n.offsetTop,width:e,height:s}}function gs(n,t){var e=t.getRootNode&&t.getRootNode();if(n.contains(t))return!0;if(e&&Xe(e)){var s=t;do{if(s&&n.isSameNode(s))return!0;s=s.parentNode||s.host}while(s)}return!1}function X(n){return k(n).getComputedStyle(n)}function di(n){return["table","td","th"].indexOf(z(n))>=0}function st(n){return((_t(n)?n.ownerDocument:n.document)||window.document).documentElement}function pe(n){return z(n)==="html"?n:n.assignedSlot||n.parentNode||(Xe(n)?n.host:null)||st(n)}function Tn(n){return!V(n)||X(n).position==="fixed"?null:n.offsetParent}function fi(n){var t=/firefox/i.test(je()),e=/Trident/i.test(je());if(e&&V(n)){var s=X(n);if(s.position==="fixed")return null}var i=pe(n);for(Xe(i)&&(i=i.host);V(i)&&["html","body"].indexOf(z(i))<0;){var r=X(i);if(r.transform!=="none"||r.perspective!=="none"||r.contain==="paint"||["transform","perspective"].indexOf(r.willChange)!==-1||t&&r.willChange==="filter"||t&&r.filter&&r.filter!=="none")return i;i=i.parentNode}return null}function Ft(n){for(var t=k(n),e=Tn(n);e&&di(e)&&X(e).position==="static";)e=Tn(e);return e&&(z(e)==="html"||z(e)==="body"&&X(e).position==="static")?t:e||fi(n)||t}function Je(n){return["top","bottom"].indexOf(n)>=0?"x":"y"}function Wt(n,t,e){return ft(n,le(t,e))}function pi(n,t,e){var s=Wt(n,t,e);return s>e?e:s}function Es(){return{top:0,right:0,bottom:0,left:0}}function vs(n){return Object.assign({},Es(),n)}function bs(n,t){return t.reduce(function(e,s){return e[s]=n,e},{})}var _i=function(t,e){return t=typeof t=="function"?t(Object.assign({},e.rects,{placement:e.placement})):t,vs(typeof t!="number"?t:bs(t,It))};function mi(n){var t,e=n.state,s=n.name,i=n.options,r=e.elements.arrow,o=e.modifiersData.popperOffsets,a=Y(e.placement),l=Je(a),h=[I,x].indexOf(a)>=0,u=h?"height":"width";if(!(!r||!o)){var p=_i(i.padding,e),_=Ze(r),f=l==="y"?L:I,A=l==="y"?R:x,m=e.rects.reference[u]+e.rects.reference[l]-o[l]-e.rects.popper[u],E=o[l]-e.rects.reference[l],T=Ft(r),w=T?l==="y"?T.clientHeight||0:T.clientWidth||0:0,O=m/2-E/2,g=p[f],v=w-_[u]-p[A],b=w/2-_[u]/2+O,y=Wt(g,b,v),S=l;e.modifiersData[s]=(t={},t[S]=y,t.centerOffset=y-b,t)}}function gi(n){var t=n.state,e=n.options,s=e.element,i=s===void 0?"[Line truncated
@@ -1,63 +0,0 @@
var H="top",U="bottom",q="right",j="left",un="auto",lt=[H,U,q,j],Re="start",Je="end",Vs="clippingParents",oo="viewport",qe="popper",Hs="reference",Yn=lt.reduce(function(t,e){return t.concat([e+"-"+Re,e+"-"+Je])},[]),so=[].concat(lt,[un]).reduce(function(t,e){return t.concat([e,e+"-"+Re,e+"-"+Je])},[]),js="beforeRead",Ws="read",Fs="afterRead",zs="beforeMain",Ks="main",Ys="afterMain",Us="beforeWrite",qs="write",Gs="afterWrite",Xs=[js,Ws,Fs,zs,Ks,Ys,Us,qs,Gs];function ue(t){return t?(t.nodeName||"").toLowerCase():null}function G(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Ve(t){var e=G(t).Element;return t instanceof e||t instanceof Element}function J(t){var e=G(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function io(t){if(typeof ShadowRoot>"u")return!1;var e=G(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function Vr(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var o=e.styles[n]||{},s=e.attributes[n]||{},i=e.elements[n];!J(i)||!ue(i)||(Object.assign(i.style,o),Object.keys(s).forEach(function(r){var a=s[r];a===!1?i.removeAttribute(r):i.setAttribute(r,a===!0?"":a)}))})}function Hr(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(o){var s=e.elements[o],i=e.attributes[o]||{},r=Object.keys(e.styles.hasOwnProperty(o)?e.styles[o]:n[o]),a=r.reduce(function(c,f){return c[f]="",c},{});!J(s)||!ue(s)||(Object.assign(s.style,a),Object.keys(i).forEach(function(c){s.removeAttribute(c)}))})}}const ro={name:"applyStyles",enabled:!0,phase:"write",fn:Vr,effect:Hr,requires:["computeStyles"]};function le(t){return t.split("-")[0]}var Me=Math.max,Xt=Math.min,et=Math.round;function Un(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function Qs(){return!/^((?!chrome|android).)*safari/i.test(Un())}function tt(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);var o=t.getBoundingClientRect(),s=1,i=1;e&&J(t)&&(s=t.offsetWidth>0&&et(o.width)/t.offsetWidth||1,i=t.offsetHeight>0&&et(o.height)/t.offsetHeight||1);var r=Ve(t)?G(t):window,a=r.visualViewport,c=!Qs()&&n,f=(o.left+(c&&a?a.offsetLeft:0))/s,d=(o.top+(c&&a?a.offsetTop:0))/i,g=o.width/s,w=o.height/i;return{width:g,height:w,top:d,right:f+g,bottom:d+w,left:f,x:f,y:d}}function ao(t){var e=tt(t),n=t.offsetWidth,o=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-o)<=1&&(o=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:o}}function Zs(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&io(n)){var o=e;do{if(o&&t.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function me(t){return G(t).getComputedStyle(t)}function jr(t){return["table","td","th"].indexOf(ue(t))>=0}function Ce(t){return((Ve(t)?t.ownerDocument:t.document)||window.document).documentElement}function dn(t){return ue(t)==="html"?t:t.assignedSlot||t.parentNode||(io(t)?t.host:null)||Ce(t)}function Yo(t){return!J(t)||me(t).position==="fixed"?null:t.offsetParent}function Wr(t){var e=/firefox/i.test(Un()),n=/Trident/i.test(Un());if(n&&J(t)){var o=me(t);if(o.position==="fixed")return null}var s=dn(t);for(io(s)&&(s=s.host);J(s)&&["html","body"].indexOf(ue(s))<0;){var i=me(s);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||e&&i.willChange==="filter"||e&&i.filter&&i.filter!=="none")return s;s=s.parentNode}return null}function At(t){for(var e=G(t),n=Yo(t);n&&jr(n)&&me(n).position==="static";)n=Yo(n);return n&&(ue(n)==="html"||ue(n)==="body"&&me(n).position==="static")?e:n||Wr(t)||e}function lo(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function _t(t,e,n){return Me(t,Xt(e,n))}function Fr(t,e,n){var o=_t(t,e,n);return o>n?n:o}function Js(){return{top:0,right:0,bottom:0,left:0}}function ei(t){return Object.assign({},Js(),t)}function ti(t,e){return e.reduce(function(n,o){return n[o]=t,n},{})}var zr=function(e,n){return e=typeof e=="function"?e(Object.assign({},n.rects,{placement:n.placement})):e,ei(typeof e!="number"?e:ti(e,lt))};function Kr(t){var e,n=t.state,o=t.name,s=t.options,i=n.elements.arrow,r=n.modifiersData.popperOffsets,a=le(n.placement),c=lo(a),f=[j,q].indexOf(a)>=0,d=f?"height":"width";if(!(!i||!r)){var g=zr(s.padding,n),w=ao(i),m=c==="y"?H:j,C=c==="y"?U:q,b=n.rects.reference[d]+n.rects.reference[c]-r[c]-n.rects.popper[d],_=r[c]-n.rects.reference[c],k=At(i),x=k?c==="y"?k.clientHeight||0:k.clientWidth||0:0,$=b/2-_/2,v=g[m],A=x-w[d]-g[C],T=x/2-w[d]/2+$,S=_t(v,T,A),M=c;n.modifiersData[o]=(e={},e[M]=S,e.centerOffset=S-T,e)}}function Yr(t){var e=t.state,n=t.options,o=n.elementLine truncated
a[href],
area[href],
input:not([disabled]),
select:not([disabled]),
textarea:not([disabled]),
button:not([disabled]),
iframe,
object,
embed,
[tabindex="0"],
[contenteditable],
audio[controls],
video[controls],
summary
`,So=()=>{const t=y();if(!t)return[];const e=t.querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])'),n=Array.from(e).sort((i,r)=>{const a=parseInt(i.getAttribute("tabindex")||"0"),c=parseInt(r.getAttribute("tabindex")||"0");return a>c?1:a<c?-1:0}),o=t.querySelectorAll(Gd),s=Array.from(o).filter(i=>i.getAttribute("tabindex")!=="-1");return[...new Set(n.concat(s))].filter(i=>K(i))},xo=()=>pe(document.body,l.shown)&&!pe(document.body,l["toast-shown"])&&!pe(document.body,l["no-backdrop"]),En=()=>{const t=y();return t?pe(t,l.toast):!1},Xd=()=>{const t=y();return t?t.hasAttribute("data-loading"):!1},Z=(t,e)=>{if(t.textContent="",e){const o=new DOMParser().parseFromString(e,"text/html"),s=o.querySelector("head");s&&Array.from(s.childNodes).forEach(r=>{t.appendChild(r)});const i=o.querySelector("body");i&&Array.from(i.childNodes).forEach(r=>{r instanceof HTMLVideoElement||r instanceof HTMLAudioElement?t.appendChild(r.cloneNode(!0)):t.appendChild(r)})}},pe=(t,e)=>{if(!e)return!1;const n=e.split(/\s+/);for(let o=0;o<n.length;o++)if(!t.classList.contains(n[o]))return!1;return!0},Qd=(t,e)=>{Array.from(t.classList).forEach(n=>{!Object.values(l).includes(n)&&!Object.values(en).includes(n)&&!Object.values(e.showClass||{}).includes(n)&&t.classList.remove(n)})},X=(t,e,n)=>{if(Qd(t,e),!e.customClass)return;const o=e.customClass[n];if(o){if(typeof o!="string"&&!o.forEach){W(`Invalid type of customClass.${n}! Expected string or iterable object, got "${typeof o}"`);return}E(t,o)}},yn=(t,e)=>{if(!e)return null;switch(e){case"select":case"textarea":case"file":return t.querySelector(`.${l.popup} > .${l[e]}`);case"checkbox":return t.querySelector(`.${l.popup} > .${l.checkbox} input`);case"radio":return t.querySelector(`.${l.popup} > .${l.radio} input:checked`)||t.querySelector(`.${l.popup} > .${l.radio} input:first-child`);case"range":return t.querySelector(`.${l.popup} > .${l.range} input`);default:return t.querySelector(`.${l.popup} > .${l.input}`)}},Yi=t=>{if(t.focus(),t.type!=="file"){const e=t.value;t.value="",t.value=e}},Ui=(t,e,n)=>{!t||!e||(typeof e=="string"&&(e=e.split(/\s+/).filter(Boolean)),e.forEach(o=>{Array.isArray(t)?t.forEach(s=>{n?s.classList.add(o):s.classList.remove(o)}):n?t.classList.add(o):t.classList.remove(o)}))},E=(t,e)=>{Ui(t,e,!0)},ne=(t,e)=>{Ui(t,e,!1)},ve=(t,e)=>{const n=Array.from(t.children);for(let o=0;o<n.length;o++){const s=n[o];if(s instanceof HTMLElement&&pe(s,e))return s}},Be=(t,e,n)=>{n===`${parseInt(`${n}`)}`&&(n=parseInt(n)),n||parseInt(`${n}`)===0?t.style.setProperty(e,typeof n=="number"?`${n}px`:n):t.style.removeProperty(e)},P=(t,e="flex")=>{t&&(t.style.display=e)},R=t=>{t&&(t.style.display="none")},$o=(t,e="block")=>{t&&new MutationObserver(()=>{Lt(t,t.innerHTML,e)}).observe(t,{childList:!0,subtree:!0})},$s=(t,e,n,o)=>{const s=t.querySelector(e);s&&s.style.setProperty(n,o)},Lt=(t,e,n="flex")=>{e?P(t,n):R(t)},K=t=>!!(t&&(t.offsetWidth||t.offsetHeight||t.getClientRects().length)),Zd=()=>!K(de())&&!K(ze())&&!K(ht()),Jn=t=>t.scrollHeight>t.clientHeight,Jd=(t,e)=>{let n=t;for(;n&&n!==e;){if(Jn(n))return!0;n=n.parentElement}return!1},qi=t=>{const e=window.getComputedStyle(t),n=parseFloat(e.getPropertyValue("animation-duration")||"0"),o=parseFloat(e.getPropertyValue("transition-duration")||"0");return n>0||o>0},Lo=(t,e=!1)=>{const n=_n();n&&K(n)&&(e&&(n.style.transition="none",n.style.width="100%"),setTimeout(()=>{n.style.transition=`width ${t/1e3}s linear`,n.style.width="0%"},10))},ef=()=>{const t=_n();if(!t)return;const e=parseInt(window.getComputedStyle(t).width);t.style.removeProperty("transition"),t.style.width="100%";const n=parseInt(window.getComputedStyle(t).width),o=e/n*100;t.style.width=`${o}%`},tf=()=>typeof window>"u"||typeof document>"u",nf=`
<div aria-labelledby="${l.title}" aria-describedby="${l["html-container"]}" class="${l.popup}" tabindex="-1">
<button type="button" class="${l.close}"></button>
<ul class="${l["progress-steps"]}"></ul>
<div class="${l.icon}"></div>
<img class="${l.image}" />
<h2 class="${l.title}" id="${l.title}"></h2>
<div class="${l["html-container"]}" id="${l["html-container"]}"></div>
<input class="${l.input}" id="${l.input}" />
<input type="file" class="${l.file}" />
<div class="${l.range}">
<input type="range" />
<output></output>
</div>
<select class="${l.select}" id="${l.select}"></select>
<div class="${l.radio}"></div>
<label class="${l.checkbox}">
<input type="checkbox" id="${l.checkbox}" />
<span class="${l.label}"></span>
</label>
<textarea class="${l.textarea}" id="${l.textarea}"></textarea>
<div class="${l["validation-message"]}" id="${l["validation-message"]}"></div>
<div class="${l.actions}">
<div class="${l.loader}"></div>
<button type="button" class="${l.confirm}"></button>
<button type="button" class="${l.deny}"></button>
<button type="button" class="${l.cancel}"></button>
</div>
<div class="${l.footer}"></div>
<div class="${l["timer-progress-bar-container"]}">
<div class="${l["timer-progress-bar"]}"></div>
</div>
</div>
`.replace(/(^|\n)\s*/g,""),of=()=>{const t=F();return t?(t.remove(),ne([document.documentElement,document.body],[l["no-backdrop"],l["toast-shown"],l["has-column"]]),!0):!1},De=()=>{h.currentInstance&&h.currentInstance.resetValidationMessage()},sf=()=>{const t=y();if(!t)return;const e=ve(t,l.input),n=ve(t,l.file),o=t.querySelector(`.${l.range} input`),s=t.querySelector(`.${l.range} output`),i=ve(t,l.select),r=t.querySelector(`.${l.checkbox} input`),a=ve(t,l.textarea);e&&(e.oninput=De),n&&(n.onchange=De),i&&(i.onchange=De),r&&(r.onchange=De),a&&(a.oninput=De),o&&s&&(o.oninput=()=>{De(),s.value=o.value},o.onchange=()=>{De(),s.value=o.value})},rf=t=>{if(typeof t=="string"){const e=document.querySelector(t);if(!e)throw new Error(`Target element "${t}" not found`);return e}return t},af=t=>{const e=y();e&&(e.setAttribute("role",t.toast?"alert":"dialog"),e.setAttribute("aria-live",t.toast?"polite":"assertive"),t.toast||e.setAttribute("aria-modal","true"))},lf=t=>{window.getComputedStyle(t).direction==="rtl"&&(E(F(),l.rtl),h.isRTL=!0)},cf=t=>{const e=of();if(tf()){Fe("SweetAlert2 requires document to initialize");return}const n=document.createElement("div");n.className=l.container,e&&E(n,l["no-transition"]),Z(n,nf),n.dataset.swal2Theme=t.theme;const o=rf(t.target||"body");o.appendChild(n),t.topLayer&&(n.setAttribute("popover",""),n.showPopover()),af(t),lf(o),sf()},No=(t,e)=>{t instanceof HTMLElement?e.appendChild(t):typeof t=="object"?uf(t,e):t&&Z(e,t)},uf=(t,e)=>{"jquery"in t?df(e,t):Z(e,t.toString())},df=(t,e)=>{if(t.textContent="",0 in e)for(let n=0;n in e;n++)t.appendChild(e[n].cloneNode(!0));else t.appendChild(e.cloneNode(!0))},ff=(t,e)=>{const n=$t(),o=pt();!n||!o||(!e.showConfirmButton&&!e.showDenyButton&&!e.showCancelButton?R(n):P(n),X(n,e,"actions"),hf(n,o,e),Z(o,e.loaderHtml||""),X(o,e,"loader"))};function hf(t,e,n){const o=de(),s=ze(),i=ht();!o||!s||!i||(zn(o,"confirm",n),zn(s,"deny",n),zn(i,"cancel",n),pf(o,s,i,n),n.reverseButtons&&(n.toast?(t.insertBefore(i,o),t.insertBefore(s,o)):(t.insertBefore(i,e),t.insertBefore(s,e),t.insertBefore(o,e))))}function pf(t,e,n,o){if(!o.buttonsStyling){ne([t,e,n],l.styled);return}E([t,e,n],l.styled),o.confirmButtonColor&&t.style.setProperty("--swal2-confirm-button-background-color",o.confirmButtonColor),o.denyButtonColor&&e.style.setProperty("--swal2-deny-button-background-color",o.denyButtonColor),o.cancelButtonColor&&n.style.setProperty("--swal2-cancel-button-background-color",o.cancelButtonColor),Fn(t),Fn(e),Fn(n)}function Fn(t){const e=window.getComputedStyle(t);if(e.getPropertyValue("--swal2-action-button-focus-box-shadow"))return;const n=e.backgroundColor.replace(/rgba?\((\d+), (\d+), (\d+).*/,"rgba($1, $2, $3, 0.5)");t.style.setProperty("--swal2-action-button-focus-box-shadow",e.getPropertyValue("--swal2-outline").replace(/ rgba\(.*/,` ${n}`))}function zn(t,e,n){const o=yo(e);Lt(t,n[`show${o}Button`],"inline-block"),Z(t,n[`${e}ButtonText`]||""),t.setAttribute("aria-label",n[`${e}ButtonAriaLabel`]||""),t.className=l[e],X(t,n,`${e}Button`)}const mf=(t,e)=>{const n=ko();n&&(Z(n,e.closeButtonHtml||""),X(n,e,"closeButton"),Lt(n,e.showCloseButton),n.setAttribute("aria-label",e.closeButtonAriaLabel||""))},gf=(t,e)=>{const n=F();n&&(wf(n,e.backdrop),bf(n,e.position),vf(n,e.grow),X(n,e,"container"))};function wf(t,e){typeof e=="string"?t.style.background=e:e||E([document.documentElement,document.body],l["no-backdrop"])}function bf(t,e){e&&(e in l?E(t,l[e]):(W('The "position" parameter is not valid, defaulting to "center"'),E(t,l.center)))}function vf(t,e){e&&E(t,l[`grow-${e}`])}var O={innerParams:new WeakMap,domCache:new WeakMap};const _f=["input","file","range","select","radio","checkbox","textarea"],Ef=(t,e)=>{const n=y();if(!n)return;const o=O.innerParams.get(t),s=!o||e.input!==o.input;_f.forEach(i=>{const r=ve(n,l[i]);r&&(Tf(i,e.inputAttributes),r.className=l[i],s&&R(r))}),e.input&&(s&&yf(e),Cf(e))},yf=t=>{if(!t.input)return;if(!L[t.input]){Fe(`Unexpected type of input! Expected ${Object.keys(L).join(" | ")}, got "${t.input}"`);return}const e=Gi(t.input);if(!e)return;const n=L[t.input](e,t);P(e),t.inputAutoFocus&&setTimeout(()=>{Yi(n)})},Af=t=>{for(let e=0;e<t.attributes.length;e++){const n=t.attributes[e].name;["id","type","value","style"].includes(n)||t.removeAttribute(n)}},Tf=(t,e)=>{const n=y();if(!n)return;const o=yn(n,t);if(o){Af(o);for(const s in e)o.setAttribute(s,e[s])}},Cf=t=>{if(!t.input)return;const e=Gi(t.input);e&&X(e,t,"input")},Do=(t,e)=>{!t.placeholder&&e.inputPlaceholder&&(t.placeholder=e.inputPlaceholder)},Nt=(t,e,n)=>{if(n.inputLabel){const o=document.createElement("label"),s=l["input-label"];o.setAttribute("for",t.id),o.className=s,typeof n.customClass=="object"&&E(o,n.customClass.inputLabel),o.innerText=n.inputLabel,e.insertAdjacentElement("beforebegin",o)}},Gi=t=>{const e=y();if(e)return ve(e,l[t]||l.input)},tn=(t,e)=>{["string","number"].includes(typeof e)?t.value=`${e}`:To(e)||W(`Unexpected type of inputValue! Expected "string", "number" or "Line truncated
${t.animation?'<div class="swal2-success-circular-line-left"></div>':""}
<span class="swal2-success-line-tip"></span> <span class="swal2-success-line-long"></span>
<div class="swal2-success-ring"></div>
${t.animation?'<div class="swal2-success-fix"></div>':""}
${t.animation?'<div class="swal2-success-circular-line-right"></div>':""}
`,$f=`
<span class="swal2-x-mark">
<span class="swal2-x-mark-line-left"></span>
<span class="swal2-x-mark-line-right"></span>
</span>
`,Ns=(t,e)=>{if(!e.icon&&!e.iconHtml)return;let n=t.innerHTML,o="";e.iconHtml?o=Ds(e.iconHtml):e.icon==="success"?(o=xf(e),n=n.replace(/ style=".*?"/g,"")):e.icon==="error"?o=$f:e.icon&&(o=Ds({question:"?",warning:"!",info:"i"}[e.icon])),n.trim()!==o.trim()&&Z(t,o)},Lf=(t,e)=>{if(e.iconColor){t.style.color=e.iconColor,t.style.borderColor=e.iconColor;for(const n of[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"])$s(t,n,"background-color",e.iconColor);$s(t,".swal2-success-ring","border-color",e.iconColor)}},Ds=t=>`<div class="${l["icon-content"]}">${t}</div>`,Nf=(t,e)=>{const n=zi();if(n){if(!e.imageUrl){R(n);return}P(n,""),n.setAttribute("src",e.imageUrl),n.setAttribute("alt",e.imageAlt||""),Be(n,"width",e.imageWidth),Be(n,"height",e.imageHeight),n.className=l.image,X(n,e,"image")}};let Io=!1,Qi=0,Zi=0,Ji=0,er=0;const Df=t=>{t.addEventListener("mousedown",nn),document.body.addEventListener("mousemove",on),t.addEventListener("mouseup",sn),t.addEventListener("touchstart",nn),document.body.addEventListener("touchmove",on),t.addEventListener("touchend",sn)},If=t=>{t.removeEventListener("mousedown",nn),document.body.removeEventListener("mousemove",on),t.removeEventListener("mouseup",sn),t.removeEventListener("touchstart",nn),document.body.removeEventListener("touchmove",on),t.removeEventListener("touchend",sn)},nn=t=>{const e=y();if(!e)return;const n=ft();if(t.target===e||n&&n.contains(t.target)){Io=!0;const o=tr(t);Qi=o.clientX,Zi=o.clientY,Ji=parseInt(e.style.insetInlineStart)||0,er=parseInt(e.style.insetBlockStart)||0,E(e,"swal2-dragging")}},on=t=>{const e=y();if(e&&Io){let{clientX:n,clientY:o}=tr(t);const s=n-Qi;e.style.insetInlineStart=`${Ji+(h.isRTL?-s:s)}px`,e.style.insetBlockStart=`${er+(o-Zi)}px`}},sn=()=>{const t=y();Io=!1,ne(t,"swal2-dragging")},tr=t=>{let e=0,n=0;return t.type.startsWith("mouse")?(e=t.clientX,n=t.clientY):t.type.startsWith("touch")&&(e=t.touches[0].clientX,n=t.touches[0].clientY),{clientX:e,clientY:n}},Pf=(t,e)=>{const n=F(),o=y();if(!(!n||!o)){if(e.toast){Be(n,"width",e.width),o.style.width="100%";const s=pt();s&&o.insertBefore(s,ft())}else Be(o,"width",e.width);Be(o,"padding",e.padding),e.color&&(o.style.color=e.color),e.background&&(o.style.background=e.background),R(vn()),Mf(o,e),e.draggable&&!e.toast?(E(o,l.draggable),Df(o)):(ne(o,l.draggable),If(o))}},Mf=(t,e)=>{const n=e.showClass||{};t.className=`${l.popup} ${K(t)?n.popup:""}`,e.toast?(E([document.documentElement,document.body],l["toast-shown"]),E(t,l.toast)):E(t,l.modal),X(t,e,"popup"),typeof e.customClass=="string"&&E(t,e.customClass),e.icon&&E(t,l[`icon-${e.icon}`])},Bf=(t,e)=>{const n=Oo();if(!n)return;const{progressSteps:o,currentProgressStep:s}=e;if(!o||o.length===0||s===void 0){R(n);return}P(n),n.textContent="",s>=o.length&&W("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),o.forEach((i,r)=>{const a=Rf(i);if(n.appendChild(a),r===s&&E(a,l["active-progress-step"]),r!==o.length-1){const c=Vf(e);n.appendChild(c)}})},Rf=t=>{const e=document.createElement("li");return E(e,l["progress-step"]),Z(e,t),e},Vf=t=>{const e=document.createElement("li");return E(e,l["progress-step-line"]),t.progressStepsDistance&&Be(e,"width",t.progressStepsDistance),e},Hf=(t,e)=>{const n=Fi();n&&($o(n),Lt(n,!!(e.title||e.titleText),"block"),e.title&&No(e.title,n),e.titleText&&(n.innerText=e.titleText),X(n,e,"title"))},nr=(t,e)=>{var n;Pf(t,e),gf(t,e),Bf(t,e),Sf(t,e),Nf(t,e),Hf(t,e),mf(t,e),Of(t,e),ff(t,e),kf(t,e);const o=y();typeof e.didRender=="function"&&o&&e.didRender(o),(n=h.eventEmitter)===null||n===void 0||n.emit("didRender",o)},jf=()=>K(y()),or=()=>{var t;return(t=de())===null||t===void 0?void 0:t.click()},Wf=()=>{var t;return(t=ze())===null||t===void 0?void 0:t.click()},Ff=()=>{var t;return(t=ht())===null||t===void 0?void 0:t.click()},mt=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),sr=t=>{if(t.keydownTarget&&t.keydownHandlerAdded&&t.keydownHandler){const e=t.keydownHandler;t.keydownTarget.removeEventListener("keydown",e,{capture:t.keydownListenerCapture}),t.keydownHandlerAdded=!1}},zf=(t,e,n)=>{if(sr(t),!e.toast){const o=i=>Yf(e,i,n);t.keydownHandler=o;const s=e.keydownListenerCapture?window:y();if(s){t.keydownTarget=s,t.keydownListenerCapture=e.keydownListenerCapture;const i=o;t.keydownTarget.addEventListener("keydown",i,{capture:t.keydownListenerCapture}),t.keydownHandlerAdded=!0}}},eo=(t,e)=>{var n;const o=So();if(o.length){t=t+e,t===-2&&(t=o.length-1),t===o.length?t=0:t===-1&&(t=o.length-1),o[t].focus();return}(n=y())===null||n===void 0||n.focus()},ir=["ArrowRight","ArrowDown"],Kf=["ArrowLeft","ArrowUp"],Yf=(t,e,n)=>{t&&(e.isComposing||e.keyCode===229||(t.stopKeydownPropagation&&e.stopPropagation(),e.key==="Enter"?Uf(e,t):e.key==="Tab"?qf(e):[...ir,...Kf].includes(e.key)?Gf(e.key):e.key==="Escape"&&Xf(e,t,n)))},Uf=(t,e)=>{if(!bn(e.allowEnterKey))reLine truncated
showLoaderOnConfirm should be used together with preConfirm, see usage example:
https://sweetalert2.github.io/#ajax-request`),bp(t),typeof t.title=="string"&&(t.title=t.title.split(`
`).join("<br />")),cf(t)}let ae;var Yt=new WeakMap;class N{constructor(...e){if(Vd(this,Yt,Promise.resolve({isConfirmed:!1,isDenied:!1,isDismissed:!0})),typeof window>"u")return;ae=this;const n=Object.freeze(this.constructor.argsToParams(e));this.params=n,this.isAwaitingPromise=!1,Hd(Yt,this,this._main(ae.params))}_main(e,n={}){if(Cr(Object.assign({},n,e)),h.currentInstance){const i=rt.swalPromiseResolve.get(h.currentInstance),{isAwaitingPromise:r}=h.currentInstance;h.currentInstance._destroy(),r||i({isDismissed:!0}),xo()&&rr()}h.currentInstance=ae;const o=Ep(e,n);vp(o),Object.freeze(o),h.timeout&&(h.timeout.stop(),delete h.timeout),clearTimeout(h.restoreFocusTimeout);const s=yp(ae);return nr(ae,o),O.innerParams.set(ae,o),_p(ae,s,o)}then(e){return Ss(Yt,this).then(e)}finally(e){return Ss(Yt,this).finally(e)}}const _p=(t,e,n)=>new Promise((o,s)=>{const i=r=>{t.close({isDismissed:!0,dismiss:r,isConfirmed:!1,isDenied:!1})};rt.swalPromiseResolve.set(t,o),rt.swalPromiseReject.set(t,s),e.confirmButton.onclick=()=>{yh(t)},e.denyButton.onclick=()=>{Ah(t)},e.cancelButton.onclick=()=>{Th(t,i)},e.closeButton.onclick=()=>{i(mt.close)},Mh(n,e,i),zf(h,n,i),hh(t,n),hp(n),Ap(h,n,i),Tp(e,n),setTimeout(()=>{e.container.scrollTop=0})}),Ep=(t,e)=>{const n=sp(t),o=Object.assign({},Ee,e,n,t);return o.showClass=Object.assign({},Ee.showClass,o.showClass),o.hideClass=Object.assign({},Ee.hideClass,o.hideClass),o.animation===!1&&(o.showClass={backdrop:"swal2-noanimation"},o.hideClass={}),o},yp=t=>{const e={popup:y(),container:F(),actions:$t(),confirmButton:de(),denyButton:ze(),cancelButton:ht(),loader:pt(),closeButton:ko(),validationMessage:vn(),progressSteps:Oo()};return O.domCache.set(t,e),e},Ap=(t,e,n)=>{const o=_n();R(o),e.timer&&(t.timeout=new op(()=>{n("timer"),delete t.timeout},e.timer),e.timerProgressBar&&o&&(P(o),X(o,e,"timerProgressBar"),setTimeout(()=>{t.timeout&&t.timeout.running&&Lo(e.timer)})))},Tp=(t,e)=>{if(!e.toast){if(!bn(e.allowEnterKey)){Wi("allowEnterKey"),kp();return}Cp(t)||Op(t,e)||eo(-1,1)}},Cp=t=>{const e=Array.from(t.popup.querySelectorAll("[autofocus]"));for(const n of e)if(n instanceof HTMLElement&&K(n))return n.focus(),!0;return!1},Op=(t,e)=>e.focusDeny&&K(t.denyButton)?(t.denyButton.focus(),!0):e.focusCancel&&K(t.cancelButton)?(t.cancelButton.focus(),!0):e.focusConfirm&&K(t.confirmButton)?(t.confirmButton.focus(),!0):!1,kp=()=>{document.activeElement instanceof HTMLElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur()};N.prototype.disableButtons=wr;N.prototype.enableButtons=gr;N.prototype.getInput=hr;N.prototype.disableInput=vr;N.prototype.enableInput=br;N.prototype.hideLoading=an;N.prototype.disableLoading=an;N.prototype.showValidationMessage=_r;N.prototype.resetValidationMessage=Er;N.prototype.close=_e;N.prototype.closePopup=_e;N.prototype.closeModal=_e;N.prototype.closeToast=_e;N.prototype.rejectPromise=cr;N.prototype.update=Or;N.prototype._destroy=kr;Object.assign(N,np);Object.keys(Ph).forEach(t=>{N[t]=function(...e){if(ae&&ae[t])return ae[t](...e)}});N.DismissReason=mt;N.version="11.26.17";const no=N;no.default=no;typeof document<"u"&&(function(t,e){var n=t.createElement("style");if(t.getElementsByTagName("head")[0].appendChild(n),n.styleSheet)n.styleSheet.disabled||(n.styleSheet.cssText=e);else try{n.innerHTML=e}catch{n.innerText=e}})(document,':root{--swal2-outline: 0 0 0 3px rgba(100, 150, 200, 0.5);--swal2-container-padding: 0.625em;--swal2-backdrop: rgba(0, 0, 0, 0.4);--swal2-backdrop-transition: background-color 0.15s;--swal2-width: 32em;--swal2-padding: 0 0 1.25em;--swal2-border: none;--swal2-border-radius: 0.3125rem;--swal2-background: white;--swal2-color: #545454;--swal2-show-animation: swal2-show 0.3s;--swal2-hide-animation: swal2-hide 0.15s forwards;--swal2-icon-zoom: 1;--swal2-icon-animations: true;--swal2-title-padding: 0.8em 1em 0;--swal2-html-container-padding: 1em 1.6em 0.3em;--swal2-input-border: 1px solid #d9d9d9;--swal2-input-border-radius: 0.1875em;--swal2-input-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px transparent;--swal2-input-background: transparent;--swal2-input-transition: border-color 0.2s, box-shadow 0.2s;--swal2-input-hover-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px transparent;--swal2-input-focus-border: 1px solid #b4dbed;--swal2-input-focus-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px rgba(100, 150, 200, 0.5);--swal2-progress-step-background: #add8e6;--swal2-validation-message-background: #f0f0f0;--swal2-validation-message-color: #666;--swal2-footer-border-color: #eee;--swal2-footer-background: transparent;--swal2-footer-color: inherit;--swal2-timer-progress-bar-background: rgba(0, 0, 0, 0.3);--swal2-close-button-position: initial;--swal2-close-button-inset: auto;--swal2-close-button-font-size: 2.5em;--swal2-close-button-color: #ccc;--swal2-close-button-transition: color 0.2s, box-shadow 0.2s;--swal2-close-button-outline: initial;--swal2-close-button-box-shadow: inset 0 0 0 3px transparent; Line truncated
+3 -5
View File
@@ -3,13 +3,11 @@
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" /> <link rel="icon" type="image/svg+xml" href="/logo.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>OpenVPN Controller</title> <title>OpenVPN Controller</title>
<script type="module" crossorigin src="/assets/index-BsVv6gaD.js"></script> <script type="module" crossorigin src="/assets/index-CrxOIffM.js"></script>
<link rel="modulepreload" crossorigin href="/assets/vendor-charts-Bcjh2pZL.js"> <link rel="stylesheet" crossorigin href="/assets/index-BZ2WYZTa.css">
<link rel="modulepreload" crossorigin href="/assets/vendor-ui-jlFFG6nm.js">
<link rel="stylesheet" crossorigin href="/assets/index-b8NXKHGm.css">
</head> </head>
<body> <body>
-1
View File
@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>

Before

Width:  |  Height:  |  Size: 1.5 KiB