First Commit

This commit is contained in:
Benjamin Toby
2024-11-05 12:12:42 +01:00
commit 09ae0dd3fe
1078 changed files with 138432 additions and 0 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
@@ -0,0 +1 @@
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5667],{10312:function(e,t,s){s.d(t,{Z:function(){return a}});const a=(0,s(45711).Z)("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"}]])},37359:function(e,t,s){s.d(t,{Z:function(){return b}});var a=s(85893),n=s(67294),r=s(41457),i=s(424),c=s(97946),d=(s(68744),s(96891));function l(e){var t=n.useContext(r.DashboardContext),s=t.databases,i=t.setTargetDatabase,c=t.user;return(0,a.jsx)(n.Fragment,{children:(0,a.jsx)(d.Z,{databases:s,setTargetDatabase:i,title:"Recently added Databases",more:!0,user:c})})}var o=s(55592),u=s(33587),x=s(10312),m=s(78107);const h=(0,s(45711).Z)("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){var t=e.icon,s=e.metric,n=e.count,r=e.url;return(0,a.jsxs)("a",{href:r,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:n}),(0,a.jsx)("span",{className:"text-sm text-slate-600 dark:text-slate-400",children:s})]})]})}function v(e){var t=n.useContext(r.DashboardContext),s=(t.databases,t.setTargetDatabase,t.metrics),i=t.user;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===s||void 0===s?void 0:s.dbCount)||0,icon:(0,a.jsx)(u.Z,{size:20,className:"text-secondary2"}),url:"/admin/".concat(null===i||void 0===i?void 0:i.id,"/databases")}),(0,a.jsx)(j,{metric:"Tables Created",count:(null===s||void 0===s?void 0:s.tablesCount)||0,icon:(0,a.jsx)(x.Z,{size:20,className:"text-primary"})}),(0,a.jsx)(j,{metric:"Media Added",count:(null===s||void 0===s?void 0:s.mediaCount)||0,icon:(0,a.jsx)(m.Z,{size:20,className:"text-slate-500"}),url:"/admin/".concat(null===i||void 0===i?void 0:i.id,"/media")}),(0,a.jsx)(j,{metric:"API Keys",count:(null===s||void 0===s?void 0:s.apiKeysCount)||0,icon:(0,a.jsx)(h,{size:20,className:"text-slate-900 dark:text-white"}),url:"/admin/".concat(null===i||void 0===i?void 0:i.id,"/api-keys")})]})})}function b(e){var t,s=n.useContext(r.DashboardContext),d=(s.databases,s.user);return(0,a.jsxs)(n.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)(i.Z,{user:d})]}),(null===d||void 0===d||null===(t=d.verification_status)||void 0===t?void 0:t.toString().match(/1/))?(0,a.jsxs)(n.Fragment,{children:[(0,a.jsx)(v,{}),(0,a.jsx)(l,{}),(0,a.jsx)(o.Z,{user:d})]}):(0,a.jsx)(c.Z,{})]})}},41457:function(e,t,s){s.r(t),s.d(t,{DashboardContext:function(){return u},__N_SSP:function(){return o},default:function(){return x}});var a=s(828),n=s(85893),r=s(67294),i=s(54858),c=s(37359),d=s(85012),l={},o=!0,u=r.createContext(l);function x(e){var t=e.user,s=e.databases,l=e.metrics,o=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("title",{children:"User Dashboard | Datasquirel"}),(0,n.jsx)("meta",{name:"description",content:"Welcome to your data app"})]}),x=r.useState(null),m=(0,a.Z)(x,2),h=m[0],j=m[1];return(0,n.jsx)(i.Z,{head:o,user:t,children:(0,n.jsxs)(u.Provider,{value:{user:t,databases:s,targetDatabase:h,setTargetDatabase:j,metrics:l},children:[(0,n.jsx)(c.Z,{}),(0,n.jsx)(d.Z,{targetDatabase:h})]})})}}}]);
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
@@ -0,0 +1 @@
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8374],{98374:function(e,n,r){r.d(n,{Z:function(){return t}});r(828),r(85893),r(67294),r(47568),r(97582),r(86729);r(29137);function t(e){e.user,e.userType,e.setLoading;return null}},29137:function(e,n,r){r.d(n,{Z:function(){return u}});var t=r(47568),s=r(97582);function u(){return c.apply(this,arguments)}function c(){return(c=(0,t.Z)((function(){var e,n;return(0,s.__generator)(this,(function(r){switch(r.label){case 0:return r.trys.push([0,4,,5]),[4,caches.keys()];case 1:return(e=r.sent())[0]?[4,Promise.all(e.map((function(e){return caches.delete(e)})))]:[3,3];case 2:r.sent(),r.label=3;case 3:return[3,5];case 4:return n=r.sent(),console.log("Error in clearing cache =>",n.message),[3,5];case 5:return[2]}}))}))).apply(this,arguments)}}}]);
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
@@ -0,0 +1 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2197],{45160:function(t,n,c){"use strict";var e=c(64836);n.Z=void 0;var r=e(c(64938)),u=c(85893),o=(0,r.default)([(0,u.jsx)("path",{d:"M4 16.5c0 .83.67 1.5 1.5 1.5h9c.83 0 1.5-.67 1.5-1.5V13H4v3.5zm6-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 14zM4.43 6H11c0-.33.03-.66.08-.98-3.37-.1-5.75.21-6.65.98z",opacity:".3"},"0"),(0,u.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-2H4zm12 5.5c0 .83-.67 1.5-1.5 1.5h-9c-.83 0-1.5-.67-1.5-1.5V13h12v3.5z"},"1"),(0,u.jsx)("circle",{cx:"10",cy:"15.5",r:"1.5"},"2"),(0,u.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-5zm.5 8h-1V8h1v1zm0-2h-1V3h1v4z"},"3")],"RailwayAlertTwoTone");n.Z=o},58671:function(t,n,c){(window.__NEXT_P=window.__NEXT_P||[]).push(["/404",function(){return c(40790)}])},9922:function(t,n,c){"use strict";c.d(n,{Z:function(){return r}});var e=c(86729);function r(t){var n=t.setUser,c=localStorage.getItem("user");if(c)try{return void n(JSON.parse(c))}catch(r){return void n({})}(0,e.Z)("/api/clientSideAuth",{method:"post",body:{}},!0).then((function(t){var c=t.user?t.user:{};n(c),localStorage.setItem("user",JSON.stringify(c))})).catch((function(t){console.log(t)}))}},40790:function(t,n,c){"use strict";c.r(n),c.d(n,{default:function(){return r}});c(828),c(85893);var e=c(67294);c(56217),c(24097),c(9922),c(45160);function r(t){return e.useEffect((function(){window.location.href="https://datasquirel.com"}),[]),null}}},function(t){t.O(0,[9774,2888,179],(function(){return n=58671,t(t.s=n);var n}));var n=t.O();_N_E=n}]);
@@ -0,0 +1 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8573],{97163:function(t,n,e){(window.__NEXT_P=window.__NEXT_P||[]).push(["/500",function(){return e(95494)}])},9922:function(t,n,e){"use strict";e.d(n,{Z:function(){return u}});var r=e(86729);function u(t){var n=t.setUser,e=localStorage.getItem("user");if(e)try{return void n(JSON.parse(e))}catch(u){return void n({})}(0,r.Z)("/api/clientSideAuth",{method:"post",body:{}},!0).then((function(t){var e=t.user?t.user:{};n(e),localStorage.setItem("user",JSON.stringify(e))})).catch((function(t){console.log(t)}))}},95494:function(t,n,e){"use strict";e.r(n),e.d(n,{default:function(){return u}});e(828),e(85893);var r=e(67294);e(56217),e(24097),e(9922),e(86729);function u(t){return r.useEffect((function(){window.location.href="https://datasquirel.com"}),[]),null}}},function(t){t.O(0,[9774,2888,179],(function(){return n=97163,t(t.s=n);var n}));var n=t.O();_N_E=n}]);
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
@@ -0,0 +1 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4820],{81981:function(n,_,u){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_error",function(){return u(89185)}])}},function(n){n.O(0,[9774,2888,179],(function(){return _=81981,n(n.s=_);var _}));var _=n.O();_N_E=_}]);
@@ -0,0 +1,28 @@
/*
* ATTENTION: An "eval-source-map" devtool has been used.
* This devtool is neither made for production nor for readable output files.
* It uses "eval()" calls to create a separate source file with attached SourceMaps in the browser devtools.
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
* or disable the default devtool with "devtool: false".
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
*/
(self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([["pages/_error"],{
/***/ "./node_modules/next/dist/build/webpack/loaders/next-client-pages-loader.js?absolutePagePath=private-next-pages%2F_error&page=%2F_error!":
/*!***********************************************************************************************************************************************!*\
!*** ./node_modules/next/dist/build/webpack/loaders/next-client-pages-loader.js?absolutePagePath=private-next-pages%2F_error&page=%2F_error! ***!
\***********************************************************************************************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
eval(__webpack_require__.ts("\n (window.__NEXT_P = window.__NEXT_P || []).push([\n \"/_error\",\n function () {\n return __webpack_require__(/*! private-next-pages/_error */ \"./node_modules/next/dist/pages/_error.js\");\n }\n ]);\n if(true) {\n module.hot.dispose(function () {\n window.__NEXT_P.push([\"/_error\"])\n });\n }\n //# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvbmV4dC9kaXN0L2J1aWxkL3dlYnBhY2svbG9hZGVycy9uZXh0LWNsaWVudC1wYWdlcy1sb2FkZXIuanM/YWJzb2x1dGVQYWdlUGF0aD1wcml2YXRlLW5leHQtcGFnZXMlMkZfZXJyb3ImcGFnZT0lMkZfZXJyb3IhLmpzIiwibWFwcGluZ3MiOiI7QUFDQTtBQUNBO0FBQ0E7QUFDQSxlQUFlLG1CQUFPLENBQUMsMkVBQTJCO0FBQ2xEO0FBQ0E7QUFDQSxPQUFPLElBQVU7QUFDakIsTUFBTSxVQUFVO0FBQ2hCO0FBQ0EsT0FBTztBQUNQO0FBQ0EiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9fTl9FLz84MDdiIl0sInNvdXJjZXNDb250ZW50IjpbIlxuICAgICh3aW5kb3cuX19ORVhUX1AgPSB3aW5kb3cuX19ORVhUX1AgfHwgW10pLnB1c2goW1xuICAgICAgXCIvX2Vycm9yXCIsXG4gICAgICBmdW5jdGlvbiAoKSB7XG4gICAgICAgIHJldHVybiByZXF1aXJlKFwicHJpdmF0ZS1uZXh0LXBhZ2VzL19lcnJvclwiKTtcbiAgICAgIH1cbiAgICBdKTtcbiAgICBpZihtb2R1bGUuaG90KSB7XG4gICAgICBtb2R1bGUuaG90LmRpc3Bvc2UoZnVuY3Rpb24gKCkge1xuICAgICAgICB3aW5kb3cuX19ORVhUX1AucHVzaChbXCIvX2Vycm9yXCJdKVxuICAgICAgfSk7XG4gICAgfVxuICAiXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/next/dist/build/webpack/loaders/next-client-pages-loader.js?absolutePagePath=private-next-pages%2F_error&page=%2F_error!\n"));
/***/ })
},
/******/ function(__webpack_require__) { // webpackRuntimeModules
/******/ var __webpack_exec__ = function(moduleId) { return __webpack_require__(__webpack_require__.s = moduleId); }
/******/ __webpack_require__.O(0, ["pages/_app","main"], function() { return __webpack_exec__("./node_modules/next/dist/build/webpack/loaders/next-client-pages-loader.js?absolutePagePath=private-next-pages%2F_error&page=%2F_error!"); });
/******/ var __webpack_exports__ = __webpack_require__.O();
/******/ _N_E = __webpack_exports__;
/******/ }
]);
@@ -0,0 +1 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2521],{26515:function(n,t,u){(window.__NEXT_P=window.__NEXT_P||[]).push(["/about",function(){return u(82939)}])},82939:function(n,t,u){"use strict";u.r(t),u.d(t,{HomepageContext:function(){return o},default:function(){return r}});u(828),u(85893);var e=u(67294);u(56217);u(24097),u(9922),u(47335),u(73987),u(40662);var o=e.createContext({});function r(n){return e.useEffect((function(){window.location.href="https://datasquirel.com/about"}),[]),null}}},function(n){n.O(0,[3935,9774,2888,179],(function(){return t=26515,n(n.s=t);var t}));var t=n.O();_N_E=t}]);
@@ -0,0 +1 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6964],{37953:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin",function(){return a(21174)}])},21174:function(e,t,a){"use strict";a.r(t),a.d(t,{DashboardContext:function(){return _},__N_SSP:function(){return d},default:function(){return l}});var n=a(828),r=a(85893),s=a(67294),u=a(54858),i=a(37359),c=a(85012),o={},d=!0,_=s.createContext(o);function l(e){var t=e.user,a=e.databases,o=e.metrics,d=(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"})]}),l=s.useState(null),f=(0,n.Z)(l,2),h=f[0],b=f[1];return(0,r.jsx)(u.Z,{head:d,user:t,children:(0,r.jsxs)(_.Provider,{value:{user:t,databases:a,targetDatabase:h,setTargetDatabase:b,metrics:o},children:[(0,r.jsx)(i.Z,{}),(0,r.jsx)(c.Z,{targetDatabase:h})]})})}}},function(e){e.O(0,[9365,3181,5667,9774,2888,179],(function(){return t=37953,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
@@ -0,0 +1 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4135],{61243:function(n,_,u){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/[user_id]",function(){return u(41457)}])}},function(n){n.O(0,[9365,3181,5667,9774,2888,179],(function(){return _=61243,n(n.s=_);var _}));var _=n.O();_N_E=_}]);
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[133],{74166:function(n,_,u){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/[user_id]/databases",function(){return u(2109)}])}},function(n){n.O(0,[9365,3181,9774,2888,179],(function(){return _=74166,n(n.s=_);var _}));var _=n.O();_N_E=_}]);
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
@@ -0,0 +1 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5926],{97385:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/[user_id]/databases/[single]/users/add-user",function(){return a(14437)}])},14437:function(e,t,a){"use strict";a.r(t),a.d(t,{AddNewDbUserContext:function(){return p},__N_SSP:function(){return h},default:function(){return _}});var s=a(85893),n=a(67294),r=a(54858),d=a(828),i=a(424),u=a(61781),l=a(86729),o=a(95264),c=a(81926);function m(e){var t=n.useContext(p),r=t.user,m=t.database,f=(t.table,t.query,t.confirmedDelegetedUser,a(19169),(0,d.Z)(n.useState("invitation"),2)),b=(f[0],f[1],(0,d.Z)(n.useState(!1),2)),h=b[0],_=b[1],x=(0,d.Z)(n.useState(!1),2),v=(x[0],x[1],(0,d.Z)(n.useState(["Edit"]),2)),g=(v[0],v[1],(0,d.Z)(n.useState(m.db_slug),2)),j=g[0],w=(g[1],(0,d.Z)(n.useState(null),2)),N=(w[0],w[1],(0,d.Z)(n.useState(null),2)),Z=N[0],U=N[1],y=(0,d.Z)(n.useState([]),2),D=(y[0],y[1],(0,d.Z)(n.useState([]),2));D[0],D[1];return(0,s.jsxs)(n.Fragment,{children:[(0,s.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,s.jsx)("div",{className:"w-full justify-between flex-wrap",children:(0,s.jsxs)("div",{children:[(0,s.jsx)(u.Z,{}),(0,s.jsxs)("h1",{className:"text-3xl m-0",children:["Add A New User to ",m.db_name]})]})}),(0,s.jsx)(i.Z,{user:r})]}),(0,s.jsxs)("section",{className:"paper",children:[h&&(0,s.jsx)(o.Z,{}),(0,s.jsxs)("form",{onSubmit:function(e){e.preventDefault(),_(!0);var t=e.target,a=Array.from(t),s={};a.forEach((function(e){var t,a;(null===(t=e.nodeName)||void 0===t?void 0:t.match(/button/i))||e.name&&(null===(a=e.value)||void 0===a?void 0:a.match(/./))&&(s[e.name]=e.value)}));var n={payload:s,dbFullName:m.db_full_name,dbId:m.id};(0,l.Z)("/api/addDbUser",{method:"post",body:n},!0).then((function(e){e.success?Z?(Z.imageName="".concat(j,"-user-").concat(e.newUserId),Z.mimeType="jpeg",delete Z.imageBase64Full,(0,l.Z)("/api/addUserMedia",{method:"post",body:{media:[Z],folder:j.replace(/_/g,"-"),type:"image"}},!0).then((function(t){(0,l.Z)("/api/updateDbUser",{method:"post",body:{dbFullName:m.db_full_name,payload:{id:e.newUserId,image:t.mediaData[0].media_url,image_thumbnail:t.mediaData[0].media_thumbnail_url}}},!0).then((function(e){e.success&&(window.location.pathname="/admin/".concat(null===r||void 0===r?void 0:r.id,"/databases/").concat(m.db_slug,"/users")),setTimeout((function(){_(!1)}),500)}))}))):window.location.pathname="/admin/".concat(null===r||void 0===r?void 0:r.id,"/databases/").concat(m.db_slug,"/users"):setTimeout((function(){_(!1)}),500)}))},className:"w-full flex flex-col items-stretch gap-4",children:[(0,s.jsx)(c.Z,{user:r,targetDb:m.db_full_name,database:m,userImage:Z,setUserImage:U}),(0,s.jsx)("button",{children:"Add User"})]})]})]})}var f=a(4423),b={},h=!0,p=n.createContext(b);function _(e){var t=e.user,a=e.database,n=e.table,d=e.query,i=e.confirmedDelegetedUser,u=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("title",{children:"Users | Datasquirel"}),(0,s.jsx)("meta",{name:"description",content:"Welcome to your data app"})]});return(0,s.jsx)(r.Z,{head:u,user:t,extraHeaderContent:(0,s.jsx)(f.Z,{database:a,query:d,confirmedDelegetedUser:i,user:t}),children:(0,s.jsx)(p.Provider,{value:{user:t,database:a,table:n,query:d,confirmedDelegetedUser:i},children:(0,s.jsx)(m,{})})})}},19169:function(e){"use strict";e.exports=JSON.parse('["Edit Tables","Update Entries","Create Table","Delete Entries","Delete Tables"]')}},function(e){e.O(0,[9365,194,7901,2870,9719,9774,2888,179],(function(){return t=97385,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
@@ -0,0 +1 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3316],{42065:function(n,t,a){"use strict";var e=a(64836);t.Z=void 0;var c=e(a(64938)),i=a(85893),l=(0,c.default)((0,i.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.76z"}),"ArrowBackIosRounded");t.Z=l},35826:function(n,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/[user_id]/databases/add-database",function(){return a(96706)}])},61781:function(n,t,a){"use strict";a.d(t,{Z:function(){return i}});var e=a(85893),c=(a(67294),a(42065));function i(){return(0,e.jsx)("button",{className:"outlined gray p-2 w-9 h-9 flex items-center justify-center rounded-full",onClick:function(n){window.history.back()},children:(0,e.jsx)(c.Z,{color:"inherit",className:"opacity-50 text-black",fontSize:"small"})})}},25472:function(n,t,a){"use strict";a.d(t,{Mw:function(){return o},ZP:function(){return l},j4:function(){return s}});var e=a(85893),c=a(41352),i=a(67294);function l(n){var t=n.children,a=n.title,l=n.data,o=n.fullPage,r=n.wrapperClasses,u=n.closePopupDispatch,d=n.wrapperStyle,p=n.noContainer;return o?(0,e.jsxs)("div",{className:"popup-bg overflow-hidden "+(r||""),"data-popupid":a||null,style:d,children:[p?(0,e.jsx)(i.Fragment,{children:t}):(0,e.jsx)("div",{className:"relative w-full h-full z-50","data-data":l?JSON.stringify(l):"",children:t}),(0,e.jsx)("button",{className:"popup-cancel-button fixed outlined gray",onClick:function(n){s(),u&&u()},children:(0,e.jsx)(c.Z,{color:"white",size:20})}),(0,e.jsx)("div",{className:"popup-canceller",onClick:function(n){s(),u&&u()}})]}):(0,e.jsxs)("div",{className:"popup-bg","data-popupid":a||null,children:[p?(0,e.jsx)(i.Fragment,{children:t}):(0,e.jsxs)("div",{className:"popup-content-container minimal-scrollbars","data-data":l?JSON.stringify(l):"",children:[t,(0,e.jsx)("button",{className:"outlined gray popup-cancel-button",onClick:function(n){s(),u&&u()},children:(0,e.jsx)("span",{className:"font-normal",children:"\u2716"})})]}),p&&(0,e.jsx)("button",{className:"gray popup-cancel-button",onClick:function(n){s(),u&&u()},children:(0,e.jsx)("span",{className:"font-normal",children:"\u2716"})}),(0,e.jsx)("div",{className:"popup-canceller",onClick:function(n){s(),u&&u()}})]})}function o(n,t){var a=document.querySelector("[data-popupid='".concat(n,"']"));a&&(a.style.display="flex",t&&t(a))}function s(n){document.querySelectorAll("[data-popupid]").forEach((function(n){n.style.display="none"})),n&&n()}}},function(n){n.O(0,[3662,9365,7901,9967,8887,9774,2888,179],(function(){return t=35826,n(n.s=t);var t}));var t=n.O();_N_E=t}]);
@@ -0,0 +1 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3400],{62999:function(e,s,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/[user_id]/media",function(){return t(58333)}])},58333:function(e,s,t){"use strict";t.r(s),t.d(s,{MediaContext:function(){return M},__N_SSP:function(){return _},default:function(){return v}});var a=t(828),n=t(85893),i=t(67294),r=t(54858),d=t(424),l=t(25472),o=t(97946),c=t(17244),u=t(45449);function x(e){var s,t=i.useContext(M),a=t.media,r=t.setTargetMedia,x=t.user,m=t.folders,j=t.staticHost;return(0,n.jsxs)(i.Fragment,{children:[(0,n.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,n.jsxs)("div",{className:"w-full justify-between flex-wrap",children:[(0,n.jsx)("h1",{className:"text-3xl m-0",children:"Media"}),(0,n.jsxs)(u.Z,{children:[(0,n.jsxs)("button",{className:"flex items-center gap-2",onClick:function(e){(0,l.Mw)("choose-media-type-popoup")},children:[(0,n.jsx)("span",{className:"symbol",children:"+"}),(0,n.jsx)("span",{children:"Add Media"})]}),(0,n.jsxs)("button",{className:"flex items-center gap-2 outlined gray",onClick:function(e){(0,l.Mw)("add-folder-popoup")},children:[(0,n.jsx)("span",{className:"symbol",children:"+"}),(0,n.jsx)("span",{children:"Add Folder"})]})]})]}),(0,n.jsx)(d.Z,{user:x})]}),(null===x||void 0===x||null===(s=x.verification_status)||void 0===s?void 0:s.toString().match(/1/))?(0,n.jsxs)(i.Fragment,{children:[(0,n.jsx)(c.Z,{media:a,setTargetMedia:r,folders:m,staticHost:j,user:x}),a&&a[0]&&(0,n.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:function(e){(0,l.Mw)("choose-media-type-popoup")},children:[(0,n.jsx)("span",{className:"symbol",children:"+"}),(0,n.jsx)("span",{className:"",children:"Add Media"})]})]}):(0,n.jsx)(o.Z,{})]})}var m=t(73770),j=t(94891),p=t(1347),f=t(81597),h=t(98916),w=t(62588),N=t(95264),g=t(37525),Z={},_=!0,M=i.createContext(Z);function v(e){var s=e.user,t=e.media,d=e.folders,l=e.staticHost,o=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("title",{children:"User Dashboard | Datasquirel"}),(0,n.jsx)("meta",{name:"description",content:"Welcome to your data app"})]}),c=(0,a.Z)(i.useState(null),2),u=c[0],Z=c[1],_=(0,a.Z)(i.useState(null),2),v=_[0],b=_[1],y=(0,a.Z)(i.useState(null),2),C=y[0],F=y[1],S=(0,a.Z)(i.useState(!1),2),k=S[0],T=S[1],E=(0,a.Z)(i.useState(null),2),H=E[0],P=E[1];return(0,n.jsx)(r.Z,{head:o,user:s,children:(0,n.jsxs)(M.Provider,{value:{user:s,media:t,targetMedia:H,setTargetMedia:P,folders:d,staticHost:l},children:[k&&(0,n.jsx)(N.Z,{screen:!0,title:"Processing Files ..."}),(0,n.jsx)(x,{}),(0,n.jsx)(m.Z,{setNewMedia:Z,setLoading:T}),(0,n.jsx)(h.Z,{setNewFile:b,setLoading:T}),(0,n.jsx)(g.Z,{setNewVideo:F,setLoading:T}),(0,n.jsx)(j.Z,{newMedia:u,setNewMedia:Z,newFile:v,setNewFile:b,newVideo:C,setNewVideo:F}),(0,n.jsx)(p.Z,{targetMedia:H,setTargetMedia:P,staticHost:l,media:t}),(0,n.jsx)(f.Z,{}),(0,n.jsx)(w.Z,{user:s})]})})}}},function(e){e.O(0,[9365,4156,9774,2888,179],(function(){return s=62999,e(e.s=s);var s}));var s=e.O();_N_E=s}]);
@@ -0,0 +1 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2759],{42065:function(e,s,t){"use strict";var r=t(64836);s.Z=void 0;var n=r(t(64938)),i=t(85893),a=(0,n.default)((0,i.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.76z"}),"ArrowBackIosRounded");s.Z=a},22139:function(e,s,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/[user_id]/media/[...folder]",function(){return t(73947)}])},61781:function(e,s,t){"use strict";t.d(s,{Z:function(){return i}});var r=t(85893),n=(t(67294),t(42065));function i(){return(0,r.jsx)("button",{className:"outlined gray p-2 w-9 h-9 flex items-center justify-center rounded-full",onClick:function(e){window.history.back()},children:(0,r.jsx)(n.Z,{color:"inherit",className:"opacity-50 text-black",fontSize:"small"})})}},73947:function(e,s,t){"use strict";t.r(s),t.d(s,{MediaContext:function(){return b},__N_SSP:function(){return _},default:function(){return M}});var r=t(828),n=t(85893),i=t(67294),a=t(54858),l=t(73770),o=t(94891),d=t(1347),c=t(81597),u=t(61781),f=t(424),x=t(25472),j=t(97946),m=t(17244),p=t(45449),h=t(30212);function w(e){var s,t=i.useContext(b),r=t.media,a=t.setTargetMedia,l=t.user,o=t.folders,d=t.query,c=t.staticHost,w=t.folder;return(0,n.jsxs)(i.Fragment,{children:[(0,n.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,n.jsxs)("div",{className:"w-full justify-between flex-wrap",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)(u.Z,{}),(0,n.jsx)(h.Z,{className:"opacity-40"}),(0,n.jsx)("h1",{className:"text-3xl m-0",children:d.folder[d.folder.length-1]})]}),(0,n.jsxs)(p.Z,{children:[(0,n.jsxs)("button",{className:"flex items-center gap-2",onClick:function(e){(0,x.Mw)("choose-media-type-popoup")},children:[(0,n.jsx)("span",{className:"symbol",children:"+"}),(0,n.jsx)("span",{children:"Add Media"})]}),(0,n.jsxs)("button",{className:"flex items-center gap-2 outlined gray",onClick:function(e){(0,x.Mw)("add-folder-popoup",(function(e){var s;null===(s=null===e||void 0===e?void 0:e.querySelector("input"))||void 0===s||s.focus()}))},children:[(0,n.jsx)("span",{className:"symbol",children:"+"}),(0,n.jsx)("span",{children:"Add Folder"})]})]})]}),(0,n.jsx)(f.Z,{user:l})]}),(null===l||void 0===l||null===(s=l.verification_status)||void 0===s?void 0:s.toString().match(/1/))?(0,n.jsxs)(i.Fragment,{children:[(0,n.jsx)(m.Z,{media:r,setTargetMedia:a,folders:o,folder:w,staticHost:c,user:l}),r&&r[0]&&(0,n.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:function(e){(0,x.Mw)("choose-media-type-popoup")},children:[(0,n.jsx)("span",{className:"symbol",children:"+"}),(0,n.jsx)("span",{className:"",children:"Add Media"})]})]}):(0,n.jsx)(j.Z,{})]})}var N=t(98916),v=t(62588),Z=t(95264),g=t(37525),y={},_=!0,b=i.createContext(y);function M(e){var s=e.user,t=e.media,u=e.folders,f=e.query,x=e.staticHost,j=e.folderNameFull,m=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("title",{children:"User Dashboard | Datasquirel"}),(0,n.jsx)("meta",{name:"description",content:"Welcome to your data app"})]}),p=(0,r.Z)(i.useState(null),2),h=p[0],y=p[1],_=(0,r.Z)(i.useState(null),2),M=_[0],k=_[1],S=(0,r.Z)(i.useState(null),2),C=S[0],F=S[1],T=(0,r.Z)(i.useState(!1),2),q=T[0],E=T[1],H=(0,r.Z)(i.useState(null),2),L=H[0],P=H[1];return(0,n.jsx)(a.Z,{head:m,user:s,children:(0,n.jsxs)(b.Provider,{value:{user:s,media:t,targetMedia:L,setTargetMedia:P,folders:u,query:f,staticHost:x,folder:j},children:[q&&(0,n.jsx)(Z.Z,{screen:!0,title:"Processing Files ..."}),(0,n.jsx)(w,{}),(0,n.jsx)(l.Z,{setNewMedia:y,setLoading:E}),(0,n.jsx)(N.Z,{setNewFile:k,setLoading:E}),(0,n.jsx)(g.Z,{setNewVideo:F,setLoading:E}),(0,n.jsx)(o.Z,{newMedia:h,setNewMedia:y,newFile:M,setNewFile:k,folder:j,newVideo:C,setNewVideo:F}),(0,n.jsx)(d.Z,{targetMedia:L,staticHost:x,setTargetMedia:P,media:t}),(0,n.jsx)(c.Z,{folder:j}),(0,n.jsx)(v.Z,{user:s})]})})}}},function(e){e.O(0,[9365,4156,9774,2888,179],(function(){return s=22139,e(e.s=s);var s}));var s=e.O();_N_E=s}]);
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
@@ -0,0 +1 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9334],{42065:function(e,s,a){"use strict";var n=a(64836);s.Z=void 0;var t=n(a(64938)),r=a(85893),l=(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.76z"}),"ArrowBackIosRounded");s.Z=l},69594:function(e,s,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/[user_id]/users/databases",function(){return a(23666)}])},61781:function(e,s,a){"use strict";a.d(s,{Z:function(){return r}});var n=a(85893),t=(a(67294),a(42065));function r(){return(0,n.jsx)("button",{className:"outlined gray p-2 w-9 h-9 flex items-center justify-center rounded-full",onClick:function(e){window.history.back()},children:(0,n.jsx)(t.Z,{color:"inherit",className:"opacity-50 text-black",fontSize:"small"})})}},25472:function(e,s,a){"use strict";a.d(s,{Mw:function(){return c},ZP:function(){return l},j4:function(){return i}});var n=a(85893),t=a(41352),r=a(67294);function l(e){var s=e.children,a=e.title,l=e.data,c=e.fullPage,o=e.wrapperClasses,u=e.closePopupDispatch,d=e.wrapperStyle,p=e.noContainer;return c?(0,n.jsxs)("div",{className:"popup-bg overflow-hidden "+(o||""),"data-popupid":a||null,style:d,children:[p?(0,n.jsx)(r.Fragment,{children:s}):(0,n.jsx)("div",{className:"relative w-full h-full z-50","data-data":l?JSON.stringify(l):"",children:s}),(0,n.jsx)("button",{className:"popup-cancel-button fixed outlined gray",onClick:function(e){i(),u&&u()},children:(0,n.jsx)(t.Z,{color:"white",size:20})}),(0,n.jsx)("div",{className:"popup-canceller",onClick:function(e){i(),u&&u()}})]}):(0,n.jsxs)("div",{className:"popup-bg","data-popupid":a||null,children:[p?(0,n.jsx)(r.Fragment,{children:s}):(0,n.jsxs)("div",{className:"popup-content-container minimal-scrollbars","data-data":l?JSON.stringify(l):"",children:[s,(0,n.jsx)("button",{className:"outlined gray popup-cancel-button",onClick:function(e){i(),u&&u()},children:(0,n.jsx)("span",{className:"font-normal",children:"\u2716"})})]}),p&&(0,n.jsx)("button",{className:"gray popup-cancel-button",onClick:function(e){i(),u&&u()},children:(0,n.jsx)("span",{className:"font-normal",children:"\u2716"})}),(0,n.jsx)("div",{className:"popup-canceller",onClick:function(e){i(),u&&u()}})]})}function c(e,s){var a=document.querySelector("[data-popupid='".concat(e,"']"));a&&(a.style.display="flex",s&&s(a))}function i(e){document.querySelectorAll("[data-popupid]").forEach((function(e){e.style.display="none"})),e&&e()}},23666:function(e,s,a){"use strict";a.r(s),a.d(s,{AllDatabasesUsersContext:function(){return x},__N_SSP:function(){return f},default:function(){return m}});var n=a(828),t=a(85893),r=a(67294),l=a(54858),c=a(9417),i=a(424);function o(e){var s=e.databases,a=e.user;return(0,t.jsx)(r.Fragment,{children:(0,t.jsxs)("section",{className:"p-4 items-start gap-4 overflow-visible",children:[(0,t.jsx)("h2",{className:"text-xl m-0",children:"Database Users"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-6",children:s&&s[0]?s.map((function(e,s){return(0,t.jsxs)("a",{href:"/admin/".concat(null===a||void 0===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,t.jsx)("img",{src:e.db_image,className:"w-8 h-8 rounded-full object-cover",alt:""}),e.db_name]},s+1)})):(0,t.jsx)("span",{children:"No Databases Yet"})})]})})}var u=a(61781);function d(e){var s=r.useContext(x),a=s.databases,n=s.user;return(0,t.jsxs)(r.Fragment,{children:[(0,t.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,t.jsxs)("div",{className:"w-full justify-between flex-wrap",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(u.Z,{}),(0,t.jsx)("h1",{className:"text-3xl m-0",children:"All Databases Users"})]}),(0,t.jsxs)("a",{href:"/admin/".concat(null===n||void 0===n?void 0:n.id,"/users/add-user"),className:"flex items-center gap-2 whitespace-normal button",children:[(0,t.jsx)("span",{className:"symbol",children:"+"}),(0,t.jsx)("span",{children:"Add New User"})]})]}),(0,t.jsx)(i.Z,{user:n})]}),(0,t.jsx)(o,{databases:a,user:n})]})}var p={},f=!0,x=r.createContext(p);function m(e){var s=e.user,a=e.users,i=e.databases,o=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("title",{children:"Users | Datasquirel"}),(0,t.jsx)("meta",{name:"description",content:"Welcome to your data app"})]}),u=(0,n.Z)(r.useState(null),2),p=(u[0],u[1],(0,n.Z)(r.useState(null),2)),f=p[0],m=p[1];return(0,t.jsx)(l.Z,{head:o,user:s,children:(0,t.jsxs)(x.Provider,{value:{user:s,users:a,targetUser:f,setTargetUser:m,databases:i},children:[(0,t.jsx)(d,{}),(0,t.jsx)(c.Z,{targetUser:f,user:s,setTargetUser:m})]})})}}},function(e){e.O(0,[9365,5949,9774,2888,179],(function(){return s=69594,e(e.s=s);var s}));var s=e.O();_N_E=s}]);
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9195],{46055:function(n,u,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/blog",function(){return t(51384)}])},51384:function(n,u,t){"use strict";t.r(u),t.d(u,{default:function(){return r}});t(85893);var o=t(67294);t(24097);t(56217);function r(){return o.useEffect((function(){window.location.href="https://datasquirel.com"}),[]),null}}},function(n){n.O(0,[9774,2888,179],(function(){return u=46055,n(n.s=u);var u}));var u=n.O();_N_E=u}]);
@@ -0,0 +1 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9335],{78367:function(n,t,e){(window.__NEXT_P=window.__NEXT_P||[]).push(["/contact",function(){return e(9144)}])},97037:function(n,t,e){"use strict";e.d(t,{Z:function(){return s}});var r=e(85893);e(67294);function s(n){var t=n.message;return(0,r.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,r.jsx)("img",{src:"/images/warning.png",alt:"Warning Image Icon",width:22,className:"-my-2"}),(0,r.jsx)("span",{children:t})]})}},82186:function(n,t,e){"use strict";e.d(t,{Z:function(){return s}});var r=e(85893);e(67294);function s(n){var t=n.message,e=n.className;return(0,r.jsxs)("div",{className:"info green"+(e?" "+e:""),children:[(0,r.jsx)("img",{src:"/images/checkmark.svg",alt:"Warning Image Icon",width:22,className:"-my-2"}),(0,r.jsx)("span",{children:t})]})}},9922:function(n,t,e){"use strict";e.d(t,{Z:function(){return s}});var r=e(86729);function s(n){var t=n.setUser,e=localStorage.getItem("user");if(e)try{return void t(JSON.parse(e))}catch(s){return void t({})}(0,r.Z)("/api/clientSideAuth",{method:"post",body:{}},!0).then((function(n){var e=n.user?n.user:{};t(e),localStorage.setItem("user",JSON.stringify(e))})).catch((function(n){console.log(n)}))}},9144:function(n,t,e){"use strict";e.r(t),e.d(t,{HomepageContext:function(){return c},default:function(){return a}});e(828),e(85893);var r=e(67294);e(56217),e(24097),e(9922);e(86729),e(97037),e(82186),e(95264);var s={},c=r.createContext(s);function a(n){return r.useEffect((function(){window.location.href="https://datasquirel.com/contact"}),[]),null}}},function(n){n.O(0,[9774,2888,179],(function(){return t=78367,n(n.s=t);var t}));var t=n.O();_N_E=t}]);
@@ -0,0 +1 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7398],{93125:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/create-account",function(){return n(18214)}])},26478:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var i=n(85893),a=(n(67294),n(95264));function s(){return(0,i.jsx)("div",{className:"flex flex-col gap-4 items-center justify-center w-full h-screen p-6 bg-slate-100",children:(0,i.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,i.jsx)("img",{src:"/images/logo-icon-alt-2.webp",alt:"Datasquirel Logo",width:60}),(0,i.jsx)("div",{className:"w-10 h-10 flex flex-col items-center justify-center",children:(0,i.jsx)(a.Z,{width:"25px",position:"relative"})})]})})}},18214:function(e,t,n){"use strict";n.r(t),n.d(t,{CreateAccountContext:function(){return m},__N_SSP:function(){return f},default:function(){return h}});var i=n(828),a=n(85893),s=n(67294),r=n(56217),c=n(24097),l=n(65114);function o(e){var t=s.useContext(m),n=t.query,i=t.invitingUser;return(0,a.jsxs)("section",{className:"flex-col items-center lg:items-center gap-20 p-0",children:[(0,a.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,a.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===i||void 0===i?void 0:i.first_name)&&(0,a.jsxs)("span",{className:"text-xs bg-emerald-100 rounded-full px-4 py-1 mb-4",children:["You have been invited by"," ",(0,a.jsxs)("b",{children:[i.first_name," ",i.last_name," (",i.email,")"]})," ","to manage an account. Please create an account to gain access."]}),(0,a.jsx)("h1",{className:"m-0 text-center text-2xl",children:"Create An Account"}),(0,a.jsx)(l.Z,{query:n})]})]})}n(64017),n(95264);var u=n(86729),d=n(26478),x={},f=!0,m=s.createContext(x);function h(e){var t,n="Create Account | Datasquirel",l="Create a FREE account and start storing data.",x=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("title",{children:n}),(0,a.jsx)("meta",{name:"description",content:l}),(0,a.jsx)(c.Z,{pageTitle:n,pageDescription:l,pagePathname:"/"})]}),f=(0,i.Z)(s.useState(null),2),h=f[0];f[1];return s.useEffect((function(){var t;(null===(t=e.query)||void 0===t?void 0:t.invite)&&!e.isAuthCookie&&setTimeout((function(){(0,u.Z)("/api/addAdminUserUser",{method:"POST",body:{query:e.query}},!0).then((function(t){var n;window.location.pathname="/admin/".concat(null===(n=e.user)||void 0===n?void 0:n.id,"/users")}))}),1e3)}),[]),(null===(t=e.query)||void 0===t?void 0:t.invite)?(0,a.jsx)(d.Z,{}):(0,a.jsx)(r.Z,{head:x,children:(0,a.jsx)(m.Provider,{value:{user:h,query:e.query,invitingUser:e.invitingUser},children:(0,a.jsx)("main",{children:(0,a.jsx)(o,{})})})})}}},function(e){e.O(0,[8374,5114,9774,2888,179],(function(){return t=93125,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
@@ -0,0 +1 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3172],{34475:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/docs",function(){return s(1732)}])},26e3:function(e,t,s){"use strict";s.d(t,{Z:function(){return r}});var n=s(85893),a=s(67294);function r(e){var t=e.pages;if(!t||!t[0])return null;var s=null===t||void 0===t?void 0:t.filter((function(e){return 1==e.level}));return a.useEffect((function(){var e=document.querySelectorAll("aside a");e&&e[0]&&e.forEach((function(e){e.pathname===window.location.pathname&&e.classList.add("active")}))}),[]),(0,n.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,n.jsx)("span",{className:"text-2xl m-0 mb-4 text-left font-semibold",children:"Docs"}),(0,n.jsx)("ul",{className:"pl-4 gap-4 flex flex-col items-start",children:function e(s,a){return s.map((function(s,r){var l="".concat(a,"/").concat(s.slug),i=t.filter((function(e){return 2==e.level&&e.parent_id==s.id}));return(0,n.jsxs)("li",{children:[(0,n.jsx)("a",{href:l,className:1==(null===s||void 0===s?void 0:s.level)?"font-semibold":"text-slate-600",children:s.title}),i&&i[0]&&(0,n.jsx)("ul",{className:"pl-4 gap-2 flex flex-col items-start text-sm mt-2",children:e(i,l)})]},r)}))}(s,"/docs")})]})}},9922:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});var n=s(86729);function a(e){var t=e.setUser,s=localStorage.getItem("user");if(s)try{return void t(JSON.parse(s))}catch(a){return void t({})}(0,n.Z)("/api/clientSideAuth",{method:"post",body:{}},!0).then((function(e){var s=e.user?e.user:{};t(s),localStorage.setItem("user",JSON.stringify(s))})).catch((function(e){console.log(e)}))}},1732:function(e,t,s){"use strict";s.r(t),s.d(t,{__N_SSP:function(){return x},default:function(){return h}});var n=s(828),a=s(85893),r=s(67294),l=s(56217),i=s(24097),c=s(9922),o=s(26e3);function u(e){return(0,a.jsxs)("section",{className:"py-14",children:[(0,a.jsx)("div",{className:"w-full gap-10 justify-between flex-col lg:flex-row relative z-10",children:(0,a.jsxs)("div",{className:"flex-col items-center lg:items-start max-w-lg text-center lg:text-left",style:{minWidth:"45%"},children:[(0,a.jsx)("h1",{className:"text-2xl m-0 leading-tight",children:"Documentation"}),(0,a.jsx)("span",{className:"font-normal",children:"Learn the ins and outs of datasquirel."})]})}),(0,a.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(8971);function f(e){var t=e.title,s=e.description,n=e.url;return(0,a.jsxs)("a",{href:n,className:"card",children:[(0,a.jsxs)("div",{className:"flex-col items-start",children:[(0,a.jsx)("span",{className:"text-2xl font-semibold",children:t}),(0,a.jsx)("span",{className:"max-w-md text-slate-600",children:s})]}),(0,a.jsx)(d.Z,{size:20})]})}function m(e){return(0,a.jsx)("section",{className:"py-14",children:(0,a.jsxs)("div",{className:"grid grid-cols-1 sl:grid-cols-2 gap-4 w-full items-stretch",children:[(0,a.jsx)(f,{title:"Quick Start Guide",description:"Get Started.",url:"/docs/quick-start"}),(0,a.jsx)(f,{title:"GUI Reference",description:"Learn how to complete basic data tasks from your dashboard",url:"/docs/gui-reference"}),(0,a.jsx)(f,{title:"API Reference",description:"Interact with your database from a backend server using REST API",url:"/docs/api-reference"})]})})}var x=!0;function h(e){var t=e.pages,s=e.targetPage,d="".concat(s.title," | Datasquirel docs"),f=s.description,x=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("title",{children:d}),(0,a.jsx)("meta",{name:"description",content:f}),(0,a.jsx)(i.Z,{pageTitle:d,pageDescription:f,pagePathname:"/"})]}),h=(0,n.Z)(r.useState(null),2),p=h[0],g=h[1];return r.useEffect((function(){(0,c.Z)({setUser:g})}),[]),(0,a.jsx)(l.Z,{head:x,user:p,children:(0,a.jsxs)("div",{className:"items-stretch w-full gap-0 flex-col-reverse lg:flex-row",children:[(0,a.jsx)(o.Z,{pages:t}),(0,a.jsxs)("main",{children:[(0,a.jsx)(u,{}),(0,a.jsx)(m,{})]})]})})}}},function(e){e.O(0,[9774,2888,179],(function(){return t=34475,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
@@ -0,0 +1 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3749],{67455:function(t,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/docs/[page]",function(){return n(10203)}])},26e3:function(t,e,n){"use strict";n.d(e,{Z:function(){return l}});var s=n(85893),a=n(67294);function l(t){var e=t.pages;if(!e||!e[0])return null;var n=null===e||void 0===e?void 0:e.filter((function(t){return 1==t.level}));return a.useEffect((function(){var t=document.querySelectorAll("aside a");t&&t[0]&&t.forEach((function(t){t.pathname===window.location.pathname&&t.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 t(n,a){return n.map((function(n,l){var r="".concat(a,"/").concat(n.slug),i=e.filter((function(t){return 2==t.level&&t.parent_id==n.id}));return(0,s.jsxs)("li",{children:[(0,s.jsx)("a",{href:r,className:1==(null===n||void 0===n?void 0:n.level)?"font-semibold":"text-slate-600",children:n.title}),i&&i[0]&&(0,s.jsx)("ul",{className:"pl-4 gap-2 flex flex-col items-start text-sm mt-2",children:t(i,r)})]},l)}))}(n,"/docs")})]})}},99350:function(t,e,n){"use strict";n.d(e,{Z:function(){return a}});var s=n(85893);n(67294);function a(t){var e=t.title,n=t.description;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:e}),(0,s.jsx)("span",{className:"font-normal text-xl -my-4",dangerouslySetInnerHTML:{__html:n}})]})}),(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"})]})}},9922:function(t,e,n){"use strict";n.d(e,{Z:function(){return a}});var s=n(86729);function a(t){var e=t.setUser,n=localStorage.getItem("user");if(n)try{return void e(JSON.parse(n))}catch(a){return void e({})}(0,s.Z)("/api/clientSideAuth",{method:"post",body:{}},!0).then((function(t){var n=t.user?t.user:{};e(n),localStorage.setItem("user",JSON.stringify(n))})).catch((function(t){console.log(t)}))}},10203:function(t,e,n){"use strict";n.r(e),n.d(e,{__N_SSG:function(){return l},default:function(){return r}});n(828);var s=n(85893),a=n(67294),l=(n(56217),n(24097),n(9922),n(26e3),n(99350),!0);function r(t){t.pages,t.targetPage;return a.useEffect((function(){window.location.href="https://datasquirel.com/docs/getting-started"}),[]),(0,s.jsx)(a.Fragment,{})}}},function(t){t.O(0,[9774,2888,179],(function(){return e=67455,t(t.s=e);var e}));var e=t.O();_N_E=e}]);
@@ -0,0 +1 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4656],{84477:function(t,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/docs/[page]/[sub-page]",function(){return n(50629)}])},26e3:function(t,e,n){"use strict";n.d(e,{Z:function(){return a}});var s=n(85893),l=n(67294);function a(t){var e=t.pages;if(!e||!e[0])return null;var n=null===e||void 0===e?void 0:e.filter((function(t){return 1==t.level}));return l.useEffect((function(){var t=document.querySelectorAll("aside a");t&&t[0]&&t.forEach((function(t){t.pathname===window.location.pathname&&t.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 t(n,l){return n.map((function(n,a){var r="".concat(l,"/").concat(n.slug),i=e.filter((function(t){return 2==t.level&&t.parent_id==n.id}));return(0,s.jsxs)("li",{children:[(0,s.jsx)("a",{href:r,className:1==(null===n||void 0===n?void 0:n.level)?"font-semibold":"text-slate-600",children:n.title}),i&&i[0]&&(0,s.jsx)("ul",{className:"pl-4 gap-2 flex flex-col items-start text-sm mt-2",children:t(i,r)})]},a)}))}(n,"/docs")})]})}},99350:function(t,e,n){"use strict";n.d(e,{Z:function(){return l}});var s=n(85893);n(67294);function l(t){var e=t.title,n=t.description;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:e}),(0,s.jsx)("span",{className:"font-normal text-xl -my-4",dangerouslySetInnerHTML:{__html:n}})]})}),(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"})]})}},9922:function(t,e,n){"use strict";n.d(e,{Z:function(){return l}});var s=n(86729);function l(t){var e=t.setUser,n=localStorage.getItem("user");if(n)try{return void e(JSON.parse(n))}catch(l){return void e({})}(0,s.Z)("/api/clientSideAuth",{method:"post",body:{}},!0).then((function(t){var n=t.user?t.user:{};e(n),localStorage.setItem("user",JSON.stringify(n))})).catch((function(t){console.log(t)}))}},50629:function(t,e,n){"use strict";n.r(e),n.d(e,{__N_SSG:function(){return l},default:function(){return a}});n(828),n(85893);var s=n(67294),l=(n(56217),n(24097),n(9922),n(26e3),n(99350),!0);function a(t){t.pages,t.targetPage;return s.useEffect((function(){window.location.href="https://datasquirel.com/docs/getting-started"}),[]),null}}},function(t){t.O(0,[9774,2888,179],(function(){return e=84477,t(t.s=e);var e}));var e=t.O();_N_E=e}]);
@@ -0,0 +1 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4772],{8558:function(e,n,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/email-verification",function(){return i(85004)}])},85004:function(e,n,i){"use strict";i.r(n),i.d(n,{__N_SSP:function(){return o},default:function(){return d}});var s=i(828),t=i(85893),a=i(67294),l=(i(9008),i(95264)),c=i(86729),r=i(56217),o=!0;function d(e){var n=e.user,i=e.verified,o=(0,s.Z)(a.useState(!1),2),d=o[0],u=o[1],m=(0,s.Z)(a.useState(null),2),f=m[0],h=m[1];return i?(a.useEffect((function(){try{setTimeout((function(){window.location.pathname="/admin"}),2e3)}catch(e){(0,c.Z)("/api/admin/clientError",{method:"post",body:{component:"email-verification/index-page-component/lines-72-74",message:e.message,user:n}}),window.location.pathname="/logout"}}),[]),(0,t.jsx)(r.Z,{head:(0,t.jsxs)(a.Fragment,{children:[(0,t.jsx)("title",{children:"Verify Email Address"}),(0,t.jsx)("meta",{name:"description",content:"Verify your email address"})]}),user:n,children:(0,t.jsx)("main",{className:"flex items-center justify-center w-full p-8",children:(0,t.jsx)("div",{className:"login-block gap-2",children:(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)("img",{src:"/images/checkmark.svg",alt:"check-mark",width:30}),(0,t.jsx)("span",{className:"text-xl",children:"Email Verification Successfull!"})]})})})})):(0,t.jsx)(a.Fragment,{children:(0,t.jsx)(r.Z,{head:(0,t.jsxs)(a.Fragment,{children:[(0,t.jsx)("title",{children:"Verify Email Address"}),(0,t.jsx)("meta",{name:"description",content:"Verify your email address"})]}),user:n,children:(0,t.jsx)("main",{className:"flex flex-col items-center p-8 justify-center w-full",children:(0,t.jsxs)("div",{className:"login-block gap-2 flex-col max-w-lg",children:[f&&(0,t.jsx)("div",{className:f.class+" w-full rounded py-2 px-4 flex justify-center",children:f.msg}),d&&(0,t.jsx)(l.Z,{position:"absolute"}),(0,t.jsx)("h1",{className:"text-2xl m-0 ",children:"Verify Email Address"}),(0,t.jsx)("span",{children:"Please click the button below to send verification link"}),(0,t.jsx)("button",{className:"w-full",onClick:function(e){e.preventDefault(),u(!0),(0,c.Z)("/api/sendEmailVerificationLink").then((function(e){u(!1),e.success&&h({msg:"Email Sent. Please check mailbox",class:"bg-emerald-100"})}))},children:(0,t.jsx)("span",{children:"Send Verification Link"})}),(0,t.jsx)("button",{className:"w-full outlined",onClick:function(e){window.history.back()},children:(0,t.jsx)("span",{children:"Go Back"})})]})})})})}}},function(e){e.O(0,[9774,2888,179],(function(){return n=8558,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -0,0 +1 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5405],{3848:function(e,t,a){"use strict";a.d(t,{Z:function(){return r}});const r=(0,a(45711).Z)("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"}]])},10312:function(e,t,a){"use strict";a.d(t,{Z:function(){return r}});const r=(0,a(45711).Z)("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"}]])},45728:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){return a(51810)}])},44598:function(e,t,a){"use strict";a.d(t,{Z:function(){return n}});var r=a(85893);a(67294);function n(e){var t=e.src,a=e.alt,n=e.className,h=e.fadeHeight,i=e.width,c=e.height;e.opacity;return(0,r.jsxs)("div",{className:"overflow-hidden z-0"+(n?" "+n:""),children:[(0,r.jsx)("img",{src:t,alt:a,className:"w-full h-full object-cover",width:i,height:c}),(0,r.jsx)("div",{className:"fade-side",style:{height:h}})]})}},51810:function(e,t,a){"use strict";a.r(t),a.d(t,{HomepageContext:function(){return i},default:function(){return c}});a(828),a(85893);var r=a(67294);a(56217),a(24097),a(9922),a(47335),a(73987),a(40662),a(4703),a(31356),a(44598);var n=a(45711);(0,n.Z)("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,n.Z)("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(10312);(0,n.Z)("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(3848);(0,n.Z)("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"}]]);var h={},i=r.createContext(h);function c(){r.useEffect((function(){window.location.replace("/login")}),[])}},4703:function(e){e.exports={hero_section_wrapper:"Home_hero_section_wrapper__IkH4Z",hero_image:"Home_hero_image__UVLPw",hero_image_alt:"Home_hero_image_alt__zrhLF",hero_text_section:"Home_hero_text_section__kUQbt"}}},function(e){e.O(0,[3935,9774,2888,179],(function(){return t=45728,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[765],{60233:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/logout",function(){return t(51780)}])},29137:function(e,n,t){"use strict";t.d(n,{Z:function(){return i}});var o=t(47568),r=t(97582);function i(){return s.apply(this,arguments)}function s(){return(s=(0,o.Z)((function(){var e,n;return(0,r.__generator)(this,(function(t){switch(t.label){case 0:return t.trys.push([0,4,,5]),[4,caches.keys()];case 1:return(e=t.sent())[0]?[4,Promise.all(e.map((function(e){return caches.delete(e)})))]:[3,3];case 2:t.sent(),t.label=3;case 3:return[3,5];case 4:return n=t.sent(),console.log("Error in clearing cache =>",n.message),[3,5];case 5:return[2]}}))}))).apply(this,arguments)}},51780:function(e,n,t){"use strict";t.r(n),t.d(n,{__N_SSP:function(){return d},default:function(){return m}});var o=t(47568),r=t(97582),i=t(85893),s=t(67294),c=t(9008),a=t.n(c),l=t(86729),u=t(29137),g=t(95264),d=!0;function m(e){var n=e.user,t=e.query,c=(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((function(){localStorage.setItem("user","{}"),localStorage.removeItem("csrf")}),[]),s.useEffect((function(){var e=function(){var e,o;return(null===t||void 0===t?void 0:t.invite)&&(null===t||void 0===t?void 0:t.login)?window.location.href="/login"+window.location.search:(null===t||void 0===t?void 0:t.login)||(null===(e=localStorage.getItem("logoutParadigm"))||void 0===e?void 0:e.match(/reset/))?window.location.href="/login":((null===n||void 0===n||null===(o=n.social_platform)||void 0===o?void 0:o.match(/google/))&&localStorage.setItem("google_prompt_skipped","logout"),void(window.location.pathname="/"))};(0,l.Z)("/api/logoutUser").then(function(){var t=(0,o.Z)((function(t){var o,i;return(0,r.__generator)(this,(function(t){switch(t.label){case 0:return[4,(0,u.Z)()];case 1:return t.sent(),[4,navigator.serviceWorker.getRegistrations()];case 2:o=t.sent(),i=0,t.label=3;case 3:return i<o.length?[4,o[i].unregister()]:[3,6];case 4:t.sent(),t.label=5;case 5:return i++,[3,3];case 6:try{FB.init({appId:"2910275882608968",cookie:!0,xfbml:!0,version:"v13.0"}),FB.getLoginStatus((function(t){var o;t.authResponse?FB.logout((function(n){e()})):(google.accounts.id.initialize({client_id:"392696781563-imb0ddojfn6m4bdokjk5v80jn546t9tq.apps.googleusercontent.com"}),(null===n||void 0===n||null===(o=n.social_platform)||void 0===o?void 0:o.match(/google/))&&n.social_id?(google.accounts.id.revoke(),google.accounts.id.revoke(n.social_id,(function(n){console.log(n.error),e()}))):e())}))}catch(r){(0,l.Z)("/api/admin/clientError",{method:"post",body:{component:"logout-page-component/lines-111-142",message:r.message,user:n}})}return[2]}}))}));return function(e){return t.apply(this,arguments)}}())}),[]),(0,i.jsxs)(s.Fragment,{children:[(0,i.jsx)(a(),{children:c}),(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)(g.Z,{position:"relative",width:"20px"})]})})]})}}},function(e){e.O(0,[9774,2888,179],(function(){return n=60233,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -0,0 +1 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9939],{32543:function(t,n,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pricing",function(){return r(46497)}])},9922:function(t,n,r){"use strict";r.d(n,{Z:function(){return u}});var e=r(86729);function u(t){var n=t.setUser,r=localStorage.getItem("user");if(r)try{return void n(JSON.parse(r))}catch(u){return void n({})}(0,e.Z)("/api/clientSideAuth",{method:"post",body:{}},!0).then((function(t){var r=t.user?t.user:{};n(r),localStorage.setItem("user",JSON.stringify(r))})).catch((function(t){console.log(t)}))}},46497:function(t,n,r){"use strict";r.r(n),r.d(n,{PricingContext:function(){return i},default:function(){return o}});r(828),r(85893);var e=r(67294);r(56217),r(24097),r(9922);var u={},i=e.createContext(u);function o(t){return e.useEffect((function(){window.location.href="https://datasquirel.com/pricing"}),[]),null}}},function(t){t.O(0,[9774,2888,179],(function(){return n=32543,t(t.s=n);var n}));var n=t.O();_N_E=n}]);
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6284],{71008:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/redirect",function(){return n(74728)}])},74728:function(e,t,n){"use strict";n.r(t),n.d(t,{CreateAccountContext:function(){return s},default:function(){return u}});var r=n(828),i=n(85893),a=n(67294),c=(n(56217),n(24097)),o=n(95264),l={},s=a.createContext(l);function u(){var e="Redirect | Datasquirel",t="Redirecting ...",n=(i.Fragment,c.Z,(0,r.Z)(a.useState(null),2));n[0],n[1];return a.useEffect((function(){var e=Array.from(new URLSearchParams(window.location.search)),t=!0,n=!1,i=void 0;try{for(var a,c=e[Symbol.iterator]();!(t=(a=c.next()).done);t=!0){var o=a.value,l=(0,r.Z)(o,2),s=l[0],u=l[1];"redirect_target"==s&&(window.location.href=u+window.location.search)}}catch(f){n=!0,i=f}finally{try{t||null==c.return||c.return()}finally{if(n)throw i}}setTimeout((function(){window.location.pathname="/"}),2e3)}),[]),(0,i.jsx)("div",{className:"flex flex-col gap-4 items-center justify-center w-full h-screen p-6 bg-slate-100",children:(0,i.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,i.jsx)("img",{src:"/images/logo-icon-alt-2.webp",alt:"Datasquirel Logo",width:60}),(0,i.jsx)("div",{className:"w-10 h-10 flex flex-col items-center justify-center",children:(0,i.jsx)(o.Z,{width:"25px",position:"relative"})})]})})}}},function(e){e.O(0,[9774,2888,179],(function(){return t=71008,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
@@ -0,0 +1 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8006],{60249:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/reset-password",function(){return n(65082)}])},82186:function(e,s,n){"use strict";n.d(s,{Z:function(){return a}});var t=n(85893);n(67294);function a(e){var s=e.message,n=e.className;return(0,t.jsxs)("div",{className:"info green"+(n?" "+n:""),children:[(0,t.jsx)("img",{src:"/images/checkmark.svg",alt:"Warning Image Icon",width:22,className:"-my-2"}),(0,t.jsx)("span",{children:s})]})}},65082:function(e,s,n){"use strict";n.r(s),n.d(s,{ResetPasswordContext:function(){return f},__N_SSP:function(){return p},default:function(){return h}});var t=n(828),a=n(85893),r=n(67294),i=n(56217),o=n(24097),c=n(95264),d=n(86729),l=n(82186),u=n(96486),m=n.n(u),w={},p=!0,f=r.createContext(w);function h(e){var s=e.email,n="Reset Password | Datasquirel",u="Set a new password",w=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("title",{children:n}),(0,a.jsx)("meta",{name:"description",content:u}),(0,a.jsx)(o.Z,{pageTitle:n,pageDescription:u,pagePathname:"/"})]}),p=(0,t.Z)(r.useState(!1),2),h=p[0],x=p[1],g=(0,t.Z)(r.useState(!1),2),v=g[0],j=g[1];return(0,a.jsx)(i.Z,{head:w,user:e.user,children:(0,a.jsx)(f.Provider,{value:{user:e.user},children:(0,a.jsx)("main",{children:(0,a.jsxs)("section",{children:[h&&(0,a.jsx)(c.Z,{}),(0,a.jsx)("div",{className:"main-container flex-col items-start",children:v?(0,a.jsx)(l.Z,{message:"Password Updated Sucessfully. Redirecting you ..."}):(0,a.jsxs)(r.Fragment,{children:[(0,a.jsx)("h1",{className:"m-0 text-4xl",children:"Reset Password"}),(0,a.jsx)("span",{children:"Please enter new passord and confirm it"}),(0,a.jsxs)("form",{className:"max-w-xl w-full flex flex-col items-stretch gap-4",onSubmit:function(e){x(!0),e.preventDefault();var n=e.target,t=n.password.value,a=n["confirm-password"].classList.contains("warning");return(null===t||void 0===t?void 0:t.length)<8?(window.alert("Password must be at least 8 characters"),void setTimeout((function(){x(!1)}),500)):a?(window.alert("Passwords don't match"),void setTimeout((function(){x(!1)}),500)):void(0,d.Z)("/api/resetPassword?email=".concat(s,"&password=").concat(t)).then((function(e){setTimeout((function(){x(!1)}),500),setTimeout((function(){window.location.href="/logout?login=true"}),1e3),e.success&&j(!0)}))},children:[(0,a.jsx)("input",{type:"password",name:"password",id:"password",className:"w-full",placeholder:"New Password",required:!0}),(0,a.jsx)("input",{type:"password",name:"confirm-password",id:"confirm-password",className:"w-full",placeholder:"Confirm New Password",required:!0,onInput:function(e){var s=e.target,n=s.closest("form");try{n.password.value.match(new RegExp("^".concat(m().escapeRegExp(s.value),"$")))?(s.classList.remove("warning"),!0):s.classList.add("warning")}catch(t){(0,d.Z)("/api/admin/clientError",{method:"post",body:{component:"reset-password-page-component/lines-170-177",message:t.message,user:{}}}),e.target.classList.add("warning")}}}),(0,a.jsx)("button",{children:"Reset Password"})]})]})})]})})})})}}},function(e){e.O(0,[3662,9774,2888,179],(function(){return s=60249,e(e.s=s);var s}));var s=e.O();_N_E=s}]);
@@ -0,0 +1 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3851],{28140:function(e,s,a){"use strict";var t=a(64836);s.Z=void 0;var n=t(a(64938)),r=a(85893),i=(0,n.default)([(0,r.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-8zm1 13h-2v-6h2v6zm0-8h-2V7h2v2z",opacity:".3"},"0"),(0,r.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 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"},"1")],"InfoTwoTone");s.Z=i},76488:function(e,s,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/send-password-reset-link",function(){return a(43499)}])},82186:function(e,s,a){"use strict";a.d(s,{Z:function(){return n}});var t=a(85893);a(67294);function n(e){var s=e.message,a=e.className;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})]})}},43499:function(e,s,a){"use strict";a.r(s),a.d(s,{SendPassResetContext:function(){return x},__N_SSP:function(){return f},default:function(){return p}});var t=a(828),n=a(85893),r=a(67294),i=a(56217),l=a(24097),c=a(95264),o=a(86729),d=a(82186),u=a(28140);function m(e){var s=e.message;return(0,n.jsxs)("div",{className:"info gray",children:[(0,n.jsx)(u.Z,{fontSize:"small",color:"inherit",className:"opacity-50 text-gray-600"}),(0,n.jsx)("span",{className:"font-normal",children:s})]})}var h={},f=!0,x=r.createContext(h);function p(e){var s,a="Cloudbased SQL data management system | Datasquirel",u="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,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("title",{children:a}),(0,n.jsx)("meta",{name:"description",content:u}),(0,n.jsx)(l.Z,{pageTitle:a,pageDescription:u,pagePathname:"/"})]}),f=(0,t.Z)(r.useState(!1),2),p=f[0],v=f[1],j=(0,t.Z)(r.useState(!1),2),g=j[0],w=j[1];return(0,n.jsx)(i.Z,{head:h,user:e.user,children:(0,n.jsx)(x.Provider,{value:{user:e.user},children:(0,n.jsx)("main",{children:(0,n.jsxs)("section",{children:[p&&(0,n.jsx)(c.Z,{}),g?(0,n.jsx)(d.Z,{message:"Email Sent. Please check your email address and follow the link provided",className:"whitespace-nowrap"}):(0,n.jsx)("div",{className:"paper",children:(0,n.jsxs)("div",{className:"max-w-xl flex-col items-stretch",children:[(0,n.jsx)("h1",{className:"m-0 text-4xl",children:"Send Password Reset Link"}),(0,n.jsx)("span",{children:"Please enter your email address to receive a password reset link"}),(0,n.jsxs)("form",{className:"w-full flex flex-col items-stretch gap-4",onSubmit:function(e){v(!0),e.preventDefault();var s=e.target["email-address"].value;(0,o.Z)("/api/sendPasswordResetLink?email=".concat(s)).then((function(e){console.log(e),setTimeout((function(){v(!1)}),500),e.success&&w(!0)}))},children:[(0,n.jsx)("input",{type:"text",autoComplete:"email",name:"email-address",id:"email-address",className:"w-full",placeholder:"Email Address",defaultValue:(null===e||void 0===e||null===(s=e.user)||void 0===s?void 0:s.logged_in_status)?e.user.email:"",required:!0}),(0,n.jsx)("button",{children:"Send password reset Email"}),(0,n.jsx)(m,{message:"Please note that this link will expire after 1 hour"})]})]})})]})})})})}}},function(e){e.O(0,[9774,2888,179],(function(){return s=76488,e(e.s=s);var s}));var s=e.O();_N_E=s}]);
@@ -0,0 +1 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3663],{24361:function(n,t,e){(window.__NEXT_P=window.__NEXT_P||[]).push(["/su",function(){return e(19011)}])},19011:function(n,t,e){"use strict";e.r(t),e.d(t,{__N_SSP:function(){return s},default:function(){return i}});var r=e(85893),u=(e(67294),e(85313)),a=e(44187),s=!0;function i(n){var t=n.user,e=n.data,s=(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)(u.Z,{head:s,user:t,children:(0,r.jsx)(a.Z,{data:e})})}}},function(n){n.O(0,[5313,3695,9774,2888,179],(function(){return t=24361,n(n.s=t);var t}));var t=n.O();_N_E=t}]);
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1973],{71889:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/su/console",function(){return t(73794)}])},73794:function(e,n,t){"use strict";t.r(n),t.d(n,{__N_SSP:function(){return h},default:function(){return x}});var l=t(85893),o=t(67294),s=t(85313),i=t(828),r=t(53920),c=t(47568),a=t(97582);function u(){return(u=(0,c.Z)((function(e){var n,l,o,s,i,r,c,u,d,f,m,h;return(0,a.__generator)(this,(function(a){return n=e.socket,l=t(12320).Terminal,o=t(12617).FitAddon,s=new o,i=document.getElementById("terminalWrapper"),r=document.getElementById("terminal"),c=i.clientWidth,u=Math.round(c/12),(d=new l({cols:u,rows:6})).open(r),s.fit(),n.on("console",(function(e){d.write(e)})),f=new o,m=document.getElementById("shell"),(h=new l({cols:u,rows:17})).open(m),f.fit(),n.on("shell",(function(e){h.write(e)})),h.onKey((function(e,t){n.emit("shell",e.key)})),[2,d]}))}))).apply(this,arguments)}var d=t(48531),f=!1;function m(e){var n=e.socketDomain,t=(0,i.Z)(o.useState(null),2),s=t[0],c=t[1],a=(0,i.Z)(o.useState(null),2),m=a[0],h=a[1],x=(0,i.Z)(o.useState(""),2),v=x[0],g=x[1];return o.useEffect((function(){var e=n;if(console.log("Socket Domain =>",e),e){var t=(0,r.io)(e,{extraHeaders:{"X-Socket-Paradigm":"Console"}});t.on("connect",(function(){c(t),console.log("Socket Connected!")})),setInterval((function(){t.emit("get-log")}),1e3),t.on("console-log",(function(e){console.log("Fetched Log",e),g(e.replace((0,d.Z)(),"")),setTimeout((function(){var e=document.getElementById("logHistoryWrapper");e&&!f&&(e.scrollTop=e.scrollHeight)}),200)}))}}),[]),o.useEffect((function(){if(s)return function(e){return u.apply(this,arguments)}({socket:s}).then((function(e){h(e)})),function(){var e,n;null===(e=document.getElementById("terminal"))||void 0===e||e.childNodes.forEach((function(e){var n;null===(n=e.parentNode)||void 0===n||n.removeChild(e)})),null===(n=document.getElementById("shell"))||void 0===n||n.childNodes.forEach((function(e){var n;null===(n=e.parentNode)||void 0===n||n.removeChild(e)})),null===m||void 0===m||m.dispose()}}),[s]),(0,l.jsxs)(o.Fragment,{children:[(0,l.jsxs)("div",{className:"w-full justify-between",children:[(0,l.jsx)("h2",{className:"text-2xl m-0",children:"Console"}),(0,l.jsx)("button",{onClick:function(e){s&&s.emit("log","Logging to the console")},children:"Log console"})]}),(0,l.jsxs)("div",{className:"grid grid-cols-2 gap-6 w-full items-stretch",children:[(0,l.jsx)("section",{className:"paper bg-slate-900",id:"terminalWrapper",children:(0,l.jsxs)("div",{className:"flex flex-col w-full gap-10 items-start justify-start terminal",children:[(0,l.jsxs)("div",{className:"flex flex-col items-start w-full",children:[(0,l.jsx)("h2",{className:"m-0 text-white text-base",children:"Server Log"}),(0,l.jsx)("hr",{className:"opacity-20"}),(0,l.jsx)("div",{id:"terminal",className:"relative grow z-50 overflow-hidden w-full h-[150px]"})]}),(0,l.jsxs)("div",{className:"flex flex-col items-start w-full",children:[(0,l.jsx)("h2",{className:"m-0 text-white text-base",children:"Shell"}),(0,l.jsx)("hr",{className:"opacity-20"}),(0,l.jsx)("div",{id:"shell",className:"relative grow z-50 overflow-hidden w-full h-[340px]"})]})]})}),(0,l.jsxs)("section",{className:"paper",children:[(0,l.jsxs)("div",{className:"flex w-full justify-between",children:[(0,l.jsx)("h2",{className:"m-0 text-2xl",children:"Log History"}),(0,l.jsx)("button",{className:"outlined smallest gray",onClick:function(e){window.confirm("Clear Log History?")&&s&&s.emit("clear-log")},children:"Clear Log"})]}),(0,l.jsx)("hr",{}),(0,l.jsx)("div",{className:"w-full max-h-[500px] overflow-auto",id:"logHistoryWrapper",style:{scrollBehavior:"smooth"},onMouseEnter:function(){return f=!0},onMouseLeave:function(){return f=!1},children:(0,l.jsx)("pre",{className:"block",children:v})})]})]})]})}t(56500);var h=!0;function x(e){var n=e.user,t=(e.data,e.socketDomain),o=(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("title",{children:"Console | Datasquirel"}),(0,l.jsx)("meta",{name:"description",content:"Databases Console"})]});return(0,l.jsx)(s.Z,{head:o,user:n,children:(0,l.jsx)(m,{socketDomain:t})})}}},function(e){e.O(0,[6142,493,5313,9774,2888,179],(function(){return n=71889,e(e.s=n);var n}));var n=e.O();_N_E=n}]);

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