dsql-admin/dsql-app/.local_dist/server/pages/su/users/[single].js
Benjamin Toby 3ffd2d6777 Updates
2024-12-05 08:03:33 +01:00

1 line
21 KiB
JavaScript

"use strict";(()=>{var e={};e.id=3632,e.ids=[636,3632],e.modules={63709:(e,t,s)=>{s.r(t),s.d(t,{config:()=>er,default:()=>X,getServerSideProps:()=>es,getStaticPaths:()=>et,getStaticProps:()=>ee,reportWebVitals:()=>ea,routeModule:()=>eu,unstable_getServerProps:()=>ec,unstable_getServerSideProps:()=>eo,unstable_getStaticParams:()=>en,unstable_getStaticPaths:()=>el,unstable_getStaticProps:()=>ei});var r={};s.r(r),s.d(r,{default:()=>Y,getServerSideProps:()=>Z});var a=s(63865),i=s(9455),l=s(30671),n=s(49407),c=s(68268),o=s(8732),u=s(82015),d=s.n(u),p=s(93615),x=s.n(p),h=s(64987),m=s(21498),j=s(46437),f=s(32415),y=s(63715),g=s(94081);function v({user:e,refresh:t,setRefresh:s}){let[r,a]=d().useState(!1),[i,l]=d().useState([]);return(0,o.jsxs)("section",{className:"paper",children:[(0,o.jsx)("h2",{className:"text-xl m-0",children:"User Backups"}),!i&&(0,o.jsx)(f.A,{width:"20px",position:"relative"}),i&&!i[0]&&(0,o.jsx)("div",{children:"This user has no backups"}),i&&i[0]&&i.sort((e,t)=>parseInt(e)>parseInt(t)?-1:1).map((t,s)=>{let r=new Date(parseInt(t));return(0,o.jsxs)("a",{href:`/su/users/${e.id}/${t}`,className:"card w-full items-center",children:[(0,o.jsx)(g.A,{color:"inherit",className:"opacity-40 text-slate-500"}),(0,o.jsx)("b",{children:"Backup:"}),(0,o.jsx)("span",{children:r.toString()})]},t)})]})}var b=s(34844),w=s(8203),S=s(48407),q=s(85781);function k({user:e,file:t,activeFile:s,setActiveFile:r}){return(0,o.jsxs)("button",{className:"justify-start gap-4"+(s?.path===`${t.root}/${t.name}`?" dark":" light-gray"),onClick:s=>{(0,y.A)("/api/admin/grabFile",{method:"post",body:{user:e,type:"file",path:`${t.root}/${t.name}`}}).then(e=>{if(e.success)try{r({title:t.name,path:`${t.root}/${t.name}`,data:JSON.stringify(JSON.parse(e.data),null,4)})}catch(s){r({title:t.name,path:`${t.root}/${t.name}`,data:e.data})}})},children:[(0,o.jsx)(q.A,{fontSize:"small",className:"text-slate-400"}),t.name]})}function N({user:e,file:t,activeFile:s,setActiveFile:r}){let[a,i]=d().useState(null),[l,n]=d().useState(!1);return(0,o.jsxs)("div",{className:"flex-col w-full items-start relative",children:[(0,o.jsxs)("div",{children:[(0,o.jsx)(w.A,{fontSize:"small",className:"text-slate-400"}),t.name,(0,o.jsx)(S.A,{className:"ml-auto absolute right-2"})]}),t.content&&(0,o.jsx)("div",{className:"flex-col w-full pl-4 items-start ml-2",style:{borderLeft:"1px solid var(--slate-200)"},children:t.content.map((t,a)=>t?.type?.match(/file/i)?(0,o.jsx)(k,{user:e,file:t,activeFile:s,setActiveFile:r},a):(0,o.jsx)(N,{user:e,file:t,activeFile:s,setActiveFile:r},a))})]})}function A({user:e,rootFilesArray:t}){let[s,r]=d().useState(null);return(0,o.jsxs)("section",{className:"paper",children:[(0,o.jsx)("h3",{className:"text-lg m-0",children:"User Files"}),(0,o.jsxs)("div",{className:"w-full items-start max-w-7xl",children:[(0,o.jsx)("div",{className:"flex-col items-stretch w-[40%]",children:t.map((t,a)=>t?.type?.match(/file/)?(0,o.jsx)(k,{user:e,file:t,activeFile:s,setActiveFile:r},a):(0,o.jsx)(N,{user:e,file:t,activeFile:s,setActiveFile:r},a))}),(0,o.jsx)("div",{className:"grow flex-col items-start justify-start w-[60%] h-full -mt-4",children:s&&(0,o.jsx)(b.A,{content:s.data||"",language:"javascript"})})]})]})}s(58548);var M=s(90627),C=s(34043),F=s.n(C),P=s(7299),_=s.n(P),D=s(61919),L=s.n(D),R=s(34350),T=s.n(R),z=s(71757),E=s.n(z),H=s(79005),$=s.n(H),O=s(45561),V=s.n(O);let B=(0,M.styled)(L())(({theme:e})=>({[`&.${D.tableCellClasses.head}`]:{backgroundColor:"var(--slate-800)",color:"white"},[`&.${D.tableCellClasses.body}`]:{}}));function Q({data:e,user:t}){try{let t=Object.keys(e[0]);return(0,o.jsx)(d().Fragment,{children:(0,o.jsx)("div",{className:"p-4 bg-slate-200 rounded-md overflow-hidden w-full max-w-6xl",children:(0,o.jsx)(T(),{component:V(),sx:{width:"100%"},children:(0,o.jsxs)(F(),{sx:{minWidth:650},"aria-label":"simple table",children:[(0,o.jsx)(E(),{children:(0,o.jsx)($(),{children:t&&t[0]&&t.map((e,t)=>(0,o.jsx)(B,{align:"left",children:e},t+1))})}),(0,o.jsx)(_(),{children:e&&e[0]&&e.map((e,s)=>(0,o.jsx)($(),{sx:{"&:last-child td, &:last-child th":{border:0}},children:t.map((t,s)=>(0,o.jsx)(B,{align:"left",children:e[t]},s+1))},s+1))})]})})})})}catch(e){return(0,o.jsx)(d().Fragment,{children:(0,o.jsx)("span",{children:"No results"})})}}var U=s(51548);function W({user:e,databases:t}){try{let s=d().useRef(),r=d().useRef(),a=d().useRef(t[0]),[i,l]=d().useState(!1),[n,c]=d().useState(!1),[u,p]=d().useState(0),[x,h]=d().useState(t[0]),[m,j]=d().useState([]);return(0,o.jsxs)("div",{className:"paper w-full",children:[(0,o.jsx)("h3",{className:"text-lg m-0",children:(0,o.jsx)("span",{children:"Database Shell"})}),(0,o.jsxs)("div",{children:[(0,o.jsx)(U.A,{selectOptions:t.map(t=>({payload:t,title:t?.replace(RegExp(`datasquirel_user_${e.id}_`),"")})),name:"select-database",onChangeHandler:e=>{h(e.target.value),a.current=e.target.value},title:"Databases"}),x&&m&&(0,o.jsx)(U.A,{selectOptions:m.map(e=>({payload:e,title:e})),name:"select-database-table",title:"Tables"})]}),(0,o.jsxs)("div",{className:"w-full flex-col relative",children:[(0,o.jsx)("div",{ref:s,id:"ace-editor-wrapper",style:{height:"100px"}}),(0,o.jsxs)("button",{className:"absolute right-4 bottom-4"+(i?" pointer-events-none opacity-70":""),onClick:e=>{!function(){l(!0);let e=r.current?r.current.getValue():null;if(!e?.match(/./))return;let t=e.replace(/^--.*/gm,"").replace(/\n|\r|\n\r/gm,"").replace(/ {2,}/g," ");(0,y.A)("/api/admin/runUserDbQuery",{method:"post",body:{database:a.current,query:t}},!0).then(e=>{e.success?c(e.result):e.msg&&window.alert(e.msg),setTimeout(()=>{l(!1)},500)})}()},children:[i&&(0,o.jsx)(f.A,{position:"relative",width:"15px",borderWidth:"3px",style:{backgroundColor:"transparent"}}),i?"Running Query ...":"Run Query"]})]}),n&&!i&&(0,o.jsx)(Q,{data:n,user:e})]})}catch(e){return console.log(e),(0,o.jsx)(d().Fragment,{children:(0,o.jsx)("section",{className:"card",children:(0,o.jsx)("h2",{className:"text-xl m-0",children:"Shell not available at this time"})})})}}function I({user:e,refresh:t,setRefresh:s}){let[r,a]=d().useState(!1),[i,l]=d().useState(null),[n,c]=d().useState(null);return(0,o.jsxs)("div",{className:"paper w-full",children:[(0,o.jsx)("h2",{className:"text-xl m-0",children:"User Data"}),i&&(0,o.jsx)(A,{user:e,rootFilesArray:i}),n&&(0,o.jsx)(W,{user:e,databases:n})]})}function J({data:e}){let t=e.user,[s,r]=d().useState(0),[a,i]=d().useState(!1);return(0,o.jsxs)(d().Fragment,{children:[(0,o.jsxs)("div",{className:"w-full justify-between",children:[(0,o.jsxs)("div",{children:[(0,o.jsx)(j.A,{}),(0,o.jsxs)("h1",{className:"text-3xl m-0",children:[t.first_name," ",t.last_name]}),(0,o.jsx)("span",{className:"info w-auto gray font-normal",children:t.email})]}),(0,o.jsx)("div",{children:(0,o.jsxs)("button",{onClick:e=>{window.confirm(`Create a new backup for ${t.first_name}?`)&&(i(!0),(0,y.A)("/api/admin/addUserBackup",{method:"post",body:{user:t}}).then(e=>{console.log(e),e.success&&r(e=>e+1),setTimeout(()=>{i(!1)},1e3)}))},className:"relative",children:[a&&(0,o.jsx)(f.A,{width:"20px"}),"Backup User"]})})]}),(0,o.jsx)(m.A,{userObject:t,userPage:!0}),(0,o.jsx)(v,{user:t,refresh:s,setRefresh:r}),(0,o.jsx)(I,{user:t,refresh:s,setRefresh:r})]})}var G=s(67216),K=s.n(G);function Y({user:e,data:t}){let s=(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("title",{children:"User Dashboard | Datasquirel"}),(0,o.jsx)("meta",{name:"description",content:"Welcome to your data app"}),(0,o.jsxs)(d().Fragment,{children:[(0,o.jsx)("script",{src:"https://cdnjs.cloudflare.com/ajax/libs/ace/1.22.0/ace.min.js",integrity:"sha512-q6CTB0jS+VuJnSct82rVcWlI06LGzNjaG3CWenHWVUncRvc4UQMFkA3a5Ip880xr+lBx38FcHDclOxPdSg+sBw==",crossOrigin:"anonymous",referrerPolicy:"no-referrer"}),(0,o.jsx)("script",{src:"https://cdnjs.cloudflare.com/ajax/libs/ace/1.22.0/ext-language_tools.min.js",integrity:"sha512-6g6cvocV7eT/J8L44lL8gJKqq9onqQeYGgJO0DmrsYFcCfRl6wYkYA/KHS768r4QVTB4JxsCcMQ9gIezxpTCZw==",crossOrigin:"anonymous",referrerPolicy:"no-referrer"})]})]});return(0,o.jsx)(h.A,{head:s,user:e,children:(0,o.jsx)(J,{data:t})})}async function Z({req:e,res:t,query:s}){let r=await x()(e);if(!r?.logged_in_status)return{redirect:{destination:"/su/login",permanent:!1}};let a=await K()(`SELECT * FROM users WHERE id='${s.single}'`);return a?.[0]?{props:{user:r,data:{user:a?.[0]||{}}}}:{redirect:{destination:"/su/users",permanent:!1}}}let X=(0,l.M)(r,"default"),ee=(0,l.M)(r,"getStaticProps"),et=(0,l.M)(r,"getStaticPaths"),es=(0,l.M)(r,"getServerSideProps"),er=(0,l.M)(r,"config"),ea=(0,l.M)(r,"reportWebVitals"),ei=(0,l.M)(r,"unstable_getStaticProps"),el=(0,l.M)(r,"unstable_getStaticPaths"),en=(0,l.M)(r,"unstable_getStaticParams"),ec=(0,l.M)(r,"unstable_getServerProps"),eo=(0,l.M)(r,"unstable_getServerSideProps"),eu=new a.PagesRouteModule({definition:{kind:i.A.PAGES,page:"/su/users/[single]",pathname:"/su/users/[single]",bundlePath:"",filename:""},components:{App:c.default,Document:n.default},userland:r})},51548:(e,t,s)=>{s.d(t,{A:()=>i});var r=s(8732),a=s(58526);function i({selectOptions:e,name:t,onChangeHandler:s,required:i,setAlert:l,title:n,defaultValue:c,info:o,id:u}){try{function d(e){if(e.type.match(/enter/i)&&window.innerWidth<1200)return;let t=e.target.closest(".info-wrapper"),s=t.querySelector(".info-dropdown");if(e.type.match(/leave/i)&&!s.classList.contains("hidden")){s.classList.add("hidden");return}if(!(e.type.match(/leave/i)&&s.classList.contains("hidden"))){if(!t){s.classList.add("hidden");return}if(s.classList.contains("hidden")){s.classList.remove("hidden");return}s.classList.add("hidden")}}return(0,r.jsxs)("div",{className:"form-select-block flex items-start flex-col gap-0.5 w-full relative"+(o?" pr-8":""),children:[n&&(0,r.jsxs)("label",{htmlFor:t,children:[n,i?"":" (optional)"]}),(0,r.jsxs)("div",{className:"flex items-center w-full relative",children:[(0,r.jsx)("select",{name:t,id:u||t,className:"w-full bg-white",required:i,onChange:e=>{l&&l(null),e.target.classList.remove("warning"),s&&s(e)},defaultValue:c||void 0,children:e.map((e,t)=>{let{payload:s,title:a}=e;return(0,r.jsx)("option",{value:s,selected:!!e.default,children:a},t+1)})}),(0,r.jsx)(a.A,{className:"absolute right-2 text-base text-slate-500 pointer-events-none",size:20}),o&&(0,r.jsxs)("div",{className:"info-wrapper absolute -right-10 w-8 h-8 rounded-full bg-white flex items-center justify-center z-10",style:{top:"50%",transform:"translate(0,-50%)"},onMouseEnter:d,onMouseLeave:d,onClick:d,children:[(0,r.jsx)("img",{src:"/images/info-outlined-black.png",alt:"",className:"w-6 h-6 object-contain opacity-60 pointer-events-none"}),(0,r.jsx)("div",{className:"info-dropdown absolute top-9 right-0 bg-white w-52 md:w-96 p-2 sm:p-6 shadow-xl rounded hidden text-center border border-slate-300 border-solid",children:(0,r.jsx)("span",{children:o})}),(0,r.jsx)("div",{className:"absolute -top-2 w-12",style:{height:"45px"}})]})]})]})}catch(e){return console.log("ERROR in FormSelect =>",e),(0,r.jsx)("div",{children:"Form Select Error"})}}s(82015)},46437:(e,t,s)=>{s.d(t,{A:()=>i});var r=s(8732);s(82015);var a=s(42178);function i(){return(0,r.jsx)("button",{className:"outlined gray p-2 w-9 h-9 flex items-center justify-center rounded-full",onClick:e=>{window.history.back()},children:(0,r.jsx)(a.A,{color:"inherit",className:"opacity-50 text-black",fontSize:"small"})})}},58548:(e,t,s)=>{s.d(t,{A:()=>l});var r=s(8732),a=s(82015),i=s.n(a);function l({confirmedDelegetedUser:e,linksArray:t,user:s}){e?.delegated,e?.priviledges?.match(/Edit Tables/i),e?.priviledges?.match(/Delete Tables/i),e?.priviledges?.match(/Create Tables/i);let[a,l]=i().useState(t||null);return a&&a[1]?(0,r.jsx)("div",{className:"text-sm mt-2 flex-wrap",children:a.map((e,t,s)=>t===a.length-1?(0,r.jsx)("a",{href:e.path,className:"text-slate-400 dark:text-slate-500 pointer-events-none",children:e.title},t):(0,r.jsxs)(i().Fragment,{children:[(0,r.jsx)("a",{href:e.path,className:"query-url",children:e.title}),(0,r.jsx)("span",{className:"opacity-20",children:"|"})]},t))}):(0,r.jsx)(i().Fragment,{})}},34844:(e,t,s)=>{s.d(t,{A:()=>o});var r=s(8732),a=s(82015),i=s.n(a),l=s(11790),n=s.n(l),c=s(96089);function o({content:e,language:t,style:s,showCopy:a}){let[l,o]=i().useState(!1),u=()=>{o(!0)},d=(e,t)=>{"clickaway"!==t&&o(!1)},p=(0,r.jsx)(i().Fragment,{children:(0,r.jsx)("button",{className:"outlined gray",style:{border:"none",padding:"2px",width:"20px",height:"20px",color:"white"},onClick:d,children:"✖"})}),x={};return(0,r.jsxs)("pre",{className:`language-${t||"javascript"} w-auto overflow-hidden skip-js code-block relative max-w-4xl flex items-center justify-center`,style:s?{...s,...x}:x,children:[(0,r.jsx)("code",{className:"w-auto px-10",style:{wordBreak:"break-all"},children:e}),(0,r.jsx)("button",{className:"outlined copy-code "+(a?"relative show":" absolute right-2 z-20 hover:opacity-50"),style:{padding:"2px",border:"none"},onClick:t=>{navigator.clipboard.writeText(e).then(()=>{u()})},children:(0,r.jsx)(c.A,{className:"text-white",size:20})}),(0,r.jsx)(n(),{open:l,autoHideDuration:2e3,onClose:d,children:(0,r.jsxs)("div",{className:"h-full text-white px-4 py-2 justify-between rounded",style:{maxWidth:"250px",width:"250px",backgroundColor:"#0b8862"},children:[(0,r.jsx)("span",{children:"Code Copied!"}),p]})})]})}},21498:(e,t,s)=>{s.d(t,{A:()=>l});var r=s(8732),a=s(82015),i=s.n(a);function l({userObject:e,userPage:t}){let s=Object.keys(e),[a,l]=i().useState(!1),[n,c]=i().useState(0),[o,u]=i().useState(!t);return(0,r.jsxs)("div",{className:"card col green w-full overflow-hidden"+(o?t?" h-[100px]":" h-[85px]":" "),children:[(0,r.jsxs)("div",{className:"items-center w-full",children:[(0,r.jsx)("img",{src:e.image_thumbnail,alt:"",className:"rounded-full object-cover"+(t?" w-16 h-16":" w-12 h-12")}),!t&&(0,r.jsxs)("h3",{className:"m-0 text-xl",children:[e.first_name," ",e.last_name," "]}),(0,r.jsxs)("div",{className:"ml-auto",children:[(0,r.jsx)("button",{className:"outlined gray small-text",onClick:e=>{o?u(!1):u(!0)},children:o?"More Details":"Collapse"}),!t&&(0,r.jsx)("a",{href:`/su/users/${e.id}`,className:"button outlined gray small-text",children:"View User"})]})]}),(0,r.jsx)("div",{className:"card no-hover col w-full light-gray-bg",children:s.map((t,a)=>(0,r.jsxs)(i().Fragment,{children:[(0,r.jsx)("div",{children:(0,r.jsxs)("span",{style:{wordBreak:"break-all"},children:[t,":"," ",(0,r.jsx)("b",{children:e[t]})]})}),a<s.length-1&&(0,r.jsx)("hr",{})]},a+1))}),(0,r.jsx)("button",{className:"outlined gray small-text w-full",onClick:e=>{u(!0)},children:"Collapse"})]})}},8203:(e,t,s)=>{var r=s(24994);t.A=void 0;var a=r(s(30887)),i=s(8732);t.A=(0,a.default)([(0,i.jsx)("path",{d:"M11.17 4H7v11h14V6h-7.83z",opacity:".3"},"0"),(0,i.jsx)("path",{d:"M21 4h-7l-2-2H7c-1.1 0-1.99.9-1.99 2L5 15c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2m0 11H7V4h4.17l2 2H21z"},"1"),(0,i.jsx)("path",{d:"M3 6H1v13c0 1.1.9 2 2 2h17v-2H3z"},"2")],"FolderCopyTwoTone")},85781:(e,t,s)=>{var r=s(24994);t.A=void 0;var a=r(s(30887)),i=s(8732);t.A=(0,a.default)([(0,i.jsx)("path",{d:"M13 4H6v16h12V9h-5z",opacity:".3"},"0"),(0,i.jsx)("path",{d:"m20 8-6-6H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2zm-2 12H6V4h7v5h5z"},"1")],"InsertDriveFileTwoTone")},48407:(e,t,s)=>{var r=s(24994);t.A=void 0;var a=r(s(30887)),i=s(8732);t.A=(0,a.default)((0,i.jsx)("path",{d:"M8.12 9.29 12 13.17l3.88-3.88c.39-.39 1.02-.39 1.41 0 .39.39.39 1.02 0 1.41l-4.59 4.59c-.39.39-1.02.39-1.41 0L6.7 10.7a.9959.9959 0 0 1 0-1.41c.39-.38 1.03-.39 1.42 0"}),"KeyboardArrowDownRounded")},94081:(e,t,s)=>{var r=s(24994);t.A=void 0;var a=r(s(30887)),i=s(8732);t.A=(0,a.default)([(0,i.jsx)("path",{d:"M15.22 4.75 7.87 7.79l4.96 11.96 7.35-3.05zM11 10c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1",opacity:".3"},"0"),(0,i.jsx)("path",{d:"m3.87 11.18-2.43 5.86c-.41 1.02.08 2.19 1.09 2.61l1.34.56zm18.16 4.77L17.07 3.98c-.31-.75-1.04-1.21-1.81-1.23-.26 0-.53.04-.79.15L7.1 5.95c-.75.31-1.21 1.03-1.23 1.8-.01.27.04.54.15.8l4.96 11.97c.31.76 1.05 1.22 1.83 1.23.26 0 .52-.05.77-.15l7.36-3.05c1.02-.42 1.51-1.59 1.09-2.6m-9.2 3.8L7.87 7.79l7.35-3.04h.01l4.95 11.95z"},"1"),(0,i.jsx)("circle",{cx:"11",cy:"9",r:"1"},"2"),(0,i.jsx)("path",{d:"m9.33 21.75-3.45-8.34v6.34c0 1.1.9 2 2 2z"},"3")],"StyleTwoTone")},67105:(e,t,s)=>{s.d(t,{A:()=>r});let r=(0,s(82544).A)("CloudUpload",[["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"M12 12v9",key:"192myk"}],["path",{d:"m16 16-4-4-4 4",key:"119tzi"}]])},26628:(e,t,s)=>{s.d(t,{A:()=>r});let r=(0,s(82544).A)("DatabaseBackup",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 12a9 3 0 0 0 5 2.69",key:"1ui2ym"}],["path",{d:"M21 9.3V5",key:"6k6cib"}],["path",{d:"M3 5v14a9 3 0 0 0 6.47 2.88",key:"i62tjy"}],["path",{d:"M12 12v4h4",key:"1bxaet"}],["path",{d:"M13 20a5 5 0 0 0 9-3 4.5 4.5 0 0 0-4.5-4.5c-1.33 0-2.54.54-3.41 1.41L12 16",key:"1f4ei9"}]])},34479:(e,t,s)=>{s.d(t,{A:()=>r});let r=(0,s(82544).A)("FileWarning",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},20427:(e,t,s)=>{s.d(t,{A:()=>r});let r=(0,s(82544).A)("Home",[["path",{d:"m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"y5dka4"}],["polyline",{points:"9 22 9 12 15 12 15 22",key:"e2us08"}]])},62011:(e,t,s)=>{s.d(t,{A:()=>r});let r=(0,s(82544).A)("LockKeyhole",[["circle",{cx:"12",cy:"16",r:"1",key:"1au0dj"}],["rect",{x:"3",y:"10",width:"18",height:"12",rx:"2",key:"6s8ecr"}],["path",{d:"M7 10V7a5 5 0 0 1 10 0v3",key:"1pqi11"}]])},2459:(e,t,s)=>{s.d(t,{A:()=>r});let r=(0,s(82544).A)("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]])},80006:(e,t,s)=>{s.d(t,{A:()=>r});let r=(0,s(82544).A)("SquareChevronRight",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"m10 8 4 4-4 4",key:"1wy4r4"}]])},67216:(e,t,s)=>{let r=s(9973),a=s(31976),i=r({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:a()}});async function l(...e){try{let t=await i.query(...e);return await i.end(),JSON.parse(JSON.stringify(t))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=l},31976:(e,t,s)=>{let r=s(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let t=`${e}/ca-cert.pem`;if(!r.existsSync(t)){console.log(`${t} does not exist`);return}return{ca:r.readFileSync(`${e}/ca-cert.pem`)}}},66099:e=>{e.exports=require("@mui/system")},37616:e=>{e.exports=require("@mui/system/DefaultPropsProvider")},24509:e=>{e.exports=require("@mui/system/InitColorSchemeScript")},84781:e=>{e.exports=require("@mui/system/colorManipulator")},18215:e=>{e.exports=require("@mui/system/createStyled")},59989:e=>{e.exports=require("@mui/system/createTheme")},16670:e=>{e.exports=require("@mui/system/styleFunctionSx")},88698:e=>{e.exports=require("@mui/system/useThemeProps")},76831:e=>{e.exports=require("@mui/utils")},28578:e=>{e.exports=require("@mui/utils/capitalize")},54341:e=>{e.exports=require("@mui/utils/chainPropTypes")},14036:e=>{e.exports=require("@mui/utils/composeClasses")},31112:e=>{e.exports=require("@mui/utils/createChainedFunction")},21763:e=>{e.exports=require("@mui/utils/debounce")},7546:e=>{e.exports=require("@mui/utils/deepmerge")},5928:e=>{e.exports=require("@mui/utils/deprecatedPropType")},30729:e=>{e.exports=require("@mui/utils/elementAcceptingRef")},47822:e=>{e.exports=require("@mui/utils/extractEventHandlers")},20985:e=>{e.exports=require("@mui/utils/formatMuiErrorMessage")},61119:e=>{e.exports=require("@mui/utils/generateUtilityClass")},81699:e=>{e.exports=require("@mui/utils/generateUtilityClasses")},16362:e=>{e.exports=require("@mui/utils/getReactElementRef")},71291:e=>{e.exports=require("@mui/utils/integerPropType")},29823:e=>{e.exports=require("@mui/utils/isMuiElement")},55402:e=>{e.exports=require("@mui/utils/ownerDocument")},46875:e=>{e.exports=require("@mui/utils/ownerWindow")},48080:e=>{e.exports=require("@mui/utils/requirePropFactory")},39597:e=>{e.exports=require("@mui/utils/setRef")},88190:e=>{e.exports=require("@mui/utils/unsupportedProp")},83889:e=>{e.exports=require("@mui/utils/useControlled")},21956:e=>{e.exports=require("@mui/utils/useEnhancedEffect")},4926:e=>{e.exports=require("@mui/utils/useEventCallback")},7376:e=>{e.exports=require("@mui/utils/useForkRef")},63310:e=>{e.exports=require("@mui/utils/useId")},10977:e=>{e.exports=require("@mui/utils/useIsFocusVisible")},10179:e=>{e.exports=require("@mui/utils/useSlotProps")},710:e=>{e.exports=require("@mui/utils/useTimeout")},74956:e=>{e.exports=require("clsx")},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},29825:e=>{e.exports=require("prop-types")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},37727:e=>{e.exports=require("react-transition-group")},8732:e=>{e.exports=require("react/jsx-runtime")},9973:e=>{e.exports=require("serverless-mysql")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},81630:e=>{e.exports=require("http")},33873:e=>{e.exports=require("path")}};var t=require("../../../webpack-runtime.js");t.C(e);var s=e=>t(t.s=e),r=t.X(0,[9764,883,1790,6154,8268,615],()=>s(63709));module.exports=r})();