This commit is contained in:
Benjamin Toby
2024-12-08 20:39:44 +01:00
parent 13b67425b8
commit eb723c8195
660 changed files with 69 additions and 8256 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[820],{75849:(e,t,s)=>{s.d(t,{A:()=>v});var a=s(74848),l=s(96540),n=s(55436),r=s(4709),i=s(55624);s(67720);var c=s(82171);function d(e){let{databases:t,setTargetDatabase:s,user:r}=l.useContext(n.DashboardContext);return(0,a.jsx)(l.Fragment,{children:(0,a.jsx)(c.A,{databases:t,setTargetDatabase:s,title:"Recently added Databases",more:!0,user:r})})}var o=s(56417),x=s(59140),u=s(18190),h=s(1915);let m=(0,s(95737).A)("Key",[["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["path",{d:"m15.5 7.5 3 3L22 7l-3-3",key:"1rn1fs"}]]);function j(e){let{icon:t,metric:s,count:l,url:n}=e;return(0,a.jsxs)("a",{href:n,className:"card col w-full",children:[(0,a.jsx)("div",{className:"absolute top-4 right-4",children:t}),(0,a.jsxs)("div",{className:"content-block",children:[(0,a.jsx)("span",{className:"metric text-slate-800 dark:text-white",children:l}),(0,a.jsx)("span",{className:"text-sm text-slate-600 dark:text-slate-400",children:s})]})]})}function y(e){let{databases:t,setTargetDatabase:s,metrics:r,user:i}=l.useContext(n.DashboardContext);return(0,a.jsx)("section",{className:"p-0",children:(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-4 w-full gap-6 items-stretch",children:[(0,a.jsx)(j,{metric:"Databases Created",count:(null==r?void 0:r.dbCount)||0,icon:(0,a.jsx)(x.A,{size:20,className:"text-secondary2"}),url:"/admin/".concat(null==i?void 0:i.id,"/databases")}),(0,a.jsx)(j,{metric:"Tables Created",count:(null==r?void 0:r.tablesCount)||0,icon:(0,a.jsx)(u.A,{size:20,className:"text-primary"})}),(0,a.jsx)(j,{metric:"Media Added",count:(null==r?void 0:r.mediaCount)||0,icon:(0,a.jsx)(h.A,{size:20,className:"text-slate-500"}),url:"/admin/".concat(null==i?void 0:i.id,"/media")}),(0,a.jsx)(j,{metric:"API Keys",count:(null==r?void 0:r.apiKeysCount)||0,icon:(0,a.jsx)(m,{size:20,className:"text-slate-900 dark:text-white"}),url:"/admin/".concat(null==i?void 0:i.id,"/api-keys")})]})})}function v(e){var t;let{databases:s,user:c}=l.useContext(n.DashboardContext);return(0,a.jsxs)(l.Fragment,{children:[(0,a.jsxs)("div",{className:"flex-col items-start gap-0",children:[(0,a.jsx)("h1",{className:"text-3xl m-0",children:"Dashboard"}),(0,a.jsx)(r.A,{user:c})]}),(null==c?void 0:null===(t=c.verification_status)||void 0===t?void 0:t.toString().match(/1/))?(0,a.jsxs)(l.Fragment,{children:[(0,a.jsx)(y,{}),(0,a.jsx)(d,{}),(0,a.jsx)(o.A,{user:c})]}):(0,a.jsx)(i.A,{})]})}},18190:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(95737).A)("Sheet",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["line",{x1:"3",x2:"21",y1:"9",y2:"9",key:"1vqk6q"}],["line",{x1:"3",x2:"21",y1:"15",y2:"15",key:"o2sbyz"}],["line",{x1:"9",x2:"9",y1:"9",y2:"21",key:"1ib60c"}],["line",{x1:"15",x2:"15",y1:"9",y2:"21",key:"1n26ft"}]])},55436:(e,t,s)=>{s.r(t),s.d(t,{DashboardContext:()=>d,__N_SSP:()=>c,default:()=>o});var a=s(74848),l=s(96540),n=s(51187),r=s(75849),i=s(47652),c=!0;let d=l.createContext({});function o(e){let{user:t,databases:s,metrics:c}=e,o=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("title",{children:"User Dashboard | Datasquirel"}),(0,a.jsx)("meta",{name:"description",content:"Welcome to your data app"})]}),[x,u]=l.useState(null);return(0,a.jsx)(n.A,{head:o,user:t,children:(0,a.jsxs)(d.Provider,{value:{user:t,databases:s,targetDatabase:x,setTargetDatabase:u,metrics:c},children:[(0,a.jsx)(r.A,{}),(0,a.jsx)(i.A,{targetDatabase:x})]})})}}}]);
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9907],{29907:(e,c,a)=>{a.d(c,{A:()=>s}),a(74848),a(96540),a(23698),a(43586);function s(e){let{user:c,userType:a,setLoading:s}=e;return null}},43586:(e,c,a)=>{a.d(c,{A:()=>s});async function s(){try{let e=await caches.keys();e[0]&&await Promise.all(e.map(e=>caches.delete(e)))}catch(e){console.log("Error in clearing cache =>",e.message)}}}}]);
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2336],{28213:(t,e,c)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/404",function(){return c(35562)}])},62900:(t,e,c)=>{"use strict";c.d(e,{A:()=>s});var r=c(23698);function s(t){let{setUser:e}=t,c=localStorage.getItem("user");if(c)try{e(JSON.parse(c));return}catch(t){e({});return}(0,r.A)("/api/clientSideAuth",{method:"post",body:{}},!0).then(t=>{let c=t.user?t.user:{};e(c),localStorage.setItem("user",JSON.stringify(c))}).catch(t=>{console.log(t)})}},79518:(t,e,c)=>{"use strict";var r=c(24994);e.A=void 0;var s=r(c(44888)),a=c(74848);e.A=(0,s.default)([(0,a.jsx)("path",{d:"M4 16.5c0 .83.67 1.5 1.5 1.5h9c.83 0 1.5-.67 1.5-1.5V13H4zm6-2.5c.83 0 1.5.67 1.5 1.5S10.83 17 10 17s-1.5-.67-1.5-1.5S9.17 14 10 14M4.43 6H11c0-.33.03-.66.08-.98-3.37-.1-5.75.21-6.65.98",opacity:".3"},"0"),(0,a.jsx)("path",{d:"M4 11V8h7.29C11.1 7.37 11 6.7 11 6H4.43c.9-.77 3.28-1.08 6.65-.98.1-.7.3-1.37.59-1.99C2.97 2.67 2 5.02 2 7v9.5C2 18.43 3.57 20 5.5 20L4 21v1h12v-1l-1.5-1c1.93 0 3.5-1.57 3.5-3.5V13c-1.91 0-3.63-.76-4.89-2zm12 5.5c0 .83-.67 1.5-1.5 1.5h-9c-.83 0-1.5-.67-1.5-1.5V13h12z"},"1"),(0,a.jsx)("circle",{cx:"10",cy:"15.5",r:"1.5"},"2"),(0,a.jsx)("path",{d:"M18 1c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5m.5 8h-1V8h1zm0-2h-1V3h1z"},"3")],"RailwayAlertTwoTone")},35562:(t,e,c)=>{"use strict";c.r(e),c.d(e,{default:()=>s}),c(74848);var r=c(96540);function s(t){return r.useEffect(()=>{window.location.href="https://datasquirel.com"},[]),null}c(93444),c(96411),c(62900),c(79518)}},t=>{var e=e=>t(t.s=e);t.O(0,[636,6593,8792],()=>e(28213)),_N_E=t.O()}]);
@@ -1 +0,0 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[421],{65450:(t,e,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/500",function(){return r(39499)}])},62900:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});var u=r(23698);function n(t){let{setUser:e}=t,r=localStorage.getItem("user");if(r)try{e(JSON.parse(r));return}catch(t){e({});return}(0,u.A)("/api/clientSideAuth",{method:"post",body:{}},!0).then(t=>{let r=t.user?t.user:{};e(r),localStorage.setItem("user",JSON.stringify(r))}).catch(t=>{console.log(t)})}},39499:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>n}),r(74848);var u=r(96540);function n(t){return u.useEffect(()=>{window.location.href="https://datasquirel.com"},[]),null}r(93444),r(96411),r(62900),r(23698)}},t=>{var e=e=>t(t.s=e);t.O(0,[636,6593,8792],()=>e(65450)),_N_E=t.O()}]);
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2731],{56194:(_,n,e)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/_error",function(){return e(33709)}])}},_=>{var n=n=>_(_.s=n);_.O(0,[636,6593,8792],()=>n(56194)),_N_E=_.O()}]);
@@ -1 +0,0 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4239],{99482:(t,e,n)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/about",function(){return n(61918)}])},61918:(t,e,n)=>{"use strict";n.r(e),n.d(e,{HomepageContext:()=>o,default:()=>a}),n(74848);var u=n(96540);n(93444),n(96411),n(62900),n(42361),n(26659),n(96869);let o=u.createContext({});function a(t){return u.useEffect(()=>{window.location.href="https://datasquirel.com/about"},[]),null}}},t=>{var e=e=>t(t.s=e);t.O(0,[9654,636,6593,8792],()=>e(99482)),_N_E=t.O()}]);
@@ -1 +0,0 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6309],{39943:(e,t,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin",function(){return a(76902)}])},76902:(e,t,a)=>{"use strict";a.r(t),a.d(t,{DashboardContext:()=>l,__N_SSP:()=>i,default:()=>_});var r=a(74848),s=a(96540),n=a(51187),u=a(75849),d=a(47652),i=!0;let l=s.createContext({});function _(e){let{user:t,databases:a,metrics:i}=e,_=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("title",{children:"User Dashboard | Datasquirel"}),(0,r.jsx)("meta",{name:"description",content:"Welcome to your data app"})]}),[o,c]=s.useState(null);return(0,r.jsx)(n.A,{head:_,user:t,children:(0,r.jsxs)(l.Provider,{value:{user:t,databases:a,targetDatabase:o,setTargetDatabase:c,metrics:i},children:[(0,r.jsx)(u.A,{}),(0,r.jsx)(d.A,{targetDatabase:o})]})})}}},e=>{var t=t=>e(e.s=t);e.O(0,[9799,8866,7538,820,636,6593,8792],()=>t(39943)),_N_E=e.O()}]);
@@ -1 +0,0 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[531],{18295:(_,n,u)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/[user_id]",function(){return u(55436)}])}},_=>{var n=n=>_(_.s=n);_.O(0,[9799,8866,7538,820,636,6593,8792],()=>n(18295)),_N_E=_.O()}]);
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2564],{19107:(_,n,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/[user_id]/databases",function(){return s(98471)}])}},_=>{var n=n=>_(_.s=n);_.O(0,[9799,8866,7538,636,6593,8792],()=>n(19107)),_N_E=_.O()}]);
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9718],{80370:(e,a,n)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/[user_id]/databases/add-database",function(){return n(87810)}])},99862:(e,a,n)=>{"use strict";n.d(a,{A:()=>t});var l=n(74848);n(96540);var s=n(86625);function t(){return(0,l.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,l.jsx)(s.A,{color:"inherit",className:"opacity-50 text-black",fontSize:"small"})})}},45165:(e,a,n)=>{"use strict";n.d(a,{Ay:()=>c,PB:()=>i,fs:()=>o});var l=n(74848),s=n(76897),t=n(96540);function c(e){let{children:a,title:n,data:c,fullPage:i,wrapperClasses:d,closePopupDispatch:r,wrapperStyle:u,noContainer:p}=e;return i?(0,l.jsxs)("div",{className:"popup-bg overflow-hidden "+(d||""),"data-popupid":n||null,style:u,children:[p?(0,l.jsx)(t.Fragment,{children:a}):(0,l.jsx)("div",{className:"relative w-full h-full z-50","data-data":c?JSON.stringify(c):"",children:a}),(0,l.jsx)("button",{className:"popup-cancel-button fixed outlined gray",onClick:e=>{o(),r&&r()},children:(0,l.jsx)(s.A,{color:"white",size:20})}),(0,l.jsx)("div",{className:"popup-canceller",onClick:e=>{o(),r&&r()}})]}):(0,l.jsxs)("div",{className:"popup-bg","data-popupid":n||null,children:[p?(0,l.jsx)(t.Fragment,{children:a}):(0,l.jsxs)("div",{className:"popup-content-container minimal-scrollbars","data-data":c?JSON.stringify(c):"",children:[a,(0,l.jsx)("button",{className:"outlined gray popup-cancel-button",onClick:e=>{o(),r&&r()},children:(0,l.jsx)("span",{className:"font-normal",children:"✖"})})]}),p&&(0,l.jsx)("button",{className:"gray popup-cancel-button",onClick:e=>{o(),r&&r()},children:(0,l.jsx)("span",{className:"font-normal",children:"✖"})}),(0,l.jsx)("div",{className:"popup-canceller",onClick:e=>{o(),r&&r()}})]})}function i(e,a){let n=document.querySelector("[data-popupid='".concat(e,"']"));n&&(n.style.display="flex",a&&a(n))}function o(e){document.querySelectorAll("[data-popupid]").forEach(e=>{e.style.display="none"}),e&&e()}},94909:(e,a,n)=>{"use strict";n.d(a,{A:()=>l});let l=(0,n(95737).A)("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]])}},e=>{var a=a=>e(e.s=a);e.O(0,[1570,9799,5414,5160,3293,636,6593,8792],()=>a(80370)),_N_E=e.O()}]);
@@ -1 +0,0 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9326],{54299:(e,s,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/[user_id]/media",function(){return t(26636)}])},26636:(e,s,t)=>{"use strict";t.r(s),t.d(s,{MediaContext:()=>g,__N_SSP:()=>_,default:()=>A});var a=t(74848),i=t(96540),l=t(51187),r=t(4709),n=t(45165),d=t(55624),o=t(53301),c=t(60557);function u(e){var s;let{media:t,setTargetMedia:l,user:u,folders:x,staticHost:j}=i.useContext(g);return(0,a.jsxs)(i.Fragment,{children:[(0,a.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,a.jsxs)("div",{className:"w-full justify-between flex-wrap",children:[(0,a.jsx)("h1",{className:"text-3xl m-0",children:"Media"}),(0,a.jsxs)(c.A,{children:[(0,a.jsxs)("button",{className:"flex items-center gap-2",onClick:e=>{(0,n.PB)("choose-media-type-popoup")},children:[(0,a.jsx)("span",{className:"symbol",children:"+"}),(0,a.jsx)("span",{children:"Add Media"})]}),(0,a.jsxs)("button",{className:"flex items-center gap-2 outlined gray",onClick:e=>{(0,n.PB)("add-folder-popoup")},children:[(0,a.jsx)("span",{className:"symbol",children:"+"}),(0,a.jsx)("span",{children:"Add Folder"})]})]})]}),(0,a.jsx)(r.A,{user:u})]}),(null==u?void 0:null===(s=u.verification_status)||void 0===s?void 0:s.toString().match(/1/))?(0,a.jsxs)(i.Fragment,{children:[(0,a.jsx)(o.A,{media:t,setTargetMedia:l,folders:x,staticHost:j,user:u}),t&&t[0]&&(0,a.jsxs)("a",{className:"border-dotted border-slate-400 border-2 px-4 py-3 w-full rounded flex items-center hover:border-primary/50 gap-2 cursor-pointer justify-center",onClick:e=>{(0,n.PB)("choose-media-type-popoup")},children:[(0,a.jsx)("span",{className:"symbol",children:"+"}),(0,a.jsx)("span",{className:"",children:"Add Media"})]})]}):(0,a.jsx)(d.A,{})]})}var x=t(67764),j=t(45332),p=t(84003),m=t(5531),h=t(11493),N=t(65001),w=t(620),f=t(22154),_=!0;let g=i.createContext({});function A(e){let{user:s,media:t,folders:r,staticHost:n}=e,d=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("title",{children:"User Dashboard | Datasquirel"}),(0,a.jsx)("meta",{name:"description",content:"Welcome to your data app"})]}),[o,c]=i.useState(null),[_,A]=i.useState(null),[b,v]=i.useState(null),[y,M]=i.useState(!1),[C,F]=i.useState(null);return(0,a.jsx)(l.A,{head:d,user:s,children:(0,a.jsxs)(g.Provider,{value:{user:s,media:t,targetMedia:C,setTargetMedia:F,folders:r,staticHost:n},children:[y&&(0,a.jsx)(w.A,{screen:!0,title:"Processing Files ..."}),(0,a.jsx)(u,{}),(0,a.jsx)(x.A,{setNewMedia:c,setLoading:M}),(0,a.jsx)(h.A,{setNewFile:A,setLoading:M}),(0,a.jsx)(f.A,{setNewVideo:v,setLoading:M}),(0,a.jsx)(j.A,{newMedia:o,setNewMedia:c,newFile:_,setNewFile:A,newVideo:b,setNewVideo:v}),(0,a.jsx)(p.A,{targetMedia:C,setTargetMedia:F,staticHost:n,media:t}),(0,a.jsx)(m.A,{}),(0,a.jsx)(N.A,{user:s})]})})}}},e=>{var s=s=>e(e.s=s);e.O(0,[9799,4750,636,6593,8792],()=>s(54299)),_N_E=e.O()}]);
@@ -1 +0,0 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[431],{99186:(e,s,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/[user_id]/media/[...folder]",function(){return t(52691)}])},99862:(e,s,t)=>{"use strict";t.d(s,{A:()=>r});var a=t(74848);t(96540);var l=t(86625);function r(){return(0,a.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,a.jsx)(l.A,{color:"inherit",className:"opacity-50 text-black",fontSize:"small"})})}},86625:(e,s,t)=>{"use strict";var a=t(24994);s.A=void 0;var l=a(t(44888)),r=t(74848);s.A=(0,l.default)((0,r.jsx)("path",{d:"M16.62 2.99c-.49-.49-1.28-.49-1.77 0L6.54 11.3c-.39.39-.39 1.02 0 1.41l8.31 8.31c.49.49 1.28.49 1.77 0s.49-1.28 0-1.77L9.38 12l7.25-7.25c.48-.48.48-1.28-.01-1.76"}),"ArrowBackIosRounded")},52691:(e,s,t)=>{"use strict";t.r(s),t.d(s,{MediaContext:()=>y,__N_SSP:()=>g,default:()=>_});var a=t(74848),l=t(96540),r=t(51187),i=t(67764),n=t(45332),d=t(84003),o=t(5531),c=t(99862),u=t(4709),x=t(45165),j=t(55624),p=t(53301),h=t(60557),m=t(96228);function f(e){var s;let{media:t,setTargetMedia:r,user:i,folders:n,query:d,staticHost:o,folder:f}=l.useContext(y);return(0,a.jsxs)(l.Fragment,{children:[(0,a.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,a.jsxs)("div",{className:"w-full justify-between flex-wrap",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(c.A,{}),(0,a.jsx)(m.A,{className:"opacity-40"}),(0,a.jsx)("h1",{className:"text-3xl m-0",children:d.folder[d.folder.length-1]})]}),(0,a.jsxs)(h.A,{children:[(0,a.jsxs)("button",{className:"flex items-center gap-2",onClick:e=>{(0,x.PB)("choose-media-type-popoup")},children:[(0,a.jsx)("span",{className:"symbol",children:"+"}),(0,a.jsx)("span",{children:"Add Media"})]}),(0,a.jsxs)("button",{className:"flex items-center gap-2 outlined gray",onClick:e=>{(0,x.PB)("add-folder-popoup",e=>{var s;null==e||null===(s=e.querySelector("input"))||void 0===s||s.focus()})},children:[(0,a.jsx)("span",{className:"symbol",children:"+"}),(0,a.jsx)("span",{children:"Add Folder"})]})]})]}),(0,a.jsx)(u.A,{user:i})]}),(null==i?void 0:null===(s=i.verification_status)||void 0===s?void 0:s.toString().match(/1/))?(0,a.jsxs)(l.Fragment,{children:[(0,a.jsx)(p.A,{media:t,setTargetMedia:r,folders:n,folder:f,staticHost:o,user:i}),t&&t[0]&&(0,a.jsxs)("a",{className:"border-dotted border-slate-400 border-2 px-4 py-3 w-full rounded flex items-center hover:border-primary/50 gap-2 cursor-pointer justify-center",onClick:e=>{(0,x.PB)("choose-media-type-popoup")},children:[(0,a.jsx)("span",{className:"symbol",children:"+"}),(0,a.jsx)("span",{className:"",children:"Add Media"})]})]}):(0,a.jsx)(j.A,{})]})}var N=t(11493),w=t(65001),A=t(620),v=t(22154),g=!0;let y=l.createContext({});function _(e){let{user:s,media:t,folders:c,query:u,staticHost:x,folderNameFull:j}=e,p=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("title",{children:"User Dashboard | Datasquirel"}),(0,a.jsx)("meta",{name:"description",content:"Welcome to your data app"})]}),[h,m]=l.useState(null),[g,_]=l.useState(null),[b,k]=l.useState(null),[M,S]=l.useState(!1),[C,F]=l.useState(null);return(0,a.jsx)(r.A,{head:p,user:s,children:(0,a.jsxs)(y.Provider,{value:{user:s,media:t,targetMedia:C,setTargetMedia:F,folders:c,query:u,staticHost:x,folder:j},children:[M&&(0,a.jsx)(A.A,{screen:!0,title:"Processing Files ..."}),(0,a.jsx)(f,{}),(0,a.jsx)(i.A,{setNewMedia:m,setLoading:S}),(0,a.jsx)(N.A,{setNewFile:_,setLoading:S}),(0,a.jsx)(v.A,{setNewVideo:k,setLoading:S}),(0,a.jsx)(n.A,{newMedia:h,setNewMedia:m,newFile:g,setNewFile:_,folder:j,newVideo:b,setNewVideo:k}),(0,a.jsx)(d.A,{targetMedia:C,staticHost:x,setTargetMedia:F,media:t}),(0,a.jsx)(o.A,{folder:j}),(0,a.jsx)(w.A,{user:s})]})})}}},e=>{var s=s=>e(e.s=s);e.O(0,[9799,4750,636,6593,8792],()=>s(99186)),_N_E=e.O()}]);
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3681],{63367:(e,s,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/[user_id]/users/databases",function(){return a(34222)}])},99862:(e,s,a)=>{"use strict";a.d(s,{A:()=>r});var l=a(74848);a(96540);var t=a(86625);function r(){return(0,l.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,l.jsx)(t.A,{color:"inherit",className:"opacity-50 text-black",fontSize:"small"})})}},45165:(e,s,a)=>{"use strict";a.d(s,{Ay:()=>n,PB:()=>c,fs:()=>i});var l=a(74848),t=a(76897),r=a(96540);function n(e){let{children:s,title:a,data:n,fullPage:c,wrapperClasses:d,closePopupDispatch:o,wrapperStyle:u,noContainer:p}=e;return c?(0,l.jsxs)("div",{className:"popup-bg overflow-hidden "+(d||""),"data-popupid":a||null,style:u,children:[p?(0,l.jsx)(r.Fragment,{children:s}):(0,l.jsx)("div",{className:"relative w-full h-full z-50","data-data":n?JSON.stringify(n):"",children:s}),(0,l.jsx)("button",{className:"popup-cancel-button fixed outlined gray",onClick:e=>{i(),o&&o()},children:(0,l.jsx)(t.A,{color:"white",size:20})}),(0,l.jsx)("div",{className:"popup-canceller",onClick:e=>{i(),o&&o()}})]}):(0,l.jsxs)("div",{className:"popup-bg","data-popupid":a||null,children:[p?(0,l.jsx)(r.Fragment,{children:s}):(0,l.jsxs)("div",{className:"popup-content-container minimal-scrollbars","data-data":n?JSON.stringify(n):"",children:[s,(0,l.jsx)("button",{className:"outlined gray popup-cancel-button",onClick:e=>{i(),o&&o()},children:(0,l.jsx)("span",{className:"font-normal",children:"✖"})})]}),p&&(0,l.jsx)("button",{className:"gray popup-cancel-button",onClick:e=>{i(),o&&o()},children:(0,l.jsx)("span",{className:"font-normal",children:"✖"})}),(0,l.jsx)("div",{className:"popup-canceller",onClick:e=>{i(),o&&o()}})]})}function c(e,s){let a=document.querySelector("[data-popupid='".concat(e,"']"));a&&(a.style.display="flex",s&&s(a))}function i(e){document.querySelectorAll("[data-popupid]").forEach(e=>{e.style.display="none"}),e&&e()}},86625:(e,s,a)=>{"use strict";var l=a(24994);s.A=void 0;var t=l(a(44888)),r=a(74848);s.A=(0,t.default)((0,r.jsx)("path",{d:"M16.62 2.99c-.49-.49-1.28-.49-1.77 0L6.54 11.3c-.39.39-.39 1.02 0 1.41l8.31 8.31c.49.49 1.28.49 1.77 0s.49-1.28 0-1.77L9.38 12l7.25-7.25c.48-.48.48-1.28-.01-1.76"}),"ArrowBackIosRounded")},94909:(e,s,a)=>{"use strict";a.d(s,{A:()=>l});let l=(0,a(95737).A)("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]])},34222:(e,s,a)=>{"use strict";a.r(s),a.d(s,{AllDatabasesUsersContext:()=>p,__N_SSP:()=>u,default:()=>x});var l=a(74848),t=a(96540),r=a(51187),n=a(80443),c=a(4709);function i(e){let{databases:s,user:a}=e;return(0,l.jsx)(t.Fragment,{children:(0,l.jsxs)("section",{className:"p-4 items-start gap-4 overflow-visible",children:[(0,l.jsx)("h2",{className:"text-xl m-0",children:"Database Users"}),(0,l.jsx)("div",{className:"flex flex-wrap gap-6",children:s&&s[0]?s.map((e,s)=>(0,l.jsxs)("a",{href:"/admin/".concat(null==a?void 0:a.id,"/users/databases/").concat(e.db_slug),className:"border border-slate-200 border-solid rounded px-6 py-4 hover:border-primary flex items-center gap-2",children:[(0,l.jsx)("img",{src:e.db_image,className:"w-8 h-8 rounded-full object-cover",alt:""}),e.db_name]},s+1)):(0,l.jsx)("span",{children:"No Databases Yet"})})]})})}var d=a(99862);function o(e){let{databases:s,user:a}=t.useContext(p);return(0,l.jsxs)(t.Fragment,{children:[(0,l.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,l.jsxs)("div",{className:"w-full justify-between flex-wrap",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(d.A,{}),(0,l.jsx)("h1",{className:"text-3xl m-0",children:"All Databases Users"})]}),(0,l.jsxs)("a",{href:"/admin/".concat(null==a?void 0:a.id,"/users/add-user"),className:"flex items-center gap-2 whitespace-normal button",children:[(0,l.jsx)("span",{className:"symbol",children:"+"}),(0,l.jsx)("span",{children:"Add New User"})]})]}),(0,l.jsx)(c.A,{user:a})]}),(0,l.jsx)(i,{databases:s,user:a})]})}var u=!0;let p=t.createContext({});function x(e){let{user:s,users:a,databases:c}=e,i=(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("title",{children:"Users | Datasquirel"}),(0,l.jsx)("meta",{name:"description",content:"Welcome to your data app"})]}),[d,u]=t.useState(null),[x,m]=t.useState(null);return(0,l.jsx)(r.A,{head:i,user:s,children:(0,l.jsxs)(p.Provider,{value:{user:s,users:a,targetUser:x,setTargetUser:m,databases:c},children:[(0,l.jsx)(o,{}),(0,l.jsx)(n.A,{targetUser:x,user:s,setTargetUser:m})]})})}}},e=>{var s=s=>e(e.s=s);e.O(0,[9799,6946,636,6593,8792],()=>s(63367)),_N_E=e.O()}]);
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9892],{26669:(n,u,e)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/blog",function(){return e(27031)}])},27031:(n,u,e)=>{"use strict";e.r(u),e.d(u,{default:()=>_}),e(74848);var t=e(96540);function _(){return t.useEffect(()=>{window.location.href="https://datasquirel.com"},[]),null}e(96411),e(93444)}},n=>{var u=u=>n(n.s=u);n.O(0,[636,6593,8792],()=>u(26669)),_N_E=n.O()}]);
@@ -1 +0,0 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1364],{410:(e,t,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/contact",function(){return r(38020)}])},41696:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=r(74848);function s(e){let{message:t}=e;return(0,n.jsxs)("div",{className:"p-2 bg-orange-50 w-full justify-center rounded text-sm text-orange-700 border border-orange-400 border-solid",children:[(0,n.jsx)("img",{src:"/images/warning.png",alt:"Warning Image Icon",width:22,className:"-my-2"}),(0,n.jsx)("span",{children:t})]})}r(96540)},70385:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=r(74848);function s(e){let{message:t,className:r}=e;return(0,n.jsxs)("div",{className:"info green"+(r?" "+r:""),children:[(0,n.jsx)("img",{src:"/images/checkmark.svg",alt:"Warning Image Icon",width:22,className:"-my-2"}),(0,n.jsx)("span",{children:t})]})}r(96540)},62900:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=r(23698);function s(e){let{setUser:t}=e,r=localStorage.getItem("user");if(r)try{t(JSON.parse(r));return}catch(e){t({});return}(0,n.A)("/api/clientSideAuth",{method:"post",body:{}},!0).then(e=>{let r=e.user?e.user:{};t(r),localStorage.setItem("user",JSON.stringify(r))}).catch(e=>{console.log(e)})}},38020:(e,t,r)=>{"use strict";r.r(t),r.d(t,{HomepageContext:()=>s,default:()=>a}),r(74848);var n=r(96540);r(93444),r(96411),r(62900),r(23698),r(41696),r(70385),r(620);let s=n.createContext({});function a(e){return n.useEffect(()=>{window.location.href="https://datasquirel.com/contact"},[]),null}}},e=>{var t=t=>e(e.s=t);e.O(0,[636,6593,8792],()=>t(410)),_N_E=e.O()}]);
@@ -1 +0,0 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8810],{29222:(e,t,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/create-account",function(){return a(57029)}])},87291:(e,t,a)=>{"use strict";a.d(t,{A:()=>n});var s=a(74848);a(96540);var i=a(620);function n(){return(0,s.jsx)("div",{className:"flex flex-col gap-4 items-center justify-center w-full h-screen p-6 bg-slate-100",children:(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center gap-4 px-6 py-20 bg-white rounded shadow-sm max-w-2xl w-full",children:[(0,s.jsx)("img",{src:"/images/logo-icon-alt-2.webp",alt:"Datasquirel Logo",width:60}),(0,s.jsx)("div",{className:"w-10 h-10 flex flex-col items-center justify-center",children:(0,s.jsx)(i.A,{width:"25px",position:"relative"})})]})})}},57029:(e,t,a)=>{"use strict";a.r(t),a.d(t,{CreateAccountContext:()=>x,__N_SSP:()=>d,default:()=>m});var s=a(74848),i=a(96540),n=a(93444),l=a(96411),r=a(84147);function c(e){let{query:t,invitingUser:a}=i.useContext(x);return(0,s.jsxs)("section",{className:"flex-col items-center lg:items-center gap-20 p-0",children:[(0,s.jsx)("img",{src:"/images/grid.webp",alt:"Dotted image background",className:"absolute top-0 left-0 w-full h-full object-cover opacity-80 dark:opacity-10 z-0"}),(0,s.jsxs)("div",{className:"w-full lg:w-1/2 max-w-6xl gap-4 flex-col items-center px-4 py-10 bg-white dark:bg-slate-900 relative z-10",children:[(null==a?void 0:a.first_name)&&(0,s.jsxs)("span",{className:"text-xs bg-emerald-100 rounded-full px-4 py-1 mb-4",children:["You have been invited by"," ",(0,s.jsxs)("b",{children:[a.first_name," ",a.last_name," (",a.email,")"]})," ","to manage an account. Please create an account to gain access."]}),(0,s.jsx)("h1",{className:"m-0 text-center text-2xl",children:"Create An Account"}),(0,s.jsx)(r.A,{query:t})]})]})}var o=a(23698),u=a(87291),d=!0;let x=i.createContext({});function m(e){var t;let a="Create Account | Datasquirel",r="Create a FREE account and start storing data.",d=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("title",{children:a}),(0,s.jsx)("meta",{name:"description",content:r}),(0,s.jsx)(l.A,{pageTitle:a,pageDescription:r,pagePathname:"/"})]}),[m,h]=i.useState(null);return(i.useEffect(()=>{var t;(null===(t=e.query)||void 0===t?void 0:t.invite)&&!e.isAuthCookie&&setTimeout(()=>{(0,o.A)("/api/addAdminUserUser",{method:"POST",body:{query:e.query}},!0).then(t=>{var a;window.location.pathname="/admin/".concat(null===(a=e.user)||void 0===a?void 0:a.id,"/users")})},1e3)},[]),null===(t=e.query)||void 0===t?void 0:t.invite)?(0,s.jsx)(u.A,{}):(0,s.jsx)(n.A,{head:d,children:(0,s.jsx)(x.Provider,{value:{user:m,query:e.query,invitingUser:e.invitingUser},children:(0,s.jsx)("main",{children:(0,s.jsx)(c,{})})})})}}},e=>{var t=t=>e(e.s=t);e.O(0,[9907,4147,636,6593,8792],()=>t(29222)),_N_E=e.O()}]);
@@ -1 +0,0 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7797],{26347:(e,t,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/docs",function(){return s(92022)}])},34540:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});var l=s(74848),a=s(96540);function r(e){let{pages:t}=e;if(!t||!t[0])return null;let s=null==t?void 0:t.filter(e=>1==e.level);return a.useEffect(()=>{let e=document.querySelectorAll("aside a");e&&e[0]&&e.forEach(e=>{e.pathname===window.location.pathname&&e.classList.add("active")})},[]),(0,l.jsxs)("aside",{className:"w-full lg:w-80 p-10 bg-slate-100 dark:bg-slate-800 sticky top-0 overflow-y-auto max-h-max lg:max-h-screen transition-all",children:[(0,l.jsx)("span",{className:"text-2xl m-0 mb-4 text-left font-semibold",children:"Docs"}),(0,l.jsx)("ul",{className:"pl-4 gap-4 flex flex-col items-start",children:function e(s,a){return s.map((s,r)=>{let c="".concat(a,"/").concat(s.slug),i=t.filter(e=>2==e.level&&e.parent_id==s.id);return(0,l.jsxs)("li",{children:[(0,l.jsx)("a",{href:c,className:(null==s?void 0:s.level)==1?"font-semibold":"text-slate-600",children:s.title}),i&&i[0]&&(0,l.jsx)("ul",{className:"pl-4 gap-2 flex flex-col items-start text-sm mt-2",children:e(i,c)})]},r)})}(s,"/docs")})]})}},62900:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});var l=s(23698);function a(e){let{setUser:t}=e,s=localStorage.getItem("user");if(s)try{t(JSON.parse(s));return}catch(e){t({});return}(0,l.A)("/api/clientSideAuth",{method:"post",body:{}},!0).then(e=>{let s=e.user?e.user:{};t(s),localStorage.setItem("user",JSON.stringify(s))}).catch(e=>{console.log(e)})}},92022:(e,t,s)=>{"use strict";s.r(t),s.d(t,{__N_SSP:()=>x,default:()=>f});var l=s(74848),a=s(96540),r=s(93444),c=s(96411),i=s(62900),n=s(34540);function o(e){return(0,l.jsxs)("section",{className:"py-14",children:[(0,l.jsx)("div",{className:"w-full gap-10 justify-between flex-col lg:flex-row relative z-10",children:(0,l.jsxs)("div",{className:"flex-col items-center lg:items-start max-w-lg text-center lg:text-left",style:{minWidth:"45%"},children:[(0,l.jsx)("h1",{className:"text-2xl m-0 leading-tight",children:"Documentation"}),(0,l.jsx)("span",{className:"font-normal",children:"Learn the ins and outs of datasquirel."})]})}),(0,l.jsx)("img",{src:"/images/grid.webp",alt:"Dotted image background",className:"absolute top-0 left-0 w-full h-full object-cover opacity-5 z-0"})]})}var d=s(62027);function u(e){let{title:t,description:s,url:a}=e;return(0,l.jsxs)("a",{href:a,className:"card",children:[(0,l.jsxs)("div",{className:"flex-col items-start",children:[(0,l.jsx)("span",{className:"text-2xl font-semibold",children:t}),(0,l.jsx)("span",{className:"max-w-md text-slate-600",children:s})]}),(0,l.jsx)(d.A,{size:20})]})}function m(e){return(0,l.jsx)("section",{className:"py-14",children:(0,l.jsxs)("div",{className:"grid grid-cols-1 sl:grid-cols-2 gap-4 w-full items-stretch",children:[(0,l.jsx)(u,{title:"Quick Start Guide",description:"Get Started.",url:"/docs/quick-start"}),(0,l.jsx)(u,{title:"GUI Reference",description:"Learn how to complete basic data tasks from your dashboard",url:"/docs/gui-reference"}),(0,l.jsx)(u,{title:"API Reference",description:"Interact with your database from a backend server using REST API",url:"/docs/api-reference"})]})})}var x=!0;function f(e){let{pages:t,targetPage:s}=e,d="".concat(s.title," | Datasquirel docs"),u=s.description,x=(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("title",{children:d}),(0,l.jsx)("meta",{name:"description",content:u}),(0,l.jsx)(c.A,{pageTitle:d,pageDescription:u,pagePathname:"/"})]}),[f,h]=a.useState(null);return a.useEffect(()=>{(0,i.A)({setUser:h})},[]),(0,l.jsx)(r.A,{head:x,user:f,children:(0,l.jsxs)("div",{className:"items-stretch w-full gap-0 flex-col-reverse lg:flex-row",children:[(0,l.jsx)(n.A,{pages:t}),(0,l.jsxs)("main",{children:[(0,l.jsx)(o,{}),(0,l.jsx)(m,{})]})]})})}}},e=>{var t=t=>e(e.s=t);e.O(0,[636,6593,8792],()=>t(26347)),_N_E=e.O()}]);
@@ -1 +0,0 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5151],{5439:(e,t,l)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/docs/[page]",function(){return l(34052)}])},34540:(e,t,l)=>{"use strict";l.d(t,{A:()=>r});var s=l(74848),a=l(96540);function r(e){let{pages:t}=e;if(!t||!t[0])return null;let l=null==t?void 0:t.filter(e=>1==e.level);return a.useEffect(()=>{let e=document.querySelectorAll("aside a");e&&e[0]&&e.forEach(e=>{e.pathname===window.location.pathname&&e.classList.add("active")})},[]),(0,s.jsxs)("aside",{className:"w-full lg:w-80 p-10 bg-slate-100 dark:bg-slate-800 sticky top-0 overflow-y-auto max-h-max lg:max-h-screen transition-all",children:[(0,s.jsx)("span",{className:"text-2xl m-0 mb-4 text-left font-semibold",children:"Docs"}),(0,s.jsx)("ul",{className:"pl-4 gap-4 flex flex-col items-start",children:function e(l,a){return l.map((l,r)=>{let c="".concat(a,"/").concat(l.slug),n=t.filter(e=>2==e.level&&e.parent_id==l.id);return(0,s.jsxs)("li",{children:[(0,s.jsx)("a",{href:c,className:(null==l?void 0:l.level)==1?"font-semibold":"text-slate-600",children:l.title}),n&&n[0]&&(0,s.jsx)("ul",{className:"pl-4 gap-2 flex flex-col items-start text-sm mt-2",children:e(n,c)})]},r)})}(l,"/docs")})]})}},85674:(e,t,l)=>{"use strict";l.d(t,{A:()=>a});var s=l(74848);function a(e){let{title:t,description:l}=e;return(0,s.jsxs)("section",{className:"py-14",children:[(0,s.jsx)("div",{className:"w-full gap-10 justify-between items-start flex-col lg:flex-row relative z-10",children:(0,s.jsxs)("div",{className:"flex-col items-start max-w-[740px] text-left",style:{minWidth:"45%"},children:[(0,s.jsx)("h1",{className:"m-0 leading-tight",children:t}),(0,s.jsx)("span",{className:"font-normal text-xl -my-4",dangerouslySetInnerHTML:{__html:l}})]})}),(0,s.jsx)("img",{src:"/images/grid.webp",alt:"Dotted image background",className:"absolute top-0 left-0 w-full h-full object-cover opacity-5 z-0"})]})}l(96540)},62900:(e,t,l)=>{"use strict";l.d(t,{A:()=>a});var s=l(23698);function a(e){let{setUser:t}=e,l=localStorage.getItem("user");if(l)try{t(JSON.parse(l));return}catch(e){t({});return}(0,s.A)("/api/clientSideAuth",{method:"post",body:{}},!0).then(e=>{let l=e.user?e.user:{};t(l),localStorage.setItem("user",JSON.stringify(l))}).catch(e=>{console.log(e)})}},34052:(e,t,l)=>{"use strict";l.r(t),l.d(t,{__N_SSG:()=>r,default:()=>c});var s=l(74848),a=l(96540);l(93444),l(96411),l(62900),l(34540),l(85674);var r=!0;function c(e){let{pages:t,targetPage:l}=e;return a.useEffect(()=>{window.location.href="https://datasquirel.com/docs/getting-started"},[]),(0,s.jsx)(a.Fragment,{})}}},e=>{var t=t=>e(e.s=t);e.O(0,[636,6593,8792],()=>t(5439)),_N_E=e.O()}]);
@@ -1 +0,0 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1980],{54233:(e,t,l)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/docs/[page]/[sub-page]",function(){return l(77881)}])},34540:(e,t,l)=>{"use strict";l.d(t,{A:()=>r});var s=l(74848),a=l(96540);function r(e){let{pages:t}=e;if(!t||!t[0])return null;let l=null==t?void 0:t.filter(e=>1==e.level);return a.useEffect(()=>{let e=document.querySelectorAll("aside a");e&&e[0]&&e.forEach(e=>{e.pathname===window.location.pathname&&e.classList.add("active")})},[]),(0,s.jsxs)("aside",{className:"w-full lg:w-80 p-10 bg-slate-100 dark:bg-slate-800 sticky top-0 overflow-y-auto max-h-max lg:max-h-screen transition-all",children:[(0,s.jsx)("span",{className:"text-2xl m-0 mb-4 text-left font-semibold",children:"Docs"}),(0,s.jsx)("ul",{className:"pl-4 gap-4 flex flex-col items-start",children:function e(l,a){return l.map((l,r)=>{let c="".concat(a,"/").concat(l.slug),n=t.filter(e=>2==e.level&&e.parent_id==l.id);return(0,s.jsxs)("li",{children:[(0,s.jsx)("a",{href:c,className:(null==l?void 0:l.level)==1?"font-semibold":"text-slate-600",children:l.title}),n&&n[0]&&(0,s.jsx)("ul",{className:"pl-4 gap-2 flex flex-col items-start text-sm mt-2",children:e(n,c)})]},r)})}(l,"/docs")})]})}},85674:(e,t,l)=>{"use strict";l.d(t,{A:()=>a});var s=l(74848);function a(e){let{title:t,description:l}=e;return(0,s.jsxs)("section",{className:"py-14",children:[(0,s.jsx)("div",{className:"w-full gap-10 justify-between items-start flex-col lg:flex-row relative z-10",children:(0,s.jsxs)("div",{className:"flex-col items-start max-w-[740px] text-left",style:{minWidth:"45%"},children:[(0,s.jsx)("h1",{className:"m-0 leading-tight",children:t}),(0,s.jsx)("span",{className:"font-normal text-xl -my-4",dangerouslySetInnerHTML:{__html:l}})]})}),(0,s.jsx)("img",{src:"/images/grid.webp",alt:"Dotted image background",className:"absolute top-0 left-0 w-full h-full object-cover opacity-5 z-0"})]})}l(96540)},62900:(e,t,l)=>{"use strict";l.d(t,{A:()=>a});var s=l(23698);function a(e){let{setUser:t}=e,l=localStorage.getItem("user");if(l)try{t(JSON.parse(l));return}catch(e){t({});return}(0,s.A)("/api/clientSideAuth",{method:"post",body:{}},!0).then(e=>{let l=e.user?e.user:{};t(l),localStorage.setItem("user",JSON.stringify(l))}).catch(e=>{console.log(e)})}},77881:(e,t,l)=>{"use strict";l.r(t),l.d(t,{__N_SSG:()=>a,default:()=>r}),l(74848);var s=l(96540);l(93444),l(96411),l(62900),l(34540),l(85674);var a=!0;function r(e){let{pages:t,targetPage:l}=e;return s.useEffect(()=>{window.location.href="https://datasquirel.com/docs/getting-started"},[]),null}}},e=>{var t=t=>e(e.s=t);e.O(0,[636,6593,8792],()=>t(54233)),_N_E=e.O()}]);
@@ -1 +0,0 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6712],{87869:(e,s,i)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/email-verification",function(){return i(68581)}])},68581:(e,s,i)=>{"use strict";i.r(s),i.d(s,{__N_SSP:()=>r,default:()=>d});var n=i(74848),l=i(96540);i(13368);var a=i(620),c=i(23698),t=i(93444),r=!0;function d(e){let{user:s,verified:i}=e,[r,d]=l.useState(!1),[o,m]=l.useState(null);return i?(l.useEffect(()=>{try{setTimeout(()=>{window.location.pathname="/admin"},2e3)}catch(e){(0,c.A)("/api/admin/clientError",{method:"post",body:{component:"email-verification/index-page-component/lines-72-74",message:e.message,user:s}}),window.location.pathname="/logout"}},[]),(0,n.jsx)(t.A,{head:(0,n.jsxs)(l.Fragment,{children:[(0,n.jsx)("title",{children:"Verify Email Address"}),(0,n.jsx)("meta",{name:"description",content:"Verify your email address"})]}),user:s,children:(0,n.jsx)("main",{className:"flex items-center justify-center w-full p-8",children:(0,n.jsx)("div",{className:"login-block gap-2",children:(0,n.jsxs)("div",{className:"flex items-center gap-4",children:[(0,n.jsx)("img",{src:"/images/checkmark.svg",alt:"check-mark",width:30}),(0,n.jsx)("span",{className:"text-xl",children:"Email Verification Successfull!"})]})})})})):(0,n.jsx)(l.Fragment,{children:(0,n.jsx)(t.A,{head:(0,n.jsxs)(l.Fragment,{children:[(0,n.jsx)("title",{children:"Verify Email Address"}),(0,n.jsx)("meta",{name:"description",content:"Verify your email address"})]}),user:s,children:(0,n.jsx)("main",{className:"flex flex-col items-center p-8 justify-center w-full",children:(0,n.jsxs)("div",{className:"login-block gap-2 flex-col max-w-lg",children:[o&&(0,n.jsx)("div",{className:o.class+" w-full rounded py-2 px-4 flex justify-center",children:o.msg}),r&&(0,n.jsx)(a.A,{position:"absolute"}),(0,n.jsx)("h1",{className:"text-2xl m-0 ",children:"Verify Email Address"}),(0,n.jsx)("span",{children:"Please click the button below to send verification link"}),(0,n.jsx)("button",{className:"w-full",onClick:function(e){e.preventDefault(),d(!0),(0,c.A)("/api/sendEmailVerificationLink").then(e=>{d(!1),e.success&&m({msg:"Email Sent. Please check mailbox",class:"bg-emerald-100"})})},children:(0,n.jsx)("span",{children:"Send Verification Link"})}),(0,n.jsx)("button",{className:"w-full outlined",onClick:e=>{window.history.back()},children:(0,n.jsx)("span",{children:"Go Back"})})]})})})})}}},e=>{var s=s=>e(e.s=s);e.O(0,[636,6593,8792],()=>s(87869)),_N_E=e.O()}]);
@@ -1 +0,0 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3332],{23792:(e,t,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){return a(64393)}])},35681:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});var r=a(74848),i=a(96540),h=a(51105),o=a(87220);function s(e){let{content:t,language:a,style:s,showCopy:c}=e,[d,l]=i.useState(!1),n=()=>{l(!0)},y=(e,t)=>{"clickaway"!==t&&l(!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:y,children:"✖"})}),x={};return(0,r.jsxs)("pre",{className:"language-".concat(a||"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:t}),(0,r.jsx)("button",{className:"outlined copy-code "+(c?"relative show":" absolute right-2 z-20 hover:opacity-50"),style:{padding:"2px",border:"none"},onClick:e=>{navigator.clipboard.writeText(t).then(()=>{n()})},children:(0,r.jsx)(o.A,{className:"text-white",size:20})}),(0,r.jsx)(h.A,{open:d,autoHideDuration:2e3,onClose:y,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]})})]})}},50094:(e,t,a)=>{"use strict";a.d(t,{A:()=>i});var r=a(74848);function i(e){let{src:t,alt:a,className:i,fadeHeight:h,width:o,height:s,opacity:c}=e;return(0,r.jsxs)("div",{className:"overflow-hidden z-0"+(i?" "+i:""),children:[(0,r.jsx)("img",{src:t,alt:a,className:"w-full h-full object-cover",width:o,height:s}),(0,r.jsx)("div",{className:"fade-side",style:{height:h}})]})}a(96540)},87220:(e,t,a)=>{"use strict";a.d(t,{A:()=>r});let r=(0,a(95737).A)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},2894:(e,t,a)=>{"use strict";a.d(t,{A:()=>r});let r=(0,a(95737).A)("FileKey2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v6",key:"rc0qvx"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["circle",{cx:"4",cy:"16",r:"2",key:"1ehqvc"}],["path",{d:"m10 10-4.5 4.5",key:"7fwrp6"}],["path",{d:"m9 11 1 1",key:"wa6s5q"}]])},18190:(e,t,a)=>{"use strict";a.d(t,{A:()=>r});let r=(0,a(95737).A)("Sheet",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["line",{x1:"3",x2:"21",y1:"9",y2:"9",key:"1vqk6q"}],["line",{x1:"3",x2:"21",y1:"15",y2:"15",key:"o2sbyz"}],["line",{x1:"9",x2:"9",y1:"9",y2:"21",key:"1ib60c"}],["line",{x1:"15",x2:"15",y1:"9",y2:"21",key:"1n26ft"}]])},64393:(e,t,a)=>{"use strict";a.r(t),a.d(t,{HomepageContext:()=>h,default:()=>o}),a(74848);var r=a(96540);a(93444),a(96411),a(62900),a(42361),a(26659),a(96869),a(47512),a(57457),a(50094),a(35681);var i=a(95737);(0,i.A)("SquareGanttChart",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 8h7",key:"kbo1nt"}],["path",{d:"M8 12h6",key:"ikassy"}],["path",{d:"M11 16h5",key:"oq65wt"}]]),(0,i.A)("CopyCheck",[["path",{d:"m12 15 2 2 4-4",key:"2c609p"}],["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]),a(18190),(0,i.A)("EarthLock",[["path",{d:"M7 3.34V5a3 3 0 0 0 3 3",key:"w732o8"}],["path",{d:"M11 21.95V18a2 2 0 0 0-2-2 2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05",key:"f02343"}],["path",{d:"M21.54 15H17a2 2 0 0 0-2 2v4.54",key:"1djwo0"}],["path",{d:"M12 2a10 10 0 1 0 9.54 13",key:"zjsr6q"}],["path",{d:"M20 6V4a2 2 0 1 0-4 0v2",key:"1of5e8"}],["rect",{width:"8",height:"5",x:"14",y:"6",rx:"1",key:"1fmf51"}]]),a(2894),(0,i.A)("FolderOutput",[["path",{d:"M2 7.5V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-1.5",key:"1yk7aj"}],["path",{d:"M2 13h10",key:"pgb2dq"}],["path",{d:"m5 10-3 3 3 3",key:"1r8ie0"}]]);let h=r.createContext({});function o(){r.useEffect(()=>{window.location.replace("/login")},[])}},47512:e=>{e.exports={hero_section_wrapper:"Home_hero_section_wrapper__rAO8W",hero_image:"Home_hero_image__qie3Q",hero_image_alt:"Home_hero_image_alt__Bl1L4",hero_text_section:"Home_hero_text_section__tNqS5"}}},e=>{var t=t=>e(e.s=t);e.O(0,[7623,1105,9654,636,6593,8792],()=>t(23792)),_N_E=e.O()}]);
@@ -1 +0,0 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[676],{86774:(e,s,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/login",function(){return r(74742)}])},87291:(e,s,r)=>{"use strict";r.d(s,{A:()=>l});var t=r(74848);r(96540);var a=r(620);function l(){return(0,t.jsx)("div",{className:"flex flex-col gap-4 items-center justify-center w-full h-screen p-6 bg-slate-100",children:(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center gap-4 px-6 py-20 bg-white rounded shadow-sm max-w-2xl w-full",children:[(0,t.jsx)("img",{src:"/images/logo-icon-alt-2.webp",alt:"Datasquirel Logo",width:60}),(0,t.jsx)("div",{className:"w-10 h-10 flex flex-col items-center justify-center",children:(0,t.jsx)(a.A,{width:"25px",position:"relative"})})]})})}},74742:(e,s,r)=>{"use strict";r.r(s),r.d(s,{__N_SSP:()=>p,default:()=>w});var t=r(74848),a=r(96540),l=r(13368),n=r.n(l),i=r(43586),o=r(23698);async function c(e){let{e:s,setAlert:r,setLoading:t,query:a}=e;s.preventDefault(),t(!0);let l=s.target["email-or-username-input"],n=s.target.password;if((null==l?void 0:l.value)===""&&(null==n?void 0:n.value)===""){l.classList.add("warning"),n.classList.add("warning"),r("No Email or Password Provided"),t(!1);return}if((null==n?void 0:n.value)===""){r(!1),n.classList.add("warning"),r(!0),t(!1);return}l.classList.remove("warning"),n.classList.remove("warning"),r(!1);let c={email:l.value,password:n.value,query:a};(0,o.A)("/api/loginUser",{method:"post",body:c}).then(async e=>{console.log(e),e.user&&e.user.auth?(localStorage.setItem("userid",e.user.userid),localStorage.setItem("csrf",e.user.csrf_k),localStorage.setItem("user",JSON.stringify(e.userPayload)),(0,i.A)().then(()=>{window.location.reload()})):(r(e.msg),t(!1))})}var u=r(620),d=r(29907);let m=a.createContext({});function x(e){let{user:s,query:r}=e,[l,n]=(0,a.useState)(null),[i,o]=(0,a.useState)(!1);return(0,t.jsxs)(m.Provider,{value:{loading:i,setLoading:o,alert:l,setAlert:n,user:s},children:[(0,t.jsx)(d.A,{user:s,userType:"admin",setLoading:o}),(0,t.jsxs)("div",{className:"w-full justify-center relative",children:[(0,t.jsx)("span",{className:"bg-white dark:bg-slate-800 px-3 relative z-10",children:"OR"}),(0,t.jsx)("hr",{className:"absolute"})]}),(0,t.jsxs)("div",{className:"w-full flex-col items-stretch gap-4",children:[i&&(0,t.jsx)(u.A,{}),l&&(0,t.jsx)("div",{className:"p-2 justify-center text-sm border border-solid border-orange-400 rounded bg-orange-50",children:l}),(0,t.jsxs)("form",{className:"flex flex-col gap-2 w-full",onSubmit:e=>{c({e,setAlert:n,setLoading:o,query:r})},children:[(0,t.jsx)("input",{type:"text",name:"email-or-username-input",id:"email-or-username-input",placeholder:"Email or username",defaultValue:(null==r?void 0:r.email)?r.email:"",required:!0,onInput:e=>{l&&n(!1)}}),(0,t.jsx)("input",{type:"password",name:"password",id:"password-input",placeholder:"Password",required:!0,onInput:e=>{l&&n(!1)}}),(0,t.jsx)("button",{type:"submit",children:"Login"})]}),(0,t.jsx)("div",{className:"flex flex-col items-center w-full mb-2",children:(0,t.jsx)("a",{href:"/send-password-reset-link",className:"text-secondary font-semibold",children:"Forgot Password?"})}),(0,t.jsxs)("div",{className:"flex items-center gap-2 justify-center w-full mb-2 flex-wrap",children:[(0,t.jsx)("span",{children:"Dont have an account yet?"}),(0,t.jsx)("a",{href:"/create-account",className:"text-secondary font-semibold",children:"Register Now"})]}),(0,t.jsxs)("div",{className:"justify-center text-sm text-secondary",children:[(0,t.jsx)("a",{href:"/terms",className:"text-secondary",children:"Terms and Conditions"}),(0,t.jsx)("a",{href:"/privacy",className:"text-secondary",children:"Privacy Policy"})]})]})]})}var f=r(61638),h=r(87291),p=!0;function w(e){return(a.useEffect(()=>{setTimeout(()=>{e.query.invite&&e.user&&(window.location.pathname="/create-account")},1e3),e.query.invite||localStorage.setItem("user","{}")},[]),e.query.invite&&e.user)?(0,t.jsx)(h.A,{}):(0,t.jsxs)(a.Fragment,{children:[(0,t.jsxs)(n(),{children:[(0,t.jsx)("title",{children:"Login to your account"}),(0,t.jsx)("meta",{name:"description",content:"Login to your account"})]}),(0,t.jsx)("main",{className:"w-screen h-screen flex items-center justify-center p-4 md:p-8",children:(0,t.jsxs)("div",{className:"card col items-center no-hover max-w-md w-full bg-white p-4 sm:p-6 overflow-auto minimal-scrollbars",style:{maxHeight:"calc(100vh - 40px)"},children:[(0,t.jsx)(f.A,{}),(0,t.jsx)("hr",{}),(0,t.jsx)("h3",{className:"m-0 text-lg font-semibold",children:"Login to your account"}),(0,t.jsx)(x,{user:e.user,query:e.query})]})})]})}}},e=>{var s=s=>e(e.s=s);e.O(0,[9907,636,6593,8792],()=>s(86774)),_N_E=e.O()}]);
@@ -1 +0,0 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7122],{9282:(e,o,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/logout",function(){return t(20238)}])},43586:(e,o,t)=>{"use strict";async function i(){try{let e=await caches.keys();e[0]&&await Promise.all(e.map(e=>caches.delete(e)))}catch(e){console.log("Error in clearing cache =>",e.message)}}t.d(o,{A:()=>i})},20238:(e,o,t)=>{"use strict";t.r(o),t.d(o,{__N_SSP:()=>g,default:()=>d});var i=t(74848),s=t(96540),l=t(13368),n=t.n(l),a=t(23698),c=t(43586),r=t(620),g=!0;function d(e){let{user:o,query:t}=e,l=(0,i.jsxs)(s.Fragment,{children:[(0,i.jsx)("title",{children:"Loging Out | Datasquirel"}),(0,i.jsx)("meta",{name:"description",content:"Login you out"}),(0,i.jsx)("script",{src:"https://accounts.google.com/gsi/client"}),(0,i.jsx)("script",{src:"https://connect.facebook.net/en_US/sdk.js",crossOrigin:"anonymous"})]});return s.useEffect(()=>{localStorage.setItem("user","{}"),localStorage.removeItem("csrf")},[]),s.useEffect(()=>{function e(){var e,i;return(null==t?void 0:t.invite)&&(null==t?void 0:t.login)?window.location.href="/login"+window.location.search:(null==t?void 0:t.login)||(null===(e=localStorage.getItem("logoutParadigm"))||void 0===e?void 0:e.match(/reset/))?window.location.href="/login":void((null==o?void 0:null===(i=o.social_platform)||void 0===i?void 0:i.match(/google/))&&localStorage.setItem("google_prompt_skipped","logout"),window.location.pathname="/")}(0,a.A)("/api/logoutUser").then(async t=>{await (0,c.A)();let i=await navigator.serviceWorker.getRegistrations();for(let e=0;e<i.length;e++){let o=i[e];await o.unregister()}try{FB.init({appId:"",cookie:!0,xfbml:!0,version:"v13.0"}),FB.getLoginStatus(t=>{if(t.authResponse)FB.logout(o=>{e()});else{var i;google.accounts.id.initialize({client_id:""}),(null==o?void 0:null===(i=o.social_platform)||void 0===i?void 0:i.match(/google/))&&o.social_id?(google.accounts.id.revoke(),google.accounts.id.revoke(o.social_id,o=>{console.log(o.error),e()})):e()}})}catch(e){(0,a.A)("/api/admin/clientError",{method:"post",body:{component:"logout-page-component/lines-111-142",message:e.message,user:o}})}})},[]),(0,i.jsxs)(s.Fragment,{children:[(0,i.jsx)(n(),{children:l}),(0,i.jsx)("main",{className:"w-screen h-screen flex items-center justify-center p-4 md:p-8",children:(0,i.jsxs)("div",{className:"card max-w-md flex-col items-center bg-white p-6 rounded border border-slate-200 border-solid",children:[(0,i.jsxs)("a",{href:"/",className:"flex items-center gap-2",children:[(0,i.jsx)("img",{src:"/images/logo-icon-alt-2.png",alt:"Logo Icon",width:37}),(0,i.jsx)("span",{className:"font-bold text-2xl",children:"Datasquirel"})]}),(0,i.jsx)("h3",{className:"text-lg m-0 mt-4 text-slate-400",children:"Logging out"}),(0,i.jsx)(r.A,{position:"relative",width:"20px"})]})})]})}}},e=>{var o=o=>e(e.s=o);e.O(0,[636,6593,8792],()=>o(9282)),_N_E=e.O()}]);
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6744],{58146:(e,t,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/redirect",function(){return a(95796)}])},95796:(e,t,a)=>{"use strict";a.r(t),a.d(t,{CreateAccountContext:()=>n,default:()=>c});var r=a(74848),l=a(96540);a(93444);var s=a(96411),i=a(620);let n=l.createContext({});function c(){r.Fragment,s.A;let[e,t]=l.useState(null);return l.useEffect(()=>{for(let e of Array.from(new URLSearchParams(window.location.search))){let[t,a]=e;"redirect_target"==t&&(window.location.href=a+window.location.search)}setTimeout(()=>{window.location.pathname="/"},2e3)},[]),(0,r.jsx)("div",{className:"flex flex-col gap-4 items-center justify-center w-full h-screen p-6 bg-slate-100",children:(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center gap-4 px-6 py-20 bg-white rounded shadow-sm max-w-2xl w-full",children:[(0,r.jsx)("img",{src:"/images/logo-icon-alt-2.webp",alt:"Datasquirel Logo",width:60}),(0,r.jsx)("div",{className:"w-10 h-10 flex flex-col items-center justify-center",children:(0,r.jsx)(i.A,{width:"25px",position:"relative"})})]})})}}},e=>{var t=t=>e(e.s=t);e.O(0,[636,6593,8792],()=>t(58146)),_N_E=e.O()}]);
@@ -1 +0,0 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7537],{13792:(e,s,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/reset-password",function(){return a(18969)}])},70385:(e,s,a)=>{"use strict";a.d(s,{A:()=>r});var t=a(74848);function r(e){let{message:s,className:a}=e;return(0,t.jsxs)("div",{className:"info green"+(a?" "+a:""),children:[(0,t.jsx)("img",{src:"/images/checkmark.svg",alt:"Warning Image Icon",width:22,className:"-my-2"}),(0,t.jsx)("span",{children:s})]})}a(96540)},18969:(e,s,a)=>{"use strict";a.r(s),a.d(s,{ResetPasswordContext:()=>w,__N_SSP:()=>m,default:()=>p});var t=a(74848),r=a(96540),n=a(93444),i=a(96411),o=a(620),l=a(23698),c=a(70385),d=a(2543),u=a.n(d),m=!0;let w=r.createContext({});function p(e){let{email:s}=e,a="Reset Password | Datasquirel",d="Set a new password",m=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("title",{children:a}),(0,t.jsx)("meta",{name:"description",content:d}),(0,t.jsx)(i.A,{pageTitle:a,pageDescription:d,pagePathname:"/"})]}),[p,h]=r.useState(!1),[x,g]=r.useState(!1);return(0,t.jsx)(n.A,{head:m,user:e.user,children:(0,t.jsx)(w.Provider,{value:{user:e.user},children:(0,t.jsx)("main",{children:(0,t.jsxs)("section",{children:[p&&(0,t.jsx)(o.A,{}),(0,t.jsx)("div",{className:"main-container flex-col items-start",children:x?(0,t.jsx)(c.A,{message:"Password Updated Sucessfully. Redirecting you ..."}):(0,t.jsxs)(r.Fragment,{children:[(0,t.jsx)("h1",{className:"m-0 text-4xl",children:"Reset Password"}),(0,t.jsx)("span",{children:"Please enter new passord and confirm it"}),(0,t.jsxs)("form",{className:"max-w-xl w-full flex flex-col items-stretch gap-4",onSubmit:e=>{h(!0),e.preventDefault();let a=e.target,t=a.password.value,r=a["confirm-password"].classList.contains("warning");if((null==t?void 0:t.length)<8){window.alert("Password must be at least 8 characters"),setTimeout(()=>{h(!1)},500);return}if(r){window.alert("Passwords don't match"),setTimeout(()=>{h(!1)},500);return}(0,l.A)("/api/resetPassword?email=".concat(s,"&password=").concat(t)).then(e=>{setTimeout(()=>{h(!1)},500),setTimeout(()=>{window.location.href="/logout?login=true"},1e3),e.success&&g(!0)})},children:[(0,t.jsx)("input",{type:"password",name:"password",id:"password",className:"w-full",placeholder:"New Password",required:!0}),(0,t.jsx)("input",{type:"password",name:"confirm-password",id:"confirm-password",className:"w-full",placeholder:"Confirm New Password",required:!0,onInput:e=>{let s=e.target,a=s.closest("form");try{a.password.value.match(new RegExp("^".concat(u().escapeRegExp(s.value),"$")))?s.classList.remove("warning"):s.classList.add("warning")}catch(s){(0,l.A)("/api/admin/clientError",{method:"post",body:{component:"reset-password-page-component/lines-170-177",message:s.message,user:{}}}),e.target.classList.add("warning")}}}),(0,t.jsx)("button",{children:"Reset Password"})]})]})})]})})})})}}},e=>{var s=s=>e(e.s=s);e.O(0,[1570,636,6593,8792],()=>s(13792)),_N_E=e.O()}]);
@@ -1 +0,0 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6827],{94652:(e,s,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/send-password-reset-link",function(){return a(93976)}])},70385:(e,s,a)=>{"use strict";a.d(s,{A:()=>l});var t=a(74848);function l(e){let{message:s,className:a}=e;return(0,t.jsxs)("div",{className:"info green"+(a?" "+a:""),children:[(0,t.jsx)("img",{src:"/images/checkmark.svg",alt:"Warning Image Icon",width:22,className:"-my-2"}),(0,t.jsx)("span",{children:s})]})}a(96540)},24139:(e,s,a)=>{"use strict";var t=a(24994);s.A=void 0;var l=t(a(44888)),n=a(74848);s.A=(0,l.default)([(0,n.jsx)("path",{d:"M12 4c-4.41 0-8 3.59-8 8s3.59 8 8 8 8-3.59 8-8-3.59-8-8-8m1 13h-2v-6h2zm0-8h-2V7h2z",opacity:".3"},"0"),(0,n.jsx)("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"},"1")],"InfoTwoTone")},93976:(e,s,a)=>{"use strict";a.r(s),a.d(s,{SendPassResetContext:()=>u,__N_SSP:()=>h,default:()=>x});var t=a(74848),l=a(96540),n=a(93444),i=a(96411),r=a(620),d=a(23698),c=a(70385),o=a(24139);function m(e){let{message:s}=e;return(0,t.jsxs)("div",{className:"info gray",children:[(0,t.jsx)(o.A,{fontSize:"small",color:"inherit",className:"opacity-50 text-gray-600"}),(0,t.jsx)("span",{className:"font-normal",children:s})]})}var h=!0;let u=l.createContext({});function x(e){var s;let a="Cloudbased SQL data management system | Datasquirel",o="Datasquirel is a fast and efficient cloud-based SQL data management system that takes away the entire hassle of dealing with data both locally and across different platforms.",h=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("title",{children:a}),(0,t.jsx)("meta",{name:"description",content:o}),(0,t.jsx)(i.A,{pageTitle:a,pageDescription:o,pagePathname:"/"})]}),[x,p]=l.useState(!1),[f,j]=l.useState(!1);return(0,t.jsx)(n.A,{head:h,user:e.user,children:(0,t.jsx)(u.Provider,{value:{user:e.user},children:(0,t.jsx)("main",{children:(0,t.jsxs)("section",{children:[x&&(0,t.jsx)(r.A,{}),f?(0,t.jsx)(c.A,{message:"Email Sent. Please check your email address and follow the link provided",className:"whitespace-nowrap"}):(0,t.jsx)("div",{className:"paper",children:(0,t.jsxs)("div",{className:"max-w-xl flex-col items-stretch",children:[(0,t.jsx)("h1",{className:"m-0 text-4xl",children:"Send Password Reset Link"}),(0,t.jsx)("span",{children:"Please enter your email address to receive a password reset link"}),(0,t.jsxs)("form",{className:"w-full flex flex-col items-stretch gap-4",onSubmit:e=>{p(!0),e.preventDefault();let s=e.target["email-address"].value;(0,d.A)("/api/sendPasswordResetLink?email=".concat(s)).then(e=>{console.log(e),setTimeout(()=>{p(!1)},500),e.success&&j(!0)})},children:[(0,t.jsx)("input",{type:"text",autoComplete:"email",name:"email-address",id:"email-address",className:"w-full",placeholder:"Email Address",defaultValue:(null==e?void 0:null===(s=e.user)||void 0===s?void 0:s.logged_in_status)?e.user.email:"",required:!0}),(0,t.jsx)("button",{children:"Send password reset Email"}),(0,t.jsx)(m,{message:"Please note that this link will expire after 1 hour"})]})]})})]})})})})}}},e=>{var s=s=>e(e.s=s);e.O(0,[636,6593,8792],()=>s(94652)),_N_E=e.O()}]);
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[866],{42602:(e,l,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/su/console",function(){return t(12492)}])},12492:(e,l,t)=>{"use strict";t.r(l),t.d(l,{__N_SSP:()=>d,default:()=>m});var s=t(74848),n=t(96540),o=t(2016),a=t(54787);async function r(e){let{socket:l}=e,{Terminal:s}=t(62975),{FitAddon:n}=t(29195),o=new n,a=document.getElementById("terminalWrapper"),r=document.getElementById("terminal"),i=Math.round(a.clientWidth/12),c=new s({cols:i,rows:6});c.open(r),o.fit(),l.on("console",e=>{c.write(e)});{let e=new n,t=document.getElementById("shell"),o=new s({cols:i,rows:17});o.open(t),e.fit(),l.on("shell",e=>{o.write(e)}),o.onKey((e,t)=>{l.emit("shell",e.key)})}return c}var i=t(911);function c(e){let{socketDomain:l}=e,[t,o]=n.useState(null),[c,d]=n.useState(null),[m,u]=n.useState("");return n.useEffect(()=>{if(console.log("Socket Domain =>",l),!l)return;let e=(0,a.io)(l,{extraHeaders:{"X-Socket-Paradigm":"Console"}});e.on("connect",()=>{o(e),console.log("Socket Connected!")}),setInterval(()=>{e.emit("get-log")},1e3),e.on("console-log",e=>{console.log("Fetched Log",e),u(e.replace((0,i.A)(),"")),setTimeout(()=>{let e=document.getElementById("logHistoryWrapper");e&&(e.scrollTop=e.scrollHeight)},200)})},[]),n.useEffect(()=>{if(t)return r({socket:t}).then(e=>{d(e)}),function(){var e,l;null===(e=document.getElementById("terminal"))||void 0===e||e.childNodes.forEach(e=>{var l;null===(l=e.parentNode)||void 0===l||l.removeChild(e)}),null===(l=document.getElementById("shell"))||void 0===l||l.childNodes.forEach(e=>{var l;null===(l=e.parentNode)||void 0===l||l.removeChild(e)}),null==c||c.dispose()}},[t]),(0,s.jsxs)(n.Fragment,{children:[(0,s.jsxs)("div",{className:"w-full justify-between",children:[(0,s.jsx)("h2",{className:"text-2xl m-0",children:"Console"}),(0,s.jsx)("button",{onClick:e=>{t&&t.emit("log","Logging to the console")},children:"Log console"})]}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-6 w-full items-stretch",children:[(0,s.jsx)("section",{className:"paper bg-slate-900",id:"terminalWrapper",children:(0,s.jsx)("div",{className:"flex flex-col w-full gap-10 items-start justify-start terminal",children:(0,s.jsxs)("div",{className:"flex flex-col items-start w-full",children:[(0,s.jsx)("h2",{className:"m-0 text-white text-base",children:"Shell"}),(0,s.jsx)("hr",{className:"opacity-20"}),(0,s.jsx)("div",{id:"shell",className:"relative grow z-50 overflow-hidden w-full h-[340px]"})]})})}),(0,s.jsx)("section",{className:"paper bg-slate-500",id:"terminalWrapper",children:(0,s.jsx)("div",{className:"flex flex-col w-full gap-10 items-start justify-start terminal",children:(0,s.jsxs)("div",{className:"flex flex-col items-start w-full",children:[(0,s.jsx)("h2",{className:"m-0 text-white text-base",children:"Server Log"}),(0,s.jsx)("hr",{className:"opacity-20"}),(0,s.jsx)("div",{id:"terminal",className:"relative grow z-50 overflow-hidden w-full h-[150px]"})]})})})]})]})}t(5044);var d=!0;function m(e){let{user:l,data:t,socketDomain:n}=e,a=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("title",{children:"Console | Datasquirel"}),(0,s.jsx)("meta",{name:"description",content:"Databases Console"})]});return(0,s.jsx)(o.A,{head:a,user:l,children:(0,s.jsx)(c,{socketDomain:n})})}}},e=>{var l=l=>e(e.s=l);e.O(0,[160,2793,2016,636,6593,8792],()=>l(42602)),_N_E=e.O()}]);
@@ -1 +0,0 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3402],{47135:(e,s,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/su/docs",function(){return a(90317)}])},90317:(e,s,a)=>{"use strict";a.r(s),a.d(s,{__N_SSP:()=>_,default:()=>u});var r=a(74848);a(96540);var t=a(2016),n=a(43502),_=!0;function u(e){let{user:s,data:a}=e,_=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("title",{children:"User Dashboard | Datasquirel"}),(0,r.jsx)("meta",{name:"description",content:"Welcome to your data app"})]});return(0,r.jsx)(t.A,{head:_,user:s,children:(0,r.jsx)(n.A,{data:a})})}}},e=>{var s=s=>e(e.s=s);e.O(0,[2016,8135,636,6593,8792],()=>s(47135)),_N_E=e.O()}]);
@@ -1 +0,0 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[179],{71270:(e,a,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/su/docs/create-page",function(){return r(35233)}])},35233:(e,a,r)=>{"use strict";r.r(a),r.d(a,{__N_SSP:()=>u,default:()=>_});var s=r(74848);r(96540);var t=r(2016),n=r(93127),u=!0;function _(e){let{user:a,data:r}=e,u=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("title",{children:"User Dashboard | Datasquirel"}),(0,s.jsx)("meta",{name:"description",content:"Welcome to your data app"})]});return(0,s.jsx)(t.A,{head:u,user:a,children:(0,s.jsx)(n.A,{data:r,user:a})})}}},e=>{var a=a=>e(e.s=a);e.O(0,[7623,1522,8521,5414,2016,3127,636,6593,8792],()=>a(71270)),_N_E=e.O()}]);
@@ -1 +0,0 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3319],{52922:(e,s,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/su/docs/edit-page",function(){return a(27825)}])},27825:(e,s,a)=>{"use strict";a.r(s),a.d(s,{__N_SSP:()=>u,default:()=>_});var r=a(74848);a(96540);var t=a(2016),n=a(93127),u=!0;function _(e){let{user:s,data:a}=e,u=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("title",{children:"User Dashboard | Datasquirel"}),(0,r.jsx)("meta",{name:"description",content:"Welcome to your data app"})]});return(0,r.jsx)(t.A,{head:u,user:s,children:(0,r.jsx)(n.A,{data:a,user:s})})}}},e=>{var s=s=>e(e.s=s);e.O(0,[7623,1522,8521,5414,2016,3127,636,6593,8792],()=>s(52922)),_N_E=e.O()}]);
@@ -1 +0,0 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[99],{88723:(e,s,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/su/docs/pages",function(){return a(82564)}])},82564:(e,s,a)=>{"use strict";a.r(s),a.d(s,{__N_SSP:()=>_,default:()=>u});var r=a(74848);a(96540);var t=a(2016),n=a(43502),_=!0;function u(e){let{user:s,data:a}=e,_=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("title",{children:"User Dashboard | Datasquirel"}),(0,r.jsx)("meta",{name:"description",content:"Welcome to your data app"})]});return(0,r.jsx)(t.A,{head:_,user:s,children:(0,r.jsx)(n.A,{data:a})})}}},e=>{var s=s=>e(e.s=s);e.O(0,[2016,8135,636,6593,8792],()=>s(88723)),_N_E=e.O()}]);
@@ -1 +0,0 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4795],{85172:(e,r,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/su/docs/pages/[id]",function(){return s(71436)}])},71436:(e,r,s)=>{"use strict";s.r(r),s.d(r,{__N_SSP:()=>i,default:()=>_});var t=s(74848),a=s(96540),n=s(2016),u=s(93127);function d(e){let{data:r,user:s}=e,{targetDocPage:n}=r;return(0,t.jsx)(a.Fragment,{children:(0,t.jsx)(u.A,{data:n,user:s})})}var i=!0;function _(e){let{user:r,data:s}=e,a=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("title",{children:"User Dashboard | Datasquirel"}),(0,t.jsx)("meta",{name:"description",content:"Welcome to your data app"})]});return(0,t.jsx)(n.A,{head:a,user:r,children:(0,t.jsx)(d,{data:s,user:r})})}}},e=>{var r=r=>e(e.s=r);e.O(0,[7623,1522,8521,5414,2016,3127,636,6593,8792],()=>r(85172)),_N_E=e.O()}]);
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More