"use strict";exports.id=5392,exports.ids=[5392],exports.modules={53926:(e,s,t)=>{t.d(s,{A:()=>i});vara=t(8732),r=t(82015),n=t.n(r);functioni({confirmedDelegetedUser:e,linksArray:s,user:t}){let[r,i]=n().useState(s||null);returnr&&r[1]?(0,a.jsx)("div",{className:"text-sm mt-2 flex-wrap",children:r.map((e,s,t)=>s===r.length-1?(0,a.jsx)("a",{href:e.path,className:"text-slate-400 dark:text-slate-500 pointer-events-none",children:e.title},s):(0,a.jsxs)(n().Fragment,{children:[(0,a.jsx)("a",{href:e.path,className:"query-url",children:e.title}),(0,a.jsx)("span",{className:"opacity-20",children:"|"})]},s))}):(0,a.jsx)(n().Fragment,{})}},87639:(e,s,t)=>{t.d(s,{A:()=>x});vara=t(8732),r=t(82015),n=t.n(r);t(46169);vari=t(72390),l=t(16757),c=t(66916),o=t(66918),d=t(23293);functionx(){let[e,s]=n().useState(!0),[t,r]=n().useState(0),[x,h]=n().useState(0);returne?(0,a.jsx)("div",{className:"button ghost small-text",style:{height:"30px"},children:(0,a.jsx)(l.A,{width:"15px",position:"relative"})}):(0,a.jsx)(n().Fragment,{children:t?(0,a.jsxs)("div",{className:"button ghost small-text normal-weight p-0",style:{height:"30px",padding:0},onClick:e=>{s(!0),(0,i.A)().then(()=>{h(e=>e+1),s(!1)})},children:[e&&(0,a.jsx)(l.A,{width:"15px"}),(0,a.jsx)(c.A,{size:20,className:"text-slate-400 mr-[3px]"}),(0,a.jsx)("span",{className:"font-bold text-slate-700 dark:text-white",children:t&&t.toFixed(2)}),(0,a.jsx)("span",{className:"text-slate-500",children:"mb"}),(0,a.jsx)(o.A,{size:17,className:"text-slate-400",strokeWidth:2})]}):(0,a.jsxs)("span",{className:"text-sm info gray font-normal w-auto",children:[(0,a.jsx)(d.A,{}),(0,a.jsx)("span",{children:"No Disk Usage Data Available Yet"})]})})}},92702:(e,s,t)=>{t.d(s,{A:()=>c});vara=t(71934),r=t(71205),n=t(29021),i=t.n(n),l=t(41939);asyncfunctionc(e,s,t){try{let{keyCookieName:n,csrfCookieName:c}=(0,l.A)();if(!e.cookies?.[n]?.match(/./))throwError("Request Cookies not Found!");leto=(0,r.A)({encryptedString:e.cookies[n]});if(!o)throwError("Couldn't decrypt auth cookie!");letd=JSON.parse(o);if(!d.csrf_k)throwError("No `csrf_k` present in user Object!");if(t&&!Object.keys(e.headers).find(e=>e.includes(d.csrf_k)))throwconsole.log("req.headers",e.headers),console.log("userObject",d),Error("Deep Auth Failed. `csrf` key not found in request headers!");letx=process.env.DSQL_USER_LOGIN_KEYS_PATH;if(!x)throwError("DSQL_USER_LOGIN_KEYS_PATH env variable not found. Please set this variable.");if(t&&!i().existsSync(`${x}/${d.csrf_k}`))throwError("Key not found in Auth Keys Folder!");if(0==d.verification_status&&!t){lete=await(0,a.A)(`SELECT verification_status FROM users WHERE id='${d.id}'`);e&&e[0]&&1==e[0].verification_status&&s.setHeader("Set-Cookie",["user_refresh=1"])}if(d?.date&&Date.now()-d.date>6048e5)throwError("Key expired!");returnd}catch(e){returnconsole.log(`userAuth Error: ${e.message}`),null}}},72390:(e,s,t)=>{t.d(s,{A:()=>r});vara=t(46169);asyncfunctionr(){lete=await(0,a.A)("/api/getDiskUsage");localStorage.setItem("disk_usage",e.total)}},89923:(e,s,t)=>{t.d(s,{A:()=>a});functiona(e,s){returns?!!(e?.id&&String(e?.id)==(process.env.DSQL_SU_USER_ID||"1")):!!(e?.id&&"1"==String(e?.id))}},25562:(e,s,t)=>{t.d(s,{A:()=>N});vara=t(8732),r=t(82015),n=t.n(r),i=t(27912),l=t.n(i),c=t(50139),o=t(52070),d=t(34637),x=t(83158),h=t(25294),m=t(92441),u=t(29743),p=t(10643),j=t(10321),f=t(89923);functiong({user:e}){let[s,t]=n().useState(!0);return(0,a.jsxs)("aside",{className:"aside"+(s?" mobile-collapsed":" mobile-expanded"),children:[(0,a.jsx)(c.A,{adminAside:!0,collapseAsideMobile:s,setCollapseAsideMobile:t}),(0,a.jsx)("hr",{className:"opacity-0 mt-4"}),(0,a.jsxs)("div",{className:"main-links"+(s?" hidden lg:flex":" "),children:[(0,a.jsxs)("a",{href:"/admin","data-currentlink":"/admin","data-strictlink":"true",children:[(0,a.jsx)(o.A,{size:20}),(0,a.jsx)("span",{children:"Dashboard"})]}),(0,a.jsxs)("a",{href:`/admin/${e?.id}/databases`,"data-currentlink":`/admin/${e?.id}/databases`,children:[(0,a.jsx)(d.A,{size:20}),(0,a.jsx)("span",{children:"Databases"})]}),(0,a.jsxs)("a",{href:`/adm