@devtable/settings-form 10.4.1 → 10.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,22 +1,22 @@
1
- import Z, { useEffect as mt, forwardRef as Xe, useState as Ut, Component as _r } from "react";
2
- import { Box as le, TextInput as ce, Divider as Qe, Group as ee, NumberInput as Ar, PasswordInput as Je, Button as Y, Modal as _e, Stack as Me, Alert as kr, SegmentedControl as Tr, Tooltip as Ve, Text as Re, ActionIcon as bt, LoadingOverlay as et, Table as tt, Select as Rr, Switch as Or, createStyles as Gt, useComponentDefaultProps as xr, useMantineTheme as Cr, ScrollArea as qt, Tabs as rt, HoverCard as dt } from "@mantine/core";
3
- import { showNotification as be, updateNotification as te } from "@mantine/notifications";
4
- import { Recycle as Ir, AlertCircle as Dr, PlaylistAdd as nt, Trash as at, Edit as Lr } from "tabler-icons-react";
5
- import Fr from "axios";
6
- import Nr from "crypto-js";
7
- import $r from "lodash";
8
- import { useForm as we, Controller as G } from "react-hook-form";
9
- import { useBoolean as Pr, useRequest as Oe } from "ahooks";
10
- import Ht, { loader as pt } from "@monaco-editor/react";
11
- import { useModals as Be, closeAllModals as zr } from "@mantine/modals";
12
- import { IconLock as Yt, IconEdit as gt, IconNetwork as Mr, IconBrandMysql as Br, IconDatabase as jr, IconEye as Ur } from "@tabler/icons";
13
- import { useClipboard as Gr } from "@mantine/hooks";
14
- var qr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, ze = {}, Hr = {
1
+ import K, { useEffect as bt, forwardRef as Qe, useState as Gt, Component as Ar } from "react";
2
+ import { Box as le, TextInput as ue, Divider as Je, Group as J, NumberInput as kr, PasswordInput as et, Button as Y, Modal as Ae, Stack as Be, Alert as Tr, SegmentedControl as Rr, Tooltip as We, Text as Re, ActionIcon as yt, LoadingOverlay as tt, Table as rt, Select as Or, Switch as xr, createStyles as qt, rem as ze, useComponentDefaultProps as Cr, useMantineTheme as Ir, ScrollArea as Ht, Tabs as nt, HoverCard as pt } from "@mantine/core";
3
+ import { showNotification as ye, updateNotification as ee } from "@mantine/notifications";
4
+ import { Recycle as Dr, AlertCircle as Lr, PlaylistAdd as at, Trash as it, Edit as Fr } from "tabler-icons-react";
5
+ import Nr from "axios";
6
+ import $r from "crypto-js";
7
+ import Pr from "lodash";
8
+ import { useForm as Ee, Controller as q } from "react-hook-form";
9
+ import { useBoolean as zr, useRequest as Oe } from "ahooks";
10
+ import Yt, { loader as gt } from "@monaco-editor/react";
11
+ import { useModals as je, closeAllModals as Mr } from "@mantine/modals";
12
+ import { IconLock as Vt, IconEdit as ft, IconNetwork as Br, IconBrandMysql as jr, IconDatabase as Ur, IconEye as Gr } from "@tabler/icons-react";
13
+ import { useClipboard as qr } from "@mantine/hooks";
14
+ var Hr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Me = {}, Yr = {
15
15
  get exports() {
16
- return ze;
16
+ return Me;
17
17
  },
18
18
  set exports(e) {
19
- ze = e;
19
+ Me = e;
20
20
  }
21
21
  }, Fe = {};
22
22
  /**
@@ -28,12 +28,12 @@ var qr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
28
28
  * This source code is licensed under the MIT license found in the
29
29
  * LICENSE file in the root directory of this source tree.
30
30
  */
31
- var Lt;
32
- function Yr() {
33
- if (Lt)
31
+ var Ft;
32
+ function Vr() {
33
+ if (Ft)
34
34
  return Fe;
35
- Lt = 1;
36
- var e = Z, t = Symbol.for("react.element"), r = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, s = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, o = { key: !0, ref: !0, __self: !0, __source: !0 };
35
+ Ft = 1;
36
+ var e = K, t = Symbol.for("react.element"), r = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, s = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, o = { key: !0, ref: !0, __self: !0, __source: !0 };
37
37
  function l(p, d, f) {
38
38
  var b, u = {}, c = null, g = null;
39
39
  f !== void 0 && (c = "" + f), d.key !== void 0 && (c = "" + d.key), d.ref !== void 0 && (g = d.ref);
@@ -56,10 +56,10 @@ var Ne = {};
56
56
  * This source code is licensed under the MIT license found in the
57
57
  * LICENSE file in the root directory of this source tree.
58
58
  */
59
- var Ft;
60
- function Vr() {
61
- return Ft || (Ft = 1, process.env.NODE_ENV !== "production" && function() {
62
- var e = Z, t = Symbol.for("react.element"), r = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), o = Symbol.for("react.profiler"), l = Symbol.for("react.provider"), p = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), f = Symbol.for("react.suspense"), b = Symbol.for("react.suspense_list"), u = Symbol.for("react.memo"), c = Symbol.for("react.lazy"), g = Symbol.for("react.offscreen"), y = Symbol.iterator, h = "@@iterator";
59
+ var Nt;
60
+ function Wr() {
61
+ return Nt || (Nt = 1, process.env.NODE_ENV !== "production" && function() {
62
+ var e = K, t = Symbol.for("react.element"), r = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), o = Symbol.for("react.profiler"), l = Symbol.for("react.provider"), p = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), f = Symbol.for("react.suspense"), b = Symbol.for("react.suspense_list"), u = Symbol.for("react.memo"), c = Symbol.for("react.lazy"), g = Symbol.for("react.offscreen"), y = Symbol.iterator, h = "@@iterator";
63
63
  function _(i) {
64
64
  if (i === null || typeof i != "object")
65
65
  return null;
@@ -76,31 +76,31 @@ function Vr() {
76
76
  }
77
77
  function N(i, v, T) {
78
78
  {
79
- var D = A.ReactDebugCurrentFrame, U = D.getStackAddendum();
80
- U !== "" && (v += "%s", T = T.concat([U]));
81
- var V = T.map(function(z) {
79
+ var D = A.ReactDebugCurrentFrame, G = D.getStackAddendum();
80
+ G !== "" && (v += "%s", T = T.concat([G]));
81
+ var W = T.map(function(z) {
82
82
  return String(z);
83
83
  });
84
- V.unshift("Warning: " + v), Function.prototype.apply.call(console[i], console, V);
84
+ W.unshift("Warning: " + v), Function.prototype.apply.call(console[i], console, W);
85
85
  }
86
86
  }
87
- var M = !1, oe = !1, q = !1, W = !1, X = !1, L;
88
- L = Symbol.for("react.module.reference");
89
- function F(i) {
90
- return !!(typeof i == "string" || typeof i == "function" || i === n || i === o || X || i === s || i === f || i === b || W || i === g || M || oe || q || typeof i == "object" && i !== null && (i.$$typeof === c || i.$$typeof === u || i.$$typeof === l || i.$$typeof === p || i.$$typeof === d || // This needs to include all possible module reference object
87
+ var M = !1, ne = !1, Q = !1, H = !1, Z = !1, F;
88
+ F = Symbol.for("react.module.reference");
89
+ function L(i) {
90
+ return !!(typeof i == "string" || typeof i == "function" || i === n || i === o || Z || i === s || i === f || i === b || H || i === g || M || ne || Q || typeof i == "object" && i !== null && (i.$$typeof === c || i.$$typeof === u || i.$$typeof === l || i.$$typeof === p || i.$$typeof === d || // This needs to include all possible module reference object
91
91
  // types supported by any Flight configuration anywhere since
92
92
  // we don't know which Flight build this will end up being used
93
93
  // with.
94
- i.$$typeof === L || i.getModuleId !== void 0));
94
+ i.$$typeof === F || i.getModuleId !== void 0));
95
95
  }
96
- function H(i, v, T) {
96
+ function B(i, v, T) {
97
97
  var D = i.displayName;
98
98
  if (D)
99
99
  return D;
100
- var U = v.displayName || v.name || "";
101
- return U !== "" ? T + "(" + U + ")" : T;
100
+ var G = v.displayName || v.name || "";
101
+ return G !== "" ? T + "(" + G + ")" : T;
102
102
  }
103
- function re(i) {
103
+ function te(i) {
104
104
  return i.displayName || "Context";
105
105
  }
106
106
  function O(i) {
@@ -128,19 +128,19 @@ function Vr() {
128
128
  switch (i.$$typeof) {
129
129
  case p:
130
130
  var v = i;
131
- return re(v) + ".Consumer";
131
+ return te(v) + ".Consumer";
132
132
  case l:
133
133
  var T = i;
134
- return re(T._context) + ".Provider";
134
+ return te(T._context) + ".Provider";
135
135
  case d:
136
- return H(i, i.render, "ForwardRef");
136
+ return B(i, i.render, "ForwardRef");
137
137
  case u:
138
138
  var D = i.displayName || null;
139
139
  return D !== null ? D : O(i.type) || "Memo";
140
140
  case c: {
141
- var U = i, V = U._payload, z = U._init;
141
+ var G = i, W = G._payload, z = G._init;
142
142
  try {
143
- return O(z(V));
143
+ return O(z(W));
144
144
  } catch {
145
145
  return null;
146
146
  }
@@ -148,18 +148,18 @@ function Vr() {
148
148
  }
149
149
  return null;
150
150
  }
151
- var E = Object.assign, S = 0, R, w, x, I, $, j, B;
152
- function K() {
151
+ var E = Object.assign, S = 0, R, w, x, I, $, j, V;
152
+ function U() {
153
153
  }
154
- K.__reactDisabledLog = !0;
155
- function J() {
154
+ U.__reactDisabledLog = !0;
155
+ function re() {
156
156
  {
157
157
  if (S === 0) {
158
- R = console.log, w = console.info, x = console.warn, I = console.error, $ = console.group, j = console.groupCollapsed, B = console.groupEnd;
158
+ R = console.log, w = console.info, x = console.warn, I = console.error, $ = console.group, j = console.groupCollapsed, V = console.groupEnd;
159
159
  var i = {
160
160
  configurable: !0,
161
161
  enumerable: !0,
162
- value: K,
162
+ value: U,
163
163
  writable: !0
164
164
  };
165
165
  Object.defineProperties(console, {
@@ -175,7 +175,7 @@ function Vr() {
175
175
  S++;
176
176
  }
177
177
  }
178
- function he() {
178
+ function ge() {
179
179
  {
180
180
  if (S--, S === 0) {
181
181
  var i = {
@@ -203,46 +203,46 @@ function Vr() {
203
203
  value: j
204
204
  }),
205
205
  groupEnd: E({}, i, {
206
- value: B
206
+ value: V
207
207
  })
208
208
  });
209
209
  }
210
210
  S < 0 && k("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
211
211
  }
212
212
  }
213
- var de = A.ReactCurrentDispatcher, ye;
214
- function pe(i, v, T) {
213
+ var ce = A.ReactCurrentDispatcher, ve;
214
+ function fe(i, v, T) {
215
215
  {
216
- if (ye === void 0)
216
+ if (ve === void 0)
217
217
  try {
218
218
  throw Error();
219
- } catch (U) {
220
- var D = U.stack.trim().match(/\n( *(at )?)/);
221
- ye = D && D[1] || "";
219
+ } catch (G) {
220
+ var D = G.stack.trim().match(/\n( *(at )?)/);
221
+ ve = D && D[1] || "";
222
222
  }
223
223
  return `
224
- ` + ye + i;
224
+ ` + ve + i;
225
225
  }
226
226
  }
227
- var ne = !1, ue;
227
+ var ae = !1, de;
228
228
  {
229
- var ke = typeof WeakMap == "function" ? WeakMap : Map;
230
- ue = new ke();
229
+ var me = typeof WeakMap == "function" ? WeakMap : Map;
230
+ de = new me();
231
231
  }
232
232
  function Te(i, v) {
233
- if (!i || ne)
233
+ if (!i || ae)
234
234
  return "";
235
235
  {
236
- var T = ue.get(i);
236
+ var T = de.get(i);
237
237
  if (T !== void 0)
238
238
  return T;
239
239
  }
240
240
  var D;
241
- ne = !0;
242
- var U = Error.prepareStackTrace;
241
+ ae = !0;
242
+ var G = Error.prepareStackTrace;
243
243
  Error.prepareStackTrace = void 0;
244
- var V;
245
- V = de.current, de.current = null, J();
244
+ var W;
245
+ W = ce.current, ce.current = null, re();
246
246
  try {
247
247
  if (v) {
248
248
  var z = function() {
@@ -255,171 +255,171 @@ function Vr() {
255
255
  }), typeof Reflect == "object" && Reflect.construct) {
256
256
  try {
257
257
  Reflect.construct(z, []);
258
- } catch (Se) {
259
- D = Se;
258
+ } catch (we) {
259
+ D = we;
260
260
  }
261
261
  Reflect.construct(i, [], z);
262
262
  } else {
263
263
  try {
264
264
  z.call();
265
- } catch (Se) {
266
- D = Se;
265
+ } catch (we) {
266
+ D = we;
267
267
  }
268
268
  i.call(z.prototype);
269
269
  }
270
270
  } else {
271
271
  try {
272
272
  throw Error();
273
- } catch (Se) {
274
- D = Se;
273
+ } catch (we) {
274
+ D = we;
275
275
  }
276
276
  i();
277
277
  }
278
- } catch (Se) {
279
- if (Se && D && typeof Se.stack == "string") {
280
- for (var P = Se.stack.split(`
281
- `), ge = D.stack.split(`
282
- `), ae = P.length - 1, ie = ge.length - 1; ae >= 1 && ie >= 0 && P[ae] !== ge[ie]; )
283
- ie--;
284
- for (; ae >= 1 && ie >= 0; ae--, ie--)
285
- if (P[ae] !== ge[ie]) {
286
- if (ae !== 1 || ie !== 1)
278
+ } catch (we) {
279
+ if (we && D && typeof we.stack == "string") {
280
+ for (var P = we.stack.split(`
281
+ `), pe = D.stack.split(`
282
+ `), ie = P.length - 1, oe = pe.length - 1; ie >= 1 && oe >= 0 && P[ie] !== pe[oe]; )
283
+ oe--;
284
+ for (; ie >= 1 && oe >= 0; ie--, oe--)
285
+ if (P[ie] !== pe[oe]) {
286
+ if (ie !== 1 || oe !== 1)
287
287
  do
288
- if (ae--, ie--, ie < 0 || P[ae] !== ge[ie]) {
289
- var me = `
290
- ` + P[ae].replace(" at new ", " at ");
291
- return i.displayName && me.includes("<anonymous>") && (me = me.replace("<anonymous>", i.displayName)), typeof i == "function" && ue.set(i, me), me;
288
+ if (ie--, oe--, oe < 0 || P[ie] !== pe[oe]) {
289
+ var be = `
290
+ ` + P[ie].replace(" at new ", " at ");
291
+ return i.displayName && be.includes("<anonymous>") && (be = be.replace("<anonymous>", i.displayName)), typeof i == "function" && de.set(i, be), be;
292
292
  }
293
- while (ae >= 1 && ie >= 0);
293
+ while (ie >= 1 && oe >= 0);
294
294
  break;
295
295
  }
296
296
  }
297
297
  } finally {
298
- ne = !1, de.current = V, he(), Error.prepareStackTrace = U;
298
+ ae = !1, ce.current = W, ge(), Error.prepareStackTrace = G;
299
299
  }
300
- var Ce = i ? i.displayName || i.name : "", Dt = Ce ? pe(Ce) : "";
301
- return typeof i == "function" && ue.set(i, Dt), Dt;
300
+ var Ce = i ? i.displayName || i.name : "", Lt = Ce ? fe(Ce) : "";
301
+ return typeof i == "function" && de.set(i, Lt), Lt;
302
302
  }
303
- function tr(i, v, T) {
303
+ function rr(i, v, T) {
304
304
  return Te(i, !1);
305
305
  }
306
- function rr(i) {
306
+ function nr(i) {
307
307
  var v = i.prototype;
308
308
  return !!(v && v.isReactComponent);
309
309
  }
310
- function Ge(i, v, T) {
310
+ function qe(i, v, T) {
311
311
  if (i == null)
312
312
  return "";
313
313
  if (typeof i == "function")
314
- return Te(i, rr(i));
314
+ return Te(i, nr(i));
315
315
  if (typeof i == "string")
316
- return pe(i);
316
+ return fe(i);
317
317
  switch (i) {
318
318
  case f:
319
- return pe("Suspense");
319
+ return fe("Suspense");
320
320
  case b:
321
- return pe("SuspenseList");
321
+ return fe("SuspenseList");
322
322
  }
323
323
  if (typeof i == "object")
324
324
  switch (i.$$typeof) {
325
325
  case d:
326
- return tr(i.render);
326
+ return rr(i.render);
327
327
  case u:
328
- return Ge(i.type, v, T);
328
+ return qe(i.type, v, T);
329
329
  case c: {
330
- var D = i, U = D._payload, V = D._init;
330
+ var D = i, G = D._payload, W = D._init;
331
331
  try {
332
- return Ge(V(U), v, T);
332
+ return qe(W(G), v, T);
333
333
  } catch {
334
334
  }
335
335
  }
336
336
  }
337
337
  return "";
338
338
  }
339
- var qe = Object.prototype.hasOwnProperty, St = {}, wt = A.ReactDebugCurrentFrame;
340
- function He(i) {
339
+ var He = Object.prototype.hasOwnProperty, wt = {}, Et = A.ReactDebugCurrentFrame;
340
+ function Ye(i) {
341
341
  if (i) {
342
- var v = i._owner, T = Ge(i.type, i._source, v ? v.type : null);
343
- wt.setExtraStackFrame(T);
342
+ var v = i._owner, T = qe(i.type, i._source, v ? v.type : null);
343
+ Et.setExtraStackFrame(T);
344
344
  } else
345
- wt.setExtraStackFrame(null);
345
+ Et.setExtraStackFrame(null);
346
346
  }
347
- function nr(i, v, T, D, U) {
347
+ function ar(i, v, T, D, G) {
348
348
  {
349
- var V = Function.call.bind(qe);
349
+ var W = Function.call.bind(He);
350
350
  for (var z in i)
351
- if (V(i, z)) {
351
+ if (W(i, z)) {
352
352
  var P = void 0;
353
353
  try {
354
354
  if (typeof i[z] != "function") {
355
- var ge = Error((D || "React class") + ": " + T + " type `" + z + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof i[z] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
356
- throw ge.name = "Invariant Violation", ge;
355
+ var pe = Error((D || "React class") + ": " + T + " type `" + z + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof i[z] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
356
+ throw pe.name = "Invariant Violation", pe;
357
357
  }
358
358
  P = i[z](v, z, D, T, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
359
- } catch (ae) {
360
- P = ae;
359
+ } catch (ie) {
360
+ P = ie;
361
361
  }
362
- P && !(P instanceof Error) && (He(U), k("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", D || "React class", T, z, typeof P), He(null)), P instanceof Error && !(P.message in St) && (St[P.message] = !0, He(U), k("Failed %s type: %s", T, P.message), He(null));
362
+ P && !(P instanceof Error) && (Ye(G), k("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", D || "React class", T, z, typeof P), Ye(null)), P instanceof Error && !(P.message in wt) && (wt[P.message] = !0, Ye(G), k("Failed %s type: %s", T, P.message), Ye(null));
363
363
  }
364
364
  }
365
365
  }
366
- var ar = Array.isArray;
367
- function ot(i) {
368
- return ar(i);
366
+ var ir = Array.isArray;
367
+ function st(i) {
368
+ return ir(i);
369
369
  }
370
- function ir(i) {
370
+ function or(i) {
371
371
  {
372
372
  var v = typeof Symbol == "function" && Symbol.toStringTag, T = v && i[Symbol.toStringTag] || i.constructor.name || "Object";
373
373
  return T;
374
374
  }
375
375
  }
376
- function or(i) {
376
+ function sr(i) {
377
377
  try {
378
- return Et(i), !1;
378
+ return _t(i), !1;
379
379
  } catch {
380
380
  return !0;
381
381
  }
382
382
  }
383
- function Et(i) {
383
+ function _t(i) {
384
384
  return "" + i;
385
385
  }
386
- function _t(i) {
387
- if (or(i))
388
- return k("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", ir(i)), Et(i);
386
+ function At(i) {
387
+ if (sr(i))
388
+ return k("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", or(i)), _t(i);
389
389
  }
390
- var Le = A.ReactCurrentOwner, sr = {
390
+ var Le = A.ReactCurrentOwner, lr = {
391
391
  key: !0,
392
392
  ref: !0,
393
393
  __self: !0,
394
394
  __source: !0
395
- }, At, kt, st;
396
- st = {};
397
- function lr(i) {
398
- if (qe.call(i, "ref")) {
395
+ }, kt, Tt, lt;
396
+ lt = {};
397
+ function ur(i) {
398
+ if (He.call(i, "ref")) {
399
399
  var v = Object.getOwnPropertyDescriptor(i, "ref").get;
400
400
  if (v && v.isReactWarning)
401
401
  return !1;
402
402
  }
403
403
  return i.ref !== void 0;
404
404
  }
405
- function ur(i) {
406
- if (qe.call(i, "key")) {
405
+ function cr(i) {
406
+ if (He.call(i, "key")) {
407
407
  var v = Object.getOwnPropertyDescriptor(i, "key").get;
408
408
  if (v && v.isReactWarning)
409
409
  return !1;
410
410
  }
411
411
  return i.key !== void 0;
412
412
  }
413
- function cr(i, v) {
413
+ function dr(i, v) {
414
414
  if (typeof i.ref == "string" && Le.current && v && Le.current.stateNode !== v) {
415
415
  var T = O(Le.current.type);
416
- st[T] || (k('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', O(Le.current.type), i.ref), st[T] = !0);
416
+ lt[T] || (k('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', O(Le.current.type), i.ref), lt[T] = !0);
417
417
  }
418
418
  }
419
- function dr(i, v) {
419
+ function pr(i, v) {
420
420
  {
421
421
  var T = function() {
422
- At || (At = !0, k("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", v));
422
+ kt || (kt = !0, k("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", v));
423
423
  };
424
424
  T.isReactWarning = !0, Object.defineProperty(i, "key", {
425
425
  get: T,
@@ -427,10 +427,10 @@ function Vr() {
427
427
  });
428
428
  }
429
429
  }
430
- function pr(i, v) {
430
+ function gr(i, v) {
431
431
  {
432
432
  var T = function() {
433
- kt || (kt = !0, k("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", v));
433
+ Tt || (Tt = !0, k("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", v));
434
434
  };
435
435
  T.isReactWarning = !0, Object.defineProperty(i, "ref", {
436
436
  get: T,
@@ -438,7 +438,7 @@ function Vr() {
438
438
  });
439
439
  }
440
440
  }
441
- var gr = function(i, v, T, D, U, V, z) {
441
+ var fr = function(i, v, T, D, G, W, z) {
442
442
  var P = {
443
443
  // This tag allows us to uniquely identify this as a React Element
444
444
  $$typeof: t,
@@ -448,7 +448,7 @@ function Vr() {
448
448
  ref: T,
449
449
  props: z,
450
450
  // Record the component responsible for creating this element.
451
- _owner: V
451
+ _owner: W
452
452
  };
453
453
  return P._store = {}, Object.defineProperty(P._store, "validated", {
454
454
  configurable: !1,
@@ -464,44 +464,44 @@ function Vr() {
464
464
  configurable: !1,
465
465
  enumerable: !1,
466
466
  writable: !1,
467
- value: U
467
+ value: G
468
468
  }), Object.freeze && (Object.freeze(P.props), Object.freeze(P)), P;
469
469
  };
470
- function fr(i, v, T, D, U) {
470
+ function hr(i, v, T, D, G) {
471
471
  {
472
- var V, z = {}, P = null, ge = null;
473
- T !== void 0 && (_t(T), P = "" + T), ur(v) && (_t(v.key), P = "" + v.key), lr(v) && (ge = v.ref, cr(v, U));
474
- for (V in v)
475
- qe.call(v, V) && !sr.hasOwnProperty(V) && (z[V] = v[V]);
472
+ var W, z = {}, P = null, pe = null;
473
+ T !== void 0 && (At(T), P = "" + T), cr(v) && (At(v.key), P = "" + v.key), ur(v) && (pe = v.ref, dr(v, G));
474
+ for (W in v)
475
+ He.call(v, W) && !lr.hasOwnProperty(W) && (z[W] = v[W]);
476
476
  if (i && i.defaultProps) {
477
- var ae = i.defaultProps;
478
- for (V in ae)
479
- z[V] === void 0 && (z[V] = ae[V]);
477
+ var ie = i.defaultProps;
478
+ for (W in ie)
479
+ z[W] === void 0 && (z[W] = ie[W]);
480
480
  }
481
- if (P || ge) {
482
- var ie = typeof i == "function" ? i.displayName || i.name || "Unknown" : i;
483
- P && dr(z, ie), ge && pr(z, ie);
481
+ if (P || pe) {
482
+ var oe = typeof i == "function" ? i.displayName || i.name || "Unknown" : i;
483
+ P && pr(z, oe), pe && gr(z, oe);
484
484
  }
485
- return gr(i, P, ge, U, D, Le.current, z);
485
+ return fr(i, P, pe, G, D, Le.current, z);
486
486
  }
487
487
  }
488
- var lt = A.ReactCurrentOwner, Tt = A.ReactDebugCurrentFrame;
488
+ var ut = A.ReactCurrentOwner, Rt = A.ReactDebugCurrentFrame;
489
489
  function xe(i) {
490
490
  if (i) {
491
- var v = i._owner, T = Ge(i.type, i._source, v ? v.type : null);
492
- Tt.setExtraStackFrame(T);
491
+ var v = i._owner, T = qe(i.type, i._source, v ? v.type : null);
492
+ Rt.setExtraStackFrame(T);
493
493
  } else
494
- Tt.setExtraStackFrame(null);
494
+ Rt.setExtraStackFrame(null);
495
495
  }
496
- var ut;
497
- ut = !1;
498
- function ct(i) {
496
+ var ct;
497
+ ct = !1;
498
+ function dt(i) {
499
499
  return typeof i == "object" && i !== null && i.$$typeof === t;
500
500
  }
501
- function Rt() {
501
+ function Ot() {
502
502
  {
503
- if (lt.current) {
504
- var i = O(lt.current.type);
503
+ if (ut.current) {
504
+ var i = O(ut.current.type);
505
505
  if (i)
506
506
  return `
507
507
 
@@ -510,7 +510,7 @@ Check the render method of \`` + i + "`.";
510
510
  return "";
511
511
  }
512
512
  }
513
- function hr(i) {
513
+ function mr(i) {
514
514
  {
515
515
  if (i !== void 0) {
516
516
  var v = i.fileName.replace(/^.*[\\\/]/, ""), T = i.lineNumber;
@@ -521,10 +521,10 @@ Check your code at ` + v + ":" + T + ".";
521
521
  return "";
522
522
  }
523
523
  }
524
- var Ot = {};
525
- function mr(i) {
524
+ var xt = {};
525
+ function br(i) {
526
526
  {
527
- var v = Rt();
527
+ var v = Ot();
528
528
  if (!v) {
529
529
  var T = typeof i == "string" ? i : i.displayName || i.name;
530
530
  T && (v = `
@@ -534,39 +534,39 @@ Check the top-level render call using <` + T + ">.");
534
534
  return v;
535
535
  }
536
536
  }
537
- function xt(i, v) {
537
+ function Ct(i, v) {
538
538
  {
539
539
  if (!i._store || i._store.validated || i.key != null)
540
540
  return;
541
541
  i._store.validated = !0;
542
- var T = mr(v);
543
- if (Ot[T])
542
+ var T = br(v);
543
+ if (xt[T])
544
544
  return;
545
- Ot[T] = !0;
545
+ xt[T] = !0;
546
546
  var D = "";
547
- i && i._owner && i._owner !== lt.current && (D = " It was passed a child from " + O(i._owner.type) + "."), xe(i), k('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', T, D), xe(null);
547
+ i && i._owner && i._owner !== ut.current && (D = " It was passed a child from " + O(i._owner.type) + "."), xe(i), k('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', T, D), xe(null);
548
548
  }
549
549
  }
550
- function Ct(i, v) {
550
+ function It(i, v) {
551
551
  {
552
552
  if (typeof i != "object")
553
553
  return;
554
- if (ot(i))
554
+ if (st(i))
555
555
  for (var T = 0; T < i.length; T++) {
556
556
  var D = i[T];
557
- ct(D) && xt(D, v);
557
+ dt(D) && Ct(D, v);
558
558
  }
559
- else if (ct(i))
559
+ else if (dt(i))
560
560
  i._store && (i._store.validated = !0);
561
561
  else if (i) {
562
- var U = _(i);
563
- if (typeof U == "function" && U !== i.entries)
564
- for (var V = U.call(i), z; !(z = V.next()).done; )
565
- ct(z.value) && xt(z.value, v);
562
+ var G = _(i);
563
+ if (typeof G == "function" && G !== i.entries)
564
+ for (var W = G.call(i), z; !(z = W.next()).done; )
565
+ dt(z.value) && Ct(z.value, v);
566
566
  }
567
567
  }
568
568
  }
569
- function br(i) {
569
+ function yr(i) {
570
570
  {
571
571
  var v = i.type;
572
572
  if (v == null || typeof v == "string")
@@ -582,16 +582,16 @@ Check the top-level render call using <` + T + ">.");
582
582
  return;
583
583
  if (T) {
584
584
  var D = O(v);
585
- nr(T, i.props, "prop", D, i);
586
- } else if (v.PropTypes !== void 0 && !ut) {
587
- ut = !0;
588
- var U = O(v);
589
- k("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", U || "Unknown");
585
+ ar(T, i.props, "prop", D, i);
586
+ } else if (v.PropTypes !== void 0 && !ct) {
587
+ ct = !0;
588
+ var G = O(v);
589
+ k("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", G || "Unknown");
590
590
  }
591
591
  typeof v.getDefaultProps == "function" && !v.getDefaultProps.isReactClassApproved && k("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
592
592
  }
593
593
  }
594
- function yr(i) {
594
+ function vr(i) {
595
595
  {
596
596
  for (var v = Object.keys(i.props), T = 0; T < v.length; T++) {
597
597
  var D = v[T];
@@ -603,51 +603,51 @@ Check the top-level render call using <` + T + ">.");
603
603
  i.ref !== null && (xe(i), k("Invalid attribute `ref` supplied to `React.Fragment`."), xe(null));
604
604
  }
605
605
  }
606
- function It(i, v, T, D, U, V) {
606
+ function Dt(i, v, T, D, G, W) {
607
607
  {
608
- var z = F(i);
608
+ var z = L(i);
609
609
  if (!z) {
610
610
  var P = "";
611
611
  (i === void 0 || typeof i == "object" && i !== null && Object.keys(i).length === 0) && (P += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
612
- var ge = hr(U);
613
- ge ? P += ge : P += Rt();
614
- var ae;
615
- i === null ? ae = "null" : ot(i) ? ae = "array" : i !== void 0 && i.$$typeof === t ? (ae = "<" + (O(i.type) || "Unknown") + " />", P = " Did you accidentally export a JSX literal instead of a component?") : ae = typeof i, k("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", ae, P);
612
+ var pe = mr(G);
613
+ pe ? P += pe : P += Ot();
614
+ var ie;
615
+ i === null ? ie = "null" : st(i) ? ie = "array" : i !== void 0 && i.$$typeof === t ? (ie = "<" + (O(i.type) || "Unknown") + " />", P = " Did you accidentally export a JSX literal instead of a component?") : ie = typeof i, k("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", ie, P);
616
616
  }
617
- var ie = fr(i, v, T, U, V);
618
- if (ie == null)
619
- return ie;
617
+ var oe = hr(i, v, T, G, W);
618
+ if (oe == null)
619
+ return oe;
620
620
  if (z) {
621
- var me = v.children;
622
- if (me !== void 0)
621
+ var be = v.children;
622
+ if (be !== void 0)
623
623
  if (D)
624
- if (ot(me)) {
625
- for (var Ce = 0; Ce < me.length; Ce++)
626
- Ct(me[Ce], i);
627
- Object.freeze && Object.freeze(me);
624
+ if (st(be)) {
625
+ for (var Ce = 0; Ce < be.length; Ce++)
626
+ It(be[Ce], i);
627
+ Object.freeze && Object.freeze(be);
628
628
  } else
629
629
  k("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
630
630
  else
631
- Ct(me, i);
631
+ It(be, i);
632
632
  }
633
- return i === n ? yr(ie) : br(ie), ie;
633
+ return i === n ? vr(oe) : yr(oe), oe;
634
634
  }
635
635
  }
636
- function vr(i, v, T) {
637
- return It(i, v, T, !0);
638
- }
639
636
  function Sr(i, v, T) {
640
- return It(i, v, T, !1);
637
+ return Dt(i, v, T, !0);
638
+ }
639
+ function wr(i, v, T) {
640
+ return Dt(i, v, T, !1);
641
641
  }
642
- var wr = Sr, Er = vr;
643
- Ne.Fragment = n, Ne.jsx = wr, Ne.jsxs = Er;
642
+ var Er = wr, _r = Sr;
643
+ Ne.Fragment = n, Ne.jsx = Er, Ne.jsxs = _r;
644
644
  }()), Ne;
645
645
  }
646
646
  (function(e) {
647
- process.env.NODE_ENV === "production" ? e.exports = Yr() : e.exports = Vr();
648
- })(Hr);
649
- const fe = ze.Fragment, a = ze.jsx, C = ze.jsxs;
650
- function Wr(e) {
647
+ process.env.NODE_ENV === "production" ? e.exports = Vr() : e.exports = Wr();
648
+ })(Yr);
649
+ const he = Me.Fragment, a = Me.jsx, C = Me.jsxs;
650
+ function Kr(e) {
651
651
  e = e || {};
652
652
  const t = Object.keys(e).sort(), r = [];
653
653
  for (let n = 0; n < t.length; n++) {
@@ -664,11 +664,11 @@ function Wr(e) {
664
664
  }
665
665
  return r.sort().join("&");
666
666
  }
667
- function Kr(e, t) {
668
- let r = Wr(e);
669
- return r += "&key=" + t, Nr.MD5(r).toString().toUpperCase();
667
+ function Zr(e, t) {
668
+ let r = Kr(e);
669
+ return r += "&key=" + t, $r.MD5(r).toString().toUpperCase();
670
670
  }
671
- const Q = {
671
+ const X = {
672
672
  baseURL: "http://localhost:31200",
673
673
  app_id: "",
674
674
  app_secret: "",
@@ -679,7 +679,7 @@ const Q = {
679
679
  return {
680
680
  app_id: this.app_id,
681
681
  nonce_str: t,
682
- sign: Kr({
682
+ sign: Zr({
683
683
  app_id: this.app_id,
684
684
  nonce_str: t,
685
685
  ...e
@@ -701,22 +701,22 @@ const Q = {
701
701
  headers: l,
702
702
  signal: t
703
703
  };
704
- return ["POST", "PUT"].includes(e) && (p.data = s.string ? JSON.stringify(n) : n, p.data.authentication = this.getAuthentication(p.data)), Fr(p).then((d) => d.data).catch((d) => $r.has(d, "response.data.detail.message") ? Promise.reject(new Error(d.response.data.detail.message)) : Promise.reject(d));
704
+ return ["POST", "PUT"].includes(e) && (p.data = s.string ? JSON.stringify(n) : n, p.data.authentication = this.getAuthentication(p.data)), Nr(p).then((d) => d.data).catch((d) => Pr.has(d, "response.data.detail.message") ? Promise.reject(new Error(d.response.data.detail.message)) : Promise.reject(d));
705
705
  };
706
706
  }
707
707
  };
708
- function je(e) {
709
- Q.baseURL !== e.apiBaseURL && (Q.baseURL = e.apiBaseURL), e.app_id && (Q.app_id = e.app_id), e.app_secret && (Q.app_secret = e.app_secret);
708
+ function Ue(e) {
709
+ X.baseURL !== e.apiBaseURL && (X.baseURL = e.apiBaseURL), e.app_id && (X.app_id = e.app_id), e.app_secret && (X.app_secret = e.app_secret);
710
710
  }
711
- const Zr = {
711
+ const Xr = {
712
712
  login: async (e, t) => {
713
713
  const r = {
714
714
  name: e,
715
715
  password: t
716
716
  };
717
- return await Q.getRequest("POST")("/account/login", r);
717
+ return await X.getRequest("POST")("/account/login", r);
718
718
  },
719
- list: async () => await Q.getRequest("POST")("/account/list", {
719
+ list: async () => await X.getRequest("POST")("/account/list", {
720
720
  filter: {},
721
721
  sort: [{
722
722
  field: "name",
@@ -730,7 +730,7 @@ const Zr = {
730
730
  /**
731
731
  * get current account
732
732
  */
733
- get: async () => await Q.getRequest("GET")("/account/get", {}),
733
+ get: async () => await X.getRequest("GET")("/account/get", {}),
734
734
  /**
735
735
  * update current account
736
736
  */
@@ -739,7 +739,7 @@ const Zr = {
739
739
  name: e.trim(),
740
740
  email: t.trim()
741
741
  };
742
- return await Q.getRequest("PUT")("/account/update", r);
742
+ return await X.getRequest("PUT")("/account/update", r);
743
743
  },
744
744
  /**
745
745
  * change current account's password
@@ -749,23 +749,23 @@ const Zr = {
749
749
  old_password: e.trim(),
750
750
  new_password: t.trim()
751
751
  };
752
- return await Q.getRequest("POST")("/account/changepassword", r);
752
+ return await X.getRequest("POST")("/account/changepassword", r);
753
753
  },
754
- create: async (e, t, r, n) => await Q.getRequest("POST")("/account/create", {
754
+ create: async (e, t, r, n) => await X.getRequest("POST")("/account/create", {
755
755
  name: e.trim(),
756
756
  email: t.trim(),
757
757
  password: r.trim(),
758
758
  role_id: n
759
759
  }),
760
- edit: async (e) => (e.reset_password || (e.new_password = void 0), await Q.getRequest("PUT")("/account/edit", e)),
760
+ edit: async (e) => (e.reset_password || (e.new_password = void 0), await X.getRequest("PUT")("/account/edit", e)),
761
761
  delete: async (e) => {
762
762
  if (e)
763
- return Q.getRequest("POST")("/account/delete", {
763
+ return X.getRequest("POST")("/account/delete", {
764
764
  id: e
765
765
  });
766
766
  }
767
- }, Xr = {
768
- list: async () => await Q.getRequest("POST")("/api/key/list", {
767
+ }, Qr = {
768
+ list: async () => await X.getRequest("POST")("/api/key/list", {
769
769
  filter: {
770
770
  search: ""
771
771
  },
@@ -778,18 +778,18 @@ const Zr = {
778
778
  pagesize: 100
779
779
  }
780
780
  }),
781
- create: async (e, t) => Q.getRequest("POST")("/api/key/create", {
781
+ create: async (e, t) => X.getRequest("POST")("/api/key/create", {
782
782
  name: e,
783
783
  role_id: t
784
784
  }),
785
785
  delete: async (e) => {
786
786
  if (e)
787
- return Q.getRequest("POST")("/api/key/delete", {
787
+ return X.getRequest("POST")("/api/key/delete", {
788
788
  id: e
789
789
  });
790
790
  }
791
- }, Qr = {
792
- list: async () => await Q.getRequest("POST")("/datasource/list", {
791
+ }, Jr = {
792
+ list: async () => await X.getRequest("POST")("/datasource/list", {
793
793
  filter: {},
794
794
  sort: [{
795
795
  field: "create_time",
@@ -800,35 +800,35 @@ const Zr = {
800
800
  pagesize: 100
801
801
  }
802
802
  }),
803
- create: async (e, t, r) => await Q.getRequest("POST")("/datasource/create", {
803
+ create: async (e, t, r) => await X.getRequest("POST")("/datasource/create", {
804
804
  type: e,
805
805
  key: t,
806
806
  config: r
807
807
  }),
808
- update: async (e, t) => await Q.getRequest("PUT")("/datasource/update", {
808
+ update: async (e, t) => await X.getRequest("PUT")("/datasource/update", {
809
809
  id: e,
810
810
  config: t
811
811
  }),
812
812
  delete: async (e) => {
813
- await Q.getRequest("POST")("/datasource/delete", {
813
+ await X.getRequest("POST")("/datasource/delete", {
814
814
  id: e
815
815
  });
816
816
  }
817
- }, Jr = {
818
- list: async () => await Q.getRequest("GET")("/role/list", {})
817
+ }, en = {
818
+ list: async () => await X.getRequest("GET")("/role/list", {})
819
819
  };
820
- var ft = {}, en = {
820
+ var ht = {}, tn = {
821
821
  get exports() {
822
- return ft;
822
+ return ht;
823
823
  },
824
824
  set exports(e) {
825
- ft = e;
825
+ ht = e;
826
826
  }
827
827
  };
828
828
  (function(e, t) {
829
829
  (function(r, n) {
830
830
  e.exports = n();
831
- })(qr, function() {
831
+ })(Hr, function() {
832
832
  var r = 1e3, n = 6e4, s = 36e5, o = "millisecond", l = "second", p = "minute", d = "hour", f = "day", b = "week", u = "month", c = "quarter", g = "year", y = "date", h = "Invalid Date", _ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, A = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, k = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(O) {
833
833
  var E = ["th", "st", "nd", "rd"], S = O % 100;
834
834
  return "[" + O + (E[(S - 20) % 10] || E[S] || E[0]) + "]";
@@ -849,37 +849,37 @@ var ft = {}, en = {
849
849
  return { M: u, y: g, w: b, d: f, D: y, h: d, m: p, s: l, ms: o, Q: c }[O] || String(O || "").toLowerCase().replace(/s$/, "");
850
850
  }, u: function(O) {
851
851
  return O === void 0;
852
- } }, oe = "en", q = {};
853
- q[oe] = k;
854
- var W = function(O) {
855
- return O instanceof H;
856
- }, X = function O(E, S, R) {
852
+ } }, ne = "en", Q = {};
853
+ Q[ne] = k;
854
+ var H = function(O) {
855
+ return O instanceof B;
856
+ }, Z = function O(E, S, R) {
857
857
  var w;
858
858
  if (!E)
859
- return oe;
859
+ return ne;
860
860
  if (typeof E == "string") {
861
861
  var x = E.toLowerCase();
862
- q[x] && (w = x), S && (q[x] = S, w = x);
862
+ Q[x] && (w = x), S && (Q[x] = S, w = x);
863
863
  var I = E.split("-");
864
864
  if (!w && I.length > 1)
865
865
  return O(I[0]);
866
866
  } else {
867
867
  var $ = E.name;
868
- q[$] = E, w = $;
868
+ Q[$] = E, w = $;
869
869
  }
870
- return !R && w && (oe = w), w || !R && oe;
871
- }, L = function(O, E) {
872
- if (W(O))
870
+ return !R && w && (ne = w), w || !R && ne;
871
+ }, F = function(O, E) {
872
+ if (H(O))
873
873
  return O.clone();
874
874
  var S = typeof E == "object" ? E : {};
875
- return S.date = O, S.args = arguments, new H(S);
876
- }, F = M;
877
- F.l = X, F.i = W, F.w = function(O, E) {
878
- return L(O, { locale: E.$L, utc: E.$u, x: E.$x, $offset: E.$offset });
875
+ return S.date = O, S.args = arguments, new B(S);
876
+ }, L = M;
877
+ L.l = Z, L.i = H, L.w = function(O, E) {
878
+ return F(O, { locale: E.$L, utc: E.$u, x: E.$x, $offset: E.$offset });
879
879
  };
880
- var H = function() {
880
+ var B = function() {
881
881
  function O(S) {
882
- this.$L = X(S.locale, null, !0), this.parse(S);
882
+ this.$L = Z(S.locale, null, !0), this.parse(S);
883
883
  }
884
884
  var E = O.prototype;
885
885
  return E.parse = function(S) {
@@ -887,7 +887,7 @@ var ft = {}, en = {
887
887
  var w = R.date, x = R.utc;
888
888
  if (w === null)
889
889
  return /* @__PURE__ */ new Date(NaN);
890
- if (F.u(w))
890
+ if (L.u(w))
891
891
  return /* @__PURE__ */ new Date();
892
892
  if (w instanceof Date)
893
893
  return new Date(w);
@@ -904,69 +904,69 @@ var ft = {}, en = {
904
904
  var S = this.$d;
905
905
  this.$y = S.getFullYear(), this.$M = S.getMonth(), this.$D = S.getDate(), this.$W = S.getDay(), this.$H = S.getHours(), this.$m = S.getMinutes(), this.$s = S.getSeconds(), this.$ms = S.getMilliseconds();
906
906
  }, E.$utils = function() {
907
- return F;
907
+ return L;
908
908
  }, E.isValid = function() {
909
909
  return this.$d.toString() !== h;
910
910
  }, E.isSame = function(S, R) {
911
- var w = L(S);
911
+ var w = F(S);
912
912
  return this.startOf(R) <= w && w <= this.endOf(R);
913
913
  }, E.isAfter = function(S, R) {
914
- return L(S) < this.startOf(R);
914
+ return F(S) < this.startOf(R);
915
915
  }, E.isBefore = function(S, R) {
916
- return this.endOf(R) < L(S);
916
+ return this.endOf(R) < F(S);
917
917
  }, E.$g = function(S, R, w) {
918
- return F.u(S) ? this[R] : this.set(w, S);
918
+ return L.u(S) ? this[R] : this.set(w, S);
919
919
  }, E.unix = function() {
920
920
  return Math.floor(this.valueOf() / 1e3);
921
921
  }, E.valueOf = function() {
922
922
  return this.$d.getTime();
923
923
  }, E.startOf = function(S, R) {
924
- var w = this, x = !!F.u(R) || R, I = F.p(S), $ = function(pe, ne) {
925
- var ue = F.w(w.$u ? Date.UTC(w.$y, ne, pe) : new Date(w.$y, ne, pe), w);
926
- return x ? ue : ue.endOf(f);
927
- }, j = function(pe, ne) {
928
- return F.w(w.toDate()[pe].apply(w.toDate("s"), (x ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(ne)), w);
929
- }, B = this.$W, K = this.$M, J = this.$D, he = "set" + (this.$u ? "UTC" : "");
924
+ var w = this, x = !!L.u(R) || R, I = L.p(S), $ = function(fe, ae) {
925
+ var de = L.w(w.$u ? Date.UTC(w.$y, ae, fe) : new Date(w.$y, ae, fe), w);
926
+ return x ? de : de.endOf(f);
927
+ }, j = function(fe, ae) {
928
+ return L.w(w.toDate()[fe].apply(w.toDate("s"), (x ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(ae)), w);
929
+ }, V = this.$W, U = this.$M, re = this.$D, ge = "set" + (this.$u ? "UTC" : "");
930
930
  switch (I) {
931
931
  case g:
932
932
  return x ? $(1, 0) : $(31, 11);
933
933
  case u:
934
- return x ? $(1, K) : $(0, K + 1);
934
+ return x ? $(1, U) : $(0, U + 1);
935
935
  case b:
936
- var de = this.$locale().weekStart || 0, ye = (B < de ? B + 7 : B) - de;
937
- return $(x ? J - ye : J + (6 - ye), K);
936
+ var ce = this.$locale().weekStart || 0, ve = (V < ce ? V + 7 : V) - ce;
937
+ return $(x ? re - ve : re + (6 - ve), U);
938
938
  case f:
939
939
  case y:
940
- return j(he + "Hours", 0);
940
+ return j(ge + "Hours", 0);
941
941
  case d:
942
- return j(he + "Minutes", 1);
942
+ return j(ge + "Minutes", 1);
943
943
  case p:
944
- return j(he + "Seconds", 2);
944
+ return j(ge + "Seconds", 2);
945
945
  case l:
946
- return j(he + "Milliseconds", 3);
946
+ return j(ge + "Milliseconds", 3);
947
947
  default:
948
948
  return this.clone();
949
949
  }
950
950
  }, E.endOf = function(S) {
951
951
  return this.startOf(S, !1);
952
952
  }, E.$set = function(S, R) {
953
- var w, x = F.p(S), I = "set" + (this.$u ? "UTC" : ""), $ = (w = {}, w[f] = I + "Date", w[y] = I + "Date", w[u] = I + "Month", w[g] = I + "FullYear", w[d] = I + "Hours", w[p] = I + "Minutes", w[l] = I + "Seconds", w[o] = I + "Milliseconds", w)[x], j = x === f ? this.$D + (R - this.$W) : R;
953
+ var w, x = L.p(S), I = "set" + (this.$u ? "UTC" : ""), $ = (w = {}, w[f] = I + "Date", w[y] = I + "Date", w[u] = I + "Month", w[g] = I + "FullYear", w[d] = I + "Hours", w[p] = I + "Minutes", w[l] = I + "Seconds", w[o] = I + "Milliseconds", w)[x], j = x === f ? this.$D + (R - this.$W) : R;
954
954
  if (x === u || x === g) {
955
- var B = this.clone().set(y, 1);
956
- B.$d[$](j), B.init(), this.$d = B.set(y, Math.min(this.$D, B.daysInMonth())).$d;
955
+ var V = this.clone().set(y, 1);
956
+ V.$d[$](j), V.init(), this.$d = V.set(y, Math.min(this.$D, V.daysInMonth())).$d;
957
957
  } else
958
958
  $ && this.$d[$](j);
959
959
  return this.init(), this;
960
960
  }, E.set = function(S, R) {
961
961
  return this.clone().$set(S, R);
962
962
  }, E.get = function(S) {
963
- return this[F.p(S)]();
963
+ return this[L.p(S)]();
964
964
  }, E.add = function(S, R) {
965
965
  var w, x = this;
966
966
  S = Number(S);
967
- var I = F.p(R), $ = function(K) {
968
- var J = L(x);
969
- return F.w(J.date(J.date() + Math.round(K * S)), x);
967
+ var I = L.p(R), $ = function(U) {
968
+ var re = F(x);
969
+ return L.w(re.date(re.date() + Math.round(U * S)), x);
970
970
  };
971
971
  if (I === u)
972
972
  return this.set(u, this.$M + S);
@@ -976,123 +976,123 @@ var ft = {}, en = {
976
976
  return $(1);
977
977
  if (I === b)
978
978
  return $(7);
979
- var j = (w = {}, w[p] = n, w[d] = s, w[l] = r, w)[I] || 1, B = this.$d.getTime() + S * j;
980
- return F.w(B, this);
979
+ var j = (w = {}, w[p] = n, w[d] = s, w[l] = r, w)[I] || 1, V = this.$d.getTime() + S * j;
980
+ return L.w(V, this);
981
981
  }, E.subtract = function(S, R) {
982
982
  return this.add(-1 * S, R);
983
983
  }, E.format = function(S) {
984
984
  var R = this, w = this.$locale();
985
985
  if (!this.isValid())
986
986
  return w.invalidDate || h;
987
- var x = S || "YYYY-MM-DDTHH:mm:ssZ", I = F.z(this), $ = this.$H, j = this.$m, B = this.$M, K = w.weekdays, J = w.months, he = w.meridiem, de = function(ne, ue, ke, Te) {
988
- return ne && (ne[ue] || ne(R, x)) || ke[ue].slice(0, Te);
989
- }, ye = function(ne) {
990
- return F.s($ % 12 || 12, ne, "0");
991
- }, pe = he || function(ne, ue, ke) {
992
- var Te = ne < 12 ? "AM" : "PM";
993
- return ke ? Te.toLowerCase() : Te;
987
+ var x = S || "YYYY-MM-DDTHH:mm:ssZ", I = L.z(this), $ = this.$H, j = this.$m, V = this.$M, U = w.weekdays, re = w.months, ge = w.meridiem, ce = function(ae, de, me, Te) {
988
+ return ae && (ae[de] || ae(R, x)) || me[de].slice(0, Te);
989
+ }, ve = function(ae) {
990
+ return L.s($ % 12 || 12, ae, "0");
991
+ }, fe = ge || function(ae, de, me) {
992
+ var Te = ae < 12 ? "AM" : "PM";
993
+ return me ? Te.toLowerCase() : Te;
994
994
  };
995
- return x.replace(A, function(ne, ue) {
996
- return ue || function(ke) {
997
- switch (ke) {
995
+ return x.replace(A, function(ae, de) {
996
+ return de || function(me) {
997
+ switch (me) {
998
998
  case "YY":
999
999
  return String(R.$y).slice(-2);
1000
1000
  case "YYYY":
1001
- return F.s(R.$y, 4, "0");
1001
+ return L.s(R.$y, 4, "0");
1002
1002
  case "M":
1003
- return B + 1;
1003
+ return V + 1;
1004
1004
  case "MM":
1005
- return F.s(B + 1, 2, "0");
1005
+ return L.s(V + 1, 2, "0");
1006
1006
  case "MMM":
1007
- return de(w.monthsShort, B, J, 3);
1007
+ return ce(w.monthsShort, V, re, 3);
1008
1008
  case "MMMM":
1009
- return de(J, B);
1009
+ return ce(re, V);
1010
1010
  case "D":
1011
1011
  return R.$D;
1012
1012
  case "DD":
1013
- return F.s(R.$D, 2, "0");
1013
+ return L.s(R.$D, 2, "0");
1014
1014
  case "d":
1015
1015
  return String(R.$W);
1016
1016
  case "dd":
1017
- return de(w.weekdaysMin, R.$W, K, 2);
1017
+ return ce(w.weekdaysMin, R.$W, U, 2);
1018
1018
  case "ddd":
1019
- return de(w.weekdaysShort, R.$W, K, 3);
1019
+ return ce(w.weekdaysShort, R.$W, U, 3);
1020
1020
  case "dddd":
1021
- return K[R.$W];
1021
+ return U[R.$W];
1022
1022
  case "H":
1023
1023
  return String($);
1024
1024
  case "HH":
1025
- return F.s($, 2, "0");
1025
+ return L.s($, 2, "0");
1026
1026
  case "h":
1027
- return ye(1);
1027
+ return ve(1);
1028
1028
  case "hh":
1029
- return ye(2);
1029
+ return ve(2);
1030
1030
  case "a":
1031
- return pe($, j, !0);
1031
+ return fe($, j, !0);
1032
1032
  case "A":
1033
- return pe($, j, !1);
1033
+ return fe($, j, !1);
1034
1034
  case "m":
1035
1035
  return String(j);
1036
1036
  case "mm":
1037
- return F.s(j, 2, "0");
1037
+ return L.s(j, 2, "0");
1038
1038
  case "s":
1039
1039
  return String(R.$s);
1040
1040
  case "ss":
1041
- return F.s(R.$s, 2, "0");
1041
+ return L.s(R.$s, 2, "0");
1042
1042
  case "SSS":
1043
- return F.s(R.$ms, 3, "0");
1043
+ return L.s(R.$ms, 3, "0");
1044
1044
  case "Z":
1045
1045
  return I;
1046
1046
  }
1047
1047
  return null;
1048
- }(ne) || I.replace(":", "");
1048
+ }(ae) || I.replace(":", "");
1049
1049
  });
1050
1050
  }, E.utcOffset = function() {
1051
1051
  return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
1052
1052
  }, E.diff = function(S, R, w) {
1053
- var x, I = this, $ = F.p(R), j = L(S), B = (j.utcOffset() - this.utcOffset()) * n, K = this - j, J = function() {
1054
- return F.m(I, j);
1053
+ var x, I = this, $ = L.p(R), j = F(S), V = (j.utcOffset() - this.utcOffset()) * n, U = this - j, re = function() {
1054
+ return L.m(I, j);
1055
1055
  };
1056
1056
  switch ($) {
1057
1057
  case g:
1058
- x = J() / 12;
1058
+ x = re() / 12;
1059
1059
  break;
1060
1060
  case u:
1061
- x = J();
1061
+ x = re();
1062
1062
  break;
1063
1063
  case c:
1064
- x = J() / 3;
1064
+ x = re() / 3;
1065
1065
  break;
1066
1066
  case b:
1067
- x = (K - B) / 6048e5;
1067
+ x = (U - V) / 6048e5;
1068
1068
  break;
1069
1069
  case f:
1070
- x = (K - B) / 864e5;
1070
+ x = (U - V) / 864e5;
1071
1071
  break;
1072
1072
  case d:
1073
- x = K / s;
1073
+ x = U / s;
1074
1074
  break;
1075
1075
  case p:
1076
- x = K / n;
1076
+ x = U / n;
1077
1077
  break;
1078
1078
  case l:
1079
- x = K / r;
1079
+ x = U / r;
1080
1080
  break;
1081
1081
  default:
1082
- x = K;
1082
+ x = U;
1083
1083
  }
1084
- return w ? x : F.a(x);
1084
+ return w ? x : L.a(x);
1085
1085
  }, E.daysInMonth = function() {
1086
1086
  return this.endOf(u).$D;
1087
1087
  }, E.$locale = function() {
1088
- return q[this.$L];
1088
+ return Q[this.$L];
1089
1089
  }, E.locale = function(S, R) {
1090
1090
  if (!S)
1091
1091
  return this.$L;
1092
- var w = this.clone(), x = X(S, R, !0);
1092
+ var w = this.clone(), x = Z(S, R, !0);
1093
1093
  return x && (w.$L = x), w;
1094
1094
  }, E.clone = function() {
1095
- return F.w(this.$d, this);
1095
+ return L.w(this.$d, this);
1096
1096
  }, E.toDate = function() {
1097
1097
  return new Date(this.valueOf());
1098
1098
  }, E.toJSON = function() {
@@ -1102,23 +1102,23 @@ var ft = {}, en = {
1102
1102
  }, E.toString = function() {
1103
1103
  return this.$d.toUTCString();
1104
1104
  }, O;
1105
- }(), re = H.prototype;
1106
- return L.prototype = re, [["$ms", o], ["$s", l], ["$m", p], ["$H", d], ["$W", f], ["$M", u], ["$y", g], ["$D", y]].forEach(function(O) {
1107
- re[O[1]] = function(E) {
1105
+ }(), te = B.prototype;
1106
+ return F.prototype = te, [["$ms", o], ["$s", l], ["$m", p], ["$H", d], ["$W", f], ["$M", u], ["$y", g], ["$D", y]].forEach(function(O) {
1107
+ te[O[1]] = function(E) {
1108
1108
  return this.$g(E, O[0], O[1]);
1109
1109
  };
1110
- }), L.extend = function(O, E) {
1111
- return O.$i || (O(E, H, L), O.$i = !0), L;
1112
- }, L.locale = X, L.isDayjs = W, L.unix = function(O) {
1113
- return L(1e3 * O);
1114
- }, L.en = q[oe], L.Ls = q, L.p = {}, L;
1110
+ }), F.extend = function(O, E) {
1111
+ return O.$i || (O(E, B, F), O.$i = !0), F;
1112
+ }, F.locale = Z, F.isDayjs = H, F.unix = function(O) {
1113
+ return F(1e3 * O);
1114
+ }, F.en = Q[ne], F.Ls = Q, F.p = {}, F;
1115
1115
  });
1116
- })(en);
1117
- const Nt = ft, tn = {
1116
+ })(tn);
1117
+ const $t = ht, rn = {
1118
1118
  list: async ({
1119
1119
  pagination: e
1120
1120
  }, t) => {
1121
- const r = await Q.getRequest("POST", t)("/sql_snippet/list", {
1121
+ const r = await X.getRequest("POST", t)("/sql_snippet/list", {
1122
1122
  sort: [{
1123
1123
  field: "update_time",
1124
1124
  order: "DESC"
@@ -1126,40 +1126,40 @@ const Nt = ft, tn = {
1126
1126
  pagination: e
1127
1127
  });
1128
1128
  return r.data.forEach((n) => {
1129
- n.create_time = Nt(n.create_time).format("YYYY-MM-DD HH:mm:ss"), n.update_time = Nt(n.update_time).format("YYYY-MM-DD HH:mm:ss");
1129
+ n.create_time = $t(n.create_time).format("YYYY-MM-DD HH:mm:ss"), n.update_time = $t(n.update_time).format("YYYY-MM-DD HH:mm:ss");
1130
1130
  }), r;
1131
1131
  },
1132
- get: async (e, t) => await Q.getRequest("POST", t)("/sql_snippet/get", {
1132
+ get: async (e, t) => await X.getRequest("POST", t)("/sql_snippet/get", {
1133
1133
  id: e
1134
1134
  }),
1135
- create: async (e, t) => await Q.getRequest("POST", t)("/sql_snippet/create", e),
1136
- update: async (e, t) => await Q.getRequest("PUT", t)("/sql_snippet/update", e),
1137
- delete: async (e, t) => Q.getRequest("POST", t)("/sql_snippet/delete", {
1135
+ create: async (e, t) => await X.getRequest("POST", t)("/sql_snippet/create", e),
1136
+ update: async (e, t) => await X.getRequest("PUT", t)("/sql_snippet/update", e),
1137
+ delete: async (e, t) => X.getRequest("POST", t)("/sql_snippet/delete", {
1138
1138
  id: e
1139
1139
  })
1140
1140
  }, se = {
1141
- datasource: Qr,
1142
- account: Zr,
1143
- role: Jr,
1144
- api_key: Xr,
1145
- sql_snippet: tn
1146
- }, ve = {
1141
+ datasource: Jr,
1142
+ account: Xr,
1143
+ role: en,
1144
+ api_key: Qr,
1145
+ sql_snippet: rn
1146
+ }, Se = {
1147
1147
  size: "sm",
1148
1148
  spacing: "md",
1149
1149
  button: {
1150
1150
  size: "xs"
1151
1151
  }
1152
1152
  };
1153
- function rn({
1153
+ function nn({
1154
1154
  submit: e,
1155
- styles: t = ve,
1155
+ styles: t = Se,
1156
1156
  type: r
1157
1157
  }) {
1158
1158
  const {
1159
1159
  control: n,
1160
1160
  setValue: s,
1161
1161
  handleSubmit: o
1162
- } = we({
1162
+ } = Ee({
1163
1163
  defaultValues: {
1164
1164
  type: r,
1165
1165
  key: "",
@@ -1172,52 +1172,52 @@ function rn({
1172
1172
  }
1173
1173
  }
1174
1174
  });
1175
- return mt(() => {
1175
+ return bt(() => {
1176
1176
  s("type", r);
1177
1177
  }, [s, r]), /* @__PURE__ */ a(le, { mx: "auto", children: /* @__PURE__ */ C("form", { onSubmit: o(e), children: [
1178
- /* @__PURE__ */ a(G, { name: "key", control: n, render: ({
1178
+ /* @__PURE__ */ a(q, { name: "key", control: n, render: ({
1179
1179
  field: l
1180
- }) => /* @__PURE__ */ a(ce, { mb: t.spacing, size: t.size, required: !0, label: "Name", placeholder: "A unique name", ...l }) }),
1181
- /* @__PURE__ */ a(Qe, { label: "Connection Info", labelPosition: "center" }),
1182
- /* @__PURE__ */ C(ee, { grow: !0, children: [
1183
- /* @__PURE__ */ a(G, { name: "config.host", control: n, render: ({
1180
+ }) => /* @__PURE__ */ a(ue, { mb: t.spacing, size: t.size, required: !0, label: "Name", placeholder: "A unique name", ...l }) }),
1181
+ /* @__PURE__ */ a(Je, { label: "Connection Info", labelPosition: "center" }),
1182
+ /* @__PURE__ */ C(J, { grow: !0, children: [
1183
+ /* @__PURE__ */ a(q, { name: "config.host", control: n, render: ({
1184
1184
  field: l
1185
- }) => /* @__PURE__ */ a(ce, { mb: t.spacing, size: t.size, required: !0, label: "Host", sx: {
1185
+ }) => /* @__PURE__ */ a(ue, { mb: t.spacing, size: t.size, required: !0, label: "Host", sx: {
1186
1186
  flexGrow: 1
1187
1187
  }, ...l }) }),
1188
- /* @__PURE__ */ a(G, { name: "config.port", control: n, render: ({
1188
+ /* @__PURE__ */ a(q, { name: "config.port", control: n, render: ({
1189
1189
  field: l
1190
1190
  }) => (
1191
1191
  // @ts-expect-error type of onChange
1192
- /* @__PURE__ */ a(Ar, { mb: t.spacing, size: t.size, required: !0, label: "Port", hideControls: !0, sx: {
1192
+ /* @__PURE__ */ a(kr, { mb: t.spacing, size: t.size, required: !0, label: "Port", hideControls: !0, sx: {
1193
1193
  width: "8em"
1194
1194
  }, ...l })
1195
1195
  ) })
1196
1196
  ] }),
1197
- /* @__PURE__ */ a(G, { name: "config.username", control: n, render: ({
1197
+ /* @__PURE__ */ a(q, { name: "config.username", control: n, render: ({
1198
1198
  field: l
1199
- }) => /* @__PURE__ */ a(ce, { mb: t.spacing, size: t.size, required: !0, label: "Username", ...l }) }),
1200
- /* @__PURE__ */ a(G, { name: "config.password", control: n, render: ({
1199
+ }) => /* @__PURE__ */ a(ue, { mb: t.spacing, size: t.size, required: !0, label: "Username", ...l }) }),
1200
+ /* @__PURE__ */ a(q, { name: "config.password", control: n, render: ({
1201
1201
  field: l
1202
- }) => /* @__PURE__ */ a(Je, { mb: t.spacing, size: t.size, required: !0, label: "Password", ...l }) }),
1203
- /* @__PURE__ */ a(G, { name: "config.database", control: n, render: ({
1202
+ }) => /* @__PURE__ */ a(et, { mb: t.spacing, size: t.size, required: !0, label: "Password", ...l }) }),
1203
+ /* @__PURE__ */ a(q, { name: "config.database", control: n, render: ({
1204
1204
  field: l
1205
- }) => /* @__PURE__ */ a(ce, { mb: t.spacing, size: t.size, required: !0, label: "Database", ...l }) }),
1206
- /* @__PURE__ */ a(ee, { position: "right", mt: t.spacing, children: /* @__PURE__ */ a(Y, { type: "submit", size: t.button.size, children: "Save" }) })
1205
+ }) => /* @__PURE__ */ a(ue, { mb: t.spacing, size: t.size, required: !0, label: "Database", ...l }) }),
1206
+ /* @__PURE__ */ a(J, { position: "right", mt: t.spacing, children: /* @__PURE__ */ a(Y, { type: "submit", size: t.button.size, children: "Save" }) })
1207
1207
  ] }) });
1208
1208
  }
1209
- const nn = ({
1209
+ const an = ({
1210
1210
  value: e,
1211
1211
  onChange: t
1212
1212
  }) => /* @__PURE__ */ a(le, { sx: {
1213
1213
  position: "relative"
1214
- }, children: /* @__PURE__ */ a(Ht, { height: "500px", defaultLanguage: "javascript", value: e, onChange: (n) => {
1214
+ }, children: /* @__PURE__ */ a(Yt, { height: "500px", defaultLanguage: "javascript", value: e, onChange: (n) => {
1215
1215
  n && t(n);
1216
1216
  }, theme: "vs-dark", options: {
1217
1217
  minimap: {
1218
1218
  enabled: !1
1219
1219
  }
1220
- } }) }), We = Xe(({
1220
+ } }) }), Ke = Qe(({
1221
1221
  value: e,
1222
1222
  onChange: t,
1223
1223
  label: r,
@@ -1228,97 +1228,97 @@ const nn = ({
1228
1228
  const [p, {
1229
1229
  setTrue: d,
1230
1230
  setFalse: f
1231
- }] = Pr(), [b, u] = Ut(e), c = () => {
1231
+ }] = zr(), [b, u] = Gt(e), c = () => {
1232
1232
  f(), t(b);
1233
1233
  }, g = () => {
1234
1234
  f(), u(e);
1235
1235
  }, y = () => {
1236
1236
  u(s);
1237
1237
  };
1238
- return mt(() => {
1238
+ return bt(() => {
1239
1239
  u(e);
1240
- }, [e]), /* @__PURE__ */ C(fe, { children: [
1240
+ }, [e]), /* @__PURE__ */ C(he, { children: [
1241
1241
  /* @__PURE__ */ a(Y, { variant: "filled", size: o.button.size, onClick: d, sx: {
1242
1242
  flexGrow: 1
1243
1243
  }, children: r }),
1244
- /* @__PURE__ */ a(_e, { size: 800, title: n, opened: p, onClose: f, closeOnClickOutside: !1, withCloseButton: !1, children: p && /* @__PURE__ */ C(Me, { children: [
1245
- /* @__PURE__ */ a(nn, { value: b, onChange: u }),
1246
- /* @__PURE__ */ C(ee, { position: "apart", children: [
1247
- /* @__PURE__ */ a(Y, { onClick: y, color: "red", leftIcon: /* @__PURE__ */ a(Ir, { size: 20 }), children: "Rest" }),
1248
- /* @__PURE__ */ C(ee, { position: "right", children: [
1244
+ /* @__PURE__ */ a(Ae, { size: 800, title: n, opened: p, onClose: f, closeOnClickOutside: !1, withCloseButton: !1, children: p && /* @__PURE__ */ C(Be, { children: [
1245
+ /* @__PURE__ */ a(an, { value: b, onChange: u }),
1246
+ /* @__PURE__ */ C(J, { position: "apart", children: [
1247
+ /* @__PURE__ */ a(Y, { onClick: y, color: "red", leftIcon: /* @__PURE__ */ a(Dr, { size: 20 }), children: "Rest" }),
1248
+ /* @__PURE__ */ C(J, { position: "right", children: [
1249
1249
  /* @__PURE__ */ a(Y, { onClick: g, variant: "subtle", children: "Cancel" }),
1250
1250
  /* @__PURE__ */ a(Y, { onClick: c, children: "OK" })
1251
1251
  ] })
1252
1252
  ] })
1253
1253
  ] }) })
1254
1254
  ] });
1255
- }), Ye = {
1255
+ }), Ve = {
1256
1256
  pre: ["function pre_process({ method, url, params, headers, data }, utils) {", " // your code goes here", " return { method, url, params, headers, data }", "}"].join(`
1257
1257
  `),
1258
1258
  post: ["function post_process(res, utils) {", " // your code goes here", " return data", "}"].join(`
1259
1259
  `)
1260
1260
  };
1261
- function an({
1261
+ function on({
1262
1262
  submit: e,
1263
- styles: t = ve
1263
+ styles: t = Se
1264
1264
  }) {
1265
1265
  const {
1266
1266
  control: r,
1267
1267
  setValue: n,
1268
1268
  handleSubmit: s
1269
- } = we({
1269
+ } = Ee({
1270
1270
  defaultValues: {
1271
1271
  type: "http",
1272
1272
  key: "",
1273
1273
  config: {
1274
1274
  host: "",
1275
1275
  processing: {
1276
- pre: Ye.pre,
1277
- post: Ye.post
1276
+ pre: Ve.pre,
1277
+ post: Ve.post
1278
1278
  }
1279
1279
  }
1280
1280
  }
1281
1281
  });
1282
1282
  return /* @__PURE__ */ a(le, { mx: "auto", children: /* @__PURE__ */ C("form", { onSubmit: s(e), children: [
1283
- /* @__PURE__ */ a(G, { name: "key", control: r, render: ({
1283
+ /* @__PURE__ */ a(q, { name: "key", control: r, render: ({
1284
1284
  field: o
1285
- }) => /* @__PURE__ */ a(ce, { mb: t.spacing, size: t.size, required: !0, label: "Name", placeholder: "A unique name", ...o }) }),
1286
- /* @__PURE__ */ a(Qe, { label: "Connection Info", labelPosition: "center" }),
1287
- /* @__PURE__ */ a(G, { name: "config.host", control: r, render: ({
1285
+ }) => /* @__PURE__ */ a(ue, { mb: t.spacing, size: t.size, required: !0, label: "Name", placeholder: "A unique name", ...o }) }),
1286
+ /* @__PURE__ */ a(Je, { label: "Connection Info", labelPosition: "center" }),
1287
+ /* @__PURE__ */ a(q, { name: "config.host", control: r, render: ({
1288
1288
  field: o
1289
- }) => /* @__PURE__ */ a(ce, { mb: t.spacing, size: t.size, required: !0, label: "Base URL", sx: {
1289
+ }) => /* @__PURE__ */ a(ue, { mb: t.spacing, size: t.size, required: !0, label: "Base URL", sx: {
1290
1290
  flexGrow: 1
1291
1291
  }, ...o }) }),
1292
- /* @__PURE__ */ C(ee, { grow: !0, children: [
1293
- /* @__PURE__ */ a(G, { name: "config.processing.pre", control: r, render: ({
1292
+ /* @__PURE__ */ C(J, { grow: !0, children: [
1293
+ /* @__PURE__ */ a(q, { name: "config.processing.pre", control: r, render: ({
1294
1294
  field: o
1295
- }) => /* @__PURE__ */ a(We, { label: "Pre Processing", modalTitle: "This function will run before sending the request (for scenarios like encryption)", defaultValue: Ye.pre, ...o, styles: t }) }),
1296
- /* @__PURE__ */ a(G, { name: "config.processing.post", control: r, render: ({
1295
+ }) => /* @__PURE__ */ a(Ke, { label: "Pre Processing", modalTitle: "This function will run before sending the request (for scenarios like encryption)", defaultValue: Ve.pre, ...o, styles: t }) }),
1296
+ /* @__PURE__ */ a(q, { name: "config.processing.post", control: r, render: ({
1297
1297
  field: o
1298
- }) => /* @__PURE__ */ a(We, { label: "Post Processing", modalTitle: "This function will run after sending the request (for scenarios like decryption)", defaultValue: Ye.post, ...o, styles: t }) })
1298
+ }) => /* @__PURE__ */ a(Ke, { label: "Post Processing", modalTitle: "This function will run after sending the request (for scenarios like decryption)", defaultValue: Ve.post, ...o, styles: t }) })
1299
1299
  ] }),
1300
- /* @__PURE__ */ a(ee, { position: "right", mt: t.spacing, children: /* @__PURE__ */ a(Y, { type: "submit", size: t.button.size, children: "Save" }) })
1300
+ /* @__PURE__ */ a(J, { position: "right", mt: t.spacing, children: /* @__PURE__ */ a(Y, { type: "submit", size: t.button.size, children: "Save" }) })
1301
1301
  ] }) });
1302
1302
  }
1303
- function on({
1304
- styles: e = ve
1303
+ function sn({
1304
+ styles: e = Se
1305
1305
  }) {
1306
- return /* @__PURE__ */ a(le, { mx: "auto", children: /* @__PURE__ */ C(kr, { mt: e.spacing, icon: /* @__PURE__ */ a(Dr, { size: 16 }), children: [
1306
+ return /* @__PURE__ */ a(le, { mx: "auto", children: /* @__PURE__ */ C(Tr, { mt: e.spacing, icon: /* @__PURE__ */ a(Lr, { size: 16 }), children: [
1307
1307
  "Only ",
1308
1308
  /* @__PURE__ */ a("b", { children: "SELECT" }),
1309
1309
  " privilege is needed."
1310
1310
  ] }) });
1311
1311
  }
1312
- function sn({
1312
+ function ln({
1313
1313
  postSubmit: e,
1314
- styles: t = ve
1314
+ styles: t = Se
1315
1315
  }) {
1316
- const [r, n] = Ut("postgresql"), s = async ({
1316
+ const [r, n] = Gt("postgresql"), s = async ({
1317
1317
  type: p,
1318
1318
  key: d,
1319
1319
  config: f
1320
1320
  }) => {
1321
- be({
1321
+ ye({
1322
1322
  id: "for-creating",
1323
1323
  title: "Pending",
1324
1324
  message: "Adding data source...",
@@ -1329,14 +1329,14 @@ function sn({
1329
1329
  type: p,
1330
1330
  key: d,
1331
1331
  config: f
1332
- }), await se.datasource.create(p, d, f), te({
1332
+ }), await se.datasource.create(p, d, f), ee({
1333
1333
  id: "for-creating",
1334
1334
  title: "Successful",
1335
1335
  message: "Data source is added",
1336
1336
  color: "green"
1337
1337
  }), e();
1338
1338
  } catch (b) {
1339
- te({
1339
+ ee({
1340
1340
  id: "for-creating",
1341
1341
  title: "Failed",
1342
1342
  message: b.message,
@@ -1345,7 +1345,7 @@ function sn({
1345
1345
  }
1346
1346
  }, o = r === "postgresql" || r === "mysql", l = r === "http";
1347
1347
  return /* @__PURE__ */ C(le, { mx: "auto", children: [
1348
- /* @__PURE__ */ a(Tr, { fullWidth: !0, mb: t.spacing, size: t.size, data: [{
1348
+ /* @__PURE__ */ a(Rr, { fullWidth: !0, mb: t.spacing, size: t.size, data: [{
1349
1349
  label: "PostgreSQL",
1350
1350
  value: "postgresql"
1351
1351
  }, {
@@ -1355,53 +1355,53 @@ function sn({
1355
1355
  label: "HTTP",
1356
1356
  value: "http"
1357
1357
  }], value: r, onChange: (p) => n(p) }),
1358
- o && /* @__PURE__ */ a(on, { styles: t }),
1359
- o && /* @__PURE__ */ a(rn, { submit: s, styles: t, type: r }),
1360
- l && /* @__PURE__ */ a(an, { submit: s, styles: t })
1358
+ o && /* @__PURE__ */ a(sn, { styles: t }),
1359
+ o && /* @__PURE__ */ a(nn, { submit: s, styles: t, type: r }),
1360
+ l && /* @__PURE__ */ a(on, { submit: s, styles: t })
1361
1361
  ] });
1362
1362
  }
1363
- function ln({
1363
+ function un({
1364
1364
  onSuccess: e,
1365
- styles: t = ve
1365
+ styles: t = Se
1366
1366
  }) {
1367
- const [r, n] = Z.useState(!1), s = () => n(!0), o = () => n(!1);
1368
- return /* @__PURE__ */ C(fe, { children: [
1369
- /* @__PURE__ */ a(_e, { overflow: "inside", opened: r, onClose: () => n(!1), title: "Add a data source", trapFocus: !0, onDragStart: (p) => {
1367
+ const [r, n] = K.useState(!1), s = () => n(!0), o = () => n(!1);
1368
+ return /* @__PURE__ */ C(he, { children: [
1369
+ /* @__PURE__ */ a(Ae, { opened: r, onClose: () => n(!1), title: "Add a data source", trapFocus: !0, onDragStart: (p) => {
1370
1370
  p.stopPropagation();
1371
- }, children: /* @__PURE__ */ a(sn, { postSubmit: () => {
1371
+ }, children: /* @__PURE__ */ a(ln, { postSubmit: () => {
1372
1372
  e(), o();
1373
1373
  }, styles: t }) }),
1374
- /* @__PURE__ */ a(Y, { size: t.button.size, onClick: s, leftIcon: /* @__PURE__ */ a(nt, { size: 20 }), children: "Add a Data Source" })
1374
+ /* @__PURE__ */ a(Y, { size: t.button.size, onClick: s, leftIcon: /* @__PURE__ */ a(at, { size: 20 }), children: "Add a Data Source" })
1375
1375
  ] });
1376
1376
  }
1377
- const un = (e) => e.replace(/([^:])(\/\/+)/g, "$1/");
1378
- function cn(e) {
1379
- mt(() => {
1380
- if (pt.__getMonacoInstance())
1377
+ const cn = (e) => e.replace(/([^:])(\/\/+)/g, "$1/");
1378
+ function dn(e) {
1379
+ bt(() => {
1380
+ if (gt.__getMonacoInstance())
1381
1381
  return;
1382
1382
  console.log("loading monaco for @devtable/settings-form");
1383
- const r = un(e);
1384
- pt.config({
1383
+ const r = cn(e);
1384
+ gt.config({
1385
1385
  paths: {
1386
1386
  vs: r
1387
1387
  }
1388
- }), pt.init().then((n) => console.log("monaco instance:", n));
1388
+ }), gt.init().then((n) => console.log("monaco instance:", n));
1389
1389
  }, []);
1390
1390
  }
1391
- function dn({
1391
+ function pn({
1392
1392
  id: e,
1393
1393
  name: t,
1394
1394
  isProtected: r,
1395
1395
  onSuccess: n,
1396
- styles: s = ve
1396
+ styles: s = Se
1397
1397
  }) {
1398
- const o = Be(), l = async () => {
1399
- e && (be({
1398
+ const o = je(), l = async () => {
1399
+ e && (ye({
1400
1400
  id: "for-deleting",
1401
1401
  title: "Pending",
1402
1402
  message: "Deleting data source...",
1403
1403
  loading: !0
1404
- }), await se.datasource.delete(e), te({
1404
+ }), await se.datasource.delete(e), ee({
1405
1405
  id: "for-deleting",
1406
1406
  title: "Successful",
1407
1407
  message: `Data source [${t}] is deleted`,
@@ -1417,62 +1417,62 @@ function dn({
1417
1417
  onCancel: () => console.log("Cancel"),
1418
1418
  onConfirm: l
1419
1419
  });
1420
- return r ? /* @__PURE__ */ a(Ve, { withArrow: !0, events: {
1420
+ return r ? /* @__PURE__ */ a(We, { withArrow: !0, events: {
1421
1421
  hover: !0,
1422
1422
  touch: !1,
1423
1423
  focus: !1
1424
- }, label: "This is a preset datasource, it can not be deleted", children: /* @__PURE__ */ a(Y, { size: s.button.size, color: "gray", variant: "light", leftIcon: /* @__PURE__ */ a(Yt, { size: 16 }), sx: {
1424
+ }, label: "This is a preset datasource, it can not be deleted", children: /* @__PURE__ */ a(Y, { size: s.button.size, color: "gray", variant: "light", leftIcon: /* @__PURE__ */ a(Vt, { size: 16 }), sx: {
1425
1425
  transform: "none !important"
1426
- }, children: "Delete" }) }) : /* @__PURE__ */ a(Y, { size: s.button.size, color: "red", onClick: p, leftIcon: /* @__PURE__ */ a(at, { size: 16 }), children: "Delete" });
1426
+ }, children: "Delete" }) }) : /* @__PURE__ */ a(Y, { size: s.button.size, color: "red", onClick: p, leftIcon: /* @__PURE__ */ a(it, { size: 16 }), children: "Delete" });
1427
1427
  }
1428
- const $t = {
1428
+ const Pt = {
1429
1429
  pre: ["function pre_process({ method, url, params, headers, data }, utils) {", " // your code goes here", " return { method, url, params, headers, data }", "}"].join(`
1430
1430
  `),
1431
1431
  post: ["function post_process(res, utils) {", " // your code goes here", " return data", "}"].join(`
1432
1432
  `)
1433
1433
  };
1434
- function pn({
1434
+ function gn({
1435
1435
  name: e,
1436
1436
  config: t,
1437
1437
  submit: r,
1438
- styles: n = ve
1438
+ styles: n = Se
1439
1439
  }) {
1440
1440
  const {
1441
1441
  control: s,
1442
1442
  handleSubmit: o
1443
- } = we({
1443
+ } = Ee({
1444
1444
  defaultValues: {
1445
1445
  config: t
1446
1446
  }
1447
1447
  });
1448
1448
  return /* @__PURE__ */ a(le, { mx: "auto", children: /* @__PURE__ */ C("form", { onSubmit: o(r), children: [
1449
- /* @__PURE__ */ a(ce, { mb: n.spacing, size: n.size, required: !0, label: "Name", value: e, readOnly: !0 }),
1450
- /* @__PURE__ */ a(Qe, { label: "Connection Info", labelPosition: "center" }),
1451
- /* @__PURE__ */ a(G, { name: "config.host", control: s, render: ({
1449
+ /* @__PURE__ */ a(ue, { mb: n.spacing, size: n.size, required: !0, label: "Name", value: e, readOnly: !0 }),
1450
+ /* @__PURE__ */ a(Je, { label: "Connection Info", labelPosition: "center" }),
1451
+ /* @__PURE__ */ a(q, { name: "config.host", control: s, render: ({
1452
1452
  field: l
1453
- }) => /* @__PURE__ */ a(ce, { mb: n.spacing, size: n.size, label: "Base URL", sx: {
1453
+ }) => /* @__PURE__ */ a(ue, { mb: n.spacing, size: n.size, label: "Base URL", sx: {
1454
1454
  flexGrow: 1
1455
1455
  }, ...l }) }),
1456
- /* @__PURE__ */ C(ee, { grow: !0, children: [
1457
- /* @__PURE__ */ a(G, { name: "config.processing.pre", control: s, render: ({
1456
+ /* @__PURE__ */ C(J, { grow: !0, children: [
1457
+ /* @__PURE__ */ a(q, { name: "config.processing.pre", control: s, render: ({
1458
1458
  field: l
1459
- }) => /* @__PURE__ */ a(We, { label: "Pre Processing", modalTitle: "This function will run before sending the request (for scenarios like encryption)", defaultValue: $t.pre, ...l, styles: n }) }),
1460
- /* @__PURE__ */ a(G, { name: "config.processing.post", control: s, render: ({
1459
+ }) => /* @__PURE__ */ a(Ke, { label: "Pre Processing", modalTitle: "This function will run before sending the request (for scenarios like encryption)", defaultValue: Pt.pre, ...l, styles: n }) }),
1460
+ /* @__PURE__ */ a(q, { name: "config.processing.post", control: s, render: ({
1461
1461
  field: l
1462
- }) => /* @__PURE__ */ a(We, { label: "Post Processing", modalTitle: "This function will run after sending the request (for scenarios like decryption)", defaultValue: $t.post, ...l, styles: n }) })
1462
+ }) => /* @__PURE__ */ a(Ke, { label: "Post Processing", modalTitle: "This function will run after sending the request (for scenarios like decryption)", defaultValue: Pt.post, ...l, styles: n }) })
1463
1463
  ] }),
1464
- /* @__PURE__ */ a(ee, { position: "right", mt: n.spacing, children: /* @__PURE__ */ a(Y, { type: "submit", size: n.button.size, children: "Save" }) })
1464
+ /* @__PURE__ */ a(J, { position: "right", mt: n.spacing, children: /* @__PURE__ */ a(Y, { type: "submit", size: n.button.size, children: "Save" }) })
1465
1465
  ] }) });
1466
1466
  }
1467
- function gn({
1467
+ function fn({
1468
1468
  dataSource: e,
1469
1469
  postSubmit: t,
1470
- styles: r = ve
1470
+ styles: r = Se
1471
1471
  }) {
1472
1472
  const n = async ({
1473
1473
  config: s
1474
1474
  }) => {
1475
- be({
1475
+ ye({
1476
1476
  id: "for-updating",
1477
1477
  title: "Pending",
1478
1478
  message: "Editing data source...",
@@ -1481,14 +1481,14 @@ function gn({
1481
1481
  try {
1482
1482
  console.log({
1483
1483
  config: s
1484
- }), await se.datasource.update(e.id, s), te({
1484
+ }), await se.datasource.update(e.id, s), ee({
1485
1485
  id: "for-updating",
1486
1486
  title: "Successful",
1487
1487
  message: "Data source is updated",
1488
1488
  color: "green"
1489
1489
  }), t();
1490
1490
  } catch (o) {
1491
- te({
1491
+ ee({
1492
1492
  id: "for-updating",
1493
1493
  title: "Failed",
1494
1494
  message: o.message,
@@ -1496,62 +1496,62 @@ function gn({
1496
1496
  });
1497
1497
  }
1498
1498
  };
1499
- return e.config ? /* @__PURE__ */ a(le, { mx: "auto", children: /* @__PURE__ */ a(pn, { name: e.key, config: e.config, submit: n, styles: r }) }) : (console.error(new Error("unexpected empty config of a http datasource")), null);
1499
+ return e.config ? /* @__PURE__ */ a(le, { mx: "auto", children: /* @__PURE__ */ a(gn, { name: e.key, config: e.config, submit: n, styles: r }) }) : (console.error(new Error("unexpected empty config of a http datasource")), null);
1500
1500
  }
1501
- function fn({
1501
+ function hn({
1502
1502
  dataSource: e,
1503
1503
  onSuccess: t,
1504
- styles: r = ve
1504
+ styles: r = Se
1505
1505
  }) {
1506
- const [n, s] = Z.useState(!1), o = () => s(!0), l = () => s(!1), p = () => {
1506
+ const [n, s] = K.useState(!1), o = () => s(!0), l = () => s(!1), p = () => {
1507
1507
  t(), l();
1508
1508
  };
1509
- return e.is_preset ? /* @__PURE__ */ a(Ve, { withArrow: !0, events: {
1509
+ return e.is_preset ? /* @__PURE__ */ a(We, { withArrow: !0, events: {
1510
1510
  hover: !0,
1511
1511
  touch: !1,
1512
1512
  focus: !1
1513
- }, label: "This is a preset datasource, it can not be changed", children: /* @__PURE__ */ a(Y, { size: r.button.size, color: "gray", variant: "light", leftIcon: /* @__PURE__ */ a(Yt, { size: 16 }), sx: {
1513
+ }, label: "This is a preset datasource, it can not be changed", children: /* @__PURE__ */ a(Y, { size: r.button.size, color: "gray", variant: "light", leftIcon: /* @__PURE__ */ a(Vt, { size: 16 }), sx: {
1514
1514
  transform: "none !important"
1515
- }, children: "Edit" }) }) : e.type !== "http" ? /* @__PURE__ */ a(Ve, { withArrow: !0, events: {
1515
+ }, children: "Edit" }) }) : e.type !== "http" ? /* @__PURE__ */ a(We, { withArrow: !0, events: {
1516
1516
  hover: !0,
1517
1517
  touch: !1,
1518
1518
  focus: !1
1519
- }, label: "Only HTTP datasources can be edited", children: /* @__PURE__ */ a(Y, { size: r.button.size, color: "gray", variant: "light", leftIcon: /* @__PURE__ */ a(gt, { size: 16 }), sx: {
1519
+ }, label: "Only HTTP datasources can be edited", children: /* @__PURE__ */ a(Y, { size: r.button.size, color: "gray", variant: "light", leftIcon: /* @__PURE__ */ a(ft, { size: 16 }), sx: {
1520
1520
  transform: "none !important"
1521
- }, children: "Edit" }) }) : /* @__PURE__ */ C(fe, { children: [
1522
- /* @__PURE__ */ a(_e, { overflow: "inside", opened: n, onClose: () => s(!1), title: "Add a data source", trapFocus: !0, onDragStart: (d) => {
1521
+ }, children: "Edit" }) }) : /* @__PURE__ */ C(he, { children: [
1522
+ /* @__PURE__ */ a(Ae, { opened: n, onClose: () => s(!1), title: "Add a data source", trapFocus: !0, onDragStart: (d) => {
1523
1523
  d.stopPropagation();
1524
- }, children: /* @__PURE__ */ a(gn, { dataSource: e, postSubmit: p, styles: r }) }),
1525
- /* @__PURE__ */ a(Y, { size: r.button.size, color: "blue", onClick: o, leftIcon: /* @__PURE__ */ a(gt, { size: 16 }), children: "Edit" })
1524
+ }, children: /* @__PURE__ */ a(fn, { dataSource: e, postSubmit: p, styles: r }) }),
1525
+ /* @__PURE__ */ a(Y, { size: r.button.size, color: "blue", onClick: o, leftIcon: /* @__PURE__ */ a(ft, { size: 16 }), children: "Edit" })
1526
1526
  ] });
1527
1527
  }
1528
- const hn = {
1528
+ const mn = {
1529
1529
  http: "HTTP",
1530
1530
  mysql: "MySQL",
1531
1531
  postgresql: "PostgreSQL"
1532
- }, mn = {
1533
- http: /* @__PURE__ */ a(Mr, {}),
1534
- mysql: /* @__PURE__ */ a(Br, {}),
1535
- postgresql: /* @__PURE__ */ a(jr, {})
1532
+ }, bn = {
1533
+ http: /* @__PURE__ */ a(Br, {}),
1534
+ mysql: /* @__PURE__ */ a(jr, {}),
1535
+ postgresql: /* @__PURE__ */ a(Ur, {})
1536
1536
  };
1537
- function bn({
1537
+ function yn({
1538
1538
  type: e
1539
1539
  }) {
1540
- return /* @__PURE__ */ C(ee, { children: [
1541
- /* @__PURE__ */ a(bt, { size: "xs", sx: {
1540
+ return /* @__PURE__ */ C(J, { children: [
1541
+ /* @__PURE__ */ a(yt, { size: "xs", sx: {
1542
1542
  transform: "none !important"
1543
- }, children: mn[e] }),
1543
+ }, children: bn[e] }),
1544
1544
  /* @__PURE__ */ a(Re, { sx: {
1545
1545
  cusor: "default",
1546
1546
  userSelect: "none"
1547
- }, children: hn[e] })
1547
+ }, children: mn[e] })
1548
1548
  ] });
1549
1549
  }
1550
- function Sa({
1551
- styles: e = ve,
1550
+ function wa({
1551
+ styles: e = Se,
1552
1552
  config: t
1553
1553
  }) {
1554
- cn(t.monacoPath), je(t);
1554
+ dn(t.monacoPath), Ue(t);
1555
1555
  const {
1556
1556
  data: r = [],
1557
1557
  loading: n,
@@ -1564,13 +1564,13 @@ function Sa({
1564
1564
  }, {
1565
1565
  refreshDeps: []
1566
1566
  });
1567
- return /* @__PURE__ */ C(fe, { children: [
1568
- /* @__PURE__ */ a(ee, { pt: e.spacing, position: "right", children: /* @__PURE__ */ a(ln, { onSuccess: s }) }),
1567
+ return /* @__PURE__ */ C(he, { children: [
1568
+ /* @__PURE__ */ a(J, { pt: e.spacing, position: "right", children: /* @__PURE__ */ a(un, { onSuccess: s }) }),
1569
1569
  /* @__PURE__ */ C(le, { mt: e.spacing, sx: {
1570
1570
  position: "relative"
1571
1571
  }, children: [
1572
- /* @__PURE__ */ a(et, { visible: n }),
1573
- /* @__PURE__ */ C(tt, { horizontalSpacing: e.spacing, verticalSpacing: e.spacing, fontSize: e.size, highlightOnHover: !0, children: [
1572
+ /* @__PURE__ */ a(tt, { visible: n }),
1573
+ /* @__PURE__ */ C(rt, { horizontalSpacing: e.spacing, verticalSpacing: e.spacing, fontSize: e.size, highlightOnHover: !0, children: [
1574
1574
  /* @__PURE__ */ a("thead", { children: /* @__PURE__ */ C("tr", { children: [
1575
1575
  /* @__PURE__ */ a("th", { children: "Type" }),
1576
1576
  /* @__PURE__ */ a("th", { children: "Name" }),
@@ -1584,11 +1584,11 @@ function Sa({
1584
1584
  is_preset: f
1585
1585
  } = o;
1586
1586
  return /* @__PURE__ */ C("tr", { children: [
1587
- /* @__PURE__ */ a("td", { width: 200, children: /* @__PURE__ */ a(bn, { type: d }) }),
1587
+ /* @__PURE__ */ a("td", { width: 200, children: /* @__PURE__ */ a(yn, { type: d }) }),
1588
1588
  /* @__PURE__ */ a("td", { children: p }),
1589
- /* @__PURE__ */ a("td", { width: 400, children: /* @__PURE__ */ C(ee, { position: "left", children: [
1590
- /* @__PURE__ */ a(fn, { dataSource: o, onSuccess: s, styles: e }),
1591
- /* @__PURE__ */ a(dn, { isProtected: f, id: l, name: p, onSuccess: s, styles: e })
1589
+ /* @__PURE__ */ a("td", { width: 400, children: /* @__PURE__ */ C(J, { position: "left", children: [
1590
+ /* @__PURE__ */ a(hn, { dataSource: o, onSuccess: s, styles: e }),
1591
+ /* @__PURE__ */ a(pn, { isProtected: f, id: l, name: p, onSuccess: s, styles: e })
1592
1592
  ] }) })
1593
1593
  ] }, p);
1594
1594
  }) })
@@ -1596,15 +1596,15 @@ function Sa({
1596
1596
  ] })
1597
1597
  ] });
1598
1598
  }
1599
- const yn = Xe(({
1599
+ const vn = Qe(({
1600
1600
  label: e,
1601
1601
  value: t,
1602
1602
  description: r,
1603
1603
  ...n
1604
- }, s) => /* @__PURE__ */ C(Me, { spacing: 2, ref: s, ...n, children: [
1604
+ }, s) => /* @__PURE__ */ C(Be, { spacing: 2, ref: s, ...n, children: [
1605
1605
  /* @__PURE__ */ a(Re, { size: "sm", children: e }),
1606
1606
  /* @__PURE__ */ a(Re, { size: "xs", color: "dimmed", className: "role-description", children: r })
1607
- ] })), yt = Xe(({
1607
+ ] })), vt = Qe(({
1608
1608
  styles: e,
1609
1609
  value: t,
1610
1610
  onChange: r
@@ -1620,7 +1620,7 @@ const yn = Xe(({
1620
1620
  })), {
1621
1621
  refreshDeps: []
1622
1622
  });
1623
- return /* @__PURE__ */ a(Rr, { ref: n, mb: e.spacing, size: e.size, required: !0, label: "Role", itemComponent: yn, data: s, disabled: o, styles: () => ({
1623
+ return /* @__PURE__ */ a(Or, { ref: n, mb: e.spacing, size: e.size, required: !0, label: "Role", itemComponent: vn, data: s, disabled: o, styles: () => ({
1624
1624
  item: {
1625
1625
  "&[data-selected]": {
1626
1626
  "&, &:hover": {
@@ -1631,22 +1631,22 @@ const yn = Xe(({
1631
1631
  }
1632
1632
  }
1633
1633
  }), value: t, onChange: r });
1634
- }), Ae = {
1634
+ }), ke = {
1635
1635
  size: "sm",
1636
1636
  spacing: "md",
1637
1637
  button: {
1638
1638
  size: "xs"
1639
1639
  }
1640
1640
  };
1641
- function vn({
1641
+ function Sn({
1642
1642
  postSubmit: e,
1643
- styles: t = Ae,
1643
+ styles: t = ke,
1644
1644
  initialRoleID: r
1645
1645
  }) {
1646
1646
  const {
1647
1647
  control: n,
1648
1648
  handleSubmit: s
1649
- } = we({
1649
+ } = Ee({
1650
1650
  defaultValues: {
1651
1651
  name: "",
1652
1652
  email: "",
@@ -1661,19 +1661,19 @@ function vn({
1661
1661
  role_id: f
1662
1662
  }) => {
1663
1663
  try {
1664
- be({
1664
+ ye({
1665
1665
  id: "for-creating",
1666
1666
  title: "Pending",
1667
1667
  message: "Adding account...",
1668
1668
  loading: !0
1669
- }), await se.account.create(l, p, d, f), te({
1669
+ }), await se.account.create(l, p, d, f), ee({
1670
1670
  id: "for-creating",
1671
1671
  title: "Successful",
1672
1672
  message: "Account is added",
1673
1673
  color: "green"
1674
1674
  }), e();
1675
1675
  } catch (b) {
1676
- te({
1676
+ ee({
1677
1677
  id: "for-creating",
1678
1678
  title: "Failed",
1679
1679
  message: b.message,
@@ -1681,59 +1681,59 @@ function vn({
1681
1681
  });
1682
1682
  }
1683
1683
  }), children: [
1684
- /* @__PURE__ */ a(G, { name: "name", control: n, render: ({
1684
+ /* @__PURE__ */ a(q, { name: "name", control: n, render: ({
1685
1685
  field: l
1686
- }) => /* @__PURE__ */ a(ce, { mb: t.spacing, size: t.size, required: !0, label: "Username", ...l }) }),
1687
- /* @__PURE__ */ a(G, { name: "email", control: n, render: ({
1686
+ }) => /* @__PURE__ */ a(ue, { mb: t.spacing, size: t.size, required: !0, label: "Username", ...l }) }),
1687
+ /* @__PURE__ */ a(q, { name: "email", control: n, render: ({
1688
1688
  field: l
1689
- }) => /* @__PURE__ */ a(ce, { mb: t.spacing, size: t.size, required: !0, label: "Email", ...l }) }),
1690
- /* @__PURE__ */ a(G, { name: "password", control: n, render: ({
1689
+ }) => /* @__PURE__ */ a(ue, { mb: t.spacing, size: t.size, required: !0, label: "Email", ...l }) }),
1690
+ /* @__PURE__ */ a(q, { name: "password", control: n, render: ({
1691
1691
  field: l
1692
- }) => /* @__PURE__ */ a(Je, { mb: t.spacing, size: t.size, required: !0, label: "Password", description: "Password must be at least 8 characters long", ...l }) }),
1693
- /* @__PURE__ */ a(G, { name: "role_id", control: n, render: ({
1692
+ }) => /* @__PURE__ */ a(et, { mb: t.spacing, size: t.size, required: !0, label: "Password", description: "Password must be at least 8 characters long", ...l }) }),
1693
+ /* @__PURE__ */ a(q, { name: "role_id", control: n, render: ({
1694
1694
  field: l
1695
- }) => /* @__PURE__ */ a(yt, { styles: t, ...l }) }),
1696
- /* @__PURE__ */ a(ee, { position: "right", mt: t.spacing, children: /* @__PURE__ */ a(Y, { type: "submit", size: t.button.size, children: "Save" }) })
1695
+ }) => /* @__PURE__ */ a(vt, { styles: t, ...l }) }),
1696
+ /* @__PURE__ */ a(J, { position: "right", mt: t.spacing, children: /* @__PURE__ */ a(Y, { type: "submit", size: t.button.size, children: "Save" }) })
1697
1697
  ] }) });
1698
1698
  }
1699
- function Sn({
1699
+ function wn({
1700
1700
  onSuccess: e,
1701
- styles: t = Ae,
1701
+ styles: t = ke,
1702
1702
  initialRoleID: r
1703
1703
  }) {
1704
- const [n, s] = Z.useState(!1), o = () => s(!0), l = () => s(!1);
1705
- return /* @__PURE__ */ C(fe, { children: [
1706
- /* @__PURE__ */ a(_e, { overflow: "inside", opened: n, onClose: () => s(!1), title: "Add an Account", trapFocus: !0, onDragStart: (d) => {
1704
+ const [n, s] = K.useState(!1), o = () => s(!0), l = () => s(!1);
1705
+ return /* @__PURE__ */ C(he, { children: [
1706
+ /* @__PURE__ */ a(Ae, { opened: n, onClose: () => s(!1), title: "Add an Account", trapFocus: !0, onDragStart: (d) => {
1707
1707
  d.stopPropagation();
1708
- }, children: /* @__PURE__ */ a(vn, { postSubmit: () => {
1708
+ }, children: /* @__PURE__ */ a(Sn, { postSubmit: () => {
1709
1709
  e(), l();
1710
1710
  }, styles: t, initialRoleID: r }) }),
1711
- /* @__PURE__ */ a(Y, { size: t.button.size, onClick: o, leftIcon: /* @__PURE__ */ a(nt, { size: 20 }), children: "Add an Account" })
1711
+ /* @__PURE__ */ a(Y, { size: t.button.size, onClick: o, leftIcon: /* @__PURE__ */ a(at, { size: 20 }), children: "Add an Account" })
1712
1712
  ] });
1713
1713
  }
1714
- function wn({
1714
+ function En({
1715
1715
  id: e,
1716
1716
  name: t,
1717
1717
  onSuccess: r,
1718
- styles: n = Ae
1718
+ styles: n = ke
1719
1719
  }) {
1720
- const s = Be(), o = async () => {
1720
+ const s = je(), o = async () => {
1721
1721
  if (e) {
1722
- be({
1722
+ ye({
1723
1723
  id: "for-deleting",
1724
1724
  title: "Pending",
1725
1725
  message: "Deleting account...",
1726
1726
  loading: !0
1727
1727
  });
1728
1728
  try {
1729
- await se.account.delete(e), te({
1729
+ await se.account.delete(e), ee({
1730
1730
  id: "for-deleting",
1731
1731
  title: "Successful",
1732
1732
  message: `Account [${t}] is deleted`,
1733
1733
  color: "green"
1734
1734
  }), r();
1735
1735
  } catch (p) {
1736
- te({
1736
+ ee({
1737
1737
  id: "for-deleting",
1738
1738
  title: "Failed",
1739
1739
  message: p.message,
@@ -1750,21 +1750,21 @@ function wn({
1750
1750
  onCancel: () => console.log("Cancel"),
1751
1751
  onConfirm: o
1752
1752
  });
1753
- return /* @__PURE__ */ a(Y, { size: n.button.size, color: "red", onClick: l, leftIcon: /* @__PURE__ */ a(at, { size: 20 }), children: "Delete" });
1753
+ return /* @__PURE__ */ a(Y, { size: n.button.size, color: "red", onClick: l, leftIcon: /* @__PURE__ */ a(it, { size: 20 }), children: "Delete" });
1754
1754
  }
1755
- function En({
1755
+ function _n({
1756
1756
  id: e,
1757
1757
  name: t,
1758
1758
  email: r,
1759
1759
  role_id: n,
1760
1760
  postSubmit: s,
1761
- styles: o = Ae
1761
+ styles: o = ke
1762
1762
  }) {
1763
1763
  const {
1764
1764
  control: l,
1765
1765
  handleSubmit: p,
1766
1766
  watch: d
1767
- } = we({
1767
+ } = Ee({
1768
1768
  defaultValues: {
1769
1769
  name: t,
1770
1770
  email: r,
@@ -1780,7 +1780,7 @@ function En({
1780
1780
  new_password: _
1781
1781
  }) => {
1782
1782
  try {
1783
- be({
1783
+ ye({
1784
1784
  id: "for-updating",
1785
1785
  title: "Pending",
1786
1786
  message: "Updating account...",
@@ -1792,14 +1792,14 @@ function En({
1792
1792
  role_id: y,
1793
1793
  reset_password: h,
1794
1794
  new_password: _.trim()
1795
- }), te({
1795
+ }), ee({
1796
1796
  id: "for-updating",
1797
1797
  title: "Successful",
1798
1798
  message: "Account is updated",
1799
1799
  color: "green"
1800
1800
  }), s();
1801
1801
  } catch (A) {
1802
- te({
1802
+ ee({
1803
1803
  id: "for-updating",
1804
1804
  title: "Failed",
1805
1805
  message: A.message,
@@ -1808,57 +1808,57 @@ function En({
1808
1808
  }
1809
1809
  }, [b, u] = d(["reset_password", "new_password"]);
1810
1810
  return /* @__PURE__ */ a(le, { mx: "auto", mb: 10, children: /* @__PURE__ */ C("form", { onSubmit: p(f), children: [
1811
- /* @__PURE__ */ a(G, { name: "name", control: l, render: ({
1811
+ /* @__PURE__ */ a(q, { name: "name", control: l, render: ({
1812
1812
  field: c
1813
- }) => /* @__PURE__ */ a(ce, { mb: o.spacing, size: o.size, required: !0, label: "Username", ...c }) }),
1814
- /* @__PURE__ */ a(G, { name: "email", control: l, render: ({
1813
+ }) => /* @__PURE__ */ a(ue, { mb: o.spacing, size: o.size, required: !0, label: "Username", ...c }) }),
1814
+ /* @__PURE__ */ a(q, { name: "email", control: l, render: ({
1815
1815
  field: c
1816
- }) => /* @__PURE__ */ a(ce, { mb: o.spacing, size: o.size, required: !0, label: "Email", ...c }) }),
1817
- /* @__PURE__ */ a(G, { name: "role_id", control: l, render: ({
1816
+ }) => /* @__PURE__ */ a(ue, { mb: o.spacing, size: o.size, required: !0, label: "Email", ...c }) }),
1817
+ /* @__PURE__ */ a(q, { name: "role_id", control: l, render: ({
1818
1818
  field: c
1819
- }) => /* @__PURE__ */ a(yt, { styles: o, ...c }) }),
1820
- /* @__PURE__ */ a(Qe, { my: 20, variant: "dashed", label: "", labelPosition: "center" }),
1821
- /* @__PURE__ */ a(G, { name: "reset_password", control: l, render: ({
1819
+ }) => /* @__PURE__ */ a(vt, { styles: o, ...c }) }),
1820
+ /* @__PURE__ */ a(Je, { my: 20, variant: "dashed", label: "", labelPosition: "center" }),
1821
+ /* @__PURE__ */ a(q, { name: "reset_password", control: l, render: ({
1822
1822
  field: c
1823
- }) => /* @__PURE__ */ a(Or, { mb: o.spacing, size: o.size, label: "Reset password", checked: c.value, onChange: (g) => c.onChange(g.currentTarget.checked), styles: {
1823
+ }) => /* @__PURE__ */ a(xr, { mb: o.spacing, size: o.size, label: "Reset password", checked: c.value, onChange: (g) => c.onChange(g.currentTarget.checked), styles: {
1824
1824
  label: {
1825
1825
  verticalAlign: "middle"
1826
1826
  }
1827
1827
  } }) }),
1828
1828
  b && /* @__PURE__ */ a(
1829
- G,
1829
+ q,
1830
1830
  {
1831
1831
  name: "new_password",
1832
1832
  control: l,
1833
1833
  render: ({
1834
1834
  field: c
1835
- }) => /* @__PURE__ */ a(Je, { autoComplete: "off", mb: o.spacing, size: o.size, required: !0, description: "Password must be at least 8 characters long", label: "New Password", ...c })
1835
+ }) => /* @__PURE__ */ a(et, { autoComplete: "off", mb: o.spacing, size: o.size, required: !0, description: "Password must be at least 8 characters long", label: "New Password", ...c })
1836
1836
  }
1837
1837
  ),
1838
- /* @__PURE__ */ a(ee, { position: "right", mt: o.spacing, children: /* @__PURE__ */ a(Y, { type: "submit", size: o.button.size, children: "Submit" }) })
1838
+ /* @__PURE__ */ a(J, { position: "right", mt: o.spacing, children: /* @__PURE__ */ a(Y, { type: "submit", size: o.button.size, children: "Submit" }) })
1839
1839
  ] }) });
1840
1840
  }
1841
- function _n({
1841
+ function An({
1842
1842
  account: e,
1843
1843
  onSuccess: t,
1844
- styles: r = Ae
1844
+ styles: r = ke
1845
1845
  }) {
1846
- const [n, s] = Z.useState(!1), o = () => s(!0), l = () => s(!1), p = () => {
1846
+ const [n, s] = K.useState(!1), o = () => s(!0), l = () => s(!1), p = () => {
1847
1847
  t(), l();
1848
1848
  };
1849
- return /* @__PURE__ */ C(fe, { children: [
1850
- /* @__PURE__ */ a(_e, { overflow: "inside", opened: n, onClose: () => s(!1), title: `Editing ${e.name}`, trapFocus: !0, onDragStart: (d) => {
1849
+ return /* @__PURE__ */ C(he, { children: [
1850
+ /* @__PURE__ */ a(Ae, { opened: n, onClose: () => s(!1), title: `Editing ${e.name}`, trapFocus: !0, onDragStart: (d) => {
1851
1851
  d.stopPropagation();
1852
- }, children: /* @__PURE__ */ a(En, { ...e, postSubmit: p, styles: r }) }),
1853
- /* @__PURE__ */ a(Y, { size: r.button.size, onClick: o, leftIcon: /* @__PURE__ */ a(Lr, { size: 20 }), children: "Edit" })
1852
+ }, children: /* @__PURE__ */ a(_n, { ...e, postSubmit: p, styles: r }) }),
1853
+ /* @__PURE__ */ a(Y, { size: r.button.size, onClick: o, leftIcon: /* @__PURE__ */ a(Fr, { size: 20 }), children: "Edit" })
1854
1854
  ] });
1855
1855
  }
1856
- function wa({
1857
- styles: e = Ae,
1856
+ function Ea({
1857
+ styles: e = ke,
1858
1858
  config: t
1859
1859
  }) {
1860
1860
  var p;
1861
- je(t);
1861
+ Ue(t);
1862
1862
  const {
1863
1863
  data: r = [],
1864
1864
  loading: n,
@@ -1881,13 +1881,13 @@ function wa({
1881
1881
  })), {
1882
1882
  refreshDeps: []
1883
1883
  });
1884
- return /* @__PURE__ */ C(fe, { children: [
1885
- /* @__PURE__ */ a(ee, { pt: e.spacing, position: "right", children: /* @__PURE__ */ a(Sn, { onSuccess: s, initialRoleID: ((p = o == null ? void 0 : o[0]) == null ? void 0 : p.value) ?? "INACTIVE" }) }),
1884
+ return /* @__PURE__ */ C(he, { children: [
1885
+ /* @__PURE__ */ a(J, { pt: e.spacing, position: "right", children: /* @__PURE__ */ a(wn, { onSuccess: s, initialRoleID: ((p = o == null ? void 0 : o[0]) == null ? void 0 : p.value) ?? "INACTIVE" }) }),
1886
1886
  /* @__PURE__ */ C(le, { mt: e.spacing, sx: {
1887
1887
  position: "relative"
1888
1888
  }, children: [
1889
- /* @__PURE__ */ a(et, { visible: n || l }),
1890
- /* @__PURE__ */ C(tt, { horizontalSpacing: e.spacing, verticalSpacing: e.spacing, fontSize: e.size, highlightOnHover: !0, children: [
1889
+ /* @__PURE__ */ a(tt, { visible: n || l }),
1890
+ /* @__PURE__ */ C(rt, { horizontalSpacing: e.spacing, verticalSpacing: e.spacing, fontSize: e.size, highlightOnHover: !0, children: [
1891
1891
  /* @__PURE__ */ a("thead", { children: /* @__PURE__ */ C("tr", { children: [
1892
1892
  /* @__PURE__ */ a("th", { children: "Username" }),
1893
1893
  /* @__PURE__ */ a("th", { children: "Email" }),
@@ -1905,9 +1905,9 @@ function wa({
1905
1905
  /* @__PURE__ */ a("td", { width: 200, children: b }),
1906
1906
  /* @__PURE__ */ a("td", { width: 200, children: u }),
1907
1907
  /* @__PURE__ */ a("td", { width: 200, children: c }),
1908
- /* @__PURE__ */ a("td", { width: 200, children: /* @__PURE__ */ C(ee, { position: "left", children: [
1909
- /* @__PURE__ */ a(_n, { account: d, onSuccess: s }),
1910
- /* @__PURE__ */ a(wn, { id: f, name: b, onSuccess: s })
1908
+ /* @__PURE__ */ a("td", { width: 200, children: /* @__PURE__ */ C(J, { position: "left", children: [
1909
+ /* @__PURE__ */ a(An, { account: d, onSuccess: s }),
1910
+ /* @__PURE__ */ a(En, { id: f, name: b, onSuccess: s })
1911
1911
  ] }) })
1912
1912
  ] }, f);
1913
1913
  }) })
@@ -1915,14 +1915,14 @@ function wa({
1915
1915
  ] })
1916
1916
  ] });
1917
1917
  }
1918
- function An({
1918
+ function kn({
1919
1919
  postSubmit: e,
1920
- styles: t = Ae
1920
+ styles: t = ke
1921
1921
  }) {
1922
1922
  const {
1923
1923
  control: r,
1924
1924
  handleSubmit: n
1925
- } = we({
1925
+ } = Ee({
1926
1926
  defaultValues: {
1927
1927
  name: "",
1928
1928
  password: ""
@@ -1933,21 +1933,21 @@ function An({
1933
1933
  password: l
1934
1934
  }) => {
1935
1935
  try {
1936
- be({
1936
+ ye({
1937
1937
  id: "for-login",
1938
1938
  title: "Pending",
1939
1939
  message: "Loggin in...",
1940
1940
  loading: !0
1941
1941
  });
1942
1942
  const p = await se.account.login(o.trim(), l.trim());
1943
- window.localStorage.setItem("token", p.token), te({
1943
+ window.localStorage.setItem("token", p.token), ee({
1944
1944
  id: "for-login",
1945
1945
  title: "Successful",
1946
1946
  message: "Logged in",
1947
1947
  color: "green"
1948
1948
  }), e(p);
1949
1949
  } catch (p) {
1950
- te({
1950
+ ee({
1951
1951
  id: "for-login",
1952
1952
  title: "Login Failed",
1953
1953
  message: p.message,
@@ -1955,40 +1955,40 @@ function An({
1955
1955
  });
1956
1956
  }
1957
1957
  }), children: [
1958
- /* @__PURE__ */ a(G, { name: "name", control: r, render: ({
1958
+ /* @__PURE__ */ a(q, { name: "name", control: r, render: ({
1959
1959
  field: o
1960
- }) => /* @__PURE__ */ a(ce, { mb: t.spacing, size: t.size, required: !0, label: "Username", ...o }) }),
1961
- /* @__PURE__ */ a(G, { name: "password", control: r, render: ({
1960
+ }) => /* @__PURE__ */ a(ue, { mb: t.spacing, size: t.size, required: !0, label: "Username", ...o }) }),
1961
+ /* @__PURE__ */ a(q, { name: "password", control: r, render: ({
1962
1962
  field: o
1963
- }) => /* @__PURE__ */ a(Je, { mb: t.spacing, size: t.size, required: !0, label: "Password", ...o }) }),
1964
- /* @__PURE__ */ a(ee, { position: "right", mt: t.spacing, children: /* @__PURE__ */ a(Y, { type: "submit", size: t.button.size, children: "Submit" }) })
1963
+ }) => /* @__PURE__ */ a(et, { mb: t.spacing, size: t.size, required: !0, label: "Password", ...o }) }),
1964
+ /* @__PURE__ */ a(J, { position: "right", mt: t.spacing, children: /* @__PURE__ */ a(Y, { type: "submit", size: t.button.size, children: "Submit" }) })
1965
1965
  ] }) });
1966
1966
  }
1967
- function Ea({
1968
- styles: e = Ae,
1967
+ function _a({
1968
+ styles: e = ke,
1969
1969
  config: t,
1970
1970
  onSuccess: r
1971
1971
  }) {
1972
- return je(t), /* @__PURE__ */ a(fe, { children: /* @__PURE__ */ a(le, { mt: e.spacing, sx: {
1972
+ return Ue(t), /* @__PURE__ */ a(he, { children: /* @__PURE__ */ a(le, { mt: e.spacing, sx: {
1973
1973
  position: "relative"
1974
- }, children: /* @__PURE__ */ a(An, { styles: e, postSubmit: r }) }) });
1974
+ }, children: /* @__PURE__ */ a(kn, { styles: e, postSubmit: r }) }) });
1975
1975
  }
1976
- const it = {
1976
+ const ot = {
1977
1977
  size: "sm",
1978
1978
  spacing: "md",
1979
1979
  button: {
1980
1980
  size: "xs"
1981
1981
  }
1982
1982
  };
1983
- function kn({
1983
+ function Tn({
1984
1984
  postSubmit: e,
1985
- styles: t = it,
1985
+ styles: t = ot,
1986
1986
  initialRoleID: r
1987
1987
  }) {
1988
1988
  const {
1989
1989
  control: n,
1990
1990
  handleSubmit: s
1991
- } = we({
1991
+ } = Ee({
1992
1992
  defaultValues: {
1993
1993
  name: "",
1994
1994
  role_id: r
@@ -1999,7 +1999,7 @@ function kn({
1999
1999
  role_id: p
2000
2000
  }) => {
2001
2001
  try {
2002
- be({
2002
+ ye({
2003
2003
  id: "for-creating",
2004
2004
  title: "Pending",
2005
2005
  message: "Adding API Key...",
@@ -2009,14 +2009,14 @@ function kn({
2009
2009
  app_id: d,
2010
2010
  app_secret: f
2011
2011
  } = await se.api_key.create(l, p);
2012
- te({
2012
+ ee({
2013
2013
  id: "for-creating",
2014
2014
  title: "Successful",
2015
2015
  message: "API Key is added",
2016
2016
  color: "green"
2017
2017
  }), e(d, f);
2018
2018
  } catch (d) {
2019
- te({
2019
+ ee({
2020
2020
  id: "for-creating",
2021
2021
  title: "Failed",
2022
2022
  message: d.message,
@@ -2024,41 +2024,41 @@ function kn({
2024
2024
  });
2025
2025
  }
2026
2026
  }), children: [
2027
- /* @__PURE__ */ a(G, { name: "name", control: n, render: ({
2027
+ /* @__PURE__ */ a(q, { name: "name", control: n, render: ({
2028
2028
  field: l
2029
- }) => /* @__PURE__ */ a(ce, { mb: t.spacing, size: t.size, required: !0, label: "Name", ...l }) }),
2030
- /* @__PURE__ */ a(G, { name: "role_id", control: n, render: ({
2029
+ }) => /* @__PURE__ */ a(ue, { mb: t.spacing, size: t.size, required: !0, label: "Name", ...l }) }),
2030
+ /* @__PURE__ */ a(q, { name: "role_id", control: n, render: ({
2031
2031
  field: l
2032
- }) => /* @__PURE__ */ a(yt, { styles: t, ...l }) }),
2033
- /* @__PURE__ */ a(ee, { position: "right", mt: t.spacing, children: /* @__PURE__ */ a(Y, { type: "submit", size: t.button.size, children: "Save" }) })
2032
+ }) => /* @__PURE__ */ a(vt, { styles: t, ...l }) }),
2033
+ /* @__PURE__ */ a(J, { position: "right", mt: t.spacing, children: /* @__PURE__ */ a(Y, { type: "submit", size: t.button.size, children: "Save" }) })
2034
2034
  ] }) });
2035
2035
  }
2036
- function Tn({
2036
+ function Rn({
2037
2037
  onSuccess: e,
2038
- styles: t = it,
2038
+ styles: t = ot,
2039
2039
  initialRoleID: r
2040
2040
  }) {
2041
- const n = Be(), [s, o] = Z.useState(!1), l = () => o(!0), p = () => o(!1);
2042
- return /* @__PURE__ */ C(fe, { children: [
2043
- /* @__PURE__ */ a(_e, { overflow: "inside", opened: s, onClose: () => o(!1), title: "Add an API Key", trapFocus: !0, onDragStart: (f) => {
2041
+ const n = je(), [s, o] = K.useState(!1), l = () => o(!0), p = () => o(!1);
2042
+ return /* @__PURE__ */ C(he, { children: [
2043
+ /* @__PURE__ */ a(Ae, { opened: s, onClose: () => o(!1), title: "Add an API Key", trapFocus: !0, onDragStart: (f) => {
2044
2044
  f.stopPropagation();
2045
- }, children: /* @__PURE__ */ a(kn, { postSubmit: (f, b) => {
2045
+ }, children: /* @__PURE__ */ a(Tn, { postSubmit: (f, b) => {
2046
2046
  p(), n.openModal({
2047
2047
  title: "API Key is generated",
2048
- children: /* @__PURE__ */ C(Me, { children: [
2048
+ children: /* @__PURE__ */ C(Be, { children: [
2049
2049
  /* @__PURE__ */ a(Re, { color: "dimmed", children: "Make sure you save it - you won't be able to access it again." }),
2050
- /* @__PURE__ */ a(ce, { defaultValue: f, disabled: !0, label: "APP ID", styles: {
2050
+ /* @__PURE__ */ a(ue, { defaultValue: f, disabled: !0, label: "APP ID", styles: {
2051
2051
  input: {
2052
2052
  cursor: "text !important"
2053
2053
  }
2054
2054
  } }),
2055
- /* @__PURE__ */ a(ce, { defaultValue: b, disabled: !0, label: "APP Secret", styles: {
2055
+ /* @__PURE__ */ a(ue, { defaultValue: b, disabled: !0, label: "APP Secret", styles: {
2056
2056
  input: {
2057
2057
  cursor: "text !important"
2058
2058
  }
2059
2059
  } }),
2060
2060
  /* @__PURE__ */ a(Y, { size: "sm", onClick: () => {
2061
- zr();
2061
+ Mr();
2062
2062
  }, children: "I've saved this API Key" })
2063
2063
  ] }),
2064
2064
  onClose: () => {
@@ -2066,32 +2066,32 @@ function Tn({
2066
2066
  }
2067
2067
  });
2068
2068
  }, styles: t, initialRoleID: r }) }),
2069
- /* @__PURE__ */ a(Y, { size: t.button.size, onClick: l, leftIcon: /* @__PURE__ */ a(nt, { size: 20 }), children: "Add an API Key" })
2069
+ /* @__PURE__ */ a(Y, { size: t.button.size, onClick: l, leftIcon: /* @__PURE__ */ a(at, { size: 20 }), children: "Add an API Key" })
2070
2070
  ] });
2071
2071
  }
2072
- function Rn({
2072
+ function On({
2073
2073
  id: e,
2074
2074
  name: t,
2075
2075
  onSuccess: r,
2076
- styles: n = it
2076
+ styles: n = ot
2077
2077
  }) {
2078
- const s = Be(), o = async () => {
2078
+ const s = je(), o = async () => {
2079
2079
  if (e) {
2080
- be({
2080
+ ye({
2081
2081
  id: "for-deleting",
2082
2082
  title: "Pending",
2083
2083
  message: "Deleting API Key...",
2084
2084
  loading: !0
2085
2085
  });
2086
2086
  try {
2087
- await se.api_key.delete(e), te({
2087
+ await se.api_key.delete(e), ee({
2088
2088
  id: "for-deleting",
2089
2089
  title: "Successful",
2090
2090
  message: `API Key [${t}] is deleted`,
2091
2091
  color: "green"
2092
2092
  }), r();
2093
2093
  } catch (p) {
2094
- te({
2094
+ ee({
2095
2095
  id: "for-deleting",
2096
2096
  title: "Failed",
2097
2097
  message: p.message,
@@ -2108,14 +2108,14 @@ function Rn({
2108
2108
  onCancel: () => console.log("Cancel"),
2109
2109
  onConfirm: o
2110
2110
  });
2111
- return /* @__PURE__ */ a(Y, { size: n.button.size, color: "red", onClick: l, leftIcon: /* @__PURE__ */ a(at, { size: 20 }), children: "Delete" });
2111
+ return /* @__PURE__ */ a(Y, { size: n.button.size, color: "red", onClick: l, leftIcon: /* @__PURE__ */ a(it, { size: 20 }), children: "Delete" });
2112
2112
  }
2113
- function _a({
2114
- styles: e = it,
2113
+ function Aa({
2114
+ styles: e = ot,
2115
2115
  config: t
2116
2116
  }) {
2117
2117
  var p;
2118
- je(t);
2118
+ Ue(t);
2119
2119
  const {
2120
2120
  data: r = [],
2121
2121
  loading: n,
@@ -2138,13 +2138,13 @@ function _a({
2138
2138
  })), {
2139
2139
  refreshDeps: []
2140
2140
  });
2141
- return /* @__PURE__ */ C(fe, { children: [
2142
- /* @__PURE__ */ a(ee, { pt: e.spacing, position: "right", children: /* @__PURE__ */ a(Tn, { onSuccess: s, initialRoleID: ((p = o == null ? void 0 : o[0]) == null ? void 0 : p.value) ?? "INACTIVE" }) }),
2141
+ return /* @__PURE__ */ C(he, { children: [
2142
+ /* @__PURE__ */ a(J, { pt: e.spacing, position: "right", children: /* @__PURE__ */ a(Rn, { onSuccess: s, initialRoleID: ((p = o == null ? void 0 : o[0]) == null ? void 0 : p.value) ?? "INACTIVE" }) }),
2143
2143
  /* @__PURE__ */ C(le, { mt: e.spacing, sx: {
2144
2144
  position: "relative"
2145
2145
  }, children: [
2146
- /* @__PURE__ */ a(et, { visible: n || l }),
2147
- /* @__PURE__ */ C(tt, { horizontalSpacing: e.spacing, verticalSpacing: e.spacing, fontSize: e.size, highlightOnHover: !0, children: [
2146
+ /* @__PURE__ */ a(tt, { visible: n || l }),
2147
+ /* @__PURE__ */ C(rt, { horizontalSpacing: e.spacing, verticalSpacing: e.spacing, fontSize: e.size, highlightOnHover: !0, children: [
2148
2148
  /* @__PURE__ */ a("thead", { children: /* @__PURE__ */ C("tr", { children: [
2149
2149
  /* @__PURE__ */ a("th", { children: "Name" }),
2150
2150
  /* @__PURE__ */ a("th", { children: "APP ID" }),
@@ -2162,14 +2162,14 @@ function _a({
2162
2162
  /* @__PURE__ */ a("td", { width: 200, children: b }),
2163
2163
  /* @__PURE__ */ a("td", { width: 200, children: u }),
2164
2164
  /* @__PURE__ */ a("td", { width: 200, children: c }),
2165
- /* @__PURE__ */ a("td", { width: 200, children: /* @__PURE__ */ a(ee, { position: "left", children: /* @__PURE__ */ a(Rn, { id: f, name: b, onSuccess: s }) }) })
2165
+ /* @__PURE__ */ a("td", { width: 200, children: /* @__PURE__ */ a(J, { position: "left", children: /* @__PURE__ */ a(On, { id: f, name: b, onSuccess: s }) }) })
2166
2166
  ] }, f);
2167
2167
  }) })
2168
2168
  ] })
2169
2169
  ] })
2170
2170
  ] });
2171
2171
  }
2172
- const Vt = ({
2172
+ const Wt = ({
2173
2173
  value: e,
2174
2174
  onChange: t,
2175
2175
  height: r = "200px",
@@ -2178,7 +2178,7 @@ const Vt = ({
2178
2178
  const s = (l) => {
2179
2179
  console.log("changing"), t == null || t(l ?? "");
2180
2180
  }, o = !t;
2181
- return /* @__PURE__ */ a(Ht, { className: "minimal-monaco-editor", height: r, defaultLanguage: n, value: e, onChange: o ? void 0 : s, theme: "vs-dark", options: {
2181
+ return /* @__PURE__ */ a(Yt, { className: "minimal-monaco-editor", height: r, defaultLanguage: n, value: e, onChange: o ? void 0 : s, theme: "vs-dark", options: {
2182
2182
  lineNumbers: "off",
2183
2183
  folding: !1,
2184
2184
  lineDecorationsWidth: 20,
@@ -2196,14 +2196,14 @@ const Vt = ({
2196
2196
  size: "xs"
2197
2197
  }
2198
2198
  };
2199
- function On({
2199
+ function xn({
2200
2200
  postSubmit: e,
2201
2201
  styles: t = De
2202
2202
  }) {
2203
2203
  const {
2204
2204
  control: r,
2205
2205
  handleSubmit: n
2206
- } = we({
2206
+ } = Ee({
2207
2207
  defaultValues: {
2208
2208
  id: "",
2209
2209
  content: ""
@@ -2211,19 +2211,19 @@ function On({
2211
2211
  });
2212
2212
  return /* @__PURE__ */ a(le, { mx: "auto", children: /* @__PURE__ */ C("form", { onSubmit: n(async (o) => {
2213
2213
  try {
2214
- be({
2214
+ ye({
2215
2215
  id: "for-creating",
2216
2216
  title: "Pending",
2217
2217
  message: "Adding SQL Snippet...",
2218
2218
  loading: !0
2219
- }), await se.sql_snippet.create(o), te({
2219
+ }), await se.sql_snippet.create(o), ee({
2220
2220
  id: "for-creating",
2221
2221
  title: "Successful",
2222
2222
  message: "SQL Snippet is added",
2223
2223
  color: "green"
2224
2224
  }), e();
2225
2225
  } catch (l) {
2226
- te({
2226
+ ee({
2227
2227
  id: "for-creating",
2228
2228
  title: "Failed",
2229
2229
  message: l.message,
@@ -2231,35 +2231,35 @@ function On({
2231
2231
  });
2232
2232
  }
2233
2233
  }), children: [
2234
- /* @__PURE__ */ a(G, { name: "id", control: r, render: ({
2234
+ /* @__PURE__ */ a(q, { name: "id", control: r, render: ({
2235
2235
  field: o
2236
- }) => /* @__PURE__ */ a(ce, { mb: t.spacing, size: t.size, required: !0, label: "Name", ...o }) }),
2237
- /* @__PURE__ */ a(G, { name: "content", control: r, render: ({
2236
+ }) => /* @__PURE__ */ a(ue, { mb: t.spacing, size: t.size, required: !0, label: "Name", ...o }) }),
2237
+ /* @__PURE__ */ a(q, { name: "content", control: r, render: ({
2238
2238
  field: o
2239
- }) => /* @__PURE__ */ C(Me, { spacing: 4, children: [
2239
+ }) => /* @__PURE__ */ C(Be, { spacing: 4, children: [
2240
2240
  /* @__PURE__ */ a(Re, { size: 14, fw: 500, color: "#212529", sx: {
2241
2241
  cursor: "default"
2242
2242
  }, children: "Content" }),
2243
- /* @__PURE__ */ a(Vt, { height: "600px", ...o })
2243
+ /* @__PURE__ */ a(Wt, { height: "600px", ...o })
2244
2244
  ] }) }),
2245
- /* @__PURE__ */ a(ee, { position: "right", mt: t.spacing, children: /* @__PURE__ */ a(Y, { type: "submit", size: t.button.size, children: "Save" }) })
2245
+ /* @__PURE__ */ a(J, { position: "right", mt: t.spacing, children: /* @__PURE__ */ a(Y, { type: "submit", size: t.button.size, children: "Save" }) })
2246
2246
  ] }) });
2247
2247
  }
2248
- function xn({
2248
+ function Cn({
2249
2249
  onSuccess: e,
2250
2250
  styles: t = De
2251
2251
  }) {
2252
- const [r, n] = Z.useState(!1), s = () => n(!0), o = () => n(!1);
2253
- return /* @__PURE__ */ C(fe, { children: [
2254
- /* @__PURE__ */ a(_e, { overflow: "inside", opened: r, onClose: () => n(!1), title: "Add a SQL Snippet", trapFocus: !0, onDragStart: (p) => {
2252
+ const [r, n] = K.useState(!1), s = () => n(!0), o = () => n(!1);
2253
+ return /* @__PURE__ */ C(he, { children: [
2254
+ /* @__PURE__ */ a(Ae, { opened: r, onClose: () => n(!1), title: "Add a SQL Snippet", trapFocus: !0, onDragStart: (p) => {
2255
2255
  p.stopPropagation();
2256
- }, size: "80vw", children: /* @__PURE__ */ a(On, { postSubmit: () => {
2256
+ }, size: "80vw", children: /* @__PURE__ */ a(xn, { postSubmit: () => {
2257
2257
  o(), e();
2258
2258
  }, styles: t }) }),
2259
- /* @__PURE__ */ a(Y, { size: t.button.size, onClick: s, leftIcon: /* @__PURE__ */ a(nt, { size: 18 }), children: "Add a SQL Snippet" })
2259
+ /* @__PURE__ */ a(Y, { size: t.button.size, onClick: s, leftIcon: /* @__PURE__ */ a(at, { size: 18 }), children: "Add a SQL Snippet" })
2260
2260
  ] });
2261
2261
  }
2262
- function Cn({
2262
+ function In({
2263
2263
  postSubmit: e,
2264
2264
  styles: t = De,
2265
2265
  id: r,
@@ -2268,7 +2268,7 @@ function Cn({
2268
2268
  const {
2269
2269
  control: s,
2270
2270
  handleSubmit: o
2271
- } = we({
2271
+ } = Ee({
2272
2272
  defaultValues: {
2273
2273
  id: r,
2274
2274
  content: n
@@ -2276,19 +2276,19 @@ function Cn({
2276
2276
  });
2277
2277
  return /* @__PURE__ */ a(le, { mx: "auto", children: /* @__PURE__ */ C("form", { onSubmit: o(async (p) => {
2278
2278
  try {
2279
- be({
2279
+ ye({
2280
2280
  id: "for-updating",
2281
2281
  title: "Pending",
2282
2282
  message: "Updating SQL Snippet...",
2283
2283
  loading: !0
2284
- }), await se.sql_snippet.update(p), te({
2284
+ }), await se.sql_snippet.update(p), ee({
2285
2285
  id: "for-updating",
2286
2286
  title: "Successful",
2287
2287
  message: "SQL Snippet is updated",
2288
2288
  color: "green"
2289
2289
  }), e();
2290
2290
  } catch (d) {
2291
- te({
2291
+ ee({
2292
2292
  id: "for-updating",
2293
2293
  title: "Failed",
2294
2294
  message: d.message,
@@ -2296,33 +2296,33 @@ function Cn({
2296
2296
  });
2297
2297
  }
2298
2298
  }), children: [
2299
- /* @__PURE__ */ a(G, { name: "id", control: s, render: ({
2299
+ /* @__PURE__ */ a(q, { name: "id", control: s, render: ({
2300
2300
  field: p
2301
- }) => /* @__PURE__ */ a(ce, { mb: t.spacing, size: t.size, required: !0, label: "Name", ...p }) }),
2302
- /* @__PURE__ */ a(G, { name: "content", control: s, render: ({
2301
+ }) => /* @__PURE__ */ a(ue, { mb: t.spacing, size: t.size, required: !0, label: "Name", ...p }) }),
2302
+ /* @__PURE__ */ a(q, { name: "content", control: s, render: ({
2303
2303
  field: p
2304
- }) => /* @__PURE__ */ C(Me, { spacing: 4, children: [
2304
+ }) => /* @__PURE__ */ C(Be, { spacing: 4, children: [
2305
2305
  /* @__PURE__ */ a(Re, { size: 14, fw: 500, color: "#212529", sx: {
2306
2306
  cursor: "default"
2307
2307
  }, children: "Content" }),
2308
- /* @__PURE__ */ a(Vt, { height: "600px", ...p })
2308
+ /* @__PURE__ */ a(Wt, { height: "600px", ...p })
2309
2309
  ] }) }),
2310
- /* @__PURE__ */ a(ee, { position: "right", mt: t.spacing, children: /* @__PURE__ */ a(Y, { type: "submit", size: t.button.size, children: "Save" }) })
2310
+ /* @__PURE__ */ a(J, { position: "right", mt: t.spacing, children: /* @__PURE__ */ a(Y, { type: "submit", size: t.button.size, children: "Save" }) })
2311
2311
  ] }) });
2312
2312
  }
2313
- function In({
2313
+ function Dn({
2314
2314
  onSuccess: e,
2315
2315
  styles: t = De,
2316
2316
  ...r
2317
2317
  }) {
2318
- const [n, s] = Z.useState(!1), o = () => s(!0), l = () => s(!1);
2319
- return /* @__PURE__ */ C(fe, { children: [
2320
- /* @__PURE__ */ a(_e, { overflow: "inside", opened: n, onClose: () => s(!1), title: "Edit a SQL Snippet", trapFocus: !0, onDragStart: (d) => {
2318
+ const [n, s] = K.useState(!1), o = () => s(!0), l = () => s(!1);
2319
+ return /* @__PURE__ */ C(he, { children: [
2320
+ /* @__PURE__ */ a(Ae, { opened: n, onClose: () => s(!1), title: "Edit a SQL Snippet", trapFocus: !0, onDragStart: (d) => {
2321
2321
  d.stopPropagation();
2322
- }, size: "80vw", children: /* @__PURE__ */ a(Cn, { postSubmit: () => {
2322
+ }, size: "80vw", children: /* @__PURE__ */ a(In, { postSubmit: () => {
2323
2323
  l(), e();
2324
2324
  }, styles: t, ...r }) }),
2325
- /* @__PURE__ */ a(Y, { size: t.button.size, onClick: o, leftIcon: /* @__PURE__ */ a(gt, { size: 18 }), children: "Edit" })
2325
+ /* @__PURE__ */ a(Y, { size: t.button.size, onClick: o, leftIcon: /* @__PURE__ */ a(ft, { size: 18 }), children: "Edit" })
2326
2326
  ] });
2327
2327
  }
2328
2328
  /**
@@ -2333,7 +2333,7 @@ function In({
2333
2333
  * @namespace
2334
2334
  * @public
2335
2335
  */
2336
- var ht = function() {
2336
+ var mt = function() {
2337
2337
  var e = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i, t = 0, r = {}, n = {
2338
2338
  /**
2339
2339
  * A namespace for utility methods.
@@ -2606,8 +2606,8 @@ var ht = function() {
2606
2606
  g.hasOwnProperty(A) || (_[A] = h[A]);
2607
2607
  }
2608
2608
  var N = y[u];
2609
- return y[u] = _, n.languages.DFS(n.languages, function(M, oe) {
2610
- oe === N && M != u && (this[M] = _);
2609
+ return y[u] = _, n.languages.DFS(n.languages, function(M, ne) {
2610
+ ne === N && M != u && (this[M] = _);
2611
2611
  }), _;
2612
2612
  },
2613
2613
  // Traverse a language definition with Depth First Search
@@ -2769,41 +2769,41 @@ var ht = function() {
2769
2769
  for (var N = 0; N < k.length; ++N) {
2770
2770
  if (_ && _.cause == A + "," + N)
2771
2771
  return;
2772
- var M = k[N], oe = M.inside, q = !!M.lookbehind, W = !!M.greedy, X = M.alias;
2773
- if (W && !M.pattern.global) {
2774
- var L = M.pattern.toString().match(/[imsuy]*$/)[0];
2775
- M.pattern = RegExp(M.pattern.source, L + "g");
2772
+ var M = k[N], ne = M.inside, Q = !!M.lookbehind, H = !!M.greedy, Z = M.alias;
2773
+ if (H && !M.pattern.global) {
2774
+ var F = M.pattern.toString().match(/[imsuy]*$/)[0];
2775
+ M.pattern = RegExp(M.pattern.source, F + "g");
2776
2776
  }
2777
- for (var F = M.pattern || M, H = y.next, re = h; H !== c.tail && !(_ && re >= _.reach); re += H.value.length, H = H.next) {
2778
- var O = H.value;
2777
+ for (var L = M.pattern || M, B = y.next, te = h; B !== c.tail && !(_ && te >= _.reach); te += B.value.length, B = B.next) {
2778
+ var O = B.value;
2779
2779
  if (c.length > u.length)
2780
2780
  return;
2781
2781
  if (!(O instanceof s)) {
2782
2782
  var E = 1, S;
2783
- if (W) {
2784
- if (S = o(F, re, u, q), !S || S.index >= u.length)
2783
+ if (H) {
2784
+ if (S = o(L, te, u, Q), !S || S.index >= u.length)
2785
2785
  break;
2786
- var I = S.index, R = S.index + S[0].length, w = re;
2787
- for (w += H.value.length; I >= w; )
2788
- H = H.next, w += H.value.length;
2789
- if (w -= H.value.length, re = w, H.value instanceof s)
2786
+ var I = S.index, R = S.index + S[0].length, w = te;
2787
+ for (w += B.value.length; I >= w; )
2788
+ B = B.next, w += B.value.length;
2789
+ if (w -= B.value.length, te = w, B.value instanceof s)
2790
2790
  continue;
2791
- for (var x = H; x !== c.tail && (w < R || typeof x.value == "string"); x = x.next)
2791
+ for (var x = B; x !== c.tail && (w < R || typeof x.value == "string"); x = x.next)
2792
2792
  E++, w += x.value.length;
2793
- E--, O = u.slice(re, w), S.index -= re;
2794
- } else if (S = o(F, 0, O, q), !S)
2793
+ E--, O = u.slice(te, w), S.index -= te;
2794
+ } else if (S = o(L, 0, O, Q), !S)
2795
2795
  continue;
2796
- var I = S.index, $ = S[0], j = O.slice(0, I), B = O.slice(I + $.length), K = re + O.length;
2797
- _ && K > _.reach && (_.reach = K);
2798
- var J = H.prev;
2799
- j && (J = d(c, J, j), re += j.length), f(c, J, E);
2800
- var he = new s(A, oe ? n.tokenize($, oe) : $, X, $);
2801
- if (H = d(c, J, he), B && d(c, H, B), E > 1) {
2802
- var de = {
2796
+ var I = S.index, $ = S[0], j = O.slice(0, I), V = O.slice(I + $.length), U = te + O.length;
2797
+ _ && U > _.reach && (_.reach = U);
2798
+ var re = B.prev;
2799
+ j && (re = d(c, re, j), te += j.length), f(c, re, E);
2800
+ var ge = new s(A, ne ? n.tokenize($, ne) : $, Z, $);
2801
+ if (B = d(c, re, ge), V && d(c, B, V), E > 1) {
2802
+ var ce = {
2803
2803
  cause: A + "," + N,
2804
- reach: K
2804
+ reach: U
2805
2805
  };
2806
- l(u, c, g, H.prev, re, de), _ && de.reach > _.reach && (_.reach = de.reach);
2806
+ l(u, c, g, B.prev, te, ce), _ && ce.reach > _.reach && (_.reach = ce.reach);
2807
2807
  }
2808
2808
  }
2809
2809
  }
@@ -2829,8 +2829,8 @@ var ht = function() {
2829
2829
  return c;
2830
2830
  }
2831
2831
  return n;
2832
- }(), m = ht;
2833
- ht.default = ht;
2832
+ }(), m = mt;
2833
+ mt.default = mt;
2834
2834
  m.languages.markup = {
2835
2835
  comment: {
2836
2836
  pattern: /<!--(?:(?!<!--)[\s\S])*?-->/,
@@ -4281,40 +4281,40 @@ m.languages.sql = {
4281
4281
  pattern: RegExp(o),
4282
4282
  lookbehind: !0
4283
4283
  }
4284
- }), A = 0, k = {}, N = _.map(function(W) {
4285
- if (typeof W == "string")
4286
- return W;
4287
- for (var X = W.content, L; g.indexOf(L = p(A++, h)) !== -1; )
4284
+ }), A = 0, k = {}, N = _.map(function(H) {
4285
+ if (typeof H == "string")
4286
+ return H;
4287
+ for (var Z = H.content, F; g.indexOf(F = p(A++, h)) !== -1; )
4288
4288
  ;
4289
- return k[L] = X, L;
4290
- }).join(""), M = d(N, y, h), oe = Object.keys(k);
4289
+ return k[F] = Z, F;
4290
+ }).join(""), M = d(N, y, h), ne = Object.keys(k);
4291
4291
  A = 0;
4292
- function q(W) {
4293
- for (var X = 0; X < W.length; X++) {
4294
- if (A >= oe.length)
4292
+ function Q(H) {
4293
+ for (var Z = 0; Z < H.length; Z++) {
4294
+ if (A >= ne.length)
4295
4295
  return;
4296
- var L = W[X];
4297
- if (typeof L == "string" || typeof L.content == "string") {
4298
- var F = oe[A], H = typeof L == "string" ? L : (
4296
+ var F = H[Z];
4297
+ if (typeof F == "string" || typeof F.content == "string") {
4298
+ var L = ne[A], B = typeof F == "string" ? F : (
4299
4299
  /** @type {string} */
4300
- L.content
4301
- ), re = H.indexOf(F);
4302
- if (re !== -1) {
4300
+ F.content
4301
+ ), te = B.indexOf(L);
4302
+ if (te !== -1) {
4303
4303
  ++A;
4304
- var O = H.substring(0, re), E = f(k[F]), S = H.substring(re + F.length), R = [];
4304
+ var O = B.substring(0, te), E = f(k[L]), S = B.substring(te + L.length), R = [];
4305
4305
  if (O && R.push(O), R.push(E), S) {
4306
4306
  var w = [S];
4307
- q(w), R.push.apply(R, w);
4307
+ Q(w), R.push.apply(R, w);
4308
4308
  }
4309
- typeof L == "string" ? (W.splice.apply(W, [X, 1].concat(R)), X += R.length - 1) : L.content = R;
4309
+ typeof F == "string" ? (H.splice.apply(H, [Z, 1].concat(R)), Z += R.length - 1) : F.content = R;
4310
4310
  }
4311
4311
  } else {
4312
- var x = L.content;
4313
- Array.isArray(x) ? q(x) : q([x]);
4312
+ var x = F.content;
4313
+ Array.isArray(x) ? Q(x) : Q([x]);
4314
4314
  }
4315
4315
  }
4316
4316
  }
4317
- return q(M), new e.Token(h, M, "language-" + h, g);
4317
+ return Q(M), new e.Token(h, M, "language-" + h, g);
4318
4318
  }
4319
4319
  var u = {
4320
4320
  javascript: !0,
@@ -4339,10 +4339,10 @@ m.languages.sql = {
4339
4339
  if (k.type === "template-string") {
4340
4340
  var M = N[1];
4341
4341
  if (N.length === 3 && typeof M != "string" && M.type === "embedded-code") {
4342
- var oe = c(M), q = M.alias, W = Array.isArray(q) ? q[0] : q, X = e.languages[W];
4343
- if (!X)
4342
+ var ne = c(M), Q = M.alias, H = Array.isArray(Q) ? Q[0] : Q, Z = e.languages[H];
4343
+ if (!Z)
4344
4344
  continue;
4345
- N[1] = b(oe, X, W);
4345
+ N[1] = b(ne, Z, H);
4346
4346
  }
4347
4347
  } else
4348
4348
  y(N);
@@ -5298,8 +5298,8 @@ m.languages.wasm = {
5298
5298
  number: /[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/,
5299
5299
  punctuation: /[()]/
5300
5300
  };
5301
- const Dn = m;
5302
- var Ln = {
5301
+ const Ln = m;
5302
+ var Fn = {
5303
5303
  plain: {
5304
5304
  backgroundColor: "#2a2734",
5305
5305
  color: "#9a86fd"
@@ -5366,11 +5366,11 @@ var Ln = {
5366
5366
  }
5367
5367
  }]
5368
5368
  };
5369
- const Fn = Ln;
5370
- var Nn = {
5369
+ const Nn = Fn;
5370
+ var $n = {
5371
5371
  // $FlowFixMe
5372
- Prism: Dn,
5373
- theme: Fn
5372
+ Prism: Ln,
5373
+ theme: Nn
5374
5374
  };
5375
5375
  function $e(e, t, r) {
5376
5376
  return t in e ? Object.defineProperty(e, t, {
@@ -5380,17 +5380,17 @@ function $e(e, t, r) {
5380
5380
  writable: !0
5381
5381
  }) : e[t] = r, e;
5382
5382
  }
5383
- function Ee() {
5384
- return Ee = Object.assign || function(e) {
5383
+ function _e() {
5384
+ return _e = Object.assign || function(e) {
5385
5385
  for (var t = 1; t < arguments.length; t++) {
5386
5386
  var r = arguments[t];
5387
5387
  for (var n in r)
5388
5388
  Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
5389
5389
  }
5390
5390
  return e;
5391
- }, Ee.apply(this, arguments);
5391
+ }, _e.apply(this, arguments);
5392
5392
  }
5393
- var $n = /\r\n|\r|\n/, Pt = function(e) {
5393
+ var Pn = /\r\n|\r|\n/, zt = function(e) {
5394
5394
  e.length === 0 ? e.push({
5395
5395
  types: ["plain"],
5396
5396
  content: `
@@ -5398,50 +5398,50 @@ var $n = /\r\n|\r|\n/, Pt = function(e) {
5398
5398
  empty: !0
5399
5399
  }) : e.length === 1 && e[0].content === "" && (e[0].content = `
5400
5400
  `, e[0].empty = !0);
5401
- }, zt = function(e, t) {
5401
+ }, Mt = function(e, t) {
5402
5402
  var r = e.length;
5403
5403
  return r > 0 && e[r - 1] === t ? e : e.concat(t);
5404
- }, Pn = function(e) {
5404
+ }, zn = function(e) {
5405
5405
  for (var t = [[]], r = [e], n = [0], s = [e.length], o = 0, l = 0, p = [], d = [p]; l > -1; ) {
5406
5406
  for (; (o = n[l]++) < s[l]; ) {
5407
5407
  var f = void 0, b = t[l], u = r[l], c = u[o];
5408
- if (typeof c == "string" ? (b = l > 0 ? b : ["plain"], f = c) : (b = zt(b, c.type), c.alias && (b = zt(b, c.alias)), f = c.content), typeof f != "string") {
5408
+ if (typeof c == "string" ? (b = l > 0 ? b : ["plain"], f = c) : (b = Mt(b, c.type), c.alias && (b = Mt(b, c.alias)), f = c.content), typeof f != "string") {
5409
5409
  l++, t.push(b), r.push(f), n.push(0), s.push(f.length);
5410
5410
  continue;
5411
5411
  }
5412
- var g = f.split($n), y = g.length;
5412
+ var g = f.split(Pn), y = g.length;
5413
5413
  p.push({
5414
5414
  types: b,
5415
5415
  content: g[0]
5416
5416
  });
5417
5417
  for (var h = 1; h < y; h++)
5418
- Pt(p), d.push(p = []), p.push({
5418
+ zt(p), d.push(p = []), p.push({
5419
5419
  types: b,
5420
5420
  content: g[h]
5421
5421
  });
5422
5422
  }
5423
5423
  l--, t.pop(), r.pop(), n.pop(), s.pop();
5424
5424
  }
5425
- return Pt(p), d;
5426
- }, zn = function(e, t) {
5425
+ return zt(p), d;
5426
+ }, Mn = function(e, t) {
5427
5427
  var r = e.plain, n = /* @__PURE__ */ Object.create(null), s = e.styles.reduce(function(o, l) {
5428
5428
  var p = l.languages, d = l.style;
5429
5429
  return p && !p.includes(t) || l.types.forEach(function(f) {
5430
- var b = Ee({}, o[f], d);
5430
+ var b = _e({}, o[f], d);
5431
5431
  o[f] = b;
5432
5432
  }), o;
5433
5433
  }, n);
5434
- return s.root = r, s.plain = Ee({}, r, {
5434
+ return s.root = r, s.plain = _e({}, r, {
5435
5435
  backgroundColor: null
5436
5436
  }), s;
5437
5437
  };
5438
- function Mt(e, t) {
5438
+ function Bt(e, t) {
5439
5439
  var r = {};
5440
5440
  for (var n in e)
5441
5441
  Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) === -1 && (r[n] = e[n]);
5442
5442
  return r;
5443
5443
  }
5444
- var Mn = /* @__PURE__ */ function(e) {
5444
+ var Bn = /* @__PURE__ */ function(e) {
5445
5445
  function t() {
5446
5446
  for (var r = this, n = [], s = arguments.length; s--; )
5447
5447
  n[s] = arguments[s];
@@ -5449,15 +5449,15 @@ var Mn = /* @__PURE__ */ function(e) {
5449
5449
  if (r.themeDict !== void 0 && o.theme === r.prevTheme && o.language === r.prevLanguage)
5450
5450
  return r.themeDict;
5451
5451
  r.prevTheme = o.theme, r.prevLanguage = o.language;
5452
- var l = o.theme ? zn(o.theme, o.language) : void 0;
5452
+ var l = o.theme ? Mn(o.theme, o.language) : void 0;
5453
5453
  return r.themeDict = l;
5454
5454
  }), $e(this, "getLineProps", function(o) {
5455
- var l = o.key, p = o.className, d = o.style, f = Mt(o, ["key", "className", "style", "line"]), b = f, u = Ee({}, b, {
5455
+ var l = o.key, p = o.className, d = o.style, f = Bt(o, ["key", "className", "style", "line"]), b = f, u = _e({}, b, {
5456
5456
  className: "token-line",
5457
5457
  style: void 0,
5458
5458
  key: void 0
5459
5459
  }), c = r.getThemeDict(r.props);
5460
- return c !== void 0 && (u.style = c.plain), d !== void 0 && (u.style = u.style !== void 0 ? Ee({}, u.style, d) : d), l !== void 0 && (u.key = l), p && (u.className += " " + p), u;
5460
+ return c !== void 0 && (u.style = c.plain), d !== void 0 && (u.style = u.style !== void 0 ? _e({}, u.style, d) : d), l !== void 0 && (u.key = l), p && (u.className += " " + p), u;
5461
5461
  }), $e(this, "getStyleForToken", function(o) {
5462
5462
  var l = o.types, p = o.empty, d = l.length, f = r.getThemeDict(r.props);
5463
5463
  if (f !== void 0) {
@@ -5477,13 +5477,13 @@ var Mn = /* @__PURE__ */ function(e) {
5477
5477
  return Object.assign.apply(Object, [b].concat(u));
5478
5478
  }
5479
5479
  }), $e(this, "getTokenProps", function(o) {
5480
- var l = o.key, p = o.className, d = o.style, f = o.token, b = Mt(o, ["key", "className", "style", "token"]), u = b, c = Ee({}, u, {
5480
+ var l = o.key, p = o.className, d = o.style, f = o.token, b = Bt(o, ["key", "className", "style", "token"]), u = b, c = _e({}, u, {
5481
5481
  className: "token " + f.types.join(" "),
5482
5482
  children: f.content,
5483
5483
  style: r.getStyleForToken(f),
5484
5484
  key: void 0
5485
5485
  });
5486
- return d !== void 0 && (c.style = c.style !== void 0 ? Ee({}, c.style, d) : d), l !== void 0 && (c.key = l), p && (c.className += " " + p), c;
5486
+ return d !== void 0 && (c.style = c.style !== void 0 ? _e({}, c.style, d) : d), l !== void 0 && (c.key = l), p && (c.className += " " + p), c;
5487
5487
  }), $e(this, "tokenize", function(o, l, p, d) {
5488
5488
  var f = {
5489
5489
  code: l,
@@ -5497,7 +5497,7 @@ var Mn = /* @__PURE__ */ function(e) {
5497
5497
  });
5498
5498
  }
5499
5499
  return e && (t.__proto__ = e), t.prototype = Object.create(e && e.prototype), t.prototype.constructor = t, t.prototype.render = function() {
5500
- var n = this.props, s = n.Prism, o = n.language, l = n.code, p = n.children, d = this.getThemeDict(this.props), f = s.languages[o], b = f !== void 0 ? this.tokenize(s, l, f, o) : [l], u = Pn(b);
5500
+ var n = this.props, s = n.Prism, o = n.language, l = n.code, p = n.children, d = this.getThemeDict(this.props), f = s.languages[o], b = f !== void 0 ? this.tokenize(s, l, f, o) : [l], u = zn(b);
5501
5501
  return p({
5502
5502
  tokens: u,
5503
5503
  className: "prism-code language-" + o,
@@ -5506,29 +5506,28 @@ var Mn = /* @__PURE__ */ function(e) {
5506
5506
  getTokenProps: this.getTokenProps
5507
5507
  });
5508
5508
  }, t;
5509
- }(_r);
5510
- const Bn = Mn;
5511
- function Wt({ copied: e }) {
5512
- return /* @__PURE__ */ Z.createElement("svg", {
5513
- width: "15",
5514
- height: "15",
5509
+ }(Ar);
5510
+ const jn = Bn;
5511
+ function Kt({ copied: e }) {
5512
+ return /* @__PURE__ */ K.createElement("svg", {
5515
5513
  viewBox: "0 0 15 15",
5516
5514
  fill: "none",
5517
- xmlns: "http://www.w3.org/2000/svg"
5518
- }, e ? /* @__PURE__ */ Z.createElement("path", {
5515
+ xmlns: "http://www.w3.org/2000/svg",
5516
+ style: { width: "1rem", height: "1rem" }
5517
+ }, e ? /* @__PURE__ */ K.createElement("path", {
5519
5518
  d: "M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",
5520
5519
  fill: "currentColor",
5521
5520
  fillRule: "evenodd",
5522
5521
  clipRule: "evenodd"
5523
- }) : /* @__PURE__ */ Z.createElement("path", {
5522
+ }) : /* @__PURE__ */ K.createElement("path", {
5524
5523
  d: "M5 2V1H10V2H5ZM4.75 0C4.33579 0 4 0.335786 4 0.75V1H3.5C2.67157 1 2 1.67157 2 2.5V12.5C2 13.3284 2.67157 14 3.5 14H11.5C12.3284 14 13 13.3284 13 12.5V2.5C13 1.67157 12.3284 1 11.5 1H11V0.75C11 0.335786 10.6642 0 10.25 0H4.75ZM11 2V2.25C11 2.66421 10.6642 3 10.25 3H4.75C4.33579 3 4 2.66421 4 2.25V2H3.5C3.22386 2 3 2.22386 3 2.5V12.5C3 12.7761 3.22386 13 3.5 13H11.5C11.7761 13 12 12.7761 12 12.5V2.5C12 2.22386 11.7761 2 11.5 2H11Z",
5525
5524
  fill: "currentColor",
5526
5525
  fillRule: "evenodd",
5527
5526
  clipRule: "evenodd"
5528
5527
  }));
5529
5528
  }
5530
- Wt.displayName = "@mantine/prism/CopyIcon";
5531
- const jn = (e) => ({
5529
+ Kt.displayName = "@mantine/prism/CopyIcon";
5530
+ const Un = (e) => ({
5532
5531
  plain: {
5533
5532
  color: e.colors.gray[4],
5534
5533
  backgroundColor: e.colors.dark[8]
@@ -5613,7 +5612,7 @@ const jn = (e) => ({
5613
5612
  }
5614
5613
  }
5615
5614
  ]
5616
- }), Un = (e) => ({
5615
+ }), Gn = (e) => ({
5617
5616
  plain: {
5618
5617
  color: e.colors.gray[9],
5619
5618
  backgroundColor: e.fn.rgba(e.colors.gray[0], 0.65)
@@ -5704,8 +5703,8 @@ const jn = (e) => ({
5704
5703
  }
5705
5704
  }
5706
5705
  ]
5707
- }), Gn = (e, t) => t === "dark" ? jn(e) : Un(e);
5708
- var qn = Gt((e, { colorScheme: t, native: r, maxLineSize: n, radius: s }) => ({
5706
+ }), qn = (e, t) => t === "dark" ? Un(e) : Gn(e);
5707
+ var Hn = qt((e, { colorScheme: t, native: r, maxLineSize: n, radius: s }) => ({
5709
5708
  scrollArea: {},
5710
5709
  root: {
5711
5710
  position: "relative"
@@ -5715,12 +5714,14 @@ var qn = Gt((e, { colorScheme: t, native: r, maxLineSize: n, radius: s }) => ({
5715
5714
  position: "relative",
5716
5715
  fontFamily: e.fontFamilyMonospace,
5717
5716
  lineHeight: 1.7,
5718
- fontSize: 13,
5717
+ fontSize: ze(13),
5719
5718
  overflowX: r ? "auto" : void 0,
5720
5719
  borderRadius: e.fn.radius(s),
5721
- padding: `${e.spacing.sm}px 0`,
5722
- marginTop: 0,
5723
- marginBottom: 0
5720
+ padding: `${e.spacing.sm} 0`,
5721
+ "&.mantine-Prism-code": {
5722
+ marginTop: 0,
5723
+ marginBottom: 0
5724
+ }
5724
5725
  },
5725
5726
  copy: {
5726
5727
  position: "absolute",
@@ -5735,12 +5736,12 @@ var qn = Gt((e, { colorScheme: t, native: r, maxLineSize: n, radius: s }) => ({
5735
5736
  line: {
5736
5737
  display: "flex",
5737
5738
  width: "100%",
5738
- padding: `0 ${e.spacing.md}px`
5739
+ padding: `0 ${e.spacing.md}`
5739
5740
  },
5740
5741
  lineNumber: {
5741
5742
  color: t === "dark" ? e.colors.dark[4] : e.colors.gray[4],
5742
5743
  textAlign: "right",
5743
- width: 8 * n,
5744
+ width: `calc(8 * ${ze(n)})`,
5744
5745
  marginRight: e.dir === "ltr" ? e.spacing.xs : void 0,
5745
5746
  marginLeft: e.dir === "rtl" ? e.spacing.xs : void 0,
5746
5747
  userSelect: "none"
@@ -5749,34 +5750,34 @@ var qn = Gt((e, { colorScheme: t, native: r, maxLineSize: n, radius: s }) => ({
5749
5750
  width: "100%"
5750
5751
  }
5751
5752
  }));
5752
- const Hn = qn;
5753
- var Yn = Object.defineProperty, Vn = Object.defineProperties, Wn = Object.getOwnPropertyDescriptors, Ke = Object.getOwnPropertySymbols, Kt = Object.prototype.hasOwnProperty, Zt = Object.prototype.propertyIsEnumerable, Bt = (e, t, r) => t in e ? Yn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, Ie = (e, t) => {
5753
+ const Yn = Hn;
5754
+ var Vn = Object.defineProperty, Wn = Object.defineProperties, Kn = Object.getOwnPropertyDescriptors, Ze = Object.getOwnPropertySymbols, Zt = Object.prototype.hasOwnProperty, Xt = Object.prototype.propertyIsEnumerable, jt = (e, t, r) => t in e ? Vn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, Ie = (e, t) => {
5754
5755
  for (var r in t || (t = {}))
5755
- Kt.call(t, r) && Bt(e, r, t[r]);
5756
- if (Ke)
5757
- for (var r of Ke(t))
5758
- Zt.call(t, r) && Bt(e, r, t[r]);
5756
+ Zt.call(t, r) && jt(e, r, t[r]);
5757
+ if (Ze)
5758
+ for (var r of Ze(t))
5759
+ Xt.call(t, r) && jt(e, r, t[r]);
5759
5760
  return e;
5760
- }, Pe = (e, t) => Vn(e, Wn(t)), Kn = (e, t) => {
5761
+ }, Pe = (e, t) => Wn(e, Kn(t)), Zn = (e, t) => {
5761
5762
  var r = {};
5762
5763
  for (var n in e)
5763
- Kt.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
5764
- if (e != null && Ke)
5765
- for (var n of Ke(e))
5766
- t.indexOf(n) < 0 && Zt.call(e, n) && (r[n] = e[n]);
5764
+ Zt.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
5765
+ if (e != null && Ze)
5766
+ for (var n of Ze(e))
5767
+ t.indexOf(n) < 0 && Xt.call(e, n) && (r[n] = e[n]);
5767
5768
  return r;
5768
5769
  };
5769
- const Zn = {
5770
+ const Xn = {
5770
5771
  noCopy: !1,
5771
5772
  copyLabel: "Copy code",
5772
5773
  copiedLabel: "Copied",
5773
5774
  withLineNumbers: !1,
5774
5775
  trim: !0,
5775
5776
  highlightLines: {},
5776
- scrollAreaComponent: qt,
5777
- getPrismTheme: Gn
5778
- }, vt = Xe((e, t) => {
5779
- const r = xr("Prism", Zn, e), {
5777
+ scrollAreaComponent: Ht,
5778
+ getPrismTheme: qn
5779
+ }, St = Qe((e, t) => {
5780
+ const r = Cr("Prism", Xn, e), {
5780
5781
  className: n,
5781
5782
  children: s,
5782
5783
  language: o,
@@ -5792,8 +5793,9 @@ const Zn = {
5792
5793
  trim: h,
5793
5794
  unstyled: _,
5794
5795
  radius: A,
5795
- getPrismTheme: k
5796
- } = r, N = Kn(r, [
5796
+ getPrismTheme: k,
5797
+ variant: N
5798
+ } = r, M = Zn(r, [
5797
5799
  "className",
5798
5800
  "children",
5799
5801
  "language",
@@ -5809,85 +5811,86 @@ const Zn = {
5809
5811
  "trim",
5810
5812
  "unstyled",
5811
5813
  "radius",
5812
- "getPrismTheme"
5813
- ]), M = h && typeof s == "string" ? s.trim() : s, oe = M.split(`
5814
- `).length.toString().length, q = Cr(), W = Gr(), X = y || q.colorScheme, { classes: L, cx: F } = Hn({
5815
- colorScheme: X,
5816
- native: g !== qt,
5817
- maxLineSize: oe,
5814
+ "getPrismTheme",
5815
+ "variant"
5816
+ ]), ne = h && typeof s == "string" ? s.trim() : s, Q = ne.split(`
5817
+ `).length.toString().length, H = Ir(), Z = qr(), F = y || H.colorScheme, { classes: L, cx: B } = Yn({
5818
+ colorScheme: F,
5819
+ native: g !== Ht,
5820
+ maxLineSize: Q,
5818
5821
  radius: A
5819
- }, { classNames: p, styles: d, unstyled: _, name: "Prism" });
5820
- return /* @__PURE__ */ Z.createElement(le, Pe(Ie({
5821
- className: F(L.root, n),
5822
+ }, { name: "Prism", classNames: p, styles: d, unstyled: _, variant: N });
5823
+ return /* @__PURE__ */ K.createElement(le, Pe(Ie({
5824
+ className: B(L.root, n),
5822
5825
  ref: t
5823
- }, N), {
5826
+ }, M), {
5824
5827
  translate: "no"
5825
- }), !l && /* @__PURE__ */ Z.createElement(Ve, {
5826
- label: W.copied ? b : f,
5828
+ }), !l && /* @__PURE__ */ K.createElement(We, {
5829
+ label: Z.copied ? b : f,
5827
5830
  position: "left",
5828
5831
  withArrow: !0,
5829
5832
  arrowSize: 6,
5830
5833
  offset: 6,
5831
- color: W.copied ? "teal" : void 0,
5834
+ color: Z.copied ? "teal" : void 0,
5832
5835
  unstyled: _
5833
- }, /* @__PURE__ */ Z.createElement(bt, {
5836
+ }, /* @__PURE__ */ K.createElement(yt, {
5834
5837
  className: L.copy,
5835
- "aria-label": W.copied ? b : f,
5836
- onClick: () => W.copy(M),
5838
+ "aria-label": Z.copied ? b : f,
5839
+ onClick: () => Z.copy(ne),
5837
5840
  unstyled: _
5838
- }, /* @__PURE__ */ Z.createElement(Wt, {
5839
- copied: W.copied
5840
- }))), /* @__PURE__ */ Z.createElement(Bn, Pe(Ie({}, Nn), {
5841
- theme: k(q, X),
5842
- code: M,
5841
+ }, /* @__PURE__ */ K.createElement(Kt, {
5842
+ copied: Z.copied
5843
+ }))), /* @__PURE__ */ K.createElement(jn, Pe(Ie({}, $n), {
5844
+ theme: k(H, F),
5845
+ code: ne,
5843
5846
  language: o
5844
5847
  }), ({
5845
- className: H,
5846
- style: re,
5847
- tokens: O,
5848
- getLineProps: E,
5849
- getTokenProps: S
5850
- }) => /* @__PURE__ */ Z.createElement(g, {
5848
+ className: te,
5849
+ style: O,
5850
+ tokens: E,
5851
+ getLineProps: S,
5852
+ getTokenProps: R
5853
+ }) => /* @__PURE__ */ K.createElement(g, {
5851
5854
  className: L.scrollArea,
5852
5855
  dir: "ltr"
5853
- }, /* @__PURE__ */ Z.createElement("pre", {
5854
- className: F(L.code, H),
5855
- style: re,
5856
+ }, /* @__PURE__ */ K.createElement("pre", {
5857
+ className: B(L.code, te),
5858
+ style: O,
5856
5859
  dir: "ltr"
5857
- }, O.map((R, w) => {
5858
- var x, I, $, j;
5859
- if (w === O.length - 1 && R.length === 1 && R[0].content === `
5860
+ }, E.map((w, x) => {
5861
+ var I, $, j, V;
5862
+ if (x === E.length - 1 && w.length === 1 && w[0].content === `
5860
5863
  `)
5861
5864
  return null;
5862
- const B = w + 1, K = E({ line: R, key: w }), J = B in c, he = X === "dark" ? q.fn.rgba(q.fn.themeColor((x = c[B]) == null ? void 0 : x.color, 9), 0.25) : q.fn.themeColor((I = c[B]) == null ? void 0 : I.color, 0);
5863
- return /* @__PURE__ */ Z.createElement("div", Pe(Ie({}, K), {
5864
- className: F(L.line, K.className),
5865
- style: Ie({}, J ? { backgroundColor: he } : null)
5866
- }), u && /* @__PURE__ */ Z.createElement("div", {
5865
+ const U = x + 1, re = S({ line: w, key: x }), ge = U in c, ce = F === "dark" ? H.fn.rgba(H.fn.themeColor((I = c[U]) == null ? void 0 : I.color, 9), 0.25) : H.fn.themeColor(($ = c[U]) == null ? void 0 : $.color, 0);
5866
+ return /* @__PURE__ */ K.createElement("div", Pe(Ie({}, re), {
5867
+ className: B(L.line, re.className),
5868
+ style: Ie({}, ge ? { backgroundColor: ce } : null)
5869
+ }), u && /* @__PURE__ */ K.createElement("div", {
5867
5870
  className: L.lineNumber,
5868
5871
  style: {
5869
- color: J ? q.fn.themeColor(($ = c[B]) == null ? void 0 : $.color, X === "dark" ? 5 : 8) : void 0
5872
+ color: ge ? H.fn.themeColor((j = c[U]) == null ? void 0 : j.color, F === "dark" ? 5 : 8) : void 0
5870
5873
  }
5871
- }, ((j = c[B]) == null ? void 0 : j.label) || B), /* @__PURE__ */ Z.createElement("div", {
5874
+ }, ((V = c[U]) == null ? void 0 : V.label) || U), /* @__PURE__ */ K.createElement("div", {
5872
5875
  className: L.lineContent
5873
- }, R.map((de, ye) => {
5874
- var pe, ne;
5875
- const ue = S({ token: de, key: ye });
5876
- return /* @__PURE__ */ Z.createElement("span", Pe(Ie({}, ue), {
5877
- style: Pe(Ie({}, ue.style), {
5878
- color: J ? q.fn.themeColor((pe = c[B]) == null ? void 0 : pe.color, X === "dark" ? 5 : 8) : (ne = ue == null ? void 0 : ue.style) == null ? void 0 : ne.color
5876
+ }, w.map((ve, fe) => {
5877
+ var ae, de;
5878
+ const me = R({ token: ve, key: fe });
5879
+ return /* @__PURE__ */ K.createElement("span", Pe(Ie({}, me), {
5880
+ style: Pe(Ie({}, me.style), {
5881
+ color: ge ? H.fn.themeColor((ae = c[U]) == null ? void 0 : ae.color, F === "dark" ? 5 : 8) : (de = me == null ? void 0 : me.style) == null ? void 0 : de.color
5879
5882
  })
5880
5883
  }));
5881
5884
  })));
5882
5885
  }).filter(Boolean)))));
5883
5886
  });
5884
- vt.displayName = "@mantine/prism/Prism";
5885
- var Xn = Gt((e, { radius: t }) => ({
5887
+ St.displayName = "@mantine/prism/Prism";
5888
+ var Qn = qt((e, { radius: t }) => ({
5886
5889
  tab: {
5887
5890
  paddingLeft: e.spacing.sm,
5888
5891
  paddingRight: e.spacing.sm,
5889
- height: 34,
5890
- border: `1px solid ${e.colorScheme === "dark" ? e.colors.dark[5] : e.colors.gray[3]}`,
5892
+ height: ze(34),
5893
+ border: `${ze(1)} solid ${e.colorScheme === "dark" ? e.colors.dark[5] : e.colors.gray[3]}`,
5891
5894
  borderBottom: 0,
5892
5895
  fontSize: e.fontSizes.sm,
5893
5896
  color: e.colorScheme === "dark" ? e.colors.dark[1] : e.colors.gray[7],
@@ -5917,7 +5920,7 @@ var Xn = Gt((e, { radius: t }) => ({
5917
5920
  borderRadius: e.fn.radius(t),
5918
5921
  borderTopRightRadius: 0,
5919
5922
  borderTopLeftRadius: 0,
5920
- border: `1px solid ${e.colorScheme === "dark" ? e.colors.dark[4] : e.colors.gray[3]}`,
5923
+ border: `${ze(1)} solid ${e.colorScheme === "dark" ? e.colors.dark[4] : e.colors.gray[3]}`,
5921
5924
  borderTop: 0,
5922
5925
  overflow: "hidden"
5923
5926
  },
@@ -5927,32 +5930,32 @@ var Xn = Gt((e, { radius: t }) => ({
5927
5930
  border: 0
5928
5931
  }
5929
5932
  }));
5930
- const Xt = Xn;
5931
- var Qn = Object.defineProperty, Jn = Object.defineProperties, ea = Object.getOwnPropertyDescriptors, Ze = Object.getOwnPropertySymbols, Qt = Object.prototype.hasOwnProperty, Jt = Object.prototype.propertyIsEnumerable, jt = (e, t, r) => t in e ? Qn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, er = (e, t) => {
5933
+ const Qt = Qn;
5934
+ var Jn = Object.defineProperty, ea = Object.defineProperties, ta = Object.getOwnPropertyDescriptors, Xe = Object.getOwnPropertySymbols, Jt = Object.prototype.hasOwnProperty, er = Object.prototype.propertyIsEnumerable, Ut = (e, t, r) => t in e ? Jn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, tr = (e, t) => {
5932
5935
  for (var r in t || (t = {}))
5933
- Qt.call(t, r) && jt(e, r, t[r]);
5934
- if (Ze)
5935
- for (var r of Ze(t))
5936
- Jt.call(t, r) && jt(e, r, t[r]);
5936
+ Jt.call(t, r) && Ut(e, r, t[r]);
5937
+ if (Xe)
5938
+ for (var r of Xe(t))
5939
+ er.call(t, r) && Ut(e, r, t[r]);
5937
5940
  return e;
5938
- }, ta = (e, t) => Jn(e, ea(t)), ra = (e, t) => {
5941
+ }, ra = (e, t) => ea(e, ta(t)), na = (e, t) => {
5939
5942
  var r = {};
5940
5943
  for (var n in e)
5941
- Qt.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
5942
- if (e != null && Ze)
5943
- for (var n of Ze(e))
5944
- t.indexOf(n) < 0 && Jt.call(e, n) && (r[n] = e[n]);
5944
+ Jt.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
5945
+ if (e != null && Xe)
5946
+ for (var n of Xe(e))
5947
+ t.indexOf(n) < 0 && er.call(e, n) && (r[n] = e[n]);
5945
5948
  return r;
5946
5949
  };
5947
- function na(e) {
5948
- const { classes: t } = Xt({ radius: e.radius });
5949
- return /* @__PURE__ */ Z.createElement(rt, ta(er({}, e), {
5950
+ function aa(e) {
5951
+ const { classes: t } = Qt({ radius: e.radius });
5952
+ return /* @__PURE__ */ K.createElement(nt, ra(tr({}, e), {
5950
5953
  variant: "outline",
5951
5954
  classNames: { tab: t.tab },
5952
5955
  translate: "no"
5953
5956
  }));
5954
5957
  }
5955
- function aa(e) {
5958
+ function ia(e) {
5956
5959
  var t = e, {
5957
5960
  language: r,
5958
5961
  children: n,
@@ -5965,8 +5968,9 @@ function aa(e) {
5965
5968
  scrollAreaComponent: b,
5966
5969
  trim: u,
5967
5970
  getPrismTheme: c,
5968
- colorScheme: g
5969
- } = t, y = ra(t, [
5971
+ colorScheme: g,
5972
+ variant: y
5973
+ } = t, h = na(t, [
5970
5974
  "language",
5971
5975
  "children",
5972
5976
  "radius",
@@ -5978,12 +5982,13 @@ function aa(e) {
5978
5982
  "scrollAreaComponent",
5979
5983
  "trim",
5980
5984
  "getPrismTheme",
5981
- "colorScheme"
5985
+ "colorScheme",
5986
+ "variant"
5982
5987
  ]);
5983
- const { classes: h } = Xt({ radius: s });
5984
- return /* @__PURE__ */ Z.createElement(rt.Panel, er({}, y), /* @__PURE__ */ Z.createElement(vt, {
5988
+ const { classes: _ } = Qt({ radius: s });
5989
+ return /* @__PURE__ */ K.createElement(nt.Panel, tr({}, h), /* @__PURE__ */ K.createElement(St, {
5985
5990
  language: r,
5986
- classNames: { root: h.prism, code: h.code },
5991
+ classNames: { root: _.prism, code: _.code },
5987
5992
  radius: s,
5988
5993
  noCopy: o,
5989
5994
  copyLabel: l,
@@ -5993,36 +5998,37 @@ function aa(e) {
5993
5998
  scrollAreaComponent: b,
5994
5999
  trim: u,
5995
6000
  getPrismTheme: c,
5996
- colorScheme: g
6001
+ colorScheme: g,
6002
+ variant: y
5997
6003
  }, n));
5998
6004
  }
5999
- const Ue = vt;
6000
- Ue.Tabs = na;
6001
- Ue.Tab = rt.Tab;
6002
- Ue.TabsList = rt.List;
6003
- Ue.Panel = aa;
6004
- function ia({
6005
+ const Ge = St;
6006
+ Ge.Tabs = aa;
6007
+ Ge.Tab = nt.Tab;
6008
+ Ge.TabsList = nt.List;
6009
+ Ge.Panel = ia;
6010
+ function oa({
6005
6011
  id: e,
6006
6012
  onSuccess: t,
6007
6013
  styles: r = De
6008
6014
  }) {
6009
- const n = Be(), s = async () => {
6015
+ const n = je(), s = async () => {
6010
6016
  if (e) {
6011
- be({
6017
+ ye({
6012
6018
  id: "for-deleting",
6013
6019
  title: "Pending",
6014
6020
  message: "Deleting SQL Snippet...",
6015
6021
  loading: !0
6016
6022
  });
6017
6023
  try {
6018
- await se.sql_snippet.delete(e), te({
6024
+ await se.sql_snippet.delete(e), ee({
6019
6025
  id: "for-deleting",
6020
6026
  title: "Successful",
6021
6027
  message: `SQL Snippet [${e}] is deleted`,
6022
6028
  color: "green"
6023
6029
  }), t();
6024
6030
  } catch (l) {
6025
- te({
6031
+ ee({
6026
6032
  id: "for-deleting",
6027
6033
  title: "Failed",
6028
6034
  message: l.message,
@@ -6042,21 +6048,21 @@ function ia({
6042
6048
  color: "red"
6043
6049
  }
6044
6050
  });
6045
- return /* @__PURE__ */ a(Y, { size: r.button.size, color: "red", onClick: o, leftIcon: /* @__PURE__ */ a(at, { size: 20 }), children: "Delete" });
6051
+ return /* @__PURE__ */ a(Y, { size: r.button.size, color: "red", onClick: o, leftIcon: /* @__PURE__ */ a(it, { size: 20 }), children: "Delete" });
6046
6052
  }
6047
- function oa({
6053
+ function sa({
6048
6054
  content: e
6049
6055
  }) {
6050
- return /* @__PURE__ */ C(dt, { width: "60vw", shadow: "md", children: [
6051
- /* @__PURE__ */ a(dt.Target, { children: /* @__PURE__ */ a(bt, { size: 16, children: /* @__PURE__ */ a(Ur, {}) }) }),
6052
- /* @__PURE__ */ a(dt.Dropdown, { children: /* @__PURE__ */ a(Ue, { language: "sql", noCopy: !0, withLineNumbers: !0, children: e }) })
6056
+ return /* @__PURE__ */ C(pt, { width: "60vw", shadow: "md", children: [
6057
+ /* @__PURE__ */ a(pt.Target, { children: /* @__PURE__ */ a(yt, { size: 16, children: /* @__PURE__ */ a(Gr, {}) }) }),
6058
+ /* @__PURE__ */ a(pt.Dropdown, { children: /* @__PURE__ */ a(Ge, { language: "sql", noCopy: !0, withLineNumbers: !0, children: e }) })
6053
6059
  ] });
6054
6060
  }
6055
- function Aa({
6061
+ function ka({
6056
6062
  styles: e = De,
6057
6063
  config: t
6058
6064
  }) {
6059
- je(t);
6065
+ Ue(t);
6060
6066
  const {
6061
6067
  data: r = [],
6062
6068
  loading: n,
@@ -6074,13 +6080,13 @@ function Aa({
6074
6080
  }, {
6075
6081
  refreshDeps: []
6076
6082
  });
6077
- return /* @__PURE__ */ C(fe, { children: [
6078
- /* @__PURE__ */ a(ee, { pt: e.spacing, position: "right", children: /* @__PURE__ */ a(xn, { onSuccess: s }) }),
6083
+ return /* @__PURE__ */ C(he, { children: [
6084
+ /* @__PURE__ */ a(J, { pt: e.spacing, position: "right", children: /* @__PURE__ */ a(Cn, { onSuccess: s }) }),
6079
6085
  /* @__PURE__ */ C(le, { mt: e.spacing, sx: {
6080
6086
  position: "relative"
6081
6087
  }, children: [
6082
- /* @__PURE__ */ a(et, { visible: n }),
6083
- /* @__PURE__ */ C(tt, { horizontalSpacing: e.spacing, verticalSpacing: e.spacing, fontSize: e.size, highlightOnHover: !0, children: [
6088
+ /* @__PURE__ */ a(tt, { visible: n }),
6089
+ /* @__PURE__ */ C(rt, { horizontalSpacing: e.spacing, verticalSpacing: e.spacing, fontSize: e.size, highlightOnHover: !0, children: [
6084
6090
  /* @__PURE__ */ a("thead", { children: /* @__PURE__ */ C("tr", { children: [
6085
6091
  /* @__PURE__ */ a("th", { children: "Name" }),
6086
6092
  /* @__PURE__ */ a("th", {}),
@@ -6097,12 +6103,12 @@ function Aa({
6097
6103
  } = o;
6098
6104
  return /* @__PURE__ */ C("tr", { children: [
6099
6105
  /* @__PURE__ */ a("td", { children: l }),
6100
- /* @__PURE__ */ a("td", { width: 50, children: /* @__PURE__ */ a(oa, { content: p }) }),
6106
+ /* @__PURE__ */ a("td", { width: 50, children: /* @__PURE__ */ a(sa, { content: p }) }),
6101
6107
  /* @__PURE__ */ a("td", { width: 200, children: d }),
6102
6108
  /* @__PURE__ */ a("td", { width: 200, children: f }),
6103
- /* @__PURE__ */ a("td", { width: 400, children: /* @__PURE__ */ C(ee, { position: "left", children: [
6104
- /* @__PURE__ */ a(In, { ...o, onSuccess: s }),
6105
- /* @__PURE__ */ a(ia, { id: l, onSuccess: s })
6109
+ /* @__PURE__ */ a("td", { width: 400, children: /* @__PURE__ */ C(J, { position: "left", children: [
6110
+ /* @__PURE__ */ a(Dn, { ...o, onSuccess: s }),
6111
+ /* @__PURE__ */ a(oa, { id: l, onSuccess: s })
6106
6112
  ] }) })
6107
6113
  ] }, l);
6108
6114
  }) })
@@ -6110,23 +6116,23 @@ function Aa({
6110
6116
  ] })
6111
6117
  ] });
6112
6118
  }
6113
- const ka = () => import("./package-8c55be93.mjs").then(({
6119
+ const Ta = () => import("./package-e1faa1fc.mjs").then(({
6114
6120
  version: e
6115
6121
  }) => (console.log(`[@devtable/dashboard] version: ${e}`), e));
6116
6122
  export {
6117
- _a as APIKeyList,
6118
- wa as AccountList,
6119
- Tn as AddAPIKey,
6120
- Sn as AddAccount,
6121
- ln as AddDataSource,
6122
- xn as AddSQLSnippet,
6123
- Sa as DataSourceList,
6124
- Rn as DeleteAPIKey,
6125
- wn as DeleteAccount,
6126
- dn as DeleteDataSource,
6127
- ia as DeleteSQLSnippet,
6128
- Ea as Login,
6129
- Aa as SQLSnippetList,
6130
- In as UpdateSQLSnippet,
6131
- ka as getVersion
6123
+ Aa as APIKeyList,
6124
+ Ea as AccountList,
6125
+ Rn as AddAPIKey,
6126
+ wn as AddAccount,
6127
+ un as AddDataSource,
6128
+ Cn as AddSQLSnippet,
6129
+ wa as DataSourceList,
6130
+ On as DeleteAPIKey,
6131
+ En as DeleteAccount,
6132
+ pn as DeleteDataSource,
6133
+ oa as DeleteSQLSnippet,
6134
+ _a as Login,
6135
+ ka as SQLSnippetList,
6136
+ Dn as UpdateSQLSnippet,
6137
+ Ta as getVersion
6132
6138
  };