mirror of
https://github.com/aaPanel/aaPanel.git
synced 2026-09-28 12:24:50 +02:00
26 lines
140 KiB
JavaScript
26 lines
140 KiB
JavaScript
(function(){System.register([`./rolldown-runtime-legacy.js?v=1787646744133`,`./vendor-utils-legacy.js?v=1787646744133`,`./vendor-vue-legacy.js?v=1787646744133`,`./vendor-naive-legacy.js?v=1787646744133`,`./app-legacy.js?v=1787646744133`,`./app-components-legacy.js?v=1787646744133`,`./app-shared-legacy.js?v=1787646744133`,`./vendor-pdf-legacy.js?v=1787646744133`,`./app-base-legacy.js?v=1787646744133`,`./app-modal-ui-legacy.js?v=1787646744133`,`./app-form-legacy.js?v=1787646744133`,`./app-temp-legacy.js?v=1787646744133`],function(e,t){var n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,ee,w,T,E,D,O,te,ne,re,ie,ae,oe,se,ce,le,ue,de,fe,pe,me,he,ge,_e,ve,ye,be,xe,Se,Ce,we,Te,Ee,De,Oe,ke,Ae,je,Me,Ne,Pe,Fe,Ie,Le,Re,ze,Be,Ve,He,Ue,We,Ge,Ke,qe,Je,Ye,Xe,Ze,Qe,$e,et,tt,nt,rt,it,at,ot,st,ct,lt,ut,dt,ft,pt,mt,ht,gt,_t,vt,yt,bt,xt,St,Ct,wt,Tt,Et,Dt,Ot,kt,At,jt,Mt,Nt,Pt,Ft,It,Lt,Rt,zt,Bt,Vt,Ht,Ut,Wt,Gt,Kt,qt,Jt,Yt,Xt,Zt,Qt,$t,en,tn,nn,rn,an,on,sn,cn,ln,un,dn,fn,pn,mn,hn,gn,_n,vn,yn,bn,xn,Sn,Cn,wn,Tn,En,Dn,On,kn,An,jn,Mn,Nn,Pn,Fn,In,Ln,Rn,zn,Bn,Vn,Hn,Un,Wn,Gn,Kn,qn,Jn,Yn,Xn,Zn,Qn,$n,er,tr,nr,rr,ir,ar,or,sr,cr,lr,k,A,j,M,ur,N,P,dr,fr,F,pr,mr,hr,gr,_r,vr,I,L,yr,br,xr,Sr,Cr,wr,Tr,Er,Dr,Or,kr,Ar,jr,Mr,Nr,Pr,Fr,Ir,Lr,Rr,zr,Br,Vr,Hr,Ur,Wr,Gr,Kr,qr,Jr,Yr,Xr,Zr,Qr,$r,ei,ti,ni,ri,ii,ai,oi,si,ci,li,ui,di,fi,pi,mi,hi,gi,_i,vi,yi,bi,xi,Si,Ci,wi,Ti,Ei,Di,Oi,ki,Ai,ji,Mi,Ni,Pi,Fi,Ii,Li,Ri,zi,Bi,Vi,Hi,Ui,Wi,Gi,Ki,qi,Ji,Yi,Xi,Zi,Qi,$i,ea,ta,na,ra,ia,aa,oa,sa,ca,la,R,ua,da,fa,pa,z,B,ma,ha,ga,_a,va,ya,ba,xa,Sa,Ca,wa,Ta,Ea,V,Da,Oa,ka,Aa,ja,Ma,Na,Pa,Fa,Ia,La,Ra,za,Ba,Va,Ha,Ua,Wa,Ga,H,Ka,qa,Ja,Ya,Xa,Za,Qa,$a,eo,to,no,U,ro,io,W,ao,oo,so,co,lo,uo,fo,po,mo,ho,go,_o,vo,yo,bo,xo,So,Co,wo,To,Eo,Do,Oo,ko,Ao,jo,Mo,No,Po,Fo,Io,Lo,Ro,zo,Bo,Vo,Ho,Uo,Wo,Go,Ko,qo,Jo,Yo,Xo,Zo,Qo,$o,es,G,ts,K,ns,rs,q,is,J,Y,as,X,os,ss,cs,ls,us,ds,fs,ps,ms,hs,gs,_s,vs,ys,bs,xs,Z,Ss;function Cs(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ws(e){if(Array.isArray(e))return e}function Ts(e){if(Array.isArray(e))return Cs(e)}function Es(e,t,n,r,i,a,o){try{var s=e[a](o),c=s.value}catch(e){n(e);return}s.done?t(c):Promise.resolve(c).then(r,i)}function Q(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){Es(a,r,i,o,s,`next`,e)}function s(e){Es(a,r,i,o,s,`throw`,e)}o(void 0)})}}function Ds(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Os(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function ks(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r=[],i=!0,a=!1,o,s;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));i=!0);}catch(e){a=!0,s=e}finally{try{!i&&n.return!=null&&n.return()}finally{if(a)throw s}}return r}}function As(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function js(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ms(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t],r=Object.keys(n);typeof Object.getOwnPropertySymbols==`function`&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){Ds(e,t,n[t])})}return e}function Ns(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ps(e,t){return t=t==null?{}:t,Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ns(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function Fs(e,t){return ws(e)||ks(e,t)||Ls(e,t)||As()}function Is(e){return Ts(e)||Os(e)||Ls(e)||js()}function $(e,t){var n,r,i,a={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o=Object.create((typeof Iterator==`function`?Iterator:Object).prototype),s=Object.defineProperty;return s(o,`next`,{value:c(0)}),s(o,`throw`,{value:c(1)}),s(o,`return`,{value:c(2)}),typeof Symbol==`function`&&s(o,Symbol.iterator,{value:function(){return this}}),o;function c(e){return function(t){return l([e,t])}}function l(s){if(n)throw TypeError(`Generator is already executing.`);for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(i=s[0]&2?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[s[0]&2,i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if((i=a.trys,!(i=i.length>0&&i[i.length-1]))&&(s[0]===6||s[0]===2)){a=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(s[0]===6&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}function Ls(e,t){if(e){if(typeof e==`string`)return Cs(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(n);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Cs(e,t)}}function Rs(e){no(_a,e)}function zs(){return ua(_a)}function Bs(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:``;return Q(function(){var i,a;return $(this,function(o){return i=document.createElement(`form`),i.action=Hr(`/adminer/index.php?driver=`.concat(e,`&username=`,t)),i.method=`post`,i.target=`_blank`,i.style.display=`none`,a=``,e===`mongo`&&(a=`localhost:27017`.concat(t===`root`?`/admin?authSource=admin`:`/`.concat(t,`?authSource=`,t)),r=t===`root`?`admin`:r),i.innerHTML=`
|
|
<input type="text" name="auth[driver]" id="driver" value="`.concat(e,`" size="24" />
|
|
<input type="text" name="auth[username]" id="username" value="`,t,`" size="24" />
|
|
<input type="password" name="auth[password]" id="password" value="`,n,`" size="24" />
|
|
<input type="text" name="auth[db]" id="db" value="`,r,`" size="24" />
|
|
<input type="text" name="auth[server]" id="server" value="`,a,`" size="24" />
|
|
`),document.body.appendChild(i),i.submit(),document.body.removeChild(i),[2]})})()}function Vs(){var e=Y().t;return{key:`db_password`,title:e(`Database.index_14`),width:160,render:function(e){return P(qn,{value:e.db_password},null)}}}function Hs(){var e=Y().t;return{key:`ps`,title:e(`Database.tools.index_62`)}}function Us(){os({title:Qo(`Database.tools.index_69`),width:860,minHeight:264,component:I(function(){return D(function(){return Promise.resolve().then(function(){return oo})},void 0)})})}function Ws(){os({title:Qo(`Database.tools.index_41`),width:460,minHeight:388,footer:!0,data:{row:void 0,isEdit:!1},component:Nr})}function Gs(){os({title:Qo(`Database.tools.index_70`),width:480,minHeight:84,footer:!0,component:I(function(){return D(function(){return Promise.resolve().then(function(){return vo})},void 0)})})}function Ks(){os({title:Qo(`Database.tools.index_71`),width:460,minHeight:85,footer:!0,component:I(function(){return D(function(){return Promise.resolve().then(function(){return lo})},void 0)})})}function qs(e){os({title:``.concat(Qo(`Database.tools.index_72`),` [`,e.name,`]`),width:800,minHeight:196,data:{row:e},component:I(function(){return D(function(){return Promise.resolve().then(function(){return kn})},void 0)})})}function Js(e,t){os({title:``.concat(Qo(`Database.tools.index_73`),` [`,e.name,`]`),width:840,minHeight:234,data:{row:e,type:t},component:I(function(){return D(function(){return Promise.resolve().then(function(){return Ci})},void 0)})})}function Ys(e){os({title:``.concat(Qo(`Database.tools.index_74`),` [`,e.name,`]`),width:480,minHeight:140,footer:!0,data:{row:e},component:I(function(){return D(function(){return Promise.resolve().then(function(){return Ya})},void 0)})})}function Xs(e){os({title:Qo(`Database.index_30`),width:760,minHeight:226,footer:!0,confirmType:`error`,data:{ids:e.map(function(e){return e.id})},component:I(function(){return D(function(){return Promise.resolve().then(function(){return Or})},void 0)})})}function Zs(e){os({width:740,height:580,title:`Adminer`,data:e,component:I(function(){return D(function(){return Promise.resolve().then(function(){return wn})},void 0)})})}function Qs(e){var t=F(),n=`--`;switch(e.db_type){case 0:n=Zo(`Database.tools.index_67`);break;case 1:var r,i;n=``.concat(Zo(`Database.tools.index_68`),` (`,((r=e.conn_config)==null?void 0:r.db_host)||``,`:`,((i=e.conn_config)==null?void 0:i.db_port)||``,`)`);break;case 2:for(var a=0;a<t.remoteList.length;a++){var o=t.remoteList[a];if(o.id===e.sid){n=o.ps===``?``.concat(Zo(`Database.tools.index_68`),` (`,o.db_host,`:`,o.db_port,`)`):o.ps;break}}break}return n}function $s(e){return typeof e==`function`||Object.prototype.toString.call(e)===`[object Object]`&&!ha(e)}function ec(){return{key:`name`,title:Xo(`Database.index_12`),width:`12%`,minWidth:120}}function tc(){return{key:`username`,title:Xo(`Database.form.index_3`),width:`12%`,minWidth:120}}function nc(){return{key:`password`,title:Xo(`Database.index_14`),minWidth:150,render:function(e){return P(qn,{value:e.password},null)}}}function rc(){return{key:`backup_count`,title:Xo(`Database.index_16`),width:`12%`,render:function(e){var t;return P(`div`,{class:`flex items-center`},[P(In,{type:e.backup_count>0?`primary`:`warning`,onClick:function(){qs(e)}},{default:function(){return[e.backup_count>0?``.concat(Xo(`Database.mongo.index_7`),`(`,e.backup_count,`)`):Xo(`Database.index_18`)]}}),P(`span`,{class:`mx-4px`},[N(`|`)]),P(In,{onClick:function(){Js(e,`mongodb`)}},$s(t=Xo(`Public.Btn.Import`))?t:{default:function(){return[t]}})])}}}function ic(){return{key:`sid`,title:Xo(`Database.mongo.index_8`),width:`12%`,minWidth:120,render:function(e){return Qs(e)}}}function ac(e){return typeof e==`function`||Object.prototype.toString.call(e)===`[object Object]`&&!ha(e)}function oc(e){no(ga,e)}function sc(){return ua(ga)}function cc(e,t,n,r){return new Promise(function(i){var a=``.concat(e,`/index.php?lang=en`),o=document.createElement(`form`),s=`
|
|
<input type="text" name="pma_username" id="pma_username" value="`.concat(n,`" />
|
|
<input type="password" name="pma_password" id="pma_password" value="`,r,`" />
|
|
<input type="text" name="server" value="1" />
|
|
<input type="text" name="target" value="index.php" />
|
|
<input type="text" name="db" id="db" value="`,t,`" />
|
|
`);o.action=a,o.setAttribute(`public-data`,a),o.method=`post`,o.target=`_blank`,o.style.display=`none`,o.innerHTML=s,document.body.appendChild(o),o.submit(),document.body.removeChild(o),i(o)})}function lc(e,t){return Q(function(){var n,r,i,a,o,s;return $(this,function(c){switch(c.label){case 0:return n=Ur(`/phpmyadmin/index.php?lang=en`),[4,En.get(n)];case 1:return r=c.sent().data,i={session:``,token:``},a=r.match(/"set_session"\s+value="(\w+)"/),o=r.match(/"token"\s+value="(\w+)"/),a&&a.length>1&&(i.session=a[1]||``),o&&o.length>1&&(i.token=o[1]||``),s=document.createElement(`form`),s.action=Ur(`/phpmyadmin/index.php`),s.method=`post`,s.target=`_blank`,s.style.display=`none`,s.innerHTML=`
|
|
<input name="set_session" id="input_session" value="`.concat(i.session,`" />
|
|
<input type="text" name="pma_username" id="pma_username" value="`,e,`" size="24" />
|
|
<input type="password" name="pma_password" id="pma_password" value="`,t,`" size="24" />
|
|
<input name="token" id="input_token" value="`,i.token,`" />
|
|
<input name="target" id="input_target" value="`,Ur(`/phpmyadmin/index.php`),`" />
|
|
<input name="server" value="1" id="input_server" />
|
|
`),document.body.appendChild(s),s.submit(),document.body.removeChild(s),[2]}})})()}function uc(e){return typeof e==`function`||Object.prototype.toString.call(e)===`[object Object]`&&!ha(e)}function dc(){return{key:`password`,title:Yo(`Database.index_14`),minWidth:150,render:function(e){return P(qn,{value:e.password},null)}}}function fc(){return{key:`backup_count`,title:Yo(`Database.index_16`),width:`12%`,render:function(e){var t;return P(`div`,{class:`flex items-center`},[P(In,{type:e.backup_count>0?`primary`:`warning`,onClick:function(){qs(e)}},{default:function(){return[e.backup_count>0?``.concat(Yo(`Database.mongo.index_7`),`(`,e.backup_count,`)`):Yo(`Database.index_18`)]}}),P(`span`,{class:`mx-4px`},[N(`|`)]),P(In,{onClick:function(){Js(e,`pgsql`)}},uc(t=Yo(`Public.Btn.Import`))?t:{default:function(){return[t]}})])}}}function pc(){return{key:`sid`,title:Yo(`Database.mongo.index_8`),width:`12%`,minWidth:120,render:function(e){return Qs(e)}}}function mc(){var e=Y().t;return{key:`val`,title:e(`Database.redis.index_3`),render:function(e){return P(Wn,{value:e.val},null)}}}function hc(){return{key:`password`,title:Jo(`Database.index_14`),minWidth:150,render:function(e){return P(qn,{value:e.password},null)}}}function gc(){return{key:`sid`,title:Jo(`Database.index_19`),width:`12%`,minWidth:120,render:function(e){return Qs(e)}}}return e({a:void 0,c:void 0,d:void 0,f:void 0,i:void 0,l:void 0,m:void 0,n:void 0,o:void 0,p:void 0,r:void 0,s:void 0,t:void 0,u:void 0}),{setters:[function(e){E=e.r},function(e){d=e.mn,En=e.n,Qn=e.Nt,sr=e.yn,k=e.bn,A=e.xn,j=e.Sn,M=e.Cn,ur=e.wn,N=e.En,P=e.Dn,I=e.On,L=e.kn,Rr=e.Ft,e.fr,e.Pn,e.on,e.Ir,R=e.nn,ua=e.Fn,B=e.hr,ha=e.In,Ta=e.Ln,Ea=e.Rn,Ha=e.zn,Ua=e.Yr,Wa=e.Hn,Ga=e.Gn,H=e.Jn,no=e.Yn,U=e.vr,W=e.br,uo=e.Xn,fo=e.Zn,Vo=e.Cr,G=e.ei,ts=e.Rt,K=e.wr,ns=e.Tr,q=e.Or,cs=e.rr,ys=e.un,xs=e.or,Z=e.cr,Ss=e.lr},function(e){m=e.s,Uo=e.p,Y=e.l,fs=e.a,ps=e.o},function(e){n=e.Ct,i=e.gt,a=e.mt,o=e.ut,s=e.B,c=e.Y,l=e.L,u=e.F,f=e.P,p=e.M,h=e.bt,g=e.xt,_=e.A,v=e.St,b=e.S,x=e.tt,S=e.v,C=e.h,ee=e.p,w=e.c,T=e.s},function(e){fn=e.zf,pn=e.Pa,mn=e.Fa,hn=e.Ia,gn=e.La,_n=e.Ra,vn=e.za,Dn=e.Ba,Nn=e.Rf,In=e.mn,Rn=e.wf,qn=e.un,Xn=e.ln,rr=e.Va,or=e.Ha,lr=e.dn,F=e.Na,yr=e.Ua,br=e.Wa,Sr=e.Ga,Cr=e.Ka,wr=e.qa,Tr=e.Ja,Er=e.Ya,kr=e.ap,Ar=e.Xa,Lr=e.Zf,zr=e.sp,Gr=e.cp,Kr=e.Za,qr=e.Qa,Jr=e.$a,Yr=e.eo,Xr=e.to,$r=e.Wf,ei=e.no,ti=e.ro,ni=e.io,ri=e.ao,ii=e.oo,ai=e.so,oi=e.co,si=e.lo,ci=e.up,li=e.uo,ui=e.do,di=e.Hr,fi=e.Yf,mi=e.fo,hi=e.po,gi=e.mo,_i=e.ho,vi=e.ec,yi=e.tp,bi=e.i,xi=e.Bf,pa=e.gp,z=e.yp,ma=e.bp,ba=e.da,V=e.Lf,Da=e.go,Oa=e._o,ka=e.vo,qa=e.yo,ro=e.bo,po=e.xo,mo=e.So,ho=e.Of,Do=e.Co,Oo=e.Kf,ko=e.wo,Ao=e.To,jo=e.Eo,Mo=e.Do,No=e.Oo,Po=e.ko,Fo=e.Ao,Io=e.jo,Lo=e.Mo,Ro=e.No,zo=e.Po,Bo=e.Fo,Go=e.Io,Ko=e.Lo,qo=e.Ro,es=e.zo,is=e.Zt,J=e.Nf,as=e.Sa,X=e.Oa,os=e.Pf,ss=e.Ff,ls=e.a,us=e.rn,ds=e.in,ms=e.Tn,hs=e.Da,gs=e.If},function(e){Mn=e.Ji,Fn=e.F,Hn=e.Xi,Un=e.Qi,Gn=e.Yi,Kn=e.Zi,jr=e.$i},function(e){tr=e.qf,nr=e.Xf,xr=e.zf,Br=e.oc,Vr=e.sc,Wr=e.rc,Zr=e.ic,Qr=e.ac,da=e.cc,Ka=e._l,Eo=e.lc,Wo=e.uc,rs=e.dc,bs=e.nc},function(e){D=e.n,la=e.r},function(e){Ln=e.u,zn=e.c,Vn=e.o,Jn=e.d,Yn=e.l},function(e){cr=e.r,to=e.a},function(e){Pn=e.c,Wn=e.n},function(e){Bn=e.a,Zn=e.o}],execute:function(){O=document.createElement(`style`),O.textContent=`.access-btn[data-v-62c28119]{--n-height:40px;--n-border-radius:4px;--n-color:var(--button-gray-color);--n-text-color:var(--color-text-2);--n-border:none;--n-color-hover:var(--color-primary);--n-border-hover:1px solid var(--color-primary);--n-text-color-hover:#fff;--n-color-focus:var(--color-primary);--n-text-color-focus:#fff;--n-border-focus:1px solid var(--color-primary);padding:0 24px}.bg-recommend[data-v-62c28119]{background-image:url(/static/vite/images/recommend.svg);background-position:50%;background-repeat:no-repeat;background-size:contain;width:32px;height:32px;position:absolute;top:-1px;left:-1px}[data-v-81a8f5e8] .n-result{--n-title-font-size:18px}.n-button[data-v-9533c797]{--n-height:40px;--n-border-radius:4px;--n-color:var(--button-gray-color);--n-text-color:var(--color-text-2);--n-border:none;--n-color-hover:var(--color-primary);--n-border-hover:1px solid var(--color-primary);--n-text-color-hover:#fff;--n-color-focus:var(--color-primary);--n-text-color-focus:#fff;--n-border-focus:1px solid var(--color-primary);padding:0 24px}.bg-recommend[data-v-9533c797]{background-image:url(/static/vite/images/recommend.svg);background-position:50%;background-repeat:no-repeat;background-size:contain;width:32px;height:32px;position:absolute;top:-1px;left:-1px}.n-transfer[data-v-cce6d97b]{height:200px}.n-transfer[data-v-cce6d97b] .n-transfer-list--target{display:none}
|
|
/*$vite$:1*/`,document.head.appendChild(O),R(),_a=Symbol(`php-admin`),Hr=function(e){return``.concat(zr(),e)},R(),Ie={class:`p-4px`},st={class:`flex items-center h-40px mb-10px text-14px whitespace-pre-wrap`},bt={class:`flex gap-10px`},Mt={class:`mt-20px`},Yt={class:`flex gap-24px mt-20px`},na=L({__name:`index`,setup:function(e,t){var n=t.expose,r=Y().t,a=zs(),o=a.type,c=a.db,l=a.username,u=a.password,f=bi(),p=W(!1),m=W(``),h=function(){return Q(function(){return $(this,function(e){return J({title:r(`Database.adminerManager.service.fixed`),content:r(`Database.adminerManager.service.confirmFixed`),onConfirm:function(){return Q(function(){return $(this,function(e){switch(e.label){case 0:return[4,da({version:m.value})];case 1:return e.sent(),S(),[2]}})})()}}),[2]})})()},g=function(){J({title:r(`Database.adminerManager.service.uninstall`),content:r(`Database.adminerManager.service.confirmUninstall`),onConfirm:function(){return Q(function(){return $(this,function(e){switch(e.label){case 0:return[4,rs()];case 1:return e.sent(),S(),[2]}})})()}})},_=function(){J({title:r(`Database.adminerManager.service.install`),content:r(`Database.adminerManager.service.confirmInstall`),onConfirm:function(){return Q(function(){var e;return $(this,function(t){switch(t.label){case 0:return[4,Vr()];case 1:return e=t.sent().message,pa(e)?[4,da({version:e[0]})]:[3,3];case 2:t.sent(),t.label=3;case 3:return S(),[2]}})})()}})},v=new Map([[`pgsql`,`postgres`],[`mongo`,`root`]]),y=function(){return Q(function(){var e,t;return $(this,function(n){switch(n.label){case 0:if(f.isFree)return ls({source:160}),[2];if(l&&u&&c)return Bs(o,l,u,c),[2];e=V.loading(r(`Database.adminerManager.service.jumpingToAdminer`)),n.label=1;case 1:return n.trys.push([1,,5,6]),o===`mongo`?[4,b()]:[3,3];case 2:return n.sent(),[2];case 3:return[4,Xr(o)];case 4:return t=n.sent().message,z(t)&&Bs(o,v.get(o)||``,t.result),[3,6];case 5:return e.close(),[7];case 6:return[2]}})})()},b=function(){return Q(function(){var e;return $(this,function(t){switch(t.label){case 0:return[4,Xr(`mongodb`)];case 1:return e=t.sent().message,z(e)&&Bs(o,v.get(o)||``,e.root),[2]}})})()},x=function(){return Q(function(){return $(this,function(e){return window.open(Hr(`/adminer/index.php?driver=`.concat(o))),[2]})})()},S=function(){return Q(function(){var e;return $(this,function(t){switch(t.label){case 0:return[4,Br()];case 1:return e=t.sent().message,z(e)&&(p.value=e.install===1,m.value=e.version),[2]}})})()};return S(),n({init:S}),function(e,t){var n=Vn,r=i,a=s,o=Xn;return H(),M(`div`,Ie,[k(`div`,st,[k(`span`,null,G(e.$t(`Database.adminerManager.service.currentStatus`)),1),P(n,{value:q(p)},null,8,[`value`])]),k(`div`,bt,[q(p)?(H(),M(d,{key:0},[P(r,{onClick:h},{default:Z(function(){return[N(G(e.$t(`Database.adminerManager.service.fixed`)),1)]}),_:1}),P(r,{onClick:g},{default:Z(function(){return[N(G(e.$t(`Public.Btn.Uninstall`)),1)]}),_:1})],64)):(H(),A(r,{key:1,onClick:_},{default:Z(function(){return[N(G(e.$t(`Public.Btn.Install`)),1)]}),_:1}))]),k(`div`,Mt,[P(a,{dashed:``})]),k(`div`,Yt,[P(r,{class:`access-btn`,onClick:y},{default:Z(function(){return[k(`span`,null,G(e.$t(`Database.PhpAdmin.index_11`)),1),t[1]||(t[1]=k(`span`,{class:`bg-recommend`},null,-1))]}),_:1}),P(r,{class:`access-btn`,onClick:t[0]||(t[0]=function(e){return x()})},{default:Z(function(){return[N(G(e.$t(`Database.PhpAdmin.index_6`)),1)]}),_:1})]),P(o,{class:`mt-16px`},{default:Z(function(){return[k(`li`,null,G(e.$t(`Database.PhpAdmin.index_7`)),1),k(`li`,null,G(e.$t(`Database.PhpAdmin.index_33`)),1)]}),_:1})])}}}),To=fn(na,[[`__scopeId`,`data-v-62c28119`]]),R(),Pe={class:`p-8px`},ot={class:`w-160px`},ta=L({__name:`index`,setup:function(e,t){var n=t.expose,r=Y().t,a=U({php_version:null}),o=W([]),s=X(),c=s.loading,u=s.setLoading,d=function(){return Q(function(){var e,t,n,r,i;return $(this,function(s){switch(s.label){case 0:return s.trys.push([0,,2,3]),u(!0),[4,Promise.all([di(),Br()])];case 1:return e=Fs.apply(void 0,[s.sent(),2]),t=e[0],n=e[1],r=t.message,pa(r)&&(o.value=r.filter(function(e){return e.version!==`00`}).map(function(e){return{label:e.name,value:e.version}})),i=n.message,a.php_version=Rr(i,`php_version`,null),[3,3];case 2:return u(!1),[7];case 3:return[2]}})})()},f=function(){return Q(function(){var e;return $(this,function(t){switch(t.label){case 0:return e=a.php_version,e===null?(V.error(r(`Database.PhpAdmin.index_32`)),[2]):[4,Wo({php_version:e})];case 1:return t.sent(),d(),[2]}})})()},p=function(){return Q(function(){var e;return $(this,function(t){switch(t.label){case 0:return[4,vi({sName:`php-`.concat(Number(a.php_version)/10)})];case 1:return e=t.sent().message,z(e)&&ms(e),[2]}})})()};return d(),n({init:d}),function(e,t){var n=x,r=i,s=l;return H(),M(`div`,Pe,[P(s,{class:`items-center`},{default:Z(function(){return[k(`span`,null,G(e.$t(`Database.PhpAdmin.index_31`)),1),k(`div`,ot,[P(n,{value:q(a).php_version,"onUpdate:value":t[0]||(t[0]=function(e){return q(a).php_version=e}),loading:q(c),options:q(o)},null,8,[`value`,`loading`,`options`])]),P(r,{disabled:q(a).php_version===null,type:`primary`,onClick:f},{default:Z(function(){return[N(G(e.$t(`Public.Btn.Save`)),1)]}),_:1},8,[`disabled`]),P(r,{disabled:q(a).php_version===null,onClick:p},{default:Z(function(){return Is(t[1]||(t[1]=[N(` Settings `,-1)]))}),_:1},8,[`disabled`])]}),_:1})])}}}),eo=ta,R(),Ne={class:`p-4px`},at={class:`w-142px mr-8px`},ea=L({__name:`index`,setup:function(e,t){var n=t.expose,r=Y().t,a=W(null),o=function(){return Q(function(){var e;return $(this,function(t){switch(t.label){case 0:return e=a.value,e===null?(V.error(r(`Database.PhpAdmin.index_25`)),[2]):[4,Eo({port:e})];case 1:return t.sent(),c(),[2]}})})()},s=W(!1),c=function(){return Q(function(){var e;return $(this,function(t){switch(t.label){case 0:return[4,Br()];case 1:return e=t.sent().message,a.value=Rr(e,`port`,null),[2]}})})()},l=function(){c()};return l(),n({init:l}),function(e,t){var n=_,r=i,c=u,l=Mn;return H(),M(`div`,Ne,[P(l,{"label-width":`160`},{default:Z(function(){return[P(c,{label:e.$t(`Database.PhpAdmin.index_16`),"label-width":`auto`},{default:Z(function(){return[k(`div`,at,[P(n,{value:q(a),"onUpdate:value":t[0]||(t[0]=function(e){return B(a)?a.value=e:null}),min:0,max:66325,"show-button":!1,loading:q(s),placeholder:``},null,8,[`value`,`loading`])]),P(r,{type:`primary`,onClick:o},{default:Z(function(){return[N(G(e.$t(`Public.Btn.Save`)),1)]}),_:1})]}),_:1},8,[`label`])]}),_:1})])}}}),xo=ea,R(),Me={class:`h-580px`},$i=L({__name:`index`,props:{type:{},username:{},password:{},db:{}},setup:function(e){var t=e,n=Y().t,r=W(`service`),i=[{key:`service`,label:n(`Database.PhpAdmin.index_1`),component:To},{key:`php`,label:n(`Database.PhpAdmin.index_2`),component:eo},{key:`safe`,label:n(`Database.PhpAdmin.index_3`),component:xo}];return Rs({type:t.type,username:t.username,password:t.password,db:t.db}),function(e,t){var n=Yn;return H(),M(`div`,Me,[P(n,{value:q(r),"onUpdate:value":t[0]||(t[0]=function(e){return B(r)?r.value=e:null}),ref:`tabsRef`,data:i},null,8,[`value`])])}}}),wn=E({default:function(){return Cn}}),Cn=$i,R(),je={class:`w-680px p-20px`},it={class:`flex items-center`},yt={class:`flex-1 leading-20px ml-10px`},jt={class:`text-14px mb-4px`},Jt={class:`flex items-center gap-6px text-font2`},$t={class:`my-20px`},nn={class:`flex items-center leading-30px whitespace-pre`},an={class:`flex-1 w-0`},on={class:`leading-30px`},He={class:`leading-30px`},Ue={class:`h-400px mt-10px`},wa=L({__name:`logs`,props:{type:{type:String,default:`backup`},row:{type:Object,required:!0}},emits:[`close`],setup:function(e,t){var n=t.emit,r=Y().t,i=W(!0),a=W(``),o=W(``),l=W(``),u=sr(function(){return e.type===`import`?r(`Database.Mysql.type.import`):e.type===`recover`?r(`Database.Mysql.type.recover`):r(`Database.Mysql.type.backup`)}),d=null,m=function(){i.value=!1,d&&(clearTimeout(d),d=null)},h=function(){return Q(function(){var t,n,r;return $(this,function(s){switch(s.label){case 0:return e.type===`backup`?[4,Wr({id:e.row.id})]:[3,2];case 1:return n=s.sent(),[3,4];case 2:return[4,Qr({name:e.row.name})];case 3:n=s.sent(),s.label=4;case 4:if(t=n.message,z(t)){if(a.value=t.msg,!t.status)return m(),[2];if(o.value=t.total,l.value=t.speed,r=(t.msg.indexOf(`successful`)!==-1||t.msg.indexOf(`Successfully`)!==-1)&&t.status,r)return g(),[2];t.speed&&i.value&&!r&&(d=window.setTimeout(function(){h()},1e3))}return[2]}})})()},g=function(){i.value=!1,m(),n(`close`)};return Wa(function(){m()}),h(),function(t,n){var r=s,i=c,d=f,m=p,h=Ln,g=Xn;return H(),M(`div`,je,[k(`div`,it,[n[0]||(n[0]=k(`i`,{class:`i-streamline-ultimate:loading-bold text-30px animate-spin`},null,-1)),k(`div`,yt,[k(`div`,jt,G(t.$t(`Database.Mysql.logs.index_1`,[q(u)])),1),k(`div`,Jt,[k(`span`,null,G(t.$t(`Database.Mysql.logs.index_2`,[q(u),q(u)])),1)])])]),k(`div`,$t,[P(r)]),P(m,{class:`text-14px`,"x-gap":`12`,cols:10},{default:Z(function(){return[P(d,{span:4},{default:Z(function(){return[k(`div`,nn,[k(`span`,null,G(t.$t(`Database.Mysql.logs.index_3`)),1),k(`div`,an,[P(i,null,{default:Z(function(){return[N(G(e.row.name),1)]}),_:1})])])]}),_:1}),P(d,{span:3},{default:Z(function(){return[k(`div`,on,[k(`span`,null,G(t.$t(`Database.Mysql.logs.index_4`)),1),k(`span`,null,G(q(o)||`--`),1)])]}),_:1}),P(d,{span:3},{default:Z(function(){return[k(`div`,He,[k(`span`,null,G(t.$t(`Database.Mysql.logs.index_5`)),1),k(`span`,null,G(q(l)||`--`),1)])]}),_:1})]}),_:1}),k(`div`,Ue,[P(h,{log:q(a)},null,8,[`log`])]),e.type===`import`?(H(),A(g,{key:0,class:`mt-10px`},{default:Z(function(){return[k(`li`,null,G(t.$t(`Database.Mysql.logs.index_6`)),1)]}),_:1})):j(``,!0)])}}}),Sa=wa,R(),Ae={class:`p-20px`},Qi=L({__name:`index`,props:{row:{}},setup:function(e){var t=Y().t,n=e,r=n.row,a=F(),o=function(){return Q(function(){var e,t,n;return $(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),e=a.type===`mysql`,v(`backup`),[4,es(a.type,{id:r.id},!e)];case 1:return t=i.sent(),n=t.message,y(),z(n)&&(g(),a.setRefresh(!0),e&&V.success(n.result)),[3,3];case 2:return i.sent(),y(),[3,3];case 3:return[2]}})})()},s=U({p:1,limit:10,search:r.id}),c=hs([{type:`selection`,width:40},{key:`filename`,title:t(`Component.UploadFile.index_3`),ellipsis:{tooltip:{width:`trigger`}}},{key:`type`,title:t(`Ftp.Table.index_3`),width:80},{key:`size`,title:t(`Site.TableRow.index_23`),width:90,render:function(e){return Gr(e.size)}},{key:`addtime`,title:t(`Site.TableRow.index_25`),width:146},is({width:180,options:function(e){return[{label:t(`Public.Btn.Click`),show:e.type!==`local disk`,onClick:function(){ms({title:e.type,name:e.type,admin:!0})}},{label:t(`Database.tools.index_3`),show:e.type===`local disk`,onClick:function(){J({title:t(`Database.tools.index_17`),content:t(`Database.tools.index_18`),onConfirm:function(t){var n=t.hide;return Q(function(){return $(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),v(`import`),n(),[4,ro(a.type,{file:e.filename,name:r.name},!1)];case 1:return t.sent(),y(),a.setRefresh(!0),[3,3];case 2:return t.sent(),y(),[3,3];case 3:return[2]}})})()}})}},{label:t(`Ftp.Label.index_11`),show:e.type===`local disk`,onClick:function(){kr(e.filename,e.name)}},{label:t(`Public.Btn.Del`),onClick:function(){J({title:t(`Site.Batch.index_18`),content:t(`Database.tools.index_19`),onConfirm:function(t){var n=t.hide;return Q(function(){return $(this,function(t){switch(t.label){case 0:return[4,br({id:e.id})];case 1:return t.sent(),g(),a.setRefresh(!0),n(),[2]}})})()}})}}]}})]),l=c.keys,u=c.table,d=c.columns,f=[{key:`del`,type:`confirm`,label:t(`Site.Batch.index_20`),confirm:{title:t(`Site.Batch.index_21`),desc:t(`Site.Batch.index_11`),columns:[d.value[1]],api:function(e){return br({id:e.id},!1)},done:function(){g()}}}],p=X(),m=p.loading,h=p.setLoading,g=function(){return Q(function(){var e;return $(this,function(t){switch(t.label){case 0:return t.trys.push([0,,2,3]),h(!0),[4,qr(K(s))];case 1:return e=t.sent().message,z(e)?(u.data=e.data.map(function(e){return Ps(Ms({},e),{filename:e.filename.includes(`|`)?`/`+e.filename.split(`|`).slice(1).join(`|`):e.filename,type:e.filename.includes(`|`)?e.filename.split(`|`)[0]:`local disk`})}),u.total=ci(e.page)):(u.data=[],u.total=0),r.backup_count=u.total,[3,3];case 2:return l.value=[],h(!1),[7];case 3:return[2]}})})()},_=null,v=function(e){a.type===`mysql`&&(_=os({data:{row:n.row,type:e},component:Sa}))},y=function(){_&&_.hide()};return Ga(function(){g()}),function(e,t){var n=i,r=Gn,a=Hn,c=Kn,p=Un;return H(),M(`div`,Ae,[P(p,null,{toolsLeft:Z(function(){return[P(n,{class:`backup-btn`,type:`primary`,onClick:o},{default:Z(function(){return[N(G(e.$t(`Database.index_16`)),1)]}),_:1})]}),table:Z(function(){return[P(r,{"checked-row-keys":q(l),"onUpdate:checkedRowKeys":t[0]||(t[0]=function(e){return B(l)?l.value=e:null}),loading:q(m),"loading-num":6,data:q(u).data,columns:q(d)},null,8,[`checked-row-keys`,`loading`,`data`,`columns`])]}),pageLeft:Z(function(){return[P(a,{"checked-row-keys":q(l),"onUpdate:checkedRowKeys":t[1]||(t[1]=function(e){return B(l)?l.value=e:null}),data:q(u).data,options:f},null,8,[`checked-row-keys`,`data`])]}),pageRight:Z(function(){return[P(c,{page:q(s).p,"onUpdate:page":t[2]||(t[2]=function(e){return q(s).p=e}),"page-size":q(s).limit,"onUpdate:pageSize":t[3]||(t[3]=function(e){return q(s).limit=e}),"item-count":q(u).total,onRefresh:g},null,8,[`page`,`page-size`,`item-count`])]}),_:1})])}}}),kn=E({default:function(){return On}}),On=Qi,sn=xi.global,$o=sn.t,e(`d`,pi=function(){return ho.post(`/files?action=Get_Recycle_bin`)}),e(`f`,function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return ho.post(`/files?action=Get_Recycle_bin`,e)}),e(`m`,function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return ho.post(`/files?action=Recycle_bin`,e,{requestOptions:{loading:$o(`file.recycle.switching`),successMessage:!0}})}),e(`c`,function(e){return ho.post(`/files?action=Close_Recycle_bin_new`,e,{requestOptions:{loading:$o(`file.recycle.emptying`),successMessage:!0,successMessageKey:`msg`}})}),e(`p`,function(e){return ho.post(`/files?action=Re_Recycle_bin`,e,{requestOptions:{loading:$o(`file.recycle.restoring`),successMessage:!0}})}),e(`l`,function(e){return ho.post(`/files?action=Del_Recycle_bin_new`,e,{requestOptions:{loading:$o(`file.recycle.deleting`),successMessage:!0}})}),e(`s`,function(e){return ho.post(`/files?action=Batch_Del_Recycle_bin`,e,{requestOptions:{loading:$o(`file.recycle.deleting`),successMessage:!1}})}),e(`u`,function(e){return ho.post(`/files?action=download_file`,e)}),R(),ke={class:`px-20px py-24px`},rt={class:`font-bold`},vt={class:`mt-16px text-error`},Bt={key:0,class:`mt-4px`},Zi=L({__name:`index`,props:{data:{}},emits:[`close`],setup:function(e,t){var r=t.expose,i=t.emit,a=Y().t,o=e.data.ids,s=i,c=F(),l=W(!0),u=W([]),d=sr(function(){var e;return(e=c.remoteList[0])==null?void 0:e.id}),f=sr(function(){return c.type===`mysql`&&l.value}),p=function(e){return e.sid===d.value},m=function(e){return f.value&&p(e)},h=function(e){for(var t=`--`,n=0;n<c.remoteList.length;n++){var r=c.remoteList[n];if(r.id===e){t=r.ps||r.db_host;break}}return t},g=W([{key:`name`,title:a(`Database.index_12`),ellipsis:{tooltip:{width:`trigger`}}},{key:`total`,title:a(`Component.UploadFile.index_4`),width:120,render:function(e){return Gr(e.total)}},{key:`position`,title:a(`Database.index_19`)},{key:`addtime`,title:a(`Docker.Container.config.status.index_11`),width:160,render:function(e){return e.addtime}},{key:`result`,title:a(`Database.tools.index_24`),align:`right`,width:140,render:function(e){return m(e)?P(`div`,null,[a(`Database.tools.index_26`)]):P(`div`,{class:`text-error`},[a(`Database.tools.index_25`)])}}]),_=function(){return Q(function(){var e;return $(this,function(t){switch(t.label){case 0:return[4,pi()];case 1:return e=t.sent().message,z(e)&&(l.value=e.status_db),[2]}})})()},v=X(),y=v.loading,b=v.setLoading,x=function(){return Q(function(){var e;return $(this,function(t){switch(t.label){case 0:return t.trys.push([0,,2,3]),b(!0),[4,Kr({ids:o})];case 1:return e=t.sent().message,z(e)?u.value=pa(e.data)?e.data.map(function(e){return Ps(Ms({},e),{position:h(e.sid)})}):[]:u.value=[],[3,3];case 2:return b(!1),[7];case 3:return[2]}})})()},S=function(){var e=a(`Database.tools.index_27`),t=a(`Database.tools.index_28`);gs({text:a(`Database.index_30`),title:a(`Database.tools.index_29`),content:f.value?e:t,onConfirm:function(e){var t=e.hide;return Q(function(){return $(this,function(e){return ee(),t(),[2]})})()}})},C=function(e){return Q(function(){return $(this,function(t){switch(t.label){case 0:return[4,yr(c.type,{name:e.name,id:e.id})];case 1:return[2,t.sent()]}})})()},ee=function(){os({title:a(`Database.index_30`),hideClose:!0,data:{title:a(`Database.index_30`),api:C,data:u.value,callback:w},component:to})},w=function(e){s(`close`),c.setRefresh(!0),os({title:a(`Database.tools.index_30`),width:440,footer:!0,component:cr,data:{title:a(`Database.index_30`),data:e,status:`done`,columns:[{key:`name`,title:a(`Database.index_12`),ellipsis:{tooltip:{width:`trigger`}}}]}})};return function(){return Q(function(){return $(this,function(e){switch(e.label){case 0:return[4,_()];case 1:return e.sent(),x(),[2]}})})()}(),r({onConfirm:S}),function(e,t){var r=n,i=Gn;return H(),M(`div`,ke,[P(r,{type:`warning`},{default:Z(function(){return[k(`span`,rt,G(e.$t(`Database.tools.index_20`))+`: `,1),k(`span`,null,G(e.$t(`Database.tools.index_21`)),1)]}),_:1}),P(i,{class:`mt-16px`,loading:q(y),"loading-num":q(o).length,"max-height":300,data:q(u),columns:q(g)},null,8,[`loading`,`loading-num`,`data`,`columns`]),k(`div`,vt,[k(`p`,null,G(e.$t(`Database.tools.index_21`)),1),q(f)?j(``,!0):(H(),M(`p`,Bt,G(e.$t(`Database.tools.index_22`)),1))])])}}}),Or=E({default:function(){return Dr}}),Dr=Zi,R(),Oe={class:`w-700px p-20px`},tt={class:`mb-16px`},_t={class:`h-420px`},Ca=L({__name:`logs`,setup:function(e){var t=W(``),n=X(),r=n.loading,a=n.setLoading,o=function(){return Q(function(){var e;return $(this,function(n){switch(n.label){case 0:return n.trys.push([0,,2,3]),a(!0),[4,Zr()];case 1:return e=n.sent().message,z(e)&&(t.value=e.result),[3,3];case 2:return a(!1),[7];case 3:return[2]}})})()};return o(),function(e,n){var a=i,s=Ln,c=S;return H(),M(`div`,Oe,[k(`div`,tt,[P(a,{onClick:o},{default:Z(function(){return[N(G(e.$t(`Public.Btn.Refresh`)),1)]}),_:1})]),k(`div`,_t,[P(c,{class:`h-full`,show:q(r)},{default:Z(function(){return[P(s,{log:q(t)},null,8,[`log`])]}),_:1},8,[`show`])])])}}}),xa=Ca,R(),De={class:`p-20px`},Xi=L({__name:`index`,props:{type:{},row:{}},setup:function(e){var t=Y().t,n=e,r=n.row,a=n.type,o=F(),s=U({p:1,limit:10,keyword:``}),c=function(){return Q(function(){return $(this,function(e){switch(e.label){case 0:return s.p=1,[4,b()];case 1:return e.sent(),[2]}})})()},l=function(){if(!o.backupPath)throw Error(t(`Database.tools.index_35`));var e=``.concat(o.backupPath,`/database`);switch(a){case`pgsql`:return``.concat(e,`/pgsql`);case`mongodb`:return``.concat(e,`/mongodb`);default:return e}},u=function(){Ka({path:l(),uploadData:{multiple:!1,accept:o.type==`pgsql`?`.sql`:`.sql,.gz,.tar.gz,.zip`},onUploadSuccess:function(){b()}})},d=function(e){return Q(function(){return $(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),S(`import`),[4,ro(o.type,{file:e.path,name:r.name},!1)];case 1:return t.sent(),C(),[3,3];case 2:return t.sent(),C(),[3,3];case 3:return[2]}})})()},f=function(e){return Q(function(){return $(this,function(t){switch(t.label){case 0:return[4,xr({path:e.path})];case 1:return t.sent(),b(),o.setRefresh(!0),[2]}})})()},p=hs([{key:`name`,title:t(`Component.UploadFile.index_3`),ellipsis:{tooltip:{width:`trigger`}}},{key:`addtime`,title:t(`Database.tools.index_77`),width:150,render:function(e){return Lr(e.ctime)}},{key:`size`,title:t(`Database.tools.index_14`),width:100,render:function(e){return Gr(e.size)}},is({width:120,options:function(e){return[{label:t(`Waf.Setting.index_13`),onClick:function(){J({title:t(`Database.tools.index_17`),content:t(`Database.tools.index_36`),onConfirm:function(t){var n=t.hide;return Q(function(){return $(this,function(t){switch(t.label){case 0:return n(),[4,d(e)];case 1:return t.sent(),[2]}})})()}})}},{label:t(`Public.Btn.Del`),onClick:function(){J({title:``.concat(t(`Database.tools.index_37`),` [`,e.name,`]`),content:t(`Database.tools.index_38`,[e.name]),onConfirm:function(t){var n=t.hide;return Q(function(){return $(this,function(t){switch(t.label){case 0:return[4,f(e)];case 1:return t.sent(),n(),[2]}})})()}})}}]}})]),m=p.table,h=p.columns,g=function(){return{p:s.p,limit:s.limit,search:s.keyword,type_sql:a}},_=X(),v=_.loading,y=_.setLoading,b=function(){return Q(function(){var e;return $(this,function(t){switch(t.label){case 0:return t.trys.push([0,,2,3]),y(!0),[4,Jr(g())];case 1:return e=t.sent().message,z(e)&&(m.data=e.data,m.total=ci(e.page)),[3,3];case 2:return y(!1),[7];case 3:return[2]}})})()},x=null,S=function(e){o.type===`mysql`&&(x=os({data:{row:n.row,type:e},component:Sa}))},C=function(){x&&x.hide()},ee=function(){os({title:t(`Database.tools.index_78`),component:xa})};return b(),function(e,t){var n=i,r=zn,a=Gn,l=Kn,d=Un,f=Xn;return H(),M(`div`,De,[P(d,null,{toolsLeft:Z(function(){return[P(n,{onClick:u},{default:Z(function(){return[N(G(e.$t(`Database.tools.index_31`)),1)]}),_:1}),q(o).type===`mysql`?(H(),A(n,{key:0,onClick:ee},{default:Z(function(){return[N(G(e.$t(`Database.tools.index_78`)),1)]}),_:1})):j(``,!0)]}),toolsRight:Z(function(){return[P(r,{value:q(s).keyword,"onUpdate:value":t[0]||(t[0]=function(e){return q(s).keyword=e}),onSearch:c},null,8,[`value`])]}),table:Z(function(){return[P(a,{"max-height":348,loading:q(v),data:q(m).data,columns:q(h)},null,8,[`loading`,`data`,`columns`])]}),pageRight:Z(function(){return[P(l,{page:q(s).p,"onUpdate:page":t[1]||(t[1]=function(e){return q(s).p=e}),"page-size":q(s).limit,"onUpdate:pageSize":t[2]||(t[2]=function(e){return q(s).limit=e}),"item-count":q(m).total,onRefresh:b,showQuickJumper:!1},null,8,[`page`,`page-size`,`item-count`])]}),_:1}),P(f,{class:`mt-16px`},{default:Z(function(){return[k(`li`,null,G(e.$t(`Database.tools.index_32`))+` sql, zip, (tar.gz|gz|tgz)`,1),k(`li`,null,G(e.$t(`Database.tools.index_33`)),1),k(`li`,null,G(e.$t(`Database.tools.index_34`)),1)]}),_:1})])}}}),Ci=E({default:function(){return Si}}),Si=Xi,R(),Ee={class:`w-280px`},et={class:`w-280px`},Yi=L({__name:`index`,props:{data:{}},setup:function(e,t){var n=t.expose,r=Y().t,i=e.data.row,a=F(),o=W(null),s=U({name:i.username,password:i.password}),c={password:{trigger:[`blur`,`input`],validator:function(){return s.password?s.password.length<6?Error(r(`Database.form.index_20`)):!0:Error(r(`Database.form.index_17`))}}},l=function(){return Ms({id:i.id},K(s))};return n({onConfirm:function(){return Q(function(){var e,t,n;return $(this,function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),[4,(e=o.value)==null?void 0:e.validate()];case 1:return r.sent(),t=l(),[4,Da(a.type,t)];case 2:return r.sent(),a.setRefresh(!0),[3,4];case 3:return n=r.sent(),console.warn(n),[3,4];case 4:return[2]}})})()}}),function(e,t){var n=v,r=u,a=Pn,l=Mn;return H(),A(l,{ref_key:`formRef`,ref:o,model:q(s),rules:c,class:`px-20px pt-28px pb-8px`},{default:Z(function(){return[P(r,{label:e.$t(`Database.index_13`),path:`name`},{default:Z(function(){return[k(`div`,Ee,[P(n,{value:q(s).name,"onUpdate:value":t[0]||(t[0]=function(e){return q(s).name=e}),disabled:!0},null,8,[`value`])])]}),_:1},8,[`label`]),P(r,{label:e.$t(`Database.index_14`),path:`password`},{default:Z(function(){return[k(`div`,et,[P(a,{value:q(s).password,"onUpdate:value":t[1]||(t[1]=function(e){return q(s).password=e}),default:!q(i).password,"input-props":{name:`password`}},null,8,[`value`,`default`])])]}),_:1},8,[`label`])]}),_:1},8,[`model`])}}}),Ya=E({default:function(){return Ja}}),Ja=Yi,R(),R(),Te={class:`p-20px`},$e={class:`w-260px`},Ot={class:`w-260px`},zt={class:`w-260px`},qt={class:`w-260px`},Qt={class:`w-260px`},tn={key:0},Ir=L({__name:`form`,props:{data:{}},setup:function(e,t){var n=t.expose,r=Y().t,i=e.data,a=i.row,o=i.isEdit,s=F(),c=Uo(s).type,l=W(null),d=U({db_host:``,db_port:null,db_user:`root`,db_password:``,db_ps:``}),f={db_host:{trigger:[`blur`,`change`],validator:function(e,t){return t===``?Error(r(`Database.tools.index_53`)):!tr(t)&&!nr(t)?Error(r(`Database.tools.index_54`)):!0}},db_port:bs(),db_user:{required:!0,message:r(`Database.tools.index_55`),trigger:[`blur`,`change`]},db_password:{required:!0,message:r(`Database.tools.index_56`),trigger:[`blur`,`change`]}},p=function(e){d.db_ps=e},m=function(){var e=d.db_port;if(e===null)throw Error(r(`Database.tools.index_57`));return Ps(Ms({},K(d)),{db_port:e,type:c.value})},h=function(e){var t=e.hide;return Q(function(){var e,n;return $(this,function(r){switch(r.label){case 0:return[4,(e=l.value)==null?void 0:e.validate()];case 1:return r.sent(),n=m(),o&&a?[4,ka(c.value,Ms({id:a.id},n))]:[3,3];case 2:r.sent(),r.label=3;case 3:return o?[3,5]:[4,vn(c.value,n)];case 4:r.sent(),r.label=5;case 5:return s.getRemote(),t(),[2]}})})()},g=new Map([[`mysql`,{port:3306,username:`root`}],[`sqlserver`,{port:1433,username:`sa`}],[`redis`,{port:6379,username:`root`}],[`mongodb`,{port:27017,username:`root`}],[`pgsql`,{port:5432,username:`postgres`}]]);return function(){if(o&&a)d.db_host=``.concat(a.db_host),d.db_port=a.db_port,d.db_user=``.concat(a.db_user),d.db_password=``.concat(a.db_password),d.db_ps=``.concat(a.ps);else{var e=g.get(c.value);e&&(d.db_port=e.port,d.db_user=e.username)}}(),n({onConfirm:h}),function(e,t){var n=v,r=u,i=_,a=Mn,o=Xn;return H(),M(`div`,Te,[P(a,{ref_key:`formRef`,ref:l,model:q(d),rules:f},{default:Z(function(){return[P(r,{label:e.$t(`Database.tools.index_42`),path:`db_host`},{default:Z(function(){return[k(`div`,$e,[P(n,{value:q(d).db_host,"onUpdate:value":[t[0]||(t[0]=function(e){return q(d).db_host=e}),p],placeholder:e.$t(`Database.tools.index_43`),"input-props":{name:`host`}},null,8,[`value`,`placeholder`])])]}),_:1},8,[`label`]),P(r,{label:e.$t(`Docker.Container.create.index_7`),path:`db_port`},{default:Z(function(){return[k(`div`,Ot,[P(i,{value:q(d).db_port,"onUpdate:value":t[1]||(t[1]=function(e){return q(d).db_port=e}),min:1,max:65535,"show-button":!1,"input-props":{name:`port`},placeholder:e.$t(`Database.tools.index_44`)},null,8,[`value`,`placeholder`])])]}),_:1},8,[`label`]),q(c)===`redis`?j(``,!0):(H(),A(r,{key:0,label:e.$t(`Database.index_13`),path:`db_user`},{default:Z(function(){return[k(`div`,zt,[P(n,{value:q(d).db_user,"onUpdate:value":t[2]||(t[2]=function(e){return q(d).db_user=e}),placeholder:e.$t(`Database.tools.index_45`),"input-props":{name:`username`}},null,8,[`value`,`placeholder`])])]}),_:1},8,[`label`])),P(r,{label:e.$t(`Database.index_14`),path:`db_password`},{default:Z(function(){return[k(`div`,qt,[P(n,{value:q(d).db_password,"onUpdate:value":t[3]||(t[3]=function(e){return q(d).db_password=e}),placeholder:e.$t(`Database.tools.index_46`),"input-props":{name:`password`}},null,8,[`value`,`placeholder`])])]}),_:1},8,[`label`]),P(r,{label:`Notes`,path:`db_ps`,"show-feedback":!1},{default:Z(function(){return[k(`div`,Qt,[P(n,{value:q(d).db_ps,"onUpdate:value":t[4]||(t[4]=function(e){return q(d).db_ps=e}),placeholder:e.$t(`Database.tools.index_48`),"input-props":{name:`ps`}},null,8,[`value`,`placeholder`])])]}),_:1})]}),_:1},8,[`model`]),P(o,{class:`mt-24px`},{default:Z(function(){return[q(c)===`mysql`?(H(),M(`li`,tn,G(e.$t(`Database.tools.index_49`)),1)):j(``,!0),k(`li`,null,G(e.$t(`Database.tools.index_50`)),1),k(`li`,null,G(e.$t(`Database.tools.index_51`)),1),k(`li`,null,G(e.$t(`Database.tools.index_52`)),1)]}),_:1})])}}}),Nr=Ir,R(),Ce={class:`p-20px`},Qe={key:0},Ji=L({__name:`index`,setup:function(e){var t=Y().t,n=F(),r=Uo(n),a=r.type,o=r.remoteList,s=U({show:!1,title:t(`Database.tools.index_41`),data:{row:void 0,isEdit:!1}}),c=function(){s.data.row=void 0,s.data.isEdit=!1,s.title=t(`Database.tools.index_41`),s.show=!0},l=function(e){s.data.row=e,s.data.isEdit=!0,s.title=t(`Database.tools.index_58`),s.show=!0},u=function(e){return Q(function(){return $(this,function(t){switch(t.label){case 0:return[4,Ko(a.value,{sid:e.id})];case 1:return t.sent(),n.setRefresh(!0),[2]}})})()},d=function(e){return Q(function(){return $(this,function(t){switch(t.label){case 0:return[4,Er(a.value,{id:e.id})];case 1:return t.sent(),n.getRemote(),n.setRefresh(!0),n.setDelRemoteId(e.id),[2]}})})()},f=sr(function(){return o.value.filter(function(e){return e.id!==0})}),p=hs([{key:`db_host`,title:t(`Database.tools.index_42`)},{key:`db_port`,title:t(`Docker.Container.create.index_7`)},{key:`db_type`,title:t(`Database.tools.index_59`)},{key:`db_user`,title:t(`Database.index_13`)},Vs(),Hs(),is({width:n.type===`mysql`?150:100,options:function(e){return[{label:`Get DB`,show:e.db_type===`mysql`,onClick:function(){u(e)}},{label:t(`Public.Btn.Edit`),onClick:function(){l(e)}},{label:t(`Public.Btn.Del`),onClick:function(){J({title:``.concat(t(`Database.tools.index_60`),` [`,e.db_host,`]`),content:t(`Database.tools.index_61`),onConfirm:function(t){var n=t.hide;return Q(function(){return $(this,function(t){switch(t.label){case 0:return[4,d(e)];case 1:return t.sent(),n(),[2]}})})()}})}}]}})]).columns,m=X(),h=m.loading,g=m.setLoading;return function(){return Q(function(){return $(this,function(e){try{g(!0),n.getRemote()}finally{g(!1)}return[2]})})()}(),function(e,t){var n=i,r=Gn,o=Un,l=Xn,u=Rn;return H(),M(`div`,Ce,[P(o,null,{toolsLeft:Z(function(){return[P(n,{type:`primary`,onClick:c},{default:Z(function(){return[N(G(e.$t(`Database.tools.index_41`)),1)]}),_:1})]}),table:Z(function(){return[P(r,{loading:q(h),columns:q(p),data:q(f)},null,8,[`loading`,`columns`,`data`])]}),_:1}),P(l,{class:`mt-24px`},{default:Z(function(){return[q(a)===`mysql`?(H(),M(`li`,Qe,G(e.$t(`Database.tools.index_49`)),1)):j(``,!0),k(`li`,null,G(e.$t(`Database.tools.index_50`)),1),k(`li`,null,G(e.$t(`Database.tools.index_51`)),1),k(`li`,null,G(e.$t(`Database.tools.index_52`)),1)]}),_:1}),P(u,{show:q(s).show,"onUpdate:show":t[0]||(t[0]=function(e){return q(s).show=e}),title:q(s).title,width:460,footer:!0,data:q(s).data,component:Nr},null,8,[`show`,`title`,`data`])])}}}),oo=E({default:function(){return ao}}),ao=Ji,R(),Se={class:`px-20px pt-24px pb-8px`},Ze={class:`w-260px`},Ki=L({__name:`index`,setup:function(e,t){var n=t.expose,r=Y().t,i=F(),a=Uo(i).remoteList,o=W(null),s=U({sid:a.value.length>0?a.value[0].id:null}),c=sr(function(){return a.value.map(function(e){return{label:``.concat(e.ps||e.db_host,` (`,e.db_host,`)`),value:e.id}})}),l={sid:{trigger:`change`,validator:function(e,t){return t!==null||Error(r(`Database.tools.index_63`))}}},d=function(){var e=s.sid;if(e===null)throw V.error(r(`Database.tools.index_64`)),Error(r(`Database.tools.index_64`));return{sid:e}};return n({onConfirm:function(e){var t=e.hide;return Q(function(){var e,n,r;return $(this,function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),[4,(e=o.value)==null?void 0:e.validate()];case 1:return a.sent(),n=d(),[4,qo(i.type,n)];case 2:return a.sent(),i.setRefresh(!0),t(),[3,4];case 3:return r=a.sent(),console.error(r),[3,4];case 4:return[2]}})})()}}),function(e,t){var n=x,r=u,i=Mn;return H(),M(`div`,Se,[P(i,{ref_key:`formRef`,ref:o,model:q(s),rules:l},{default:Z(function(){return[P(r,{label:e.$t(`Database.tools.index_76`),path:`sid`},{default:Z(function(){return[k(`div`,Ze,[P(n,{value:q(s).sid,"onUpdate:value":t[0]||(t[0]=function(e){return q(s).sid=e}),class:`server-select`,options:q(c)},null,8,[`value`,`options`])])]}),_:1},8,[`label`])]}),_:1},8,[`model`])])}}}),lo=E({default:function(){return co}}),co=Ki,R(),xe={class:`px-20px pt-24px pb-8px`},Xe={class:`w-280px`},Gi=L({__name:`index`,setup:function(e,t){var n=t.expose,r=Y().t,i=F(),a=W(null),o=U({password:``}),s={password:{trigger:[`blur`,`input`],validator:function(){return o.password?o.password.length<6?Error(r(`Database.form.index_20`)):!0:Error(r(`Database.form.index_17`))}}},c=function(e){var t=e.hide;return Q(function(){var e;return $(this,function(n){switch(n.label){case 0:return[4,(e=a.value)==null?void 0:e.validate()];case 1:return n.sent(),[4,Oa(i.type,K(o))];case 2:return n.sent(),t(),[2]}})})()},l=X(),d=l.loading,f=l.setLoading;return function(){return Q(function(){var e;return $(this,function(t){switch(t.label){case 0:return t.trys.push([0,,2,3]),f(!0),[4,Xr(i.type)];case 1:return e=t.sent().message,z(e)&&(o.password=ma(e.result)?e.result:``),[3,3];case 2:return f(!1),[7];case 3:return[2]}})})()}(),n({onConfirm:c}),function(e,t){var n=Pn,r=u,i=Mn;return H(),M(`div`,xe,[P(i,{ref_key:`formRef`,ref:a,model:q(o),rules:s},{default:Z(function(){return[P(r,{label:e.$t(`Database.tools.index_75`),path:`password`},{default:Z(function(){return[k(`div`,Xe,[P(n,{value:q(o).password,"onUpdate:value":t[0]||(t[0]=function(e){return q(o).password=e}),loading:q(d),default:!1,"input-props":{name:`password`}},null,8,[`value`,`loading`])])]}),_:1},8,[`label`])]}),_:1},8,[`model`])])}}}),vo=E({default:function(){return _o}}),_o=Gi,R(),Wi=L({__name:`index`,setup:function(e){var t=fs(),n=F(),r=new Map([[`Database MySQL`,`mysql`],[`Database SqlServer`,`sqlserver`],[`Database MongoDB`,`mongodb`],[`Database Redis`,`redis`],[`Database PgSQL`,`pgsql`]]),i=function(e){n.resetPage(),n.setType(r.get(e.name)||`mysql`)};return function(){var e=String(t.name);n.setType(r.get(e)||`mysql`)}(),n.getConfig(),Wa(function(){n.resetPage()}),function(e,t){var n=Zn;return H(),A(n,{onChange:i})}}}),e(`o`,E({default:function(){return fr}})),fr=Wi,R(),be={class:`mr-4px`},Ui=L({__name:`index`,setup:function(e){var t=F(),n=Uo(t),r=n.type,i=n.install,a=n.isInstallPgsql,o=n.isInstallPgsqlManager,s=sr(function(){return r.value===`pgsql`?a.value:i.value}),c=function(){r.value===`pgsql`?o.value?ms({name:`pgsql_manager`,title:`pgsql_manager`,admin:!0}):as(`pgsql_manager`,function(){t.getConfig()}):as(r.value,function(){t.getRemote()})};return function(e,t){var n=In,i=Fn;return H(),A(i,{install:q(s)},{desc:Z(function(){return[k(`span`,be,G(e.$t(`Database.tools.index_39`))+`, `,1),q(r)===`sqlserver`?j(``,!0):(H(),M(d,{key:0},[P(n,{onClick:c},{default:Z(function(){return[N(G(e.$t(`Database.tools.index_40`)),1)]}),_:1}),t[0]||(t[0]=k(`span`,{class:`mx-4px`},`|`,-1))],64)),P(n,{onClick:q(Ws)},{default:Z(function(){return[N(G(e.$t(`Database.tools.index_41`)),1)]}),_:1},8,[`onClick`])]}),default:Z(function(){return[fo(e.$slots,`default`)]}),_:3},8,[`install`])}}}),fa=Ui,R(),ye={class:`w-120px`},Hi=L({__name:`index`,props:Ta({storeKey:{default:``},value:{},all:{type:Boolean,default:!0}},{value:{},valueModifiers:{}}),emits:Ta([`change`],[`update:value`]),setup:function(e,t){var n=t.emit,r=Y().t,i=e,a=n,o=sr(function(){var e=i.storeKey;return e?``.concat(e,`-select`):``}),s=cs(e,`value`),c=Uo(F()).remoteList,l=sr(function(){var e=c.value.map(function(e){return{label:e.ps||e.db_host,value:e.id}});return i.all&&e.unshift({label:r(`Public.All`),value:-1}),e}),u=function(e){o.value&&Oo(o.value,String(e)),a(`change`,e)};return function(){if(o.value){var e=$r(o.value);e&&(s.value=Number(e))}}(),function(e,t){var n=x;return H(),M(`div`,ye,[P(n,{value:s.value,"onUpdate:value":[t[0]||(t[0]=function(e){return s.value=e}),u],options:q(l)},null,8,[`value`,`options`])])}}}),so=Hi,R(),la(),cn=xi.global,Qo=cn.t,R(),ve={class:`w-240px`},Ye={class:`w-240px`},Dt={class:`w-240px`},Rt={class:`w-240px`},Kt={class:`ml-8px`},Vi=L({__name:`index`,props:{data:{}},setup:function(e,t){var n=t.expose,r=Y().t,i=e.data.status,a=F(),o=Uo(a).remoteList,s=W(null),c=U({sid:o.value.length>0?o.value[0].id:null,name:``,db_user:``,password:``,active:!1,ssl:``}),l=sr(function(){return o.value.map(function(e){return{label:``.concat(e.ps,` (`,e.db_host,`)`),value:e.id}})}),d={name:{required:!0,message:r(`Database.form.index_15`),trigger:[`blur`,`change`]},db_user:{required:!0,message:r(`Database.form.index_16`),trigger:[`blur`,`change`]},password:{required:!0,message:r(`Database.form.index_17`),trigger:[`blur`,`change`]},sid:{trigger:`change`,validator:function(e,t){return t!==null||Error(r(`Database.tools.index_64`))}}},f=function(e){c.db_user=e},p=function(){Us()},m=function(){var e=c.sid;if(e===null)throw V.error(r(`Database.tools.index_64`)),Error(r(`Database.tools.index_64`));return Ps(Ms({},K(c)),{sid:e,ps:c.name})};return n({onConfirm:function(e){var t=e.hide;return Q(function(){var e,n,r;return $(this,function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),[4,(e=s.value)==null?void 0:e.validate()];case 1:return i.sent(),n=m(),[4,pn(a.type,n)];case 2:return i.sent(),a.setRefresh(!0),t(),[3,4];case 3:return r=i.sent(),console.error(r),[3,4];case 4:return[2]}})})()}}),function(e,t){var n=v,r=u,a=Pn,o=x,m=In,h=Mn;return H(),A(h,{ref_key:`formRef`,ref:s,model:q(c),rules:d,class:`p-20px`},{default:Z(function(){return[P(r,{label:e.$t(`Database.index_12`),path:`name`},{default:Z(function(){return[k(`div`,ve,[P(n,{value:q(c).name,"onUpdate:value":[t[0]||(t[0]=function(e){return q(c).name=e}),f],placeholder:e.$t(`Database.form.index_2`)},null,8,[`value`,`placeholder`])])]}),_:1},8,[`label`]),Ss(P(r,{label:e.$t(`Database.index_13`),path:`db_user`},{default:Z(function(){return[k(`div`,Ye,[P(n,{value:q(c).db_user,"onUpdate:value":t[1]||(t[1]=function(e){return q(c).db_user=e}),placeholder:e.$t(`Database.form.index_4`)},null,8,[`value`,`placeholder`])])]}),_:1},8,[`label`]),[[ys,q(i)]]),Ss(P(r,{label:e.$t(`Database.index_14`),path:`password`},{default:Z(function(){return[k(`div`,Dt,[P(a,{value:q(c).password,"onUpdate:value":t[2]||(t[2]=function(e){return q(c).password=e})},null,8,[`value`])])]}),_:1},8,[`label`]),[[ys,q(i)]]),P(r,{label:e.$t(`Database.form.index_9`),path:`sid`},{default:Z(function(){return[k(`div`,Rt,[P(o,{value:q(c).sid,"onUpdate:value":t[3]||(t[3]=function(e){return q(c).sid=e}),options:q(l)},null,8,[`value`,`options`])]),k(`div`,Kt,[P(m,{onClick:p},{default:Z(function(){return[N(G(e.$t(`Database.form.index_10`)),1)]}),_:1})])]}),_:1},8,[`label`])]}),_:1},8,[`model`])}}}),vr=E({default:function(){return hr}}),hr=Vi,ln=xi.global,Zo=ln.t,R(),un=xi.global,Xo=un.t,R(),_e={class:`px-20px pt-24px pb-8px`},Je={class:`w-320px`},Bi=L({__name:`index`,setup:function(e,t){var n=t.expose,r=Y().t,i=W(null),a=U({password:``}),o={password:{required:!0,message:r(`Database.tools.index_65`),trigger:`blur`}},s=function(e){var t=e.hide;return Q(function(){var e,n;return $(this,function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),[4,(e=i.value)==null?void 0:e.validate()];case 1:return r.sent(),[4,Ao(K(a))];case 2:return r.sent(),t(),[3,4];case 3:return n=r.sent(),console.error(n),[3,4];case 4:return[2]}})})()},c=X(),l=c.loading,d=c.setLoading;return function(){return Q(function(){var e;return $(this,function(t){switch(t.label){case 0:return t.trys.push([0,,2,3]),d(!0),[4,ei()];case 1:return e=t.sent().message,z(e)&&(a.password=ma(e.root)?e.root:``),[3,3];case 2:return d(!1),[7];case 3:return[2]}})})()}(),n({onConfirm:s}),function(e,t){var n=Pn,r=u,s=Mn;return H(),M(`div`,_e,[P(s,{ref_key:`formRef`,ref:i,model:q(a),rules:o},{default:Z(function(){return[P(r,{label:e.$t(`Database.index_2`),path:`password`},{default:Z(function(){return[k(`div`,Je,[P(n,{value:q(a).password,"onUpdate:value":t[0]||(t[0]=function(e){return q(a).password=e}),loading:q(l),default:!1},null,8,[`value`,`loading`])])]}),_:1},8,[`label`])]}),_:1},8,[`model`])])}}}),go=Bi,R(),ge={class:`px-20px py-24px`},zi=L({__name:`index`,props:{data:{}},setup:function(e){var t=e.data,n=t.status,r=t.getInfo,i=U({status:n}),a=function(){return Q(function(){return $(this,function(e){switch(e.label){case 0:return[4,ko(K(i))];case 1:return e.sent(),r==null||r(),[2]}})})()};return function(e,t){var n=C,r=u,o=Mn,s=Xn;return H(),M(`div`,ge,[P(o,{"label-width":`160`},{default:Z(function(){return[P(r,{label:e.$t(`Database.mongo.index_1`),"show-feedback":!1},{default:Z(function(){return[P(n,{value:q(i).status,"onUpdate:value":[t[0]||(t[0]=function(e){return q(i).status=e}),a],"checked-value":1},null,8,[`value`])]}),_:1},8,[`label`])]}),_:1}),P(s,{class:`mt-16px`},{default:Z(function(){return[k(`li`,null,G(e.$t(`Database.mongo.index_2`)),1)]}),_:1})])}}}),yo=zi,R(),la(),he={class:`p-16px`},Ri=L({__name:`index`,setup:function(e){var t=Y().t,n=I(function(){return D(function(){return Promise.resolve().then(function(){return vr})},void 0)}),r=F(),o=ss(t(`Database.mongo.index_4`),{status:!1}),c=function(){o.data.status=x.authorization===`enabled`,o.show=!0},l=ss(t(`Database.tools.index_70`)),u=function(){x.authorization===`enabled`?l.show=!0:(f(),V.warning(t(`Database.mongo.index_5`)))},d=ss(t(`Database.mongo.index_1`),{status:0}),f=function(){d.data.status=+(x.authorization===`enabled`),d.data.getInfo=S,d.show=!0},p=function(){Us()},m=function(e){Zs(e?{type:`mongo`,username:e.username,password:e.password,db:e.name}:{type:`mongo`})},h=function(){return Q(function(){return $(this,function(e){switch(e.label){case 0:return[4,Go(r.type,{ids:[]})];case 1:return e.sent(),O(),[2]}})})()},g=hs([{type:`selection`,width:40},ec(),tc(),nc(),rc(),ic(),ds({onBlur:function(e,t){return Q(function(){return $(this,function(n){switch(n.label){case 0:return[4,Do({id:t.id,ps:e})];case 1:return n.sent(),[2]}})})()}}),is({width:200,options:function(e){return[{label:`Adminer`,show:e.db_type===0,onClick:function(){m(e)}},{label:`Password`,onClick:function(){Ys(e)}},{label:t(`Public.Btn.Del`),onClick:function(){Xs([e])}}]}})]),_=g.keys,v=g.table,y=g.columns,b=[{key:`sync`,label:t(`Database.index_24`),onBatch:function(e){J({title:t(`Database.index_25`),content:t(`Database.index_26`),onConfirm:function(t){var n=t.hide;return Q(function(){return $(this,function(t){switch(t.label){case 0:return[4,Go(r.type,{ids:e.map(function(e){return e.id})})];case 1:return t.sent(),n(),[2]}})})()}})}},{key:`backup`,type:`confirm`,label:t(`Database.index_27`),confirm:{title:t(`Database.index_28`),desc:t(`Database.index_29`),api:function(e){return es(r.type,{id:e.id},!1)},done:function(){O()},columns:[{key:`name`,title:t(`Database.index_12`)}]}},{key:`delete`,label:t(`Database.index_30`),onBatch:function(e){Xs(e)}}],x=U({authorization:``,msg:``,port:``,root:``}),S=function(){return Q(function(){var e;return $(this,function(t){switch(t.label){case 0:return[4,ei()];case 1:return e=t.sent().message,z(e)&&(x.authorization=e.authorization,x.msg=e.msg,x.port=e.port,x.root=e.root),[2]}})})()},C=X(),ee=C.loading,w=C.setLoading,T=U({p:1,limit:10,sid:-1,search:``}),E=function(){var e=Ms({},K(T));return e.sid===-1&&delete e.sid,e},O=function(){return Q(function(){var e;return $(this,function(t){switch(t.label){case 0:return t.trys.push([0,,2,3]),w(!0),[4,Yr(r.type,E())];case 1:return e=t.sent().message,z(e)?(v.data=pa(e.data)?e.data:[],v.total=ci(e.page)):(v.data=[],v.total=0),[3,3];case 2:return _.value=[],w(!1),[7];case 3:return[2]}})})()};return xs(function(){return r.isRefresh},function(e){e&&(r.setRefresh(!1),r.delRemoteId===T.sid&&(T.sid=-1),O())}),function(){return Q(function(){return $(this,function(e){switch(e.label){case 0:return[4,r.getRemote()];case 1:return e.sent(),r.install?(O(),S()):ba(),[2]}})})()}(),function(e,t){var g=i,x=s,S=Bn,C=zn,w=Gn,E=Hn,D=Kn,te=Un,ne=Rn,re=a;return H(),A(q(fa),null,{default:Z(function(){return[P(re,null,{default:Z(function(){return[k(`div`,he,[P(te,{feedback:!0},{toolsLeft:Z(function(){return[P(g,{type:`primary`,onClick:c},{default:Z(function(){return[N(G(e.$t(`Database.index_1`)),1)]}),_:1}),P(g,{onClick:u},{default:Z(function(){return[N(G(e.$t(`Database.index_2`)),1)]}),_:1}),P(g,{onClick:f},{default:Z(function(){return[N(G(e.$t(`Database.mongo.index_1`)),1)]}),_:1}),P(g,{onClick:t[0]||(t[0]=function(e){return m()})},{default:Z(function(){return Is(t[10]||(t[10]=[N(` Adminer `,-1)]))}),_:1}),P(g,{onClick:p},{default:Z(function(){return[N(G(e.$t(`Database.index_4`)),1)]}),_:1}),P(x,{class:`mx-0!`,vertical:``}),P(g,{onClick:h},{default:Z(function(){return[N(G(e.$t(`Database.index_5`)),1)]}),_:1}),P(g,{onClick:q(Ks)},{default:Z(function(){return[N(G(e.$t(`Database.index_6`)),1)]}),_:1},8,[`onClick`]),q(r).isInstallMongoDB?(H(),A(S,{key:0,"soft-name":`mongodb`})):j(``,!0)]}),toolsRight:Z(function(){return[P(q(so),{value:q(T).sid,"onUpdate:value":t[1]||(t[1]=function(e){return q(T).sid=e}),"store-key":`database-mongo-page`,onChange:O},null,8,[`value`]),P(C,{value:q(T).search,"onUpdate:value":t[2]||(t[2]=function(e){return q(T).search=e}),placeholder:e.$t(`Database.mongo.index_3`),onSearch:O},null,8,[`value`,`placeholder`])]}),table:Z(function(){return[P(w,{"checked-row-keys":q(_),"onUpdate:checkedRowKeys":t[3]||(t[3]=function(e){return B(_)?_.value=e:null}),loading:q(ee),data:q(v).data,columns:q(y)},null,8,[`checked-row-keys`,`loading`,`data`,`columns`])]}),pageLeft:Z(function(){return[P(E,{"checked-row-keys":q(_),"onUpdate:checkedRowKeys":t[4]||(t[4]=function(e){return B(_)?_.value=e:null}),data:q(v).data,options:b},null,8,[`checked-row-keys`,`data`])]}),pageRight:Z(function(){return[P(D,{page:q(T).p,"onUpdate:page":t[5]||(t[5]=function(e){return q(T).p=e}),"page-size":q(T).limit,"onUpdate:pageSize":t[6]||(t[6]=function(e){return q(T).limit=e}),"store-key":`database-mongo-page`,"item-count":q(v).total,onRefresh:O},null,8,[`page`,`page-size`,`item-count`])]}),_:1}),P(ne,{show:q(o).show,"onUpdate:show":t[7]||(t[7]=function(e){return q(o).show=e}),title:q(o).title,width:540,minHeight:176,footer:!0,data:q(o).data,component:q(n)},null,8,[`show`,`title`,`data`,`component`]),P(ne,{show:q(l).show,"onUpdate:show":t[8]||(t[8]=function(e){return q(l).show=e}),title:q(l).title,width:520,footer:!0,component:go},null,8,[`show`,`title`]),P(ne,{show:q(d).show,"onUpdate:show":t[9]||(t[9]=function(e){return q(d).show=e}),title:q(d).title,width:400,data:q(d).data,component:yo},null,8,[`show`,`title`,`data`])])]}),_:1})]}),_:1})}}}),e(`a`,E({default:function(){return Aa}})),Aa=Ri,R(),y=function(e){var t=e.row;if(t.password)return P(qn,{value:t.password},null);var n=Y().t;return P(`div`,{class:`text-desc cursor-pointer`,onClick:function(){Ys(t)}},[P(m,{keypath:`Database.index_15.index_1`,tag:`span`,scope:`global`},{error:function(){return P(`span`,{class:`text-error`},[n(`Database.index_15.index_2`)])}})])},r=function(e){var t=e.row,n,r=Y().t;return P(`div`,{class:`flex items-center`},[P(In,{type:t.backup_count>0?`primary`:`warning`,class:`backup-btn`,onClick:function(){qs(t)}},{default:function(){return[t.backup_count>0?r(`Database.index_17`,[t.backup_count]):r(`Database.index_18`)]}}),P(`span`,{class:`mx-4px`},[N(`|`)]),P(In,{onClick:function(){Js(t,`mysql`)}},ac(n=r(`Public.Btn.Import`))?n:{default:function(){return[n]}})])},R(),me={key:1},Li=L({__name:`index`,setup:function(e){var t=W(!1),r=ps(),i=function(){r.push(`/crontab/task`)},a=function(e){return Q(function(){return $(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,Mo({name:`mysql`,status:+!!e})];case 1:return n.sent(),[3,3];case 2:return n.sent(),t.value=!e,[3,3];case 3:return[2]}})})()},o=X(),s=o.loading,c=o.setLoading;return function(){return Q(function(){var e;return $(this,function(n){switch(n.label){case 0:return n.trys.push([0,,2,3]),c(!0),[4,ni({name:`mysql`})];case 1:return e=n.sent().message,z(e)&&(t.value=!!e.status),[3,3];case 2:return c(!1),[7];case 3:return[2]}})})()}(),function(e,r){var o=Nn,c=C,u=In,d=l,f=n;return H(),A(f,{"show-icon":!1,closable:!1},{default:Z(function(){return[P(d,{class:`h-24px items-center`},{default:Z(function(){return[P(o,{name:`base-info`,size:`18`}),N(` `+G(e.$t(`Database.Mysql.index_1`)),1),P(c,{size:`small`,loading:q(s),value:q(t),"onUpdate:value":[r[0]||(r[0]=function(e){return B(t)?t.value=e:null}),a]},null,8,[`loading`,`value`]),q(t)?(H(),A(u,{key:0,onClick:i},{default:Z(function(){return[N(`[`+G(e.$t(`Database.index_7.index_2`))+`]`,1)]}),_:1})):(H(),M(`span`,me,G(e.$t(`Database.Mysql.index_2`)),1))]}),_:1})]}),_:1})}}}),Ia=Li,R(),la(),fe={class:`p-16px`},Fi=L({__name:`index`,setup:function(e){var n=I(function(){return D(function(){return Promise.resolve().then(function(){return Na})},void 0)}),o=I(function(){return D(function(){return Promise.resolve().then(function(){return Qa})},void 0)}),s=I(function(){return D(function(){return Promise.resolve().then(function(){return Ra})},void 0)}),c=I(function(){return D(function(){return Promise.resolve().then(function(){return Fa})},void 0)}),l=I(function(){return D(function(){return Promise.resolve().then(function(){return vs})},void 0)}),u=I(function(){return D(function(){return t.import(`./view-files-legacy.js?v=1787646744133`).then(function(e){return e.n})},void 0)}),d=Y().t,f=F(),p=W(!1),m=ss(),h=ss(d(`Database.index_3`),{row:void 0}),g=function(){m.show=!0},_=function(){Gs()},v=function(e){f.phpmyadmin.setup?(e?(h.data.row=e,h.title=d(`Database.index_8`,[e.name])):(h.data.row=void 0,h.title=d(`Database.index_3`)),h.show=!0):V.error(d(`Database.index_9`))},b=function(){Us()},x=function(){os({title:d(`file.recycle.title`),width:1100,height:686,data:{activeTab:`db`},component:u})},S=ss(d(`Database.Mysql.index_3`)),C=ss(),ee=function(e){C.data.row=e,C.title=d(`Database.index_10`,[e.name]),C.show=!0},w=ss(),T=function(e){w.data.row=e,w.title=d(`Database.index_11`,[e.name]),w.show=!0},E=function(){return Q(function(){return $(this,function(e){switch(e.label){case 0:return[4,Go(f.type,{ids:[]})];case 1:return e.sent(),ue(),[2]}})})()},O=hs([{type:`selection`,width:40},{key:`name`,title:d(`Database.index_12`),width:`10%`,minWidth:100,ellipsis:{tooltip:{width:`trigger`}}},{key:`username`,title:d(`Database.index_13`),width:`10%`,minWidth:100,ellipsis:{tooltip:{width:`trigger`}}},{key:`password`,title:d(`Database.index_14`),width:`10%`,minWidth:120,render:function(e){return P(y,{row:e},null)}},us({type:`database`,width:`5%`,maxWidth:60,callback:function(){ue()}}),{key:`backup_count`,title:d(`Database.index_16`),width:`10%`,minWidth:120,render:function(e){return P(r,{row:e},null)}},{key:`sid`,title:d(`Database.index_19`),width:`8%`,minWidth:80,ellipsis:{tooltip:!0},render:function(e){return Qs(e)}},ds({minWidth:90,onBlur:function(e,t){return Q(function(){return $(this,function(n){switch(n.label){case 0:return[4,Do({id:t.id,ps:e})];case 1:return n.sent(),[2]}})})()}}),is({width:`30%`,minWidth:280,options:function(e){return[{label:d(`Database.index_20`),show:e.db_type===0,onClick:function(){v(e)}},{label:d(`Database.index_21`),class:`permission-btn`,onClick:function(){T(e)}},{label:d(`Database.index_22`),class:`tools-btn`,onClick:function(){ee(e)}},{label:d(`Database.index_23`),class:`change-btn`,onClick:function(){Ys(e)}},{label:d(`Public.Btn.Del`),class:`delete-btn`,onClick:function(){Xs([e])}}]}})]),te=O.keys,ne=O.table,re=O.columns,ie=[{key:`sync`,label:d(`Database.index_24`),onBatch:function(e){J({title:d(`Database.index_25`),content:d(`Database.index_26`),onConfirm:function(){return Q(function(){return $(this,function(t){switch(t.label){case 0:return[4,Go(f.type,{ids:e.map(function(e){return e.id})})];case 1:return t.sent(),[2]}})})()}})}},{key:`backup`,type:`confirm`,label:d(`Database.index_27`),confirm:{title:d(`Database.index_28`),desc:d(`Database.index_29`),api:function(e){return es(f.type,{id:e.id},!1)},done:function(){ue()},columns:[{key:`name`,title:d(`Database.index_12`)}]}},{key:`delete`,label:d(`Database.index_30`),onBatch:function(e){Xs(e)}}],ae=X(!0),oe=ae.loading,se=ae.setLoading,ce=U({p:1,limit:20,sid:-1,search:``}),le=function(){var e=Ms({},K(ce));return e.sid===-1&&delete e.sid,e},ue=function(){return Q(function(){var e;return $(this,function(t){switch(t.label){case 0:return t.trys.push([0,,2,3]),se(!0),[4,ri(le())];case 1:return e=t.sent().message,z(e)?(ne.data=pa(e.data)?e.data:[],ne.total=ci(e.page)):(ne.data=[],ne.total=0),[3,3];case 2:return te.value=[],se(!1),[7];case 3:return[2]}})})()};return xs(function(){return f.isRefresh},function(e){e&&(f.setRefresh(!1),f.delRemoteId===ce.sid&&(ce.sid=-1),ue())}),function(){return Q(function(){return $(this,function(e){switch(e.label){case 0:return e.trys.push([0,,2,3]),[4,f.getRemote()];case 1:return e.sent(),f.install?(p.value=!0,ue()):(p.value=!1,ba()),[3,3];case 2:return se(!1),[7];case 3:return[2]}})})()}(),function(e,t){var r=i,u=Nn,d=Bn,f=zn,y=Gn,ee=Hn,T=Kn,D=Un,O=Rn,ae=a;return H(),A(q(fa),null,{default:Z(function(){return[P(ae,null,{default:Z(function(){return[k(`div`,fe,[P(Ia),P(D,{class:`mt-16px`,feedback:!0},{toolsLeft:Z(function(){return[P(r,{class:`add-db-btn`,type:`primary`,onClick:g},{default:Z(function(){return[N(G(e.$t(`Database.index_1`)),1)]}),_:1}),P(r,{class:`set-root-btn`,onClick:_},{default:Z(function(){return[N(G(e.$t(`Database.index_2`)),1)]}),_:1}),P(r,{onClick:t[0]||(t[0]=function(e){return v()})},{default:Z(function(){return[N(G(e.$t(`Database.index_3`)),1)]}),_:1}),P(r,{onClick:b},{default:Z(function(){return[N(G(e.$t(`Database.index_4`)),1)]}),_:1}),P(r,{onClick:t[1]||(t[1]=function(e){return q(S).show=!0})},{default:Z(function(){return[N(G(e.$t(`Database.Mysql.index_3`)),1)]}),_:1}),P(r,{onClick:E},{default:Z(function(){return[N(G(e.$t(`Database.index_5`)),1)]}),_:1}),P(r,{onClick:q(Ks)},{default:Z(function(){return[N(G(e.$t(`Database.index_6`)),1)]}),_:1},8,[`onClick`]),q(p)?(H(),A(r,{key:0,onClick:x},{icon:Z(function(){return[P(u,{name:`file-recycling-bin`,size:`14`})]}),default:Z(function(){return[N(` `+G(e.$t(`file.recycleBin`)),1)]}),_:1})):j(``,!0),q(p)?(H(),A(d,{key:1,"soft-name":`mysql`})):j(``,!0)]}),toolsRight:Z(function(){return[P(q(so),{ref:`remoteRef`,value:q(ce).sid,"onUpdate:value":t[2]||(t[2]=function(e){return q(ce).sid=e}),"store-key":`mysql-remote`,onChange:ue},null,8,[`value`]),P(f,{value:q(ce).search,"onUpdate:value":t[3]||(t[3]=function(e){return q(ce).search=e}),placeholder:e.$t(`Database.mongo.index_3`),width:`180`,onSearch:ue},null,8,[`value`,`placeholder`])]}),table:Z(function(){return[P(y,{"checked-row-keys":q(te),"onUpdate:checkedRowKeys":t[4]||(t[4]=function(e){return B(te)?te.value=e:null}),loading:q(oe),data:q(ne).data,columns:q(re)},null,8,[`checked-row-keys`,`loading`,`data`,`columns`])]}),pageLeft:Z(function(){return[P(ee,{"checked-row-keys":q(te),"onUpdate:checkedRowKeys":t[5]||(t[5]=function(e){return B(te)?te.value=e:null}),data:q(ne).data,options:ie},null,8,[`checked-row-keys`,`data`])]}),pageRight:Z(function(){return[P(T,{page:q(ce).p,"onUpdate:page":t[6]||(t[6]=function(e){return q(ce).p=e}),"page-size":q(ce).limit,"onUpdate:pageSize":t[7]||(t[7]=function(e){return q(ce).limit=e}),"store-key":`database-mysql-page`,"item-count":q(ne).total,onRefresh:ue},null,8,[`page`,`page-size`,`item-count`])]}),_:1}),P(O,{show:q(m).show,"onUpdate:show":t[8]||(t[8]=function(e){return q(m).show=e}),title:e.$t(`Database.mongo.index_4`),width:540,"min-height":334,footer:!0,component:q(n)},null,8,[`show`,`title`,`component`]),P(O,{show:q(h).show,"onUpdate:show":t[9]||(t[9]=function(e){return q(h).show=e}),title:q(h).title,data:q(h).data,width:740,height:580,component:q(o)},null,8,[`show`,`title`,`data`,`component`]),P(O,{show:q(w).show,"onUpdate:show":t[10]||(t[10]=function(e){return q(w).show=e}),data:q(w).data,title:q(w).title,width:480,"min-height":132,footer:!0,component:q(c)},null,8,[`show`,`data`,`title`,`component`]),P(O,{show:q(C).show,"onUpdate:show":t[11]||(t[11]=function(e){return q(C).show=e}),data:q(C).data,title:q(C).title,width:870,"min-height":359,component:q(s)},null,8,[`show`,`data`,`title`,`component`]),P(O,{show:q(S).show,"onUpdate:show":t[12]||(t[12]=function(e){return q(S).show=e}),title:q(S).title,width:850,"min-height":600,component:q(l)},null,8,[`show`,`title`,`component`])])]}),_:1})]}),_:1})}}}),e(`i`,E({default:function(){return ja}})),ja=Fi,R(),de={class:`w-240px`},qe={class:`w-100px ml-8px`},Et={class:`w-240px`},Lt={class:`w-240px`},Gt={class:`w-240px`},Zt={class:`w-240px`},en={class:`w-240px`},rn={class:`ml-8px`},Pi=L({__name:`index`,setup:function(e,t){var n=t.expose,r=Y().t,i=F(),a=Uo(i).remoteList,o=W(null),s=U({sid:a.value.length>0?a.value[0].id:null,name:``,codeing:`utf8mb4`,db_user:``,password:``,dataAccess:`127.0.0.1`,address:`127.0.0.1`,active:!1,ssl:``}),c=W([{label:`utf-8`,value:`utf8`},{label:`utf8mb4`,value:`utf8mb4`},{label:`gbk`,value:`gbk`},{label:`big5`,value:`big5`}]),l=W([{label:r(`Database.form.index_12`),value:`127.0.0.1`},{label:r(`Database.form.index_13`),value:`%`},{label:r(`Database.form.index_14`),value:`ip`}]),d=sr(function(){return a.value.map(function(e){return{label:``.concat(e.ps,` (`,e.db_host,`)`),value:e.id}})}),f={name:{required:!0,message:r(`Database.form.index_15`),trigger:[`blur`,`change`]},db_user:{required:!0,message:r(`Database.form.index_16`),trigger:[`blur`,`change`]},password:{required:!0,message:r(`Database.form.index_17`),trigger:[`blur`,`change`]},sid:{trigger:`change`,validator:function(e,t){return t!==null||Error(r(`Database.form.index_18`))}}},p=function(e){s.db_user=e},m=function(e){e===`ip`?s.address=``:s.address=e},h=function(){Us()},g=function(){var e=K(s),t=e.sid;if(t===null)throw V.error(r(`Database.form.index_18`)),Error(r(`Database.form.index_18`));return Ps(Ms({},e),{sid:t,ps:e.name,dtype:`MySQL`,address:s.dataAccess===`ip`?s.address.trim().split(`
|
|
`).join(`,`):s.address})};return n({onConfirm:function(){return Q(function(){var e,t;return $(this,function(n){switch(n.label){case 0:return[4,(e=o.value)==null?void 0:e.validate()];case 1:n.sent(),n.label=2;case 2:return n.trys.push([2,4,,5]),[4,mn(g())];case 3:return n.sent(),i.setRefresh(!0),[3,5];case 4:return t=n.sent(),console.warn(t),[3,5];case 5:return[2]}})})()}}),function(e,t){var n=v,r=x,i=u,a=Pn,g=In,_=Mn;return H(),A(_,{ref_key:`formRef`,ref:o,model:q(s),rules:f,class:`p-20px`},{default:Z(function(){return[P(i,{label:e.$t(`Database.form.index_1`),path:`name`},{default:Z(function(){return[k(`div`,de,[P(n,{value:q(s).name,"onUpdate:value":[t[0]||(t[0]=function(e){return q(s).name=e}),p],placeholder:e.$t(`Database.form.index_2`),"input-props":{name:`name`}},null,8,[`value`,`placeholder`])]),k(`div`,qe,[P(r,{value:q(s).codeing,"onUpdate:value":t[1]||(t[1]=function(e){return q(s).codeing=e}),class:`code-select`,options:q(c)},null,8,[`value`,`options`])])]}),_:1},8,[`label`]),P(i,{label:e.$t(`Database.form.index_3`),path:`db_user`},{default:Z(function(){return[k(`div`,Et,[P(n,{value:q(s).db_user,"onUpdate:value":t[2]||(t[2]=function(e){return q(s).db_user=e}),placeholder:e.$t(`Database.form.index_4`),"input-props":{name:`username`}},null,8,[`value`,`placeholder`])])]}),_:1},8,[`label`]),P(i,{label:e.$t(`Database.form.index_5`),path:`password`},{default:Z(function(){return[k(`div`,Lt,[P(a,{value:q(s).password,"onUpdate:value":t[3]||(t[3]=function(e){return q(s).password=e}),placeholder:``,"input-props":{name:`password`}},null,8,[`value`])])]}),_:1},8,[`label`]),P(i,{label:e.$t(`Database.form.index_6`),path:`dataAccess`},{default:Z(function(){return[k(`div`,Gt,[P(r,{value:q(s).dataAccess,"onUpdate:value":[t[4]||(t[4]=function(e){return q(s).dataAccess=e}),m],class:`access-select`,options:q(l)},null,8,[`value`,`options`])])]}),_:1},8,[`label`]),q(s).dataAccess===`ip`?(H(),A(i,{key:0,label:e.$t(`Database.form.index_7`),path:`address`},{default:Z(function(){return[k(`div`,Zt,[P(n,{value:q(s).address,"onUpdate:value":t[5]||(t[5]=function(e){return q(s).address=e}),type:`textarea`,autosize:{minRows:3,maxRows:3},"input-props":{name:`address`},placeholder:e.$t(`Database.form.index_8`)},null,8,[`value`,`placeholder`])])]}),_:1},8,[`label`])):j(``,!0),P(i,{label:e.$t(`Database.form.index_9`),path:`sid`},{default:Z(function(){return[k(`div`,en,[P(r,{value:q(s).sid,"onUpdate:value":t[6]||(t[6]=function(e){return q(s).sid=e}),class:`sid-select`,options:q(d)},null,8,[`value`,`options`])]),k(`div`,rn,[P(g,{onClick:h},{default:Z(function(){return[N(G(e.$t(`Database.form.index_10`)),1)]}),_:1})])]}),_:1},8,[`label`]),j(``,!0)]}),_:1},8,[`model`])}}}),Na=E({default:function(){return Ma}}),Ma=Pi,R(),ue={class:`w-280px`},Ke={class:`w-280px`},Ni=L({__name:`index`,props:{row:{}},setup:function(e,t){var n=t.expose,r=e.row,i=Y().t,a=W(null),o=U({dataAccess:`127.0.0.1`,access:`127.0.0.1`,ssl:``}),s=W([{label:i(`Database.form.index_12`),value:`127.0.0.1`},{label:i(`Database.form.index_13`),value:`%`},{label:i(`Database.form.index_14`),value:`ip`}]),c={host:{trigger:[`blur`,`change`],validator:function(){return o.dataAccess!==`ip`||o.access.trim()!==``||Error(i(`Database.form.index_19`))}}},l=function(e){e===`ip`?o.access=``:o.access=e},d=function(){return Ps(Ms({},K(o)),{name:r.username,access:o.dataAccess===`ip`?o.access.trim().split(`
|
|
`).join(`,`):o.access})};return function(){return Q(function(){var e;return $(this,function(t){switch(t.label){case 0:return[4,ti({name:r.name})];case 1:return e=t.sent().message,z(e)&&(e.permission!==`127.0.0.1`&&e.permission!==`%`?(o.dataAccess=`ip`,o.access=e.permission.split(`,`).join(`
|
|
`)):(o.dataAccess=e.permission,o.access=e.permission),o.ssl=ma(e.ssl)?e.ssl:``),[2]}})})()}(),n({onConfirm:function(){return Q(function(){var e;return $(this,function(t){switch(t.label){case 0:return[4,(e=a.value)==null?void 0:e.validate()];case 1:return t.sent(),jo(K(d())),[2]}})})()}}),function(e,t){var n=x,r=u,i=v,d=Mn;return H(),A(d,{ref_key:`formRef`,ref:a,model:q(o),rules:c,class:`px-20px py-24px`},{default:Z(function(){return[P(r,{label:e.$t(`Database.form.index_6`),path:`listen_ip`},{default:Z(function(){return[k(`div`,ue,[P(n,{value:q(o).dataAccess,"onUpdate:value":[t[0]||(t[0]=function(e){return q(o).dataAccess=e}),l],class:`permission-select`,options:q(s)},null,8,[`value`,`options`])])]}),_:1},8,[`label`]),q(o).dataAccess===`ip`?(H(),A(r,{key:0,label:e.$t(`Database.form.index_7`),path:`host`},{default:Z(function(){return[k(`div`,Ke,[P(i,{value:q(o).access,"onUpdate:value":t[1]||(t[1]=function(e){return q(o).access=e}),type:`textarea`,autosize:{minRows:3,maxRows:3},"input-props":{name:`address`},placeholder:e.$t(`Database.form.index_8`)},null,8,[`value`,`placeholder`])])]}),_:1},8,[`label`])):j(``,!0),j(``,!0)]}),_:1},8,[`model`])}}}),Fa=E({default:function(){return Pa}}),Pa=Ni,R(),Co=L({__name:`server`,props:{value:{},valueModifiers:{}},emits:[`update:value`],setup:function(e,t){var n=t.expose,r=cs(e,`value`),i=W([]),a=X(),o=a.loading,s=a.setLoading,c=function(){return Q(function(){var e;return $(this,function(t){switch(t.label){case 0:return t.trys.push([0,,2,3]),s(!0),[4,_i({type:`mysql`})];case 1:return e=t.sent().message,pa(e)&&(i.value=e.map(function(e){return{label:e.ps,value:e.id}})),[3,3];case 2:return s(!1),[7];case 3:return[2]}})})()};return c(),n({getType:c}),function(e,t){var n=x;return H(),A(n,Ea(e.$attrs,{value:r.value,"onUpdate:value":t[0]||(t[0]=function(e){return r.value=e}),options:q(i),loading:q(o)}),null,16,[`value`,`options`,`loading`])}}}),So=Co,R(),le={class:`p-16px`},Mi=L({__name:`index`,props:{data:{}},setup:function(e,t){var n=t.expose,r=Y().t,i=e.data.getList,a=W(null),o=U({sid:0,username:``,password:fi(10),host:`127.0.0.1`,ip:``}),s={username:{required:!0,message:r(`Config.Panel.index_60`),trigger:[`blur`,`input`]},password:{required:!0,message:r(`Config.Panel.index_67`),trigger:[`blur`,`input`]},ip:{trigger:[`blur`,`input`],validator:function(){return o.host===`ip`&&o.ip===``?Error(r(`Database.Mysql.index_6`)):!0}}},c=W([{label:r(`Database.form.index_13`),value:`%`},{label:r(`Database.form.index_12`),value:`127.0.0.1`},{label:r(`Database.form.index_14`),value:`ip`}]),d=function(){return{sid:o.sid,username:o.username,password:o.password,host:o.host===`ip`?o.ip:o.host,db_name:`*`,tb_name:`*`}};return n({onConfirm:function(){return Q(function(){var e;return $(this,function(t){switch(t.label){case 0:return[4,(e=a.value)==null?void 0:e.validate()];case 1:return t.sent(),[4,gn(d())];case 2:return t.sent(),i==null||i(),[2]}})})()}}),function(e,t){var n=u,r=v,i=x,d=l,f=Mn;return H(),M(`div`,le,[P(f,{ref_key:`formRef`,ref:a,model:q(o),rules:s},{default:Z(function(){return[P(n,{label:e.$t(`Database.Mysql.index_5`),path:`server`},{default:Z(function(){return[P(So,{class:`w-200px`,value:q(o).sid,"onUpdate:value":t[0]||(t[0]=function(e){return q(o).sid=e})},null,8,[`value`])]}),_:1},8,[`label`]),P(n,{label:e.$t(`Database.index_13`),path:`username`},{default:Z(function(){return[P(r,{class:`w-350px!`,value:q(o).username,"onUpdate:value":t[1]||(t[1]=function(e){return q(o).username=e}),placeholder:e.$t(`Config.Panel.index_60`)},null,8,[`value`,`placeholder`])]}),_:1},8,[`label`]),P(n,{label:e.$t(`Database.index_14`),path:`password`},{default:Z(function(){return[P(r,{class:`w-350px!`,value:q(o).password,"onUpdate:value":t[2]||(t[2]=function(e){return q(o).password=e}),placeholder:e.$t(`Config.Panel.index_67`)},null,8,[`value`,`placeholder`])]}),_:1},8,[`label`]),P(d,null,{default:Z(function(){return[P(n,{label:e.$t(`Database.Mysql.index_4`)},{default:Z(function(){return[P(i,{class:`w-200px`,value:q(o).host,"onUpdate:value":t[3]||(t[3]=function(e){return q(o).host=e}),options:q(c)},null,8,[`value`,`options`])]}),_:1},8,[`label`]),P(n,{"show-label":!1,path:`ip`},{default:Z(function(){return[q(o).host===`ip`?(H(),A(r,{key:0,class:`w-150px!`,value:q(o).ip,"onUpdate:value":t[4]||(t[4]=function(e){return q(o).ip=e}),placeholder:e.$t(`Database.Mysql.index_6`)},null,8,[`value`,`placeholder`])):j(``,!0)]}),_:1})]}),_:1})]}),_:1},8,[`model`])])}}}),Sn=E({default:function(){return xn}}),xn=Mi,R(),ce={class:`p-16px`},ji=L({__name:`index`,props:{data:{}},setup:function(e,t){var n=t.expose,r=Y().t,i=e.data,a=i.onRefresh,o=i.params;Ha(function(){c.username=o.username,c.host=o.host});var s=W(null),c=U({sid:0,username:``,password:``,host:`127.0.0.1`}),l={password:{required:!0,message:r(`Config.Panel.index_67`),trigger:[`blur`,`input`]}},d=function(){return{sid:c.sid,username:c.username,password:c.password,host:c.host}};return n({onConfirm:function(){return Q(function(){var e;return $(this,function(t){switch(t.label){case 0:return[4,(e=s.value)==null?void 0:e.validate()];case 1:return t.sent(),[4,Po(d())];case 2:return t.sent(),a==null||a(),[2]}})})()}}),function(e,t){var n=v,r=u,i=Mn;return H(),M(`div`,ce,[P(i,{ref_key:`formRef`,ref:s,model:q(c),rules:l},{default:Z(function(){return[P(r,{label:e.$t(`Database.index_13`)},{default:Z(function(){return[P(n,{class:`w-250px!`,value:q(c).username,"onUpdate:value":t[0]||(t[0]=function(e){return q(c).username=e}),disabled:``},null,8,[`value`])]}),_:1},8,[`label`]),P(r,{label:e.$t(`Database.Mysql.index_4`)},{default:Z(function(){return[P(n,{class:`w-250px!`,value:q(c).host,"onUpdate:value":t[1]||(t[1]=function(e){return q(c).host=e}),disabled:``},null,8,[`value`])]}),_:1},8,[`label`]),P(r,{label:e.$t(`Password.index_2`),path:`password`},{default:Z(function(){return[P(n,{class:`w-250px!`,value:q(c).password,"onUpdate:value":t[2]||(t[2]=function(e){return q(c).password=e}),placeholder:e.$t(`Config.Panel.index_67`)},null,8,[`value`,`placeholder`])]}),_:1},8,[`label`])]}),_:1},8,[`model`])])}}}),er=E({default:function(){return $n}}),$n=ji,R(),la(),se={class:`p-26px text-#666`},mt={class:`text-15px w-80%`},Ai=L({__name:`index`,setup:function(e){var t=I(function(){return D(function(){return Promise.resolve().then(function(){return Sn})},void 0)}),n=Y().t,r=U({p:1,size:10,sid:0,search:``}),o=W(!1),s=U({status:!0,msg:``}),c=hs([{type:`expand`,renderExpand:function(e){return P(Gn,{loading:d.loading,data:e.list,columns:m},null)}},{key:`user`,title:n(`Ftp.Analysis.Index_27`)}]),u=c.keys,d=c.table,f=c.columns,p=c.setLoading,m=hs([{key:`host`,title:n(`Database.Mysql.index_4`),render:function(e){return e.host===`%`?``.concat(e.host,` - `,n(`Database.form.index_13`)):e.host===`127.0.0.1`?``.concat(e.host,` - `,n(`Database.form.index_12`)):e.host}},{key:`host`,title:n(`Config.Panel.index_66`),render:function(e){return e.password?n(`Database.mongo.index_7`):n(`Site.PHP.index_32`)}},{key:`password_last_changed`,title:n(`Database.Mysql.index_14`)},is({width:250,options:function(e){return[{label:n(`Database.index_21`),disabled:e.user===`root`,onClick:function(){return Q(function(){return $(this,function(t){return os({title:n(`Database.Mysql.index_15`)+`--`+e.user,width:800,minHeight:400,data:{row:e.access_list,params:{sid:r.sid,host:e.host,username:e.user},onRefresh:g},component:I(function(){return D(function(){return Promise.resolve().then(function(){return ya})},void 0)})}),[2]})})()}},{label:`Password`,onClick:function(){return Q(function(){return $(this,function(t){return os({title:n(`Database.Mysql.index_16`),width:420,minHeight:150,footer:!0,data:{params:{sid:r.sid,host:e.host,username:e.user},onRefresh:g},component:I(function(){return D(function(){return Promise.resolve().then(function(){return er})},void 0)})}),[2]})})()}},{label:n(`Public.Btn.Export`),onClick:function(){return Q(function(){var t,n;return $(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,Ar({sid:r.sid,host:e.host,username:e.user})];case 1:return t=i.sent().message,z(t)&&(s.msg=t.result,s.status=!0),[3,3];case 2:return n=i.sent(),s.msg=Rr(n,`message.result`,``),s.status=!1,[3,3];case 3:return o.value=!0,[2]}})})()}},{label:n(`Public.Btn.Del`),disabled:e.user===`root`,onClick:function(){return Q(function(){return $(this,function(t){return J({title:``.concat(n(`Public.Btn.Del`),` [`,e.user,` - `,e.host,`]`),content:n(`Database.Mysql.index_17`),onConfirm:function(){return Q(function(){return $(this,function(t){switch(t.label){case 0:return[4,Sr({sid:r.sid,host:e.host,username:e.user})];case 1:return t.sent(),g(),[2]}})})()}}),[2]})})()}}]}})]).columns,h=function(){d.data=[],r.p=1,g()},g=function(){return Q(function(){var e;return $(this,function(t){switch(t.label){case 0:return t.trys.push([0,,2,3]),p(!0),[4,si(K(r))];case 1:return e=t.sent().message,z(e)&&(d.data=e.data.map(function(e){return{user:e.user,list:e.list.map(function(t){return Ps(Ms({},t),{user:e.user})})}})),[3,3];case 2:return u.value=[],p(!1),[7];case 3:return[2]}})})()},_=ss(n(`Database.Mysql.index_7`),{getList:g});return function(){return Q(function(){return $(this,function(e){return g(),[2]})})()}(),function(e,c){var p=i,m=zn,v=Gn,y=Un,x=Xn,S=Rn,C=l,ee=b,w=a;return H(),A(w,{class:`p-16px`},{default:Z(function(){return[P(y,null,{toolsLeft:Z(function(){return[P(p,{type:`primary`,onClick:c[0]||(c[0]=function(e){return q(_).show=!0})},{default:Z(function(){return[N(G(e.$t(`Database.Mysql.index_7`)),1)]}),_:1})]}),toolsRight:Z(function(){return[P(So,{class:`w-200px`,value:q(r).sid,"onUpdate:value":[c[1]||(c[1]=function(e){return q(r).sid=e}),h]},null,8,[`value`]),P(m,{value:q(r).search,"onUpdate:value":c[2]||(c[2]=function(e){return q(r).search=e}),width:240,placeholder:e.$t(`Config.Alarm.index_67`),onSearch:g},null,8,[`value`,`placeholder`])]}),table:Z(function(){return[P(v,{"checked-row-keys":q(u),"onUpdate:checkedRowKeys":c[3]||(c[3]=function(e){return B(u)?u.value=e:null}),"row-key":`user`,loading:q(d).loading,data:q(d).data,"max-height":400,columns:q(f)},null,8,[`checked-row-keys`,`loading`,`data`,`columns`])]}),_:1}),P(x,{class:`mt-16px`},{default:Z(function(){return[k(`li`,null,G(e.$t(`Database.Mysql.index_8`)),1),k(`li`,null,G(e.$t(`Database.Mysql.index_9`)),1),k(`li`,null,G(e.$t(`Database.Mysql.index_10`)),1)]}),_:1}),P(S,{show:q(_).show,"onUpdate:show":c[4]||(c[4]=function(e){return q(_).show=e}),title:q(_).title,data:q(_).data,width:600,"min-height":250,footer:!0,component:q(t)},null,8,[`show`,`title`,`data`,`component`]),P(S,{show:q(o),"onUpdate:show":c[6]||(c[6]=function(e){return B(o)?o.value=e:null}),title:e.$t(`Database.Mysql.index_11`),width:400,"min-height":250},{default:Z(function(){return[k(`div`,se,[P(ee,{status:q(s).status?`success`:`error`,title:q(s).status?e.$t(`Database.Mysql.index_12`):e.$t(`Database.Mysql.index_13`)},{footer:Z(function(){return[P(C,{class:`flex-nowrap! justify-center!`},{default:Z(function(){return[k(`span`,mt,G(q(s).msg),1),q(s).status?(H(),A(p,{key:0,type:`primary`,text:``,onClick:c[5]||(c[5]=function(e){return q(lr)(q(s).msg)})},{default:Z(function(){return[N(G(q(n)(`Public.Btn.Copy`)),1)]}),_:1})):j(``,!0)]}),_:1})]}),_:1},8,[`status`,`title`])])]}),_:1},8,[`show`,`title`])]}),_:1})}}}),vs=E({default:function(){return _s}}),_s=fn(Ai,[[`__scopeId`,`data-v-81a8f5e8`]]),Tn=[{key:`Data Permissions`,label:`Data Permissions`,description:`Data Permissions`,select:!0,id:1,children:[{id:2,key:`SELECT`,description:`SELECT--Allows users to query (read) data from the database.`,select:!0,label:`Read Data`},{id:3,key:`INSERT`,description:`INSERT--Allows users to insert new data into database tables.`,select:!0,label:`Insert/Replace Data`},{id:4,key:`UPDATE`,description:`UPDATE--Allows users to modify data in database tables.`,select:!0,label:`Modify Data`},{id:5,key:`DELETE`,description:`DELETE--Allows users to delete data from database tables.`,select:!0,label:`Delete Data`},{key:`FILE`,id:22,description:`Allows users to read or write files.`,label:`File Read/Write`}]},{key:`Structure Permissions`,label:`Structure Permissions`,description:`Structure Permissions`,select:!0,id:6,children:[{id:7,key:`CREATE`,description:`Allows users to create new databases, tables, or indexes.`,select:!0,label:`Create Database/Table`},{id:8,key:`ALTER`,description:`Allows users to modify the structure of database tables (e.g., add or delete columns).`,select:!0,label:`Modify Table Structure`},{id:9,key:`INDEX`,description:`Allows users to create and delete indexes to improve query performance.`,select:!0,label:`Create/Delete Index`},{id:10,key:`DROP`,description:`Allows users to delete databases, tables, or indexes.`,select:!0,label:`Delete Database/Table`},{id:11,key:`CREATE TEMPORARY TABLES`,description:`Allows users to create temporary tables that are automatically deleted after the session ends.`,select:!0,label:`Create Temporary Tables`},{id:12,key:`SHOW VIEW`,description:`Allows users to view views in the database.`,select:!0,label:`View Views`},{id:13,key:`CREATE ROUTINE`,description:`Allows users to create stored procedures and functions.`,select:!0,label:`Create Stored Procedure/Function`},{id:14,key:`ALTER ROUTINE`,description:`Allows users to modify stored procedures and functions.`,select:!0,label:`Modify Stored Procedure/Function`},{id:15,key:`EXECUTE`,description:`Allows users to execute stored procedures and functions.`,select:!0,label:`Execute Stored Procedure/Function`},{id:16,key:`CREATE VIEW`,description:`Allows users to create views in the database.`,select:!0,label:`Create View`},{id:17,key:`EVENT`,description:`Allows users to create, modify, and delete database events.`,select:!0,label:`Create/Modify/Delete Event`},{id:18,key:`TRIGGER`,description:`Allows users to create and manage database triggers.`,select:!0,label:`Create/Manage Trigger`}]},{key:`Management Permissions`,label:`Management Permissions`,description:`Management Permissions`,include:!0,id:19,children:[{id:23,key:`SUPER`,description:`Allows users to perform special operations, such as starting or stopping the database server.`,label:`Kill Other User Processes When Max Connections Reached`},{id:24,key:`PROCESS`,description:`Allows users to view the database connection processes of other users.`,label:`View Other User Connections`},{id:25,key:`RELOAD`,description:`Allows users to reload the database server configuration.`,label:`Reload Database Configuration`},{id:26,key:`SHUTDOWN`,description:`Allows users to shut down the database server.`,label:`Shutdown Database Server`},{id:27,key:`SHOW DATABASES`,description:`Allows users to view the list of available databases.`,label:`View Available Databases`},{id:21,key:`LOCK TABLES`,description:`Allows users to lock tables to control concurrent access.`,select:!0,label:`Lock Tables`},{id:32,key:`REFERENCES`,description:`Allows users to create and use foreign keys to maintain data integrity.`,label:`Create/Use Foreign Keys`},{id:29,key:`REPLICATION CLIENT`,description:`Allows users to connect as a replication client to a master-slave replication system.`,label:`Connect as Replication Client to Master-Slave System`},{id:30,key:`REPLICATION SLAVE`,description:`Allows users to connect as a replication slave to a master-slave replication system.`,label:`Connect as Replication Slave to Master-Slave System`},{id:31,key:`CREATE USER`,description:`Allows users to create, modify, and delete database user accounts.`,label:`Create/Modify/Delete Database User`}]}],dr=[{key:`Data Permissions`,label:`Data Permissions`,description:`Data Permissions`,select:!0,id:1,children:[{id:2,key:`SELECT`,description:`SELECT--Allows users to query (read) data from the database.`,select:!0,label:`Read Data`},{id:3,key:`INSERT`,description:`INSERT--Allows users to insert new data into database tables.`,select:!0,label:`Insert/Replace Data`},{id:4,key:`UPDATE`,description:`UPDATE--Allows users to modify data in database tables.`,select:!0,label:`Modify Data`},{id:5,key:`DELETE`,description:`DELETE--Allows users to delete data from database tables.`,select:!0,label:`Delete Data`}]},{key:`Structure Permissions`,label:`Structure Permissions`,description:`Structure Permissions`,select:!0,id:6,children:[{id:7,key:`CREATE`,description:`Allows users to create new databases, tables, or indexes.`,select:!0,label:`Create Database/Table`},{id:8,key:`ALTER`,description:`Allows users to modify the structure of database tables (e.g., add or delete columns).`,select:!0,label:`Modify Table Structure`},{id:9,key:`INDEX`,description:`Allows users to create and delete indexes to improve query performance.`,select:!0,label:`Create/Delete Index`},{id:10,key:`DROP`,description:`Allows users to delete databases, tables, or indexes.`,select:!0,label:`Delete Database/Table`},{id:11,key:`CREATE TEMPORARY TABLES`,description:`Allows users to create temporary tables that are automatically deleted after the session ends.`,select:!0,label:`Create Temporary Tables`},{id:12,key:`SHOW VIEW`,description:`Allows users to view views in the database.`,select:!0,label:`View Views`},{id:13,key:`CREATE ROUTINE`,description:`Allows users to create stored procedures and functions.`,select:!0,label:`Create Stored Procedure/Function`},{id:14,key:`ALTER ROUTINE`,description:`Allows users to modify stored procedures and functions.`,select:!0,label:`Modify Stored Procedure/Function`},{id:15,key:`EXECUTE`,description:`Allows users to execute stored procedures and functions.`,select:!0,label:`Execute Stored Procedure/Function`},{id:16,key:`CREATE VIEW`,description:`Allows users to create views in the database.`,select:!0,label:`Create View`},{id:17,key:`EVENT`,description:`Allows users to create, modify, and delete database events.`,select:!0,label:`Create/Modify/Delete Event`},{id:18,key:`TRIGGER`,description:`Allows users to create and manage database triggers.`,select:!0,label:`Create/Manage Trigger`}]},{key:`Management Permissions`,label:`Management Permissions`,description:`Management Permissions`,include:!0,id:19,children:[{id:21,key:`LOCK TABLES`,description:`Allows users to lock tables to control concurrent access.`,select:!0,label:`Lock Tables`},{id:22,key:`REFERENCES`,description:`Allows users to create and use foreign keys to maintain data integrity.`,label:`Create/Use Foreign Keys`}]}],R(),oe={class:`p-16px`},pt={class:`w-415px max-h-200px overflow-auto border border-solid p-12x border-#ccc`},Fr=L({__name:`form`,props:{data:{}},setup:function(e,t){var n=t.expose,r=e.data,i=r.getList,a=r.params,o=W(null),s=U({db_name:``,tb_name:``,access:[`SELECT`,`INSERT`,`UPDATE`,`DELETE`,`CREATE`,`ALTER`,`INDEX`,`DROP`,`CREATE TEMPORARY TABLES`,`SHOW VIEW`,`CREATE ROUTINE`,`ALTER ROUTINE`,`EXECUTE`,`CREATE VIEW`,`EVENT`,`TRIGGER`,`LOCK TABLES`,`REFERENCES`]}),c=W([]),d=W([]),f=function(e,t){s.db_name=e,t.tb_list.length?(d.value=t.tb_list.map(function(e){return{label:e.name,value:e.value,access_list:e.access_list}}),p(d.value[0].value,d.value[0])):d.value=[]},p=function(e,t){if(s.tb_name=e,e===`*`&&t.access_list[0]===`ALL PRIVILEGES`){s.access=[`SELECT`,`INSERT`,`UPDATE`,`DELETE`,`CREATE`,`ALTER`,`INDEX`,`DROP`,`CREATE TEMPORARY TABLES`,`SHOW VIEW`,`CREATE ROUTINE`,`ALTER ROUTINE`,`EXECUTE`,`CREATE VIEW`,`EVENT`,`TRIGGER`,`LOCK TABLES`,`REFERENCES`];return}if(e===`*`&&t.access_list[0]===`USAGE`){s.access=[];return}s.access=t.access_list},m=sr(function(){var e;return s.db_name===`*`?Tn:s.db_name!==`*`&&s.tb_name!==`*`?((e=dr.find(function(e){return e.id===1}))==null?void 0:e.children)||[]:dr}),h=X(),g=h.loading,_=h.setLoading;(function(){return Q(function(){var e;return $(this,function(t){switch(t.label){case 0:return t.trys.push([0,,2,3]),_(!0),[4,ai(a)];case 1:return e=t.sent().message,z(e)&&(c.value=e.data.map(function(e){return{label:e.name,value:e.value,tb_list:e.tb_list}}),f(c.value[0].value,c.value[0])),[3,3];case 2:return _(!1),[7];case 3:return[2]}})})()})();var v=function(){return Ps(Ms({},a),{db_name:s.db_name,tb_name:s.db_name===`*`?`*`:s.tb_name,access:s.access.join(`,`),with_grant:0})};return n({onConfirm:function(){return Q(function(){var e;return $(this,function(t){switch(t.label){case 0:return[4,(e=o.value)==null?void 0:e.validate()];case 1:return t.sent(),[4,hn(v())];case 2:return t.sent(),i==null||i(),[2]}})})()}}),function(e,t){var n=x,r=u,i=l,a=T,h=Mn;return H(),M(`div`,oe,[P(h,{ref_key:`formRef`,ref:o,model:q(s)},{default:Z(function(){return[P(i,null,{default:Z(function(){return[P(r,{label:e.$t(`Database.Mysql.index_18`)},{default:Z(function(){return[P(n,{class:`w-200px`,loading:q(g),value:q(s).db_name,"onUpdate:value":[t[0]||(t[0]=function(e){return q(s).db_name=e}),f],options:q(c)},null,8,[`loading`,`value`,`options`])]}),_:1},8,[`label`]),P(r,{"show-label":!1},{default:Z(function(){return[q(d).length?(H(),A(n,{key:0,class:`w-200px`,value:q(s).tb_name,"onUpdate:value":[t[1]||(t[1]=function(e){return q(s).tb_name=e}),p],options:q(d)},null,8,[`value`,`options`])):j(``,!0)]}),_:1})]}),_:1}),P(r,{label:e.$t(`Database.Mysql.index_19`),path:`access`},{default:Z(function(){return[k(`div`,pt,[P(a,{"default-expand-all":``,"block-line":``,cascade:``,checkable:``,selectable:!1,"check-strategy":`child`,"checked-keys":q(s).access,"onUpdate:checkedKeys":t[2]||(t[2]=function(e){return q(s).access=e}),data:q(m),placeholder:e.$t(`Database.Mysql.index_20`)},null,8,[`checked-keys`,`data`,`placeholder`])])]}),_:1},8,[`label`])]}),_:1},8,[`model`])])}}}),Pr=E({default:function(){return Mr}}),Mr=Fr,R(),la(),ki=L({__name:`index`,props:{data:{}},setup:function(e){var t=I(function(){return D(function(){return Promise.resolve().then(function(){return Pr})},void 0)}),n=e.data.params,r=Y().t,o=hs([{key:`database`,title:r(`Site.PHP.add_site_16`),render:function(e){return e.database===`*`?`* -`.concat(r(`Database.Mysql.index_22`)):e.database}},{key:`table`,title:`Table`,render:function(e){return e.table===`*`?`* -`.concat(r(`Database.Mysql.index_23`)):e.table}},{key:`user`,title:r(`Database.index_21`),render:function(e){return``.concat(r(`Database.Mysql.index_24`),`: `,e.access.map(function(e){return e.access}).join(`,`))},ellipsis:{tooltip:!0}},is({width:80,options:function(e){return[{label:r(`Public.Btn.Del`),onClick:function(){return Q(function(){return $(this,function(t){return J({title:r(`Public.Btn.Del`),content:r(`Database.Mysql.index_25`,[e.database]),onConfirm:function(){return Q(function(){return $(this,function(t){switch(t.label){case 0:return[4,Cr(Ps(Ms({},n),{db_name:e.database,tb_name:e.table,access:e.access.map(function(e){return e.access}).join(`,`),with_grant:0}))];case 1:return t.sent(),p(),[2]}})})()}}),[2]})})()}}]}})]),s=o.keys,c=o.table,l=o.columns,u=X(),d=u.loading,f=u.setLoading,p=function(){return Q(function(){var e;return $(this,function(t){switch(t.label){case 0:return t.trys.push([0,,2,3]),f(!0),[4,ii(n)];case 1:return e=t.sent().message,z(e)&&(c.data=e.data),[3,3];case 2:return f(!1),s.value=[],[7];case 3:return[2]}})})()};p();var m=ss(r(`Database.Mysql.index_21`),{getList:p,params:n});return function(e,n){var r=i,o=Gn,s=Un,u=Rn,f=a;return H(),A(f,{class:`p-16px`},{default:Z(function(){return[P(s,null,{toolsLeft:Z(function(){return[P(r,{type:`primary`,onClick:n[0]||(n[0]=function(e){return q(m).show=!0})},{default:Z(function(){return[N(G(e.$t(`Database.Mysql.index_21`)),1)]}),_:1})]}),table:Z(function(){return[P(o,{loading:q(d),data:q(c).data,"max-height":500,columns:q(l)},null,8,[`loading`,`data`,`columns`])]}),_:1}),P(u,{show:q(m).show,"onUpdate:show":n[1]||(n[1]=function(e){return q(m).show=e}),title:q(m).title,data:q(m).data,width:600,"min-height":250,footer:!0,component:q(t)},null,8,[`show`,`title`,`data`,`component`])]}),_:1})}}}),ya=E({default:function(){return va}}),va=ki,R(),ae={class:`p-20px`},ft={class:`flex items-center h-34px px-16px rounded-4px bg-#ececec text-#555 text-13px font-bold`},Tt={class:`ml-8px`},Oi=L({__name:`index`,props:{row:{}},setup:function(e){var t=e.row,n=Y().t,r=U({name:`--`,size:`--`}),a=function(){return Q(function(){return $(this,function(e){switch(e.label){case 0:return[4,po({db_name:t.name,tables:f.value})];case 1:return e.sent(),v(),[2]}})})()},o=function(){return Q(function(){return $(this,function(e){switch(e.label){case 0:return[4,qa({db_name:t.name,tables:f.value})];case 1:return e.sent(),v(),[2]}})})()},s=function(e){return Q(function(){return $(this,function(n){switch(n.label){case 0:return[4,No({db_name:t.name,tables:f.value,table_type:e})];case 1:return n.sent(),v(),[2]}})})()},c=function(e){return Q(function(){return $(this,function(n){switch(n.label){case 0:return[4,po({db_name:t.name,tables:[e.table_name]})];case 1:return n.sent(),v(),[2]}})})()},l=function(e){return Q(function(){return $(this,function(n){switch(n.label){case 0:return[4,qa({db_name:t.name,tables:[e.table_name]})];case 1:return n.sent(),v(),[2]}})})()},u=function(e){return Q(function(){var n;return $(this,function(r){switch(r.label){case 0:return n=e.type===`InnoDB`?`MyISAM`:`InnoDB`,[4,No({db_name:t.name,tables:[e.table_name],table_type:n})];case 1:return r.sent(),v(),[2]}})})()},d=hs([{type:`selection`,width:40},{key:`table_name`,title:n(`Database.tools.index_10`),width:150,ellipsis:{tooltip:!0}},{key:`type`,title:n(`Database.tools.index_11`),width:80},{key:`collation`,title:n(`Database.tools.index_12`),ellipsis:{tooltip:{width:`trigger`}}},{key:`rows_count`,title:n(`Database.tools.index_13`),width:100},{key:`data_size`,title:n(`Database.tools.index_14`),width:90},is({width:240,options:function(e){return[{label:n(`Database.tools.index_15`),onClick:function(){c(e)}},{label:n(`Database.tools.index_16`),onClick:function(){l(e)}},{label:e.type===`InnoDB`?n(`Database.tools.index_6`):n(`Database.tools.index_5`),onClick:function(){u(e)}}]}})]),f=d.keys,p=d.table,m=d.columns,h=X(),g=h.loading,_=h.setLoading,v=function(){return Q(function(){var e;return $(this,function(n){switch(n.label){case 0:return n.trys.push([0,,2,3]),_(!0),[4,oi({db_name:t.name})];case 1:return e=n.sent().message,z(e)?(p.data=pa(e.tables)?e.tables:[],r.name=ma(e.database)?e.database:`--`,r.size=ma(e.data_size)?e.data_size:`--`):(p.data=[],r.name=`--`,r.size=`--`),f.value=[],[3,3];case 2:return _(!1),[7];case 3:return[2]}})})()};return v(),function(e,t){var n=i,c=Gn,l=Un,u=Xn;return H(),M(`div`,ae,[P(l,null,ur({toolsLeft:Z(function(){return[k(`div`,ft,[k(`span`,null,G(e.$t(`Database.tools.index_1`))+G(q(r).name),1),k(`span`,Tt,G(e.$t(`Database.tools.index_2`))+G(q(r).size),1)])]}),table:Z(function(){return[P(c,{"checked-row-keys":q(f),"onUpdate:checkedRowKeys":t[2]||(t[2]=function(e){return B(f)?f.value=e:null}),"row-key":`table_name`,loading:q(g),"max-height":356,data:q(p).data,columns:q(m)},null,8,[`checked-row-keys`,`loading`,`data`,`columns`])]}),_:2},[q(f).length>0?{name:`toolsRight`,fn:Z(function(){return[P(n,{onClick:a},{default:Z(function(){return[N(G(e.$t(`Database.tools.index_3`)),1)]}),_:1}),P(n,{onClick:o},{default:Z(function(){return[N(G(e.$t(`Database.tools.index_4`)),1)]}),_:1}),P(n,{onClick:t[0]||(t[0]=function(e){return s(`InnoDB`)})},{default:Z(function(){return[N(G(e.$t(`Database.tools.index_5`)),1)]}),_:1}),P(n,{onClick:t[1]||(t[1]=function(e){return s(`MyISAM`)})},{default:Z(function(){return[N(G(e.$t(`Database.tools.index_6`)),1)]}),_:1})]}),key:`0`}:void 0]),1024),P(u,{class:`mt-16px`},{default:Z(function(){return[k(`li`,null,G(e.$t(`Database.tools.index_7`)),1),k(`li`,null,G(e.$t(`Database.tools.index_8`)),1),k(`li`,null,G(e.$t(`Database.tools.index_9`)),1)]}),_:1})])}}}),Ra=E({default:function(){return La}}),La=Oi,R(),ga=Symbol(`php-admin`),Ur=function(e){var t=localStorage.getItem(`apsess`);return t?`/apsess_`.concat(t,e):e},R(),ie={class:`p-4px`},dt={class:`mb-16px`},wt={class:`text-error`},It={class:`mt-20px`},Va=`phpmyadmin`,Di=L({__name:`index`,setup:function(e,t){var n=t.expose,r=Y().t,a=bi(),c=sc().mysqlInfo,l=W(!1),u=function(e){J({title:r(`Database.PhpAdmin.index_12`,[r(e?`Public.Status.Start`:`Public.Status.Stop`)]),content:r(`Database.PhpAdmin.index_13`,[r(e?`Public.Status.start`:`Public.Status.stop`)]),onConfirm:function(){return Q(function(){return $(this,function(t){switch(t.label){case 0:return[4,Bo({name:Va,type:e?`start`:`stop`})];case 1:return t.sent(),f(),[2]}})})()}})},d=function(e){return Q(function(){var t,n,i,o,s,l,u,d;return $(this,function(f){switch(f.label){case 0:t=V.loading(r(`Database.PhpAdmin.index_14`)),f.label=1;case 1:return f.trys.push([1,14,,15]),[4,vi({sName:Va})];case 2:return n=f.sent(),i=n.message,o=Rr(i,`ext.url`,``),s=Rr(i,`ext.auth`,!1),e==`panel`?s?(V.error(r(`Database.PhpAdmin.index_15`)),t.close(),[2]):a.isFree?(ls({source:160}),t.close(),[2]):c.value?[4,lc(c.value.username,c.value.password)]:[3,4]:[3,8];case 3:return f.sent(),[3,7];case 4:return[4,li()];case 5:return l=f.sent().message,[4,lc(`root`,Rr(l,`result`,``))];case 6:f.sent(),f.label=7;case 7:return[3,13];case 8:return c.value?[4,cc(o,c.value.name,c.value.username,c.value.password)]:[3,10];case 9:return f.sent(),[3,13];case 10:return[4,li()];case 11:return u=f.sent().message,[4,cc(o,``,`root`,Rr(u,`result`,``))];case 12:f.sent(),f.label=13;case 13:return t.close(),[3,15];case 14:return d=f.sent(),t.close(),console.error(d),[3,15];case 15:return[2]}})})()},f=function(){return Q(function(){var e;return $(this,function(t){switch(t.label){case 0:return[4,vi({sName:Va})];case 1:return e=t.sent().message,z(e)&&(l.value=e.status),[2]}})})()};return f(),n({init:f}),function(e,t){var n=o,r=Xn,a=s,c=i;return H(),M(`div`,ie,[k(`div`,dt,[P(n,{checked:q(l),"onUpdate:checked":u},{default:Z(function(){return[N(G(e.$t(`Database.PhpAdmin.index_4`)),1)]}),_:1},8,[`checked`])]),P(r,{class:`mb-20px`},{default:Z(function(){return[k(`li`,wt,G(e.$t(`Database.PhpAdmin.index_5`)),1)]}),_:1}),P(a,{dashed:``}),k(`div`,It,[P(c,{onClick:t[0]||(t[0]=function(e){return d(`panel`)})},{default:Z(function(){return[k(`span`,null,G(e.$t(`Database.PhpAdmin.index_11`)),1),t[2]||(t[2]=k(`span`,{class:`bg-recommend`},null,-1))]}),_:1}),P(c,{class:`ml-24px`,onClick:t[1]||(t[1]=function(e){return d()})},{default:Z(function(){return[N(G(e.$t(`Database.PhpAdmin.index_6`)),1)]}),_:1})]),P(r,{class:`mt-16px`},{default:Z(function(){return[k(`li`,null,G(e.$t(`Database.PhpAdmin.index_7`)),1),k(`li`,null,G(e.$t(`Database.PhpAdmin.index_8`)),1),k(`li`,null,G(e.$t(`Database.PhpAdmin.index_9`)),1),k(`li`,null,G(e.$t(`Database.PhpAdmin.index_10`)),1)]}),_:1})])}}}),wo=fn(Di,[[`__scopeId`,`data-v-9533c797`]]),R(),re={class:`w-160px`},Ba=`phpmyadmin`,Ei=L({__name:`index`,setup:function(e,t){var n=t.expose,r=Y().t,a=U({php_version:null}),o=W([]),s=X(),c=s.loading,u=s.setLoading,d=function(){return Q(function(){var e,t,n,r,i;return $(this,function(s){switch(s.label){case 0:return s.trys.push([0,,2,3]),u(!0),[4,Promise.all([di(),vi({sName:Ba})])];case 1:return e=Fs.apply(void 0,[s.sent(),2]),t=e[0],n=e[1],r=t.message,pa(r)&&(o.value=r.map(function(e){return{label:e.name,value:e.version}})),i=n.message,a.php_version=Rr(i,`ext.phpversion`,null),[3,3];case 2:return u(!1),[7];case 3:return[2]}})})()},f=function(){return Q(function(){var e;return $(this,function(t){switch(t.label){case 0:return e=a.php_version,e===null?(V.error(r(`Database.PhpAdmin.index_32`)),[2]):[4,zo({phpversion:e})];case 1:return t.sent(),d(),[2]}})})()};return d(),n({init:d}),function(e,t){var n=x,r=i,s=l;return H(),M(`div`,null,[P(s,{class:`items-center`},{default:Z(function(){return[k(`span`,null,G(e.$t(`Database.PhpAdmin.index_31`)),1),k(`div`,re,[P(n,{value:q(a).php_version,"onUpdate:value":t[0]||(t[0]=function(e){return q(a).php_version=e}),loading:q(c),options:q(o)},null,8,[`value`,`loading`,`options`])]),P(r,{type:`primary`,onClick:f},{default:Z(function(){return[N(G(e.$t(`Public.Btn.Save`)),1)]}),_:1})]}),_:1})])}}}),$a=Ei,R(),Ve={class:`p-4px`},ut={class:`w-142px mr-8px`},Ct={class:`w-142px mr-8px`},Ft={class:`w-240px`},Wt={class:`w-240px`},Xt={class:`w-240px`},za=`phpmyadmin`,ca=L({__name:`index`,setup:function(e,t){var n=t.expose,r=Y().t,a=W(null),o=W(!1),c=W(null),l=W(!1),f=!1,p=U({username:``,password:``,repass:``}),m=function(){return Q(function(){var e;return $(this,function(t){switch(t.label){case 0:return e=a.value,e===null?(V.error(r(`Database.PhpAdmin.index_25`)),[2]):[4,Fo({port:e})];case 1:return t.sent(),S(),[2]}})})()},h=function(e){return Q(function(){return $(this,function(t){switch(t.label){case 0:return[4,Lo({v:+!!e})];case 1:return t.sent(),w(),[2]}})})()},g=function(){return Q(function(){var e;return $(this,function(t){switch(t.label){case 0:return e=c.value,e===null?(V.error(r(`Database.PhpAdmin.index_26`)),[2]):[4,Ro({port:e})];case 1:return t.sent(),w(),[2]}})})()},y=function(e){!e&&f?J({title:r(`Public.Confirm.Title`),content:r(`Database.PhpAdmin.index_27`),onConfirm:function(){return Q(function(){return $(this,function(e){switch(e.label){case 0:return[4,or()];case 1:return e.sent(),S(),[2]}})})()}}):l.value=e},b=function(){return Q(function(){return $(this,function(e){switch(e.label){case 0:return p.password.trim()===``||p.username.trim()===``?(V.error(r(`Database.PhpAdmin.index_28`)),[2]):p.password.length<3||p.username.length<3?(V.error(r(`Database.PhpAdmin.index_29`)),[2]):p.password===p.repass?[4,Io({username:p.username,password:p.password})]:(V.error(r(`Database.PhpAdmin.index_30`)),[2]);case 1:return e.sent(),S(),[2]}})})()},x=W(!1),S=function(){return Q(function(){var e,t;return $(this,function(n){switch(n.label){case 0:return n.trys.push([0,,2,3]),x.value=!0,[4,vi({sName:za})];case 1:return e=n.sent().message,t=Rr(e,`ext.port`,null),a.value=t?ts(t):null,l.value=Rr(e,`ext.auth`,!1),f=l.value,[3,3];case 2:return x.value=!1,[7];case 3:return[2]}})})()},ee=W(!1),w=function(){return Q(function(){var e,t;return $(this,function(n){switch(n.label){case 0:return n.trys.push([0,,2,3]),ee.value=!0,[4,ui()];case 1:return e=n.sent().message,o.value=Rr(e,`status`,!1),t=Rr(e,`port`,null),c.value=t?ts(t):null,[3,3];case 2:return ee.value=!1,[7];case 3:return[2]}})})()},T=function(){Promise.all([S(),w()])};return T(),n({init:T}),function(e,t){var n=_,r=i,f=u,S=s,w=C,T=v,E=Xn,D=Mn;return H(),M(`div`,Ve,[P(D,{"label-width":`160`},{default:Z(function(){return[P(f,{label:e.$t(`Database.PhpAdmin.index_16`)},{default:Z(function(){return[k(`div`,ut,[P(n,{value:q(a),"onUpdate:value":t[0]||(t[0]=function(e){return B(a)?a.value=e:null}),min:0,max:66325,"show-button":!1,loading:q(x),placeholder:``},null,8,[`value`,`loading`])]),P(r,{type:`primary`,onClick:m},{default:Z(function(){return[N(G(e.$t(`Public.Btn.Save`)),1)]}),_:1})]}),_:1},8,[`label`]),P(S,{dashed:``}),P(f,{class:`mt-20px`,label:e.$t(`Database.PhpAdmin.index_17`)},{default:Z(function(){return[P(w,{value:q(o),loading:q(ee),"onUpdate:value":h},null,8,[`value`,`loading`])]}),_:1},8,[`label`]),P(f,{label:e.$t(`Database.PhpAdmin.index_18`)},{default:Z(function(){return[k(`div`,Ct,[P(n,{value:q(c),"onUpdate:value":t[1]||(t[1]=function(e){return B(c)?c.value=e:null}),min:0,max:66325,"show-button":!1,loading:q(ee),placeholder:``},null,8,[`value`,`loading`])]),P(r,{type:`primary`,onClick:g},{default:Z(function(){return[N(G(e.$t(`Public.Btn.Save`)),1)]}),_:1})]}),_:1},8,[`label`]),P(S,{dashed:``}),P(f,{class:`mt-20px`,label:e.$t(`Database.PhpAdmin.index_19`)},{default:Z(function(){return[P(w,{value:q(l),loading:q(x),"onUpdate:value":y},null,8,[`value`,`loading`])]}),_:1},8,[`label`]),q(l)?(H(),M(d,{key:0},[P(f,{label:e.$t(`Database.PhpAdmin.index_20`)},{default:Z(function(){return[k(`div`,Ft,[P(T,{value:q(p).username,"onUpdate:value":t[2]||(t[2]=function(e){return q(p).username=e}),placeholder:e.$t(`Database.PhpAdmin.index_23`)},null,8,[`value`,`placeholder`])])]}),_:1},8,[`label`]),P(f,{label:e.$t(`Database.PhpAdmin.index_21`)},{default:Z(function(){return[k(`div`,Wt,[P(T,{value:q(p).password,"onUpdate:value":t[3]||(t[3]=function(e){return q(p).password=e}),type:`password`,placeholder:e.$t(`Database.PhpAdmin.index_23`)},null,8,[`value`,`placeholder`])])]}),_:1},8,[`label`]),P(f,{label:e.$t(`Database.PhpAdmin.index_22`)},{default:Z(function(){return[k(`div`,Xt,[P(T,{value:q(p).repass,"onUpdate:value":t[4]||(t[4]=function(e){return q(p).repass=e}),type:`password`,placeholder:e.$t(`Database.PhpAdmin.index_23`)},null,8,[`value`,`placeholder`])])]}),_:1},8,[`label`]),P(f,{label:` `},{default:Z(function(){return[P(r,{type:`primary`,onClick:b},{default:Z(function(){return[N(G(e.$t(`Public.Btn.Save`)),1)]}),_:1})]}),_:1})],64)):j(``,!0),P(E,null,{default:Z(function(){return[k(`li`,null,G(e.$t(`Database.PhpAdmin.index_24`)),1)]}),_:1})]}),_:1})])}}}),bo=ca,R(),Be={class:`h-580px`},sa=L({__name:`index`,props:{row:{default:void 0}},setup:function(e){var t=ns(e,`row`),n=Y().t,r=W(`service`),i=[{key:`service`,label:n(`Database.PhpAdmin.index_1`),component:wo},{key:`php`,label:n(`Database.PhpAdmin.index_2`),component:$a},{key:`safe`,label:n(`Database.PhpAdmin.index_3`),component:bo}];return oc({mysqlInfo:t}),function(e,t){var n=Yn;return H(),M(`div`,Be,[P(n,{value:q(r),"onUpdate:value":t[0]||(t[0]=function(e){return B(r)?r.value=e:null}),ref:`tabsRef`,data:i},null,8,[`value`])])}}}),Qa=E({default:function(){return Za}}),Za=sa,R(),ze={class:`w-240px`},lt={class:`w-240px`},St={class:`w-240px`},Pt={class:`w-240px`},Ut={class:`ml-8px`},oa=L({__name:`index`,setup:function(e,t){var n=t.expose,r=Y().t,i=F(),a=Uo(i).remoteList,o=W(null),s=U({sid:a.value.length>0?a.value[0].id:null,name:``,db_user:``,password:``,active:!1,ssl:``}),c=sr(function(){return a.value.map(function(e){return{label:``.concat(e.ps,` (`,e.db_host,`)`),value:e.id}})}),l={name:{required:!0,message:r(`Database.form.index_15`),trigger:[`blur`,`change`]},db_user:{required:!0,message:r(`Database.form.index_16`),trigger:[`blur`,`change`]},password:{required:!0,message:r(`Database.form.index_17`),trigger:[`blur`,`change`]},sid:{trigger:`change`,validator:function(e,t){return t!==null||Error(r(`Database.form.index_18`))}}},d=function(e){s.db_user=e},f=function(){Us()},p=function(){var e=s.sid;if(e===null)throw V.error(r(`Database.form.index_18`)),Error(r(`Database.form.index_18`));return Ps(Ms({},K(s)),{sid:e,ps:s.name})};return n({onConfirm:function(e){var t=e.hide;return Q(function(){var e,n;return $(this,function(r){switch(r.label){case 0:return[4,(e=o.value)==null?void 0:e.validate()];case 1:return r.sent(),n=p(),[4,pn(i.type,n)];case 2:return r.sent(),i.setRefresh(!0),t(),[2]}})})()}}),function(e,t){var n=v,r=u,i=Pn,a=x,p=In,m=Mn;return H(),A(m,{ref_key:`formRef`,ref:o,model:q(s),rules:l,class:`p-20px`},{default:Z(function(){return[P(r,{label:e.$t(`Database.index_12`),path:`name`},{default:Z(function(){return[k(`div`,ze,[P(n,{value:q(s).name,"onUpdate:value":[t[0]||(t[0]=function(e){return q(s).name=e}),d],placeholder:e.$t(`Database.form.index_2`)},null,8,[`value`,`placeholder`])])]}),_:1},8,[`label`]),P(r,{label:e.$t(`Database.index_13`),path:`db_user`},{default:Z(function(){return[k(`div`,lt,[P(n,{value:q(s).db_user,"onUpdate:value":t[1]||(t[1]=function(e){return q(s).db_user=e}),placeholder:e.$t(`Database.form.index_4`)},null,8,[`value`,`placeholder`])])]}),_:1},8,[`label`]),P(r,{label:e.$t(`Database.index_14`),path:`password`},{default:Z(function(){return[k(`div`,St,[P(i,{value:q(s).password,"onUpdate:value":t[2]||(t[2]=function(e){return q(s).password=e}),placeholder:``},null,8,[`value`])])]}),_:1},8,[`label`]),P(r,{label:e.$t(`Database.form.index_9`),path:`sid`},{default:Z(function(){return[k(`div`,Pt,[P(a,{value:q(s).sid,"onUpdate:value":t[3]||(t[3]=function(e){return q(s).sid=e}),options:q(c)},null,8,[`value`,`options`])]),k(`div`,Ut,[P(p,{onClick:f},{default:Z(function(){return[N(G(e.$t(`Database.form.index_10`)),1)]}),_:1})])]}),_:1},8,[`label`])]}),_:1},8,[`model`])}}}),_r=E({default:function(){return mr}}),mr=oa,R(),dn=xi.global,Yo=dn.t,R(),la(),Re={class:`p-16px`},aa=L({__name:`index`,setup:function(e){var t=I(function(){return D(function(){return Promise.resolve().then(function(){return _r})},void 0)}),n=Y().t,r=F(),o=ss(),c=function(){o.show=!0},l=function(){Gs()},u=function(){Us()},d=function(){return Q(function(){return $(this,function(e){switch(e.label){case 0:return[4,Go(r.type,{ids:[]})];case 1:return e.sent(),S(),[2]}})})()},f=U({p:1,limit:10,sid:-1,search:``}),p=hs([{type:`selection`,width:40},{key:`name`,title:n(`Database.index_12`),width:`12%`,minWidth:120},{key:`username`,title:n(`Database.index_13`),width:`12%`,minWidth:120},dc(),fc(),pc(),ds({onBlur:function(e,t){return Q(function(){return $(this,function(n){switch(n.label){case 0:return[4,Do({id:t.id,ps:e})];case 1:return n.sent(),[2]}})})()}}),is({width:220,options:function(e){return[{label:`Adminer`,show:e.db_type===0,onClick:function(){C(e)}},{label:`Password`,onClick:function(){Ys(e)}},{label:n(`Public.Btn.Del`),onClick:function(){Xs([e])}}]}})]),m=p.keys,h=p.table,g=p.columns,_=[{key:`sync`,label:n(`Database.index_24`),onBatch:function(e){J({title:n(`Database.index_25`),content:n(`Database.index_26`),onConfirm:function(t){var n=t.hide;return Q(function(){return $(this,function(t){switch(t.label){case 0:return[4,Go(r.type,{ids:e.map(function(e){return e.id})})];case 1:return t.sent(),n(),[2]}})})()}})}},{key:`backup`,type:`confirm`,label:n(`Database.index_27`),confirm:{title:n(`Database.index_28`),desc:n(`Database.index_29`),api:function(e){return es(r.type,{id:e.id},!1)},done:function(){S()},columns:[{key:`name`,title:n(`Database.index_12`)}]}},{key:`delete`,label:n(`Database.index_30`),onBatch:function(e){Xs(e)}}],v=function(){var e=Ms({},K(f));return e.sid===-1&&delete e.sid,e},y=X(),b=y.loading,x=y.setLoading,S=function(){return Q(function(){var e;return $(this,function(t){switch(t.label){case 0:return t.trys.push([0,,2,3]),x(!0),[4,Yr(r.type,v())];case 1:return e=t.sent().message,z(e)?(h.data=pa(e.data)?e.data:[],h.total=ci(e.page)):(h.data=[],h.total=0),[3,3];case 2:return m.value=[],x(!1),[7];case 3:return[2]}})})()};xs(function(){return r.isRefresh},function(e){e&&(r.setRefresh(!1),r.delRemoteId===f.sid&&(f.sid=-1),S())});var C=function(e){Zs(e?{type:`pgsql`,username:e.username,password:e.password,db:e.name}:{type:`pgsql`})};return function(){return Q(function(){return $(this,function(e){switch(e.label){case 0:return[4,r.getConfig()];case 1:return e.sent(),[4,r.getRemote()];case 2:return e.sent(),r.isInstallPgsql&&S(),[2]}})})()}(),function(e,n){var p=i,v=s,y=Bn,x=zn,ee=Gn,w=Hn,T=Kn,E=Un,D=Rn,O=a;return H(),A(q(fa),null,{default:Z(function(){return[P(O,null,{default:Z(function(){return[k(`div`,Re,[P(E,{feedback:!0},{toolsLeft:Z(function(){return[P(p,{type:`primary`,onClick:c},{default:Z(function(){return[N(G(e.$t(`Database.index_1`)),1)]}),_:1}),P(p,{onClick:l},{default:Z(function(){return[N(G(e.$t(`Database.index_2`)),1)]}),_:1}),P(p,{onClick:n[0]||(n[0]=function(e){return C()})},{default:Z(function(){return Is(n[8]||(n[8]=[N(` Adminer `,-1)]))}),_:1}),P(p,{onClick:u},{default:Z(function(){return[N(G(e.$t(`Database.index_4`)),1)]}),_:1}),P(v,{class:`mx-0!`,vertical:``}),P(p,{onClick:d},{default:Z(function(){return[N(G(e.$t(`Database.index_5`)),1)]}),_:1}),P(p,{onClick:q(Ks)},{default:Z(function(){return[N(G(e.$t(`Database.index_6`)),1)]}),_:1},8,[`onClick`]),q(r).isInstallPgsql?(H(),A(y,{key:0,"soft-name":`pgsql`,"open-soft":`pgsql_manager`})):j(``,!0)]}),toolsRight:Z(function(){return[P(q(so),{value:q(f).sid,"onUpdate:value":n[1]||(n[1]=function(e){return q(f).sid=e}),"store-key":`database-pgsql-page`,onChange:S},null,8,[`value`]),P(x,{value:q(f).search,"onUpdate:value":n[2]||(n[2]=function(e){return q(f).search=e}),placeholder:`Database search`,onSearch:S},null,8,[`value`])]}),table:Z(function(){return[P(ee,{"checked-row-keys":q(m),"onUpdate:checkedRowKeys":n[3]||(n[3]=function(e){return B(m)?m.value=e:null}),loading:q(b),data:q(h).data,columns:q(g)},null,8,[`checked-row-keys`,`loading`,`data`,`columns`])]}),pageLeft:Z(function(){return[P(w,{"checked-row-keys":q(m),"onUpdate:checkedRowKeys":n[4]||(n[4]=function(e){return B(m)?m.value=e:null}),data:q(h).data,options:_},null,8,[`checked-row-keys`,`data`])]}),pageRight:Z(function(){return[P(T,{page:q(f).p,"onUpdate:page":n[5]||(n[5]=function(e){return q(f).p=e}),"page-size":q(f).limit,"onUpdate:pageSize":n[6]||(n[6]=function(e){return q(f).limit=e}),"store-key":`database-pgsql-page`,"item-count":q(h).total,onRefresh:S},null,8,[`page`,`page-size`,`item-count`])]}),_:1}),P(D,{show:q(o).show,"onUpdate:show":n[7]||(n[7]=function(e){return q(o).show=e}),title:e.$t(`Database.mongo.index_4`),width:540,"min-height":280,footer:!0,component:q(t)},null,8,[`show`,`title`,`component`])])]}),_:1})]}),_:1})}}}),e(`r`,E({default:function(){return Xa}})),Xa=aa,R(),Le={class:`p-20px`},ct={class:`w-260px`},xt={class:`w-260px`},Nt={class:`w-260px`},Ht={class:`w-260px`},ia=L({__name:`index`,props:{data:{}},setup:function(e,t){var n=t.expose,r=Y().t,i=e.data,a=i.row,o=i.sid,s=i.dbIdx,c=i.isEdit,l=F(),d=W(null),f=U({db_idx:0,name:``,val:``,endtime:void 0}),p=W([{label:`DB0`,value:0},{label:`DB1`,value:1},{label:`DB2`,value:2},{label:`DB3`,value:3},{label:`DB4`,value:4},{label:`DB5`,value:5},{label:`DB6`,value:6},{label:`DB7`,value:7},{label:`DB8`,value:8},{label:`DB9`,value:9},{label:`DB10`,value:10},{label:`DB11`,value:11},{label:`DB12`,value:12},{label:`DB13`,value:13},{label:`DB14`,value:14},{label:`DB15`,value:15}]),m={name:{required:!0,message:r(`Database.redis.index_1`),trigger:`blur`},val:{required:!0,message:r(`Database.redis.index_4`),trigger:`blur`}},y=function(){if(o===null)throw V.error(r(`Database.redis.index_8`)),Error(r(`Database.redis.index_9`));var e=Ps(Ms({},K(f)),{sid:o});return e.endtime===void 0&&delete e.endtime,e};return function(){s!==-1&&(f.db_idx=s),c&&a&&(f.name=a.name,f.val=a.val,f.endtime=a.endtime?a.endtime:void 0)}(),n({onConfirm:function(){return Q(function(){var e,t;return $(this,function(n){switch(n.label){case 0:return[4,(e=d.value)==null?void 0:e.validate()];case 1:return n.sent(),t=y(),[4,_n(t)];case 2:return n.sent(),l.setRefresh(!0),l.setAddRedisId(t.db_idx),[2]}})})()}}),function(e,t){var n=x,r=u,i=v,a=_,o=h,s=g,l=Mn,y=Xn;return H(),M(`div`,Le,[P(l,{ref_key:`formRef`,ref:d,model:q(f),rules:m},{default:Z(function(){return[P(r,{label:e.$t(`Site.PHP.add_site_16`),path:`db_idx`},{default:Z(function(){return[k(`div`,ct,[P(n,{value:q(f).db_idx,"onUpdate:value":t[0]||(t[0]=function(e){return q(f).db_idx=e}),options:q(p),disabled:q(c)},null,8,[`value`,`options`,`disabled`])])]}),_:1},8,[`label`]),P(r,{label:e.$t(`Database.redis.index_2`),path:`name`},{default:Z(function(){return[k(`div`,xt,[P(i,{value:q(f).name,"onUpdate:value":t[1]||(t[1]=function(e){return q(f).name=e}),disabled:q(c),placeholder:e.$t(`Database.redis.index_1`)},null,8,[`value`,`disabled`,`placeholder`])])]}),_:1},8,[`label`]),P(r,{label:e.$t(`Database.redis.index_3`),path:`val`},{default:Z(function(){return[k(`div`,Nt,[P(i,{value:q(f).val,"onUpdate:value":t[2]||(t[2]=function(e){return q(f).val=e}),type:`textarea`,autosize:{minRows:4,maxRows:4},placeholder:e.$t(`Database.redis.index_4`)},null,8,[`value`,`placeholder`])])]}),_:1},8,[`label`]),P(r,{label:e.$t(`Database.redis.index_5`),"show-feedback":!1},{default:Z(function(){return[k(`div`,Ht,[P(s,null,{default:Z(function(){return[P(a,{value:q(f).endtime,"onUpdate:value":t[3]||(t[3]=function(e){return q(f).endtime=e}),class:`flex-1`,min:0,"show-button":!1,placeholder:e.$t(`Database.redis.index_6`)},null,8,[`value`,`placeholder`]),P(o,null,{default:Z(function(){return Is(t[4]||(t[4]=[N(`sec`,-1)]))}),_:1})]}),_:1})])]}),_:1},8,[`label`])]}),_:1},8,[`model`]),P(y,{class:`mt-24px px-20px`},{default:Z(function(){return[k(`li`,null,G(e.$t(`Database.redis.index_7`)),1)]}),_:1})])}}}),bn=E({default:function(){return yn}}),yn=ia,R(),Fe={class:`p-20px`},ra=L({__name:`index`,props:{data:{}},setup:function(e){var t=Y().t,n=e.data.sid,r=F(),a=function(){return Q(function(){return $(this,function(e){switch(e.label){case 0:if(n===null)throw V.error(t(`Database.redis.index_8`)),Error(t(`Database.redis.index_9`));return[4,Dn({sid:n})];case 1:return e.sent(),f(),[2]}})})()},o=hs([{key:`name`,title:t(`Database.redis.index_36`),width:180,ellipsis:{tooltip:{width:`trigger`}}},{key:`filepath`,title:t(`Database.redis.index_10`),ellipsis:{tooltip:{width:`trigger`}}},{key:`mtime`,title:t(`Site.TableRow.index_25`),width:150,render:function(e){return Lr(e.mtime)}},{key:`size`,title:t(`Site.TableRow.index_23`),width:80,render:function(e){return Gr(e.size)}},{key:`sid`,title:t(`Database.redis.index_11`),width:120,render:function(e){for(var t=`--`,n=0;n<r.remoteList.length;n++)if(``.concat(r.remoteList[n].id)===e.sid){t=r.remoteList[n].ps||r.remoteList[n].db_host;break}return t}},is({width:120,options:function(e){return[{label:t(`Database.tools.index_3`),onClick:function(){gs({text:t(`Database.redis.index_12`),title:t(`Database.redis.index_12`),content:t(`Database.redis.index_13`,[e.name]),onConfirm:function(i){var a=i.hide;return Q(function(){return $(this,function(i){switch(i.label){case 0:if(n===null)throw Error(t(`Database.redis.index_9`));return[4,mo({file:e.filepath,sid:n})];case 1:return i.sent(),r.setRefresh(!0),a(),[2]}})})()}})}},{label:t(`Public.Btn.Del`),onClick:function(){J({title:t(`Database.redis.index_14`),content:t(`Database.redis.index_15`,[e.name]),onConfirm:function(t){var n=t.hide;return Q(function(){return $(this,function(t){switch(t.label){case 0:return[4,wr({file:e.filepath})];case 1:return t.sent(),f(),n(),[2]}})})()}})}}]}})]),s=o.table,c=o.columns,l=X(),u=l.loading,d=l.setLoading,f=function(){return Q(function(){var e;return $(this,function(t){switch(t.label){case 0:return t.trys.push([0,,2,3]),d(!0),[4,mi()];case 1:return e=t.sent().message,s.data=pa(e)?e:[],[3,3];case 2:return d(!1),[7];case 3:return[2]}})})()};return f(),function(e,t){var n=i,r=Gn,o=Un;return H(),M(`div`,Fe,[P(o,null,{toolsLeft:Z(function(){return[P(n,{type:`primary`,onClick:a},{default:Z(function(){return[N(G(e.$t(`Database.index_16`)),1)]}),_:1})]}),table:Z(function(){return[P(r,{"max-height":400,loading:q(u),columns:q(c),data:q(s).data},null,8,[`loading`,`columns`,`data`])]}),_:1})])}}}),jn=E({default:function(){return An}}),An=ra,R(),we={class:`p-20px`},nt={class:`w-220px`},qi=L({__name:`index`,props:{data:{}},setup:function(e,t){var n=t.expose,r=Y().t,i=e.data,a=i.sid,o=i.databaseList,s=F(),c=W([]),l=sr(function(){return o.map(function(e){return{label:e.name,value:e.id}})});return n({onConfirm:function(e){var t=e.hide;if(a===null){V.error(r(`Database.redis.index_8`));return}if(c.value.length===0){V.error(r(`Database.redis.index_17`));return}J({title:r(`Database.redis.index_18`),content:r(`Database.redis.index_19`),onConfirm:function(e){var n=e.hide;return Q(function(){return $(this,function(e){switch(e.label){case 0:return[4,rr({sid:a,ids:c.value})];case 1:return e.sent(),s.setRefresh(!0),n(),t(),[2]}})})()}})}}),function(e,t){var n=w,r=u,i=Mn;return H(),M(`div`,we,[P(i,null,{default:Z(function(){return[P(r,{label:e.$t(`Database.redis.index_16`),"show-feedback":!1},{default:Z(function(){return[k(`div`,nt,[P(n,{value:q(c),"onUpdate:value":t[0]||(t[0]=function(e){return B(c)?c.value=e:null}),options:q(l)},null,8,[`value`,`options`])])]}),_:1},8,[`label`])]}),_:1})])}}}),ar=E({default:function(){return ir}}),ir=fn(qi,[[`__scopeId`,`data-v-cce6d97b`]]),R(),R(),la(),pe={class:`p-16px`},Ge={class:`flex flex-wrap justify-between mb-12px`},gt={class:`flex items-center text-warning`},At={class:`ml-4px`},Ii=L({__name:`index`,setup:function(e){var t=Y().t,n=I(function(){return D(function(){return Promise.resolve().then(function(){return bn})},void 0)}),r=I(function(){return D(function(){return Promise.resolve().then(function(){return jn})},void 0)}),o=I(function(){return D(function(){return Promise.resolve().then(function(){return ar})},void 0)}),c=F(),u=W(null),f=Vo([]),p=ss(``,{row:void 0,sid:null,dbIdx:0,isEdit:!1}),m=function(){p.data.dbIdx=b.db_idx,p.data.row=void 0,p.data.sid=u.value,p.data.isEdit=!1,p.title=t(`Database.redis.index_20`),p.show=!0},h=function(e){p.data.dbIdx=b.db_idx,p.data.row=e,p.data.sid=u.value,p.data.isEdit=!0,p.title=``.concat(t(`Database.redis.index_25`),` [`,e.name,`]`),p.show=!0},g=ss(t(`Database.redis.index_26`),{sid:null}),_=function(){g.data.sid=u.value,g.show=!0},v=ss(t(`Database.redis.index_27`),{sid:null,databaseList:[]}),y=function(){v.data.sid=u.value,v.data.databaseList=f.value,v.show=!0},b=U({db_idx:-1,db_type:0,p:1,limit:20,search:``}),x=hs([{type:`selection`,width:40},{key:`name`,title:t(`Database.redis.index_2`),width:`20%`,minWidth:120,ellipsis:{tooltip:{width:`trigger`}}},mc(),{key:`type`,title:t(`Database.redis.index_28`),width:`10%`,minWidth:100,render:function(e){return Qn(e.type)}},{key:`len`,title:t(`Database.redis.index_29`),width:`10%`,minWidth:100},{key:`endtime`,title:t(`Database.redis.index_5`),width:`10%`,minWidth:100,render:function(e){return e.endtime===0?t(`Database.redis.index_30`):yi(e.endtime)}},is({width:100,options:function(e){return[{label:t(`Public.Btn.Edit`),onClick:function(){h(e)}},{label:t(`Public.Btn.Del`),onClick:function(){J({title:t(`Database.redis.index_31`),content:t(`Database.redis.index_31`,[e.name]),onConfirm:function(t){var n=t.hide;return Q(function(){return $(this,function(t){switch(t.label){case 0:return u.value===null||b.db_idx===-1?[2]:[4,Tr({sid:u.value,key:e.name,db_idx:b.db_idx})];case 1:return t.sent(),C.data.length===1&&(b.db_idx=-1),ie(),n(),[2]}})})()}})}}]}})]),S=x.keys,C=x.table,w=x.columns,T=[{key:`del`,type:`confirm`,label:t(`Public.Batch.ChooseDel`),confirm:{title:t(`Database.redis.index_33`),desc:t(`Database.redis.index_34`),columns:[{key:`name`,title:t(`Database.redis.index_2`),ellipsis:{tooltip:{width:`trigger`}}}],api:function(e){return Q(function(){return $(this,function(t){switch(t.label){case 0:return u.value===null||b.db_idx===-1?[2]:[4,Tr({sid:u.value,key:e.name,db_idx:b.db_idx},!1)];case 1:return t.sent(),[2]}})})()},done:function(e){C.total===e.length&&(b.db_idx=-1),ie()}}}],E=function(){return Q(function(){var e;return $(this,function(t){switch(t.label){case 0:return u.value===null?[2]:[4,gi({sid:u.value})];case 1:return e=t.sent().message,pa(e)&&e.length>0?(f.value=e,b.db_idx===-1&&(b.db_idx=e[0].id)):(f.value=[],C.data=[],C.total=0,b.db_idx=-1),[2]}})})()},O=X(),te=O.loading,ne=O.setLoading,re=function(){return Q(function(){var e,t;return $(this,function(n){switch(n.label){case 0:return n.trys.push([0,,2,3]),ne(!0),e=u.value,e===null||f.value.length<=0||b.db_idx===-1?[2]:[4,hi(Ms({sid:e},K(b)))];case 1:return t=n.sent().message,z(t)?(C.data=pa(t.data)?t.data:[],C.total=ci(t.page)):(C.data=[],C.total=0),[3,3];case 2:return S.value=[],ne(!1),[7];case 3:return[2]}})})()},ie=function(){return Q(function(){return $(this,function(e){switch(e.label){case 0:return[4,E()];case 1:return e.sent(),[4,re()];case 2:return e.sent(),[2]}})})()};xs(function(){return c.isRefresh},function(e){e&&(c.setRefresh(!1),c.addRedisId!==-1&&c.addRedisId!==b.db_idx&&(b.db_idx=c.addRedisId,c.setAddRedisId(-1)),ie())});var ae=function(){c.remoteList.length>0&&(u.value=c.remoteList[0].id)};return function(){return Q(function(){return $(this,function(e){switch(e.label){case 0:return[4,c.getRemote()];case 1:return e.sent(),c.install?(ae(),[4,E()]):[3,4];case 2:return e.sent(),[4,re()];case 3:return e.sent(),[3,5];case 4:ba(),e.label=5;case 5:return[2]}})})()}(),function(e,t){var h=i,x=s,D=Bn,O=l,ne=Nn,ie=ee,ae=Jn,oe=zn,se=Gn,ce=Hn,le=Kn,ue=Un,de=Rn,fe=a;return H(),A(q(fa),null,{default:Z(function(){return[P(fe,null,{default:Z(function(){return[k(`div`,pe,[k(`div`,Ge,[P(O,{class:`items-center`},{default:Z(function(){return[P(h,{type:`primary`,onClick:m},{default:Z(function(){return[N(G(e.$t(`Database.redis.index_20`)),1)]}),_:1}),P(h,{onClick:q(Us)},{default:Z(function(){return[N(G(e.$t(`Database.index_4`)),1)]}),_:1},8,[`onClick`]),P(h,{onClick:_},{default:Z(function(){return[N(G(e.$t(`Database.redis.index_21`)),1)]}),_:1}),P(x,{class:`mx-0!`,vertical:``}),P(h,{onClick:y},{default:Z(function(){return[N(G(e.$t(`Database.redis.index_22`)),1)]}),_:1}),q(c).isInstallRedis?(H(),A(D,{key:0,"soft-name":`redis`})):j(``,!0)]}),_:1}),P(O,{class:`items-center`},{default:Z(function(){return[k(`div`,gt,[P(ne,{name:`base-info`,size:`14`}),k(`span`,At,G(e.$t(`Database.redis.index_23`)),1)]),P(q(so),{value:q(u),"onUpdate:value":t[0]||(t[0]=function(e){return B(u)?u.value=e:null}),all:!1,"store-key":`database-redis-page`,onChange:E},null,8,[`value`])]}),_:1})]),q(f).length>0?(H(),A(ae,{key:0,value:q(b).db_idx,"onUpdate:value":[t[1]||(t[1]=function(e){return q(b).db_idx=e}),re]},{default:Z(function(){return[(H(!0),M(d,null,uo(q(f),function(e){return H(),A(ie,{key:e.id,name:e.id},{tab:Z(function(){return[N(G(e.name)+` (`,1),k(`span`,{class:Ua({"text-warning":e.keynum!==0})},G(e.keynum),3),t[10]||(t[10]=N(`) `,-1))]}),_:2},1032,[`name`])}),128))]}),_:1},8,[`value`])):j(``,!0),P(ue,null,{toolsLeft:Z(function(){return Is(t[11]||(t[11]=[k(`div`,null,null,-1)]))}),toolsRight:Z(function(){return[P(jr),P(oe,{value:q(b).search,"onUpdate:value":t[2]||(t[2]=function(e){return q(b).search=e}),placeholder:e.$t(`Database.redis.index_24`),onSearch:re},null,8,[`value`,`placeholder`])]}),table:Z(function(){return[P(se,{"checked-row-keys":q(S),"onUpdate:checkedRowKeys":t[3]||(t[3]=function(e){return B(S)?S.value=e:null}),"row-key":`name`,loading:q(te),data:q(C).data,columns:q(w)},null,8,[`checked-row-keys`,`loading`,`data`,`columns`])]}),pageLeft:Z(function(){return[P(ce,{"checked-row-keys":q(S),"onUpdate:checkedRowKeys":t[4]||(t[4]=function(e){return B(S)?S.value=e:null}),"row-key":`name`,data:q(C).data,options:T},null,8,[`checked-row-keys`,`data`])]}),pageRight:Z(function(){return[P(le,{page:q(b).p,"onUpdate:page":t[5]||(t[5]=function(e){return q(b).p=e}),"page-size":q(b).limit,"onUpdate:pageSize":t[6]||(t[6]=function(e){return q(b).limit=e}),"store-key":`database-redis-page`,"item-count":q(C).total,onRefresh:re},null,8,[`page`,`page-size`,`item-count`])]}),_:1}),P(de,{show:q(p).show,"onUpdate:show":t[7]||(t[7]=function(e){return q(p).show=e}),title:q(p).title,width:450,"min-height":340,footer:!0,data:q(p).data,component:q(n)},null,8,[`show`,`title`,`data`,`component`]),P(de,{show:q(g).show,"onUpdate:show":t[8]||(t[8]=function(e){return q(g).show=e}),title:q(g).title,width:920,"min-height":156,footer:!1,data:q(g).data,component:q(r)},null,8,[`show`,`title`,`data`,`component`]),P(de,{show:q(v).show,"onUpdate:show":t[9]||(t[9]=function(e){return q(v).show=e}),title:q(v).title,width:420,"min-height":240,footer:!0,data:q(v).data,component:q(o)},null,8,[`show`,`title`,`data`,`component`])])]}),_:1})]}),_:1})}}}),e(`n`,E({default:function(){return io}})),io=Ii,R(),ne={class:`w-240px`},We={class:`w-240px`},ht={class:`w-240px`},kt={class:`w-240px`},Vt={class:`ml-8px`},Ti=L({__name:`index`,setup:function(e,t){var n=t.expose,r=Y().t,i=F(),a=Uo(i).remoteList,o=W(null),s=U({sid:a.value.length>0?a.value[0].id:null,name:``,db_user:``,password:``,active:!1,ssl:``}),c=sr(function(){return a.value.map(function(e){return{label:``.concat(e.ps,` (`,e.db_host,`)`),value:e.id}})}),l={name:{required:!0,message:r(`Database.form.index_15`),trigger:[`blur`,`change`]},db_user:{required:!0,message:r(`Database.form.index_16`),trigger:[`blur`,`change`]},password:{required:!0,message:r(`Database.form.index_17`),trigger:[`blur`,`change`]},sid:{trigger:`change`,validator:function(e,t){return t!==null||Error(r(`Database.form.index_18`))}}},d=function(e){s.db_user=e},f=function(){Us()},p=function(){var e=K(s),t=e.sid;if(t===null)throw V.error(r(`Database.form.index_18`)),Error(r(`Database.form.index_18`));return Ps(Ms({},e),{sid:t,ps:e.name})};return n({onConfirm:function(){return Q(function(){var e,t,n;return $(this,function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),[4,(e=o.value)==null?void 0:e.validate()];case 1:return r.sent(),t=p(),[4,pn(i.type,t)];case 2:return r.sent(),i.setRefresh(!0),[3,4];case 3:return n=r.sent(),console.warn(n),[3,4];case 4:return[2]}})})()}}),function(e,t){var n=v,r=u,i=Pn,a=x,p=In,m=Mn;return H(),A(m,{ref_key:`formRef`,ref:o,model:q(s),rules:l,class:`p-20px`},{default:Z(function(){return[P(r,{label:e.$t(`Database.index_12`),path:`name`},{default:Z(function(){return[k(`div`,ne,[P(n,{value:q(s).name,"onUpdate:value":[t[0]||(t[0]=function(e){return q(s).name=e}),d],placeholder:e.$t(`Database.form.index_2`),"input-props":{name:`name`}},null,8,[`value`,`placeholder`])])]}),_:1},8,[`label`]),P(r,{label:e.$t(`Database.index_13`),path:`db_user`},{default:Z(function(){return[k(`div`,We,[P(n,{value:q(s).db_user,"onUpdate:value":t[1]||(t[1]=function(e){return q(s).db_user=e}),placeholder:`Database user`,"input-props":{name:`user`}},null,8,[`value`])])]}),_:1},8,[`label`]),P(r,{label:e.$t(`Database.index_14`),path:`password`},{default:Z(function(){return[k(`div`,ht,[P(i,{value:q(s).password,"onUpdate:value":t[2]||(t[2]=function(e){return q(s).password=e}),"input-props":{name:`password`}},null,8,[`value`])])]}),_:1},8,[`label`]),P(r,{label:e.$t(`Database.form.index_9`),path:`sid`},{default:Z(function(){return[k(`div`,kt,[P(a,{value:q(s).sid,"onUpdate:value":t[3]||(t[3]=function(e){return q(s).sid=e}),class:`server-select`,options:q(c)},null,8,[`value`,`options`])]),k(`div`,Vt,[P(p,{onClick:f},{default:Z(function(){return[N(G(e.$t(`Database.form.index_10`)),1)]}),_:1})])]}),_:1},8,[`label`])]}),_:1},8,[`model`])}}}),gr=E({default:function(){return pr}}),pr=Ti,R(),Jo=xi.global.t,R(),la(),te={class:`p-16px`},wi=L({__name:`index`,setup:function(e){var t=Y().t,n=I(function(){return D(function(){return Promise.resolve().then(function(){return gr})},void 0)}),r=F(),o=ss(),c=function(){o.show=!0},l=function(){Us()},u=function(){return Q(function(){return $(this,function(e){switch(e.label){case 0:return[4,Go(r.type,{ids:[]})];case 1:return e.sent(),x(),[2]}})})()},d=hs([{type:`selection`,width:40},{key:`name`,title:t(`Database.index_12`),width:`12%`,minWidth:120},{key:`username`,title:t(`Database.index_13`),width:`12%`,minWidth:120},hc(),gc(),ds({onBlur:function(e,t){return Q(function(){return $(this,function(n){switch(n.label){case 0:return[4,Do({id:t.id,ps:e})];case 1:return n.sent(),[2]}})})()}}),is({width:140,options:function(e){return[{label:`Password`,onClick:function(){Ys(e)}},{label:t(`Public.Btn.Del`),onClick:function(){Xs([e])}}]}})]),f=d.keys,p=d.table,m=d.columns,h=[{key:`sync`,label:t(`Database.index_24`),onBatch:function(e){J({title:t(`Database.index_25`),content:t(`Database.index_26`),onConfirm:function(t){var n=t.hide;return Q(function(){return $(this,function(t){switch(t.label){case 0:return[4,Go(r.type,{ids:e.map(function(e){return e.id})})];case 1:return t.sent(),n(),[2]}})})()}})}},{key:`backup`,type:`confirm`,label:t(`Database.index_27`),confirm:{title:t(`Database.index_28`),desc:t(`Database.index_29`),api:function(e){return es(r.type,{id:e.id},!1)},done:function(){x()},columns:[{key:`name`,title:t(`Database.index_12`)}]}},{key:`delete`,label:t(`Database.index_30`),onBatch:function(e){Xs(e)}}],g=X(),_=g.loading,v=g.setLoading,y=U({p:1,limit:10,sid:-1,search:``}),b=function(){var e=Ms({},K(y));return e.sid===-1&&delete e.sid,e},x=function(){return Q(function(){var e;return $(this,function(t){switch(t.label){case 0:return t.trys.push([0,,2,3]),v(!0),[4,Yr(r.type,b())];case 1:return e=t.sent().message,z(e)?(p.data=pa(e.data)?e.data:[],p.total=ci(e.page)):(p.data=[],p.total=0),[3,3];case 2:return f.value=[],v(!1),[7];case 3:return[2]}})})()};return xs(function(){return r.isRefresh},function(e){e&&(r.setRefresh(!1),r.delRemoteId===y.sid&&(y.sid=-1),x())}),function(){return Q(function(){return $(this,function(e){switch(e.label){case 0:return[4,r.getRemote()];case 1:return e.sent(),r.install&&x(),[2]}})})()}(),function(e,t){var r=i,d=s,g=zn,v=Gn,b=Hn,S=Kn,C=Un,ee=Rn,w=a;return H(),A(q(fa),null,{default:Z(function(){return[P(w,null,{default:Z(function(){return[k(`div`,te,[P(C,{feedback:!0},{toolsLeft:Z(function(){return[P(r,{type:`primary`,onClick:c},{default:Z(function(){return[N(G(e.$t(`Database.index_1`)),1)]}),_:1}),P(r,{onClick:l},{default:Z(function(){return[N(G(e.$t(`Database.index_4`)),1)]}),_:1}),P(d,{class:`mx-0!`,vertical:``}),P(r,{onClick:u},{default:Z(function(){return[N(G(e.$t(`Database.index_5`)),1)]}),_:1}),P(r,{onClick:q(Ks)},{default:Z(function(){return[N(G(e.$t(`Database.index_6`)),1)]}),_:1},8,[`onClick`])]}),toolsRight:Z(function(){return[P(q(so),{value:q(y).sid,"onUpdate:value":t[0]||(t[0]=function(e){return q(y).sid=e}),"store-key":`database-sqlserver-page`,onChange:x},null,8,[`value`]),P(g,{value:q(y).search,"onUpdate:value":t[1]||(t[1]=function(e){return q(y).search=e}),placeholder:`Database search`,onSearch:x},null,8,[`value`])]}),table:Z(function(){return[P(v,{"checked-row-keys":q(f),"onUpdate:checkedRowKeys":t[2]||(t[2]=function(e){return B(f)?f.value=e:null}),loading:q(_),data:q(p).data,columns:q(m)},null,8,[`checked-row-keys`,`loading`,`data`,`columns`])]}),pageLeft:Z(function(){return[P(b,{"checked-row-keys":q(f),"onUpdate:checkedRowKeys":t[3]||(t[3]=function(e){return B(f)?f.value=e:null}),data:q(p).data,options:h},null,8,[`checked-row-keys`,`data`])]}),pageRight:Z(function(){return[P(S,{page:q(y).p,"onUpdate:page":t[4]||(t[4]=function(e){return q(y).p=e}),"page-size":q(y).limit,"onUpdate:pageSize":t[5]||(t[5]=function(e){return q(y).limit=e}),"item-count":q(p).total,onRefresh:x},null,8,[`page`,`page-size`,`item-count`])]}),_:1}),P(ee,{show:q(o).show,"onUpdate:show":t[6]||(t[6]=function(e){return q(o).show=e}),title:e.$t(`Database.mongo.index_4`),width:540,"min-height":280,footer:!0,component:q(n)},null,8,[`show`,`title`,`component`])])]}),_:1})]}),_:1})}}}),e(`t`,E({default:function(){return Ho}})),Ho=wi}}})})(); |