@drocketxx/pm2me 1.1.11 โ 1.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/backend/db/index.js +6 -0
- package/backend/public/assets/{index-1QKz34a5.js โ index-I-oE5bOj.js} +10 -10
- package/backend/public/index.html +1 -1
- package/backend/routes/api.js +24 -3
- package/package.json +1 -1
- package/apps/Delete-Test-App/README.md +0 -1
- package/apps/Delete-Test-App/dist/server.js +0 -57
- package/apps/Delete-Test-App/package.json +0 -19
- package/apps/Delete-Test-App/src/server.ts +0 -33
- package/apps/Delete-Test-App/tsconfig.json +0 -15
- package/apps/Delete-Test-App-2/README.md +0 -1
- package/apps/Delete-Test-App-2/dist/server.js +0 -57
- package/apps/Delete-Test-App-2/package.json +0 -19
- package/apps/Delete-Test-App-2/src/server.ts +0 -33
- package/apps/Delete-Test-App-2/tsconfig.json +0 -15
- package/apps/Delete-Test-App-2_deploy.log +0 -12
- package/apps/Delete-Test-App_deploy.log +0 -12
- package/apps/PM2Me-main/README.md +0 -236
- package/apps/PM2Me-main/backend/app.js +0 -109
- package/apps/PM2Me-main/backend/db/index.js +0 -40
- package/apps/PM2Me-main/backend/nodemon.json +0 -10
- package/apps/PM2Me-main/backend/package.json +0 -31
- package/apps/PM2Me-main/backend/public/assets/index-DZ4rSpP9.css +0 -1
- package/apps/PM2Me-main/backend/public/assets/index-KLmI9qSM.js +0 -13
- package/apps/PM2Me-main/backend/public/icon.png +0 -0
- package/apps/PM2Me-main/backend/public/index.html +0 -14
- package/apps/PM2Me-main/backend/public/vite.svg +0 -1
- package/apps/PM2Me-main/backend/routes/api.js +0 -932
- package/apps/PM2Me-main/backend/routes/auth.js +0 -44
- package/apps/PM2Me-main/backend/services/gitService.js +0 -110
- package/apps/PM2Me-main/backend/services/notificationService.js +0 -48
- package/apps/PM2Me-main/backend/services/pm2Service.js +0 -84
- package/apps/PM2Me-main/backend/services/systemService.js +0 -113
- package/apps/PM2Me-main/c:VsCodemyPM2Metmp_old_dashboard.vue +0 -390
- package/apps/PM2Me-main/package.json +0 -21
- package/apps/PM2Me-main/screenshot/001.png +0 -0
- package/apps/PM2Me-main/test_db.js +0 -8
- package/apps/PM2Me-main/tmp_old_dashboard.vue +0 -390
- package/apps/PM2Me-main_deploy.log +0 -25
- package/apps/PM2Me-test/README.md +0 -1
- package/apps/PM2Me-test/dist/server.js +0 -63
- package/apps/PM2Me-test/package.json +0 -19
- package/apps/PM2Me-test/src/server.ts +0 -33
- package/apps/PM2Me-test/tsconfig.json +0 -15
- package/apps/PM2Me-test-main/README.md +0 -1
- package/apps/PM2Me-test-main/dist/server.js +0 -63
- package/apps/PM2Me-test-main/package.json +0 -19
- package/apps/PM2Me-test-main/src/server.ts +0 -33
- package/apps/PM2Me-test-main/tsconfig.json +0 -15
- package/apps/PM2Me-test-main_deploy.log +0 -24
- package/apps/PM2Me-test-uat/README.md +0 -1
- package/apps/PM2Me-test-uat/dist/server.js +0 -63
- package/apps/PM2Me-test-uat/package.json +0 -19
- package/apps/PM2Me-test-uat/src/server.ts +0 -33
- package/apps/PM2Me-test-uat/tsconfig.json +0 -15
- package/apps/PM2Me-test-uat-updated/README.md +0 -1
- package/apps/PM2Me-test-uat-updated/dist/server.js +0 -63
- package/apps/PM2Me-test-uat-updated/package.json +0 -19
- package/apps/PM2Me-test-uat-updated/src/server.ts +0 -33
- package/apps/PM2Me-test-uat-updated/tsconfig.json +0 -15
- package/apps/PM2Me-test-uat-updated_deploy.log +0 -24
- package/apps/PM2Me-test-uat2/README.md +0 -1
- package/apps/PM2Me-test-uat2/dist/server.js +0 -63
- package/apps/PM2Me-test-uat2/package.json +0 -19
- package/apps/PM2Me-test-uat2/src/server.ts +0 -33
- package/apps/PM2Me-test-uat2/tsconfig.json +0 -15
- package/apps/PM2Me-test-uat2_deploy.log +0 -25
- package/apps/PM2Me-test-uat_deploy.log +0 -24
- package/apps/PM2Me-test_deploy.log +0 -24
- package/apps/PM2Me-test_health.log +0 -4
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))n(o);new MutationObserver(o=>{for(const r of o)if(r.type==="childList")for(const l of r.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&n(l)}).observe(document,{childList:!0,subtree:!0});function s(o){const r={};return o.integrity&&(r.integrity=o.integrity),o.referrerPolicy&&(r.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?r.credentials="include":o.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function n(o){if(o.ep)return;o.ep=!0;const r=s(o);fetch(o.href,r)}})();function Ao(e){const t=Object.create(null);for(const s of e.split(","))t[s]=1;return s=>s in t}const ge={},as=[],bt=()=>{},ui=()=>!1,xn=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),To=e=>e.startsWith("onUpdate:"),Oe=Object.assign,$o=(e,t)=>{const s=e.indexOf(t);s>-1&&e.splice(s,1)},Ql=Object.prototype.hasOwnProperty,de=(e,t)=>Ql.call(e,t),X=Array.isArray,cs=e=>qs(e)==="[object Map]",vs=e=>qs(e)==="[object Set]",tr=e=>qs(e)==="[object Date]",se=e=>typeof e=="function",Ae=e=>typeof e=="string",yt=e=>typeof e=="symbol",fe=e=>e!==null&&typeof e=="object",di=e=>(fe(e)||se(e))&&se(e.then)&&se(e.catch),fi=Object.prototype.toString,qs=e=>fi.call(e),Zl=e=>qs(e).slice(8,-1),hi=e=>qs(e)==="[object Object]",Ro=e=>Ae(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,$s=Ao(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),yn=e=>{const t=Object.create(null);return(s=>t[s]||(t[s]=e(s)))},ea=/-\w/g,nt=yn(e=>e.replace(ea,t=>t.slice(1).toUpperCase())),ta=/\B([A-Z])/g,Kt=yn(e=>e.replace(ta,"-$1").toLowerCase()),wn=yn(e=>e.charAt(0).toUpperCase()+e.slice(1)),Ln=yn(e=>e?`on${wn(e)}`:""),Ht=(e,t)=>!Object.is(e,t),en=(e,...t)=>{for(let s=0;s<e.length;s++)e[s](...t)},pi=(e,t,s,n=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:s})},_n=e=>{const t=parseFloat(e);return isNaN(t)?e:t},sa=e=>{const t=Ae(e)?Number(e):NaN;return isNaN(t)?e:t};let sr;const kn=()=>sr||(sr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Mt(e){if(X(e)){const t={};for(let s=0;s<e.length;s++){const n=e[s],o=Ae(n)?ia(n):Mt(n);if(o)for(const r in o)t[r]=o[r]}return t}else if(Ae(e)||fe(e))return e}const na=/;(?![^(]*\))/g,oa=/:([^]+)/,ra=/\/\*[^]*?\*\//g;function ia(e){const t={};return e.replace(ra,"").split(na).forEach(s=>{if(s){const n=s.split(oa);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function re(e){let t="";if(Ae(e))t=e;else if(X(e))for(let s=0;s<e.length;s++){const n=re(e[s]);n&&(t+=n+" ")}else if(fe(e))for(const s in e)e[s]&&(t+=s+" ");return t.trim()}const la="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",aa=Ao(la);function mi(e){return!!e||e===""}function ca(e,t){if(e.length!==t.length)return!1;let s=!0;for(let n=0;s&&n<e.length;n++)s=zt(e[n],t[n]);return s}function zt(e,t){if(e===t)return!0;let s=tr(e),n=tr(t);if(s||n)return s&&n?e.getTime()===t.getTime():!1;if(s=yt(e),n=yt(t),s||n)return e===t;if(s=X(e),n=X(t),s||n)return s&&n?ca(e,t):!1;if(s=fe(e),n=fe(t),s||n){if(!s||!n)return!1;const o=Object.keys(e).length,r=Object.keys(t).length;if(o!==r)return!1;for(const l in e){const a=e.hasOwnProperty(l),c=t.hasOwnProperty(l);if(a&&!c||!a&&c||!zt(e[l],t[l]))return!1}}return String(e)===String(t)}function Mo(e,t){return e.findIndex(s=>zt(s,t))}const gi=e=>!!(e&&e.__v_isRef===!0),H=e=>Ae(e)?e:e==null?"":X(e)||fe(e)&&(e.toString===fi||!se(e.toString))?gi(e)?H(e.value):JSON.stringify(e,vi,2):String(e),vi=(e,t)=>gi(t)?vi(e,t.value):cs(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((s,[n,o],r)=>(s[Dn(n,r)+" =>"]=o,s),{})}:vs(t)?{[`Set(${t.size})`]:[...t.values()].map(s=>Dn(s))}:yt(t)?Dn(t):fe(t)&&!X(t)&&!hi(t)?String(t):t,Dn=(e,t="")=>{var s;return yt(e)?`Symbol(${(s=e.description)!=null?s:t})`:e};let Ke;class ua{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.__v_skip=!0,this.parent=Ke,!t&&Ke&&(this.index=(Ke.scopes||(Ke.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,s;if(this.scopes)for(t=0,s=this.scopes.length;t<s;t++)this.scopes[t].pause();for(t=0,s=this.effects.length;t<s;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,s;if(this.scopes)for(t=0,s=this.scopes.length;t<s;t++)this.scopes[t].resume();for(t=0,s=this.effects.length;t<s;t++)this.effects[t].resume()}}run(t){if(this._active){const s=Ke;try{return Ke=this,t()}finally{Ke=s}}}on(){++this._on===1&&(this.prevScope=Ke,Ke=this)}off(){this._on>0&&--this._on===0&&(Ke=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let s,n;for(s=0,n=this.effects.length;s<n;s++)this.effects[s].stop();for(this.effects.length=0,s=0,n=this.cleanups.length;s<n;s++)this.cleanups[s]();if(this.cleanups.length=0,this.scopes){for(s=0,n=this.scopes.length;s<n;s++)this.scopes[s].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const o=this.parent.scopes.pop();o&&o!==this&&(this.parent.scopes[this.index]=o,o.index=this.index)}this.parent=void 0}}}function da(){return Ke}let xe;const jn=new WeakSet;class bi{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Ke&&Ke.active&&Ke.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,jn.has(this)&&(jn.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||yi(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,nr(this),wi(this);const t=xe,s=it;xe=this,it=!0;try{return this.fn()}finally{_i(this),xe=t,it=s,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)No(t);this.deps=this.depsTail=void 0,nr(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?jn.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){to(this)&&this.run()}get dirty(){return to(this)}}let xi=0,Rs,Ms;function yi(e,t=!1){if(e.flags|=8,t){e.next=Ms,Ms=e;return}e.next=Rs,Rs=e}function Oo(){xi++}function Bo(){if(--xi>0)return;if(Ms){let t=Ms;for(Ms=void 0;t;){const s=t.next;t.next=void 0,t.flags&=-9,t=s}}let e;for(;Rs;){let t=Rs;for(Rs=void 0;t;){const s=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(n){e||(e=n)}t=s}}if(e)throw e}function wi(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function _i(e){let t,s=e.depsTail,n=s;for(;n;){const o=n.prevDep;n.version===-1?(n===s&&(s=o),No(n),fa(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=o}e.deps=t,e.depsTail=s}function to(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(ki(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function ki(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Ls)||(e.globalVersion=Ls,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!to(e))))return;e.flags|=2;const t=e.dep,s=xe,n=it;xe=e,it=!0;try{wi(e);const o=e.fn(e._value);(t.version===0||Ht(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{xe=s,it=n,_i(e),e.flags&=-3}}function No(e,t=!1){const{dep:s,prevSub:n,nextSub:o}=e;if(n&&(n.nextSub=o,e.prevSub=void 0),o&&(o.prevSub=n,e.nextSub=void 0),s.subs===e&&(s.subs=n,!n&&s.computed)){s.computed.flags&=-5;for(let r=s.computed.deps;r;r=r.nextDep)No(r,!0)}!t&&!--s.sc&&s.map&&s.map.delete(s.key)}function fa(e){const{prevDep:t,nextDep:s}=e;t&&(t.nextDep=s,e.prevDep=void 0),s&&(s.prevDep=t,e.nextDep=void 0)}let it=!0;const Ci=[];function Ot(){Ci.push(it),it=!1}function Bt(){const e=Ci.pop();it=e===void 0?!0:e}function nr(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const s=xe;xe=void 0;try{t()}finally{xe=s}}}let Ls=0;class ha{constructor(t,s){this.sub=t,this.dep=s,this.version=s.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Po{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!xe||!it||xe===this.computed)return;let s=this.activeLink;if(s===void 0||s.sub!==xe)s=this.activeLink=new ha(xe,this),xe.deps?(s.prevDep=xe.depsTail,xe.depsTail.nextDep=s,xe.depsTail=s):xe.deps=xe.depsTail=s,Si(s);else if(s.version===-1&&(s.version=this.version,s.nextDep)){const n=s.nextDep;n.prevDep=s.prevDep,s.prevDep&&(s.prevDep.nextDep=n),s.prevDep=xe.depsTail,s.nextDep=void 0,xe.depsTail.nextDep=s,xe.depsTail=s,xe.deps===s&&(xe.deps=n)}return s}trigger(t){this.version++,Ls++,this.notify(t)}notify(t){Oo();try{for(let s=this.subs;s;s=s.prevSub)s.sub.notify()&&s.sub.dep.notify()}finally{Bo()}}}function Si(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let n=t.deps;n;n=n.nextDep)Si(n)}const s=e.dep.subs;s!==e&&(e.prevSub=s,s&&(s.nextSub=e)),e.dep.subs=e}}const so=new WeakMap,ts=Symbol(""),no=Symbol(""),Ds=Symbol("");function Ne(e,t,s){if(it&&xe){let n=so.get(e);n||so.set(e,n=new Map);let o=n.get(s);o||(n.set(s,o=new Po),o.map=n,o.key=s),o.track()}}function At(e,t,s,n,o,r){const l=so.get(e);if(!l){Ls++;return}const a=c=>{c&&c.trigger()};if(Oo(),t==="clear")l.forEach(a);else{const c=X(e),p=c&&Ro(s);if(c&&s==="length"){const d=Number(n);l.forEach((m,b)=>{(b==="length"||b===Ds||!yt(b)&&b>=d)&&a(m)})}else switch((s!==void 0||l.has(void 0))&&a(l.get(s)),p&&a(l.get(Ds)),t){case"add":c?p&&a(l.get("length")):(a(l.get(ts)),cs(e)&&a(l.get(no)));break;case"delete":c||(a(l.get(ts)),cs(e)&&a(l.get(no)));break;case"set":cs(e)&&a(l.get(ts));break}}Bo()}function rs(e){const t=ce(e);return t===e?t:(Ne(t,"iterate",Ds),tt(e)?t:t.map(at))}function Cn(e){return Ne(e=ce(e),"iterate",Ds),e}function Dt(e,t){return Nt(e)?hs(ss(e)?at(t):t):at(t)}const pa={__proto__:null,[Symbol.iterator](){return Vn(this,Symbol.iterator,e=>Dt(this,e))},concat(...e){return rs(this).concat(...e.map(t=>X(t)?rs(t):t))},entries(){return Vn(this,"entries",e=>(e[1]=Dt(this,e[1]),e))},every(e,t){return _t(this,"every",e,t,void 0,arguments)},filter(e,t){return _t(this,"filter",e,t,s=>s.map(n=>Dt(this,n)),arguments)},find(e,t){return _t(this,"find",e,t,s=>Dt(this,s),arguments)},findIndex(e,t){return _t(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return _t(this,"findLast",e,t,s=>Dt(this,s),arguments)},findLastIndex(e,t){return _t(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return _t(this,"forEach",e,t,void 0,arguments)},includes(...e){return Hn(this,"includes",e)},indexOf(...e){return Hn(this,"indexOf",e)},join(e){return rs(this).join(e)},lastIndexOf(...e){return Hn(this,"lastIndexOf",e)},map(e,t){return _t(this,"map",e,t,void 0,arguments)},pop(){return ws(this,"pop")},push(...e){return ws(this,"push",e)},reduce(e,...t){return or(this,"reduce",e,t)},reduceRight(e,...t){return or(this,"reduceRight",e,t)},shift(){return ws(this,"shift")},some(e,t){return _t(this,"some",e,t,void 0,arguments)},splice(...e){return ws(this,"splice",e)},toReversed(){return rs(this).toReversed()},toSorted(e){return rs(this).toSorted(e)},toSpliced(...e){return rs(this).toSpliced(...e)},unshift(...e){return ws(this,"unshift",e)},values(){return Vn(this,"values",e=>Dt(this,e))}};function Vn(e,t,s){const n=Cn(e),o=n[t]();return n!==e&&!tt(e)&&(o._next=o.next,o.next=()=>{const r=o._next();return r.done||(r.value=s(r.value)),r}),o}const ma=Array.prototype;function _t(e,t,s,n,o,r){const l=Cn(e),a=l!==e&&!tt(e),c=l[t];if(c!==ma[t]){const m=c.apply(e,r);return a?at(m):m}let p=s;l!==e&&(a?p=function(m,b){return s.call(this,Dt(e,m),b,e)}:s.length>2&&(p=function(m,b){return s.call(this,m,b,e)}));const d=c.call(l,p,n);return a&&o?o(d):d}function or(e,t,s,n){const o=Cn(e);let r=s;return o!==e&&(tt(e)?s.length>3&&(r=function(l,a,c){return s.call(this,l,a,c,e)}):r=function(l,a,c){return s.call(this,l,Dt(e,a),c,e)}),o[t](r,...n)}function Hn(e,t,s){const n=ce(e);Ne(n,"iterate",Ds);const o=n[t](...s);return(o===-1||o===!1)&&Do(s[0])?(s[0]=ce(s[0]),n[t](...s)):o}function ws(e,t,s=[]){Ot(),Oo();const n=ce(e)[t].apply(e,s);return Bo(),Bt(),n}const ga=Ao("__proto__,__v_isRef,__isVue"),Ei=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(yt));function va(e){yt(e)||(e=String(e));const t=ce(this);return Ne(t,"has",e),t.hasOwnProperty(e)}class Ai{constructor(t=!1,s=!1){this._isReadonly=t,this._isShallow=s}get(t,s,n){if(s==="__v_skip")return t.__v_skip;const o=this._isReadonly,r=this._isShallow;if(s==="__v_isReactive")return!o;if(s==="__v_isReadonly")return o;if(s==="__v_isShallow")return r;if(s==="__v_raw")return n===(o?r?Aa:Mi:r?Ri:$i).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(n)?t:void 0;const l=X(t);if(!o){let c;if(l&&(c=pa[s]))return c;if(s==="hasOwnProperty")return va}const a=Reflect.get(t,s,Le(t)?t:n);if((yt(s)?Ei.has(s):ga(s))||(o||Ne(t,"get",s),r))return a;if(Le(a)){const c=l&&Ro(s)?a:a.value;return o&&fe(c)?ro(c):c}return fe(a)?o?ro(a):Sn(a):a}}class Ti extends Ai{constructor(t=!1){super(!1,t)}set(t,s,n,o){let r=t[s];const l=X(t)&&Ro(s);if(!this._isShallow){const p=Nt(r);if(!tt(n)&&!Nt(n)&&(r=ce(r),n=ce(n)),!l&&Le(r)&&!Le(n))return p||(r.value=n),!0}const a=l?Number(s)<t.length:de(t,s),c=Reflect.set(t,s,n,Le(t)?t:o);return t===ce(o)&&(a?Ht(n,r)&&At(t,"set",s,n):At(t,"add",s,n)),c}deleteProperty(t,s){const n=de(t,s);t[s];const o=Reflect.deleteProperty(t,s);return o&&n&&At(t,"delete",s,void 0),o}has(t,s){const n=Reflect.has(t,s);return(!yt(s)||!Ei.has(s))&&Ne(t,"has",s),n}ownKeys(t){return Ne(t,"iterate",X(t)?"length":ts),Reflect.ownKeys(t)}}class ba extends Ai{constructor(t=!1){super(!0,t)}set(t,s){return!0}deleteProperty(t,s){return!0}}const xa=new Ti,ya=new ba,wa=new Ti(!0);const oo=e=>e,Gs=e=>Reflect.getPrototypeOf(e);function _a(e,t,s){return function(...n){const o=this.__v_raw,r=ce(o),l=cs(r),a=e==="entries"||e===Symbol.iterator&&l,c=e==="keys"&&l,p=o[e](...n),d=s?oo:t?hs:at;return!t&&Ne(r,"iterate",c?no:ts),Oe(Object.create(p),{next(){const{value:m,done:b}=p.next();return b?{value:m,done:b}:{value:a?[d(m[0]),d(m[1])]:d(m),done:b}}})}}function Ys(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function ka(e,t){const s={get(o){const r=this.__v_raw,l=ce(r),a=ce(o);e||(Ht(o,a)&&Ne(l,"get",o),Ne(l,"get",a));const{has:c}=Gs(l),p=t?oo:e?hs:at;if(c.call(l,o))return p(r.get(o));if(c.call(l,a))return p(r.get(a));r!==l&&r.get(o)},get size(){const o=this.__v_raw;return!e&&Ne(ce(o),"iterate",ts),o.size},has(o){const r=this.__v_raw,l=ce(r),a=ce(o);return e||(Ht(o,a)&&Ne(l,"has",o),Ne(l,"has",a)),o===a?r.has(o):r.has(o)||r.has(a)},forEach(o,r){const l=this,a=l.__v_raw,c=ce(a),p=t?oo:e?hs:at;return!e&&Ne(c,"iterate",ts),a.forEach((d,m)=>o.call(r,p(d),p(m),l))}};return Oe(s,e?{add:Ys("add"),set:Ys("set"),delete:Ys("delete"),clear:Ys("clear")}:{add(o){!t&&!tt(o)&&!Nt(o)&&(o=ce(o));const r=ce(this);return Gs(r).has.call(r,o)||(r.add(o),At(r,"add",o,o)),this},set(o,r){!t&&!tt(r)&&!Nt(r)&&(r=ce(r));const l=ce(this),{has:a,get:c}=Gs(l);let p=a.call(l,o);p||(o=ce(o),p=a.call(l,o));const d=c.call(l,o);return l.set(o,r),p?Ht(r,d)&&At(l,"set",o,r):At(l,"add",o,r),this},delete(o){const r=ce(this),{has:l,get:a}=Gs(r);let c=l.call(r,o);c||(o=ce(o),c=l.call(r,o)),a&&a.call(r,o);const p=r.delete(o);return c&&At(r,"delete",o,void 0),p},clear(){const o=ce(this),r=o.size!==0,l=o.clear();return r&&At(o,"clear",void 0,void 0),l}}),["keys","values","entries",Symbol.iterator].forEach(o=>{s[o]=_a(o,e,t)}),s}function Io(e,t){const s=ka(e,t);return(n,o,r)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?n:Reflect.get(de(s,o)&&o in n?s:n,o,r)}const Ca={get:Io(!1,!1)},Sa={get:Io(!1,!0)},Ea={get:Io(!0,!1)};const $i=new WeakMap,Ri=new WeakMap,Mi=new WeakMap,Aa=new WeakMap;function Ta(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function $a(e){return e.__v_skip||!Object.isExtensible(e)?0:Ta(Zl(e))}function Sn(e){return Nt(e)?e:Lo(e,!1,xa,Ca,$i)}function Oi(e){return Lo(e,!1,wa,Sa,Ri)}function ro(e){return Lo(e,!0,ya,Ea,Mi)}function Lo(e,t,s,n,o){if(!fe(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const r=$a(e);if(r===0)return e;const l=o.get(e);if(l)return l;const a=new Proxy(e,r===2?n:s);return o.set(e,a),a}function ss(e){return Nt(e)?ss(e.__v_raw):!!(e&&e.__v_isReactive)}function Nt(e){return!!(e&&e.__v_isReadonly)}function tt(e){return!!(e&&e.__v_isShallow)}function Do(e){return e?!!e.__v_raw:!1}function ce(e){const t=e&&e.__v_raw;return t?ce(t):e}function Ra(e){return!de(e,"__v_skip")&&Object.isExtensible(e)&&pi(e,"__v_skip",!0),e}const at=e=>fe(e)?Sn(e):e,hs=e=>fe(e)?ro(e):e;function Le(e){return e?e.__v_isRef===!0:!1}function W(e){return Bi(e,!1)}function Ma(e){return Bi(e,!0)}function Bi(e,t){return Le(e)?e:new Oa(e,t)}class Oa{constructor(t,s){this.dep=new Po,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=s?t:ce(t),this._value=s?t:at(t),this.__v_isShallow=s}get value(){return this.dep.track(),this._value}set value(t){const s=this._rawValue,n=this.__v_isShallow||tt(t)||Nt(t);t=n?t:ce(t),Ht(t,s)&&(this._rawValue=t,this._value=n?t:at(t),this.dep.trigger())}}function us(e){return Le(e)?e.value:e}const Ba={get:(e,t,s)=>t==="__v_raw"?e:us(Reflect.get(e,t,s)),set:(e,t,s,n)=>{const o=e[t];return Le(o)&&!Le(s)?(o.value=s,!0):Reflect.set(e,t,s,n)}};function Ni(e){return ss(e)?e:new Proxy(e,Ba)}class Na{constructor(t,s,n){this.fn=t,this.setter=s,this._value=void 0,this.dep=new Po(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Ls-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!s,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&xe!==this)return yi(this,!0),!0}get value(){const t=this.dep.track();return ki(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Pa(e,t,s=!1){let n,o;return se(e)?n=e:(n=e.get,o=e.set),new Na(n,o,s)}const Js={},un=new WeakMap;let Qt;function Ia(e,t=!1,s=Qt){if(s){let n=un.get(s);n||un.set(s,n=[]),n.push(e)}}function La(e,t,s=ge){const{immediate:n,deep:o,once:r,scheduler:l,augmentJob:a,call:c}=s,p=j=>o?j:tt(j)||o===!1||o===0?Tt(j,1):Tt(j);let d,m,b,y,T=!1,O=!1;if(Le(e)?(m=()=>e.value,T=tt(e)):ss(e)?(m=()=>p(e),T=!0):X(e)?(O=!0,T=e.some(j=>ss(j)||tt(j)),m=()=>e.map(j=>{if(Le(j))return j.value;if(ss(j))return p(j);if(se(j))return c?c(j,2):j()})):se(e)?t?m=c?()=>c(e,2):e:m=()=>{if(b){Ot();try{b()}finally{Bt()}}const j=Qt;Qt=d;try{return c?c(e,3,[y]):e(y)}finally{Qt=j}}:m=bt,t&&o){const j=m,Z=o===!0?1/0:o;m=()=>Tt(j(),Z)}const q=da(),U=()=>{d.stop(),q&&q.active&&$o(q.effects,d)};if(r&&t){const j=t;t=(...Z)=>{j(...Z),U()}}let I=O?new Array(e.length).fill(Js):Js;const F=j=>{if(!(!(d.flags&1)||!d.dirty&&!j))if(t){const Z=d.run();if(o||T||(O?Z.some((K,_)=>Ht(K,I[_])):Ht(Z,I))){b&&b();const K=Qt;Qt=d;try{const _=[Z,I===Js?void 0:O&&I[0]===Js?[]:I,y];I=Z,c?c(t,3,_):t(..._)}finally{Qt=K}}}else d.run()};return a&&a(F),d=new bi(m),d.scheduler=l?()=>l(F,!1):F,y=j=>Ia(j,!1,d),b=d.onStop=()=>{const j=un.get(d);if(j){if(c)c(j,4);else for(const Z of j)Z();un.delete(d)}},t?n?F(!0):I=d.run():l?l(F.bind(null,!0),!0):d.run(),U.pause=d.pause.bind(d),U.resume=d.resume.bind(d),U.stop=U,U}function Tt(e,t=1/0,s){if(t<=0||!fe(e)||e.__v_skip||(s=s||new Map,(s.get(e)||0)>=t))return e;if(s.set(e,t),t--,Le(e))Tt(e.value,t,s);else if(X(e))for(let n=0;n<e.length;n++)Tt(e[n],t,s);else if(vs(e)||cs(e))e.forEach(n=>{Tt(n,t,s)});else if(hi(e)){for(const n in e)Tt(e[n],t,s);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&Tt(e[n],t,s)}return e}function Ws(e,t,s,n){try{return n?e(...n):e()}catch(o){En(o,t,s)}}function ct(e,t,s,n){if(se(e)){const o=Ws(e,t,s,n);return o&&di(o)&&o.catch(r=>{En(r,t,s)}),o}if(X(e)){const o=[];for(let r=0;r<e.length;r++)o.push(ct(e[r],t,s,n));return o}}function En(e,t,s,n=!0){const o=t?t.vnode:null,{errorHandler:r,throwUnhandledErrorInProduction:l}=t&&t.appContext.config||ge;if(t){let a=t.parent;const c=t.proxy,p=`https://vuejs.org/error-reference/#runtime-${s}`;for(;a;){const d=a.ec;if(d){for(let m=0;m<d.length;m++)if(d[m](e,c,p)===!1)return}a=a.parent}if(r){Ot(),Ws(r,null,10,[e,c,p]),Bt();return}}Da(e,s,o,n,l)}function Da(e,t,s,n=!0,o=!1){if(o)throw e;console.error(e)}const He=[];let mt=-1;const ds=[];let jt=null,is=0;const Pi=Promise.resolve();let dn=null;function Rt(e){const t=dn||Pi;return e?t.then(this?e.bind(this):e):t}function ja(e){let t=mt+1,s=He.length;for(;t<s;){const n=t+s>>>1,o=He[n],r=js(o);r<e||r===e&&o.flags&2?t=n+1:s=n}return t}function jo(e){if(!(e.flags&1)){const t=js(e),s=He[He.length-1];!s||!(e.flags&2)&&t>=js(s)?He.push(e):He.splice(ja(t),0,e),e.flags|=1,Ii()}}function Ii(){dn||(dn=Pi.then(Di))}function Va(e){X(e)?ds.push(...e):jt&&e.id===-1?jt.splice(is+1,0,e):e.flags&1||(ds.push(e),e.flags|=1),Ii()}function rr(e,t,s=mt+1){for(;s<He.length;s++){const n=He[s];if(n&&n.flags&2){if(e&&n.id!==e.uid)continue;He.splice(s,1),s--,n.flags&4&&(n.flags&=-2),n(),n.flags&4||(n.flags&=-2)}}}function Li(e){if(ds.length){const t=[...new Set(ds)].sort((s,n)=>js(s)-js(n));if(ds.length=0,jt){jt.push(...t);return}for(jt=t,is=0;is<jt.length;is++){const s=jt[is];s.flags&4&&(s.flags&=-2),s.flags&8||s(),s.flags&=-2}jt=null,is=0}}const js=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Di(e){try{for(mt=0;mt<He.length;mt++){const t=He[mt];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),Ws(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;mt<He.length;mt++){const t=He[mt];t&&(t.flags&=-2)}mt=-1,He.length=0,Li(),dn=null,(He.length||ds.length)&&Di()}}let Ye=null,ji=null;function fn(e){const t=Ye;return Ye=e,ji=e&&e.type.__scopeId||null,t}function io(e,t=Ye,s){if(!t||e._n)return e;const n=(...o)=>{n._d&&mn(-1);const r=fn(t);let l;try{l=e(...o)}finally{fn(r),n._d&&mn(1)}return l};return n._n=!0,n._c=!0,n._d=!0,n}function ke(e,t){if(Ye===null)return e;const s=Mn(Ye),n=e.dirs||(e.dirs=[]);for(let o=0;o<t.length;o++){let[r,l,a,c=ge]=t[o];r&&(se(r)&&(r={mounted:r,updated:r}),r.deep&&Tt(l),n.push({dir:r,instance:s,value:l,oldValue:void 0,arg:a,modifiers:c}))}return e}function Gt(e,t,s,n){const o=e.dirs,r=t&&t.dirs;for(let l=0;l<o.length;l++){const a=o[l];r&&(a.oldValue=r[l].value);let c=a.dir[n];c&&(Ot(),ct(c,s,8,[e.el,a,e,t]),Bt())}}function tn(e,t){if(Pe){let s=Pe.provides;const n=Pe.parent&&Pe.parent.provides;n===s&&(s=Pe.provides=Object.create(n)),s[e]=t}}function lt(e,t,s=!1){const n=vl();if(n||fs){let o=fs?fs._context.provides:n?n.parent==null||n.ce?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides:void 0;if(o&&e in o)return o[e];if(arguments.length>1)return s&&se(t)?t.call(n&&n.proxy):t}}const Ha=Symbol.for("v-scx"),Fa=()=>lt(Ha);function Ft(e,t,s){return Vi(e,t,s)}function Vi(e,t,s=ge){const{immediate:n,deep:o,flush:r,once:l}=s,a=Oe({},s),c=t&&n||!t&&r!=="post";let p;if(Fs){if(r==="sync"){const y=Fa();p=y.__watcherHandles||(y.__watcherHandles=[])}else if(!c){const y=()=>{};return y.stop=bt,y.resume=bt,y.pause=bt,y}}const d=Pe;a.call=(y,T,O)=>ct(y,d,T,O);let m=!1;r==="post"?a.scheduler=y=>{We(y,d&&d.suspense)}:r!=="sync"&&(m=!0,a.scheduler=(y,T)=>{T?y():jo(y)}),a.augmentJob=y=>{t&&(y.flags|=4),m&&(y.flags|=2,d&&(y.id=d.uid,y.i=d))};const b=La(e,t,a);return Fs&&(p?p.push(b):c&&b()),b}function Ua(e,t,s){const n=this.proxy,o=Ae(e)?e.includes(".")?Hi(n,e):()=>n[e]:e.bind(n,n);let r;se(t)?r=t:(r=t.handler,s=t);const l=Ks(this),a=Vi(o,r.bind(n),s);return l(),a}function Hi(e,t){const s=t.split(".");return()=>{let n=e;for(let o=0;o<s.length&&n;o++)n=n[s[o]];return n}}const za=Symbol("_vte"),Fi=e=>e.__isTeleport,gt=Symbol("_leaveCb"),_s=Symbol("_enterCb");function qa(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return bs(()=>{e.isMounted=!0}),Xi(()=>{e.isUnmounting=!0}),e}const Ze=[Function,Array],Ui={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Ze,onEnter:Ze,onAfterEnter:Ze,onEnterCancelled:Ze,onBeforeLeave:Ze,onLeave:Ze,onAfterLeave:Ze,onLeaveCancelled:Ze,onBeforeAppear:Ze,onAppear:Ze,onAfterAppear:Ze,onAppearCancelled:Ze},zi=e=>{const t=e.subTree;return t.component?zi(t.component):t},Wa={name:"BaseTransition",props:Ui,setup(e,{slots:t}){const s=vl(),n=qa();return()=>{const o=t.default&&Ki(t.default(),!0);if(!o||!o.length)return;const r=qi(o),l=ce(e),{mode:a}=l;if(n.isLeaving)return Fn(r);const c=ir(r);if(!c)return Fn(r);let p=lo(c,l,n,s,m=>p=m);c.type!==Ue&&Vs(c,p);let d=s.subTree&&ir(s.subTree);if(d&&d.type!==Ue&&!Zt(d,c)&&zi(s).type!==Ue){let m=lo(d,l,n,s);if(Vs(d,m),a==="out-in"&&c.type!==Ue)return n.isLeaving=!0,m.afterLeave=()=>{n.isLeaving=!1,s.job.flags&8||s.update(),delete m.afterLeave,d=void 0},Fn(r);a==="in-out"&&c.type!==Ue?m.delayLeave=(b,y,T)=>{const O=Wi(n,d);O[String(d.key)]=d,b[gt]=()=>{y(),b[gt]=void 0,delete p.delayedLeave,d=void 0},p.delayedLeave=()=>{T(),delete p.delayedLeave,d=void 0}}:d=void 0}else d&&(d=void 0);return r}}};function qi(e){let t=e[0];if(e.length>1){for(const s of e)if(s.type!==Ue){t=s;break}}return t}const Ka=Wa;function Wi(e,t){const{leavingVNodes:s}=e;let n=s.get(t.type);return n||(n=Object.create(null),s.set(t.type,n)),n}function lo(e,t,s,n,o){const{appear:r,mode:l,persisted:a=!1,onBeforeEnter:c,onEnter:p,onAfterEnter:d,onEnterCancelled:m,onBeforeLeave:b,onLeave:y,onAfterLeave:T,onLeaveCancelled:O,onBeforeAppear:q,onAppear:U,onAfterAppear:I,onAppearCancelled:F}=t,j=String(e.key),Z=Wi(s,e),K=(w,B)=>{w&&ct(w,n,9,B)},_=(w,B)=>{const Q=B[1];K(w,B),X(w)?w.every(L=>L.length<=1)&&Q():w.length<=1&&Q()},P={mode:l,persisted:a,beforeEnter(w){let B=c;if(!s.isMounted)if(r)B=q||c;else return;w[gt]&&w[gt](!0);const Q=Z[j];Q&&Zt(e,Q)&&Q.el[gt]&&Q.el[gt](),K(B,[w])},enter(w){if(Z[j]===e)return;let B=p,Q=d,L=m;if(!s.isMounted)if(r)B=U||p,Q=I||d,L=F||m;else return;let oe=!1;w[_s]=ye=>{oe||(oe=!0,ye?K(L,[w]):K(Q,[w]),P.delayedLeave&&P.delayedLeave(),w[_s]=void 0)};const he=w[_s].bind(null,!1);B?_(B,[w,he]):he()},leave(w,B){const Q=String(e.key);if(w[_s]&&w[_s](!0),s.isUnmounting)return B();K(b,[w]);let L=!1;w[gt]=he=>{L||(L=!0,B(),he?K(O,[w]):K(T,[w]),w[gt]=void 0,Z[Q]===e&&delete Z[Q])};const oe=w[gt].bind(null,!1);Z[Q]=e,y?_(y,[w,oe]):oe()},clone(w){const B=lo(w,t,s,n,o);return o&&o(B),B}};return P}function Fn(e){if(An(e))return e=qt(e),e.children=null,e}function ir(e){if(!An(e))return Fi(e.type)&&e.children?qi(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:s}=e;if(s){if(t&16)return s[0];if(t&32&&se(s.default))return s.default()}}function Vs(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Vs(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Ki(e,t=!1,s){let n=[],o=0;for(let r=0;r<e.length;r++){let l=e[r];const a=s==null?l.key:String(s)+String(l.key!=null?l.key:r);l.type===_e?(l.patchFlag&128&&o++,n=n.concat(Ki(l.children,t,a))):(t||l.type!==Ue)&&n.push(a!=null?qt(l,{key:a}):l)}if(o>1)for(let r=0;r<n.length;r++)n[r].patchFlag=-2;return n}function Gi(e,t){return se(e)?Oe({name:e.name},t,{setup:e}):e}function Yi(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function lr(e,t){let s;return!!((s=Object.getOwnPropertyDescriptor(e,t))&&!s.configurable)}const hn=new WeakMap;function Os(e,t,s,n,o=!1){if(X(e)){e.forEach((O,q)=>Os(O,t&&(X(t)?t[q]:t),s,n,o));return}if(Bs(n)&&!o){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&Os(e,t,s,n.component.subTree);return}const r=n.shapeFlag&4?Mn(n.component):n.el,l=o?null:r,{i:a,r:c}=e,p=t&&t.r,d=a.refs===ge?a.refs={}:a.refs,m=a.setupState,b=ce(m),y=m===ge?ui:O=>lr(d,O)?!1:de(b,O),T=(O,q)=>!(q&&lr(d,q));if(p!=null&&p!==c){if(ar(t),Ae(p))d[p]=null,y(p)&&(m[p]=null);else if(Le(p)){const O=t;T(p,O.k)&&(p.value=null),O.k&&(d[O.k]=null)}}if(se(c))Ws(c,a,12,[l,d]);else{const O=Ae(c),q=Le(c);if(O||q){const U=()=>{if(e.f){const I=O?y(c)?m[c]:d[c]:T()||!e.k?c.value:d[e.k];if(o)X(I)&&$o(I,r);else if(X(I))I.includes(r)||I.push(r);else if(O)d[c]=[r],y(c)&&(m[c]=d[c]);else{const F=[r];T(c,e.k)&&(c.value=F),e.k&&(d[e.k]=F)}}else O?(d[c]=l,y(c)&&(m[c]=l)):q&&(T(c,e.k)&&(c.value=l),e.k&&(d[e.k]=l))};if(l){const I=()=>{U(),hn.delete(e)};I.id=-1,hn.set(e,I),We(I,s)}else ar(e),U()}}}function ar(e){const t=hn.get(e);t&&(t.flags|=8,hn.delete(e))}kn().requestIdleCallback;kn().cancelIdleCallback;const Bs=e=>!!e.type.__asyncLoader,An=e=>e.type.__isKeepAlive;function Ga(e,t){Ji(e,"a",t)}function Ya(e,t){Ji(e,"da",t)}function Ji(e,t,s=Pe){const n=e.__wdc||(e.__wdc=()=>{let o=s;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(Tn(t,n,s),s){let o=s.parent;for(;o&&o.parent;)An(o.parent.vnode)&&Ja(n,t,s,o),o=o.parent}}function Ja(e,t,s,n){const o=Tn(t,e,n,!0);os(()=>{$o(n[t],o)},s)}function Tn(e,t,s=Pe,n=!1){if(s){const o=s[e]||(s[e]=[]),r=t.__weh||(t.__weh=(...l)=>{Ot();const a=Ks(s),c=ct(t,s,e,l);return a(),Bt(),c});return n?o.unshift(r):o.push(r),r}}const Pt=e=>(t,s=Pe)=>{(!Fs||e==="sp")&&Tn(e,(...n)=>t(...n),s)},Xa=Pt("bm"),bs=Pt("m"),Qa=Pt("bu"),Za=Pt("u"),Xi=Pt("bum"),os=Pt("um"),ec=Pt("sp"),tc=Pt("rtg"),sc=Pt("rtc");function nc(e,t=Pe){Tn("ec",e,t)}const oc="components";function rc(e,t){return lc(oc,e,!0,t)||e}const ic=Symbol.for("v-ndc");function lc(e,t,s=!0,n=!1){const o=Ye||Pe;if(o){const r=o.type;{const a=Wc(r,!1);if(a&&(a===t||a===nt(t)||a===wn(nt(t))))return r}const l=cr(o[e]||r[e],t)||cr(o.appContext[e],t);return!l&&n?r:l}}function cr(e,t){return e&&(e[t]||e[nt(t)]||e[wn(nt(t))])}function Je(e,t,s,n){let o;const r=s,l=X(e);if(l||Ae(e)){const a=l&&ss(e);let c=!1,p=!1;a&&(c=!tt(e),p=Nt(e),e=Cn(e)),o=new Array(e.length);for(let d=0,m=e.length;d<m;d++)o[d]=t(c?p?hs(at(e[d])):at(e[d]):e[d],d,void 0,r)}else if(typeof e=="number"){o=new Array(e);for(let a=0;a<e;a++)o[a]=t(a+1,a,void 0,r)}else if(fe(e))if(e[Symbol.iterator])o=Array.from(e,(a,c)=>t(a,c,void 0,r));else{const a=Object.keys(e);o=new Array(a.length);for(let c=0,p=a.length;c<p;c++){const d=a[c];o[c]=t(e[d],d,c,r)}}else o=[];return o}const ao=e=>e?bl(e)?Mn(e):ao(e.parent):null,Ns=Oe(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>ao(e.parent),$root:e=>ao(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Zi(e),$forceUpdate:e=>e.f||(e.f=()=>{jo(e.update)}),$nextTick:e=>e.n||(e.n=Rt.bind(e.proxy)),$watch:e=>Ua.bind(e)}),Un=(e,t)=>e!==ge&&!e.__isScriptSetup&&de(e,t),ac={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:s,setupState:n,data:o,props:r,accessCache:l,type:a,appContext:c}=e;if(t[0]!=="$"){const b=l[t];if(b!==void 0)switch(b){case 1:return n[t];case 2:return o[t];case 4:return s[t];case 3:return r[t]}else{if(Un(n,t))return l[t]=1,n[t];if(o!==ge&&de(o,t))return l[t]=2,o[t];if(de(r,t))return l[t]=3,r[t];if(s!==ge&&de(s,t))return l[t]=4,s[t];co&&(l[t]=0)}}const p=Ns[t];let d,m;if(p)return t==="$attrs"&&Ne(e.attrs,"get",""),p(e);if((d=a.__cssModules)&&(d=d[t]))return d;if(s!==ge&&de(s,t))return l[t]=4,s[t];if(m=c.config.globalProperties,de(m,t))return m[t]},set({_:e},t,s){const{data:n,setupState:o,ctx:r}=e;return Un(o,t)?(o[t]=s,!0):n!==ge&&de(n,t)?(n[t]=s,!0):de(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(r[t]=s,!0)},has({_:{data:e,setupState:t,accessCache:s,ctx:n,appContext:o,props:r,type:l}},a){let c;return!!(s[a]||e!==ge&&a[0]!=="$"&&de(e,a)||Un(t,a)||de(r,a)||de(n,a)||de(Ns,a)||de(o.config.globalProperties,a)||(c=l.__cssModules)&&c[a])},defineProperty(e,t,s){return s.get!=null?e._.accessCache[t]=0:de(s,"value")&&this.set(e,t,s.value,null),Reflect.defineProperty(e,t,s)}};function ur(e){return X(e)?e.reduce((t,s)=>(t[s]=null,t),{}):e}let co=!0;function cc(e){const t=Zi(e),s=e.proxy,n=e.ctx;co=!1,t.beforeCreate&&dr(t.beforeCreate,e,"bc");const{data:o,computed:r,methods:l,watch:a,provide:c,inject:p,created:d,beforeMount:m,mounted:b,beforeUpdate:y,updated:T,activated:O,deactivated:q,beforeDestroy:U,beforeUnmount:I,destroyed:F,unmounted:j,render:Z,renderTracked:K,renderTriggered:_,errorCaptured:P,serverPrefetch:w,expose:B,inheritAttrs:Q,components:L,directives:oe,filters:he}=t;if(p&&uc(p,n,null),l)for(const ie in l){const ne=l[ie];se(ne)&&(n[ie]=ne.bind(s))}if(o){const ie=o.call(s,s);fe(ie)&&(e.data=Sn(ie))}if(co=!0,r)for(const ie in r){const ne=r[ie],Te=se(ne)?ne.bind(s,s):se(ne.get)?ne.get.bind(s,s):bt,we=!se(ne)&&se(ne.set)?ne.set.bind(s):bt,Se=Ie({get:Te,set:we});Object.defineProperty(n,ie,{enumerable:!0,configurable:!0,get:()=>Se.value,set:ve=>Se.value=ve})}if(a)for(const ie in a)Qi(a[ie],n,s,ie);if(c){const ie=se(c)?c.call(s):c;Reflect.ownKeys(ie).forEach(ne=>{tn(ne,ie[ne])})}d&&dr(d,e,"c");function me(ie,ne){X(ne)?ne.forEach(Te=>ie(Te.bind(s))):ne&&ie(ne.bind(s))}if(me(Xa,m),me(bs,b),me(Qa,y),me(Za,T),me(Ga,O),me(Ya,q),me(nc,P),me(sc,K),me(tc,_),me(Xi,I),me(os,j),me(ec,w),X(B))if(B.length){const ie=e.exposed||(e.exposed={});B.forEach(ne=>{Object.defineProperty(ie,ne,{get:()=>s[ne],set:Te=>s[ne]=Te,enumerable:!0})})}else e.exposed||(e.exposed={});Z&&e.render===bt&&(e.render=Z),Q!=null&&(e.inheritAttrs=Q),L&&(e.components=L),oe&&(e.directives=oe),w&&Yi(e)}function uc(e,t,s=bt){X(e)&&(e=uo(e));for(const n in e){const o=e[n];let r;fe(o)?"default"in o?r=lt(o.from||n,o.default,!0):r=lt(o.from||n):r=lt(o),Le(r)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>r.value,set:l=>r.value=l}):t[n]=r}}function dr(e,t,s){ct(X(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,s)}function Qi(e,t,s,n){let o=n.includes(".")?Hi(s,n):()=>s[n];if(Ae(e)){const r=t[e];se(r)&&Ft(o,r)}else if(se(e))Ft(o,e.bind(s));else if(fe(e))if(X(e))e.forEach(r=>Qi(r,t,s,n));else{const r=se(e.handler)?e.handler.bind(s):t[e.handler];se(r)&&Ft(o,r,e)}}function Zi(e){const t=e.type,{mixins:s,extends:n}=t,{mixins:o,optionsCache:r,config:{optionMergeStrategies:l}}=e.appContext,a=r.get(t);let c;return a?c=a:!o.length&&!s&&!n?c=t:(c={},o.length&&o.forEach(p=>pn(c,p,l,!0)),pn(c,t,l)),fe(t)&&r.set(t,c),c}function pn(e,t,s,n=!1){const{mixins:o,extends:r}=t;r&&pn(e,r,s,!0),o&&o.forEach(l=>pn(e,l,s,!0));for(const l in t)if(!(n&&l==="expose")){const a=dc[l]||s&&s[l];e[l]=a?a(e[l],t[l]):t[l]}return e}const dc={data:fr,props:hr,emits:hr,methods:As,computed:As,beforeCreate:je,created:je,beforeMount:je,mounted:je,beforeUpdate:je,updated:je,beforeDestroy:je,beforeUnmount:je,destroyed:je,unmounted:je,activated:je,deactivated:je,errorCaptured:je,serverPrefetch:je,components:As,directives:As,watch:hc,provide:fr,inject:fc};function fr(e,t){return t?e?function(){return Oe(se(e)?e.call(this,this):e,se(t)?t.call(this,this):t)}:t:e}function fc(e,t){return As(uo(e),uo(t))}function uo(e){if(X(e)){const t={};for(let s=0;s<e.length;s++)t[e[s]]=e[s];return t}return e}function je(e,t){return e?[...new Set([].concat(e,t))]:t}function As(e,t){return e?Oe(Object.create(null),e,t):t}function hr(e,t){return e?X(e)&&X(t)?[...new Set([...e,...t])]:Oe(Object.create(null),ur(e),ur(t??{})):t}function hc(e,t){if(!e)return t;if(!t)return e;const s=Oe(Object.create(null),e);for(const n in t)s[n]=je(e[n],t[n]);return s}function el(){return{app:null,config:{isNativeTag:ui,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let pc=0;function mc(e,t){return function(n,o=null){se(n)||(n=Oe({},n)),o!=null&&!fe(o)&&(o=null);const r=el(),l=new WeakSet,a=[];let c=!1;const p=r.app={_uid:pc++,_component:n,_props:o,_container:null,_context:r,_instance:null,version:Gc,get config(){return r.config},set config(d){},use(d,...m){return l.has(d)||(d&&se(d.install)?(l.add(d),d.install(p,...m)):se(d)&&(l.add(d),d(p,...m))),p},mixin(d){return r.mixins.includes(d)||r.mixins.push(d),p},component(d,m){return m?(r.components[d]=m,p):r.components[d]},directive(d,m){return m?(r.directives[d]=m,p):r.directives[d]},mount(d,m,b){if(!c){const y=p._ceVNode||$e(n,o);return y.appContext=r,b===!0?b="svg":b===!1&&(b=void 0),e(y,d,b),c=!0,p._container=d,d.__vue_app__=p,Mn(y.component)}},onUnmount(d){a.push(d)},unmount(){c&&(ct(a,p._instance,16),e(null,p._container),delete p._container.__vue_app__)},provide(d,m){return r.provides[d]=m,p},runWithContext(d){const m=fs;fs=p;try{return d()}finally{fs=m}}};return p}}let fs=null;const gc=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${nt(t)}Modifiers`]||e[`${Kt(t)}Modifiers`];function vc(e,t,...s){if(e.isUnmounted)return;const n=e.vnode.props||ge;let o=s;const r=t.startsWith("update:"),l=r&&gc(n,t.slice(7));l&&(l.trim&&(o=s.map(d=>Ae(d)?d.trim():d)),l.number&&(o=s.map(_n)));let a,c=n[a=Ln(t)]||n[a=Ln(nt(t))];!c&&r&&(c=n[a=Ln(Kt(t))]),c&&ct(c,e,6,o);const p=n[a+"Once"];if(p){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,ct(p,e,6,o)}}const bc=new WeakMap;function tl(e,t,s=!1){const n=s?bc:t.emitsCache,o=n.get(e);if(o!==void 0)return o;const r=e.emits;let l={},a=!1;if(!se(e)){const c=p=>{const d=tl(p,t,!0);d&&(a=!0,Oe(l,d))};!s&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!r&&!a?(fe(e)&&n.set(e,null),null):(X(r)?r.forEach(c=>l[c]=null):Oe(l,r),fe(e)&&n.set(e,l),l)}function $n(e,t){return!e||!xn(t)?!1:(t=t.slice(2).replace(/Once$/,""),de(e,t[0].toLowerCase()+t.slice(1))||de(e,Kt(t))||de(e,t))}function pr(e){const{type:t,vnode:s,proxy:n,withProxy:o,propsOptions:[r],slots:l,attrs:a,emit:c,render:p,renderCache:d,props:m,data:b,setupState:y,ctx:T,inheritAttrs:O}=e,q=fn(e);let U,I;try{if(s.shapeFlag&4){const j=o||n,Z=j;U=vt(p.call(Z,j,d,m,y,b,T)),I=a}else{const j=t;U=vt(j.length>1?j(m,{attrs:a,slots:l,emit:c}):j(m,null)),I=t.props?a:xc(a)}}catch(j){Ps.length=0,En(j,e,1),U=$e(Ue)}let F=U;if(I&&O!==!1){const j=Object.keys(I),{shapeFlag:Z}=F;j.length&&Z&7&&(r&&j.some(To)&&(I=yc(I,r)),F=qt(F,I,!1,!0))}return s.dirs&&(F=qt(F,null,!1,!0),F.dirs=F.dirs?F.dirs.concat(s.dirs):s.dirs),s.transition&&Vs(F,s.transition),U=F,fn(q),U}const xc=e=>{let t;for(const s in e)(s==="class"||s==="style"||xn(s))&&((t||(t={}))[s]=e[s]);return t},yc=(e,t)=>{const s={};for(const n in e)(!To(n)||!(n.slice(9)in t))&&(s[n]=e[n]);return s};function wc(e,t,s){const{props:n,children:o,component:r}=e,{props:l,children:a,patchFlag:c}=t,p=r.emitsOptions;if(t.dirs||t.transition)return!0;if(s&&c>=0){if(c&1024)return!0;if(c&16)return n?mr(n,l,p):!!l;if(c&8){const d=t.dynamicProps;for(let m=0;m<d.length;m++){const b=d[m];if(sl(l,n,b)&&!$n(p,b))return!0}}}else return(o||a)&&(!a||!a.$stable)?!0:n===l?!1:n?l?mr(n,l,p):!0:!!l;return!1}function mr(e,t,s){const n=Object.keys(t);if(n.length!==Object.keys(e).length)return!0;for(let o=0;o<n.length;o++){const r=n[o];if(sl(t,e,r)&&!$n(s,r))return!0}return!1}function sl(e,t,s){const n=e[s],o=t[s];return s==="style"&&fe(n)&&fe(o)?!zt(n,o):n!==o}function _c({vnode:e,parent:t},s){for(;t;){const n=t.subTree;if(n.suspense&&n.suspense.activeBranch===e&&(n.el=e.el),n===e)(e=t.vnode).el=s,t=t.parent;else break}}const nl={},ol=()=>Object.create(nl),rl=e=>Object.getPrototypeOf(e)===nl;function kc(e,t,s,n=!1){const o={},r=ol();e.propsDefaults=Object.create(null),il(e,t,o,r);for(const l in e.propsOptions[0])l in o||(o[l]=void 0);s?e.props=n?o:Oi(o):e.type.props?e.props=o:e.props=r,e.attrs=r}function Cc(e,t,s,n){const{props:o,attrs:r,vnode:{patchFlag:l}}=e,a=ce(o),[c]=e.propsOptions;let p=!1;if((n||l>0)&&!(l&16)){if(l&8){const d=e.vnode.dynamicProps;for(let m=0;m<d.length;m++){let b=d[m];if($n(e.emitsOptions,b))continue;const y=t[b];if(c)if(de(r,b))y!==r[b]&&(r[b]=y,p=!0);else{const T=nt(b);o[T]=fo(c,a,T,y,e,!1)}else y!==r[b]&&(r[b]=y,p=!0)}}}else{il(e,t,o,r)&&(p=!0);let d;for(const m in a)(!t||!de(t,m)&&((d=Kt(m))===m||!de(t,d)))&&(c?s&&(s[m]!==void 0||s[d]!==void 0)&&(o[m]=fo(c,a,m,void 0,e,!0)):delete o[m]);if(r!==a)for(const m in r)(!t||!de(t,m))&&(delete r[m],p=!0)}p&&At(e.attrs,"set","")}function il(e,t,s,n){const[o,r]=e.propsOptions;let l=!1,a;if(t)for(let c in t){if($s(c))continue;const p=t[c];let d;o&&de(o,d=nt(c))?!r||!r.includes(d)?s[d]=p:(a||(a={}))[d]=p:$n(e.emitsOptions,c)||(!(c in n)||p!==n[c])&&(n[c]=p,l=!0)}if(r){const c=ce(s),p=a||ge;for(let d=0;d<r.length;d++){const m=r[d];s[m]=fo(o,c,m,p[m],e,!de(p,m))}}return l}function fo(e,t,s,n,o,r){const l=e[s];if(l!=null){const a=de(l,"default");if(a&&n===void 0){const c=l.default;if(l.type!==Function&&!l.skipFactory&&se(c)){const{propsDefaults:p}=o;if(s in p)n=p[s];else{const d=Ks(o);n=p[s]=c.call(null,t),d()}}else n=c;o.ce&&o.ce._setProp(s,n)}l[0]&&(r&&!a?n=!1:l[1]&&(n===""||n===Kt(s))&&(n=!0))}return n}const Sc=new WeakMap;function ll(e,t,s=!1){const n=s?Sc:t.propsCache,o=n.get(e);if(o)return o;const r=e.props,l={},a=[];let c=!1;if(!se(e)){const d=m=>{c=!0;const[b,y]=ll(m,t,!0);Oe(l,b),y&&a.push(...y)};!s&&t.mixins.length&&t.mixins.forEach(d),e.extends&&d(e.extends),e.mixins&&e.mixins.forEach(d)}if(!r&&!c)return fe(e)&&n.set(e,as),as;if(X(r))for(let d=0;d<r.length;d++){const m=nt(r[d]);gr(m)&&(l[m]=ge)}else if(r)for(const d in r){const m=nt(d);if(gr(m)){const b=r[d],y=l[m]=X(b)||se(b)?{type:b}:Oe({},b),T=y.type;let O=!1,q=!0;if(X(T))for(let U=0;U<T.length;++U){const I=T[U],F=se(I)&&I.name;if(F==="Boolean"){O=!0;break}else F==="String"&&(q=!1)}else O=se(T)&&T.name==="Boolean";y[0]=O,y[1]=q,(O||de(y,"default"))&&a.push(m)}}const p=[l,a];return fe(e)&&n.set(e,p),p}function gr(e){return e[0]!=="$"&&!$s(e)}const Vo=e=>e==="_"||e==="_ctx"||e==="$stable",Ho=e=>X(e)?e.map(vt):[vt(e)],Ec=(e,t,s)=>{if(t._n)return t;const n=io((...o)=>Ho(t(...o)),s);return n._c=!1,n},al=(e,t,s)=>{const n=e._ctx;for(const o in e){if(Vo(o))continue;const r=e[o];if(se(r))t[o]=Ec(o,r,n);else if(r!=null){const l=Ho(r);t[o]=()=>l}}},cl=(e,t)=>{const s=Ho(t);e.slots.default=()=>s},ul=(e,t,s)=>{for(const n in t)(s||!Vo(n))&&(e[n]=t[n])},Ac=(e,t,s)=>{const n=e.slots=ol();if(e.vnode.shapeFlag&32){const o=t._;o?(ul(n,t,s),s&&pi(n,"_",o,!0)):al(t,n)}else t&&cl(e,t)},Tc=(e,t,s)=>{const{vnode:n,slots:o}=e;let r=!0,l=ge;if(n.shapeFlag&32){const a=t._;a?s&&a===1?r=!1:ul(o,t,s):(r=!t.$stable,al(t,o)),l=t}else t&&(cl(e,t),l={default:1});if(r)for(const a in o)!Vo(a)&&l[a]==null&&delete o[a]},We=Bc;function $c(e){return Rc(e)}function Rc(e,t){const s=kn();s.__VUE__=!0;const{insert:n,remove:o,patchProp:r,createElement:l,createText:a,createComment:c,setText:p,setElementText:d,parentNode:m,nextSibling:b,setScopeId:y=bt,insertStaticContent:T}=e,O=(u,g,x,k=null,C=null,$=null,V=void 0,D=null,N=!!g.dynamicChildren)=>{if(u===g)return;u&&!Zt(u,g)&&(k=M(u),ve(u,C,$,!0),u=null),g.patchFlag===-2&&(N=!1,g.dynamicChildren=null);const{type:R,ref:Y,shapeFlag:z}=g;switch(R){case Rn:q(u,g,x,k);break;case Ue:U(u,g,x,k);break;case sn:u==null&&I(g,x,k,V);break;case _e:L(u,g,x,k,C,$,V,D,N);break;default:z&1?Z(u,g,x,k,C,$,V,D,N):z&6?oe(u,g,x,k,C,$,V,D,N):(z&64||z&128)&&R.process(u,g,x,k,C,$,V,D,N,f)}Y!=null&&C?Os(Y,u&&u.ref,$,g||u,!g):Y==null&&u&&u.ref!=null&&Os(u.ref,null,$,u,!0)},q=(u,g,x,k)=>{if(u==null)n(g.el=a(g.children),x,k);else{const C=g.el=u.el;g.children!==u.children&&p(C,g.children)}},U=(u,g,x,k)=>{u==null?n(g.el=c(g.children||""),x,k):g.el=u.el},I=(u,g,x,k)=>{[u.el,u.anchor]=T(u.children,g,x,k,u.el,u.anchor)},F=({el:u,anchor:g},x,k)=>{let C;for(;u&&u!==g;)C=b(u),n(u,x,k),u=C;n(g,x,k)},j=({el:u,anchor:g})=>{let x;for(;u&&u!==g;)x=b(u),o(u),u=x;o(g)},Z=(u,g,x,k,C,$,V,D,N)=>{if(g.type==="svg"?V="svg":g.type==="math"&&(V="mathml"),u==null)K(g,x,k,C,$,V,D,N);else{const R=u.el&&u.el._isVueCE?u.el:null;try{R&&R._beginPatch(),w(u,g,C,$,V,D,N)}finally{R&&R._endPatch()}}},K=(u,g,x,k,C,$,V,D)=>{let N,R;const{props:Y,shapeFlag:z,transition:J,dirs:te}=u;if(N=u.el=l(u.type,$,Y&&Y.is,Y),z&8?d(N,u.children):z&16&&P(u.children,N,null,k,C,zn(u,$),V,D),te&&Gt(u,null,k,"created"),_(N,u,u.scopeId,V,k),Y){for(const be in Y)be!=="value"&&!$s(be)&&r(N,be,null,Y[be],$,k);"value"in Y&&r(N,"value",null,Y.value,$),(R=Y.onVnodeBeforeMount)&&pt(R,k,u)}te&&Gt(u,null,k,"beforeMount");const ae=Mc(C,J);ae&&J.beforeEnter(N),n(N,g,x),((R=Y&&Y.onVnodeMounted)||ae||te)&&We(()=>{R&&pt(R,k,u),ae&&J.enter(N),te&&Gt(u,null,k,"mounted")},C)},_=(u,g,x,k,C)=>{if(x&&y(u,x),k)for(let $=0;$<k.length;$++)y(u,k[$]);if(C){let $=C.subTree;if(g===$||pl($.type)&&($.ssContent===g||$.ssFallback===g)){const V=C.vnode;_(u,V,V.scopeId,V.slotScopeIds,C.parent)}}},P=(u,g,x,k,C,$,V,D,N=0)=>{for(let R=N;R<u.length;R++){const Y=u[R]=D?Et(u[R]):vt(u[R]);O(null,Y,g,x,k,C,$,V,D)}},w=(u,g,x,k,C,$,V)=>{const D=g.el=u.el;let{patchFlag:N,dynamicChildren:R,dirs:Y}=g;N|=u.patchFlag&16;const z=u.props||ge,J=g.props||ge;let te;if(x&&Yt(x,!1),(te=J.onVnodeBeforeUpdate)&&pt(te,x,g,u),Y&&Gt(g,u,x,"beforeUpdate"),x&&Yt(x,!0),(z.innerHTML&&J.innerHTML==null||z.textContent&&J.textContent==null)&&d(D,""),R?B(u.dynamicChildren,R,D,x,k,zn(g,C),$):V||ne(u,g,D,null,x,k,zn(g,C),$,!1),N>0){if(N&16)Q(D,z,J,x,C);else if(N&2&&z.class!==J.class&&r(D,"class",null,J.class,C),N&4&&r(D,"style",z.style,J.style,C),N&8){const ae=g.dynamicProps;for(let be=0;be<ae.length;be++){const pe=ae[be],ze=z[pe],qe=J[pe];(qe!==ze||pe==="value")&&r(D,pe,ze,qe,C,x)}}N&1&&u.children!==g.children&&d(D,g.children)}else!V&&R==null&&Q(D,z,J,x,C);((te=J.onVnodeUpdated)||Y)&&We(()=>{te&&pt(te,x,g,u),Y&&Gt(g,u,x,"updated")},k)},B=(u,g,x,k,C,$,V)=>{for(let D=0;D<g.length;D++){const N=u[D],R=g[D],Y=N.el&&(N.type===_e||!Zt(N,R)||N.shapeFlag&198)?m(N.el):x;O(N,R,Y,null,k,C,$,V,!0)}},Q=(u,g,x,k,C)=>{if(g!==x){if(g!==ge)for(const $ in g)!$s($)&&!($ in x)&&r(u,$,g[$],null,C,k);for(const $ in x){if($s($))continue;const V=x[$],D=g[$];V!==D&&$!=="value"&&r(u,$,D,V,C,k)}"value"in x&&r(u,"value",g.value,x.value,C)}},L=(u,g,x,k,C,$,V,D,N)=>{const R=g.el=u?u.el:a(""),Y=g.anchor=u?u.anchor:a("");let{patchFlag:z,dynamicChildren:J,slotScopeIds:te}=g;te&&(D=D?D.concat(te):te),u==null?(n(R,x,k),n(Y,x,k),P(g.children||[],x,Y,C,$,V,D,N)):z>0&&z&64&&J&&u.dynamicChildren&&u.dynamicChildren.length===J.length?(B(u.dynamicChildren,J,x,C,$,V,D),(g.key!=null||C&&g===C.subTree)&&dl(u,g,!0)):ne(u,g,x,Y,C,$,V,D,N)},oe=(u,g,x,k,C,$,V,D,N)=>{g.slotScopeIds=D,u==null?g.shapeFlag&512?C.ctx.activate(g,x,k,V,N):he(g,x,k,C,$,V,N):ye(u,g,N)},he=(u,g,x,k,C,$,V)=>{const D=u.component=Hc(u,k,C);if(An(u)&&(D.ctx.renderer=f),Fc(D,!1,V),D.asyncDep){if(C&&C.registerDep(D,me,V),!u.el){const N=D.subTree=$e(Ue);U(null,N,g,x),u.placeholder=N.el}}else me(D,u,g,x,C,$,V)},ye=(u,g,x)=>{const k=g.component=u.component;if(wc(u,g,x))if(k.asyncDep&&!k.asyncResolved){ie(k,g,x);return}else k.next=g,k.update();else g.el=u.el,k.vnode=g},me=(u,g,x,k,C,$,V)=>{const D=()=>{if(u.isMounted){let{next:z,bu:J,u:te,parent:ae,vnode:be}=u;{const ft=fl(u);if(ft){z&&(z.el=be.el,ie(u,z,V)),ft.asyncDep.then(()=>{We(()=>{u.isUnmounted||R()},C)});return}}let pe=z,ze;Yt(u,!1),z?(z.el=be.el,ie(u,z,V)):z=be,J&&en(J),(ze=z.props&&z.props.onVnodeBeforeUpdate)&&pt(ze,ae,z,be),Yt(u,!0);const qe=pr(u),dt=u.subTree;u.subTree=qe,O(dt,qe,m(dt.el),M(dt),u,C,$),z.el=qe.el,pe===null&&_c(u,qe.el),te&&We(te,C),(ze=z.props&&z.props.onVnodeUpdated)&&We(()=>pt(ze,ae,z,be),C)}else{let z;const{el:J,props:te}=g,{bm:ae,m:be,parent:pe,root:ze,type:qe}=u,dt=Bs(g);Yt(u,!1),ae&&en(ae),!dt&&(z=te&&te.onVnodeBeforeMount)&&pt(z,pe,g),Yt(u,!0);{ze.ce&&ze.ce._hasShadowRoot()&&ze.ce._injectChildStyle(qe);const ft=u.subTree=pr(u);O(null,ft,x,k,u,C,$),g.el=ft.el}if(be&&We(be,C),!dt&&(z=te&&te.onVnodeMounted)){const ft=g;We(()=>pt(z,pe,ft),C)}(g.shapeFlag&256||pe&&Bs(pe.vnode)&&pe.vnode.shapeFlag&256)&&u.a&&We(u.a,C),u.isMounted=!0,g=x=k=null}};u.scope.on();const N=u.effect=new bi(D);u.scope.off();const R=u.update=N.run.bind(N),Y=u.job=N.runIfDirty.bind(N);Y.i=u,Y.id=u.uid,N.scheduler=()=>jo(Y),Yt(u,!0),R()},ie=(u,g,x)=>{g.component=u;const k=u.vnode.props;u.vnode=g,u.next=null,Cc(u,g.props,k,x),Tc(u,g.children,x),Ot(),rr(u),Bt()},ne=(u,g,x,k,C,$,V,D,N=!1)=>{const R=u&&u.children,Y=u?u.shapeFlag:0,z=g.children,{patchFlag:J,shapeFlag:te}=g;if(J>0){if(J&128){we(R,z,x,k,C,$,V,D,N);return}else if(J&256){Te(R,z,x,k,C,$,V,D,N);return}}te&8?(Y&16&&Ee(R,C,$),z!==R&&d(x,z)):Y&16?te&16?we(R,z,x,k,C,$,V,D,N):Ee(R,C,$,!0):(Y&8&&d(x,""),te&16&&P(z,x,k,C,$,V,D,N))},Te=(u,g,x,k,C,$,V,D,N)=>{u=u||as,g=g||as;const R=u.length,Y=g.length,z=Math.min(R,Y);let J;for(J=0;J<z;J++){const te=g[J]=N?Et(g[J]):vt(g[J]);O(u[J],te,x,null,C,$,V,D,N)}R>Y?Ee(u,C,$,!0,!1,z):P(g,x,k,C,$,V,D,N,z)},we=(u,g,x,k,C,$,V,D,N)=>{let R=0;const Y=g.length;let z=u.length-1,J=Y-1;for(;R<=z&&R<=J;){const te=u[R],ae=g[R]=N?Et(g[R]):vt(g[R]);if(Zt(te,ae))O(te,ae,x,null,C,$,V,D,N);else break;R++}for(;R<=z&&R<=J;){const te=u[z],ae=g[J]=N?Et(g[J]):vt(g[J]);if(Zt(te,ae))O(te,ae,x,null,C,$,V,D,N);else break;z--,J--}if(R>z){if(R<=J){const te=J+1,ae=te<Y?g[te].el:k;for(;R<=J;)O(null,g[R]=N?Et(g[R]):vt(g[R]),x,ae,C,$,V,D,N),R++}}else if(R>J)for(;R<=z;)ve(u[R],C,$,!0),R++;else{const te=R,ae=R,be=new Map;for(R=ae;R<=J;R++){const Ge=g[R]=N?Et(g[R]):vt(g[R]);Ge.key!=null&&be.set(Ge.key,R)}let pe,ze=0;const qe=J-ae+1;let dt=!1,ft=0;const ys=new Array(qe);for(R=0;R<qe;R++)ys[R]=0;for(R=te;R<=z;R++){const Ge=u[R];if(ze>=qe){ve(Ge,C,$,!0);continue}let ht;if(Ge.key!=null)ht=be.get(Ge.key);else for(pe=ae;pe<=J;pe++)if(ys[pe-ae]===0&&Zt(Ge,g[pe])){ht=pe;break}ht===void 0?ve(Ge,C,$,!0):(ys[ht-ae]=R+1,ht>=ft?ft=ht:dt=!0,O(Ge,g[ht],x,null,C,$,V,D,N),ze++)}const Qo=dt?Oc(ys):as;for(pe=Qo.length-1,R=qe-1;R>=0;R--){const Ge=ae+R,ht=g[Ge],Zo=g[Ge+1],er=Ge+1<Y?Zo.el||hl(Zo):k;ys[R]===0?O(null,ht,x,er,C,$,V,D,N):dt&&(pe<0||R!==Qo[pe]?Se(ht,x,er,2):pe--)}}},Se=(u,g,x,k,C=null)=>{const{el:$,type:V,transition:D,children:N,shapeFlag:R}=u;if(R&6){Se(u.component.subTree,g,x,k);return}if(R&128){u.suspense.move(g,x,k);return}if(R&64){V.move(u,g,x,f);return}if(V===_e){n($,g,x);for(let z=0;z<N.length;z++)Se(N[z],g,x,k);n(u.anchor,g,x);return}if(V===sn){F(u,g,x);return}if(k!==2&&R&1&&D)if(k===0)D.beforeEnter($),n($,g,x),We(()=>D.enter($),C);else{const{leave:z,delayLeave:J,afterLeave:te}=D,ae=()=>{u.ctx.isUnmounted?o($):n($,g,x)},be=()=>{$._isLeaving&&$[gt](!0),z($,()=>{ae(),te&&te()})};J?J($,ae,be):be()}else n($,g,x)},ve=(u,g,x,k=!1,C=!1)=>{const{type:$,props:V,ref:D,children:N,dynamicChildren:R,shapeFlag:Y,patchFlag:z,dirs:J,cacheIndex:te}=u;if(z===-2&&(C=!1),D!=null&&(Ot(),Os(D,null,x,u,!0),Bt()),te!=null&&(g.renderCache[te]=void 0),Y&256){g.ctx.deactivate(u);return}const ae=Y&1&&J,be=!Bs(u);let pe;if(be&&(pe=V&&V.onVnodeBeforeUnmount)&&pt(pe,g,u),Y&6)Be(u.component,x,k);else{if(Y&128){u.suspense.unmount(x,k);return}ae&&Gt(u,null,g,"beforeUnmount"),Y&64?u.type.remove(u,g,x,f,k):R&&!R.hasOnce&&($!==_e||z>0&&z&64)?Ee(R,g,x,!1,!0):($===_e&&z&384||!C&&Y&16)&&Ee(N,g,x),k&&De(u)}(be&&(pe=V&&V.onVnodeUnmounted)||ae)&&We(()=>{pe&&pt(pe,g,u),ae&&Gt(u,null,g,"unmounted")},x)},De=u=>{const{type:g,el:x,anchor:k,transition:C}=u;if(g===_e){Qe(x,k);return}if(g===sn){j(u);return}const $=()=>{o(x),C&&!C.persisted&&C.afterLeave&&C.afterLeave()};if(u.shapeFlag&1&&C&&!C.persisted){const{leave:V,delayLeave:D}=C,N=()=>V(x,$);D?D(u.el,$,N):N()}else $()},Qe=(u,g)=>{let x;for(;u!==g;)x=b(u),o(u),u=x;o(g)},Be=(u,g,x)=>{const{bum:k,scope:C,job:$,subTree:V,um:D,m:N,a:R}=u;vr(N),vr(R),k&&en(k),C.stop(),$&&($.flags|=8,ve(V,u,g,x)),D&&We(D,g),We(()=>{u.isUnmounted=!0},g)},Ee=(u,g,x,k=!1,C=!1,$=0)=>{for(let V=$;V<u.length;V++)ve(u[V],g,x,k,C)},M=u=>{if(u.shapeFlag&6)return M(u.component.subTree);if(u.shapeFlag&128)return u.suspense.next();const g=b(u.anchor||u.el),x=g&&g[za];return x?b(x):g};let A=!1;const h=(u,g,x)=>{let k;u==null?g._vnode&&(ve(g._vnode,null,null,!0),k=g._vnode.component):O(g._vnode||null,u,g,null,null,null,x),g._vnode=u,A||(A=!0,rr(k),Li(),A=!1)},f={p:O,um:ve,m:Se,r:De,mt:he,mc:P,pc:ne,pbc:B,n:M,o:e};return{render:h,hydrate:void 0,createApp:mc(h)}}function zn({type:e,props:t},s){return s==="svg"&&e==="foreignObject"||s==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:s}function Yt({effect:e,job:t},s){s?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Mc(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function dl(e,t,s=!1){const n=e.children,o=t.children;if(X(n)&&X(o))for(let r=0;r<n.length;r++){const l=n[r];let a=o[r];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=o[r]=Et(o[r]),a.el=l.el),!s&&a.patchFlag!==-2&&dl(l,a)),a.type===Rn&&(a.patchFlag===-1&&(a=o[r]=Et(a)),a.el=l.el),a.type===Ue&&!a.el&&(a.el=l.el)}}function Oc(e){const t=e.slice(),s=[0];let n,o,r,l,a;const c=e.length;for(n=0;n<c;n++){const p=e[n];if(p!==0){if(o=s[s.length-1],e[o]<p){t[n]=o,s.push(n);continue}for(r=0,l=s.length-1;r<l;)a=r+l>>1,e[s[a]]<p?r=a+1:l=a;p<e[s[r]]&&(r>0&&(t[n]=s[r-1]),s[r]=n)}}for(r=s.length,l=s[r-1];r-- >0;)s[r]=l,l=t[l];return s}function fl(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:fl(t)}function vr(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function hl(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?hl(t.subTree):null}const pl=e=>e.__isSuspense;function Bc(e,t){t&&t.pendingBranch?X(e)?t.effects.push(...e):t.effects.push(e):Va(e)}const _e=Symbol.for("v-fgt"),Rn=Symbol.for("v-txt"),Ue=Symbol.for("v-cmt"),sn=Symbol.for("v-stc"),Ps=[];let Xe=null;function S(e=!1){Ps.push(Xe=e?null:[])}function Nc(){Ps.pop(),Xe=Ps[Ps.length-1]||null}let Hs=1;function mn(e,t=!1){Hs+=e,e<0&&Xe&&t&&(Xe.hasOnce=!0)}function ml(e){return e.dynamicChildren=Hs>0?Xe||as:null,Nc(),Hs>0&&Xe&&Xe.push(e),e}function E(e,t,s,n,o,r){return ml(i(e,t,s,n,o,r,!0))}function Pc(e,t,s,n,o){return ml($e(e,t,s,n,o,!0))}function gn(e){return e?e.__v_isVNode===!0:!1}function Zt(e,t){return e.type===t.type&&e.key===t.key}const gl=({key:e})=>e??null,nn=({ref:e,ref_key:t,ref_for:s})=>(typeof e=="number"&&(e=""+e),e!=null?Ae(e)||Le(e)||se(e)?{i:Ye,r:e,k:t,f:!!s}:e:null);function i(e,t=null,s=null,n=0,o=null,r=e===_e?0:1,l=!1,a=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&gl(t),ref:t&&nn(t),scopeId:ji,slotScopeIds:null,children:s,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:r,patchFlag:n,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:Ye};return a?(Fo(c,s),r&128&&e.normalize(c)):s&&(c.shapeFlag|=Ae(s)?8:16),Hs>0&&!l&&Xe&&(c.patchFlag>0||r&6)&&c.patchFlag!==32&&Xe.push(c),c}const $e=Ic;function Ic(e,t=null,s=null,n=0,o=null,r=!1){if((!e||e===ic)&&(e=Ue),gn(e)){const a=qt(e,t,!0);return s&&Fo(a,s),Hs>0&&!r&&Xe&&(a.shapeFlag&6?Xe[Xe.indexOf(e)]=a:Xe.push(a)),a.patchFlag=-2,a}if(Kc(e)&&(e=e.__vccOpts),t){t=Lc(t);let{class:a,style:c}=t;a&&!Ae(a)&&(t.class=re(a)),fe(c)&&(Do(c)&&!X(c)&&(c=Oe({},c)),t.style=Mt(c))}const l=Ae(e)?1:pl(e)?128:Fi(e)?64:fe(e)?4:se(e)?2:0;return i(e,t,s,n,o,l,r,!0)}function Lc(e){return e?Do(e)||rl(e)?Oe({},e):e:null}function qt(e,t,s=!1,n=!1){const{props:o,ref:r,patchFlag:l,children:a,transition:c}=e,p=t?Dc(o||{},t):o,d={__v_isVNode:!0,__v_skip:!0,type:e.type,props:p,key:p&&gl(p),ref:t&&t.ref?s&&r?X(r)?r.concat(nn(t)):[r,nn(t)]:nn(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==_e?l===-1?16:l|16:l,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&qt(e.ssContent),ssFallback:e.ssFallback&&qt(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&n&&Vs(d,c.clone(d)),d}function G(e=" ",t=0){return $e(Rn,null,e,t)}function rt(e,t){const s=$e(sn,null,e);return s.staticCount=t,s}function ee(e="",t=!1){return t?(S(),Pc(Ue,null,e)):$e(Ue,null,e)}function vt(e){return e==null||typeof e=="boolean"?$e(Ue):X(e)?$e(_e,null,e.slice()):gn(e)?Et(e):$e(Rn,null,String(e))}function Et(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:qt(e)}function Fo(e,t){let s=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(X(t))s=16;else if(typeof t=="object")if(n&65){const o=t.default;o&&(o._c&&(o._d=!1),Fo(e,o()),o._c&&(o._d=!0));return}else{s=32;const o=t._;!o&&!rl(t)?t._ctx=Ye:o===3&&Ye&&(Ye.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else se(t)?(t={default:t,_ctx:Ye},s=32):(t=String(t),n&64?(s=16,t=[G(t)]):s=8);e.children=t,e.shapeFlag|=s}function Dc(...e){const t={};for(let s=0;s<e.length;s++){const n=e[s];for(const o in n)if(o==="class")t.class!==n.class&&(t.class=re([t.class,n.class]));else if(o==="style")t.style=Mt([t.style,n.style]);else if(xn(o)){const r=t[o],l=n[o];l&&r!==l&&!(X(r)&&r.includes(l))&&(t[o]=r?[].concat(r,l):l)}else o!==""&&(t[o]=n[o])}return t}function pt(e,t,s,n=null){ct(e,t,7,[s,n])}const jc=el();let Vc=0;function Hc(e,t,s){const n=e.type,o=(t?t.appContext:e.appContext)||jc,r={uid:Vc++,vnode:e,type:n,parent:t,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new ua(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(o.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:ll(n,o),emitsOptions:tl(n,o),emit:null,emitted:null,propsDefaults:ge,inheritAttrs:n.inheritAttrs,ctx:ge,data:ge,props:ge,attrs:ge,slots:ge,refs:ge,setupState:ge,setupContext:null,suspense:s,suspenseId:s?s.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return r.ctx={_:r},r.root=t?t.root:r,r.emit=vc.bind(null,r),e.ce&&e.ce(r),r}let Pe=null;const vl=()=>Pe||Ye;let vn,ho;{const e=kn(),t=(s,n)=>{let o;return(o=e[s])||(o=e[s]=[]),o.push(n),r=>{o.length>1?o.forEach(l=>l(r)):o[0](r)}};vn=t("__VUE_INSTANCE_SETTERS__",s=>Pe=s),ho=t("__VUE_SSR_SETTERS__",s=>Fs=s)}const Ks=e=>{const t=Pe;return vn(e),e.scope.on(),()=>{e.scope.off(),vn(t)}},br=()=>{Pe&&Pe.scope.off(),vn(null)};function bl(e){return e.vnode.shapeFlag&4}let Fs=!1;function Fc(e,t=!1,s=!1){t&&ho(t);const{props:n,children:o}=e.vnode,r=bl(e);kc(e,n,r,t),Ac(e,o,s||t);const l=r?Uc(e,t):void 0;return t&&ho(!1),l}function Uc(e,t){const s=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,ac);const{setup:n}=s;if(n){Ot();const o=e.setupContext=n.length>1?qc(e):null,r=Ks(e),l=Ws(n,e,0,[e.props,o]),a=di(l);if(Bt(),r(),(a||e.sp)&&!Bs(e)&&Yi(e),a){if(l.then(br,br),t)return l.then(c=>{xr(e,c)}).catch(c=>{En(c,e,0)});e.asyncDep=l}else xr(e,l)}else xl(e)}function xr(e,t,s){se(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:fe(t)&&(e.setupState=Ni(t)),xl(e)}function xl(e,t,s){const n=e.type;e.render||(e.render=n.render||bt);{const o=Ks(e);Ot();try{cc(e)}finally{Bt(),o()}}}const zc={get(e,t){return Ne(e,"get",""),e[t]}};function qc(e){const t=s=>{e.exposed=s||{}};return{attrs:new Proxy(e.attrs,zc),slots:e.slots,emit:e.emit,expose:t}}function Mn(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Ni(Ra(e.exposed)),{get(t,s){if(s in t)return t[s];if(s in Ns)return Ns[s](e)},has(t,s){return s in t||s in Ns}})):e.proxy}function Wc(e,t=!0){return se(e)?e.displayName||e.name:e.name||t&&e.__name}function Kc(e){return se(e)&&"__vccOpts"in e}const Ie=(e,t)=>Pa(e,t,Fs);function Uo(e,t,s){try{mn(-1);const n=arguments.length;return n===2?fe(t)&&!X(t)?gn(t)?$e(e,null,[t]):$e(e,t):$e(e,null,t):(n>3?s=Array.prototype.slice.call(arguments,2):n===3&&gn(s)&&(s=[s]),$e(e,t,s))}finally{mn(1)}}const Gc="3.5.29";let po;const yr=typeof window<"u"&&window.trustedTypes;if(yr)try{po=yr.createPolicy("vue",{createHTML:e=>e})}catch{}const yl=po?e=>po.createHTML(e):e=>e,Yc="http://www.w3.org/2000/svg",Jc="http://www.w3.org/1998/Math/MathML",St=typeof document<"u"?document:null,wr=St&&St.createElement("template"),Xc={insert:(e,t,s)=>{t.insertBefore(e,s||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,s,n)=>{const o=t==="svg"?St.createElementNS(Yc,e):t==="mathml"?St.createElementNS(Jc,e):s?St.createElement(e,{is:s}):St.createElement(e);return e==="select"&&n&&n.multiple!=null&&o.setAttribute("multiple",n.multiple),o},createText:e=>St.createTextNode(e),createComment:e=>St.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>St.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,s,n,o,r){const l=s?s.previousSibling:t.lastChild;if(o&&(o===r||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),s),!(o===r||!(o=o.nextSibling)););else{wr.innerHTML=yl(n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e);const a=wr.content;if(n==="svg"||n==="mathml"){const c=a.firstChild;for(;c.firstChild;)a.appendChild(c.firstChild);a.removeChild(c)}t.insertBefore(a,s)}return[l?l.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}},It="transition",ks="animation",Us=Symbol("_vtc"),wl={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Qc=Oe({},Ui,wl),Zc=e=>(e.displayName="Transition",e.props=Qc,e),_r=Zc((e,{slots:t})=>Uo(Ka,eu(e),t)),Jt=(e,t=[])=>{X(e)?e.forEach(s=>s(...t)):e&&e(...t)},kr=e=>e?X(e)?e.some(t=>t.length>1):e.length>1:!1;function eu(e){const t={};for(const L in e)L in wl||(t[L]=e[L]);if(e.css===!1)return t;const{name:s="v",type:n,duration:o,enterFromClass:r=`${s}-enter-from`,enterActiveClass:l=`${s}-enter-active`,enterToClass:a=`${s}-enter-to`,appearFromClass:c=r,appearActiveClass:p=l,appearToClass:d=a,leaveFromClass:m=`${s}-leave-from`,leaveActiveClass:b=`${s}-leave-active`,leaveToClass:y=`${s}-leave-to`}=e,T=tu(o),O=T&&T[0],q=T&&T[1],{onBeforeEnter:U,onEnter:I,onEnterCancelled:F,onLeave:j,onLeaveCancelled:Z,onBeforeAppear:K=U,onAppear:_=I,onAppearCancelled:P=F}=t,w=(L,oe,he,ye)=>{L._enterCancelled=ye,Xt(L,oe?d:a),Xt(L,oe?p:l),he&&he()},B=(L,oe)=>{L._isLeaving=!1,Xt(L,m),Xt(L,y),Xt(L,b),oe&&oe()},Q=L=>(oe,he)=>{const ye=L?_:I,me=()=>w(oe,L,he);Jt(ye,[oe,me]),Cr(()=>{Xt(oe,L?c:r),kt(oe,L?d:a),kr(ye)||Sr(oe,n,O,me)})};return Oe(t,{onBeforeEnter(L){Jt(U,[L]),kt(L,r),kt(L,l)},onBeforeAppear(L){Jt(K,[L]),kt(L,c),kt(L,p)},onEnter:Q(!1),onAppear:Q(!0),onLeave(L,oe){L._isLeaving=!0;const he=()=>B(L,oe);kt(L,m),L._enterCancelled?(kt(L,b),Tr(L)):(Tr(L),kt(L,b)),Cr(()=>{L._isLeaving&&(Xt(L,m),kt(L,y),kr(j)||Sr(L,n,q,he))}),Jt(j,[L,he])},onEnterCancelled(L){w(L,!1,void 0,!0),Jt(F,[L])},onAppearCancelled(L){w(L,!0,void 0,!0),Jt(P,[L])},onLeaveCancelled(L){B(L),Jt(Z,[L])}})}function tu(e){if(e==null)return null;if(fe(e))return[qn(e.enter),qn(e.leave)];{const t=qn(e);return[t,t]}}function qn(e){return sa(e)}function kt(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.add(s)),(e[Us]||(e[Us]=new Set)).add(t)}function Xt(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.remove(n));const s=e[Us];s&&(s.delete(t),s.size||(e[Us]=void 0))}function Cr(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let su=0;function Sr(e,t,s,n){const o=e._endId=++su,r=()=>{o===e._endId&&n()};if(s!=null)return setTimeout(r,s);const{type:l,timeout:a,propCount:c}=nu(e,t);if(!l)return n();const p=l+"end";let d=0;const m=()=>{e.removeEventListener(p,b),r()},b=y=>{y.target===e&&++d>=c&&m()};setTimeout(()=>{d<c&&m()},a+1),e.addEventListener(p,b)}function nu(e,t){const s=window.getComputedStyle(e),n=T=>(s[T]||"").split(", "),o=n(`${It}Delay`),r=n(`${It}Duration`),l=Er(o,r),a=n(`${ks}Delay`),c=n(`${ks}Duration`),p=Er(a,c);let d=null,m=0,b=0;t===It?l>0&&(d=It,m=l,b=r.length):t===ks?p>0&&(d=ks,m=p,b=c.length):(m=Math.max(l,p),d=m>0?l>p?It:ks:null,b=d?d===It?r.length:c.length:0);const y=d===It&&/\b(?:transform|all)(?:,|$)/.test(n(`${It}Property`).toString());return{type:d,timeout:m,propCount:b,hasTransform:y}}function Er(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((s,n)=>Ar(s)+Ar(e[n])))}function Ar(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Tr(e){return(e?e.ownerDocument:document).body.offsetHeight}function ou(e,t,s){const n=e[Us];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}const bn=Symbol("_vod"),_l=Symbol("_vsh"),ru={name:"show",beforeMount(e,{value:t},{transition:s}){e[bn]=e.style.display==="none"?"":e.style.display,s&&t?s.beforeEnter(e):Cs(e,t)},mounted(e,{value:t},{transition:s}){s&&t&&s.enter(e)},updated(e,{value:t,oldValue:s},{transition:n}){!t!=!s&&(n?t?(n.beforeEnter(e),Cs(e,!0),n.enter(e)):n.leave(e,()=>{Cs(e,!1)}):Cs(e,t))},beforeUnmount(e,{value:t}){Cs(e,t)}};function Cs(e,t){e.style.display=t?e[bn]:"none",e[_l]=!t}const iu=Symbol(""),lu=/(?:^|;)\s*display\s*:/;function au(e,t,s){const n=e.style,o=Ae(s);let r=!1;if(s&&!o){if(t)if(Ae(t))for(const l of t.split(";")){const a=l.slice(0,l.indexOf(":")).trim();s[a]==null&&on(n,a,"")}else for(const l in t)s[l]==null&&on(n,l,"");for(const l in s)l==="display"&&(r=!0),on(n,l,s[l])}else if(o){if(t!==s){const l=n[iu];l&&(s+=";"+l),n.cssText=s,r=lu.test(s)}}else t&&e.removeAttribute("style");bn in e&&(e[bn]=r?n.display:"",e[_l]&&(n.display="none"))}const $r=/\s*!important$/;function on(e,t,s){if(X(s))s.forEach(n=>on(e,t,n));else if(s==null&&(s=""),t.startsWith("--"))e.setProperty(t,s);else{const n=cu(e,t);$r.test(s)?e.setProperty(Kt(n),s.replace($r,""),"important"):e[n]=s}}const Rr=["Webkit","Moz","ms"],Wn={};function cu(e,t){const s=Wn[t];if(s)return s;let n=nt(t);if(n!=="filter"&&n in e)return Wn[t]=n;n=wn(n);for(let o=0;o<Rr.length;o++){const r=Rr[o]+n;if(r in e)return Wn[t]=r}return t}const Mr="http://www.w3.org/1999/xlink";function Or(e,t,s,n,o,r=aa(t)){n&&t.startsWith("xlink:")?s==null?e.removeAttributeNS(Mr,t.slice(6,t.length)):e.setAttributeNS(Mr,t,s):s==null||r&&!mi(s)?e.removeAttribute(t):e.setAttribute(t,r?"":yt(s)?String(s):s)}function Br(e,t,s,n,o){if(t==="innerHTML"||t==="textContent"){s!=null&&(e[t]=t==="innerHTML"?yl(s):s);return}const r=e.tagName;if(t==="value"&&r!=="PROGRESS"&&!r.includes("-")){const a=r==="OPTION"?e.getAttribute("value")||"":e.value,c=s==null?e.type==="checkbox"?"on":"":String(s);(a!==c||!("_value"in e))&&(e.value=c),s==null&&e.removeAttribute(t),e._value=s;return}let l=!1;if(s===""||s==null){const a=typeof e[t];a==="boolean"?s=mi(s):s==null&&a==="string"?(s="",l=!0):a==="number"&&(s=0,l=!0)}try{e[t]=s}catch{}l&&e.removeAttribute(o||t)}function $t(e,t,s,n){e.addEventListener(t,s,n)}function uu(e,t,s,n){e.removeEventListener(t,s,n)}const Nr=Symbol("_vei");function du(e,t,s,n,o=null){const r=e[Nr]||(e[Nr]={}),l=r[t];if(n&&l)l.value=n;else{const[a,c]=fu(t);if(n){const p=r[t]=mu(n,o);$t(e,a,p,c)}else l&&(uu(e,a,l,c),r[t]=void 0)}}const Pr=/(?:Once|Passive|Capture)$/;function fu(e){let t;if(Pr.test(e)){t={};let n;for(;n=e.match(Pr);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Kt(e.slice(2)),t]}let Kn=0;const hu=Promise.resolve(),pu=()=>Kn||(hu.then(()=>Kn=0),Kn=Date.now());function mu(e,t){const s=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=s.attached)return;ct(gu(n,s.value),t,5,[n])};return s.value=e,s.attached=pu(),s}function gu(e,t){if(X(t)){const s=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{s.call(e),e._stopped=!0},t.map(n=>o=>!o._stopped&&n&&n(o))}else return t}const Ir=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,vu=(e,t,s,n,o,r)=>{const l=o==="svg";t==="class"?ou(e,n,l):t==="style"?au(e,s,n):xn(t)?To(t)||du(e,t,s,n,r):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):bu(e,t,n,l))?(Br(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Or(e,t,n,l,r,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!Ae(n))?Br(e,nt(t),n,r,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),Or(e,t,n,l))};function bu(e,t,s,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&Ir(t)&&se(s));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const o=e.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="SOURCE")return!1}return Ir(t)&&Ae(s)?!1:t in e}const Wt=e=>{const t=e.props["onUpdate:modelValue"]||!1;return X(t)?s=>en(t,s):t};function xu(e){e.target.composing=!0}function Lr(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const st=Symbol("_assign");function Dr(e,t,s){return t&&(e=e.trim()),s&&(e=_n(e)),e}const Fe={created(e,{modifiers:{lazy:t,trim:s,number:n}},o){e[st]=Wt(o);const r=n||o.props&&o.props.type==="number";$t(e,t?"change":"input",l=>{l.target.composing||e[st](Dr(e.value,s,r))}),(s||r)&&$t(e,"change",()=>{e.value=Dr(e.value,s,r)}),t||($t(e,"compositionstart",xu),$t(e,"compositionend",Lr),$t(e,"change",Lr))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:s,modifiers:{lazy:n,trim:o,number:r}},l){if(e[st]=Wt(l),e.composing)return;const a=(r||e.type==="number")&&!/^0\d/.test(e.value)?_n(e.value):e.value,c=t??"";a!==c&&(document.activeElement===e&&e.type!=="range"&&(n&&t===s||o&&e.value.trim()===c)||(e.value=c))}},mo={deep:!0,created(e,t,s){e[st]=Wt(s),$t(e,"change",()=>{const n=e._modelValue,o=ps(e),r=e.checked,l=e[st];if(X(n)){const a=Mo(n,o),c=a!==-1;if(r&&!c)l(n.concat(o));else if(!r&&c){const p=[...n];p.splice(a,1),l(p)}}else if(vs(n)){const a=new Set(n);r?a.add(o):a.delete(o),l(a)}else l(kl(e,r))})},mounted:jr,beforeUpdate(e,t,s){e[st]=Wt(s),jr(e,t,s)}};function jr(e,{value:t,oldValue:s},n){e._modelValue=t;let o;if(X(t))o=Mo(t,n.props.value)>-1;else if(vs(t))o=t.has(n.props.value);else{if(t===s)return;o=zt(t,kl(e,!0))}e.checked!==o&&(e.checked=o)}const rn={created(e,{value:t},s){e.checked=zt(t,s.props.value),e[st]=Wt(s),$t(e,"change",()=>{e[st](ps(e))})},beforeUpdate(e,{value:t,oldValue:s},n){e[st]=Wt(n),t!==s&&(e.checked=zt(t,n.props.value))}},go={deep:!0,created(e,{value:t,modifiers:{number:s}},n){const o=vs(t);$t(e,"change",()=>{const r=Array.prototype.filter.call(e.options,l=>l.selected).map(l=>s?_n(ps(l)):ps(l));e[st](e.multiple?o?new Set(r):r:r[0]),e._assigning=!0,Rt(()=>{e._assigning=!1})}),e[st]=Wt(n)},mounted(e,{value:t}){Vr(e,t)},beforeUpdate(e,t,s){e[st]=Wt(s)},updated(e,{value:t}){e._assigning||Vr(e,t)}};function Vr(e,t){const s=e.multiple,n=X(t);if(!(s&&!n&&!vs(t))){for(let o=0,r=e.options.length;o<r;o++){const l=e.options[o],a=ps(l);if(s)if(n){const c=typeof a;c==="string"||c==="number"?l.selected=t.some(p=>String(p)===String(a)):l.selected=Mo(t,a)>-1}else l.selected=t.has(a);else if(zt(ps(l),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!s&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function ps(e){return"_value"in e?e._value:e.value}function kl(e,t){const s=t?"_trueValue":"_falseValue";return s in e?e[s]:t}const yu={created(e,t,s){Xs(e,t,s,null,"created")},mounted(e,t,s){Xs(e,t,s,null,"mounted")},beforeUpdate(e,t,s,n){Xs(e,t,s,n,"beforeUpdate")},updated(e,t,s,n){Xs(e,t,s,n,"updated")}};function wu(e,t){switch(e){case"SELECT":return go;case"TEXTAREA":return Fe;default:switch(t){case"checkbox":return mo;case"radio":return rn;default:return Fe}}}function Xs(e,t,s,n,o){const l=wu(e.tagName,s.props&&s.props.type)[o];l&&l(e,t,s,n)}const _u=["ctrl","shift","alt","meta"],ku={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>_u.some(s=>e[`${s}Key`]&&!t.includes(s))},On=(e,t)=>{if(!e)return e;const s=e._withMods||(e._withMods={}),n=t.join(".");return s[n]||(s[n]=((o,...r)=>{for(let l=0;l<t.length;l++){const a=ku[t[l]];if(a&&a(o,t))return}return e(o,...r)}))},Cu={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Hr=(e,t)=>{const s=e._withKeys||(e._withKeys={}),n=t.join(".");return s[n]||(s[n]=(o=>{if(!("key"in o))return;const r=Kt(o.key);if(t.some(l=>l===r||Cu[l]===r))return e(o)}))},Su=Oe({patchProp:vu},Xc);let Fr;function Eu(){return Fr||(Fr=$c(Su))}const Au=((...e)=>{const t=Eu().createApp(...e),{mount:s}=t;return t.mount=n=>{const o=$u(n);if(!o)return;const r=t._component;!se(r)&&!r.render&&!r.template&&(r.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const l=s(o,!1,Tu(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),l},t});function Tu(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function $u(e){return Ae(e)?document.querySelector(e):e}const Ru="/icon.png";const ls=typeof document<"u";function Cl(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Mu(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&Cl(e.default)}const ue=Object.assign;function Gn(e,t){const s={};for(const n in t){const o=t[n];s[n]=ut(o)?o.map(e):e(o)}return s}const Is=()=>{},ut=Array.isArray;function Ur(e,t){const s={};for(const n in e)s[n]=n in t?t[n]:e[n];return s}let Ce=(function(e){return e[e.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",e[e.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",e[e.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",e[e.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",e[e.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",e})({});const Sl=Symbol("");Ce.MATCHER_NOT_FOUND+"",Ce.NAVIGATION_GUARD_REDIRECT+"",Ce.NAVIGATION_ABORTED+"",Ce.NAVIGATION_CANCELLED+"",Ce.NAVIGATION_DUPLICATED+"";function ms(e,t){return ue(new Error,{type:e,[Sl]:!0},t)}function Ct(e,t){return e instanceof Error&&Sl in e&&(t==null||!!(e.type&t))}const Ou=["params","query","hash"];function Bu(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const s of Ou)s in e&&(t[s]=e[s]);return JSON.stringify(t,null,2)}const Nu=Symbol(""),zr=Symbol(""),Bn=Symbol(""),zo=Symbol(""),vo=Symbol("");function El(){return lt(Bn)}function Pu(e){return lt(zo)}const Al=/#/g,Iu=/&/g,Lu=/\//g,Du=/=/g,ju=/\?/g,Tl=/\+/g,Vu=/%5B/g,Hu=/%5D/g,$l=/%5E/g,Fu=/%60/g,Rl=/%7B/g,Uu=/%7C/g,Ml=/%7D/g,zu=/%20/g;function qo(e){return e==null?"":encodeURI(""+e).replace(Uu,"|").replace(Vu,"[").replace(Hu,"]")}function qu(e){return qo(e).replace(Rl,"{").replace(Ml,"}").replace($l,"^")}function bo(e){return qo(e).replace(Tl,"%2B").replace(zu,"+").replace(Al,"%23").replace(Iu,"%26").replace(Fu,"`").replace(Rl,"{").replace(Ml,"}").replace($l,"^")}function Wu(e){return bo(e).replace(Du,"%3D")}function Ku(e){return qo(e).replace(Al,"%23").replace(ju,"%3F")}function Gu(e){return Ku(e).replace(Lu,"%2F")}function zs(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const Yu=/\/$/,Ju=e=>e.replace(Yu,"");function Yn(e,t,s="/"){let n,o={},r="",l="";const a=t.indexOf("#");let c=t.indexOf("?");return c=a>=0&&c>a?-1:c,c>=0&&(n=t.slice(0,c),r=t.slice(c,a>0?a:t.length),o=e(r.slice(1))),a>=0&&(n=n||t.slice(0,a),l=t.slice(a,t.length)),n=ed(n??t,s),{fullPath:n+r+l,path:n,query:o,hash:zs(l)}}function Xu(e,t){const s=t.query?e(t.query):"";return t.path+(s&&"?")+s+(t.hash||"")}function qr(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function Qu(e,t,s){const n=t.matched.length-1,o=s.matched.length-1;return n>-1&&n===o&&gs(t.matched[n],s.matched[o])&&Ol(t.params,s.params)&&e(t.query)===e(s.query)&&t.hash===s.hash}function gs(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Ol(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var s in e)if(!Zu(e[s],t[s]))return!1;return!0}function Zu(e,t){return ut(e)?Wr(e,t):ut(t)?Wr(t,e):(e&&e.valueOf())===(t&&t.valueOf())}function Wr(e,t){return ut(t)?e.length===t.length&&e.every((s,n)=>s===t[n]):e.length===1&&e[0]===t}function ed(e,t){if(e.startsWith("/"))return e;if(!e)return t;const s=t.split("/"),n=e.split("/"),o=n[n.length-1];(o===".."||o===".")&&n.push("");let r=s.length-1,l,a;for(l=0;l<n.length;l++)if(a=n[l],a!==".")if(a==="..")r>1&&r--;else break;return s.slice(0,r).join("/")+"/"+n.slice(l).join("/")}const Lt={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let xo=(function(e){return e.pop="pop",e.push="push",e})({}),Jn=(function(e){return e.back="back",e.forward="forward",e.unknown="",e})({});function td(e){if(!e)if(ls){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),Ju(e)}const sd=/^[^#]+#/;function nd(e,t){return e.replace(sd,"#")+t}function od(e,t){const s=document.documentElement.getBoundingClientRect(),n=e.getBoundingClientRect();return{behavior:t.behavior,left:n.left-s.left-(t.left||0),top:n.top-s.top-(t.top||0)}}const Nn=()=>({left:window.scrollX,top:window.scrollY});function rd(e){let t;if("el"in e){const s=e.el,n=typeof s=="string"&&s.startsWith("#"),o=typeof s=="string"?n?document.getElementById(s.slice(1)):document.querySelector(s):s;if(!o)return;t=od(o,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function Kr(e,t){return(history.state?history.state.position-t:-1)+e}const yo=new Map;function id(e,t){yo.set(e,t)}function ld(e){const t=yo.get(e);return yo.delete(e),t}function ad(e){return typeof e=="string"||e&&typeof e=="object"}function Bl(e){return typeof e=="string"||typeof e=="symbol"}function cd(e){const t={};if(e===""||e==="?")return t;const s=(e[0]==="?"?e.slice(1):e).split("&");for(let n=0;n<s.length;++n){const o=s[n].replace(Tl," "),r=o.indexOf("="),l=zs(r<0?o:o.slice(0,r)),a=r<0?null:zs(o.slice(r+1));if(l in t){let c=t[l];ut(c)||(c=t[l]=[c]),c.push(a)}else t[l]=a}return t}function Gr(e){let t="";for(let s in e){const n=e[s];if(s=Wu(s),n==null){n!==void 0&&(t+=(t.length?"&":"")+s);continue}(ut(n)?n.map(o=>o&&bo(o)):[n&&bo(n)]).forEach(o=>{o!==void 0&&(t+=(t.length?"&":"")+s,o!=null&&(t+="="+o))})}return t}function ud(e){const t={};for(const s in e){const n=e[s];n!==void 0&&(t[s]=ut(n)?n.map(o=>o==null?null:""+o):n==null?n:""+n)}return t}function Ss(){let e=[];function t(n){return e.push(n),()=>{const o=e.indexOf(n);o>-1&&e.splice(o,1)}}function s(){e=[]}return{add:t,list:()=>e.slice(),reset:s}}function Vt(e,t,s,n,o,r=l=>l()){const l=n&&(n.enterCallbacks[o]=n.enterCallbacks[o]||[]);return()=>new Promise((a,c)=>{const p=b=>{b===!1?c(ms(Ce.NAVIGATION_ABORTED,{from:s,to:t})):b instanceof Error?c(b):ad(b)?c(ms(Ce.NAVIGATION_GUARD_REDIRECT,{from:t,to:b})):(l&&n.enterCallbacks[o]===l&&typeof b=="function"&&l.push(b),a())},d=r(()=>e.call(n&&n.instances[o],t,s,p));let m=Promise.resolve(d);e.length<3&&(m=m.then(p)),m.catch(b=>c(b))})}function Xn(e,t,s,n,o=r=>r()){const r=[];for(const l of e)for(const a in l.components){let c=l.components[a];if(!(t!=="beforeRouteEnter"&&!l.instances[a]))if(Cl(c)){const p=(c.__vccOpts||c)[t];p&&r.push(Vt(p,s,n,l,a,o))}else{let p=c();r.push(()=>p.then(d=>{if(!d)throw new Error(`Couldn't resolve component "${a}" at "${l.path}"`);const m=Mu(d)?d.default:d;l.mods[a]=d,l.components[a]=m;const b=(m.__vccOpts||m)[t];return b&&Vt(b,s,n,l,a,o)()}))}}return r}function dd(e,t){const s=[],n=[],o=[],r=Math.max(t.matched.length,e.matched.length);for(let l=0;l<r;l++){const a=t.matched[l];a&&(e.matched.find(p=>gs(p,a))?n.push(a):s.push(a));const c=e.matched[l];c&&(t.matched.find(p=>gs(p,c))||o.push(c))}return[s,n,o]}let fd=()=>location.protocol+"//"+location.host;function Nl(e,t){const{pathname:s,search:n,hash:o}=t,r=e.indexOf("#");if(r>-1){let l=o.includes(e.slice(r))?e.slice(r).length:1,a=o.slice(l);return a[0]!=="/"&&(a="/"+a),qr(a,"")}return qr(s,e)+n+o}function hd(e,t,s,n){let o=[],r=[],l=null;const a=({state:b})=>{const y=Nl(e,location),T=s.value,O=t.value;let q=0;if(b){if(s.value=y,t.value=b,l&&l===T){l=null;return}q=O?b.position-O.position:0}else n(y);o.forEach(U=>{U(s.value,T,{delta:q,type:xo.pop,direction:q?q>0?Jn.forward:Jn.back:Jn.unknown})})};function c(){l=s.value}function p(b){o.push(b);const y=()=>{const T=o.indexOf(b);T>-1&&o.splice(T,1)};return r.push(y),y}function d(){if(document.visibilityState==="hidden"){const{history:b}=window;if(!b.state)return;b.replaceState(ue({},b.state,{scroll:Nn()}),"")}}function m(){for(const b of r)b();r=[],window.removeEventListener("popstate",a),window.removeEventListener("pagehide",d),document.removeEventListener("visibilitychange",d)}return window.addEventListener("popstate",a),window.addEventListener("pagehide",d),document.addEventListener("visibilitychange",d),{pauseListeners:c,listen:p,destroy:m}}function Yr(e,t,s,n=!1,o=!1){return{back:e,current:t,forward:s,replaced:n,position:window.history.length,scroll:o?Nn():null}}function pd(e){const{history:t,location:s}=window,n={value:Nl(e,s)},o={value:t.state};o.value||r(n.value,{back:null,current:n.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function r(c,p,d){const m=e.indexOf("#"),b=m>-1?(s.host&&document.querySelector("base")?e:e.slice(m))+c:fd()+e+c;try{t[d?"replaceState":"pushState"](p,"",b),o.value=p}catch(y){console.error(y),s[d?"replace":"assign"](b)}}function l(c,p){r(c,ue({},t.state,Yr(o.value.back,c,o.value.forward,!0),p,{position:o.value.position}),!0),n.value=c}function a(c,p){const d=ue({},o.value,t.state,{forward:c,scroll:Nn()});r(d.current,d,!0),r(c,ue({},Yr(n.value,c,null),{position:d.position+1},p),!1),n.value=c}return{location:n,state:o,push:a,replace:l}}function md(e){e=td(e);const t=pd(e),s=hd(e,t.state,t.location,t.replace);function n(r,l=!0){l||s.pauseListeners(),history.go(r)}const o=ue({location:"",base:e,go:n,createHref:nd.bind(null,e)},t,s);return Object.defineProperty(o,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(o,"state",{enumerable:!0,get:()=>t.state.value}),o}let es=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e})({});var Me=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e})(Me||{});const gd={type:es.Static,value:""},vd=/[a-zA-Z0-9_]/;function bd(e){if(!e)return[[]];if(e==="/")return[[gd]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(y){throw new Error(`ERR (${s})/"${p}": ${y}`)}let s=Me.Static,n=s;const o=[];let r;function l(){r&&o.push(r),r=[]}let a=0,c,p="",d="";function m(){p&&(s===Me.Static?r.push({type:es.Static,value:p}):s===Me.Param||s===Me.ParamRegExp||s===Me.ParamRegExpEnd?(r.length>1&&(c==="*"||c==="+")&&t(`A repeatable param (${p}) must be alone in its segment. eg: '/:ids+.`),r.push({type:es.Param,value:p,regexp:d,repeatable:c==="*"||c==="+",optional:c==="*"||c==="?"})):t("Invalid state to consume buffer"),p="")}function b(){p+=c}for(;a<e.length;){if(c=e[a++],c==="\\"&&s!==Me.ParamRegExp){n=s,s=Me.EscapeNext;continue}switch(s){case Me.Static:c==="/"?(p&&m(),l()):c===":"?(m(),s=Me.Param):b();break;case Me.EscapeNext:b(),s=n;break;case Me.Param:c==="("?s=Me.ParamRegExp:vd.test(c)?b():(m(),s=Me.Static,c!=="*"&&c!=="?"&&c!=="+"&&a--);break;case Me.ParamRegExp:c===")"?d[d.length-1]=="\\"?d=d.slice(0,-1)+c:s=Me.ParamRegExpEnd:d+=c;break;case Me.ParamRegExpEnd:m(),s=Me.Static,c!=="*"&&c!=="?"&&c!=="+"&&a--,d="";break;default:t("Unknown state");break}}return s===Me.ParamRegExp&&t(`Unfinished custom RegExp for param "${p}"`),m(),l(),o}const Jr="[^/]+?",xd={sensitive:!1,strict:!1,start:!0,end:!0};var Ve=(function(e){return e[e._multiplier=10]="_multiplier",e[e.Root=90]="Root",e[e.Segment=40]="Segment",e[e.SubSegment=30]="SubSegment",e[e.Static=40]="Static",e[e.Dynamic=20]="Dynamic",e[e.BonusCustomRegExp=10]="BonusCustomRegExp",e[e.BonusWildcard=-50]="BonusWildcard",e[e.BonusRepeatable=-20]="BonusRepeatable",e[e.BonusOptional=-8]="BonusOptional",e[e.BonusStrict=.7000000000000001]="BonusStrict",e[e.BonusCaseSensitive=.25]="BonusCaseSensitive",e})(Ve||{});const yd=/[.+*?^${}()[\]/\\]/g;function wd(e,t){const s=ue({},xd,t),n=[];let o=s.start?"^":"";const r=[];for(const p of e){const d=p.length?[]:[Ve.Root];s.strict&&!p.length&&(o+="/");for(let m=0;m<p.length;m++){const b=p[m];let y=Ve.Segment+(s.sensitive?Ve.BonusCaseSensitive:0);if(b.type===es.Static)m||(o+="/"),o+=b.value.replace(yd,"\\$&"),y+=Ve.Static;else if(b.type===es.Param){const{value:T,repeatable:O,optional:q,regexp:U}=b;r.push({name:T,repeatable:O,optional:q});const I=U||Jr;if(I!==Jr){y+=Ve.BonusCustomRegExp;try{new RegExp(`(${I})`)}catch(j){throw new Error(`Invalid custom RegExp for param "${T}" (${I}): `+j.message)}}let F=O?`((?:${I})(?:/(?:${I}))*)`:`(${I})`;m||(F=q&&p.length<2?`(?:/${F})`:"/"+F),q&&(F+="?"),o+=F,y+=Ve.Dynamic,q&&(y+=Ve.BonusOptional),O&&(y+=Ve.BonusRepeatable),I===".*"&&(y+=Ve.BonusWildcard)}d.push(y)}n.push(d)}if(s.strict&&s.end){const p=n.length-1;n[p][n[p].length-1]+=Ve.BonusStrict}s.strict||(o+="/?"),s.end?o+="$":s.strict&&!o.endsWith("/")&&(o+="(?:/|$)");const l=new RegExp(o,s.sensitive?"":"i");function a(p){const d=p.match(l),m={};if(!d)return null;for(let b=1;b<d.length;b++){const y=d[b]||"",T=r[b-1];m[T.name]=y&&T.repeatable?y.split("/"):y}return m}function c(p){let d="",m=!1;for(const b of e){(!m||!d.endsWith("/"))&&(d+="/"),m=!1;for(const y of b)if(y.type===es.Static)d+=y.value;else if(y.type===es.Param){const{value:T,repeatable:O,optional:q}=y,U=T in p?p[T]:"";if(ut(U)&&!O)throw new Error(`Provided param "${T}" is an array but it is not repeatable (* or + modifiers)`);const I=ut(U)?U.join("/"):U;if(!I)if(q)b.length<2&&(d.endsWith("/")?d=d.slice(0,-1):m=!0);else throw new Error(`Missing required param "${T}"`);d+=I}}return d||"/"}return{re:l,score:n,keys:r,parse:a,stringify:c}}function _d(e,t){let s=0;for(;s<e.length&&s<t.length;){const n=t[s]-e[s];if(n)return n;s++}return e.length<t.length?e.length===1&&e[0]===Ve.Static+Ve.Segment?-1:1:e.length>t.length?t.length===1&&t[0]===Ve.Static+Ve.Segment?1:-1:0}function Pl(e,t){let s=0;const n=e.score,o=t.score;for(;s<n.length&&s<o.length;){const r=_d(n[s],o[s]);if(r)return r;s++}if(Math.abs(o.length-n.length)===1){if(Xr(n))return 1;if(Xr(o))return-1}return o.length-n.length}function Xr(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const kd={strict:!1,end:!0,sensitive:!1};function Cd(e,t,s){const n=wd(bd(e.path),s),o=ue(n,{record:e,parent:t,children:[],alias:[]});return t&&!o.record.aliasOf==!t.record.aliasOf&&t.children.push(o),o}function Sd(e,t){const s=[],n=new Map;t=Ur(kd,t);function o(m){return n.get(m)}function r(m,b,y){const T=!y,O=Zr(m);O.aliasOf=y&&y.record;const q=Ur(t,m),U=[O];if("alias"in m){const j=typeof m.alias=="string"?[m.alias]:m.alias;for(const Z of j)U.push(Zr(ue({},O,{components:y?y.record.components:O.components,path:Z,aliasOf:y?y.record:O})))}let I,F;for(const j of U){const{path:Z}=j;if(b&&Z[0]!=="/"){const K=b.record.path,_=K[K.length-1]==="/"?"":"/";j.path=b.record.path+(Z&&_+Z)}if(I=Cd(j,b,q),y?y.alias.push(I):(F=F||I,F!==I&&F.alias.push(I),T&&m.name&&!ei(I)&&l(m.name)),Il(I)&&c(I),O.children){const K=O.children;for(let _=0;_<K.length;_++)r(K[_],I,y&&y.children[_])}y=y||I}return F?()=>{l(F)}:Is}function l(m){if(Bl(m)){const b=n.get(m);b&&(n.delete(m),s.splice(s.indexOf(b),1),b.children.forEach(l),b.alias.forEach(l))}else{const b=s.indexOf(m);b>-1&&(s.splice(b,1),m.record.name&&n.delete(m.record.name),m.children.forEach(l),m.alias.forEach(l))}}function a(){return s}function c(m){const b=Td(m,s);s.splice(b,0,m),m.record.name&&!ei(m)&&n.set(m.record.name,m)}function p(m,b){let y,T={},O,q;if("name"in m&&m.name){if(y=n.get(m.name),!y)throw ms(Ce.MATCHER_NOT_FOUND,{location:m});q=y.record.name,T=ue(Qr(b.params,y.keys.filter(F=>!F.optional).concat(y.parent?y.parent.keys.filter(F=>F.optional):[]).map(F=>F.name)),m.params&&Qr(m.params,y.keys.map(F=>F.name))),O=y.stringify(T)}else if(m.path!=null)O=m.path,y=s.find(F=>F.re.test(O)),y&&(T=y.parse(O),q=y.record.name);else{if(y=b.name?n.get(b.name):s.find(F=>F.re.test(b.path)),!y)throw ms(Ce.MATCHER_NOT_FOUND,{location:m,currentLocation:b});q=y.record.name,T=ue({},b.params,m.params),O=y.stringify(T)}const U=[];let I=y;for(;I;)U.unshift(I.record),I=I.parent;return{name:q,path:O,params:T,matched:U,meta:Ad(U)}}e.forEach(m=>r(m));function d(){s.length=0,n.clear()}return{addRoute:r,resolve:p,removeRoute:l,clearRoutes:d,getRoutes:a,getRecordMatcher:o}}function Qr(e,t){const s={};for(const n of t)n in e&&(s[n]=e[n]);return s}function Zr(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:Ed(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function Ed(e){const t={},s=e.props||!1;if("component"in e)t.default=s;else for(const n in e.components)t[n]=typeof s=="object"?s[n]:s;return t}function ei(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Ad(e){return e.reduce((t,s)=>ue(t,s.meta),{})}function Td(e,t){let s=0,n=t.length;for(;s!==n;){const r=s+n>>1;Pl(e,t[r])<0?n=r:s=r+1}const o=$d(e);return o&&(n=t.lastIndexOf(o,n-1)),n}function $d(e){let t=e;for(;t=t.parent;)if(Il(t)&&Pl(e,t)===0)return t}function Il({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function ti(e){const t=lt(Bn),s=lt(zo),n=Ie(()=>{const c=us(e.to);return t.resolve(c)}),o=Ie(()=>{const{matched:c}=n.value,{length:p}=c,d=c[p-1],m=s.matched;if(!d||!m.length)return-1;const b=m.findIndex(gs.bind(null,d));if(b>-1)return b;const y=si(c[p-2]);return p>1&&si(d)===y&&m[m.length-1].path!==y?m.findIndex(gs.bind(null,c[p-2])):b}),r=Ie(()=>o.value>-1&&Nd(s.params,n.value.params)),l=Ie(()=>o.value>-1&&o.value===s.matched.length-1&&Ol(s.params,n.value.params));function a(c={}){if(Bd(c)){const p=t[us(e.replace)?"replace":"push"](us(e.to)).catch(Is);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>p),p}return Promise.resolve()}return{route:n,href:Ie(()=>n.value.href),isActive:r,isExactActive:l,navigate:a}}function Rd(e){return e.length===1?e[0]:e}const Md=Gi({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:ti,setup(e,{slots:t}){const s=Sn(ti(e)),{options:n}=lt(Bn),o=Ie(()=>({[ni(e.activeClass,n.linkActiveClass,"router-link-active")]:s.isActive,[ni(e.exactActiveClass,n.linkExactActiveClass,"router-link-exact-active")]:s.isExactActive}));return()=>{const r=t.default&&Rd(t.default(s));return e.custom?r:Uo("a",{"aria-current":s.isExactActive?e.ariaCurrentValue:null,href:s.href,onClick:s.navigate,class:o.value},r)}}}),Od=Md;function Bd(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function Nd(e,t){for(const s in t){const n=t[s],o=e[s];if(typeof n=="string"){if(n!==o)return!1}else if(!ut(o)||o.length!==n.length||n.some((r,l)=>r.valueOf()!==o[l].valueOf()))return!1}return!0}function si(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const ni=(e,t,s)=>e??t??s,Pd=Gi({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:s}){const n=lt(vo),o=Ie(()=>e.route||n.value),r=lt(zr,0),l=Ie(()=>{let p=us(r);const{matched:d}=o.value;let m;for(;(m=d[p])&&!m.components;)p++;return p}),a=Ie(()=>o.value.matched[l.value]);tn(zr,Ie(()=>l.value+1)),tn(Nu,a),tn(vo,o);const c=W();return Ft(()=>[c.value,a.value,e.name],([p,d,m],[b,y,T])=>{d&&(d.instances[m]=p,y&&y!==d&&p&&p===b&&(d.leaveGuards.size||(d.leaveGuards=y.leaveGuards),d.updateGuards.size||(d.updateGuards=y.updateGuards))),p&&d&&(!y||!gs(d,y)||!b)&&(d.enterCallbacks[m]||[]).forEach(O=>O(p))},{flush:"post"}),()=>{const p=o.value,d=e.name,m=a.value,b=m&&m.components[d];if(!b)return oi(s.default,{Component:b,route:p});const y=m.props[d],T=y?y===!0?p.params:typeof y=="function"?y(p):y:null,q=Uo(b,ue({},T,t,{onVnodeUnmounted:U=>{U.component.isUnmounted&&(m.instances[d]=null)},ref:c}));return oi(s.default,{Component:q,route:p})||q}}});function oi(e,t){if(!e)return null;const s=e(t);return s.length===1?s[0]:s}const Id=Pd;function Ld(e){const t=Sd(e.routes,e),s=e.parseQuery||cd,n=e.stringifyQuery||Gr,o=e.history,r=Ss(),l=Ss(),a=Ss(),c=Ma(Lt);let p=Lt;ls&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const d=Gn.bind(null,M=>""+M),m=Gn.bind(null,Gu),b=Gn.bind(null,zs);function y(M,A){let h,f;return Bl(M)?(h=t.getRecordMatcher(M),f=A):f=M,t.addRoute(f,h)}function T(M){const A=t.getRecordMatcher(M);A&&t.removeRoute(A)}function O(){return t.getRoutes().map(M=>M.record)}function q(M){return!!t.getRecordMatcher(M)}function U(M,A){if(A=ue({},A||c.value),typeof M=="string"){const x=Yn(s,M,A.path),k=t.resolve({path:x.path},A),C=o.createHref(x.fullPath);return ue(x,k,{params:b(k.params),hash:zs(x.hash),redirectedFrom:void 0,href:C})}let h;if(M.path!=null)h=ue({},M,{path:Yn(s,M.path,A.path).path});else{const x=ue({},M.params);for(const k in x)x[k]==null&&delete x[k];h=ue({},M,{params:m(x)}),A.params=m(A.params)}const f=t.resolve(h,A),v=M.hash||"";f.params=d(b(f.params));const u=Xu(n,ue({},M,{hash:qu(v),path:f.path})),g=o.createHref(u);return ue({fullPath:u,hash:v,query:n===Gr?ud(M.query):M.query||{}},f,{redirectedFrom:void 0,href:g})}function I(M){return typeof M=="string"?Yn(s,M,c.value.path):ue({},M)}function F(M,A){if(p!==M)return ms(Ce.NAVIGATION_CANCELLED,{from:A,to:M})}function j(M){return _(M)}function Z(M){return j(ue(I(M),{replace:!0}))}function K(M,A){const h=M.matched[M.matched.length-1];if(h&&h.redirect){const{redirect:f}=h;let v=typeof f=="function"?f(M,A):f;return typeof v=="string"&&(v=v.includes("?")||v.includes("#")?v=I(v):{path:v},v.params={}),ue({query:M.query,hash:M.hash,params:v.path!=null?{}:M.params},v)}}function _(M,A){const h=p=U(M),f=c.value,v=M.state,u=M.force,g=M.replace===!0,x=K(h,f);if(x)return _(ue(I(x),{state:typeof x=="object"?ue({},v,x.state):v,force:u,replace:g}),A||h);const k=h;k.redirectedFrom=A;let C;return!u&&Qu(n,f,h)&&(C=ms(Ce.NAVIGATION_DUPLICATED,{to:k,from:f}),Se(f,f,!0,!1)),(C?Promise.resolve(C):B(k,f)).catch($=>Ct($)?Ct($,Ce.NAVIGATION_GUARD_REDIRECT)?$:we($):ne($,k,f)).then($=>{if($){if(Ct($,Ce.NAVIGATION_GUARD_REDIRECT))return _(ue({replace:g},I($.to),{state:typeof $.to=="object"?ue({},v,$.to.state):v,force:u}),A||k)}else $=L(k,f,!0,g,v);return Q(k,f,$),$})}function P(M,A){const h=F(M,A);return h?Promise.reject(h):Promise.resolve()}function w(M){const A=Qe.values().next().value;return A&&typeof A.runWithContext=="function"?A.runWithContext(M):M()}function B(M,A){let h;const[f,v,u]=dd(M,A);h=Xn(f.reverse(),"beforeRouteLeave",M,A);for(const x of f)x.leaveGuards.forEach(k=>{h.push(Vt(k,M,A))});const g=P.bind(null,M,A);return h.push(g),Ee(h).then(()=>{h=[];for(const x of r.list())h.push(Vt(x,M,A));return h.push(g),Ee(h)}).then(()=>{h=Xn(v,"beforeRouteUpdate",M,A);for(const x of v)x.updateGuards.forEach(k=>{h.push(Vt(k,M,A))});return h.push(g),Ee(h)}).then(()=>{h=[];for(const x of u)if(x.beforeEnter)if(ut(x.beforeEnter))for(const k of x.beforeEnter)h.push(Vt(k,M,A));else h.push(Vt(x.beforeEnter,M,A));return h.push(g),Ee(h)}).then(()=>(M.matched.forEach(x=>x.enterCallbacks={}),h=Xn(u,"beforeRouteEnter",M,A,w),h.push(g),Ee(h))).then(()=>{h=[];for(const x of l.list())h.push(Vt(x,M,A));return h.push(g),Ee(h)}).catch(x=>Ct(x,Ce.NAVIGATION_CANCELLED)?x:Promise.reject(x))}function Q(M,A,h){a.list().forEach(f=>w(()=>f(M,A,h)))}function L(M,A,h,f,v){const u=F(M,A);if(u)return u;const g=A===Lt,x=ls?history.state:{};h&&(f||g?o.replace(M.fullPath,ue({scroll:g&&x&&x.scroll},v)):o.push(M.fullPath,v)),c.value=M,Se(M,A,h,g),we()}let oe;function he(){oe||(oe=o.listen((M,A,h)=>{if(!Be.listening)return;const f=U(M),v=K(f,Be.currentRoute.value);if(v){_(ue(v,{replace:!0,force:!0}),f).catch(Is);return}p=f;const u=c.value;ls&&id(Kr(u.fullPath,h.delta),Nn()),B(f,u).catch(g=>Ct(g,Ce.NAVIGATION_ABORTED|Ce.NAVIGATION_CANCELLED)?g:Ct(g,Ce.NAVIGATION_GUARD_REDIRECT)?(_(ue(I(g.to),{force:!0}),f).then(x=>{Ct(x,Ce.NAVIGATION_ABORTED|Ce.NAVIGATION_DUPLICATED)&&!h.delta&&h.type===xo.pop&&o.go(-1,!1)}).catch(Is),Promise.reject()):(h.delta&&o.go(-h.delta,!1),ne(g,f,u))).then(g=>{g=g||L(f,u,!1),g&&(h.delta&&!Ct(g,Ce.NAVIGATION_CANCELLED)?o.go(-h.delta,!1):h.type===xo.pop&&Ct(g,Ce.NAVIGATION_ABORTED|Ce.NAVIGATION_DUPLICATED)&&o.go(-1,!1)),Q(f,u,g)}).catch(Is)}))}let ye=Ss(),me=Ss(),ie;function ne(M,A,h){we(M);const f=me.list();return f.length?f.forEach(v=>v(M,A,h)):console.error(M),Promise.reject(M)}function Te(){return ie&&c.value!==Lt?Promise.resolve():new Promise((M,A)=>{ye.add([M,A])})}function we(M){return ie||(ie=!M,he(),ye.list().forEach(([A,h])=>M?h(M):A()),ye.reset()),M}function Se(M,A,h,f){const{scrollBehavior:v}=e;if(!ls||!v)return Promise.resolve();const u=!h&&ld(Kr(M.fullPath,0))||(f||!h)&&history.state&&history.state.scroll||null;return Rt().then(()=>v(M,A,u)).then(g=>g&&rd(g)).catch(g=>ne(g,M,A))}const ve=M=>o.go(M);let De;const Qe=new Set,Be={currentRoute:c,listening:!0,addRoute:y,removeRoute:T,clearRoutes:t.clearRoutes,hasRoute:q,getRoutes:O,resolve:U,options:e,push:j,replace:Z,go:ve,back:()=>ve(-1),forward:()=>ve(1),beforeEach:r.add,beforeResolve:l.add,afterEach:a.add,onError:me.add,isReady:Te,install(M){M.component("RouterLink",Od),M.component("RouterView",Id),M.config.globalProperties.$router=Be,Object.defineProperty(M.config.globalProperties,"$route",{enumerable:!0,get:()=>us(c)}),ls&&!De&&c.value===Lt&&(De=!0,j(o.location).catch(f=>{}));const A={};for(const f in Lt)Object.defineProperty(A,f,{get:()=>c.value[f],enumerable:!0});M.provide(Bn,Be),M.provide(zo,Oi(A)),M.provide(vo,c);const h=M.unmount;Qe.add(M),M.unmount=function(){Qe.delete(M),Qe.size<1&&(p=Lt,oe&&oe(),oe=null,c.value=Lt,De=!1,ie=!1),h()}}};function Ee(M){return M.reduce((A,h)=>A.then(()=>w(h)),Promise.resolve())}return Be}const Dd={class:"min-h-screen bg-slate-900 text-slate-200 font-sans"},jd={key:0,class:"border-b border-slate-800 bg-slate-900/50 backdrop-blur-xl sticky top-0 z-50"},Vd={class:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8"},Hd={class:"flex justify-between h-16 items-center"},Fd={class:"flex items-center space-x-3"},Ud={class:"flex items-center space-x-1 sm:space-x-2"},zd={__name:"App",setup(e){const t=El(),s=Pu(),n=W(!!localStorage.getItem("pm2me_token"));Ft(s,()=>{n.value=!!localStorage.getItem("pm2me_token")});const o=()=>{localStorage.removeItem("pm2me_token"),n.value=!1,t.push("/login")};return(r,l)=>{const a=rc("router-view");return S(),E("div",Dd,[n.value?(S(),E("nav",jd,[i("div",Vd,[i("div",Hd,[i("div",Fd,[i("img",{src:Ru,alt:"PM2Me",class:"w-8 h-8 rounded-lg shadow-lg shadow-blue-500/30 cursor-pointer",onClick:l[0]||(l[0]=c=>r.$router.push("/"))}),i("span",{class:"text-xl font-bold bg-clip-text text-transparent bg-gradient-to-r from-blue-400 to-indigo-400 cursor-pointer",onClick:l[1]||(l[1]=c=>r.$router.push("/"))},"PM2Me")]),i("div",Ud,[i("button",{onClick:l[2]||(l[2]=c=>r.$router.push("/")),class:re(["flex items-center space-x-2 px-3 py-2 rounded-xl text-sm font-medium transition-all duration-200",r.$route.path==="/"?"bg-blue-600/10 text-blue-400 shadow-sm border border-blue-500/20":"text-slate-400 hover:text-white hover:bg-slate-800"])},[...l[6]||(l[6]=[i("svg",{class:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})],-1),i("span",null,"Home",-1)])],2),i("button",{onClick:[l[3]||(l[3]=c=>r.$router.push("/settings")),l[4]||(l[4]=On(c=>r.$router.push("/nginx"),["prevent"]))],class:re(["flex items-center space-x-2 px-3 py-2 rounded-xl text-sm font-medium transition-all duration-200",r.$route.path==="/nginx"?"bg-blue-600/10 text-blue-400 shadow-sm border border-blue-500/20":"text-slate-400 hover:text-white hover:bg-slate-800"])},[...l[7]||(l[7]=[i("svg",{class:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01"})],-1),i("span",null,"Nginx",-1)])],2),i("button",{onClick:l[5]||(l[5]=c=>r.$router.push("/settings")),class:re(["flex items-center space-x-2 px-3 py-2 rounded-xl text-sm font-medium transition-all duration-200",r.$route.path==="/settings"?"bg-blue-600/10 text-blue-400 shadow-sm border border-blue-500/20":"text-slate-400 hover:text-white hover:bg-slate-800"])},[...l[8]||(l[8]=[i("svg",{class:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})],-1),i("span",null,"Settings",-1)])],2),l[10]||(l[10]=i("div",{class:"w-px h-4 bg-slate-800 mx-1 hidden sm:block"},null,-1)),i("button",{onClick:o,class:"flex items-center space-x-2 px-3 py-2 rounded-xl text-sm font-medium text-slate-400 hover:text-red-400 hover:bg-red-400/10 transition-all duration-200"},[...l[9]||(l[9]=[i("svg",{class:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1"})],-1),i("span",{class:"hidden sm:inline"},"Logout",-1)])])])])])])):ee("",!0),i("main",null,[$e(a)])])}}},qd={class:"min-h-screen flex items-center justify-center py-12 px-4 sm:px-6 lg:px-8"},Wd={class:"max-w-md w-full space-y-8 bg-slate-800 p-10 rounded-2xl shadow-2xl border border-slate-700/50 backdrop-blur-sm relative overflow-hidden"},Kd={class:"rounded-md shadow-sm -space-y-px"},Gd={key:0,class:"text-red-400 text-sm text-center bg-red-400/10 py-2 rounded-lg border border-red-400/20"},Yd=["disabled"],Jd={key:0,class:"animate-spin -ml-1 mr-3 h-5 w-5 text-white",fill:"none",viewBox:"0 0 24 24"},Xd={key:1,class:"absolute left-0 inset-y-0 flex items-center pl-3"},Qd={__name:"Login",setup(e){const t=El(),s=W(""),n=W(""),o=W(!1),r=async()=>{o.value=!0,n.value="";try{const l=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({password:s.value})}),a=await l.json();l.ok&&a.token?(localStorage.setItem("pm2me_token",a.token),t.push("/")):n.value=a.error||"Login failed"}catch{n.value="Failed to connect to server"}finally{o.value=!1}};return(l,a)=>(S(),E("div",qd,[i("div",Wd,[a[5]||(a[5]=rt('<div class="absolute -top-10 -right-10 w-40 h-40 bg-blue-500 rounded-full mix-blend-multiply filter blur-3xl opacity-20 animate-pulse"></div><div class="absolute -bottom-10 -left-10 w-40 h-40 bg-indigo-500 rounded-full mix-blend-multiply filter blur-3xl opacity-20 animate-pulse"></div><div class="relative z-10 text-center"><div class="mx-auto w-16 h-16 rounded-2xl bg-gradient-to-br from-blue-500 to-indigo-600 flex items-center justify-center text-white text-3xl font-bold shadow-lg shadow-blue-500/30 mb-6"> P </div><h2 class="mt-2 text-3xl font-extrabold text-white tracking-tight">PM2Me</h2><p class="mt-2 text-sm text-slate-400">Sign in to manage your deployments</p></div>',3)),i("form",{class:"relative z-10 mt-8 space-y-6",onSubmit:On(r,["prevent"])},[i("div",Kd,[i("div",null,[a[1]||(a[1]=i("label",{for:"password",class:"sr-only"},"Password",-1)),ke(i("input",{id:"password","onUpdate:modelValue":a[0]||(a[0]=c=>s.value=c),name:"password",type:"password",required:"",class:"appearance-none rounded-lg relative block w-full px-4 py-3 border border-slate-600 bg-slate-900/50 placeholder-slate-400 text-white focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-all duration-200 sm:text-sm",placeholder:"Admin Password (or set initial)"},null,512),[[Fe,s.value]])])]),n.value?(S(),E("div",Gd,H(n.value),1)):ee("",!0),i("div",null,[i("button",{type:"submit",disabled:o.value,class:"group relative w-full flex justify-center py-3 px-4 border border-transparent text-sm font-medium rounded-lg text-white bg-gradient-to-r from-blue-600 to-indigo-600 hover:from-blue-500 hover:to-indigo-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 focus:ring-offset-slate-900 shadow-lg shadow-blue-500/30 transition-all duration-200 disabled:opacity-70 disabled:cursor-not-allowed"},[o.value?(S(),E("svg",Jd,[...a[2]||(a[2]=[i("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),i("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)])])):(S(),E("span",Xd,[...a[3]||(a[3]=[i("svg",{class:"h-5 w-5 text-indigo-300 group-hover:text-indigo-200 transition-colors",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},[i("path",{"fill-rule":"evenodd",d:"M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z","clip-rule":"evenodd"})],-1)])])),a[4]||(a[4]=G(" Sign in ",-1))],8,Yd)])],32)])]))}},wt=Object.create(null);wt.open="0";wt.close="1";wt.ping="2";wt.pong="3";wt.message="4";wt.upgrade="5";wt.noop="6";const ln=Object.create(null);Object.keys(wt).forEach(e=>{ln[wt[e]]=e});const wo={type:"error",data:"parser error"},Ll=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Dl=typeof ArrayBuffer=="function",jl=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Wo=({type:e,data:t},s,n)=>Ll&&t instanceof Blob?s?n(t):ri(t,n):Dl&&(t instanceof ArrayBuffer||jl(t))?s?n(t):ri(new Blob([t]),n):n(wt[e]+(t||"")),ri=(e,t)=>{const s=new FileReader;return s.onload=function(){const n=s.result.split(",")[1];t("b"+(n||""))},s.readAsDataURL(e)};function ii(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Qn;function Zd(e,t){if(Ll&&e.data instanceof Blob)return e.data.arrayBuffer().then(ii).then(t);if(Dl&&(e.data instanceof ArrayBuffer||jl(e.data)))return t(ii(e.data));Wo(e,!1,s=>{Qn||(Qn=new TextEncoder),t(Qn.encode(s))})}const li="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ts=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<li.length;e++)Ts[li.charCodeAt(e)]=e;const ef=e=>{let t=e.length*.75,s=e.length,n,o=0,r,l,a,c;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const p=new ArrayBuffer(t),d=new Uint8Array(p);for(n=0;n<s;n+=4)r=Ts[e.charCodeAt(n)],l=Ts[e.charCodeAt(n+1)],a=Ts[e.charCodeAt(n+2)],c=Ts[e.charCodeAt(n+3)],d[o++]=r<<2|l>>4,d[o++]=(l&15)<<4|a>>2,d[o++]=(a&3)<<6|c&63;return p},tf=typeof ArrayBuffer=="function",Ko=(e,t)=>{if(typeof e!="string")return{type:"message",data:Vl(e,t)};const s=e.charAt(0);return s==="b"?{type:"message",data:sf(e.substring(1),t)}:ln[s]?e.length>1?{type:ln[s],data:e.substring(1)}:{type:ln[s]}:wo},sf=(e,t)=>{if(tf){const s=ef(e);return Vl(s,t)}else return{base64:!0,data:e}},Vl=(e,t)=>t==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,Hl="",nf=(e,t)=>{const s=e.length,n=new Array(s);let o=0;e.forEach((r,l)=>{Wo(r,!1,a=>{n[l]=a,++o===s&&t(n.join(Hl))})})},of=(e,t)=>{const s=e.split(Hl),n=[];for(let o=0;o<s.length;o++){const r=Ko(s[o],t);if(n.push(r),r.type==="error")break}return n};function rf(){return new TransformStream({transform(e,t){Zd(e,s=>{const n=s.length;let o;if(n<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,n);else if(n<65536){o=new Uint8Array(3);const r=new DataView(o.buffer);r.setUint8(0,126),r.setUint16(1,n)}else{o=new Uint8Array(9);const r=new DataView(o.buffer);r.setUint8(0,127),r.setBigUint64(1,BigInt(n))}e.data&&typeof e.data!="string"&&(o[0]|=128),t.enqueue(o),t.enqueue(s)})}})}let Zn;function Qs(e){return e.reduce((t,s)=>t+s.length,0)}function Zs(e,t){if(e[0].length===t)return e.shift();const s=new Uint8Array(t);let n=0;for(let o=0;o<t;o++)s[o]=e[0][n++],n===e[0].length&&(e.shift(),n=0);return e.length&&n<e[0].length&&(e[0]=e[0].slice(n)),s}function lf(e,t){Zn||(Zn=new TextDecoder);const s=[];let n=0,o=-1,r=!1;return new TransformStream({transform(l,a){for(s.push(l);;){if(n===0){if(Qs(s)<1)break;const c=Zs(s,1);r=(c[0]&128)===128,o=c[0]&127,o<126?n=3:o===126?n=1:n=2}else if(n===1){if(Qs(s)<2)break;const c=Zs(s,2);o=new DataView(c.buffer,c.byteOffset,c.length).getUint16(0),n=3}else if(n===2){if(Qs(s)<8)break;const c=Zs(s,8),p=new DataView(c.buffer,c.byteOffset,c.length),d=p.getUint32(0);if(d>Math.pow(2,21)-1){a.enqueue(wo);break}o=d*Math.pow(2,32)+p.getUint32(4),n=3}else{if(Qs(s)<o)break;const c=Zs(s,o);a.enqueue(Ko(r?c:Zn.decode(c),t)),n=0}if(o===0||o>e){a.enqueue(wo);break}}}})}const Fl=4;function Re(e){if(e)return af(e)}function af(e){for(var t in Re.prototype)e[t]=Re.prototype[t];return e}Re.prototype.on=Re.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};Re.prototype.once=function(e,t){function s(){this.off(e,s),t.apply(this,arguments)}return s.fn=t,this.on(e,s),this};Re.prototype.off=Re.prototype.removeListener=Re.prototype.removeAllListeners=Re.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var s=this._callbacks["$"+e];if(!s)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var n,o=0;o<s.length;o++)if(n=s[o],n===t||n.fn===t){s.splice(o,1);break}return s.length===0&&delete this._callbacks["$"+e],this};Re.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),s=this._callbacks["$"+e],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(s){s=s.slice(0);for(var n=0,o=s.length;n<o;++n)s[n].apply(this,t)}return this};Re.prototype.emitReserved=Re.prototype.emit;Re.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};Re.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Pn=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,s)=>s(t,0),et=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),cf="arraybuffer";function Ul(e,...t){return t.reduce((s,n)=>(e.hasOwnProperty(n)&&(s[n]=e[n]),s),{})}const uf=et.setTimeout,df=et.clearTimeout;function In(e,t){t.useNativeTimers?(e.setTimeoutFn=uf.bind(et),e.clearTimeoutFn=df.bind(et)):(e.setTimeoutFn=et.setTimeout.bind(et),e.clearTimeoutFn=et.clearTimeout.bind(et))}const ff=1.33;function hf(e){return typeof e=="string"?pf(e):Math.ceil((e.byteLength||e.size)*ff)}function pf(e){let t=0,s=0;for(let n=0,o=e.length;n<o;n++)t=e.charCodeAt(n),t<128?s+=1:t<2048?s+=2:t<55296||t>=57344?s+=3:(n++,s+=4);return s}function zl(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function mf(e){let t="";for(let s in e)e.hasOwnProperty(s)&&(t.length&&(t+="&"),t+=encodeURIComponent(s)+"="+encodeURIComponent(e[s]));return t}function gf(e){let t={},s=e.split("&");for(let n=0,o=s.length;n<o;n++){let r=s[n].split("=");t[decodeURIComponent(r[0])]=decodeURIComponent(r[1])}return t}class vf extends Error{constructor(t,s,n){super(t),this.description=s,this.context=n,this.type="TransportError"}}class Go extends Re{constructor(t){super(),this.writable=!1,In(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,s,n){return super.emitReserved("error",new vf(t,s,n)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const s=Ko(t,this.socket.binaryType);this.onPacket(s)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,s={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(s)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const s=mf(t);return s.length?"?"+s:""}}class bf extends Go{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const s=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let n=0;this._polling&&(n++,this.once("pollComplete",function(){--n||s()})),this.writable||(n++,this.once("drain",function(){--n||s()}))}else s()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const s=n=>{if(this.readyState==="opening"&&n.type==="open"&&this.onOpen(),n.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(n)};of(t,this.socket.binaryType).forEach(s),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,nf(t,s=>{this.doWrite(s,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",s=this.query||{};return this.opts.timestampRequests!==!1&&(s[this.opts.timestampParam]=zl()),!this.supportsBinary&&!s.sid&&(s.b64=1),this.createUri(t,s)}}let ql=!1;try{ql=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const xf=ql;function yf(){}class wf extends bf{constructor(t){if(super(t),typeof location<"u"){const s=location.protocol==="https:";let n=location.port;n||(n=s?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||n!==t.port}}doWrite(t,s){const n=this.request({method:"POST",data:t});n.on("success",s),n.on("error",(o,r)=>{this.onError("xhr post error",o,r)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(s,n)=>{this.onError("xhr poll error",s,n)}),this.pollXhr=t}}class xt extends Re{constructor(t,s,n){super(),this.createRequest=t,In(this,n),this._opts=n,this._method=n.method||"GET",this._uri=s,this._data=n.data!==void 0?n.data:null,this._create()}_create(){var t;const s=Ul(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");s.xdomain=!!this._opts.xd;const n=this._xhr=this.createRequest(s);try{n.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let o in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(o)&&n.setRequestHeader(o,this._opts.extraHeaders[o])}}catch{}if(this._method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(n),"withCredentials"in n&&(n.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(n.timeout=this._opts.requestTimeout),n.onreadystatechange=()=>{var o;n.readyState===3&&((o=this._opts.cookieJar)===null||o===void 0||o.parseCookies(n.getResponseHeader("set-cookie"))),n.readyState===4&&(n.status===200||n.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof n.status=="number"?n.status:0)},0))},n.send(this._data)}catch(o){this.setTimeoutFn(()=>{this._onError(o)},0);return}typeof document<"u"&&(this._index=xt.requestsCount++,xt.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=yf,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete xt.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}xt.requestsCount=0;xt.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",ai);else if(typeof addEventListener=="function"){const e="onpagehide"in et?"pagehide":"unload";addEventListener(e,ai,!1)}}function ai(){for(let e in xt.requests)xt.requests.hasOwnProperty(e)&&xt.requests[e].abort()}const _f=(function(){const e=Wl({xdomain:!1});return e&&e.responseType!==null})();class kf extends wf{constructor(t){super(t);const s=t&&t.forceBase64;this.supportsBinary=_f&&!s}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new xt(Wl,this.uri(),t)}}function Wl(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||xf))return new XMLHttpRequest}catch{}if(!t)try{return new et[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const Kl=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Cf extends Go{get name(){return"websocket"}doOpen(){const t=this.uri(),s=this.opts.protocols,n=Kl?{}:Ul(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,s,n)}catch(o){return this.emitReserved("error",o)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let s=0;s<t.length;s++){const n=t[s],o=s===t.length-1;Wo(n,this.supportsBinary,r=>{try{this.doWrite(n,r)}catch{}o&&Pn(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",s=this.query||{};return this.opts.timestampRequests&&(s[this.opts.timestampParam]=zl()),this.supportsBinary||(s.b64=1),this.createUri(t,s)}}const eo=et.WebSocket||et.MozWebSocket;class Sf extends Cf{createSocket(t,s,n){return Kl?new eo(t,s,n):s?new eo(t,s):new eo(t)}doWrite(t,s){this.ws.send(s)}}class Ef extends Go{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const s=lf(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=t.readable.pipeThrough(s).getReader(),o=rf();o.readable.pipeTo(t.writable),this._writer=o.writable.getWriter();const r=()=>{n.read().then(({done:a,value:c})=>{a||(this.onPacket(c),r())}).catch(a=>{})};r();const l={type:"open"};this.query.sid&&(l.data=`{"sid":"${this.query.sid}"}`),this._writer.write(l).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let s=0;s<t.length;s++){const n=t[s],o=s===t.length-1;this._writer.write(n).then(()=>{o&&Pn(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const Af={websocket:Sf,webtransport:Ef,polling:kf},Tf=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,$f=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function _o(e){if(e.length>8e3)throw"URI too long";const t=e,s=e.indexOf("["),n=e.indexOf("]");s!=-1&&n!=-1&&(e=e.substring(0,s)+e.substring(s,n).replace(/:/g,";")+e.substring(n,e.length));let o=Tf.exec(e||""),r={},l=14;for(;l--;)r[$f[l]]=o[l]||"";return s!=-1&&n!=-1&&(r.source=t,r.host=r.host.substring(1,r.host.length-1).replace(/;/g,":"),r.authority=r.authority.replace("[","").replace("]","").replace(/;/g,":"),r.ipv6uri=!0),r.pathNames=Rf(r,r.path),r.queryKey=Mf(r,r.query),r}function Rf(e,t){const s=/\/{2,9}/g,n=t.replace(s,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&n.splice(0,1),t.slice(-1)=="/"&&n.splice(n.length-1,1),n}function Mf(e,t){const s={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(n,o,r){o&&(s[o]=r)}),s}const ko=typeof addEventListener=="function"&&typeof removeEventListener=="function",an=[];ko&&addEventListener("offline",()=>{an.forEach(e=>e())},!1);class Ut extends Re{constructor(t,s){if(super(),this.binaryType=cf,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(s=t,t=null),t){const n=_o(t);s.hostname=n.host,s.secure=n.protocol==="https"||n.protocol==="wss",s.port=n.port,n.query&&(s.query=n.query)}else s.host&&(s.hostname=_o(s.host).host);In(this,s),this.secure=s.secure!=null?s.secure:typeof location<"u"&&location.protocol==="https:",s.hostname&&!s.port&&(s.port=this.secure?"443":"80"),this.hostname=s.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=s.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},s.transports.forEach(n=>{const o=n.prototype.name;this.transports.push(o),this._transportsByName[o]=n}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},s),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=gf(this.opts.query)),ko&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},an.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const s=Object.assign({},this.opts.query);s.EIO=Fl,s.transport=t,this.id&&(s.sid=this.id);const n=Object.assign({},this.opts,{query:s,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](n)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&Ut.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const s=this.createTransport(t);s.open(),this.setTransport(s)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",s=>this._onClose("transport close",s))}onOpen(){this.readyState="open",Ut.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const s=new Error("server error");s.code=t.data,this._onError(s);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let s=1;for(let n=0;n<this.writeBuffer.length;n++){const o=this.writeBuffer[n].data;if(o&&(s+=hf(o)),n>0&&s>this._maxPayload)return this.writeBuffer.slice(0,n);s+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,Pn(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,s,n){return this._sendPacket("message",t,s,n),this}send(t,s,n){return this._sendPacket("message",t,s,n),this}_sendPacket(t,s,n,o){if(typeof s=="function"&&(o=s,s=void 0),typeof n=="function"&&(o=n,n=null),this.readyState==="closing"||this.readyState==="closed")return;n=n||{},n.compress=n.compress!==!1;const r={type:t,data:s,options:n};this.emitReserved("packetCreate",r),this.writeBuffer.push(r),o&&this.once("flush",o),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},s=()=>{this.off("upgrade",s),this.off("upgradeError",s),t()},n=()=>{this.once("upgrade",s),this.once("upgradeError",s)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?n():t()}):this.upgrading?n():t()),this}_onError(t){if(Ut.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,s){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),ko&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const n=an.indexOf(this._offlineEventListener);n!==-1&&an.splice(n,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,s),this.writeBuffer=[],this._prevBufferLen=0}}}Ut.protocol=Fl;class Of extends Ut{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let s=this.createTransport(t),n=!1;Ut.priorWebsocketSuccess=!1;const o=()=>{n||(s.send([{type:"ping",data:"probe"}]),s.once("packet",m=>{if(!n)if(m.type==="pong"&&m.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",s),!s)return;Ut.priorWebsocketSuccess=s.name==="websocket",this.transport.pause(()=>{n||this.readyState!=="closed"&&(d(),this.setTransport(s),s.send([{type:"upgrade"}]),this.emitReserved("upgrade",s),s=null,this.upgrading=!1,this.flush())})}else{const b=new Error("probe error");b.transport=s.name,this.emitReserved("upgradeError",b)}}))};function r(){n||(n=!0,d(),s.close(),s=null)}const l=m=>{const b=new Error("probe error: "+m);b.transport=s.name,r(),this.emitReserved("upgradeError",b)};function a(){l("transport closed")}function c(){l("socket closed")}function p(m){s&&m.name!==s.name&&r()}const d=()=>{s.removeListener("open",o),s.removeListener("error",l),s.removeListener("close",a),this.off("close",c),this.off("upgrading",p)};s.once("open",o),s.once("error",l),s.once("close",a),this.once("close",c),this.once("upgrading",p),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{n||s.open()},200):s.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const s=[];for(let n=0;n<t.length;n++)~this.transports.indexOf(t[n])&&s.push(t[n]);return s}}let Bf=class extends Of{constructor(t,s={}){const n=typeof t=="object"?t:s;(!n.transports||n.transports&&typeof n.transports[0]=="string")&&(n.transports=(n.transports||["polling","websocket","webtransport"]).map(o=>Af[o]).filter(o=>!!o)),super(t,n)}};function Nf(e,t="",s){let n=e;s=s||typeof location<"u"&&location,e==null&&(e=s.protocol+"//"+s.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=s.protocol+e:e=s.host+e),/^(https?|wss?):\/\//.test(e)||(typeof s<"u"?e=s.protocol+"//"+e:e="https://"+e),n=_o(e)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";const r=n.host.indexOf(":")!==-1?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+r+":"+n.port+t,n.href=n.protocol+"://"+r+(s&&s.port===n.port?"":":"+n.port),n}const Pf=typeof ArrayBuffer=="function",If=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,Gl=Object.prototype.toString,Lf=typeof Blob=="function"||typeof Blob<"u"&&Gl.call(Blob)==="[object BlobConstructor]",Df=typeof File=="function"||typeof File<"u"&&Gl.call(File)==="[object FileConstructor]";function Yo(e){return Pf&&(e instanceof ArrayBuffer||If(e))||Lf&&e instanceof Blob||Df&&e instanceof File}function cn(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let s=0,n=e.length;s<n;s++)if(cn(e[s]))return!0;return!1}if(Yo(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return cn(e.toJSON(),!0);for(const s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&cn(e[s]))return!0;return!1}function jf(e){const t=[],s=e.data,n=e;return n.data=Co(s,t),n.attachments=t.length,{packet:n,buffers:t}}function Co(e,t){if(!e)return e;if(Yo(e)){const s={_placeholder:!0,num:t.length};return t.push(e),s}else if(Array.isArray(e)){const s=new Array(e.length);for(let n=0;n<e.length;n++)s[n]=Co(e[n],t);return s}else if(typeof e=="object"&&!(e instanceof Date)){const s={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(s[n]=Co(e[n],t));return s}return e}function Vf(e,t){return e.data=So(e.data,t),delete e.attachments,e}function So(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let s=0;s<e.length;s++)e[s]=So(e[s],t);else if(typeof e=="object")for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(e[s]=So(e[s],t));return e}const Hf=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var le;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(le||(le={}));class Ff{constructor(t){this.replacer=t}encode(t){return(t.type===le.EVENT||t.type===le.ACK)&&cn(t)?this.encodeAsBinary({type:t.type===le.EVENT?le.BINARY_EVENT:le.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let s=""+t.type;return(t.type===le.BINARY_EVENT||t.type===le.BINARY_ACK)&&(s+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(s+=t.nsp+","),t.id!=null&&(s+=t.id),t.data!=null&&(s+=JSON.stringify(t.data,this.replacer)),s}encodeAsBinary(t){const s=jf(t),n=this.encodeAsString(s.packet),o=s.buffers;return o.unshift(n),o}}class Jo extends Re{constructor(t){super(),this.reviver=t}add(t){let s;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");s=this.decodeString(t);const n=s.type===le.BINARY_EVENT;n||s.type===le.BINARY_ACK?(s.type=n?le.EVENT:le.ACK,this.reconstructor=new Uf(s),s.attachments===0&&super.emitReserved("decoded",s)):super.emitReserved("decoded",s)}else if(Yo(t)||t.base64)if(this.reconstructor)s=this.reconstructor.takeBinaryData(t),s&&(this.reconstructor=null,super.emitReserved("decoded",s));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let s=0;const n={type:Number(t.charAt(0))};if(le[n.type]===void 0)throw new Error("unknown packet type "+n.type);if(n.type===le.BINARY_EVENT||n.type===le.BINARY_ACK){const r=s+1;for(;t.charAt(++s)!=="-"&&s!=t.length;);const l=t.substring(r,s);if(l!=Number(l)||t.charAt(s)!=="-")throw new Error("Illegal attachments");n.attachments=Number(l)}if(t.charAt(s+1)==="/"){const r=s+1;for(;++s&&!(t.charAt(s)===","||s===t.length););n.nsp=t.substring(r,s)}else n.nsp="/";const o=t.charAt(s+1);if(o!==""&&Number(o)==o){const r=s+1;for(;++s;){const l=t.charAt(s);if(l==null||Number(l)!=l){--s;break}if(s===t.length)break}n.id=Number(t.substring(r,s+1))}if(t.charAt(++s)){const r=this.tryParse(t.substr(s));if(Jo.isPayloadValid(n.type,r))n.data=r;else throw new Error("invalid payload")}return n}tryParse(t){try{return JSON.parse(t,this.reviver)}catch{return!1}}static isPayloadValid(t,s){switch(t){case le.CONNECT:return ci(s);case le.DISCONNECT:return s===void 0;case le.CONNECT_ERROR:return typeof s=="string"||ci(s);case le.EVENT:case le.BINARY_EVENT:return Array.isArray(s)&&(typeof s[0]=="number"||typeof s[0]=="string"&&Hf.indexOf(s[0])===-1);case le.ACK:case le.BINARY_ACK:return Array.isArray(s)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Uf{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const s=Vf(this.reconPack,this.buffers);return this.finishedReconstruction(),s}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function ci(e){return Object.prototype.toString.call(e)==="[object Object]"}const zf=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Jo,Encoder:Ff,get PacketType(){return le}},Symbol.toStringTag,{value:"Module"}));function ot(e,t,s){return e.on(t,s),function(){e.off(t,s)}}const qf=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Yl extends Re{constructor(t,s,n){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=s,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[ot(t,"open",this.onopen.bind(this)),ot(t,"packet",this.onpacket.bind(this)),ot(t,"error",this.onerror.bind(this)),ot(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...s){var n,o,r;if(qf.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(s.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(s),this;const l={type:le.EVENT,data:s};if(l.options={},l.options.compress=this.flags.compress!==!1,typeof s[s.length-1]=="function"){const d=this.ids++,m=s.pop();this._registerAckCallback(d,m),l.id=d}const a=(o=(n=this.io.engine)===null||n===void 0?void 0:n.transport)===null||o===void 0?void 0:o.writable,c=this.connected&&!(!((r=this.io.engine)===null||r===void 0)&&r._hasPingExpired());return this.flags.volatile&&!a||(c?(this.notifyOutgoingListeners(l),this.packet(l)):this.sendBuffer.push(l)),this.flags={},this}_registerAckCallback(t,s){var n;const o=(n=this.flags.timeout)!==null&&n!==void 0?n:this._opts.ackTimeout;if(o===void 0){this.acks[t]=s;return}const r=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===t&&this.sendBuffer.splice(a,1);s.call(this,new Error("operation has timed out"))},o),l=(...a)=>{this.io.clearTimeoutFn(r),s.apply(this,a)};l.withError=!0,this.acks[t]=l}emitWithAck(t,...s){return new Promise((n,o)=>{const r=(l,a)=>l?o(l):n(a);r.withError=!0,s.push(r),this.emit(t,...s)})}_addToQueue(t){let s;typeof t[t.length-1]=="function"&&(s=t.pop());const n={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((o,...r)=>(this._queue[0],o!==null?n.tryCount>this._opts.retries&&(this._queue.shift(),s&&s(o)):(this._queue.shift(),s&&s(null,...r)),n.pending=!1,this._drainQueue())),this._queue.push(n),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const s=this._queue[0];s.pending&&!t||(s.pending=!0,s.tryCount++,this.flags=s.flags,this.emit.apply(this,s.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:le.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,s){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,s),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(n=>String(n.id)===t)){const n=this.acks[t];delete this.acks[t],n.withError&&n.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case le.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case le.EVENT:case le.BINARY_EVENT:this.onevent(t);break;case le.ACK:case le.BINARY_ACK:this.onack(t);break;case le.DISCONNECT:this.ondisconnect();break;case le.CONNECT_ERROR:this.destroy();const n=new Error(t.data.message);n.data=t.data.data,this.emitReserved("connect_error",n);break}}onevent(t){const s=t.data||[];t.id!=null&&s.push(this.ack(t.id)),this.connected?this.emitEvent(s):this.receiveBuffer.push(Object.freeze(s))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const s=this._anyListeners.slice();for(const n of s)n.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const s=this;let n=!1;return function(...o){n||(n=!0,s.packet({type:le.ACK,id:t,data:o}))}}onack(t){const s=this.acks[t.id];typeof s=="function"&&(delete this.acks[t.id],s.withError&&t.data.unshift(null),s.apply(this,t.data))}onconnect(t,s){this.id=t,this.recovered=s&&this._pid===s,this._pid=s,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:le.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const s=this._anyListeners;for(let n=0;n<s.length;n++)if(t===s[n])return s.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const s=this._anyOutgoingListeners;for(let n=0;n<s.length;n++)if(t===s[n])return s.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const s=this._anyOutgoingListeners.slice();for(const n of s)n.apply(this,t.data)}}}function xs(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}xs.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),s=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-s:e+s}return Math.min(e,this.max)|0};xs.prototype.reset=function(){this.attempts=0};xs.prototype.setMin=function(e){this.ms=e};xs.prototype.setMax=function(e){this.max=e};xs.prototype.setJitter=function(e){this.jitter=e};class Eo extends Re{constructor(t,s){var n;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(s=t,t=void 0),s=s||{},s.path=s.path||"/socket.io",this.opts=s,In(this,s),this.reconnection(s.reconnection!==!1),this.reconnectionAttempts(s.reconnectionAttempts||1/0),this.reconnectionDelay(s.reconnectionDelay||1e3),this.reconnectionDelayMax(s.reconnectionDelayMax||5e3),this.randomizationFactor((n=s.randomizationFactor)!==null&&n!==void 0?n:.5),this.backoff=new xs({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(s.timeout==null?2e4:s.timeout),this._readyState="closed",this.uri=t;const o=s.parser||zf;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=s.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var s;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(s=this.backoff)===null||s===void 0||s.setMin(t),this)}randomizationFactor(t){var s;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(s=this.backoff)===null||s===void 0||s.setJitter(t),this)}reconnectionDelayMax(t){var s;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(s=this.backoff)===null||s===void 0||s.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Bf(this.uri,this.opts);const s=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const o=ot(s,"open",function(){n.onopen(),t&&t()}),r=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),t?t(a):this.maybeReconnectOnOpen()},l=ot(s,"error",r);if(this._timeout!==!1){const a=this._timeout,c=this.setTimeoutFn(()=>{o(),r(new Error("timeout")),s.close()},a);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}return this.subs.push(o),this.subs.push(l),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(ot(t,"ping",this.onping.bind(this)),ot(t,"data",this.ondata.bind(this)),ot(t,"error",this.onerror.bind(this)),ot(t,"close",this.onclose.bind(this)),ot(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(s){this.onclose("parse error",s)}}ondecoded(t){Pn(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,s){let n=this.nsps[t];return n?this._autoConnect&&!n.active&&n.connect():(n=new Yl(this,t,s),this.nsps[t]=n),n}_destroy(t){const s=Object.keys(this.nsps);for(const n of s)if(this.nsps[n].active)return;this._close()}_packet(t){const s=this.encoder.encode(t);for(let n=0;n<s.length;n++)this.engine.write(s[n],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,s){var n;this.cleanup(),(n=this.engine)===null||n===void 0||n.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,s),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const s=this.backoff.duration();this._reconnecting=!0;const n=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(o=>{o?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",o)):t.onreconnect()}))},s);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Es={};function ns(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const s=Nf(e,t.path||"/socket.io"),n=s.source,o=s.id,r=s.path,l=Es[o]&&r in Es[o].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||l;let c;return a?c=new Eo(n,t):(Es[o]||(Es[o]=new Eo(n,t)),c=Es[o]),s.query&&!t.query&&(t.query=s.queryKey),c.socket(s.path,t)}Object.assign(ns,{Manager:Eo,Socket:Yl,io:ns,connect:ns});const Xo=(e,t)=>{const s=e.__vccOpts||e;for(const[n,o]of t)s[n]=o;return s},Wf={key:0,class:"fixed inset-0 z-50 flex items-center justify-center p-4 sm:p-6 bg-slate-900/80 backdrop-blur-sm"},Kf={class:"bg-slate-800 rounded-2xl shadow-xl border border-slate-700 w-full max-w-2xl flex flex-col max-h-[90vh]"},Gf={class:"flex items-center justify-between p-6 border-b border-slate-700"},Yf={class:"text-xl font-bold text-white"},Jf={class:"overflow-y-auto p-6 flex-1 custom-scrollbar"},Xf={class:"grid grid-cols-1 md:grid-cols-2 gap-6"},Qf={class:"md:col-span-2"},Zf={class:"flex space-x-2"},e0=["label"],t0=["value"],s0=["disabled"],n0={key:0,class:"animate-spin h-5 w-5",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},o0={key:1,class:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},r0={key:0,class:"mt-2 text-xs text-yellow-500"},i0={class:"md:col-span-2"},l0={class:"flex space-x-2"},a0={key:0,value:"",disabled:""},c0=["value"],u0=["disabled"],d0={key:0,class:"animate-spin h-5 w-5",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},f0={key:1,class:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},h0={class:"md:col-span-2"},p0={class:"md:col-span-2 grid grid-cols-1 sm:grid-cols-2 gap-4"},m0={class:"flex items-center justify-between p-4 bg-slate-900/50 rounded-xl border border-slate-700/50 group hover:border-blue-500/30 transition-colors"},g0={class:"relative inline-flex items-center cursor-pointer"},v0={class:"flex items-center justify-between p-4 bg-slate-900/50 rounded-xl border border-slate-700/50 group hover:border-emerald-500/30 transition-colors"},b0={class:"relative inline-flex items-center cursor-pointer"},x0={class:"md:col-span-2"},y0={class:"flex items-center space-x-6 mb-4"},w0={class:"inline-flex items-center cursor-pointer"},_0={class:"inline-flex items-center cursor-pointer"},k0={class:"inline-flex items-center cursor-pointer"},C0={key:0,class:"pl-2 border-l-2 border-slate-600"},S0={class:"flex items-center"},E0={key:1,class:"pl-2 border-l-2 border-slate-600 mt-4"},A0={class:"flex items-center"},T0={class:"md:col-span-2"},$0={class:"flex items-center justify-between mb-2"},R0={class:"flex gap-2"},M0={class:"space-y-3"},O0=["onUpdate:modelValue","title"],B0=["onUpdate:modelValue"],N0=["onClick"],P0={key:0,class:"text-xs text-yellow-500 flex items-center"},I0={key:1,class:"text-sm text-slate-500 italic py-1 px-2 border border-dashed border-slate-700 rounded text-center"},L0={class:"p-6 border-t border-slate-700 bg-slate-800/50 flex justify-between items-center rounded-b-2xl"},D0={class:"flex space-x-4"},j0=["disabled"],V0={key:0,class:"animate-spin -ml-1 mr-2 h-4 w-4 text-white",fill:"none",viewBox:"0 0 24 24"},H0={__name:"DeployModal",props:{isOpen:Boolean,appToEdit:Object},emits:["close","deploy","delete"],setup(e,{emit:t}){const s=e,n=t,o=W({name:"",branch:"main",buildScript:"",npmScript:"start",customScript:"app.js",autoSync:!1,zeroDowntime:!0}),r=W(""),l=W([]),a=W(!1),c=W("npm"),p=W([]),d=W(!1),m=W([]),b=W(!1),y=W(!1),T=Ie(()=>{const P=p.value.map(w=>w.name.trim()).filter(w=>w!=="");return P.filter((w,B)=>P.indexOf(w)!==B)});Ft(()=>s.isOpen,async P=>{if(P)if(l.value.length===0&&await O(),s.appToEdit){y.value=!0,o.value.name=s.appToEdit.name,o.value.branch=s.appToEdit.branch,o.value.buildScript=s.appToEdit.buildScript||"",o.value.autoSync=!!s.appToEdit.autoSync,o.value.zeroDowntime=s.appToEdit.zeroDowntime!==!1,s.appToEdit.ecosystemFile?c.value="ecosystem":s.appToEdit.pm2Script&&s.appToEdit.pm2Script!=="npm"?(c.value="script",o.value.customScript=s.appToEdit.pm2Script):(c.value="npm",o.value.npmScript=s.appToEdit.pm2Args?s.appToEdit.pm2Args.replace("run ",""):"start");const w=Object.keys(s.appToEdit.env||{});p.value=w.map(Q=>({name:Q,value:s.appToEdit.env[Q]}));let B=null;for(const Q of l.value){const L=Q.repositories.find(oe=>oe.cloneUrl===s.appToEdit.repoUrl);if(L){B={url:L.cloneUrl,token:Q.token,name:L.name};break}}B&&(r.value=B,await Z(),o.value.branch=s.appToEdit.branch)}else y.value=!1,o.value={name:"",branch:"main",buildScript:"",npmScript:"start",customScript:"app.js",autoSync:!1,zeroDowntime:!0},r.value="",c.value="npm",p.value=[],m.value=[]}),Ft(r,P=>{P&&P.name&&!y.value&&(o.value.name=P.name),m.value=[],P&&P.url&&Z()});const O=async()=>{a.value=!0;try{const P=await fetch("/api/git/repositories",{headers:{Authorization:`Bearer ${localStorage.getItem("pm2me_token")}`}});l.value=await P.json()}catch{console.error("Failed to load repositories")}finally{a.value=!1}},q=()=>{p.value.push({name:"",value:""})},U=P=>{p.value.splice(P,1)},I=W(null),F=()=>{I.value&&I.value.click()},j=P=>{const w=P.target.files[0];if(!w)return;const B=new FileReader;B.onload=Q=>{const oe=Q.target.result.split(`
|
|
2
|
-
`);let he=0;const ye=[...p.value];oe.forEach(me=>{let ie=me.trim();if(!ie||ie.startsWith("#"))return;ie.startsWith("export ")&&(ie=ie.substring(7).trim());const ne=ie.match(/^([^=]+)=(.*)$/);if(ne){let Te=ne[1].trim(),we=ne[2].trim();(we.startsWith('"')&&we.endsWith('"')||we.startsWith("'")&&we.endsWith("'"))&&(we=we.substring(1,we.length-1));const Se=ye.findIndex(ve=>ve.name===Te);if(Se>=0)ye[Se].value=we,he++;else{const ve=ye.findIndex(De=>De.name.trim()===""&&De.value.trim()==="");ve>=0?(ye[ve].name=Te,ye[ve].value=we):ye.push({name:Te,value:we}),he++}}}),p.value=ye,he===0&&alert("No valid environment variables found in this file."),P.target.value=""},B.readAsText(w)},Z=async()=>{if(!r.value||!r.value.url){alert("Please select a repository first");return}d.value=!0,m.value=[];try{const w=await(await fetch("/api/git/branches",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${localStorage.getItem("pm2me_token")}`},body:JSON.stringify({repoUrl:r.value.url,token:r.value.token})})).json();w.length>0?(m.value=w,o.value.branch=w.find(B=>B==="main"||B==="master")||w[0]):alert("No branches found or repo is private (needs token)")}catch{alert("Failed to fetch branches")}finally{d.value=!1}},K=async()=>{let P={};if(p.value.forEach(B=>{B.name.trim()&&(P[B.name.trim()]=B.value.trim())}),!r.value||!r.value.url){alert("Please select a repository");return}const w={...o.value,repoUrl:r.value.url,token:r.value.token,env:P,pm2Script:c.value==="script"?o.value.customScript:c.value==="npm"?"npm":null,pm2Args:c.value==="npm"?`run ${o.value.npmScript||"start"}`:null,ecosystemFile:c.value==="ecosystem"?"ecosystem.config.cjs":null};b.value=!0;try{const B=s.appToEdit?`/api/apps/${s.appToEdit.id}`:"/api/apps",Q=s.appToEdit?"PUT":"POST",oe=await(await fetch(B,{method:Q,headers:{"Content-Type":"application/json",Authorization:`Bearer ${localStorage.getItem("pm2me_token")}`},body:JSON.stringify(w)})).json();fetch(`/api/deploy/${s.appToEdit?s.appToEdit.id:oe.id}`,{method:"POST",headers:{Authorization:`Bearer ${localStorage.getItem("pm2me_token")}`}}),n("deploy"),n("close")}catch{alert("Failed to save app configuration")}finally{b.value=!1}},_=()=>{n("delete",s.appToEdit),n("close")};return(P,w)=>e.isOpen?(S(),E("div",Wf,[i("div",Kf,[i("div",Gf,[i("h3",Yf,H(e.appToEdit?"Edit Application":"Deploy New Application"),1),i("button",{onClick:w[0]||(w[0]=B=>P.$emit("close")),class:"text-slate-400 hover:text-white transition-colors"},[...w[14]||(w[14]=[i("svg",{class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)])])]),i("div",Jf,[i("form",{onSubmit:On(K,["prevent"]),class:"space-y-6"},[i("div",Xf,[i("div",Qf,[w[18]||(w[18]=i("label",{class:"block text-sm font-medium text-slate-300 mb-2"},"GitHub Repository",-1)),i("div",Zf,[ke(i("select",{"onUpdate:modelValue":w[1]||(w[1]=B=>r.value=B),required:"",class:"flex-1 bg-slate-900 border border-slate-600 rounded-lg px-4 py-2.5 text-white focus:ring-2 focus:ring-blue-500 focus:border-transparent outline-none transition-all appearance-none cursor-pointer"},[w[15]||(w[15]=i("option",{value:"",disabled:""},"Select a repository...",-1)),(S(!0),E(_e,null,Je(l.value,B=>(S(),E("optgroup",{key:B.accountId,label:"@"+B.account},[(S(!0),E(_e,null,Je(B.repositories,Q=>(S(),E("option",{key:Q.id,value:{url:Q.cloneUrl,token:B.token,name:Q.name}},H(Q.name)+" "+H(Q.private?"๐":""),9,t0))),128))],8,e0))),128))],512),[[go,r.value]]),i("button",{type:"button",onClick:O,disabled:a.value,class:"px-3 py-2 bg-slate-700 hover:bg-slate-600 text-slate-200 rounded-lg transition-colors border border-slate-600 disabled:opacity-50",title:"Refresh Repositories"},[a.value?(S(),E("svg",n0,[...w[16]||(w[16]=[i("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),i("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)])])):(S(),E("svg",o0,[...w[17]||(w[17]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"},null,-1)])]))],8,s0)]),l.value.length===0?(S(),E("p",r0,"No repositories found. Go to Settings to connect a GitHub Account.")):ee("",!0)]),i("div",i0,[w[19]||(w[19]=i("label",{class:"block text-sm font-medium text-slate-300 mb-2"},"App Name",-1)),ke(i("input",{"onUpdate:modelValue":w[2]||(w[2]=B=>o.value.name=B),onInput:w[3]||(w[3]=B=>y.value=!0),required:"",type:"text",class:"w-full bg-slate-900 border border-slate-600 rounded-lg px-4 py-2.5 text-white focus:ring-2 focus:ring-blue-500 focus:border-transparent outline-none transition-all placeholder-slate-500",placeholder:"my-awesome-app"},null,544),[[Fe,o.value.name]])]),i("div",null,[w[22]||(w[22]=i("label",{class:"block text-sm font-medium text-slate-300 mb-2"},"Branch",-1)),i("div",l0,[ke(i("select",{"onUpdate:modelValue":w[4]||(w[4]=B=>o.value.branch=B),required:"",class:"flex-1 bg-slate-900 border border-slate-600 rounded-lg px-4 py-2.5 text-white focus:ring-2 focus:ring-blue-500 focus:border-transparent outline-none transition-all appearance-none cursor-pointer"},[m.value.length===0?(S(),E("option",a0,"Select a repository first...")):ee("",!0),(S(!0),E(_e,null,Je(m.value,B=>(S(),E("option",{key:B,value:B},H(B),9,c0))),128))],512),[[go,o.value.branch]]),i("button",{type:"button",onClick:Z,disabled:d.value||!r.value,class:"px-3 py-2 bg-slate-700 hover:bg-slate-600 text-slate-200 rounded-lg transition-colors border border-slate-600 disabled:opacity-50",title:"Refresh Branches"},[d.value?(S(),E("svg",d0,[...w[20]||(w[20]=[i("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),i("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)])])):(S(),E("svg",f0,[...w[21]||(w[21]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"},null,-1)])]))],8,u0)])]),i("div",h0,[w[23]||(w[23]=i("label",{class:"block text-sm font-medium text-slate-300 mb-2"},"Build Script (Optional)",-1)),ke(i("textarea",{"onUpdate:modelValue":w[5]||(w[5]=B=>o.value.buildScript=B),rows:"2",class:"w-full bg-slate-900 border border-slate-600 rounded-lg px-4 py-2.5 text-white focus:ring-2 focus:ring-blue-500 focus:border-transparent outline-none transition-all placeholder-slate-500 custom-scrollbar",placeholder:`npm install
|
|
3
|
-
npm run build`},null,512),[[Fe,o.value.buildScript]])]),i("div",p0,[i("div",m0,[w[25]||(w[25]=rt('<div class="flex items-center space-x-3" data-v-20522177><div class="p-2 bg-blue-500/10 rounded-lg text-blue-400 group-hover:bg-blue-500/20 transition-colors" data-v-20522177><svg class="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke="currentColor" data-v-20522177><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15" data-v-20522177></path></svg></div><div data-v-20522177><span class="block text-sm font-semibold text-white" data-v-20522177>Auto Sync</span><span class="block text-[10px] text-slate-500" data-v-20522177>Auto pull & deploy on push</span></div></div>',1)),i("label",g0,[ke(i("input",{type:"checkbox","onUpdate:modelValue":w[6]||(w[6]=B=>o.value.autoSync=B),class:"sr-only peer"},null,512),[[mo,o.value.autoSync]]),w[24]||(w[24]=i("div",{class:"w-11 h-6 bg-slate-700 rounded-full peer peer-focus:ring-2 peer-focus:ring-blue-500/50 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-0.5 after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-blue-600"},null,-1))])]),i("div",v0,[w[27]||(w[27]=rt('<div class="flex items-center space-x-3" data-v-20522177><div class="p-2 bg-emerald-500/10 rounded-lg text-emerald-400 group-hover:bg-emerald-500/20 transition-colors" data-v-20522177><svg class="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke="currentColor" data-v-20522177><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z" data-v-20522177></path></svg></div><div data-v-20522177><span class="block text-sm font-semibold text-white" data-v-20522177>Zero Downtime</span><span class="block text-[10px] text-slate-500" data-v-20522177>Use PM2 reload</span></div></div>',1)),i("label",b0,[ke(i("input",{type:"checkbox","onUpdate:modelValue":w[7]||(w[7]=B=>o.value.zeroDowntime=B),class:"sr-only peer"},null,512),[[mo,o.value.zeroDowntime]]),w[26]||(w[26]=i("div",{class:"w-11 h-6 bg-slate-700 rounded-full peer peer-focus:ring-2 peer-focus:ring-emerald-500/50 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-0.5 after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-emerald-500"},null,-1))])])]),i("div",x0,[w[34]||(w[34]=i("label",{class:"block text-sm font-medium text-slate-300 mb-2"},"PM2 Execution Mode",-1)),i("div",y0,[i("label",w0,[ke(i("input",{type:"radio","onUpdate:modelValue":w[8]||(w[8]=B=>c.value=B),value:"npm",class:"form-radio text-blue-500 bg-slate-900 border-slate-600 focus:ring-blue-500/50"},null,512),[[rn,c.value]]),w[28]||(w[28]=i("span",{class:"ml-2 text-slate-300"},"Run NPM Script",-1))]),i("label",_0,[ke(i("input",{type:"radio","onUpdate:modelValue":w[9]||(w[9]=B=>c.value=B),value:"ecosystem",class:"form-radio text-blue-500 bg-slate-900 border-slate-600 focus:ring-blue-500/50"},null,512),[[rn,c.value]]),w[29]||(w[29]=i("span",{class:"ml-2 text-slate-300"},"Ecosystem File",-1))]),i("label",k0,[ke(i("input",{type:"radio","onUpdate:modelValue":w[10]||(w[10]=B=>c.value=B),value:"script",class:"form-radio text-blue-500 bg-slate-900 border-slate-600 focus:ring-blue-500/50"},null,512),[[rn,c.value]]),w[30]||(w[30]=i("span",{class:"ml-2 text-slate-300"},"Run Custom Script",-1))])]),c.value==="npm"?(S(),E("div",C0,[w[32]||(w[32]=i("label",{class:"block text-xs font-medium text-slate-400 mb-1"},"NPM Script Name (e.g. start, dev, prod)",-1)),i("div",S0,[w[31]||(w[31]=i("span",{class:"text-slate-500 mr-2 font-mono"},"npm run",-1)),ke(i("input",{"onUpdate:modelValue":w[11]||(w[11]=B=>o.value.npmScript=B),type:"text",class:"flex-1 bg-slate-900 border border-slate-600 rounded-lg px-3 py-2 text-white focus:ring-2 focus:ring-blue-500 focus:border-transparent outline-none transition-all placeholder-slate-500 font-mono",placeholder:"start"},null,512),[[Fe,o.value.npmScript]])])])):ee("",!0),c.value==="script"?(S(),E("div",E0,[w[33]||(w[33]=i("label",{class:"block text-xs font-medium text-slate-400 mb-1"},"Script Path (e.g. app.js, dist/main.js)",-1)),i("div",A0,[ke(i("input",{"onUpdate:modelValue":w[12]||(w[12]=B=>o.value.customScript=B),type:"text",class:"flex-1 bg-slate-900 border border-slate-600 rounded-lg px-3 py-2 text-white focus:ring-2 focus:ring-blue-500 focus:border-transparent outline-none transition-all placeholder-slate-500 font-mono",placeholder:"app.js"},null,512),[[Fe,o.value.customScript]])])])):ee("",!0)]),i("div",T0,[i("div",$0,[w[37]||(w[37]=i("label",{class:"block text-sm font-medium text-slate-300"},"Environment Variables",-1)),i("div",R0,[i("button",{type:"button",onClick:F,class:"text-xs px-2 py-1 bg-slate-700 text-slate-300 hover:bg-slate-600 rounded border border-slate-600 transition-colors flex items-center"},[...w[35]||(w[35]=[i("svg",{class:"w-3 h-3 mr-1",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"})],-1),G(" Import .env ",-1)])]),i("input",{type:"file",ref_key:"envFileInput",ref:I,onChange:j,accept:".env, *.*",class:"hidden"},null,544),i("button",{type:"button",onClick:q,class:"text-xs px-2 py-1 bg-blue-500/10 text-blue-400 hover:bg-blue-500/20 rounded border border-blue-500/20 transition-colors flex items-center"},[...w[36]||(w[36]=[i("svg",{class:"w-3 h-3 mr-1",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 4v16m8-8H4"})],-1),G(" Add Variable ",-1)])])])]),i("div",M0,[(S(!0),E(_e,null,Je(p.value,(B,Q)=>(S(),E("div",{key:Q,class:"flex items-center gap-2"},[ke(i("input",{"onUpdate:modelValue":L=>B.name=L,type:"text",class:re(["w-1/3 bg-slate-900 border rounded-lg px-3 py-2 text-sm focus:ring-2 focus:border-transparent outline-none transition-all placeholder-slate-500 font-mono",T.value.includes(B.name)&&B.name.trim()!==""?"border-yellow-500 text-yellow-400 focus:ring-yellow-500":"border-slate-600 text-white focus:ring-blue-500"]),placeholder:"KEY",title:T.value.includes(B.name)&&B.name.trim()!==""?"Duplicate key":""},null,10,O0),[[Fe,B.name]]),w[39]||(w[39]=i("span",{class:"text-slate-500"},"=",-1)),ke(i("input",{"onUpdate:modelValue":L=>B.value=L,type:"text",class:"flex-1 bg-slate-900 border border-slate-600 rounded-lg px-3 py-2 text-sm text-white focus:ring-2 focus:ring-blue-500 focus:border-transparent outline-none transition-all placeholder-slate-500 font-mono",placeholder:"VALUE"},null,8,B0),[[Fe,B.value]]),i("button",{type:"button",onClick:L=>U(Q),class:"p-1.5 text-red-400 hover:bg-red-500/10 hover:text-red-300 rounded transition-colors",title:"Remove"},[...w[38]||(w[38]=[i("svg",{class:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})],-1)])],8,N0)]))),128)),T.value.length>0?(S(),E("div",P0,[...w[40]||(w[40]=[i("svg",{class:"w-4 h-4 mr-1",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})],-1),G(" Warning: Duplicate environment variable keys detected. ",-1)])])):ee("",!0),p.value.length===0?(S(),E("div",I0," No environment variables defined. ")):ee("",!0)])])])],32)]),i("div",L0,[i("div",null,[e.appToEdit?(S(),E("button",{key:0,type:"button",onClick:_,class:"px-4 py-2.5 text-sm font-medium text-red-400 hover:text-white bg-red-500/10 hover:bg-red-500 rounded-lg transition-colors border border-red-500/20"}," Delete Application ")):ee("",!0)]),i("div",D0,[i("button",{type:"button",onClick:w[13]||(w[13]=B=>P.$emit("close")),class:"px-5 py-2.5 text-sm font-medium text-slate-300 hover:text-white bg-slate-700 hover:bg-slate-600 rounded-lg transition-colors border border-slate-600"},"Cancel"),i("button",{onClick:K,disabled:b.value,class:"px-5 py-2.5 text-sm font-medium text-white bg-gradient-to-r from-blue-600 to-indigo-600 hover:from-blue-500 hover:to-indigo-500 rounded-lg transition-all shadow-lg shadow-blue-500/30 disabled:opacity-70 flex items-center"},[b.value?(S(),E("svg",V0,[...w[41]||(w[41]=[i("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),i("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)])])):ee("",!0),G(" "+H(e.appToEdit?"Update App":"Deploy App"),1)],8,j0)])])])])):ee("",!0)}},F0=Xo(H0,[["__scopeId","data-v-20522177"]]),U0={class:"flex items-center space-x-3 overflow-hidden"},z0={class:"text-[10px] font-mono text-slate-400 font-bold tracking-widest truncate uppercase"},q0={class:"flex items-center space-x-1 ml-4"},W0={key:0,class:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},K0={key:1,class:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},G0={class:"text-slate-600 opacity-50 select-none mr-2"},Y0={__name:"LogViewer",props:{isOpen:Boolean,appId:String,appName:String},emits:["close"],setup(e,{emit:t}){const s=e,n=W([]),o=W(null),r=W(!1),l=W(!1),a=W({x:window.innerWidth-850,y:window.innerHeight-550});let c=null;const p=d=>{l.value=!0;const m=d.clientX-a.value.x,b=d.clientY-a.value.y,y=O=>{let q=O.clientX-m,U=O.clientY-b;const I=20,F=r.value?300:800;r.value,q=Math.max(-F+I,Math.min(q,window.innerWidth-I)),U=Math.max(0,Math.min(U,window.innerHeight-I)),a.value.x=q,a.value.y=U},T=()=>{l.value=!1,document.removeEventListener("mousemove",y),document.removeEventListener("mouseup",T)};document.addEventListener("mousemove",y),document.addEventListener("mouseup",T)};return Ft(()=>s.isOpen,d=>{d&&s.appId?(n.value=[],(a.value.x<0||a.value.x>window.innerWidth-100)&&(a.value.x=window.innerWidth-(r.value?350:850)),(a.value.y<0||a.value.y>window.innerHeight-100)&&(a.value.y=window.innerHeight-(r.value?100:550)),fetch(`/api/deploy/${s.appId}/logs`,{headers:{Authorization:`Bearer ${localStorage.getItem("pm2me_token")}`}}).then(m=>m.text()).then(m=>{m&&(n.value=m.split(`
|
|
4
|
-
`).filter(b=>b.trim()),Rt(()=>{o.value&&(o.value.scrollTop=o.value.scrollHeight)})),c=ns(),c.on(`deploy-log-${s.appId}`,b=>{let y=b;if(typeof b!="string")try{y=new TextDecoder().decode(b)}catch{y=String(b)}n.value.push(y.trim()),Rt(()=>{o.value&&(o.value.scrollTop=o.value.scrollHeight)})})}).catch(m=>console.error("Failed to fetch deploy logs",m))):c&&(c.disconnect(),c=null)}),os(()=>{c&&c.disconnect()}),(d,m)=>e.isOpen?(S(),E("div",{key:0,class:re(["fixed z-[60] flex flex-col shadow-2xl border border-slate-700 overflow-hidden ring-1 ring-slate-800",{"transition-all duration-300":!l.value}]),style:Mt({left:a.value.x+"px",top:a.value.y+"px",width:r.value?"300px":"800px",height:r.value?"44px":"500px",maxHeight:"90vh",maxWidth:"95vw","will-change":"left, top"})},[i("div",{class:"flex items-center justify-between p-3 bg-slate-800/90 backdrop-blur-md border-b border-slate-700 cursor-move select-none",onMousedown:p},[i("div",U0,[m[2]||(m[2]=i("div",{class:"flex space-x-1.5 flex-shrink-0"},[i("div",{class:"w-3 h-3 rounded-full bg-red-500 shadow-sm shadow-red-900/50"}),i("div",{class:"w-3 h-3 rounded-full bg-yellow-500 shadow-sm shadow-yellow-900/50"}),i("div",{class:"w-3 h-3 rounded-full bg-green-500 shadow-sm shadow-green-900/50"})],-1)),i("span",z0," console : "+H(e.appName),1)]),i("div",q0,[i("button",{onClick:m[0]||(m[0]=b=>r.value=!r.value),class:"p-1 hover:bg-slate-700 rounded transition-colors text-slate-400 hover:text-white",title:"Minimize/Expand"},[r.value?(S(),E("svg",K0,[...m[4]||(m[4]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 8V4m0 0h4M4 4l5 5m11-1V4m0 0h-4m4 0l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5l-5-5m5 5v-4m0 4h-4"},null,-1)])])):(S(),E("svg",W0,[...m[3]||(m[3]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 12H4"},null,-1)])]))]),i("button",{onClick:m[1]||(m[1]=b=>d.$emit("close")),class:"p-1 hover:bg-red-500/20 rounded transition-colors text-slate-400 hover:text-red-400",title:"Close"},[...m[5]||(m[5]=[i("svg",{class:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)])])])],32),ke(i("div",{class:"flex-1 overflow-y-auto p-4 font-mono text-sm leading-relaxed custom-scrollbar bg-black",ref_key:"logContainer",ref:o},[(S(!0),E(_e,null,Je(n.value,(b,y)=>(S(),E("div",{key:y,class:re([{"text-emerald-400 font-bold":b.includes("successfully")||b.includes("Done")||b.includes("Completed"),"text-red-400":b.toLowerCase().includes("err")||b.toLowerCase().includes("fail"),"text-indigo-400 font-bold tracking-tight":b.includes("[SYSTEM]")||b.includes("[pm2me]"),"text-blue-400":b.includes("Starting")||b.includes("Cloning")||b.includes("Synchronizing"),"text-slate-300":!b.toLowerCase().includes("err")&&!b.includes("successfully")&&!b.includes("[SYSTEM]")&&!b.includes("[pm2me]")&&!b.includes("Starting")},"break-words whitespace-pre-wrap py-0.5 border-b border-slate-900/50 last:border-0"])},[i("span",G0,"["+H(new Date().toLocaleTimeString())+"]",1),G(H(b),1)],2))),128))],512),[[ru,!r.value]])],6)):ee("",!0)}},J0=Xo(Y0,[["__scopeId","data-v-550ff13e"]]),X0={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-5 gap-4 mb-8"},Q0={class:"bg-slate-800/80 backdrop-blur-sm p-4 rounded-2xl border border-slate-700 shadow-lg group hover:border-purple-500/50 transition-all duration-300"},Z0={class:"flex flex-col space-y-1"},eh={class:"flex items-center justify-between"},th={class:"text-sm font-bold text-white font-mono"},sh={class:"flex items-center justify-between"},nh={class:"text-sm font-bold text-white font-mono"},oh={class:"bg-slate-800/80 backdrop-blur-sm p-5 rounded-2xl border border-slate-700 shadow-lg group hover:border-blue-500/50 transition-all duration-300"},rh={class:"flex items-end justify-between"},ih={class:"text-2xl font-bold text-white tracking-tight"},lh={class:"text-xs text-slate-500 mt-1 truncate max-w-[150px]"},ah={class:"w-20 h-1.5 bg-slate-700 rounded-full overflow-hidden"},ch={class:"bg-slate-800/80 backdrop-blur-sm p-5 rounded-2xl border border-slate-700 shadow-lg group hover:border-emerald-500/50 transition-all duration-300"},uh={class:"flex items-end justify-between"},dh={class:"text-2xl font-bold text-white tracking-tight"},fh={class:"text-xs text-slate-500 mt-1"},hh={class:"w-20 h-1.5 bg-slate-700 rounded-full overflow-hidden"},ph={class:"bg-slate-800/80 backdrop-blur-sm p-5 rounded-2xl border border-slate-700 shadow-lg group hover:border-orange-500/50 transition-all duration-300"},mh={class:"flex items-end justify-between"},gh={class:"text-2xl font-bold text-white tracking-tight"},vh={class:"text-xs text-slate-500 mt-1"},bh={class:"w-20 h-1.5 bg-slate-700 rounded-full overflow-hidden"},xh={class:"bg-slate-800/80 backdrop-blur-sm p-5 rounded-2xl border border-slate-700 shadow-lg group hover:border-indigo-500/50 transition-all duration-300"},yh={class:"flex flex-col"},wh={class:"text-2xl font-bold text-white tracking-tight"},_h={class:"text-xs text-slate-500 mt-1"},kh={__name:"ServerStats",setup(e){const t=W({cpu:{usage:0,model:"Loading...",cores:0},memory:{total:0,free:0,used:0,percentage:0},disk:{total:0,free:0,used:0,percentage:0},network:{down:0,up:0},uptime:0,hostname:"..."});let s=null;const n=async()=>{try{const a=await fetch("/api/system/stats",{headers:{Authorization:`Bearer ${localStorage.getItem("pm2me_token")}`}});a.ok&&(t.value=await a.json())}catch(a){console.error("Failed to fetch system stats",a)}},o=a=>{if(a===0)return"0 B/s";const c=1024,p=["B/s","KB/s","MB/s","GB/s"],d=Math.floor(Math.log(a)/Math.log(c));return parseFloat((a/Math.pow(c,d)).toFixed(1))+" "+p[d]},r=a=>{if(a===0)return"0 B";const c=1024,p=["B","KB","MB","GB","TB"],d=Math.floor(Math.log(a)/Math.log(c));return parseFloat((a/Math.pow(c,d)).toFixed(2))+" "+p[d]},l=a=>{const c=Math.floor(a/86400),p=Math.floor(a%(3600*24)/3600),d=Math.floor(a%3600/60);return c>0?`${c}d ${p}h ${d}m`:p>0?`${p}h ${d}m`:`${d}m`};return bs(()=>{n(),s=ns(window.location.origin),s.on("system-stats",a=>{t.value=a}),s.on("connect_error",a=>{console.error("Socket connection error:",a)})}),os(()=>{s&&s.disconnect()}),(a,c)=>(S(),E("div",X0,[i("div",Q0,[c[2]||(c[2]=rt('<div class="flex items-center justify-between mb-2"><span class="text-slate-400 text-xs font-medium">Network</span><div class="p-1.5 bg-purple-500/10 rounded-lg text-purple-400"><svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4"></path></svg></div></div>',1)),i("div",Z0,[i("div",eh,[c[0]||(c[0]=i("div",{class:"flex items-center text-slate-400 text-[10px]"},[i("svg",{class:"w-3 h-3 mr-1 text-emerald-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 14l-7 7m0 0l-7-7m7 7V3"})]),G(" Down ")],-1)),i("div",th,H(o(t.value.network.down)),1)]),i("div",sh,[c[1]||(c[1]=i("div",{class:"flex items-center text-slate-400 text-[10px]"},[i("svg",{class:"w-3 h-3 mr-1 text-blue-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 10l7-7m0 0l7 7m-7-7v18"})]),G(" Up ")],-1)),i("div",nh,H(o(t.value.network.up)),1)])])]),i("div",oh,[c[3]||(c[3]=rt('<div class="flex items-center justify-between mb-3"><span class="text-slate-400 text-sm font-medium">Processor</span><div class="p-2 bg-blue-500/10 rounded-lg text-blue-400"><svg class="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 3v2m6-2v2M9 19v2m6-2v2M5 9H3m2 6H3m18-6h-2m2 6h-2M7 19h10a2 2 0 002-2V7a2 2 0 00-2-2H7a2 2 0 00-2 2v10a2 2 0 002 2zM9 9h6v6H9V9z"></path></svg></div></div>',1)),i("div",rh,[i("div",null,[i("div",ih,H(t.value.cpu.usage.toFixed(1))+"%",1),i("div",lh,H(t.value.cpu.model),1)]),i("div",ah,[i("div",{class:"h-full bg-blue-500 rounded-full transition-all duration-500",style:Mt({width:t.value.cpu.usage+"%"})},null,4)])])]),i("div",ch,[c[4]||(c[4]=rt('<div class="flex items-center justify-between mb-3"><span class="text-slate-400 text-sm font-medium">Memory (RAM)</span><div class="p-2 bg-emerald-500/10 rounded-lg text-emerald-400"><svg class="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg></div></div>',1)),i("div",uh,[i("div",null,[i("div",dh,H(t.value.memory.percentage.toFixed(1))+"%",1),i("div",fh,H(r(t.value.memory.used))+" / "+H(r(t.value.memory.total)),1)]),i("div",hh,[i("div",{class:"h-full bg-emerald-500 rounded-full transition-all duration-500",style:Mt({width:t.value.memory.percentage+"%"})},null,4)])])]),i("div",ph,[c[5]||(c[5]=rt('<div class="flex items-center justify-between mb-3"><span class="text-slate-400 text-sm font-medium">Storage (C:)</span><div class="p-2 bg-orange-500/10 rounded-lg text-orange-400"><svg class="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4"></path></svg></div></div>',1)),i("div",mh,[i("div",null,[i("div",gh,H(t.value.disk.percentage.toFixed(1))+"%",1),i("div",vh,H(r(t.value.disk.used))+" / "+H(r(t.value.disk.total)),1)]),i("div",bh,[i("div",{class:"h-full bg-orange-500 rounded-full transition-all duration-500",style:Mt({width:t.value.disk.percentage+"%"})},null,4)])])]),i("div",xh,[c[6]||(c[6]=rt('<div class="flex items-center justify-between mb-3"><span class="text-slate-400 text-sm font-medium">System Uptime</span><div class="p-2 bg-indigo-500/10 rounded-lg text-indigo-400"><svg class="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg></div></div>',1)),i("div",yh,[i("div",wh,H(l(t.value.uptime)),1),i("div",_h,H(t.value.hostname),1)])])]))}},Ch={class:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8 space-y-8"},Sh={class:"flex items-center space-x-4"},Eh={key:0,class:"animate-spin w-5 h-5 text-slate-400",fill:"none",viewBox:"0 0 24 24"},Ah={key:1,class:"w-5 h-5 text-red-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},Th={key:2,class:"w-5 h-5 text-amber-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},$h={key:3,class:"w-5 h-5 text-emerald-400",fill:"currentColor",viewBox:"0 0 20 20"},Rh={key:0,class:"text-sm font-semibold text-slate-400"},Mh={key:1,class:"text-sm font-semibold text-red-400"},Oh={key:2,class:"text-sm font-semibold text-amber-400"},Bh={key:3,class:"text-sm font-semibold text-emerald-400"},Nh={key:4,class:"text-xs text-slate-500 mt-0.5"},Ph={class:"text-slate-300 font-mono"},Ih={key:0},Lh={class:"text-amber-300 font-mono"},Dh={key:5,class:"text-xs text-slate-500 mt-0.5"},jh={class:"flex items-center space-x-2 flex-shrink-0"},Vh={key:0,disabled:"",class:"flex items-center px-4 py-2 rounded-xl text-sm font-medium bg-slate-700 text-slate-400 cursor-wait"},Hh=["disabled"],Fh={class:"flex flex-col sm:flex-row justify-between items-start sm:items-center space-y-4 sm:space-y-0"},Uh={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6"},zh={class:"flex items-center justify-between mb-4"},qh={class:"flex items-center space-x-3"},Wh={class:"flex items-center gap-2"},Kh={class:"text-lg font-bold text-white"},Gh={class:"flex items-center space-x-2 text-xs font-medium mt-1"},Yh={class:"relative flex h-2 w-2"},Jh={key:0,class:"animate-ping absolute inline-flex h-full w-full rounded-full bg-emerald-400 opacity-75"},Xh={key:0,class:"text-slate-500 whitespace-nowrap"},Qh={class:"flex items-center space-x-2"},Zh=["onClick"],ep=["onClick"],tp=["onClick"],sp={class:"grid grid-cols-2 gap-4 mb-4 text-sm"},np={class:"bg-slate-900/50 rounded-lg p-3 border border-slate-700"},op={class:"font-semibold text-slate-200"},rp={class:"bg-slate-900/50 rounded-lg p-3 border border-slate-700"},ip={class:"font-semibold text-slate-200"},lp={class:"bg-slate-900/50 rounded-lg p-3 border border-slate-700"},ap={class:"font-semibold text-slate-200"},cp={class:"bg-slate-900/50 rounded-lg p-3 border border-slate-700"},up={class:"font-semibold text-slate-200"},dp={key:0,class:"mb-4 text-[11px] bg-slate-900/50 border border-slate-700/50 p-2 rounded-lg text-slate-400 font-mono flex items-start",title:"Latest Commit"},fp={class:"truncate"},hp={key:1,class:"mb-4 text-[10px] bg-red-500/10 border border-red-500/20 p-2 rounded-lg text-red-400 font-mono flex flex-col gap-1 shadow-[0_0_10px_rgba(239,68,68,0.1)]"},pp={class:"flex items-start"},mp={class:"truncate opacity-80"},gp={key:0,class:"mt-4 pt-5 border-t border-slate-700/30 mb-6"},vp={class:"flex items-center justify-between mb-4 px-1"},bp={key:0,class:"flex items-center gap-2"},xp={key:0,class:"relative flex h-2 w-2"},yp={class:"relative flex items-center justify-between px-4 pb-2"},wp={key:1,class:"w-4 h-4 text-white relative z-10 drop-shadow-md",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},_p={key:2,class:"w-4 h-4 text-white relative z-10 drop-shadow-md",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},kp={key:3,class:"w-2.5 h-2.5 bg-white rounded-full relative z-10 shadow-[0_0_8px_rgba(255,255,255,0.8)]"},Cp={key:4,class:"w-1.5 h-1.5 bg-slate-500 rounded-full relative z-10 opacity-50 group-hover:opacity-100 transition-opacity"},Sp={class:"mt-auto grid grid-cols-3 gap-2"},Ep=["onClick","disabled"],Ap={key:0,class:"animate-spin h-4 w-4 mr-1.5",viewBox:"0 0 24 24"},Tp={key:1,class:"w-4 h-4 mr-1.5",fill:"currentColor",viewBox:"0 0 20 20"},$p=["onClick","disabled"],Rp={key:0,class:"animate-spin h-4 w-4 mr-1.5",viewBox:"0 0 24 24"},Mp={key:1,class:"w-4 h-4 mr-1.5",fill:"currentColor",viewBox:"0 0 20 20"},Op=["onClick","disabled"],Bp={key:0,class:"animate-spin h-4 w-4 mr-1.5",viewBox:"0 0 24 24"},Np={key:1,class:"w-4 h-4 mr-1.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Pp=["onClick","disabled"],Ip={key:0,class:"animate-spin h-4 w-4 mr-1.5",viewBox:"0 0 24 24"},Lp={key:1,class:"w-4 h-4 mr-1.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},Dp={key:2,class:"ml-1 px-1.5 py-0.5 text-[10px] bg-purple-500/20 text-purple-300 rounded-full border border-purple-500/30 font-bold"},jp={key:0,class:"absolute inset-0 bg-blue-500/5 animate-pulse rounded-2xl blur-xl -z-10"},Vp={class:"flex items-center justify-between mb-4"},Hp={class:"flex items-center space-x-3"},Fp={key:0,class:"animate-spin h-6 w-6",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},Up={key:1,class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},zp={class:"text-lg font-bold text-white"},qp={class:"flex items-center space-x-2 text-xs font-medium mt-1"},Wp={key:0,class:"ml-2 text-[10px] bg-slate-700/50 border border-slate-600 px-1.5 py-0.5 rounded text-slate-300 font-mono inline-block max-w-[150px] truncate align-bottom",title:"Deployed Commit"},Kp={class:"flex items-center space-x-2"},Gp=["onClick"],Yp=["onClick"],Jp={key:0,class:"mt-4 pt-5 border-t border-slate-700/30 mb-6"},Xp={class:"flex items-center justify-between mb-4 px-1"},Qp={class:"flex items-center gap-2"},Zp={key:0,class:"relative flex h-2 w-2"},em={class:"relative flex items-center justify-between px-4 pb-2"},tm={key:1,class:"w-4 h-4 text-white relative z-10 drop-shadow-md",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},sm={key:2,class:"w-4 h-4 text-white relative z-10 drop-shadow-md",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},nm={key:3,class:"w-2.5 h-2.5 bg-white rounded-full relative z-10 shadow-[0_0_8px_rgba(255,255,255,0.8)]"},om={key:4,class:"w-1.5 h-1.5 bg-slate-500 rounded-full relative z-10 opacity-50 group-hover:opacity-100 transition-opacity"},rm=["onClick","disabled"],im={key:0,class:"animate-spin h-4 w-4 mr-1.5",viewBox:"0 0 24 24"},lm={key:1,class:"w-4 h-4 mr-1.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},am={key:2,class:"ml-2 px-1.5 py-0.5 text-[10px] bg-purple-500/20 text-purple-300 rounded-full border border-purple-500/30 font-bold"},cm={key:0,class:"flex flex-col items-center justify-center p-12 bg-slate-800/30 rounded-3xl border border-slate-700/50 border-dashed"},um={key:1,class:"fixed inset-0 z-[100] flex items-center justify-center p-4 bg-slate-900/90 backdrop-blur-md"},dm={class:"bg-slate-800 border border-slate-700 rounded-3xl shadow-2xl max-w-md w-full p-8 text-center transform transition-all scale-100"},fm={class:"text-slate-400 mb-8 leading-relaxed"},hm={class:"text-white font-semibold"},pm={class:"flex flex-col sm:flex-row gap-3"},mm={__name:"Dashboard",setup(e){const t=W([]),s=W([]),n=W(!1),o=W(!1),r=W(""),l=W(""),a=W(null),c=W({}),p=W({}),d=W({}),m=W({}),b=W(!1),y=W(null),T=W({loaded:!1,installed:!1,version:null,latestVersion:null,hasUpdate:!1,isChecking:!1,isActing:!1}),O=async()=>{T.value.isChecking=!0;try{const f=await(await fetch("/api/pm2/version-check",{headers:{Authorization:`Bearer ${localStorage.getItem("pm2me_token")}`}})).json();T.value={...T.value,...f,loaded:!0,isChecking:!1}}catch{T.value.isChecking=!1,T.value.loaded=!0}},q=async()=>{T.value.isActing=!0;try{await fetch("/api/pm2/install-update",{method:"POST",headers:{Authorization:`Bearer ${localStorage.getItem("pm2me_token")}`}}),await O()}catch{}finally{T.value.isActing=!1}};let U=null,I;const F=Ie(()=>{const h=(t.value||[]).map(f=>f?.name).filter(Boolean);return(s.value||[]).filter(f=>f&&!h.includes(f.name))}),j=async()=>{try{const f={Authorization:`Bearer ${localStorage.getItem("pm2me_token")}`},[v,u]=await Promise.all([fetch("/api/pm2/list",{headers:f}),fetch("/api/apps",{headers:f})]);if(v.ok&&(t.value=await v.json()),u.ok){const g=await u.json();s.value=g.map(x=>{let k=x.pipelineState;return k==="online"&&(k="hidden"),x.pipelineState=d.value[x.id]||k||"hidden",x})}t.value=t.value.map(g=>{if(!g)return null;const x=s.value.find(k=>k&&k.name===g.name);return x?(g.id=x.id,g.commitHash=x.commitHash,g.commitMessage=x.commitMessage,g.rollbackOccurred=x.rollbackOccurred,g.failedCommitHash=x.failedCommitHash,g.failedCommitMessage=x.failedCommitMessage,g.pipelineState=d.value[x.id]||x.pipelineState||"hidden"):g.pipelineState="hidden",g}).filter(Boolean),s.value.forEach(g=>{Z(g.id)})}catch(h){console.error("Fetch apps error:",h)}},Z=async h=>{try{const f=localStorage.getItem("pm2me_token"),u=await(await fetch(`/api/apps/${h}/sync-status`,{headers:{Authorization:`Bearer ${f}`}})).json();u.behindCount!==void 0&&(p.value[h]=u.behindCount)}catch(f){console.error("Failed to fetch sync status",f)}},K=h=>{const f=s.value.find(v=>v.name===h);return f?f.id:null},_=async(h,f)=>{const v=`${f}-${h}`;c.value[v]=!0;try{await fetch(`/api/pm2/${h}`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${localStorage.getItem("pm2me_token")}`},body:JSON.stringify({nameOrId:f})}),await j()}catch{alert(`Failed to ${h} app`)}finally{c.value[v]=!1}},P=async h=>{try{await fetch(`/api/apps/${h}`,{method:"DELETE",headers:{Authorization:`Bearer ${localStorage.getItem("pm2me_token")}`}}),await j()}catch(f){console.error("Failed to remove db app",f)}},w=async h=>{h&&B(h)},B=h=>{y.value=h,b.value=!0},Q=async()=>{const h=y.value;if(h){b.value=!1,y.value=null;try{await fetch("/api/pm2/delete",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${localStorage.getItem("pm2me_token")}`},body:JSON.stringify({nameOrId:h.name})})}catch{console.error("Failed to delete PM2 process, proceeding to DB removal")}await P(h.id)}},L=async(h,f)=>{const v=`${f||h}-deploy`;c.value[v]=!0;try{await fetch(`/api/deploy/${h}`,{method:"POST",headers:{Authorization:`Bearer ${localStorage.getItem("pm2me_token")}`}}),await j()}catch{alert("Failed to trigger deployment restart.")}finally{c.value[v]=!1}},oe=h=>{const f=s.value.find(v=>v.name===h.name);if(!f){alert("Cannot deploy this app as it was not deployed via PM2Me (No config found).");return}L(f.id,h.name)},he=h=>{l.value=h.name;const f=s.value.find(v=>v.name===h.name);r.value=f?f.id:h.name,o.value=!0},ye=h=>{l.value=h.name,r.value=h.id,o.value=!0},me=(h,f=!1)=>{let v=h;if(f&&(v=s.value.find(u=>u.name===h.name),!v)){alert("Cannot edit this app as it was not deployed via PM2Me (No config found).");return}a.value=v,n.value=!0},ie=h=>{if(!h)return"0s";const f=Date.now()-h,v=Math.floor(f/1e3),u=Math.floor(v/(3600*24)),g=Math.floor(v%(3600*24)/3600),x=Math.floor(v%3600/60);return u>0?`${u}d ${g}h`:g>0?`${g}h ${x}m`:x>0?`${x}m`:`${v}s`},ne=h=>{if(!h)return"0 B";const f=1024,v=["B","KB","MB","GB"],u=Math.floor(Math.log(h)/Math.log(f));return parseFloat((h/Math.pow(f,u)).toFixed(2))+" "+v[u]},Te=h=>h==="online"?"bg-emerald-500":h==="stopping"||h==="stopped"?"bg-amber-500":h==="errored"?"bg-red-500":"bg-slate-500",we=h=>h==="online"?"text-emerald-400":h==="stopping"||h==="stopped"?"text-amber-400":h==="errored"?"text-red-400":"text-slate-400",Se=["pulling","building","starting","online"],ve=h=>({pulling:"Pull",building:"Build",starting:"Run",online:"Online"})[h]||h,De=h=>h&&typeof h=="string"&&h.startsWith("failed:")?h.split(":")[1]:h,Qe=h=>{const f=De(h),v=Se.indexOf(f);if(v===-1)return"0%";const u=v/(Se.length-1)*100;return`calc(${u}% - ${u/100*48}px)`},Be=(h,f)=>{if(f==="online"&&h==="online")return!0;const v=De(f),u=Se.indexOf(h),g=Se.indexOf(v);return u<g},Ee=(h,f)=>M(h,f)?"bg-red-500 border-red-400 shadow-[0_0_15px_rgba(239,68,68,0.6)] border-0 scale-110":Be(h,f)?h==="online"&&f==="online"?"bg-gradient-to-br from-emerald-500 to-green-600 shadow-[0_0_15px_rgba(16,185,129,0.5)] border-0 scale-110":"bg-gradient-to-br from-indigo-500 to-blue-600 shadow-[0_0_10px_rgba(99,102,241,0.4)] border-0":De(f)===h?"bg-slate-800 border-[1.5px] border-blue-400 shadow-[0_0_15px_rgba(96,165,250,0.5)] scale-110":"bg-slate-800/50 border border-slate-700/50 backdrop-blur-sm shadow-inner",M=(h,f)=>f&&typeof f=="string"&&f.startsWith("failed:")?h===f.split(":")[1]:f==="failed"&&h==="starting",A=()=>{U||(U=ns()),s.value.forEach(h=>{U.off(`pipeline-state-${h.id}`),U.on(`pipeline-state-${h.id}`,f=>{m.value[h.id]&&(clearTimeout(m.value[h.id]),delete m.value[h.id]),d.value[h.id]=f;const v=u=>{const g=t.value.find(k=>k.name===h.name);g&&(g.pipelineState=u);const x=s.value.find(k=>k.id===h.id);x&&(x.pipelineState=u)};v(f),f==="online"&&(j(),m.value[h.id]=setTimeout(()=>{d.value[h.id]="hidden",v("hidden")},2e3))})})};return bs(async()=>{await j(),A(),I=setInterval(j,12345),O()}),os(()=>{U&&U.disconnect(),clearInterval(I)}),(h,f)=>(S(),E("div",Ch,[$e(kh),i("div",{class:re(["rounded-2xl border flex items-center justify-between px-6 py-4 shadow-xl backdrop-blur-sm transition-all",!T.value.loaded||T.value.isChecking?"bg-slate-800/60 border-slate-700":T.value.installed?T.value.hasUpdate?"bg-amber-500/5 border-amber-500/30":"bg-emerald-500/5 border-emerald-500/20":"bg-red-500/5 border-red-500/30"])},[i("div",Sh,[i("div",{class:re(["w-10 h-10 rounded-xl flex items-center justify-center flex-shrink-0",!T.value.loaded||T.value.isChecking?"bg-slate-700":T.value.installed?T.value.hasUpdate?"bg-amber-500/20":"bg-emerald-500/20":"bg-red-500/20"])},[!T.value.loaded||T.value.isChecking?(S(),E("svg",Eh,[...f[5]||(f[5]=[i("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),i("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"},null,-1)])])):T.value.installed?T.value.hasUpdate?(S(),E("svg",Th,[...f[7]||(f[7]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"},null,-1)])])):(S(),E("svg",$h,[...f[8]||(f[8]=[i("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z","clip-rule":"evenodd"},null,-1)])])):(S(),E("svg",Ah,[...f[6]||(f[6]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 9v2m0 4h.01M5.07 19H19a2 2 0 001.75-2.96L13.75 4a2 2 0 00-3.5 0L3.25 16.04A2 2 0 005.07 19z"},null,-1)])]))],2),i("div",null,[!T.value.loaded||T.value.isChecking?(S(),E("p",Rh,"Checking PM2 status...")):T.value.installed?T.value.hasUpdate?(S(),E("p",Oh,"PM2 update available")):(S(),E("p",Bh,"PM2 is up to date")):(S(),E("p",Mh,"PM2 is not installed")),T.value.loaded&&!T.value.isChecking&&T.value.installed?(S(),E("p",Nh,[f[10]||(f[10]=G(" Installed: ",-1)),i("span",Ph,"v"+H(T.value.version),1),T.value.hasUpdate?(S(),E("span",Ih,[f[9]||(f[9]=G(" โ Latest: ",-1)),i("span",Lh,"v"+H(T.value.latestVersion),1)])):ee("",!0)])):T.value.loaded&&!T.value.isChecking&&!T.value.installed?(S(),E("p",Dh,"PM2 is required to run and manage applications")):ee("",!0)])]),i("div",jh,[T.value.loaded&&!T.value.isChecking&&T.value.isActing?(S(),E("button",Vh,[f[11]||(f[11]=i("svg",{class:"animate-spin w-4 h-4 mr-2",fill:"none",viewBox:"0 0 24 24"},[i("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),i("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})],-1)),G(" "+H(T.value.installed?"Updating...":"Installing..."),1)])):T.value.loaded&&!T.value.isChecking&&!T.value.installed?(S(),E("button",{key:1,onClick:q,class:"flex items-center px-4 py-2 rounded-xl text-sm font-medium bg-blue-600 hover:bg-blue-500 text-white transition-all shadow-lg shadow-blue-500/20"},[...f[12]||(f[12]=[i("svg",{class:"w-4 h-4 mr-2",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})],-1),G(" Install PM2 ",-1)])])):T.value.loaded&&!T.value.isChecking&&T.value.hasUpdate?(S(),E("button",{key:2,onClick:q,class:"flex items-center px-4 py-2 rounded-xl text-sm font-medium bg-amber-500 hover:bg-amber-400 text-white transition-all shadow-lg shadow-amber-500/20"},[...f[13]||(f[13]=[i("svg",{class:"w-4 h-4 mr-2",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})],-1),G(" Update PM2 ",-1)])])):ee("",!0),i("button",{onClick:O,disabled:T.value.isChecking,class:"p-2 text-slate-400 hover:text-white transition-colors",title:"Refresh"},[(S(),E("svg",{class:re(["w-4 h-4",{"animate-spin":T.value.isChecking}]),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[...f[14]||(f[14]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"},null,-1)])],2))],8,Hh)])],2),i("div",Fh,[f[16]||(f[16]=i("div",null,[i("h1",{class:"text-3xl font-bold text-white tracking-tight"},"Applications"),i("p",{class:"text-sm text-slate-400 mt-1"},"Manage and monitor your PM2 deployments")],-1)),i("button",{onClick:f[0]||(f[0]=v=>n.value=!0),class:"flex items-center px-4 py-2.5 bg-gradient-to-r from-blue-600 to-indigo-600 hover:from-blue-500 hover:to-indigo-500 text-white text-sm font-medium rounded-xl transition-all shadow-lg shadow-blue-500/30 transform hover:-translate-y-0.5"},[...f[15]||(f[15]=[i("svg",{class:"h-5 w-5 mr-2",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 4v16m8-8H4"})],-1),G(" Deploy New App ",-1)])])]),i("div",Uh,[(S(!0),E(_e,null,Je(t.value,v=>(S(),E("div",{key:v.pm_id,class:"bg-slate-800/80 backdrop-blur-sm rounded-2xl shadow-xl border border-slate-700 p-6 flex flex-col transition-all hover:border-slate-600 hover:shadow-2xl"},[i("div",zh,[i("div",qh,[f[17]||(f[17]=i("div",{class:"w-10 h-10 rounded-xl bg-slate-700/50 flex items-center justify-center border border-slate-600"},[i("svg",{class:"h-6 w-6 text-slate-300",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01"})])],-1)),i("div",null,[i("div",Wh,[i("h2",Kh,H(v.name),1)]),i("div",Gh,[i("span",Yh,[v.pm2_env.status==="online"?(S(),E("span",Jh)):ee("",!0),i("span",{class:re(["relative inline-flex rounded-full h-2 w-2",Te(v.pm2_env.status)])},null,2)]),i("span",{class:re([we(v.pm2_env.status),"capitalize"])},H(v.pm2_env.status),3),v.pm2_env.pm_uptime?(S(),E("span",Xh,H(ie(v.pm2_env.pm_uptime)),1)):ee("",!0)])])]),i("div",Qh,[i("button",{onClick:u=>me(v,!0),class:"p-2 text-slate-400 hover:text-blue-400 bg-slate-700/50 hover:bg-slate-700 rounded-lg transition-colors border border-slate-600 focus:outline-none",title:"Edit Config"},[...f[18]||(f[18]=[i("svg",{class:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})],-1)])],8,Zh),i("button",{onClick:u=>he(v),class:"p-2 text-slate-400 hover:text-white bg-slate-700/50 hover:bg-slate-700 rounded-lg transition-colors border border-slate-600 focus:outline-none",title:"View Logs"},[...f[19]||(f[19]=[i("svg",{class:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})],-1)])],8,ep),i("button",{onClick:u=>B(v),class:"p-2 text-slate-400 hover:text-red-400 bg-slate-700/50 hover:bg-red-500/10 rounded-lg transition-colors border border-slate-600 focus:outline-none",title:"Delete Application"},[...f[20]||(f[20]=[i("svg",{class:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})],-1)])],8,tp)])]),i("div",sp,[i("div",np,[f[21]||(f[21]=i("p",{class:"text-slate-500 mb-1 leading-none text-xs"},"CPU Usage",-1)),i("p",op,H(v.monit?v.monit.cpu:0)+"%",1)]),i("div",rp,[f[22]||(f[22]=i("p",{class:"text-slate-500 mb-1 leading-none text-xs"},"Memory",-1)),i("p",ip,H(ne(v.monit?v.monit.memory:0)),1)]),i("div",lp,[f[23]||(f[23]=i("p",{class:"text-slate-500 mb-1 leading-none text-xs"},"Restarts",-1)),i("p",ap,H(v.pm2_env.restart_time),1)]),i("div",cp,[f[24]||(f[24]=i("p",{class:"text-slate-500 mb-1 leading-none text-xs"},"App Id",-1)),i("p",up,H(v.pm_id),1)])]),v.commitMessage?(S(),E("div",dp,[f[25]||(f[25]=i("svg",{class:"w-3.5 h-3.5 mr-2 mt-0.5 flex-shrink-0 text-slate-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("circle",{cx:"12",cy:"12",r:"3","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}),i("line",{x1:"3",y1:"12",x2:"9",y2:"12","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}),i("line",{x1:"15",y1:"12",x2:"21",y2:"12","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"})],-1)),i("span",fp,H(v.commitMessage),1)])):ee("",!0),v.rollbackOccurred&&v.failedCommitMessage?(S(),E("div",hp,[f[27]||(f[27]=i("div",{class:"flex items-center gap-1 font-bold uppercase tracking-wider text-[9px]"},[i("svg",{class:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})]),G(" Deployment Failed - Rolled Back ")],-1)),i("div",pp,[f[26]||(f[26]=i("svg",{class:"w-3.5 h-3.5 mr-2 mt-0.5 flex-shrink-0 text-red-500/60",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("circle",{cx:"12",cy:"12",r:"3","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}),i("line",{x1:"3",y1:"12",x2:"9",y2:"12","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}),i("line",{x1:"15",y1:"12",x2:"21",y2:"12","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"})],-1)),i("span",mp,H(v.failedCommitMessage),1)]),f[28]||(f[28]=i("p",{class:"text-[9px] text-red-500/50 mt-1 italic"},"The system is currently running on the previous stable version.",-1))])):ee("",!0),$e(_r,{"enter-active-class":"transition-all duration-500 ease-out","enter-from-class":"opacity-0 -translate-y-2","enter-to-class":"opacity-100 translate-y-0","leave-active-class":"transition-all duration-500 ease-in","leave-from-class":"opacity-100 translate-y-0","leave-to-class":"opacity-0 -translate-y-2"},{default:io(()=>[v.pipelineState&&v.pipelineState!=="hidden"?(S(),E("div",gp,[i("div",vp,[f[30]||(f[30]=i("span",{class:"text-[10px] font-bold text-slate-400 uppercase tracking-widest flex items-center gap-2"},[i("svg",{class:"w-3.5 h-3.5 text-blue-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 10V3L4 14h7v7l9-11h-7z"})]),G(" Deployment State ")],-1)),v.pipelineState?(S(),E("div",bp,[v.pipelineState!=="online"&&v.pipelineState!=="failed"?(S(),E("span",xp,[...f[29]||(f[29]=[i("span",{class:"animate-ping absolute inline-flex h-full w-full rounded-full bg-blue-400 opacity-75"},null,-1),i("span",{class:"relative inline-flex rounded-full h-2 w-2 bg-blue-500"},null,-1)])])):ee("",!0),i("span",{class:re(["text-[10px] font-mono whitespace-nowrap px-2 py-0.5 rounded-full border uppercase tracking-wider backdrop-blur-sm",v.pipelineState==="failed"?"text-red-400 bg-red-500/10 border-red-500/20":v.pipelineState==="online"?"text-emerald-400 bg-emerald-500/10 border-emerald-500/20":"text-blue-400 bg-blue-500/10 border-blue-500/20"])},H(v.pipelineState&&v.pipelineState.startsWith("failed:")?"FAILED":v.pipelineState),3)])):ee("",!0)]),i("div",yp,[f[33]||(f[33]=i("div",{class:"absolute left-6 right-6 h-1 bg-slate-800/80 rounded-full top-1/2 -translate-y-1/2 z-0 border border-slate-700/50 shadow-inner"},null,-1)),i("div",{class:re(["absolute left-6 h-1 bg-gradient-to-r top-1/2 -translate-y-1/2 z-0 transition-all duration-700 ease-out",v.pipelineState==="failed"?"from-red-600 to-rose-400 shadow-[0_0_10px_rgba(248,113,113,0.5)]":v.pipelineState==="online"?"from-emerald-500 to-indigo-400 shadow-[0_0_10px_rgba(16,185,129,0.5)]":"from-blue-600 to-indigo-400 shadow-[0_0_10px_rgba(96,165,250,0.5)]"]),style:Mt({width:Qe(v.pipelineState)})},null,6),(S(),E(_e,null,Je(["pulling","building","starting","online"],(u,g)=>i("div",{key:u,class:"relative z-10 flex flex-col items-center group"},[g<3?(S(),E("div",{key:0,class:re(["absolute h-1 top-1/2 -translate-y-1/2 left-full w-full z-[-1] pointer-events-none transition-colors duration-500",Be(u,v.pipelineState)?v.pipelineState==="failed"||v.pipelineState&&v.pipelineState.startsWith("failed:")?"bg-red-500/20":v.pipelineState==="online"?"bg-emerald-500/20":"bg-indigo-500/20":"bg-transparent"])},null,2)):ee("",!0),i("div",{class:re(["w-8 h-8 rounded-full flex items-center justify-center transition-all duration-500 relative",Ee(u,v.pipelineState)])},[v.pipelineState===u&&v.pipelineState!=="online"?(S(),E("div",{key:0,class:re(["absolute inset-0 rounded-full animate-ping",v.pipelineState==="failed"?"bg-red-400/20":"bg-blue-400/20"])},null,2)):ee("",!0),Be(u,v.pipelineState)?(S(),E("svg",wp,[...f[31]||(f[31]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"3",d:"M5 13l4 4L19 7"},null,-1)])])):v.pipelineState==="failed"&&M(u,v.pipelineState)?(S(),E("svg",_p,[...f[32]||(f[32]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"},null,-1)])])):v.pipelineState===u?(S(),E("div",kp)):(S(),E("div",Cp))],2),i("span",{class:re(["text-[9px] mt-2.5 font-bold uppercase tracking-wider transition-all duration-300",v.pipelineState===u?v.pipelineState==="failed"?"text-red-300 drop-shadow-[0_0_2px_rgba(252,165,165,0.8)]":v.pipelineState==="online"?"text-emerald-300 drop-shadow-[0_0_2px_rgba(110,231,183,0.8)]":"text-blue-300 drop-shadow-[0_0_2px_rgba(147,197,253,0.8)]":Be(u,v.pipelineState)?"text-slate-300":"text-slate-500"])},H(ve(u)),3)])),64))])])):ee("",!0)]),_:2},1024),i("div",Sp,[v.pm2_env.status==="online"?(S(),E("button",{key:0,onClick:u=>_("stop",v.name),disabled:c.value[`${v.name}-stop`],class:"flex items-center justify-center p-2 text-sm font-medium text-amber-500 bg-amber-500/10 hover:bg-amber-500/20 rounded-lg transition-colors border border-amber-500/20"},[c.value[`${v.name}-stop`]?(S(),E("svg",Ap,[...f[34]||(f[34]=[i("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4",fill:"none"},null,-1),i("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)])])):(S(),E("svg",Tp,[...f[35]||(f[35]=[i("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8 7a1 1 0 00-1 1v4a1 1 0 001 1h4a1 1 0 001-1V8a1 1 0 00-1-1H8z","clip-rule":"evenodd"},null,-1)])])),G(" "+H(c.value[`${v.name}-stop`]?"Stopping":"Stop"),1)],8,Ep)):(S(),E("button",{key:1,onClick:u=>_("start",v.name),disabled:c.value[`${v.name}-start`],class:"flex items-center justify-center p-2 text-sm font-medium text-emerald-500 bg-emerald-500/10 hover:bg-emerald-500/20 rounded-lg transition-colors border border-emerald-500/20"},[c.value[`${v.name}-start`]?(S(),E("svg",Rp,[...f[36]||(f[36]=[i("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4",fill:"none"},null,-1),i("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)])])):(S(),E("svg",Mp,[...f[37]||(f[37]=[i("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM9.555 7.168A1 1 0 008 8v4a1 1 0 001.555.832l3-2a1 1 0 000-1.664l-3-2z","clip-rule":"evenodd"},null,-1)])])),G(" "+H(c.value[`${v.name}-start`]?"Starting":"Start"),1)],8,$p)),i("button",{onClick:u=>_("restart",v.name),disabled:c.value[`${v.name}-restart`],class:"flex items-center justify-center p-2 text-sm font-medium text-blue-400 bg-blue-400/10 hover:bg-blue-400/20 rounded-lg transition-colors border border-blue-400/20"},[c.value[`${v.name}-restart`]?(S(),E("svg",Bp,[...f[38]||(f[38]=[i("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4",fill:"none"},null,-1),i("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)])])):(S(),E("svg",Np,[...f[39]||(f[39]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"},null,-1)])])),G(" "+H(c.value[`${v.name}-restart`]?"...":"Restart"),1)],8,Op),i("button",{onClick:u=>oe(v),disabled:c.value[`${v.name}-deploy`],class:"flex items-center justify-center p-2 text-sm font-medium text-purple-400 bg-purple-400/10 hover:bg-purple-400/20 rounded-lg transition-colors border border-purple-400/20 text-nowrap"},[c.value[`${v.name}-deploy`]?(S(),E("svg",Ip,[...f[40]||(f[40]=[i("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4",fill:"none"},null,-1),i("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)])])):(S(),E("svg",Lp,[...f[41]||(f[41]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"},null,-1)])])),G(" "+H(c.value[`${v.name}-deploy`]?"Syncing":"Sync")+" ",1),!c.value[`${v.name}-deploy`]&&p.value[K(v.name)]?(S(),E("span",Dp,H(p.value[K(v.name)]),1)):ee("",!0)],8,Pp)])]))),128)),(S(!0),E(_e,null,Je(F.value,v=>(S(),E("div",{key:v.id,class:"bg-slate-800/80 backdrop-blur-sm rounded-2xl shadow-xl border border-slate-700/50 p-6 flex flex-col relative overflow-hidden"},[v.status==="deploying"?(S(),E("div",jp)):ee("",!0),i("div",Vp,[i("div",Hp,[i("div",{class:re(["w-10 h-10 rounded-xl bg-slate-700/50 flex items-center justify-center border border-slate-600",v.status==="deploying"?"text-blue-500":"text-red-500"])},[v.status==="deploying"?(S(),E("svg",Fp,[...f[42]||(f[42]=[i("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),i("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)])])):(S(),E("svg",Up,[...f[43]||(f[43]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"},null,-1)])]))],2),i("div",null,[i("h2",zp,H(v.name),1),i("div",qp,[i("span",{class:re(["capitalize",v.status==="deploying"?"text-blue-400":"text-red-400"])},H(v.status),3),v.commitMessage?(S(),E("span",Wp,[f[44]||(f[44]=i("svg",{class:"w-3 h-3 inline pb-[1px] mr-0.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("circle",{cx:"12",cy:"12",r:"3","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}),i("line",{x1:"3",y1:"12",x2:"9",y2:"12","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}),i("line",{x1:"15",y1:"12",x2:"21",y2:"12","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"})],-1)),G(H(v.commitMessage),1)])):ee("",!0)])])]),i("div",Kp,[i("button",{onClick:u=>me(v,!1),class:"p-2 text-slate-400 hover:text-blue-400 bg-slate-700/50 hover:bg-slate-700 rounded-lg transition-colors border border-slate-600 focus:outline-none",title:"Edit Config"},[...f[45]||(f[45]=[i("svg",{class:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})],-1)])],8,Gp),i("button",{onClick:u=>ye(v),class:"p-2 text-slate-400 hover:text-white bg-slate-700/50 hover:bg-slate-700 rounded-lg transition-colors border border-slate-600 focus:outline-none",title:"View Logs"},[...f[46]||(f[46]=[i("svg",{class:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})],-1)])],8,Yp)])]),$e(_r,{"enter-active-class":"transition-all duration-500 ease-out","enter-from-class":"opacity-0 -translate-y-2","enter-to-class":"opacity-100 translate-y-0","leave-active-class":"transition-all duration-500 ease-in","leave-from-class":"opacity-100 translate-y-0","leave-to-class":"opacity-0 -translate-y-2"},{default:io(()=>[v.pipelineState&&v.pipelineState!=="hidden"?(S(),E("div",Jp,[i("div",Xp,[f[48]||(f[48]=i("span",{class:"text-[10px] font-bold text-slate-400 uppercase tracking-widest flex items-center gap-2"},[i("svg",{class:"w-3.5 h-3.5 text-blue-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 10V3L4 14h7v7l9-11h-7z"})]),G(" Deployment State ")],-1)),i("div",Qp,[v.pipelineState!=="online"&&v.pipelineState!=="failed"?(S(),E("span",Zp,[...f[47]||(f[47]=[i("span",{class:"animate-ping absolute inline-flex h-full w-full rounded-full bg-blue-400 opacity-75"},null,-1),i("span",{class:"relative inline-flex rounded-full h-2 w-2 bg-blue-500"},null,-1)])])):ee("",!0),i("span",{class:re(["text-[10px] font-mono whitespace-nowrap px-2 py-0.5 rounded-full border uppercase tracking-wider backdrop-blur-sm",v.pipelineState==="failed"||v.pipelineState&&v.pipelineState.startsWith("failed:")?"text-red-400 bg-red-500/10 border-red-500/20":v.pipelineState==="online"?"text-emerald-400 bg-emerald-500/10 border-emerald-500/20":"text-blue-400 bg-blue-500/10 border-blue-500/20"])},H(v.pipelineState&&v.pipelineState.startsWith("failed:")?"FAILED":v.pipelineState),3)])]),i("div",em,[f[51]||(f[51]=i("div",{class:"absolute left-6 right-6 h-1 bg-slate-800/80 rounded-full top-1/2 -translate-y-1/2 z-0 border border-slate-700/50 shadow-inner"},null,-1)),i("div",{class:re(["absolute left-6 h-1 bg-gradient-to-r top-1/2 -translate-y-1/2 z-0 transition-all duration-700 ease-out",v.pipelineState==="failed"?"from-red-600 to-rose-400 shadow-[0_0_10px_rgba(248,113,113,0.5)]":v.pipelineState==="online"?"from-emerald-500 to-indigo-400 shadow-[0_0_10px_rgba(16,185,129,0.5)]":"from-blue-600 to-indigo-400 shadow-[0_0_10px_rgba(96,165,250,0.5)]"]),style:Mt({width:Qe(v.pipelineState)})},null,6),(S(),E(_e,null,Je(["pulling","building","starting","online"],(u,g)=>i("div",{key:u,class:"relative z-10 flex flex-col items-center group"},[g<3?(S(),E("div",{key:0,class:re(["absolute h-1 top-1/2 -translate-y-1/2 left-full w-full z-[-1] pointer-events-none transition-colors duration-500",Be(u,v.pipelineState)?v.pipelineState==="failed"||v.pipelineState&&v.pipelineState.startsWith("failed:")?"bg-red-500/20":v.pipelineState==="online"?"bg-emerald-500/20":"bg-indigo-500/20":"bg-transparent"])},null,2)):ee("",!0),i("div",{class:re(["w-8 h-8 rounded-full flex items-center justify-center transition-all duration-500 relative",Ee(u,v.pipelineState)])},[v.pipelineState===u&&v.pipelineState!=="online"?(S(),E("div",{key:0,class:re(["absolute inset-0 rounded-full animate-ping",v.pipelineState==="failed"?"bg-red-400/20":"bg-blue-400/20"])},null,2)):ee("",!0),Be(u,v.pipelineState)?(S(),E("svg",tm,[...f[49]||(f[49]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"3",d:"M5 13l4 4L19 7"},null,-1)])])):v.pipelineState==="failed"&&M(u,v.pipelineState)?(S(),E("svg",sm,[...f[50]||(f[50]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"},null,-1)])])):v.pipelineState===u?(S(),E("div",nm)):(S(),E("div",om))],2),i("span",{class:re(["text-[9px] mt-2.5 font-bold uppercase tracking-wider transition-all duration-300",v.pipelineState===u?v.pipelineState==="failed"?"text-red-300 drop-shadow-[0_0_2px_rgba(252,165,165,0.8)]":v.pipelineState==="online"?"text-emerald-300 drop-shadow-[0_0_2px_rgba(110,231,183,0.8)]":"text-blue-300 drop-shadow-[0_0_2px_rgba(147,197,253,0.8)]":Be(u,v.pipelineState)?"text-slate-300":"text-slate-500"])},H(ve(u)),3)])),64))])])):ee("",!0)]),_:2},1024),v.status!=="deploying"?(S(),E("button",{key:1,onClick:u=>L(v.id),disabled:c.value[`${v.name}-deploy`],class:"flex items-center justify-center p-2 mt-auto text-sm font-medium text-purple-400 bg-purple-400/10 hover:bg-purple-400/20 rounded-lg transition-colors border border-purple-400/20 w-full"},[c.value[`${v.name}-deploy`]?(S(),E("svg",im,[...f[52]||(f[52]=[i("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4",fill:"none"},null,-1),i("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)])])):(S(),E("svg",lm,[...f[53]||(f[53]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"},null,-1)])])),G(" "+H(c.value[`${v.name}-deploy`]?"Syncing...":"Deploy")+" ",1),!c.value[`${v.name}-deploy`]&&p.value[v.id]?(S(),E("span",am,H(p.value[v.id]),1)):ee("",!0)],8,rm)):ee("",!0)]))),128))]),t.value.length===0&&F.value.length===0?(S(),E("div",cm,[f[54]||(f[54]=rt('<div class="w-20 h-20 rounded-full bg-slate-800 flex items-center justify-center mb-6 shadow-inner ring-1 ring-slate-700/50"><svg class="h-10 w-10 text-slate-500" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M19.428 15.428a2 2 0 00-1.022-.547l-2.387-.477a6 6 0 00-3.86.517l-.318.158a6 6 0 01-3.86.517L6.05 15.21a2 2 0 00-1.806.547M8 4h8l-1 1v5.172a2 2 0 00.586 1.414l5 5c1.26 1.26.367 3.414-1.415 3.414H4.828c-1.782 0-2.674-2.154-1.414-3.414l5-5A2 2 0 009 10.172V5L8 4z"></path></svg></div><h3 class="text-xl font-bold text-white mb-2">No Applications Found</h3><p class="text-slate-400 text-center max-w-sm mb-6">You haven't deployed any applications yet or PM2 is not managing any processes.</p>',3)),i("button",{onClick:f[1]||(f[1]=v=>n.value=!0),class:"px-6 py-3 bg-slate-700 hover:bg-slate-600 text-white font-medium rounded-xl transition-all shadow-lg border border-slate-600"}," Deploy Your First App ")])):ee("",!0),$e(F0,{isOpen:n.value,appToEdit:a.value,onClose:f[2]||(f[2]=v=>{n.value=!1,a.value=null}),onDeploy:j,onDelete:w},null,8,["isOpen","appToEdit"]),$e(J0,{isOpen:o.value,appId:r.value,appName:l.value,onClose:f[3]||(f[3]=v=>o.value=!1)},null,8,["isOpen","appId","appName"]),b.value?(S(),E("div",um,[i("div",dm,[f[57]||(f[57]=i("div",{class:"w-20 h-20 bg-red-500/10 rounded-full flex items-center justify-center mx-auto mb-6 border border-red-500/20"},[i("svg",{class:"w-10 h-10 text-red-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})])],-1)),f[58]||(f[58]=i("h3",{class:"text-2xl font-bold text-white mb-2"},"Delete Application?",-1)),i("p",fm,[f[55]||(f[55]=G(" Are you sure you want to delete ",-1)),i("span",hm,H(y.value?.name),1),f[56]||(f[56]=G("? This will stop the PM2 process and permanently remove the configuration. ",-1))]),i("div",pm,[i("button",{onClick:f[4]||(f[4]=v=>{b.value=!1,y.value=null}),class:"flex-1 px-6 py-3 bg-slate-700 hover:bg-slate-600 text-white font-medium rounded-xl transition-all border border-slate-600"}," Keep Application "),i("button",{onClick:Q,class:"flex-1 px-6 py-3 bg-red-600 hover:bg-red-500 text-white font-bold rounded-xl transition-all shadow-lg shadow-red-600/20"}," Yes, Delete it ")])])])):ee("",!0)]))}},gm={class:"max-w-4xl mx-auto px-4 py-8"},vm={class:"bg-slate-800/80 backdrop-blur-sm rounded-2xl shadow-xl border border-slate-700 overflow-hidden"},bm={class:"p-6 space-y-6"},xm={class:"space-y-3 mb-4"},ym={class:"flex items-center space-x-3"},wm=["src","alt"],_m={class:"text-white font-medium"},km=["onClick"],Cm={key:0,class:"text-sm text-slate-500 italic"},Sm={class:"flex gap-2"},Em=["disabled"],Am={key:0,class:"animate-spin -ml-1 mr-2 h-4 w-4 text-white",fill:"none",viewBox:"0 0 24 24"},Tm={key:1},$m={key:2},Rm={class:"flex items-center justify-between mb-2"},Mm={class:"relative"},Om=["value"],Bm={class:"flex items-center justify-between mb-2"},Nm={class:"flex items-center space-x-3"},Pm={class:"relative"},Im=["type"],Lm={key:0,class:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},Dm={key:1,class:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},jm={class:"mt-4 p-4 bg-blue-500/5 border border-blue-500/20 rounded-xl space-y-3"},Vm={class:"text-xs text-slate-400 space-y-2 list-decimal list-inside"},Hm={class:"text-blue-300 font-mono"},Fm={class:"grid grid-cols-1 md:grid-cols-2 gap-6"},Um={class:"p-6 border-t border-slate-700 bg-slate-800/50 flex justify-end"},zm=["disabled"],qm={key:0,class:"animate-spin -ml-1 mr-2 h-4 w-4 text-white",fill:"none",viewBox:"0 0 24 24"},Wm={key:1,class:"h-5 w-5 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Km={class:"mt-8 bg-slate-800/80 backdrop-blur-sm rounded-2xl shadow-xl border border-slate-700 overflow-hidden"},Gm={class:"p-6 border-b border-slate-700 flex items-center justify-between"},Ym={class:"overflow-x-auto"},Jm={class:"w-full text-left border-collapse"},Xm={class:"divide-y divide-slate-700/50"},Qm={class:"px-6 py-4 text-slate-300 font-mono whitespace-nowrap"},Zm={class:"px-6 py-4"},e1={class:"px-6 py-4 text-slate-300"},t1={class:"px-6 py-4"},s1={key:0,class:"text-emerald-400 flex items-center"},n1={key:1,class:"text-red-400 flex items-center"},o1={key:2,class:"text-slate-400 flex items-center"},r1=["title"],i1={key:0},l1={__name:"Settings",setup(e){const t=W({webhookSecret:"",discordWebhook:"",telegramBotToken:"",telegramChatId:""}),s=W([]),n=W(!1),o=W(!1),r=W(!1),l=W(""),a=W(!1),c=W(""),p=W([]);let d=null;const m=K=>K?new Date(K).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}):"-",b=Ie(()=>window.location.origin+"/api/webhook"),y=()=>{const K="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";let _="";for(let P=0;P<32;P++)_+=K.charAt(Math.floor(Math.random()*K.length));t.value.webhookSecret=_,a.value=!0},T=async(K,_)=>{if(K)try{await navigator.clipboard.writeText(K),c.value=_,setTimeout(()=>{c.value===_&&(c.value="")},2e3)}catch(P){console.error("Failed to copy text: ",P)}},O=async()=>{try{const K=await fetch("/api/git/accounts",{headers:{Authorization:`Bearer ${localStorage.getItem("pm2me_token")}`}});s.value=await K.json()}catch{console.error("Failed to load accounts")}},q=async()=>{if(l.value){o.value=!0;try{const _=await(await fetch("/api/git/accounts",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${localStorage.getItem("pm2me_token")}`},body:JSON.stringify({token:l.value})})).json();_.success?(l.value="",await O()):alert(_.error||"Invalid GitHub Token")}catch{alert("Error connecting to GitHub")}finally{o.value=!1}}},U=async K=>{if(confirm("Are you sure you want to disconnect this account?"))try{await fetch(`/api/git/accounts/${K}`,{method:"DELETE",headers:{Authorization:`Bearer ${localStorage.getItem("pm2me_token")}`}}),await O()}catch{alert("Failed to delete account")}},I=async()=>{try{const _=await(await fetch("/api/settings",{headers:{Authorization:`Bearer ${localStorage.getItem("pm2me_token")}`}})).json();t.value={...t.value,..._}}catch(K){console.error("Failed to load settings",K)}},F=async()=>{n.value=!0;try{await fetch("/api/settings",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${localStorage.getItem("pm2me_token")}`},body:JSON.stringify(t.value)}),alert("Settings Saved Successfully")}catch{alert("Failed to save settings")}finally{n.value=!1}},j=async()=>{r.value=!0;try{const K=await fetch("/api/settings/webhook-logs",{headers:{Authorization:`Bearer ${localStorage.getItem("pm2me_token")}`}});p.value=await K.json()}catch{console.error("Failed to load webhook logs")}finally{r.value=!1}},Z=()=>{d||(d=ns()),d.off("webhook-log"),d.on("webhook-log",K=>{p.value.unshift(K),p.value.length>50&&(p.value=p.value.slice(0,50))})};return bs(async()=>{I(),O(),await j(),Z()}),os(()=>{d&&d.disconnect()}),(K,_)=>(S(),E("div",gm,[_[45]||(_[45]=i("h1",{class:"text-3xl font-bold text-white tracking-tight mb-8"},"Settings",-1)),i("div",vm,[_[37]||(_[37]=rt('<div class="p-6 border-b border-slate-700"><h2 class="text-xl font-bold text-white flex items-center"><svg class="w-6 h-6 mr-2 text-blue-400" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"></path><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"></path></svg> System Configurations </h2><p class="text-sm text-slate-400 mt-1">Configure Webhooks and Integrations</p></div>',1)),i("div",bm,[i("div",null,[_[9]||(_[9]=i("label",{class:"block text-sm font-medium text-slate-300 mb-2"},"Connected GitHub Accounts",-1)),i("div",xm,[(S(!0),E(_e,null,Je(s.value,P=>(S(),E("div",{key:P.id,class:"flex items-center justify-between p-3 bg-slate-900 border border-slate-700 rounded-lg"},[i("div",ym,[i("img",{src:P.avatarUrl,alt:P.username,class:"w-8 h-8 rounded-full border border-slate-600"},null,8,wm),i("span",_m,"@"+H(P.username),1)]),i("button",{type:"button",onClick:w=>U(P.id),class:"text-sm text-red-400 hover:text-red-300 transition-colors"},"Disconnect",8,km)]))),128)),s.value.length===0?(S(),E("p",Cm,"No accounts connected yet.")):ee("",!0)]),_[10]||(_[10]=i("label",{class:"block text-sm font-medium text-slate-300 mb-2"},"Add New Account (Personal Access Token)",-1)),i("div",Sm,[ke(i("input",{type:"password","onUpdate:modelValue":_[0]||(_[0]=P=>l.value=P),class:"flex-1 bg-slate-900 border border-slate-600 rounded-lg px-4 py-2.5 text-white focus:ring-2 focus:ring-blue-500 focus:border-transparent outline-none transition-all",placeholder:"ghp_xxxxxxxxxxxxxxxxxxxx"},null,512),[[Fe,l.value]]),i("button",{type:"button",onClick:q,disabled:o.value,class:"px-5 py-2.5 bg-slate-700 hover:bg-slate-600 text-slate-200 rounded-lg transition-colors border border-slate-600 disabled:opacity-50 whitespace-nowrap font-medium flex items-center"},[o.value?(S(),E("svg",Am,[..._[8]||(_[8]=[i("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),i("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)])])):ee("",!0),o.value?(S(),E("span",Tm,"Testing...")):(S(),E("span",$m,"Connect"))],8,Em)]),_[11]||(_[11]=i("p",{class:"mt-1 text-xs text-slate-500"},"Used to fetch repositories and branches automatically when deploying.",-1))]),_[31]||(_[31]=i("hr",{class:"border-slate-700"},null,-1)),i("div",null,[i("div",Rm,[_[13]||(_[13]=i("label",{class:"block text-sm font-medium text-slate-300"},"GitHub Webhook URL",-1)),i("button",{onClick:_[1]||(_[1]=P=>T(b.value,"URL")),class:"text-xs text-blue-400 hover:text-blue-300 flex items-center transition-colors"},[_[12]||(_[12]=i("svg",{class:"w-3.5 h-3.5 mr-1",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 5H6a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2v-1M8 5a2 2 0 002 2h2a2 2 0 002-2M8 5a2 2 0 012-2h2a2 2 0 012 2m0 0h2a2 2 0 012 2v3m2 4H10m0 0l3-3m-3 3l3 3"})],-1)),G(" "+H(c.value==="URL"?"Copied!":"Copy URL"),1)])]),i("div",Mm,[i("input",{type:"text",value:b.value,readonly:"",class:"w-full bg-slate-900/50 border border-slate-700 rounded-lg px-4 py-2.5 text-slate-400 text-sm font-mono outline-none transition-all cursor-default",placeholder:"Calculating..."},null,8,Om)]),_[14]||(_[14]=i("p",{class:"mt-1 text-[11px] text-slate-500 italic"},"Provide this URL to your GitHub repository's Webhook settings.",-1))]),i("div",null,[i("div",Bm,[_[17]||(_[17]=i("label",{class:"block text-sm font-medium text-slate-300"},"GitHub Webhook Secret",-1)),i("div",Nm,[i("button",{onClick:y,class:"text-xs text-emerald-400 hover:text-emerald-300 flex items-center transition-colors"},[..._[15]||(_[15]=[i("svg",{class:"w-3.5 h-3.5 mr-1",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})],-1),G(" Generate ",-1)])]),i("button",{onClick:_[2]||(_[2]=P=>T(t.value.webhookSecret,"Secret")),class:"text-xs text-blue-400 hover:text-blue-300 flex items-center transition-colors"},[_[16]||(_[16]=i("svg",{class:"w-3.5 h-3.5 mr-1",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 5H6a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2v-1M8 5a2 2 0 002 2h2a2 2 0 002-2M8 5a2 2 0 012-2h2a2 2 0 012 2m0 0h2a2 2 0 012 2v3m2 4H10m0 0l3-3m-3 3l3 3"})],-1)),G(" "+H(c.value==="Secret"?"Copied!":"Copy Secret"),1)])])]),i("div",Pm,[ke(i("input",{type:a.value?"text":"password","onUpdate:modelValue":_[3]||(_[3]=P=>t.value.webhookSecret=P),class:"w-full bg-slate-900 border border-slate-600 rounded-lg px-4 py-2.5 text-white focus:ring-2 focus:ring-blue-500 focus:border-transparent outline-none transition-all pr-12",placeholder:"Secret for verifying GitHub payloads"},null,8,Im),[[yu,t.value.webhookSecret]]),i("button",{onClick:_[4]||(_[4]=P=>a.value=!a.value),class:"absolute right-3 top-1/2 -translate-y-1/2 text-slate-500 hover:text-slate-300 p-1"},[a.value?(S(),E("svg",Lm,[..._[18]||(_[18]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.882 9.882L9.881 9.882M9.882 9.882A3.001 3.001 0 0014.15 14.15l-4.268-4.268zm7.665 7.665l2.484 2.484M15.904 15.904a10.023 10.023 0 01-3.904 1.096m-4.06-1.121A10.053 10.053 0 013 12c.5-2.015 1.581-3.76 3.061-5.061m10.878 10.878l-4.243-4.243m4.243 4.243L19 19m-4.732-4.732l-4.242-4.242M4.732 4.732L2 2"},null,-1)])])):(S(),E("svg",Dm,[..._[19]||(_[19]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"},null,-1),i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"},null,-1)])]))])]),i("div",jm,[_[26]||(_[26]=i("h3",{class:"text-sm font-bold text-blue-400 flex items-center"},[i("svg",{class:"w-4 h-4 mr-2",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})]),G(" How to setup GitHub Webhook ")],-1)),i("ol",Vm,[_[21]||(_[21]=i("li",null,"Open your repository on GitHub.",-1)),_[22]||(_[22]=i("li",null,[G("Go to "),i("span",{class:"text-slate-200"},"Settings"),G(" > "),i("span",{class:"text-slate-200"},"Webhooks"),G(" > "),i("span",{class:"text-slate-200"},"Add webhook"),G(".")],-1)),i("li",null,[_[20]||(_[20]=G("Payload URL: ",-1)),i("span",Hm,H(b.value),1)]),_[23]||(_[23]=i("li",null,[G("Content type: "),i("span",{class:"text-orange-400 font-bold"},"application/json")],-1)),_[24]||(_[24]=i("li",null,[G("Secret: "),i("span",{class:"text-slate-200"},"Paste your Webhook Secret above")],-1)),_[25]||(_[25]=i("li",null,[G("Which events: "),i("span",{class:"text-slate-200"},"Just the push event"),G(".")],-1))]),_[27]||(_[27]=i("p",{class:"text-[10px] text-slate-500 italic"},"This allows PM2Me to automatically deploy your apps when you push code.",-1))])]),_[32]||(_[32]=i("hr",{class:"border-slate-700"},null,-1)),i("div",null,[_[28]||(_[28]=i("label",{class:"block text-sm font-medium text-slate-300 mb-2"},"Discord Webhook URL",-1)),ke(i("input",{type:"url","onUpdate:modelValue":_[5]||(_[5]=P=>t.value.discordWebhook=P),class:"w-full bg-slate-900 border border-slate-600 rounded-lg px-4 py-2.5 text-white focus:ring-2 focus:ring-blue-500 focus:border-transparent outline-none transition-all",placeholder:"https://discord.com/api/webhooks/..."},null,512),[[Fe,t.value.discordWebhook]])]),_[33]||(_[33]=i("hr",{class:"border-slate-700"},null,-1)),i("div",Fm,[i("div",null,[_[29]||(_[29]=i("label",{class:"block text-sm font-medium text-slate-300 mb-2"},"Telegram Bot Token",-1)),ke(i("input",{type:"password","onUpdate:modelValue":_[6]||(_[6]=P=>t.value.telegramBotToken=P),class:"w-full bg-slate-900 border border-slate-600 rounded-lg px-4 py-2.5 text-white focus:ring-2 focus:ring-blue-500 focus:border-transparent outline-none transition-all",placeholder:"123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11"},null,512),[[Fe,t.value.telegramBotToken]])]),i("div",null,[_[30]||(_[30]=i("label",{class:"block text-sm font-medium text-slate-300 mb-2"},"Telegram Chat ID",-1)),ke(i("input",{type:"text","onUpdate:modelValue":_[7]||(_[7]=P=>t.value.telegramChatId=P),class:"w-full bg-slate-900 border border-slate-600 rounded-lg px-4 py-2.5 text-white focus:ring-2 focus:ring-blue-500 focus:border-transparent outline-none transition-all",placeholder:"-1001234567890"},null,512),[[Fe,t.value.telegramChatId]])])])]),i("div",Um,[i("button",{onClick:F,disabled:n.value,class:"px-6 py-2.5 bg-gradient-to-r from-blue-600 to-indigo-600 hover:from-blue-500 hover:to-indigo-500 text-white font-medium rounded-lg transition-all shadow-lg flex items-center disabled:opacity-70"},[n.value?(S(),E("svg",qm,[..._[34]||(_[34]=[i("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),i("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)])])):(S(),E("svg",Wm,[..._[35]||(_[35]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 13l4 4L19 7"},null,-1)])])),_[36]||(_[36]=G(" Save Settings ",-1))],8,zm)])]),i("div",Km,[i("div",Gm,[_[39]||(_[39]=i("div",null,[i("h2",{class:"text-xl font-bold text-white flex items-center"},[i("svg",{class:"w-6 h-6 mr-2 text-emerald-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})]),G(" Webhook History ")]),i("p",{class:"text-sm text-slate-400 mt-1"},"Last 50 recorded events (Push, Ping, etc.)")],-1)),i("button",{onClick:j,class:"p-2 text-slate-400 hover:text-white transition-colors",title:"Refresh Logs"},[(S(),E("svg",{class:re(["w-5 h-5",{"animate-spin":r.value}]),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[..._[38]||(_[38]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"},null,-1)])],2))])]),i("div",Ym,[i("table",Jm,[_[44]||(_[44]=i("thead",{class:"bg-slate-900/50 text-slate-400 text-xs font-medium uppercase tracking-wider"},[i("tr",null,[i("th",{class:"px-6 py-3 border-b border-slate-700"},"Time"),i("th",{class:"px-6 py-3 border-b border-slate-700"},"Event"),i("th",{class:"px-6 py-3 border-b border-slate-700"},"Repository"),i("th",{class:"px-6 py-3 border-b border-slate-700"},"Status"),i("th",{class:"px-6 py-3 border-b border-slate-700"},"Details")])],-1)),i("tbody",Xm,[(S(!0),E(_e,null,Je(p.value,P=>(S(),E("tr",{key:P.id,class:"hover:bg-slate-700/30 transition-colors text-sm"},[i("td",Qm,H(m(P.timestamp)),1),i("td",Zm,[i("span",{class:re(["px-2 py-0.5 rounded text-[10px] font-bold uppercase",P.eventType==="push"?"bg-blue-500/20 text-blue-400":"bg-slate-700 text-slate-400"])},H(P.eventType),3)]),i("td",e1,H(P.repository),1),i("td",t1,[P.status==="success"?(S(),E("span",s1,[..._[40]||(_[40]=[i("svg",{class:"w-4 h-4 mr-1",fill:"currentColor",viewBox:"0 0 20 20"},[i("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z","clip-rule":"evenodd"})],-1),G(" Success ",-1)])])):P.status==="error"?(S(),E("span",n1,[..._[41]||(_[41]=[i("svg",{class:"w-4 h-4 mr-1",fill:"currentColor",viewBox:"0 0 20 20"},[i("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z","clip-rule":"evenodd"})],-1),G(" Error ",-1)])])):(S(),E("span",o1,[_[42]||(_[42]=i("svg",{class:"w-4 h-4 mr-1",fill:"currentColor",viewBox:"0 0 20 20"},[i("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z","clip-rule":"evenodd"})],-1)),G(" "+H(P.status),1)]))]),i("td",{class:"px-6 py-4 text-slate-500 text-xs truncate max-w-xs",title:P.details},H(P.details),9,r1)]))),128)),p.value.length===0?(S(),E("tr",i1,[..._[43]||(_[43]=[i("td",{colspan:"5",class:"px-6 py-12 text-center text-slate-500 italic"},' No webhook events recorded yet. Perform a Push or click "Test" on GitHub. ',-1)])])):ee("",!0)])])])])]))}},a1={class:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8 space-y-6"},c1={class:"flex flex-col sm:flex-row justify-between items-start sm:items-center gap-4"},u1={class:"flex items-center gap-3"},d1={class:"relative flex h-2 w-2"},f1={key:0,class:"animate-ping absolute inline-flex h-full w-full rounded-full bg-emerald-400 opacity-75"},h1=["disabled"],p1={class:"grid grid-cols-1 sm:grid-cols-3 gap-4"},m1={class:"bg-slate-800/60 rounded-2xl border border-slate-700 p-4"},g1={class:"text-sm font-semibold text-slate-200 flex items-center gap-2"},v1={class:"text-lg"},b1={class:"bg-slate-800/60 rounded-2xl border border-slate-700 p-4"},x1={class:"bg-slate-800/60 rounded-2xl border border-slate-700 p-4"},y1={class:"text-xs font-mono text-slate-300 break-all"},w1={class:"bg-slate-800/60 rounded-2xl border border-slate-700 p-5"},_1={class:"flex flex-wrap gap-3"},k1=["disabled"],C1=["disabled"],S1=["disabled"],E1=["disabled"],A1=["disabled"],T1={key:0,class:"flex items-center gap-2 text-slate-400 text-sm"},$1={key:0,class:"w-4 h-4",fill:"currentColor",viewBox:"0 0 20 20"},R1={key:1,class:"w-4 h-4",fill:"currentColor",viewBox:"0 0 20 20"},M1={class:"bg-slate-800/60 rounded-2xl border border-slate-700 overflow-hidden"},O1={class:"flex",style:{"min-height":"600px"}},B1={class:"flex-shrink-0 bg-slate-900/60 border-r border-slate-700",style:{width:"220px"}},N1={class:"flex items-center justify-between px-3 py-2 border-b border-slate-700/50"},P1={key:0,class:"px-2 py-2 border-b border-slate-700/50"},I1={class:"flex gap-1 mt-1"},L1={class:"overflow-y-auto",style:{"max-height":"560px"}},D1={key:0,class:"px-3 py-4 text-xs text-slate-600 text-center"},j1=["onClick"],V1={class:"flex-1 text-xs font-mono truncate"},H1=["onClick"],F1={key:1,class:"border-t border-slate-700/50 p-2"},U1=["disabled"],z1={key:0,class:"animate-spin w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24"},q1={class:"text-[10px] text-slate-600 text-center mt-1"},W1={class:"flex-1 flex flex-col overflow-hidden"},K1={class:"flex items-center justify-between px-4 py-3 border-b border-slate-700 bg-slate-900/30"},G1={class:"flex items-center gap-2"},Y1={class:"text-sm font-semibold text-slate-300"},J1={class:"text-xs text-slate-600 font-mono"},X1={key:0,class:"text-xs text-amber-400 flex items-center gap-1"},Q1={class:"flex items-center gap-2"},Z1=["disabled"],eg={key:0,class:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},tg={key:1,class:"animate-spin w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24"},sg={key:0,class:"flex-1 flex items-center justify-center text-slate-600 text-sm"},ng={class:"flex overflow-hidden flex-1",style:{background:"#030712"}},og=["textContent"],rg=["innerHTML"],ig={class:"flex items-center justify-between px-4 py-1.5 border-t border-slate-800 text-xs font-mono",style:{background:"#020617"}},lg={class:"flex items-center gap-4"},ag={key:0,class:"text-slate-300"},cg={key:1,class:"text-slate-600 text-xs"},ug={class:"text-slate-600"},dg={__name:"Nginx",setup(e){const t=()=>localStorage.getItem("pm2me_token"),s=()=>({Authorization:`Bearer ${t()}`,"Content-Type":"application/json"}),n=W({os:"",confFile:"",confDir:"",installed:!1,version:""}),o=W({running:!1,checking:!1}),r=W([]),l=W(!0),a=W(null),c=W(""),p=W(!1),d=W(!1),m=W(!1),b=W(null),y=W(!1),T=W(!1),O=W(!1),q=W(""),U=W(null),I=W(null),F=W(null),j=W(!1),Z=W({line:1,col:1}),K=/^(server_name|server|location|upstream|http|events|listen|root|index|include|proxy_pass|proxy_set_header|proxy_hide_header|proxy_redirect|proxy_connect_timeout|proxy_read_timeout|proxy_send_timeout|fastcgi_pass|fastcgi_param|fastcgi_index|ssl_certificate|ssl_certificate_key|ssl_protocols|ssl_ciphers|ssl_prefer_server_ciphers|ssl_session_cache|ssl_session_timeout|add_header|return|rewrite|if|set|map|geo|break|last|redirect|permanent|worker_processes|worker_connections|keepalive_timeout|keepalive|gzip|gzip_types|gzip_comp_level|gzip_min_length|gzip_vary|client_max_body_size|client_body_timeout|client_header_timeout|access_log|error_log|log_format|sendfile|tcp_nopush|tcp_nodelay|default_type|charset|expires|autoindex|alias|deny|allow|auth_basic|auth_basic_user_file|limit_req|limit_req_zone|limit_conn|limit_conn_zone|resolver|resolver_timeout|user|pid|daemon|types|pcre_jit|load_module|open_file_cache|open_file_cache_valid|error_page|try_files|internal|proxy_cache|proxy_cache_valid|proxy_buffering)\b/,_=A=>!A||/[\s;{}()"',]/.test(A);function P(A){return A.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function w(A){const h=A.match(/^(\s*)(#.*)$/);if(h)return`${P(h[1])}<span class="hl-comment">${P(h[2])}</span>`;let f="",v=0;for(;v<A.length;){const u=A.slice(v),g=A[v-1];if(A[v]==="#"&&(v===0||/\s/.test(g))){f+=`<span class="hl-comment">${P(u)}</span>`;break}if(A[v]==='"'){let C=v+1;for(;C<A.length&&A[C]!=='"';)A[C]==="\\"&&C++,C++;f+=`<span class="hl-string">${P(A.slice(v,C+1))}</span>`,v=C+1;continue}if(A[v]==="'"){let C=v+1;for(;C<A.length&&A[C]!=="'";)A[C]==="\\"&&C++,C++;f+=`<span class="hl-string">${P(A.slice(v,C+1))}</span>`,v=C+1;continue}if(A[v]==="$"){const C=u.match(/^(\$[a-zA-Z_][a-zA-Z0-9_]*)/);if(C){f+=`<span class="hl-variable">${P(C[1])}</span>`,v+=C[1].length;continue}}const x=u.match(K);if(x&&_(g)&&_(A[v+x[1].length])){f+=`<span class="hl-keyword">${x[1]}</span>`,v+=x[1].length;continue}const k=u.match(/^(on|off|none|any)\b/);if(k&&_(g)){f+=`<span class="hl-special">${k[1]}</span>`,v+=k[1].length;continue}if(/\d/.test(A[v])&&_(g)){const C=u.match(/^(\d+[a-z]*)/);if(C&&_(A[v+C[1].length])){f+=`<span class="hl-number">${C[1]}</span>`,v+=C[1].length;continue}}if(A[v]==="{"||A[v]==="}"){f+=`<span class="hl-brace">${A[v]}</span>`,v++;continue}if(A[v]===";"){f+='<span class="hl-semi">;</span>',v++;continue}f+=P(A[v]),v++}return f}const B=Ie(()=>c.value.split(`
|
|
5
|
-
`).map(w).join(`
|
|
6
|
-
`)),Q=Ie(()=>Math.max(1,c.value.split(`
|
|
7
|
-
`).length)),L=A=>{const h=A.target,v=h.value.substring(0,h.selectionStart).split(`
|
|
8
|
-
`);Z.value={line:v.length,col:v[v.length-1].length+1}},oe=()=>{!F.value||!I.value||(I.value.scrollTop=F.value.scrollTop)},he=async()=>{if(await Rt(),!U.value||!F.value)return;const A=F.value.querySelector('[aria-hidden="true"]');A&&(U.value.style.height=A.offsetHeight+"px")},ye=A=>{p.value=!0,L(A),he()},me=A=>{const h=A.target,{selectionStart:f,selectionEnd:v,value:u}=h;if(A.key==="s"&&(A.ctrlKey||A.metaKey)){A.preventDefault(),ve();return}if(A.key==="Tab"&&!A.ctrlKey&&!A.metaKey){A.preventDefault();const x=" ",k=u.split(`
|
|
9
|
-
`);if(f===v)c.value=u.slice(0,f)+x+u.slice(v),Rt(()=>{h.selectionStart=h.selectionEnd=f+x.length,L({target:h}),he()});else{let C=0,$=0,V=0;for(let N=0;N<k.length;N++){const R=C+k[N].length;C<=f&&f<=R+1&&($=N),C<=v&&v<=R+1&&(V=N),C+=k[N].length+1}const D=(V-$+1)*x.length;for(let N=$;N<=V;N++)k[N]=A.shiftKey?k[N].replace(new RegExp(`^ {1,${x.length}}`),""):x+k[N];c.value=k.join(`
|
|
10
|
-
`),Rt(()=>{h.selectionStart=f+x.length,h.selectionEnd=v+D,L({target:h}),he()})}p.value=!0;return}if((A.key==="/"||A.code==="Slash"||A.code==="NumpadDivide")&&(A.ctrlKey||A.metaKey)){A.preventDefault();const x=u.split(`
|
|
11
|
-
`);let k=0,C=0,$=0;for(let R=0;R<x.length;R++){const Y=k+x[R].length;k<=f&&f<=Y+1&&(C=R),k<=v&&v<=Y+1&&($=R),k+=x[R].length+1}if($>C){let R=0;for(let Y=0;Y<$;Y++)R+=x[Y].length+1;v===R&&$--}for(;$>C&&x[$].trim()==="";)$--;const V=x.slice(C,$+1).filter(R=>R.trim()!==""),D=V.length>0&&V.every(R=>/^\s*#/.test(R));for(let R=C;R<=$;R++)x[R].trim()!==""&&(x[R]=D?x[R].replace(/^(\s*)# ?/,"$1"):x[R].replace(/^(\s*)/,"$1# "));c.value=x.join(`
|
|
12
|
-
`),p.value=!0;const N=D?-2:2;Rt(()=>{h.selectionStart=Math.max(0,f+N),h.selectionEnd=Math.max(0,v+($-C+1)*N),L({target:h})});return}},ie=async()=>{const A=await fetch("/api/nginx/info",{headers:s()});n.value=await A.json()},ne=async()=>{o.value.checking=!0;try{o.value.running=(await(await fetch("/api/nginx/status",{headers:s()})).json()).running}finally{o.value.checking=!1}},Te=async()=>{const h=await(await fetch("/api/nginx/files",{headers:s()})).json();r.value=h.files||[],l.value=h.isWindows,!a.value&&r.value.length>0&&await we(r.value[0])},we=async A=>{p.value&&a.value&&!confirm(`Discard unsaved changes to ${a.value.name}?`)||(a.value=A,p.value=!1,await Se())},Se=async()=>{if(!a.value)return;const h=await(await fetch(`/api/nginx/config?file=${encodeURIComponent(a.value.path)}`,{headers:s()})).json();c.value=h.content,p.value=!1,await he()},ve=async()=>{if(a.value){d.value=!0;try{await fetch("/api/nginx/config",{method:"POST",headers:s(),body:JSON.stringify({content:c.value,file:a.value.path})}),p.value=!1}finally{d.value=!1}}},De=async()=>{if(a.value){T.value=!0;try{const A=a.value.enabled?"/api/nginx/disable":"/api/nginx/enable";await fetch(A,{method:"POST",headers:s(),body:JSON.stringify({filePath:a.value.path,name:a.value.name})}),await Te();const h=r.value.find(f=>f.path===a.value?.path);h&&(a.value=h)}finally{T.value=!1}}},Qe=async()=>{if(!q.value.trim())return;const h=await(await fetch("/api/nginx/files/new",{method:"POST",headers:s(),body:JSON.stringify({name:q.value.trim()})})).json();if(O.value=!1,q.value="",h.success){await Te();const f=r.value.find(v=>v.name===h.name);f&&await we(f)}},Be=async A=>{confirm(`Delete ${A.name}?`)&&(await fetch("/api/nginx/files",{method:"DELETE",headers:s(),body:JSON.stringify({filePath:A.path})}),a.value?.path===A.path&&(a.value=null,c.value=""),await Te())},Ee=async A=>{m.value=!0,b.value=null;try{const f=await(await fetch("/api/nginx/action",{method:"POST",headers:s(),body:JSON.stringify({action:A})})).json();b.value=f.output||f.error||"",y.value=f.success,["start","reload","stop","quit"].includes(A)&&setTimeout(ne,800)}finally{m.value=!1}};let M=null;return bs(async()=>{await ie(),await ne(),await Te(),M=setInterval(ne,5e3)}),os(()=>clearInterval(M)),(A,h)=>(S(),E("div",a1,[i("div",c1,[h[15]||(h[15]=rt('<div data-v-8287dcd4><h1 class="text-3xl font-bold text-white tracking-tight flex items-center gap-3" data-v-8287dcd4><div class="w-10 h-10 rounded-xl bg-emerald-500/20 flex items-center justify-center border border-emerald-500/30" data-v-8287dcd4><svg class="w-5 h-5 text-emerald-400" fill="none" viewBox="0 0 24 24" stroke="currentColor" data-v-8287dcd4><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01" data-v-8287dcd4></path></svg></div> Nginx </h1><p class="text-sm text-slate-400 mt-1" data-v-8287dcd4>Manage nginx configuration and process</p></div>',1)),i("div",u1,[i("div",{class:re(["flex items-center gap-2 px-4 py-2 rounded-xl border text-sm font-medium",o.value.running?"bg-emerald-500/10 border-emerald-500/30 text-emerald-400":"bg-slate-800 border-slate-700 text-slate-400"])},[i("span",d1,[o.value.running?(S(),E("span",f1)):ee("",!0),i("span",{class:re(["relative inline-flex rounded-full h-2 w-2",o.value.running?"bg-emerald-400":"bg-slate-500"])},null,2)]),G(" "+H(o.value.running?"Running":"Stopped"),1)],2),i("button",{onClick:ne,disabled:o.value.checking,class:"p-2 text-slate-400 hover:text-white transition-colors rounded-lg hover:bg-slate-800"},[(S(),E("svg",{class:re(["w-4 h-4",{"animate-spin":o.value.checking}]),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[...h[14]||(h[14]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"},null,-1)])],2))],8,h1)])]),i("div",p1,[i("div",m1,[h[16]||(h[16]=i("p",{class:"text-xs text-slate-500 mb-1"},"OS Platform",-1)),i("p",g1,[i("span",v1,H(n.value.os==="windows"?"๐ช":"๐ง"),1),G(" "+H(n.value.os==="windows"?"Windows":"Linux"),1)])]),i("div",b1,[h[17]||(h[17]=i("p",{class:"text-xs text-slate-500 mb-1"},"Nginx Version",-1)),i("p",{class:re(["text-sm font-semibold",n.value.installed?"text-emerald-400":"text-red-400"])},H(n.value.installed?`v${n.value.version}`:"Not installed"),3)]),i("div",x1,[h[18]||(h[18]=i("p",{class:"text-xs text-slate-500 mb-1"},"Config Dir",-1)),i("p",y1,H(n.value.confDir),1)])]),i("div",w1,[h[27]||(h[27]=i("h2",{class:"text-sm font-semibold text-slate-300 mb-4"},"Process Control",-1)),i("div",_1,[i("button",{onClick:h[0]||(h[0]=f=>Ee("test")),disabled:m.value,class:"flex items-center gap-2 px-4 py-2.5 rounded-xl text-sm font-medium transition-all bg-blue-600/20 hover:bg-blue-600/40 border border-blue-500/30 text-blue-400 disabled:opacity-50"},[...h[19]||(h[19]=[i("svg",{class:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})],-1),G(" Test Config ",-1)])],8,k1),i("button",{onClick:h[1]||(h[1]=f=>Ee("start")),disabled:m.value||o.value.running,class:"flex items-center gap-2 px-4 py-2.5 rounded-xl text-sm font-medium transition-all bg-emerald-600/20 hover:bg-emerald-600/40 border border-emerald-500/30 text-emerald-400 disabled:opacity-30"},[...h[20]||(h[20]=[i("svg",{class:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z"}),i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})],-1),G(" Start ",-1)])],8,C1),i("button",{onClick:h[2]||(h[2]=f=>Ee("reload")),disabled:m.value||!o.value.running,class:"flex items-center gap-2 px-4 py-2.5 rounded-xl text-sm font-medium transition-all bg-amber-500/20 hover:bg-amber-500/40 border border-amber-500/30 text-amber-400 disabled:opacity-30"},[...h[21]||(h[21]=[i("svg",{class:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})],-1),G(" Reload ",-1)])],8,S1),i("button",{onClick:h[3]||(h[3]=f=>Ee("quit")),disabled:m.value||!o.value.running,class:"flex items-center gap-2 px-4 py-2.5 rounded-xl text-sm font-medium transition-all bg-slate-700 hover:bg-slate-600 border border-slate-600 text-slate-300 disabled:opacity-30"},[...h[22]||(h[22]=[i("svg",{class:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}),i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 10a1 1 0 011-1h4a1 1 0 011 1v4a1 1 0 01-1 1h-4a1 1 0 01-1-1v-4z"})],-1),G(" Quit ",-1)])],8,E1),i("button",{onClick:h[4]||(h[4]=f=>Ee("stop")),disabled:m.value||!o.value.running,class:"flex items-center gap-2 px-4 py-2.5 rounded-xl text-sm font-medium transition-all bg-red-600/20 hover:bg-red-600/40 border border-red-500/30 text-red-400 disabled:opacity-30"},[...h[23]||(h[23]=[i("svg",{class:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1),G(" Stop ",-1)])],8,A1),m.value?(S(),E("div",T1,[...h[24]||(h[24]=[i("svg",{class:"animate-spin w-4 h-4",fill:"none",viewBox:"0 0 24 24"},[i("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),i("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})],-1),G(" Running... ",-1)])])):ee("",!0)]),b.value!==null?(S(),E("div",{key:0,class:re(["mt-4 rounded-xl bg-slate-900/80 border p-4 font-mono text-sm whitespace-pre-wrap",y.value?"border-emerald-500/30 text-emerald-300":"border-red-500/30 text-red-300"])},[i("div",{class:re(["flex items-center gap-2 mb-2 text-xs font-sans",y.value?"text-emerald-500":"text-red-500"])},[y.value?(S(),E("svg",$1,[...h[25]||(h[25]=[i("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z","clip-rule":"evenodd"},null,-1)])])):(S(),E("svg",R1,[...h[26]||(h[26]=[i("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z","clip-rule":"evenodd"},null,-1)])])),G(" "+H(y.value?"Success":"Error"),1)],2),G(" "+H(b.value||"(no output)"),1)],2)):ee("",!0)]),i("div",M1,[i("div",O1,[i("div",B1,[i("div",N1,[h[29]||(h[29]=i("span",{class:"text-xs font-semibold text-slate-400 uppercase tracking-wider"},"Files",-1)),i("button",{onClick:h[5]||(h[5]=f=>O.value=!0),title:"New file",class:"p-1 rounded hover:bg-slate-700 text-slate-500 hover:text-white transition-colors"},[...h[28]||(h[28]=[i("svg",{class:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 4v16m8-8H4"})],-1)])])]),O.value?(S(),E("div",P1,[ke(i("input",{"onUpdate:modelValue":h[6]||(h[6]=f=>q.value=f),onKeydown:[Hr(Qe,["enter"]),h[7]||(h[7]=Hr(f=>{O.value=!1,q.value=""},["escape"]))],placeholder:"filename.conf",class:"w-full bg-slate-800 border border-blue-500/50 rounded px-2 py-1 text-xs text-slate-200 focus:outline-none focus:border-blue-400",autofocus:""},null,544),[[Fe,q.value]]),i("div",I1,[i("button",{onClick:Qe,class:"flex-1 text-xs px-2 py-1 bg-blue-600/30 hover:bg-blue-600/50 text-blue-400 rounded"},"Create"),i("button",{onClick:h[8]||(h[8]=f=>{O.value=!1,q.value=""}),class:"flex-1 text-xs px-2 py-1 bg-slate-700 hover:bg-slate-600 text-slate-400 rounded"},"Cancel")])])):ee("",!0),i("div",L1,[r.value.length===0?(S(),E("div",D1,"No config files found")):ee("",!0),(S(!0),E(_e,null,Je(r.value,f=>(S(),E("div",{key:f.path,onClick:v=>we(f),class:re(["group flex items-center gap-2 px-3 py-2 cursor-pointer transition-colors border-l-2",a.value?.path===f.path?"bg-slate-700/60 border-blue-500 text-slate-100":"border-transparent hover:bg-slate-800/60 text-slate-400 hover:text-slate-200"])},[h[31]||(h[31]=i("svg",{class:"w-3.5 h-3.5 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})],-1)),i("span",V1,H(f.name),1),!l.value&&f.enabledPath?(S(),E("span",{key:0,class:re(["text-[10px] px-1 rounded font-medium flex-shrink-0",f.enabled?"bg-emerald-500/20 text-emerald-400":"bg-slate-700 text-slate-500"])},H(f.enabled?"on":"off"),3)):ee("",!0),f.name!=="nginx.conf"?(S(),E("button",{key:1,onClick:On(v=>Be(f),["stop"]),class:"opacity-0 group-hover:opacity-100 p-0.5 rounded hover:bg-red-500/20 text-slate-500 hover:text-red-400 transition-all flex-shrink-0",title:"Delete"},[...h[30]||(h[30]=[i("svg",{class:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)])],8,H1)):ee("",!0)],10,j1))),128))]),!l.value&&a.value&&a.value.enabledPath?(S(),E("div",F1,[i("button",{onClick:De,disabled:T.value,class:re(["w-full text-xs px-3 py-2 rounded-lg font-medium transition-all flex items-center justify-center gap-1.5",a.value.enabled?"bg-red-600/20 hover:bg-red-600/30 border border-red-500/30 text-red-400":"bg-emerald-600/20 hover:bg-emerald-600/30 border border-emerald-500/30 text-emerald-400"])},[T.value?(S(),E("svg",z1,[...h[32]||(h[32]=[i("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),i("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"},null,-1)])])):(S(),E(_e,{key:1},[G(H(a.value.enabled?"โ Disable site":"โ
Enable site"),1)],64))],10,U1),i("p",q1,H(a.value.enabled?"Will unlink from sites-enabled":"Will symlink to sites-enabled"),1)])):ee("",!0)]),i("div",W1,[i("div",K1,[i("div",G1,[h[34]||(h[34]=i("svg",{class:"w-4 h-4 text-slate-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})],-1)),i("span",Y1,H(a.value?.name||"No file selected"),1),i("span",J1,H(a.value?.path),1),p.value?(S(),E("span",X1,[...h[33]||(h[33]=[i("svg",{class:"w-3 h-3",fill:"currentColor",viewBox:"0 0 8 8"},[i("circle",{cx:"4",cy:"4",r:"4"})],-1),G(" Unsaved ",-1)])])):ee("",!0)]),i("div",Q1,[i("button",{onClick:ve,disabled:d.value||!p.value||!a.value,class:"flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-sm font-medium bg-blue-600 hover:bg-blue-500 text-white transition-all disabled:opacity-40"},[d.value?(S(),E("svg",tg,[...h[36]||(h[36]=[i("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),i("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"},null,-1)])])):(S(),E("svg",eg,[...h[35]||(h[35]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 7H5a2 2 0 00-2 2v9a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-3m-1 4l-3 3m0 0l-3-3m3 3V4"},null,-1)])])),h[37]||(h[37]=G(" Save ",-1))],8,Z1),i("button",{onClick:Se,class:"flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-sm font-medium bg-slate-700 hover:bg-slate-600 text-slate-300 transition-all"},[...h[38]||(h[38]=[i("svg",{class:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[i("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"})],-1),G(" Reload ",-1)])])])]),a.value?(S(),E(_e,{key:1},[i("div",ng,[i("div",{ref_key:"gutterRef",ref:I,class:"select-none flex-shrink-0 text-right font-mono text-[13px] leading-relaxed border-r border-slate-800",style:{"min-width":"3.5rem",overflow:"hidden","pointer-events":"none",padding:"12px 10px 12px 8px",background:"#020617"}},[(S(!0),E(_e,null,Je(Q.value,f=>(S(),E("div",{key:f,class:re(["transition-colors",f===Z.value.line&&j.value?"text-slate-300":"text-slate-600"])},H(f),3))),128))],512),i("div",{ref_key:"scrollWrap",ref:F,class:"relative flex-1 editor-scroll",style:{"overflow-y":"scroll","overflow-x":"auto"},onScroll:oe},[i("div",{"aria-hidden":"true",class:"invisible pointer-events-none whitespace-pre editor-line-height",style:{padding:"12px 16px"},textContent:H(c.value+`
|
|
13
|
-
`)},null,8,og),i("pre",{ref:"highlightPre","aria-hidden":"true",class:"absolute top-0 left-0 w-full m-0 pointer-events-none editor-line-height whitespace-pre",style:{padding:"12px 16px"},innerHTML:B.value},null,8,rg),ke(i("textarea",{ref_key:"editorRef",ref:U,"onUpdate:modelValue":h[9]||(h[9]=f=>c.value=f),onInput:ye,onClick:h[10]||(h[10]=f=>L(f)),onKeydown:me,onKeyup:h[11]||(h[11]=f=>L(f)),onFocus:h[12]||(h[12]=f=>j.value=!0),onBlur:h[13]||(h[13]=f=>j.value=!1),spellcheck:"false",class:"absolute top-0 left-0 w-full focus:outline-none resize-none editor-textarea editor-line-height",style:{padding:"12px 16px",height:"100%","caret-color":"#60a5fa",color:"transparent",background:"transparent","tab-size":"4","white-space":"pre",overflow:"hidden","z-index":"1"},placeholder:""},null,544),[[Fe,c.value]])],544)]),i("div",ig,[i("div",lg,[j.value?(S(),E("span",ag,"Ln "+H(Z.value.line)+", Col "+H(Z.value.col),1)):(S(),E("span",cg,"Ctrl+S Save ยท Ctrl+/ Comment ยท Tab Indent"))]),i("div",ug,H(Q.value)+" lines",1)])],64)):(S(),E("div",sg," Select a file from the sidebar to edit "))])])])]))}},fg=Xo(dg,[["__scopeId","data-v-8287dcd4"]]),hg=[{path:"/login",name:"Login",component:Qd},{path:"/",name:"Dashboard",component:mm,meta:{requiresAuth:!0}},{path:"/nginx",name:"Nginx",component:fg,meta:{requiresAuth:!0}},{path:"/settings",name:"Settings",component:l1,meta:{requiresAuth:!0}}],Jl=Ld({history:md(),routes:hg});Jl.beforeEach((e,t,s)=>{const n=localStorage.getItem("pm2me_token");e.meta.requiresAuth&&!n?s({name:"Login"}):s()});const Xl=Au(zd);Xl.use(Jl);Xl.mount("#app");
|