"use strict";(()=>{var e={};e.id=6257,e.ids=[636,6257],e.modules={93446:(e,r,t)=>{t.r(r),t.d(r,{config:()=>f,default:()=>g,getServerSideProps:()=>P,getStaticPaths:()=>h,getStaticProps:()=>S,reportWebVitals:()=>v,routeModule:()=>w,unstable_getServerProps:()=>M,unstable_getServerSideProps:()=>_,unstable_getStaticParams:()=>j,unstable_getStaticPaths:()=>y,unstable_getStaticProps:()=>b});var s={};t.r(s),t.d(s,{default:()=>d,getServerSideProps:()=>q});var i=t(63865),u=t(9455),o=t(30671),a=t(49407),l=t(68268),p=t(8732);t(82015);var n=t(93615),m=t.n(n),c=t(64987);t(36299);var x=t(19262);function d({user:e,data:r}){let t=(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("title",{children:"User Dashboard | Datasquirel"}),(0,p.jsx)("meta",{name:"description",content:"Welcome to your data app"})]});return(0,p.jsx)(c.A,{head:t,user:e,children:(0,p.jsx)(x.A,{})})}async function q({req:e,res:r,query:t}){let s=await m()(e);return s?.logged_in_status?{props:{user:s}}:{redirect:{destination:"/su/login",permanent:!1}}}let g=(0,o.M)(s,"default"),S=(0,o.M)(s,"getStaticProps"),h=(0,o.M)(s,"getStaticPaths"),P=(0,o.M)(s,"getServerSideProps"),f=(0,o.M)(s,"config"),v=(0,o.M)(s,"reportWebVitals"),b=(0,o.M)(s,"unstable_getStaticProps"),y=(0,o.M)(s,"unstable_getStaticPaths"),j=(0,o.M)(s,"unstable_getStaticParams"),M=(0,o.M)(s,"unstable_getServerProps"),_=(0,o.M)(s,"unstable_getServerSideProps"),w=new i.PagesRouteModule({definition:{kind:u.A.PAGES,page:"/su/error-logs",pathname:"/su/error-logs",bundlePath:"",filename:""},components:{App:l.default,Document:a.default},userland:s})},19262:(e,r,t)=>{t.d(r,{A:()=>l});var s=t(8732),i=t(82015),u=t.n(i),o=t(63715),a=t(32415);function l(e){let[r,t]=u().useState(null),[i,l]=u().useState(!1),[p,n]=u().useState(0);return(0,s.jsxs)(u().Fragment,{children:[(0,s.jsxs)("div",{className:"w-full justify-between",children:[(0,s.jsx)("h2",{className:"text-xl m-0",children:"Error Logs"}),(0,s.jsx)("div",{children:(0,s.jsxs)("button",{onClick:e=>{window.confirm("Clear Error Logs?")&&(l(!0),(0,o.A)("/api/admin/clearErrorLogs","post").then(e=>{console.log(e),n(e=>e+1)}),setTimeout(()=>{l(!1)},2e3))},className:"outlined gray relative",children:[i&&(0,s.jsx)(a.A,{width:"20px"}),"Clear Error Log"]})})]}),(0,s.jsxs)("section",{className:"paper",children:[r&&(0,s.jsx)("p",{dangerouslySetInnerHTML:{__html:r||"No Log"}}),!r&&(0,s.jsx)(a.A,{position:"relative",width:"25px"})]})]})}},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")},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")},20985:e=>{e.exports=require("@mui/utils/formatMuiErrorMessage")},61119:e=>{e.exports=require("@mui/utils/generateUtilityClass")},81699:e=>{e.exports=require("@mui/utils/generateUtilityClasses")},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")},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")},8732:e=>{e.exports=require("react/jsx-runtime")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},81630:e=>{e.exports=require("http")},33873:e=>{e.exports=require("path")}};var r=require("../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[9764,883,8268,615,9810],()=>t(93446));module.exports=s})();