dsql-admin/dsql-app/.local_dist/server/chunks/9796.js
Benjamin Toby e0a030f10d Updates
2025-01-13 09:00:21 +01:00

1 line
14 KiB
JavaScript

exports.id=9796,exports.ids=[9796],exports.modules={16757:(e,a,s)=>{"use strict";s.d(a,{A:()=>i});var t=s(8732),l=s(82015),r=s.n(l);function i({width:e,position:a,style:s,borderWidth:l,screen:i,title:n}){return(0,t.jsxs)("div",{className:" top-0 left-0 w-full h-full flex items-center justify-center gap-4 bg-white/80 dark:bg-slate-800/80 z-50"+(i?" fixed":" absolute"),style:{...s,position:a,zIndex:2e4},children:[(0,t.jsx)("span",{className:"general_loader",style:e?{width:e,height:e,minWidth:e,borderWidth:l||"4px"}:{}}),n?(0,t.jsx)("span",{children:n}):(0,t.jsx)(r().Fragment,{})]})}},50139:(e,a,s)=>{"use strict";s.d(a,{A:()=>r});var t=s(8732),l=s(66759);function r({size:e,adminAside:a,collapseAsideMobile:s,setCollapseAsideMobile:r}){return(0,t.jsxs)("a",{href:"/",className:"logo",onClick:e=>{let a=e.target;if(a?.closest("button"))return e.preventDefault()},children:[a&&(0,t.jsxs)("button",{className:"flex lg:hidden small-text mr-2 primary-light",onClick:e=>{s&&r?r(!1):r&&r(!0)},children:[(0,t.jsx)("div",{className:"-mt-0.5",children:(0,t.jsx)(l.A,{})}),(0,t.jsx)("span",{className:"dark:text-white",children:"Menu"})]}),(0,t.jsx)("img",{src:"/images/logo-icon-alt-2.webp",alt:"Datasquirel Logo",width:35,className:"dark:hidden -mt-1.5 -mr-1.5"}),(0,t.jsx)("img",{src:"/images/logo-icon-alt-2.webp",alt:"Datasquirel Logo",width:35,className:"hidden dark:flex -mt-1.5 -mr-1.5"}),(0,t.jsx)("span",{className:"text-slate-800 dark:text-white text-[20px] font-bold hidden sm:flex -mt-[1px]",children:"Datasquirel"})]})}s(82015)},81868:(e,a,s)=>{"use strict";s.d(a,{A:()=>i});var t=s(8732),l=s(82015),r=s.n(l);function i(){let[e,a]=r().useState("Light Mode");return(0,t.jsx)("div",{className:"",id:"theme-selector-wrapper",onClick:()=>{let e=document.getElementById("theme-selector-graphic-wrapper"),s=localStorage.getItem("theme"),t=e?.querySelector("img.sun"),l=e?.querySelector("img.moon");!s||s?.match(/light/)?(document.documentElement.className="dark",localStorage.setItem("theme","dark"),s="dark",t?.classList.add("hidden"),l?.classList.remove("hidden"),e?.firstChild?.classList.add("ml-auto"),a("Dark Mode")):s?.match(/dark/)&&(document.documentElement.className="light",localStorage.setItem("theme","light"),s="light",l?.classList.add("hidden"),t?.classList.remove("hidden"),e?.firstChild?.classList.remove("ml-auto"),a("Light Mode"))},children:(0,t.jsx)("div",{className:"p-1 rounded-full w-12 transition-all",id:"theme-selector-graphic-wrapper",children:(0,t.jsxs)("div",{className:"pointer-events-none transition-all dark:ml-auto",children:[(0,t.jsx)("img",{src:"/images/sun.png",alt:"Sun Icon",width:18,className:"sun dark:hidden"}),(0,t.jsx)("img",{src:"/images/new-moon.png",alt:"Sun Icon",width:18,className:"moon hidden dark:flex"})]})})})}},46169:(e,a,s)=>{"use strict";s.d(a,{A:()=>l});var t=s(13893);let l=s.n(t)()},27550:(e,a,s)=>{"use strict";async function t({links:e}){let a=e||document.querySelectorAll("nav a");if(a&&a.forEach(e=>{e.dataset.currentlink===window.location.pathname?e.classList.add("active"):window.location.pathname.match(RegExp(`${e.dataset.currentlink}\\/.*`))&&!e.dataset.strictlink&&e.classList.add("active")}),window.location.pathname.match(/\/databases\/.*/)){let e=document.querySelectorAll("a");e&&window.location.search.match(/delegated=true/)&&e.forEach((e,a)=>{e?.pathname?.match(/databases/)&&(e.href=e.pathname+window.location.search)})}}s.d(a,{A:()=>t})},1013:(e,a,s)=>{"use strict";s.d(a,{A:()=>p});var t=s(8732),l=s(82015),r=s.n(l),i=s(27912),n=s.n(i);s(27550);var c=s(81868),d=s(50139),o=s(192),m=s(58526);function h({user:e,darkBg:a,transparent:s}){let[l,i]=r().useState(e?.logged_in_status?e:null);return(0,t.jsx)("header",{className:"w-full px-4 md:px-8 flex justify-center gap-4 "+(a?" shadow-slate-900/20 dark-content":" shadow-slate-900/5")+(s?"":" bg-white dark:bg-slate-800 shadow-lg dark:shadow-black/10 z-50")+(e?.logged_in_status?" py-4":" py-6"),style:{zIndex:700},children:(0,t.jsx)("div",{className:"container",children:(0,t.jsxs)("nav",{className:"w-full flex items-center justify-between gap-4 md:gap-10",children:[(0,t.jsx)(d.A,{}),(0,t.jsxs)("div",{className:"hidden xl:flex flex-col items-stretch grow fixed xl:static top-0 right-0 p-4 xl:p-0 shadow-xl xl:shadow-none h-screen xl:h-auto overflow-auto xl:overflow-visible w-screen sl:w-auto xl:bg-transparent"+(s?" bg-white xl:bg-transparent":" bg-white dark:bg-slate-800"),id:"main-nav-content-wrapper",children:[(0,t.jsxs)("div",{className:"items-center mb-2 flex xl:hidden",children:[(0,t.jsx)("a",{href:"/",children:(0,t.jsx)("img",{src:"/images/logo-icon-alt-2.png",alt:"Logo Icon",width:37})}),(0,t.jsx)("button",{className:"outlined gray ml-auto",onClick:e=>{let a=document.getElementById("main-nav-content-wrapper");a?.classList.toggle("hidden")},style:{border:"none"},children:(0,t.jsx)("span",{className:"font-semibold text-4xl",children:"✕"})})]}),(0,t.jsxs)("div",{className:"flex items-center grow flex-col-reverse xl:flex-row mb-10 xl:mb-0",children:[(0,t.jsxs)("div",{className:"flex-col xl:flex-row w-full gap-y-10 gap-x-6",children:[(0,t.jsxs)("div",{className:"dropdown-wrapper flex items-center gap-1",children:[(0,t.jsxs)("a",{href:"/docs/gui-reference",className:"relative z-10 flex items-center gap-2",children:[(0,t.jsx)("span",{children:"Features"}),(0,t.jsx)(m.A,{size:20})]}),(0,t.jsxs)("div",{className:"dropdown",children:[(0,t.jsx)("a",{href:"/docs/database-reference/data-types",className:"button plain-text more-padding normal-weight",children:"Database Schema"}),(0,t.jsx)("a",{href:"/docs/database-reference/querying-data",className:"button plain-text more-padding normal-weight",children:"Sql Queries"}),(0,t.jsx)("a",{href:"/docs/gui-reference/upload-media",className:"button plain-text more-padding normal-weight",children:"Media Storage"})]})]}),(0,t.jsxs)("div",{className:"dropdown-wrapper flex items-center gap-1",children:[(0,t.jsxs)("a",{href:"/docs",className:"relative z-10 flex items-center gap-2",children:[(0,t.jsx)("span",{children:"Docs"}),(0,t.jsx)(m.A,{size:20})]}),(0,t.jsxs)("div",{className:"dropdown",children:[(0,t.jsx)("a",{href:"/docs/quick-start",className:"button plain-text more-padding normal-weight",children:"Quick Start"}),(0,t.jsx)("a",{href:"/docs/api-reference",className:"button plain-text more-padding normal-weight",children:"Api Guide"}),(0,t.jsx)("a",{href:"/docs/gui-reference",className:"button plain-text more-padding normal-weight",children:"GUI Interface"})]})]}),(0,t.jsx)("a",{href:"/about",children:"About Us"}),(0,t.jsx)("a",{href:"/contact",children:"Contact Us"})]}),l?.logged_in_status?(0,t.jsx)(o.A,{activeUser:l,noModeSelector:!0}):(0,t.jsxs)("div",{className:"ml-auto w-full xl:w-auto justify-center",children:[(0,t.jsx)("a",{href:"/login",className:"button outlined gray hidden xl:flex"+(a?" light":""),children:"Login"}),(0,t.jsx)("a",{href:"/login",className:"button outlined gray flex xl:hidden",children:"Login"}),(0,t.jsx)("a",{href:"/create-account",className:"button",children:"Get Started"})]})]})]}),(0,t.jsx)("div",{className:"ml-0 xl:-ml-2",children:(0,t.jsx)(c.A,{})}),(0,t.jsxs)("button",{className:"bg-transparent w-16 p-4 gap-1.5 flex xl:hidden flex-col hover:bg-transparent transition-all",onClick:e=>{let a=document.getElementById("main-nav-content-wrapper");a?.classList.toggle("hidden")},style:{minWidth:"50px",backgroundColor:"transparent"},id:"main-header-hamburger-button","aria-label":"Mobile Hambutget Button",children:[(0,t.jsx)("div",{className:"w-full h-1 bg-slate-600 dark:bg-slate-400 rounded-full"}),(0,t.jsx)("div",{className:"w-full h-1 bg-slate-600 dark:bg-slate-400 rounded-full"}),(0,t.jsx)("div",{className:"w-full h-1 bg-slate-600 dark:bg-slate-400 rounded-full"})]})]})})})}function x(){return(0,t.jsxs)("footer",{className:"p-8 md:p-10 w-full flex flex-col items-center",children:[(0,t.jsxs)("div",{className:"main-container items-start justify-between gap-6 flex-wrap flex-col md:flex-row pt-6",children:[(0,t.jsxs)("div",{className:"flex flex-col items-start gap-6",children:[(0,t.jsx)(d.A,{}),(0,t.jsx)("span",{className:"font-normal max-w-sm text-sm text-left",children:"Datasquirel is a fast efficient cloud-based data store that takes away the entire hassle of data management."})]}),(0,t.jsxs)("div",{className:"flex-col items-start",children:[(0,t.jsx)("h4",{className:"m-0",children:"Features"}),(0,t.jsx)("a",{href:"/docs/database-reference/data-types",className:"text-slate-600",children:"Database Schema"}),(0,t.jsx)("a",{href:"/docs/database-reference/querying-data",className:"text-slate-600",children:"SQL Queries"}),(0,t.jsx)("a",{href:"/docs/gui-reference/upload-media",className:"text-slate-600",children:"Media Storage"})]}),(0,t.jsxs)("div",{className:"flex-col items-start",children:[(0,t.jsx)("h4",{className:"m-0",children:"Docs"}),(0,t.jsx)("a",{href:"/docs/quick-start",className:"text-slate-600",children:"Quick Start Guide"}),(0,t.jsx)("a",{href:"/docs/api-reference",className:"text-slate-600",children:"API Guide"}),(0,t.jsx)("a",{href:"/docs/gui-reference",className:"text-slate-600",children:"GUI Interface"})]}),(0,t.jsxs)("div",{className:"flex-col items-start",children:[(0,t.jsx)("h4",{className:"m-0",children:"Company"}),(0,t.jsx)("a",{href:"/about",className:"text-slate-600",children:"About Us"}),(0,t.jsx)("a",{href:"/terms",className:"text-slate-600",children:"Terms and Conditions"}),(0,t.jsx)("a",{href:"/privacy",className:"text-slate-600",children:"Privacy Policy"})]})]}),(0,t.jsx)("hr",{className:"my-10"}),(0,t.jsx)("div",{className:"container",children:(0,t.jsxs)("span",{className:"text-sm text-slate-400 dark:text-slate-600",children:[new Date().getFullYear()," \xa9 Datasquirel. All rights reserved."]})})]})}function g(){return(0,t.jsx)(r().Fragment,{})}var u=s(43363);function p({children:e,head:a,user:s,productionEnvironment:l,darkBgHeader:i,transparentHeader:c}){return(0,t.jsxs)(r().Fragment,{children:[(0,t.jsx)(n(),{children:a}),(0,t.jsx)(g,{}),(0,t.jsx)(h,{user:s,darkBg:i,transparent:c}),e,(0,t.jsx)(x,{}),(0,t.jsx)(u.A,{})]})}},192:(e,a,s)=>{"use strict";s.d(a,{A:()=>m});var t=s(8732),l=s(82015),r=s.n(l),i=s(16757),n=s(52070);function c({user:e}){return(0,t.jsxs)("div",{className:"dropdown right-aligned",children:[(0,t.jsxs)("a",{href:"/admin",className:"button outlined gray more-padding relative z-20 mb-2",children:[(0,t.jsx)(n.A,{size:18,className:"mr-1"}),(0,t.jsx)("span",{children:"Dashboard"})]}),null,(0,t.jsx)("a",{href:`/admin/${e?.id}/settings`,className:"button plain-text more-padding normal-weight",children:"Settings"}),(0,t.jsx)("a",{href:"/logout",className:"button plain-text more-padding normal-weight",children:"Logout"})]})}var d=s(81868),o=s(58526);function m({activeUser:e,noModeSelector:a}){return e?.logged_in_status?(0,t.jsxs)("div",{className:"gap-2 flex-col-reverse xl:flex-row gap-y-6 w-full xl:w-auto py-2 whitespace-nowrap",children:[(0,t.jsxs)("div",{className:"ml-auto dropdown-wrapper p-0 xl:p-4 hover:bg-slate-100 hidden",children:[(0,t.jsx)("a",{href:`/admin/${e?.id}/notifications`,className:"flex items-center justify-center",children:(0,t.jsx)("img",{src:"/images/notification-icon.svg",alt:"Notification Icon",width:20,className:"opacity-50"})}),(0,t.jsxs)("div",{className:"dropdown mt-0 xl:-mt-3 gap-2",children:[(0,t.jsx)("span",{className:"text-slate-400",children:"Notifications"}),(0,t.jsx)(i.A,{position:"relative",width:"20px"})]})]}),(0,t.jsxs)("div",{className:"ml-auto dropdown-wrapper",children:[(0,t.jsxs)("div",{className:"avatar",style:{width:"36px",height:"36px"},children:[(0,t.jsx)("img",{src:e?.image,alt:"User Image",width:35,className:"w-full h-full object-cover rounded-full"}),e?.social_login?(0,t.jsxs)("div",{className:"sub-img",children:[(0,t.jsx)("img",{src:e?.social_platform?.match(/facebook/i)?"/images/facebook.png":e?.social_platform?.match(/google/i)?"/images/google.png":e?.social_platform?.match(/github/i)?"/images/github.png":"/images/sharing.png",alt:"",className:"flex dark:hidden"}),(0,t.jsx)("img",{src:e?.social_platform?.match(/facebook/i)?"/images/facebook.png":e?.social_platform?.match(/google/i)?"/images/google.png":e?.social_platform?.match(/github/i)?"/images/github-white.png":"/images/sharing.png",alt:"",className:"hidden dark:flex"})]}):(0,t.jsx)(r().Fragment,{})]}),(0,t.jsx)("span",{className:"dark:text-white",children:(0,t.jsxs)("b",{children:[e?.first_name," ",e?.last_name]})}),(0,t.jsx)(o.A,{size:20}),(0,t.jsx)(c,{user:e})]}),!a&&(0,t.jsx)("div",{className:"ml-2",children:(0,t.jsx)(d.A,{})})]}):(0,t.jsx)(r().Fragment,{})}},43363:(e,a,s)=>{"use strict";s.d(a,{A:()=>n});var t=s(8732),l=s(58591),r=s(82015),i=s.n(r);function n({snug:e}){let[a,s]=i().useState(!1);return(0,t.jsx)(i().Fragment,{children:a&&(0,t.jsx)("button",{className:"fixed z-40 w-12 h-12 p-2 rounded-full bg-white dark:bg-slate-600 shadow-xl flex items-center justify-center hover:bg-slate-800 dark:hover:bg-slate-800 text-slate-500 dark:text-slate-200 outline-slate-300 dark:outline-transparent"+(e?" bottom-6 right-4":" bottom-4 md:bottom-10 right-4 md:right-10"),style:{outlineStyle:"solid",outlineWidth:"1px",zIndex:2e3},onClick:e=>{window.scrollTo({top:0,left:0,behavior:"smooth"})},children:(0,t.jsx)(l.A,{size:20})})})}},19796:(e,a,s)=>{"use strict";s.r(a),s.d(a,{AppContext:()=>x,default:()=>g});var t=s(8732),l=s(82015),r=s.n(l),i=s(28133),n=s.n(i),c=s(27912),d=s.n(c);s(79061),s(44422);var o=s(46169),m=s(1013);class h extends r().Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,a){(0,o.A)("/api/admin/clientError",{method:"post",body:{component:"ErrorBoundary-class-component",message:e.message+" ==== Error Info => "+a,user:{}}})}render(){return this.state.hasError?(0,t.jsx)(m.A,{head:this.state.head,user:null,children:(0,t.jsxs)("div",{className:"paper items-center px-20",children:[(0,t.jsx)("h2",{className:"text-base text-slate-400 m-0",children:"Application Error!"}),(0,t.jsx)("h1",{className:"text-2xl m-0 mb-4",children:"Please try again!"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("a",{href:"/",className:"button outlined",children:"Home"}),(0,t.jsx)("button",{onClick:e=>{window.history.back()},children:"Go Back"})]})]})}):this.props.children}}let x=r().createContext({pageProps:{}});function g({Component:e,pageProps:a}){return(0,t.jsxs)(x.Provider,{value:{pageProps:a},children:[(0,t.jsx)(d(),{children:(0,t.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1"})}),(0,t.jsx)(h,{children:(0,t.jsx)(e,{...a})}),(0,t.jsx)(n(),{src:"/scripts/main.js",strategy:"afterInteractive"})]})}},79061:()=>{},44422:()=>{}};