@qwickapps/server 1.5.1 → 1.5.2

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.
Files changed (77) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/core/control-panel.d.ts.map +1 -1
  3. package/dist/core/control-panel.js +41 -0
  4. package/dist/core/control-panel.js.map +1 -1
  5. package/dist/core/guards.d.ts.map +1 -1
  6. package/dist/core/guards.js +77 -0
  7. package/dist/core/guards.js.map +1 -1
  8. package/dist/core/health-manager.d.ts +4 -0
  9. package/dist/core/health-manager.d.ts.map +1 -1
  10. package/dist/core/health-manager.js +6 -1
  11. package/dist/core/health-manager.js.map +1 -1
  12. package/dist/core/plugin-registry.d.ts +55 -5
  13. package/dist/core/plugin-registry.d.ts.map +1 -1
  14. package/dist/core/plugin-registry.js +57 -19
  15. package/dist/core/plugin-registry.js.map +1 -1
  16. package/dist/core/types.d.ts +2 -0
  17. package/dist/core/types.d.ts.map +1 -1
  18. package/dist/index.d.ts +2 -2
  19. package/dist/index.d.ts.map +1 -1
  20. package/dist/index.js +3 -1
  21. package/dist/index.js.map +1 -1
  22. package/dist/plugins/auth/auth-plugin.d.ts.map +1 -1
  23. package/dist/plugins/auth/auth-plugin.js +16 -0
  24. package/dist/plugins/auth/auth-plugin.js.map +1 -1
  25. package/dist/plugins/auth/auth-plugin.test.js +133 -0
  26. package/dist/plugins/auth/auth-plugin.test.js.map +1 -1
  27. package/dist/plugins/auth/env-config.d.ts.map +1 -1
  28. package/dist/plugins/auth/env-config.js +4 -0
  29. package/dist/plugins/auth/env-config.js.map +1 -1
  30. package/dist/plugins/auth/types.d.ts +10 -0
  31. package/dist/plugins/auth/types.d.ts.map +1 -1
  32. package/dist/plugins/auth/types.js.map +1 -1
  33. package/dist/plugins/devices/__tests__/token-utils.test.js +4 -2
  34. package/dist/plugins/devices/__tests__/token-utils.test.js.map +1 -1
  35. package/dist/plugins/frontend-app-plugin.d.ts.map +1 -1
  36. package/dist/plugins/frontend-app-plugin.js +18 -4
  37. package/dist/plugins/frontend-app-plugin.js.map +1 -1
  38. package/dist/plugins/index.d.ts +2 -0
  39. package/dist/plugins/index.d.ts.map +1 -1
  40. package/dist/plugins/index.js +2 -0
  41. package/dist/plugins/index.js.map +1 -1
  42. package/dist/plugins/qwickbrain/index.d.ts +25 -0
  43. package/dist/plugins/qwickbrain/index.d.ts.map +1 -0
  44. package/dist/plugins/qwickbrain/index.js +24 -0
  45. package/dist/plugins/qwickbrain/index.js.map +1 -0
  46. package/dist/plugins/qwickbrain/qwickbrain-plugin.d.ts +23 -0
  47. package/dist/plugins/qwickbrain/qwickbrain-plugin.d.ts.map +1 -0
  48. package/dist/plugins/qwickbrain/qwickbrain-plugin.js +528 -0
  49. package/dist/plugins/qwickbrain/qwickbrain-plugin.js.map +1 -0
  50. package/dist/plugins/qwickbrain/types.d.ts +131 -0
  51. package/dist/plugins/qwickbrain/types.d.ts.map +1 -0
  52. package/dist/plugins/qwickbrain/types.js +9 -0
  53. package/dist/plugins/qwickbrain/types.js.map +1 -0
  54. package/dist-ui/assets/{index-CynOqPkb.js → index-BfC7mG5L.js} +2 -2
  55. package/dist-ui/assets/{index-CynOqPkb.js.map → index-BfC7mG5L.js.map} +1 -1
  56. package/dist-ui/index.html +1 -1
  57. package/dist-ui-lib/api/controlPanelApi.d.ts +6 -0
  58. package/dist-ui-lib/index.js +277 -266
  59. package/dist-ui-lib/index.js.map +1 -1
  60. package/package.json +1 -1
  61. package/src/core/control-panel.ts +47 -0
  62. package/src/core/guards.ts +89 -0
  63. package/src/core/health-manager.ts +6 -1
  64. package/src/core/plugin-registry.ts +123 -25
  65. package/src/core/types.ts +2 -0
  66. package/src/index.ts +11 -0
  67. package/src/plugins/auth/auth-plugin.test.ts +167 -0
  68. package/src/plugins/auth/auth-plugin.ts +16 -0
  69. package/src/plugins/auth/env-config.ts +4 -0
  70. package/src/plugins/auth/types.ts +10 -0
  71. package/src/plugins/devices/__tests__/token-utils.test.ts +4 -2
  72. package/src/plugins/frontend-app-plugin.ts +19 -4
  73. package/src/plugins/index.ts +15 -0
  74. package/src/plugins/qwickbrain/index.ts +33 -0
  75. package/src/plugins/qwickbrain/qwickbrain-plugin.ts +642 -0
  76. package/src/plugins/qwickbrain/types.ts +146 -0
  77. package/ui/src/api/controlPanelApi.ts +49 -37
@@ -1,11 +1,11 @@
1
- var Fn = Object.defineProperty;
2
- var _n = (e, t, n) => t in e ? Fn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var Br = (e, t, n) => _n(e, typeof t != "symbol" ? t + "" : t, n);
4
- import { jsxs as d, jsx as r, Fragment as We } from "react/jsx-runtime";
5
- import * as Ve from "react";
1
+ var Vn = Object.defineProperty;
2
+ var Fn = (e, t, n) => t in e ? Vn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
+ var Br = (e, t, n) => Fn(e, typeof t != "symbol" ? t + "" : t, n);
4
+ import { jsxs as d, jsx as r, Fragment as _e } from "react/jsx-runtime";
5
+ import * as We from "react";
6
6
  import { createContext as hn, useState as C, useCallback as ye, useContext as un, useMemo as Hn, useEffect as ce, useRef as qn } from "react";
7
7
  import { useNavigate as mn, Routes as Gn, Route as gt } from "react-router-dom";
8
- import { Box as f, Typography as $, CircularProgress as me, Alert as de, Card as L, CardContent as U, Chip as ie, LinearProgress as _t, CardActionArea as Kn, Grid as be, FormControl as fr, InputLabel as pr, Select as gr, MenuItem as Se, TextField as F, ToggleButtonGroup as Jn, ToggleButton as Or, Tooltip as Ee, IconButton as De, TableContainer as it, Table as st, TableHead as lt, TableRow as fe, TableCell as P, TableBody as ct, Pagination as Qn, Snackbar as Yn, FormControlLabel as yt, Switch as bt, Collapse as Xn, Divider as Zn, Button as Ue, Dialog as eo, DialogTitle as to, DialogContent as ro, DialogActions as no, Link as oo, Tabs as ao, Tab as io, InputAdornment as fn, TablePagination as so, Autocomplete as lo } from "@mui/material";
8
+ import { Box as f, Typography as $, CircularProgress as me, Alert as de, Card as L, CardContent as U, Chip as ie, LinearProgress as Ft, CardActionArea as Kn, Grid as be, FormControl as fr, InputLabel as pr, Select as gr, MenuItem as Se, TextField as V, ToggleButtonGroup as Jn, ToggleButton as Or, Tooltip as Ee, IconButton as De, TableContainer as it, Table as st, TableHead as lt, TableRow as fe, TableCell as P, TableBody as ct, Pagination as Qn, Snackbar as Yn, FormControlLabel as yt, Switch as bt, Collapse as Xn, Divider as Zn, Button as Ue, Dialog as eo, DialogTitle as to, DialogContent as ro, DialogActions as no, Link as oo, Tabs as ao, Tab as io, InputAdornment as fn, TablePagination as so, Autocomplete as lo } from "@mui/material";
9
9
  import { AppConfigBuilder as co, Text as M, GridLayout as Ht, QwickApp as ho, ProductLogo as uo, Button as ue, Dialog as St, DialogTitle as $t, DialogContent as Et, DialogActions as kt } from "@qwickapps/react-framework";
10
10
  import K from "prop-types";
11
11
  import mo from "@emotion/styled";
@@ -25,13 +25,13 @@ const go = co.create().withName("Control Panel").withId("com.qwickapps.control-p
25
25
  }
26
26
  };
27
27
  }, bo = yo();
28
- function Fe(e, ...t) {
28
+ function Ve(e, ...t) {
29
29
  const n = new URL(`https://mui.com/production-error/?code=${e}`);
30
30
  return t.forEach((o) => n.searchParams.append("args[]", o)), `Minified MUI error #${e}; visit ${n} for the full message.`;
31
31
  }
32
32
  function Xe(e) {
33
33
  if (typeof e != "string")
34
- throw new Error(process.env.NODE_ENV !== "production" ? "MUI: `capitalize(string)` expects a string argument." : Fe(7));
34
+ throw new Error(process.env.NODE_ENV !== "production" ? "MUI: `capitalize(string)` expects a string argument." : Ve(7));
35
35
  return e.charAt(0).toUpperCase() + e.slice(1);
36
36
  }
37
37
  function gn(e) {
@@ -67,7 +67,7 @@ function Ne(e) {
67
67
  return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
68
68
  }
69
69
  function bn(e) {
70
- if (/* @__PURE__ */ Ve.isValidElement(e) || pn(e) || !Ne(e))
70
+ if (/* @__PURE__ */ We.isValidElement(e) || pn(e) || !Ne(e))
71
71
  return e;
72
72
  const t = {};
73
73
  return Object.keys(e).forEach((n) => {
@@ -81,7 +81,7 @@ function xe(e, t, n = {
81
81
  ...e
82
82
  } : e;
83
83
  return Ne(e) && Ne(t) && Object.keys(t).forEach((a) => {
84
- /* @__PURE__ */ Ve.isValidElement(t[a]) || pn(t[a]) ? o[a] = t[a] : Ne(t[a]) && // Avoid prototype pollution
84
+ /* @__PURE__ */ We.isValidElement(t[a]) || pn(t[a]) ? o[a] = t[a] : Ne(t[a]) && // Avoid prototype pollution
85
85
  Object.prototype.hasOwnProperty.call(e, a) && Ne(e[a]) ? o[a] = xe(e[a], t[a], n) : n.clone ? o[a] = Ne(t[a]) ? bn(t[a]) : t[a] : o[a] = t[a];
86
86
  }), o;
87
87
  }
@@ -115,7 +115,7 @@ function Co(e, t) {
115
115
  if (!n) {
116
116
  if (process.env.NODE_ENV !== "production")
117
117
  throw new Error(process.env.NODE_ENV !== "production" ? `MUI: The provided shorthand ${`(${t})`} is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.
118
- For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.` : Fe(18, `(${t})`));
118
+ For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.` : Ve(18, `(${t})`));
119
119
  return null;
120
120
  }
121
121
  const [, o, a] = n, i = Number.isNaN(+o) ? o || 0 : +o;
@@ -206,7 +206,7 @@ function Gt(e, t, n = !0) {
206
206
  }
207
207
  return t.split(".").reduce((o, a) => o && o[a] != null ? o[a] : null, e);
208
208
  }
209
- function Wt(e, t, n, o = n) {
209
+ function _t(e, t, n, o = n) {
210
210
  let a;
211
211
  return typeof e == "function" ? a = e(n) : Array.isArray(e) ? a = e[n] || o : a = Gt(e, n) || o, t && (a = t(a, o, e)), a;
212
212
  }
@@ -221,8 +221,8 @@ function se(e) {
221
221
  return null;
222
222
  const c = l[t], h = l.theme, u = Gt(h, o) || {};
223
223
  return Re(l, c, (y) => {
224
- let b = Wt(u, a, y);
225
- return y === b && typeof y == "string" && (b = Wt(u, a, `${t}${y === "default" ? "" : Xe(y)}`, y)), n === !1 ? b : {
224
+ let b = _t(u, a, y);
225
+ return y === b && typeof y == "string" && (b = _t(u, a, `${t}${y === "default" ? "" : Xe(y)}`, y)), n === !1 ? b : {
226
226
  [n]: b
227
227
  };
228
228
  });
@@ -320,7 +320,7 @@ function ke(e, t) {
320
320
  transform: t
321
321
  });
322
322
  }
323
- const Po = ke("border", $e), Bo = ke("borderTop", $e), Oo = ke("borderRight", $e), No = ke("borderBottom", $e), Ro = ke("borderLeft", $e), Mo = ke("borderColor"), jo = ke("borderTopColor"), Uo = ke("borderRightColor"), Lo = ke("borderBottomColor"), Wo = ke("borderLeftColor"), Vo = ke("outline", $e), Fo = ke("outlineColor"), Yt = (e) => {
323
+ const Po = ke("border", $e), Bo = ke("borderTop", $e), Oo = ke("borderRight", $e), No = ke("borderBottom", $e), Ro = ke("borderLeft", $e), Mo = ke("borderColor"), jo = ke("borderTopColor"), Uo = ke("borderRightColor"), Lo = ke("borderBottomColor"), _o = ke("borderLeftColor"), Wo = ke("outline", $e), Vo = ke("outlineColor"), Yt = (e) => {
324
324
  if (e.borderRadius !== void 0 && e.borderRadius !== null) {
325
325
  const t = zt(e.theme, "shape.borderRadius", 4, "borderRadius"), n = (o) => ({
326
326
  borderRadius: Pt(t, o)
@@ -333,7 +333,7 @@ Yt.propTypes = process.env.NODE_ENV !== "production" ? {
333
333
  borderRadius: He
334
334
  } : {};
335
335
  Yt.filterProps = ["borderRadius"];
336
- Qt(Po, Bo, Oo, No, Ro, Mo, jo, Uo, Lo, Wo, Yt, Vo, Fo);
336
+ Qt(Po, Bo, Oo, No, Ro, Mo, jo, Uo, Lo, _o, Yt, Wo, Vo);
337
337
  const Xt = (e) => {
338
338
  if (e.gap !== void 0 && e.gap !== null) {
339
339
  const t = zt(e.theme, "spacing", 8, "gap"), n = (o) => ({
@@ -373,7 +373,7 @@ er.propTypes = process.env.NODE_ENV !== "production" ? {
373
373
  rowGap: He
374
374
  } : {};
375
375
  er.filterProps = ["rowGap"];
376
- const _o = se({
376
+ const Fo = se({
377
377
  prop: "gridColumn"
378
378
  }), Ho = se({
379
379
  prop: "gridRow"
@@ -392,7 +392,7 @@ const _o = se({
392
392
  }), Xo = se({
393
393
  prop: "gridArea"
394
394
  });
395
- Qt(Xt, Zt, er, _o, Ho, qo, Go, Ko, Jo, Qo, Yo, Xo);
395
+ Qt(Xt, Zt, er, Fo, Ho, qo, Go, Ko, Jo, Qo, Yo, Xo);
396
396
  function at(e, t) {
397
397
  return t === "grey" ? t : e;
398
398
  }
@@ -781,8 +781,8 @@ function da() {
781
781
  };
782
782
  const b = Gt(a, u) || {};
783
783
  return y ? y(l) : Re(l, o, (v) => {
784
- let D = Wt(b, g, v);
785
- return v === D && typeof v == "string" && (D = Wt(b, g, `${n}${v === "default" ? "" : Xe(v)}`, v)), h === !1 ? D : {
784
+ let D = _t(b, g, v);
785
+ return v === D && typeof v == "string" && (D = _t(b, g, `${n}${v === "default" ? "" : Xe(v)}`, v)), h === !1 ? D : {
786
786
  [h]: D
787
787
  };
788
788
  });
@@ -917,7 +917,7 @@ var fa = /[A-Z]|^ms/g, pa = /_EMO_([^_]+?)_([^]*?)_EMO_/g, xn = function(t) {
917
917
  return t != null && typeof t != "boolean";
918
918
  }, sr = /* @__PURE__ */ ma(function(e) {
919
919
  return xn(e) ? e : e.replace(fa, "-$&").toLowerCase();
920
- }), Wr = function(t, n) {
920
+ }), _r = function(t, n) {
921
921
  switch (t) {
922
922
  case "animation":
923
923
  case "animationName":
@@ -932,7 +932,7 @@ var fa = /[A-Z]|^ms/g, pa = /_EMO_([^_]+?)_([^]*?)_EMO_/g, xn = function(t) {
932
932
  }
933
933
  return ua[t] !== 1 && !xn(t) && typeof n == "number" && n !== 0 ? n + "px" : n;
934
934
  };
935
- function Vt(e, t, n) {
935
+ function Wt(e, t, n) {
936
936
  if (n == null)
937
937
  return "";
938
938
  var o = n;
@@ -972,18 +972,18 @@ function ga(e, t, n) {
972
972
  var o = "";
973
973
  if (Array.isArray(n))
974
974
  for (var a = 0; a < n.length; a++)
975
- o += Vt(e, t, n[a]) + ";";
975
+ o += Wt(e, t, n[a]) + ";";
976
976
  else
977
977
  for (var i in n) {
978
978
  var l = n[i];
979
979
  if (typeof l != "object") {
980
980
  var c = l;
981
- Lr(c) && (o += sr(i) + ":" + Wr(i, c) + ";");
981
+ Lr(c) && (o += sr(i) + ":" + _r(i, c) + ";");
982
982
  } else if (Array.isArray(l) && typeof l[0] == "string" && t == null)
983
983
  for (var h = 0; h < l.length; h++)
984
- Lr(l[h]) && (o += sr(i) + ":" + Wr(i, l[h]) + ";");
984
+ Lr(l[h]) && (o += sr(i) + ":" + _r(i, l[h]) + ";");
985
985
  else {
986
- var u = Vt(e, t, l);
986
+ var u = Wt(e, t, l);
987
987
  switch (i) {
988
988
  case "animation":
989
989
  case "animationName": {
@@ -997,7 +997,7 @@ function ga(e, t, n) {
997
997
  }
998
998
  return o;
999
999
  }
1000
- var Vr = /label:\s*([^\s;{]+)\s*(;|$)/g, Le;
1000
+ var Wr = /label:\s*([^\s;{]+)\s*(;|$)/g, Le;
1001
1001
  function ya(e, t, n) {
1002
1002
  if (e.length === 1 && typeof e[0] == "object" && e[0] !== null && e[0].styles !== void 0)
1003
1003
  return e[0];
@@ -1005,18 +1005,18 @@ function ya(e, t, n) {
1005
1005
  Le = void 0;
1006
1006
  var i = e[0];
1007
1007
  if (i == null || i.raw === void 0)
1008
- o = !1, a += Vt(n, t, i);
1008
+ o = !1, a += Wt(n, t, i);
1009
1009
  else {
1010
1010
  var l = i;
1011
1011
  a += l[0];
1012
1012
  }
1013
1013
  for (var c = 1; c < e.length; c++)
1014
- if (a += Vt(n, t, e[c]), o) {
1014
+ if (a += Wt(n, t, e[c]), o) {
1015
1015
  var h = i;
1016
1016
  a += h[c];
1017
1017
  }
1018
- Vr.lastIndex = 0;
1019
- for (var u = "", g; (g = Vr.exec(a)) !== null; )
1018
+ Wr.lastIndex = 0;
1019
+ for (var u = "", g; (g = Wr.exec(a)) !== null; )
1020
1020
  u += "-" + g[1];
1021
1021
  var y = ha(a) + u;
1022
1022
  return {
@@ -1043,9 +1043,9 @@ function ba(e, t) {
1043
1043
  function va(e, t) {
1044
1044
  Array.isArray(e.__emotion_styles) && (e.__emotion_styles = t(e.__emotion_styles));
1045
1045
  }
1046
- const Fr = [];
1046
+ const Vr = [];
1047
1047
  function Ye(e) {
1048
- return Fr[0] = e, ya(Fr);
1048
+ return Vr[0] = e, ya(Vr);
1049
1049
  }
1050
1050
  const xa = (e) => {
1051
1051
  const t = Object.keys(e).map((n) => ({
@@ -1193,7 +1193,7 @@ function Ea(e, t, n = "Mui") {
1193
1193
  function Sn(e, t = "") {
1194
1194
  return e.displayName || e.name || t;
1195
1195
  }
1196
- function _r(e, t, n) {
1196
+ function Fr(e, t, n) {
1197
1197
  const o = Sn(t);
1198
1198
  return e.displayName || (o !== "" ? `${n}(${o})` : n);
1199
1199
  }
@@ -1206,9 +1206,9 @@ function ka(e) {
1206
1206
  if (typeof e == "object")
1207
1207
  switch (e.$$typeof) {
1208
1208
  case po:
1209
- return _r(e, e.render, "ForwardRef");
1209
+ return Fr(e, e.render, "ForwardRef");
1210
1210
  case fo:
1211
- return _r(e, e.type, "memo");
1211
+ return Fr(e, e.type, "memo");
1212
1212
  default:
1213
1213
  return;
1214
1214
  }
@@ -1294,7 +1294,7 @@ function Da(e = {}) {
1294
1294
  Aa(c, t, n);
1295
1295
  }
1296
1296
  return (c, h = {}) => {
1297
- va(c, (I) => I.filter((_) => _ !== dt));
1297
+ va(c, (I) => I.filter((F) => F !== dt));
1298
1298
  const {
1299
1299
  name: u,
1300
1300
  slot: g,
@@ -1311,7 +1311,7 @@ function Da(e = {}) {
1311
1311
  ), B = b || !1;
1312
1312
  let O = lr;
1313
1313
  g === "Root" || g === "root" ? O = o : g ? O = a : Oa(c) && (O = void 0);
1314
- const W = ba(c, {
1314
+ const _ = ba(c, {
1315
1315
  shouldForwardProp: O,
1316
1316
  label: Pa(u, g),
1317
1317
  ...v
@@ -1323,15 +1323,15 @@ function Da(e = {}) {
1323
1323
  return Lt(j, I, j.theme.modularCssLayers ? D : void 0);
1324
1324
  };
1325
1325
  if (Ne(I)) {
1326
- const _ = $n(I);
1326
+ const F = $n(I);
1327
1327
  return function(N) {
1328
- return _.variants ? Lt(N, _, N.theme.modularCssLayers ? D : void 0) : N.theme.modularCssLayers ? Qe(_.style, D) : _.style;
1328
+ return F.variants ? Lt(N, F, N.theme.modularCssLayers ? D : void 0) : N.theme.modularCssLayers ? Qe(F.style, D) : F.style;
1329
1329
  };
1330
1330
  }
1331
1331
  return I;
1332
1332
  }, Q = (...I) => {
1333
- const _ = [], j = I.map(z), N = [];
1334
- if (_.push(i), u && S && N.push(function(k) {
1333
+ const F = [], j = I.map(z), N = [];
1334
+ if (F.push(i), u && S && N.push(function(k) {
1335
1335
  var re, H;
1336
1336
  const A = (H = (re = k.theme.components) == null ? void 0 : re[u]) == null ? void 0 : H.styleOverrides;
1337
1337
  if (!A)
@@ -1345,14 +1345,14 @@ function Da(e = {}) {
1345
1345
  const m = k.theme, A = (re = (R = m == null ? void 0 : m.components) == null ? void 0 : R[u]) == null ? void 0 : re.variants;
1346
1346
  return A ? En(k, A, [], k.theme.modularCssLayers ? "theme" : void 0) : null;
1347
1347
  }), B || N.push(dt), Array.isArray(j[0])) {
1348
- const s = j.shift(), k = new Array(_.length).fill(""), m = new Array(N.length).fill("");
1348
+ const s = j.shift(), k = new Array(F.length).fill(""), m = new Array(N.length).fill("");
1349
1349
  let A;
1350
- A = [...k, ...s, ...m], A.raw = [...k, ...s.raw, ...m], _.unshift(A);
1350
+ A = [...k, ...s, ...m], A.raw = [...k, ...s.raw, ...m], F.unshift(A);
1351
1351
  }
1352
- const le = [..._, ...j, ...N], V = W(...le);
1353
- return c.muiName && (V.muiName = c.muiName), process.env.NODE_ENV !== "production" && (V.displayName = za(u, g, c)), V;
1352
+ const le = [...F, ...j, ...N], W = _(...le);
1353
+ return c.muiName && (W.muiName = c.muiName), process.env.NODE_ENV !== "production" && (W.displayName = za(u, g, c)), W;
1354
1354
  };
1355
- return W.withConfig && (Q.withConfig = W.withConfig), Q;
1355
+ return _.withConfig && (Q.withConfig = _.withConfig), Q;
1356
1356
  };
1357
1357
  }
1358
1358
  function za(e, t, n) {
@@ -1423,20 +1423,20 @@ function Ra(e) {
1423
1423
  let n = e.match(t);
1424
1424
  return n && n[0].length === 1 && (n = n.map((o) => o + o)), process.env.NODE_ENV !== "production" && e.length !== e.trim().length && console.error(`MUI: The color: "${e}" is invalid. Make sure the color input doesn't contain leading/trailing space.`), n ? `rgb${n.length === 4 ? "a" : ""}(${n.map((o, a) => a < 3 ? parseInt(o, 16) : Math.round(parseInt(o, 16) / 255 * 1e3) / 1e3).join(", ")})` : "";
1425
1425
  }
1426
- function _e(e) {
1426
+ function Fe(e) {
1427
1427
  if (e.type)
1428
1428
  return e;
1429
1429
  if (e.charAt(0) === "#")
1430
- return _e(Ra(e));
1430
+ return Fe(Ra(e));
1431
1431
  const t = e.indexOf("("), n = e.substring(0, t);
1432
1432
  if (!["rgb", "rgba", "hsl", "hsla", "color"].includes(n))
1433
1433
  throw new Error(process.env.NODE_ENV !== "production" ? `MUI: Unsupported \`${e}\` color.
1434
- The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().` : Fe(9, e));
1434
+ The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().` : Ve(9, e));
1435
1435
  let o = e.substring(t + 1, e.length - 1), a;
1436
1436
  if (n === "color") {
1437
1437
  if (o = o.split(" "), a = o.shift(), o.length === 4 && o[3].charAt(0) === "/" && (o[3] = o[3].slice(1)), !["srgb", "display-p3", "a98-rgb", "prophoto-rgb", "rec-2020"].includes(a))
1438
1438
  throw new Error(process.env.NODE_ENV !== "production" ? `MUI: unsupported \`${a}\` color space.
1439
- The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.` : Fe(10, a));
1439
+ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.` : Ve(10, a));
1440
1440
  } else
1441
1441
  o = o.split(",");
1442
1442
  return o = o.map((i) => parseFloat(i)), {
@@ -1446,7 +1446,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
1446
1446
  };
1447
1447
  }
1448
1448
  const Ma = (e) => {
1449
- const t = _e(e);
1449
+ const t = Fe(e);
1450
1450
  return t.values.slice(0, 3).map((n, o) => t.type.includes("hsl") && o !== 0 ? `${n}%` : n).join(" ");
1451
1451
  }, Ct = (e, t) => {
1452
1452
  try {
@@ -1466,7 +1466,7 @@ function rr(e) {
1466
1466
  return t.includes("rgb") ? o = o.map((a, i) => i < 3 ? parseInt(a, 10) : a) : t.includes("hsl") && (o[1] = `${o[1]}%`, o[2] = `${o[2]}%`), t.includes("color") ? o = `${n} ${o.join(" ")}` : o = `${o.join(", ")}`, `${t}(${o})`;
1467
1467
  }
1468
1468
  function In(e) {
1469
- e = _e(e);
1469
+ e = Fe(e);
1470
1470
  const {
1471
1471
  values: t
1472
1472
  } = e, n = t[0], o = t[1] / 100, a = t[2] / 100, i = o * Math.min(a, 1 - a), l = (u, g = (u + n / 30) % 12) => a - i * Math.max(Math.min(g - 3, 9 - g, 1), -1);
@@ -1478,8 +1478,8 @@ function In(e) {
1478
1478
  });
1479
1479
  }
1480
1480
  function br(e) {
1481
- e = _e(e);
1482
- let t = e.type === "hsl" || e.type === "hsla" ? _e(In(e)).values : e.values;
1481
+ e = Fe(e);
1482
+ let t = e.type === "hsl" || e.type === "hsla" ? Fe(In(e)).values : e.values;
1483
1483
  return t = t.map((n) => (e.type !== "color" && (n /= 255), n <= 0.03928 ? n / 12.92 : ((n + 0.055) / 1.055) ** 2.4)), Number((0.2126 * t[0] + 0.7152 * t[1] + 0.0722 * t[2]).toFixed(3));
1484
1484
  }
1485
1485
  function Hr(e, t) {
@@ -1487,7 +1487,7 @@ function Hr(e, t) {
1487
1487
  return (Math.max(n, o) + 0.05) / (Math.min(n, o) + 0.05);
1488
1488
  }
1489
1489
  function Tn(e, t) {
1490
- return e = _e(e), t = kr(t), (e.type === "rgb" || e.type === "hsl") && (e.type += "a"), e.type === "color" ? e.values[3] = `/${t}` : e.values[3] = t, rr(e);
1490
+ return e = Fe(e), t = kr(t), (e.type === "rgb" || e.type === "hsl") && (e.type += "a"), e.type === "color" ? e.values[3] = `/${t}` : e.values[3] = t, rr(e);
1491
1491
  }
1492
1492
  function Je(e, t, n) {
1493
1493
  try {
@@ -1497,7 +1497,7 @@ function Je(e, t, n) {
1497
1497
  }
1498
1498
  }
1499
1499
  function nr(e, t) {
1500
- if (e = _e(e), t = kr(t), e.type.includes("hsl"))
1500
+ if (e = Fe(e), t = kr(t), e.type.includes("hsl"))
1501
1501
  e.values[2] *= 1 - t;
1502
1502
  else if (e.type.includes("rgb") || e.type.includes("color"))
1503
1503
  for (let n = 0; n < 3; n += 1)
@@ -1512,7 +1512,7 @@ function Y(e, t, n) {
1512
1512
  }
1513
1513
  }
1514
1514
  function or(e, t) {
1515
- if (e = _e(e), t = kr(t), e.type.includes("hsl"))
1515
+ if (e = Fe(e), t = kr(t), e.type.includes("hsl"))
1516
1516
  e.values[2] += (100 - e.values[2]) * t;
1517
1517
  else if (e.type.includes("rgb"))
1518
1518
  for (let n = 0; n < 3; n += 1)
@@ -1539,7 +1539,7 @@ function jt(e, t, n) {
1539
1539
  return e;
1540
1540
  }
1541
1541
  }
1542
- const Ua = /* @__PURE__ */ Ve.createContext(void 0);
1542
+ const Ua = /* @__PURE__ */ We.createContext(void 0);
1543
1543
  process.env.NODE_ENV !== "production" && (K.node, K.object);
1544
1544
  function La(e) {
1545
1545
  const {
@@ -1552,11 +1552,11 @@ function La(e) {
1552
1552
  const a = t.components[n];
1553
1553
  return a.defaultProps ? yr(a.defaultProps, o, t.components.mergeClassNameAndStyle) : !a.styleOverrides && !a.variants ? yr(a, o, t.components.mergeClassNameAndStyle) : o;
1554
1554
  }
1555
- function Wa({
1555
+ function _a({
1556
1556
  props: e,
1557
1557
  name: t
1558
1558
  }) {
1559
- const n = Ve.useContext(Ua);
1559
+ const n = We.useContext(Ua);
1560
1560
  return La({
1561
1561
  props: e,
1562
1562
  name: t,
@@ -1568,14 +1568,14 @@ function Wa({
1568
1568
  const qr = {
1569
1569
  theme: void 0
1570
1570
  };
1571
- function Va(e) {
1571
+ function Wa(e) {
1572
1572
  let t, n;
1573
1573
  return function(a) {
1574
1574
  let i = t;
1575
1575
  return (i === void 0 || a.theme !== n) && (qr.theme = a.theme, i = $n(e(qr)), t = i, n = a.theme), i;
1576
1576
  };
1577
1577
  }
1578
- function Fa(e = "") {
1578
+ function Va(e = "") {
1579
1579
  function t(...o) {
1580
1580
  if (!o.length)
1581
1581
  return "";
@@ -1589,7 +1589,7 @@ const Gr = (e, t, n, o = []) => {
1589
1589
  t.forEach((i, l) => {
1590
1590
  l === t.length - 1 ? Array.isArray(a) ? a[Number(i)] = n : a && typeof a == "object" && (a[i] = n) : a && typeof a == "object" && (a[i] || (a[i] = o.includes(i) ? [] : {}), a = a[i]);
1591
1591
  });
1592
- }, _a = (e, t, n) => {
1592
+ }, Fa = (e, t, n) => {
1593
1593
  function o(a, i = [], l = []) {
1594
1594
  Object.entries(a).forEach(([c, h]) => {
1595
1595
  (!n || n && !n([...i, c])) && h != null && (typeof h == "object" && Object.keys(h).length > 0 ? o(h, [...i, c], Array.isArray(h) ? [...l, c] : l) : t([...i, c], h, l));
@@ -1602,7 +1602,7 @@ function cr(e, t) {
1602
1602
  prefix: n,
1603
1603
  shouldSkipGeneratingVar: o
1604
1604
  } = t || {}, a = {}, i = {}, l = {};
1605
- return _a(
1605
+ return Fa(
1606
1606
  e,
1607
1607
  (c, h, u) => {
1608
1608
  if ((typeof h == "string" || typeof h == "number") && (!o || !o(c, h))) {
@@ -1644,11 +1644,11 @@ function qa(e, t = {}) {
1644
1644
  if (Object.entries(E || {}).forEach(([z, Q]) => {
1645
1645
  const {
1646
1646
  vars: I,
1647
- css: _,
1647
+ css: F,
1648
1648
  varsWithDefaults: j
1649
1649
  } = cr(Q, t);
1650
1650
  S = xe(S, j), v[z] = {
1651
- css: _,
1651
+ css: F,
1652
1652
  vars: I
1653
1653
  };
1654
1654
  }), D) {
@@ -1663,12 +1663,12 @@ function qa(e, t = {}) {
1663
1663
  };
1664
1664
  }
1665
1665
  function B(z, Q) {
1666
- var _, j;
1666
+ var F, j;
1667
1667
  let I = a;
1668
1668
  if (a === "class" && (I = ".%s"), a === "data" && (I = "[data-%s]"), a != null && a.startsWith("data-") && !a.includes("%s") && (I = `[${a}="%s"]`), z) {
1669
1669
  if (I === "media")
1670
1670
  return e.defaultColorScheme === z ? ":root" : {
1671
- [`@media (prefers-color-scheme: ${((j = (_ = l[z]) == null ? void 0 : _.palette) == null ? void 0 : j.mode) || z})`]: {
1671
+ [`@media (prefers-color-scheme: ${((j = (F = l[z]) == null ? void 0 : F.palette) == null ? void 0 : j.mode) || z})`]: {
1672
1672
  ":root": Q
1673
1673
  }
1674
1674
  };
@@ -1692,44 +1692,44 @@ function qa(e, t = {}) {
1692
1692
  generateStyleSheets: () => {
1693
1693
  var N, le;
1694
1694
  const z = [], Q = e.defaultColorScheme || "light";
1695
- function I(V, s) {
1696
- Object.keys(s).length && z.push(typeof V == "string" ? {
1697
- [V]: {
1695
+ function I(W, s) {
1696
+ Object.keys(s).length && z.push(typeof W == "string" ? {
1697
+ [W]: {
1698
1698
  ...s
1699
1699
  }
1700
- } : V);
1700
+ } : W);
1701
1701
  }
1702
1702
  I(n(void 0, {
1703
1703
  ...y
1704
1704
  }), y);
1705
1705
  const {
1706
- [Q]: _,
1706
+ [Q]: F,
1707
1707
  ...j
1708
1708
  } = v;
1709
- if (_) {
1709
+ if (F) {
1710
1710
  const {
1711
- css: V
1712
- } = _, s = (le = (N = l[Q]) == null ? void 0 : N.palette) == null ? void 0 : le.mode, k = !o && s ? {
1711
+ css: W
1712
+ } = F, s = (le = (N = l[Q]) == null ? void 0 : N.palette) == null ? void 0 : le.mode, k = !o && s ? {
1713
1713
  colorScheme: s,
1714
- ...V
1714
+ ...W
1715
1715
  } : {
1716
- ...V
1716
+ ...W
1717
1717
  };
1718
1718
  I(n(Q, {
1719
1719
  ...k
1720
1720
  }), k);
1721
1721
  }
1722
- return Object.entries(j).forEach(([V, {
1722
+ return Object.entries(j).forEach(([W, {
1723
1723
  css: s
1724
1724
  }]) => {
1725
1725
  var A, R;
1726
- const k = (R = (A = l[V]) == null ? void 0 : A.palette) == null ? void 0 : R.mode, m = !o && k ? {
1726
+ const k = (R = (A = l[W]) == null ? void 0 : A.palette) == null ? void 0 : R.mode, m = !o && k ? {
1727
1727
  colorScheme: k,
1728
1728
  ...s
1729
1729
  } : {
1730
1730
  ...s
1731
1731
  };
1732
- I(n(V, {
1732
+ I(n(W, {
1733
1733
  ...m
1734
1734
  }), m);
1735
1735
  }), i && z.push({
@@ -1977,14 +1977,14 @@ function Ir(e) {
1977
1977
  color: E,
1978
1978
  name: B,
1979
1979
  mainShade: O = 500,
1980
- lightShade: W = 300,
1980
+ lightShade: _ = 300,
1981
1981
  darkShade: z = 700
1982
1982
  }) => {
1983
1983
  if (E = {
1984
1984
  ...E
1985
1985
  }, !E.main && E[O] && (E.main = E[O]), !E.hasOwnProperty("main"))
1986
1986
  throw new Error(process.env.NODE_ENV !== "production" ? `MUI: The color${B ? ` (${B})` : ""} provided to augmentColor(color) is invalid.
1987
- The color object needs to have a \`main\` property or a \`${O}\` property.` : Fe(11, B ? ` (${B})` : "", O));
1987
+ The color object needs to have a \`main\` property or a \`${O}\` property.` : Ve(11, B ? ` (${B})` : "", O));
1988
1988
  if (typeof E.main != "string")
1989
1989
  throw new Error(process.env.NODE_ENV !== "production" ? `MUI: The color${B ? ` (${B})` : ""} provided to augmentColor(color) is invalid.
1990
1990
  \`color.main\` should be a string, but \`${JSON.stringify(E.main)}\` was provided instead.
@@ -1999,8 +1999,8 @@ const theme1 = createTheme({ palette: {
1999
1999
 
2000
2000
  const theme2 = createTheme({ palette: {
2001
2001
  primary: { main: green[500] },
2002
- } });` : Fe(12, B ? ` (${B})` : "", JSON.stringify(E.main)));
2003
- return a ? (Jr(a, E, "light", W, o), Jr(a, E, "dark", z, o)) : (Kr(E, "light", W, o), Kr(E, "dark", z, o)), E.contrastText || (E.contrastText = b(E.main)), E;
2002
+ } });` : Ve(12, B ? ` (${B})` : "", JSON.stringify(E.main)));
2003
+ return a ? (Jr(a, E, "light", _, o), Jr(a, E, "dark", z, o)) : (Kr(E, "light", _, o), Kr(E, "dark", z, o)), E.contrastText || (E.contrastText = b(E.main)), E;
2004
2004
  };
2005
2005
  let v;
2006
2006
  return t === "light" ? v = An() : t === "dark" && (v = zn()), process.env.NODE_ENV !== "production" && (v || console.error(`MUI: The palette mode \`${t}\` is not supported.`)), xe({
@@ -2109,7 +2109,7 @@ function ai(e, t) {
2109
2109
  ...y
2110
2110
  } = typeof t == "function" ? t(e) : t;
2111
2111
  process.env.NODE_ENV !== "production" && (typeof o != "number" && console.error("MUI: `fontSize` is required to be a number."), typeof h != "number" && console.error("MUI: `htmlFontSize` is required to be a number."));
2112
- const b = o / 14, S = g || ((E) => `${E / h * b}rem`), v = (E, B, O, W, z) => ({
2112
+ const b = o / 14, S = g || ((E) => `${E / h * b}rem`), v = (E, B, O, _, z) => ({
2113
2113
  fontFamily: n,
2114
2114
  fontWeight: E,
2115
2115
  fontSize: S(B),
@@ -2118,7 +2118,7 @@ function ai(e, t) {
2118
2118
  // The letter spacing was designed for the Roboto font-family. Using the same letter-spacing
2119
2119
  // across font-families can cause issues with the kerning.
2120
2120
  ...n === Yr ? {
2121
- letterSpacing: `${oi(W / B)}em`
2121
+ letterSpacing: `${oi(_ / B)}em`
2122
2122
  } : {},
2123
2123
  ...z,
2124
2124
  ...u
@@ -2305,7 +2305,7 @@ function xr(e = {}, ...t) {
2305
2305
  if (e.vars && // The error should throw only for the root theme creation because user is not allowed to use a custom node `vars`.
2306
2306
  // `generateThemeVars` is the closest identifier for checking that the `options` is a result of `createTheme` with CSS variables so that user can create new theme for nested ThemeProvider.
2307
2307
  e.generateThemeVars === void 0)
2308
- throw new Error(process.env.NODE_ENV !== "production" ? "MUI: `vars` is a private field used for CSS variables support.\nPlease use another name or follow the [docs](https://mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature." : Fe(20));
2308
+ throw new Error(process.env.NODE_ENV !== "production" ? "MUI: `vars` is a private field used for CSS variables support.\nPlease use another name or follow the [docs](https://mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature." : Ve(20));
2309
2309
  const y = Ir({
2310
2310
  ...i,
2311
2311
  colorSpace: u
@@ -2325,13 +2325,13 @@ function xr(e = {}, ...t) {
2325
2325
  const v = ["active", "checked", "completed", "disabled", "error", "expanded", "focused", "focusVisible", "required", "selected"], D = (E, B) => {
2326
2326
  let O;
2327
2327
  for (O in E) {
2328
- const W = E[O];
2329
- if (v.includes(O) && Object.keys(W).length > 0) {
2328
+ const _ = E[O];
2329
+ if (v.includes(O) && Object.keys(_).length > 0) {
2330
2330
  if (process.env.NODE_ENV !== "production") {
2331
2331
  const z = Er("", O);
2332
2332
  console.error([`MUI: The \`${B}\` component increases the CSS specificity of the \`${O}\` internal state.`, "You can not override it like this: ", JSON.stringify(E, null, 2), "", `Instead, you need to use the '&.${z}' syntax:`, JSON.stringify({
2333
2333
  root: {
2334
- [`&.${z}`]: W
2334
+ [`&.${z}`]: _
2335
2335
  }
2336
2336
  }, null, 2), "", "https://mui.com/r/state-classes-guide"].join(`
2337
2337
  `));
@@ -2465,7 +2465,7 @@ const Ae = (e) => {
2465
2465
  return e();
2466
2466
  } catch {
2467
2467
  }
2468
- }, ki = (e = "mui") => Fa(e);
2468
+ }, ki = (e = "mui") => Va(e);
2469
2469
  function dr(e, t, n, o, a) {
2470
2470
  if (!n)
2471
2471
  return;
@@ -2524,12 +2524,12 @@ function Ii(e = {}, ...t) {
2524
2524
  } = n, O = {
2525
2525
  ...B
2526
2526
  };
2527
- let W = v;
2528
- if ((b === "dark" && !("dark" in n) || b === "light" && !("light" in n)) && (W = !0), !W)
2529
- throw new Error(process.env.NODE_ENV !== "production" ? `MUI: The \`colorSchemes.${b}\` option is either missing or invalid.` : Fe(21, b));
2527
+ let _ = v;
2528
+ if ((b === "dark" && !("dark" in n) || b === "light" && !("light" in n)) && (_ = !0), !_)
2529
+ throw new Error(process.env.NODE_ENV !== "production" ? `MUI: The \`colorSchemes.${b}\` option is either missing or invalid.` : Ve(21, b));
2530
2530
  let z;
2531
2531
  l && (z = "oklch");
2532
- const Q = dr(z, O, W, g, b);
2532
+ const Q = dr(z, O, _, g, b);
2533
2533
  D && !O.light && dr(z, O, D, void 0, "light"), E && !O.dark && dr(z, O, E, void 0, "dark");
2534
2534
  let I = {
2535
2535
  defaultColorScheme: b,
@@ -2545,8 +2545,8 @@ function Ii(e = {}, ...t) {
2545
2545
  },
2546
2546
  spacing: Ei(g.spacing)
2547
2547
  };
2548
- Object.keys(I.colorSchemes).forEach((V) => {
2549
- const s = I.colorSchemes[V].palette, k = (A) => {
2548
+ Object.keys(I.colorSchemes).forEach((W) => {
2549
+ const s = I.colorSchemes[W].palette, k = (A) => {
2550
2550
  const R = A.split("-"), re = R[1], H = R[2];
2551
2551
  return S(A, s[re][H]);
2552
2552
  };
@@ -2572,8 +2572,8 @@ function Ii(e = {}, ...t) {
2572
2572
  const R = s[A];
2573
2573
  A !== "tonalOffset" && R && typeof R == "object" && (R.main && p(s[A], "mainChannel", Ct(wt(R.main))), R.light && p(s[A], "lightChannel", Ct(wt(R.light))), R.dark && p(s[A], "darkChannel", Ct(wt(R.dark))), R.contrastText && p(s[A], "contrastTextChannel", Ct(wt(R.contrastText))), A === "text" && (Oe(s[A], "primary"), Oe(s[A], "secondary")), A === "action" && (R.active && Oe(s[A], "active"), R.selected && Oe(s[A], "selected")));
2574
2574
  });
2575
- }), I = t.reduce((V, s) => xe(V, s), I);
2576
- const _ = {
2575
+ }), I = t.reduce((W, s) => xe(W, s), I);
2576
+ const F = {
2577
2577
  prefix: i,
2578
2578
  disableCssColorScheme: a,
2579
2579
  shouldSkipGeneratingVar: c,
@@ -2583,9 +2583,9 @@ function Ii(e = {}, ...t) {
2583
2583
  vars: j,
2584
2584
  generateThemeVars: N,
2585
2585
  generateStyleSheets: le
2586
- } = qa(I, _);
2587
- return I.vars = j, Object.entries(I.colorSchemes[I.defaultColorScheme]).forEach(([V, s]) => {
2588
- I[V] = s;
2586
+ } = qa(I, F);
2587
+ return I.vars = j, Object.entries(I.colorSchemes[I.defaultColorScheme]).forEach(([W, s]) => {
2588
+ I[W] = s;
2589
2589
  }), I.generateThemeVars = N, I.generateStyleSheets = le, I.generateSpacing = function() {
2590
2590
  return Cn(g.spacing, Sr(this));
2591
2591
  }, I.getColorSchemeSelector = Ga(h), I.spacing = I.generateSpacing(), I.shouldSkipGeneratingVar = c, I.unstable_sxConfig = {
@@ -2660,10 +2660,10 @@ const Pi = (e) => zi(e) && e !== "classes", Bi = Da({
2660
2660
  themeId: Di,
2661
2661
  defaultTheme: Ai,
2662
2662
  rootShouldForwardProp: Pi
2663
- }), Oi = Va;
2663
+ }), Oi = Wa;
2664
2664
  process.env.NODE_ENV !== "production" && (K.node, K.object.isRequired);
2665
2665
  function Ni(e) {
2666
- return Wa(e);
2666
+ return _a(e);
2667
2667
  }
2668
2668
  function Ri(e) {
2669
2669
  return Er("MuiSvgIcon", e);
@@ -2779,7 +2779,7 @@ const Mi = (e) => {
2779
2779
  }
2780
2780
  ]
2781
2781
  };
2782
- })), Ft = /* @__PURE__ */ Ve.forwardRef(function(t, n) {
2782
+ })), Vt = /* @__PURE__ */ We.forwardRef(function(t, n) {
2783
2783
  const o = Ni({
2784
2784
  props: t,
2785
2785
  name: "MuiSvgIcon"
@@ -2794,7 +2794,7 @@ const Mi = (e) => {
2794
2794
  titleAccess: y,
2795
2795
  viewBox: b = "0 0 24 24",
2796
2796
  ...S
2797
- } = o, v = /* @__PURE__ */ Ve.isValidElement(a) && a.type === "svg", D = {
2797
+ } = o, v = /* @__PURE__ */ We.isValidElement(a) && a.type === "svg", D = {
2798
2798
  ...o,
2799
2799
  color: l,
2800
2800
  component: c,
@@ -2823,7 +2823,7 @@ const Mi = (e) => {
2823
2823
  }) : null]
2824
2824
  });
2825
2825
  });
2826
- process.env.NODE_ENV !== "production" && (Ft.propTypes = {
2826
+ process.env.NODE_ENV !== "production" && (Vt.propTypes = {
2827
2827
  // ┌────────────────────────────── Warning ──────────────────────────────┐
2828
2828
  // │ These PropTypes are generated from the TypeScript type definitions. │
2829
2829
  // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
@@ -2895,17 +2895,17 @@ process.env.NODE_ENV !== "production" && (Ft.propTypes = {
2895
2895
  */
2896
2896
  viewBox: K.string
2897
2897
  });
2898
- Ft.muiName = "SvgIcon";
2898
+ Vt.muiName = "SvgIcon";
2899
2899
  function J(e, t) {
2900
2900
  function n(o, a) {
2901
- return /* @__PURE__ */ r(Ft, {
2901
+ return /* @__PURE__ */ r(Vt, {
2902
2902
  "data-testid": process.env.NODE_ENV !== "production" ? `${t}Icon` : void 0,
2903
2903
  ref: a,
2904
2904
  ...o,
2905
2905
  children: e
2906
2906
  });
2907
2907
  }
2908
- return process.env.NODE_ENV !== "production" && (n.displayName = `${t}Icon`), n.muiName = Ft.muiName, /* @__PURE__ */ Ve.memo(/* @__PURE__ */ Ve.forwardRef(n));
2908
+ return process.env.NODE_ENV !== "production" && (n.displayName = `${t}Icon`), n.muiName = Vt.muiName, /* @__PURE__ */ We.memo(/* @__PURE__ */ We.forwardRef(n));
2909
2909
  }
2910
2910
  const Ze = J(/* @__PURE__ */ r("path", {
2911
2911
  d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"
@@ -2932,12 +2932,23 @@ class Ui {
2932
2932
  getBaseUrl() {
2933
2933
  return this.baseUrl;
2934
2934
  }
2935
+ /**
2936
+ * Internal fetch wrapper that includes credentials for Basic Auth support.
2937
+ * Using 'same-origin' ensures the browser sends stored Basic Auth credentials
2938
+ * without embedding them in the URL (which would cause fetch to fail).
2939
+ */
2940
+ async _fetch(t, n) {
2941
+ return fetch(t, {
2942
+ ...n,
2943
+ credentials: "same-origin"
2944
+ });
2945
+ }
2935
2946
  /**
2936
2947
  * Generic fetch method for API requests.
2937
2948
  * Automatically prepends the base URL and /api prefix.
2938
2949
  */
2939
2950
  async fetch(t, n) {
2940
- const o = `${this.baseUrl}/api${t.startsWith("/") ? t : `/${t}`}`, a = await fetch(o, {
2951
+ const o = `${this.baseUrl}/api${t.startsWith("/") ? t : `/${t}`}`, a = await this._fetch(o, {
2941
2952
  ...n,
2942
2953
  headers: {
2943
2954
  "Content-Type": "application/json",
@@ -2972,7 +2983,7 @@ class Ui {
2972
2983
  }
2973
2984
  async checkEndpoint(t) {
2974
2985
  try {
2975
- return (await fetch(`${this.baseUrl}${t}`, { method: "HEAD" })).status !== 404;
2986
+ return (await this._fetch(`${this.baseUrl}${t}`, { method: "HEAD" })).status !== 404;
2976
2987
  } catch {
2977
2988
  return !1;
2978
2989
  }
@@ -2983,13 +2994,13 @@ class Ui {
2983
2994
  async getUsers(t = {}) {
2984
2995
  const n = new URLSearchParams();
2985
2996
  t.limit && n.set("limit", t.limit.toString()), t.page && n.set("page", t.page.toString()), t.search && n.set("q", t.search);
2986
- const o = await fetch(`${this.baseUrl}/api/users?${n}`);
2997
+ const o = await this._fetch(`${this.baseUrl}/api/users?${n}`);
2987
2998
  if (!o.ok)
2988
2999
  throw new Error(`Users request failed: ${o.statusText}`);
2989
3000
  return o.json();
2990
3001
  }
2991
3002
  async getUserById(t) {
2992
- const n = await fetch(`${this.baseUrl}/api/users/${t}`);
3003
+ const n = await this._fetch(`${this.baseUrl}/api/users/${t}`);
2993
3004
  if (!n.ok)
2994
3005
  throw new Error(`User request failed: ${n.statusText}`);
2995
3006
  return n.json();
@@ -2998,7 +3009,7 @@ class Ui {
2998
3009
  // Bans API
2999
3010
  // ==================
3000
3011
  async getBans() {
3001
- const t = await fetch(`${this.baseUrl}/api/bans`);
3012
+ const t = await this._fetch(`${this.baseUrl}/api/bans`);
3002
3013
  if (!t.ok)
3003
3014
  throw new Error(`Bans request failed: ${t.statusText}`);
3004
3015
  return t.json();
@@ -3009,7 +3020,7 @@ class Ui {
3009
3020
  const l = new Date(o), c = /* @__PURE__ */ new Date();
3010
3021
  a = Math.max(0, Math.floor((l.getTime() - c.getTime()) / 1e3));
3011
3022
  }
3012
- const i = await fetch(`${this.baseUrl}/api/bans/email/${encodeURIComponent(t)}`, {
3023
+ const i = await this._fetch(`${this.baseUrl}/api/bans/email/${encodeURIComponent(t)}`, {
3013
3024
  method: "POST",
3014
3025
  headers: { "Content-Type": "application/json" },
3015
3026
  body: JSON.stringify({ reason: n, duration: a })
@@ -3020,14 +3031,14 @@ class Ui {
3020
3031
  }
3021
3032
  }
3022
3033
  async unbanUser(t) {
3023
- const n = await fetch(`${this.baseUrl}/api/bans/email/${encodeURIComponent(t)}`, {
3034
+ const n = await this._fetch(`${this.baseUrl}/api/bans/email/${encodeURIComponent(t)}`, {
3024
3035
  method: "DELETE"
3025
3036
  });
3026
3037
  if (!n.ok)
3027
3038
  throw new Error(`Unban request failed: ${n.statusText}`);
3028
3039
  }
3029
3040
  async checkBan(t) {
3030
- const n = await fetch(`${this.baseUrl}/api/bans/email/${encodeURIComponent(t)}`);
3041
+ const n = await this._fetch(`${this.baseUrl}/api/bans/email/${encodeURIComponent(t)}`);
3031
3042
  if (!n.ok)
3032
3043
  throw new Error(`Ban check failed: ${n.statusText}`);
3033
3044
  return { banned: (await n.json()).isBanned };
@@ -3036,13 +3047,13 @@ class Ui {
3036
3047
  // Entitlements API
3037
3048
  // ==================
3038
3049
  async getEntitlements(t) {
3039
- const n = await fetch(`${this.baseUrl}/api/entitlements/${encodeURIComponent(t)}`);
3050
+ const n = await this._fetch(`${this.baseUrl}/api/entitlements/${encodeURIComponent(t)}`);
3040
3051
  if (!n.ok)
3041
3052
  throw new Error(`Entitlements request failed: ${n.statusText}`);
3042
3053
  return n.json();
3043
3054
  }
3044
3055
  async refreshEntitlements(t) {
3045
- const n = await fetch(`${this.baseUrl}/api/entitlements/${encodeURIComponent(t)}/refresh`, {
3056
+ const n = await this._fetch(`${this.baseUrl}/api/entitlements/${encodeURIComponent(t)}/refresh`, {
3046
3057
  method: "POST"
3047
3058
  });
3048
3059
  if (!n.ok)
@@ -3050,7 +3061,7 @@ class Ui {
3050
3061
  return n.json();
3051
3062
  }
3052
3063
  async checkEntitlement(t, n) {
3053
- const o = await fetch(
3064
+ const o = await this._fetch(
3054
3065
  `${this.baseUrl}/api/entitlements/${encodeURIComponent(t)}/check/${encodeURIComponent(n)}`
3055
3066
  );
3056
3067
  if (!o.ok)
@@ -3058,13 +3069,13 @@ class Ui {
3058
3069
  return o.json();
3059
3070
  }
3060
3071
  async getAvailableEntitlements() {
3061
- const t = await fetch(`${this.baseUrl}/api/entitlements/available`);
3072
+ const t = await this._fetch(`${this.baseUrl}/api/entitlements/available`);
3062
3073
  if (!t.ok)
3063
3074
  throw new Error(`Available entitlements request failed: ${t.statusText}`);
3064
3075
  return (await t.json()).entitlements;
3065
3076
  }
3066
3077
  async grantEntitlement(t, n) {
3067
- const o = await fetch(`${this.baseUrl}/api/entitlements/${encodeURIComponent(t)}`, {
3078
+ const o = await this._fetch(`${this.baseUrl}/api/entitlements/${encodeURIComponent(t)}`, {
3068
3079
  method: "POST",
3069
3080
  headers: { "Content-Type": "application/json" },
3070
3081
  body: JSON.stringify({ entitlement: n })
@@ -3075,7 +3086,7 @@ class Ui {
3075
3086
  }
3076
3087
  }
3077
3088
  async revokeEntitlement(t, n) {
3078
- const o = await fetch(
3089
+ const o = await this._fetch(
3079
3090
  `${this.baseUrl}/api/entitlements/${encodeURIComponent(t)}/${encodeURIComponent(n)}`,
3080
3091
  { method: "DELETE" }
3081
3092
  );
@@ -3083,14 +3094,14 @@ class Ui {
3083
3094
  throw new Error(`Revoke entitlement failed: ${o.statusText}`);
3084
3095
  }
3085
3096
  async invalidateEntitlementCache(t) {
3086
- const n = await fetch(`${this.baseUrl}/api/entitlements/cache/${encodeURIComponent(t)}`, {
3097
+ const n = await this._fetch(`${this.baseUrl}/api/entitlements/cache/${encodeURIComponent(t)}`, {
3087
3098
  method: "DELETE"
3088
3099
  });
3089
3100
  if (!n.ok)
3090
3101
  throw new Error(`Cache invalidation failed: ${n.statusText}`);
3091
3102
  }
3092
3103
  async getEntitlementsStatus() {
3093
- const t = await fetch(`${this.baseUrl}/api/entitlements/status`);
3104
+ const t = await this._fetch(`${this.baseUrl}/api/entitlements/status`);
3094
3105
  if (!t.ok)
3095
3106
  throw new Error(`Entitlements status request failed: ${t.statusText}`);
3096
3107
  return t.json();
@@ -3099,25 +3110,25 @@ class Ui {
3099
3110
  // Health API
3100
3111
  // ==================
3101
3112
  async getHealth() {
3102
- const t = await fetch(`${this.baseUrl}/api/health`);
3113
+ const t = await this._fetch(`${this.baseUrl}/api/health`);
3103
3114
  if (!t.ok)
3104
3115
  throw new Error(`Health check failed: ${t.statusText}`);
3105
3116
  return t.json();
3106
3117
  }
3107
3118
  async getInfo() {
3108
- const t = await fetch(`${this.baseUrl}/api/info`);
3119
+ const t = await this._fetch(`${this.baseUrl}/api/info`);
3109
3120
  if (!t.ok)
3110
3121
  throw new Error(`Info request failed: ${t.statusText}`);
3111
3122
  return t.json();
3112
3123
  }
3113
3124
  async getDiagnostics() {
3114
- const t = await fetch(`${this.baseUrl}/api/diagnostics`);
3125
+ const t = await this._fetch(`${this.baseUrl}/api/diagnostics`);
3115
3126
  if (!t.ok)
3116
3127
  throw new Error(`Diagnostics request failed: ${t.statusText}`);
3117
3128
  return t.json();
3118
3129
  }
3119
3130
  async getConfig() {
3120
- const t = await fetch(`${this.baseUrl}/api/config`);
3131
+ const t = await this._fetch(`${this.baseUrl}/api/config`);
3121
3132
  if (!t.ok)
3122
3133
  throw new Error(`Config request failed: ${t.statusText}`);
3123
3134
  return t.json();
@@ -3125,13 +3136,13 @@ class Ui {
3125
3136
  async getLogs(t = {}) {
3126
3137
  const n = new URLSearchParams();
3127
3138
  t.source && n.set("source", t.source), t.level && n.set("level", t.level), t.search && n.set("search", t.search), t.limit && n.set("limit", t.limit.toString()), t.page && n.set("page", t.page.toString());
3128
- const o = await fetch(`${this.baseUrl}/api/logs?${n}`);
3139
+ const o = await this._fetch(`${this.baseUrl}/api/logs?${n}`);
3129
3140
  if (!o.ok)
3130
3141
  throw new Error(`Logs request failed: ${o.statusText}`);
3131
3142
  return o.json();
3132
3143
  }
3133
3144
  async getLogSources() {
3134
- const t = await fetch(`${this.baseUrl}/api/logs/sources`);
3145
+ const t = await this._fetch(`${this.baseUrl}/api/logs/sources`);
3135
3146
  if (!t.ok)
3136
3147
  throw new Error(`Log sources request failed: ${t.statusText}`);
3137
3148
  return (await t.json()).sources;
@@ -3140,13 +3151,13 @@ class Ui {
3140
3151
  // Plugins API
3141
3152
  // ==================
3142
3153
  async getPlugins() {
3143
- const t = await fetch(`${this.baseUrl}/api/plugins`);
3154
+ const t = await this._fetch(`${this.baseUrl}/api/plugins`);
3144
3155
  if (!t.ok)
3145
3156
  throw new Error(`Plugins request failed: ${t.statusText}`);
3146
3157
  return t.json();
3147
3158
  }
3148
3159
  async getPluginDetail(t) {
3149
- const n = await fetch(`${this.baseUrl}/api/plugins/${encodeURIComponent(t)}`);
3160
+ const n = await this._fetch(`${this.baseUrl}/api/plugins/${encodeURIComponent(t)}`);
3150
3161
  if (!n.ok)
3151
3162
  throw n.status === 404 ? new Error(`Plugin not found: ${t}`) : new Error(`Plugin detail request failed: ${n.statusText}`);
3152
3163
  return n.json();
@@ -3155,7 +3166,7 @@ class Ui {
3155
3166
  // UI Contributions API
3156
3167
  // ==================
3157
3168
  async getUiContributions() {
3158
- const t = await fetch(`${this.baseUrl}/api/ui-contributions`);
3169
+ const t = await this._fetch(`${this.baseUrl}/api/ui-contributions`);
3159
3170
  if (!t.ok)
3160
3171
  throw new Error(`UI contributions request failed: ${t.statusText}`);
3161
3172
  return t.json();
@@ -3164,7 +3175,7 @@ class Ui {
3164
3175
  // Auth Config API
3165
3176
  // ==================
3166
3177
  async getAuthConfigStatus() {
3167
- const t = await fetch(`${this.baseUrl}/api/auth/config/status`);
3178
+ const t = await this._fetch(`${this.baseUrl}/api/auth/config/status`);
3168
3179
  if (!t.ok) {
3169
3180
  if (t.status === 404)
3170
3181
  return { state: "disabled", adapter: null };
@@ -3173,7 +3184,7 @@ class Ui {
3173
3184
  return t.json();
3174
3185
  }
3175
3186
  async getAuthConfig() {
3176
- const t = await fetch(`${this.baseUrl}/api/auth/config`);
3187
+ const t = await this._fetch(`${this.baseUrl}/api/auth/config`);
3177
3188
  if (!t.ok) {
3178
3189
  if (t.status === 404)
3179
3190
  return { state: "disabled", adapter: null };
@@ -3185,7 +3196,7 @@ class Ui {
3185
3196
  * Update auth configuration (save to database for hot-reload)
3186
3197
  */
3187
3198
  async updateAuthConfig(t) {
3188
- const n = await fetch(`${this.baseUrl}/api/auth/config`, {
3199
+ const n = await this._fetch(`${this.baseUrl}/api/auth/config`, {
3189
3200
  method: "PUT",
3190
3201
  headers: { "Content-Type": "application/json" },
3191
3202
  body: JSON.stringify(t)
@@ -3200,7 +3211,7 @@ class Ui {
3200
3211
  * Delete auth configuration (revert to environment variables)
3201
3212
  */
3202
3213
  async deleteAuthConfig() {
3203
- const t = await fetch(`${this.baseUrl}/api/auth/config`, {
3214
+ const t = await this._fetch(`${this.baseUrl}/api/auth/config`, {
3204
3215
  method: "DELETE"
3205
3216
  });
3206
3217
  if (!t.ok) {
@@ -3213,7 +3224,7 @@ class Ui {
3213
3224
  * Test auth provider connection without saving
3214
3225
  */
3215
3226
  async testAuthProvider(t) {
3216
- const n = await fetch(`${this.baseUrl}/api/auth/test-provider`, {
3227
+ const n = await this._fetch(`${this.baseUrl}/api/auth/test-provider`, {
3217
3228
  method: "POST",
3218
3229
  headers: { "Content-Type": "application/json" },
3219
3230
  body: JSON.stringify(t)
@@ -3228,7 +3239,7 @@ class Ui {
3228
3239
  * Test current auth provider connection (uses existing env/runtime config)
3229
3240
  */
3230
3241
  async testCurrentAuthProvider() {
3231
- const t = await fetch(`${this.baseUrl}/api/auth/test-current`, {
3242
+ const t = await this._fetch(`${this.baseUrl}/api/auth/test-current`, {
3232
3243
  method: "POST",
3233
3244
  headers: { "Content-Type": "application/json" }
3234
3245
  });
@@ -3242,13 +3253,13 @@ class Ui {
3242
3253
  // Rate Limit Config API
3243
3254
  // ==================
3244
3255
  async getRateLimitConfig() {
3245
- const t = await fetch(`${this.baseUrl}/api/rate-limit/config`);
3256
+ const t = await this._fetch(`${this.baseUrl}/api/rate-limit/config`);
3246
3257
  if (!t.ok)
3247
3258
  throw new Error(`Rate limit config request failed: ${t.statusText}`);
3248
3259
  return t.json();
3249
3260
  }
3250
3261
  async updateRateLimitConfig(t) {
3251
- const n = await fetch(`${this.baseUrl}/api/rate-limit/config`, {
3262
+ const n = await this._fetch(`${this.baseUrl}/api/rate-limit/config`, {
3252
3263
  method: "PUT",
3253
3264
  headers: { "Content-Type": "application/json" },
3254
3265
  body: JSON.stringify(t)
@@ -3263,19 +3274,19 @@ class Ui {
3263
3274
  // Notifications API
3264
3275
  // ==================
3265
3276
  async getNotificationsStats() {
3266
- const t = await fetch(`${this.baseUrl}/api/notifications/stats`);
3277
+ const t = await this._fetch(`${this.baseUrl}/api/notifications/stats`);
3267
3278
  if (!t.ok)
3268
3279
  throw new Error(`Notifications stats request failed: ${t.statusText}`);
3269
3280
  return t.json();
3270
3281
  }
3271
3282
  async getNotificationsClients() {
3272
- const t = await fetch(`${this.baseUrl}/api/notifications/clients`);
3283
+ const t = await this._fetch(`${this.baseUrl}/api/notifications/clients`);
3273
3284
  if (!t.ok)
3274
3285
  throw new Error(`Notifications clients request failed: ${t.statusText}`);
3275
3286
  return t.json();
3276
3287
  }
3277
3288
  async disconnectNotificationsClient(t) {
3278
- const n = await fetch(`${this.baseUrl}/api/notifications/clients/${encodeURIComponent(t)}`, {
3289
+ const n = await this._fetch(`${this.baseUrl}/api/notifications/clients/${encodeURIComponent(t)}`, {
3279
3290
  method: "DELETE"
3280
3291
  });
3281
3292
  if (!n.ok) {
@@ -3285,7 +3296,7 @@ class Ui {
3285
3296
  return n.json();
3286
3297
  }
3287
3298
  async forceNotificationsReconnect() {
3288
- const t = await fetch(`${this.baseUrl}/api/notifications/reconnect`, {
3299
+ const t = await this._fetch(`${this.baseUrl}/api/notifications/reconnect`, {
3289
3300
  method: "POST"
3290
3301
  });
3291
3302
  if (!t.ok) {
@@ -3318,15 +3329,15 @@ function Ls(e) {
3318
3329
  const { registerWidget: t, unregisterWidget: n } = Rn();
3319
3330
  return C(() => (t(e), null)), () => n(e.id);
3320
3331
  }
3321
- function Wi() {
3332
+ function _i() {
3322
3333
  const { getVisibleWidgets: e } = Rn(), t = e();
3323
- return t.length === 0 ? null : /* @__PURE__ */ r(We, { children: t.map((n) => /* @__PURE__ */ d(f, { sx: { mt: 4 }, children: [
3334
+ return t.length === 0 ? null : /* @__PURE__ */ r(_e, { children: t.map((n) => /* @__PURE__ */ d(f, { sx: { mt: 4 }, children: [
3324
3335
  n.title && /* @__PURE__ */ r($, { variant: "h6", sx: { mb: 2, color: "var(--theme-text-primary)" }, children: n.title }),
3325
3336
  n.component
3326
3337
  ] }, n.id)) });
3327
3338
  }
3328
3339
  const Mn = hn(null);
3329
- function Vi({
3340
+ function Wi({
3330
3341
  initialComponents: e = [],
3331
3342
  children: t
3332
3343
  }) {
@@ -3359,17 +3370,17 @@ function Vi({
3359
3370
  );
3360
3371
  return /* @__PURE__ */ r(Mn.Provider, { value: u, children: t });
3361
3372
  }
3362
- function Fi() {
3373
+ function Vi() {
3363
3374
  const e = un(Mn);
3364
3375
  if (!e)
3365
3376
  throw new Error("useWidgetComponentRegistry must be used within a WidgetComponentRegistryProvider");
3366
3377
  return e;
3367
3378
  }
3368
- function _i({
3379
+ function Fi({
3369
3380
  defaultOnly: e = !0,
3370
3381
  additionalWidgetIds: t = []
3371
3382
  }) {
3372
- const [n, o] = C([]), [a, i] = C(!0), [l, c] = C(null), { getComponent: h, hasComponent: u } = Fi();
3383
+ const [n, o] = C([]), [a, i] = C(!0), [l, c] = C(null), { getComponent: h, hasComponent: u } = Vi();
3373
3384
  if (ce(() => {
3374
3385
  (async () => {
3375
3386
  try {
@@ -3386,7 +3397,7 @@ function _i({
3386
3397
  if (l)
3387
3398
  return /* @__PURE__ */ r(de, { severity: "error", sx: { mt: 2 }, children: l });
3388
3399
  const g = n.filter((y) => e ? y.showByDefault || t.includes(y.id) : !0).filter((y) => u(y.component) ? !0 : (console.warn(`Widget "${y.id}" references unregistered component "${y.component}"`), !1)).sort((y, b) => (y.priority ?? 100) - (b.priority ?? 100));
3389
- return g.length === 0 ? null : /* @__PURE__ */ r(We, { children: g.map((y) => {
3400
+ return g.length === 0 ? null : /* @__PURE__ */ r(_e, { children: g.map((y) => {
3390
3401
  const b = h(y.component);
3391
3402
  return /* @__PURE__ */ d(f, { sx: { mt: 4 }, children: [
3392
3403
  y.title && /* @__PURE__ */ r($, { variant: "h6", sx: { mb: 2, color: "var(--theme-text-primary)" }, children: y.title }),
@@ -3722,7 +3733,7 @@ function ts() {
3722
3733
  const u = setInterval(h, 5e3);
3723
3734
  return () => clearInterval(u);
3724
3735
  }, []), a)
3725
- return /* @__PURE__ */ r(L, { sx: { bgcolor: "var(--theme-surface)" }, children: /* @__PURE__ */ r(U, { children: /* @__PURE__ */ r(_t, {}) }) });
3736
+ return /* @__PURE__ */ r(L, { sx: { bgcolor: "var(--theme-surface)" }, children: /* @__PURE__ */ r(U, { children: /* @__PURE__ */ r(Ft, {}) }) });
3726
3737
  if (n)
3727
3738
  return /* @__PURE__ */ r(L, { sx: { bgcolor: "var(--theme-surface)", border: "1px solid var(--theme-border)" }, children: /* @__PURE__ */ r(U, { children: /* @__PURE__ */ d(f, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
3728
3739
  /* @__PURE__ */ r(rn, { sx: { color: "var(--theme-text-secondary)" } }),
@@ -3917,8 +3928,8 @@ function os() {
3917
3928
  ] }) })
3918
3929
  }
3919
3930
  ),
3920
- /* @__PURE__ */ r(_i, {}),
3921
- /* @__PURE__ */ r(Wi, {})
3931
+ /* @__PURE__ */ r(Fi, {}),
3932
+ /* @__PURE__ */ r(_i, {})
3922
3933
  ] });
3923
3934
  }
3924
3935
  const Ar = J(/* @__PURE__ */ r("path", {
@@ -3954,7 +3965,7 @@ function nn(e) {
3954
3965
  }
3955
3966
  }
3956
3967
  function ds() {
3957
- const [e, t] = C([]), [n, o] = C([]), [a, i] = C(!0), [l, c] = C(null), [h, u] = C(""), [g, y] = C(""), [b, S] = C(""), [v, D] = C(1), [E, B] = C(0), O = 50, [W, z] = C(!1), [Q, I] = C("desc"), _ = qn(null), j = {
3968
+ const [e, t] = C([]), [n, o] = C([]), [a, i] = C(!0), [l, c] = C(null), [h, u] = C(""), [g, y] = C(""), [b, S] = C(""), [v, D] = C(1), [E, B] = C(0), O = 50, [_, z] = C(!1), [Q, I] = C("desc"), F = qn(null), j = {
3958
3969
  total: E,
3959
3970
  errors: e.filter((m) => m.level.toLowerCase() === "error").length,
3960
3971
  warnings: e.filter((m) => ["warn", "warning"].includes(m.level.toLowerCase())).length,
@@ -3990,10 +4001,10 @@ function ds() {
3990
4001
  le();
3991
4002
  }, []), ce(() => {
3992
4003
  N();
3993
- }, [N]), ce(() => (W ? _.current = setInterval(N, 5e3) : _.current && (clearInterval(_.current), _.current = null), () => {
3994
- _.current && clearInterval(_.current);
3995
- }), [W, N]);
3996
- const V = () => {
4004
+ }, [N]), ce(() => (_ ? F.current = setInterval(N, 5e3) : F.current && (clearInterval(F.current), F.current = null), () => {
4005
+ F.current && clearInterval(F.current);
4006
+ }), [_, N]);
4007
+ const W = () => {
3997
4008
  D(1), N();
3998
4009
  }, s = (m, A) => {
3999
4010
  A !== null && I(A);
@@ -4072,13 +4083,13 @@ function ds() {
4072
4083
  )
4073
4084
  ] }),
4074
4085
  /* @__PURE__ */ r(
4075
- F,
4086
+ V,
4076
4087
  {
4077
4088
  size: "small",
4078
4089
  placeholder: "Search logs...",
4079
4090
  value: b,
4080
4091
  onChange: (m) => S(m.target.value),
4081
- onKeyPress: (m) => m.key === "Enter" && V(),
4092
+ onKeyPress: (m) => m.key === "Enter" && W(),
4082
4093
  sx: {
4083
4094
  flex: 1,
4084
4095
  minWidth: 200,
@@ -4103,21 +4114,21 @@ function ds() {
4103
4114
  ]
4104
4115
  }
4105
4116
  ),
4106
- /* @__PURE__ */ r(Ee, { title: W ? "Pause auto-refresh" : "Enable auto-refresh (5s)", children: /* @__PURE__ */ r(
4117
+ /* @__PURE__ */ r(Ee, { title: _ ? "Pause auto-refresh" : "Enable auto-refresh (5s)", children: /* @__PURE__ */ r(
4107
4118
  De,
4108
4119
  {
4109
- onClick: () => z(!W),
4120
+ onClick: () => z(!_),
4110
4121
  sx: {
4111
- color: W ? "var(--theme-success)" : "var(--theme-text-secondary)",
4112
- bgcolor: W ? "var(--theme-success)20" : "transparent"
4122
+ color: _ ? "var(--theme-success)" : "var(--theme-text-secondary)",
4123
+ bgcolor: _ ? "var(--theme-success)20" : "transparent"
4113
4124
  },
4114
- children: W ? /* @__PURE__ */ r(as, {}) : /* @__PURE__ */ r(Cr, {})
4125
+ children: _ ? /* @__PURE__ */ r(as, {}) : /* @__PURE__ */ r(Cr, {})
4115
4126
  }
4116
4127
  ) }),
4117
4128
  /* @__PURE__ */ r(Ee, { title: "Refresh", children: /* @__PURE__ */ r(De, { onClick: N, sx: { color: "var(--theme-primary)" }, children: /* @__PURE__ */ r(Ar, {}) }) })
4118
4129
  ] }) }) }),
4119
4130
  l && /* @__PURE__ */ r(L, { sx: { mb: 3, bgcolor: "var(--theme-surface)", border: "1px solid var(--theme-error)" }, children: /* @__PURE__ */ r(U, { children: /* @__PURE__ */ r($, { color: "error", children: l }) }) }),
4120
- /* @__PURE__ */ r(L, { sx: { bgcolor: "var(--theme-surface)" }, children: a ? /* @__PURE__ */ r(f, { sx: { display: "flex", justifyContent: "center", p: 4 }, children: /* @__PURE__ */ r(me, {}) }) : e.length === 0 ? /* @__PURE__ */ r(U, { children: /* @__PURE__ */ r($, { sx: { color: "var(--theme-text-secondary)", textAlign: "center" }, children: "No logs found" }) }) : /* @__PURE__ */ d(We, { children: [
4131
+ /* @__PURE__ */ r(L, { sx: { bgcolor: "var(--theme-surface)" }, children: a ? /* @__PURE__ */ r(f, { sx: { display: "flex", justifyContent: "center", p: 4 }, children: /* @__PURE__ */ r(me, {}) }) : e.length === 0 ? /* @__PURE__ */ r(U, { children: /* @__PURE__ */ r($, { sx: { color: "var(--theme-text-secondary)", textAlign: "center" }, children: "No logs found" }) }) : /* @__PURE__ */ d(_e, { children: [
4121
4132
  /* @__PURE__ */ r(it, { children: /* @__PURE__ */ d(st, { size: "small", children: [
4122
4133
  /* @__PURE__ */ r(lt, { children: /* @__PURE__ */ d(fe, { children: [
4123
4134
  /* @__PURE__ */ r(P, { sx: { color: "var(--theme-text-secondary)", borderColor: "var(--theme-border)", width: 180 }, children: "Timestamp" }),
@@ -4316,7 +4327,7 @@ function vs() {
4316
4327
  /* @__PURE__ */ r($, { sx: { color: "var(--theme-text-primary)" }, children: mr((e == null ? void 0 : e.system.memory.used) || 0) })
4317
4328
  ] }),
4318
4329
  /* @__PURE__ */ r(
4319
- _t,
4330
+ Ft,
4320
4331
  {
4321
4332
  variant: "determinate",
4322
4333
  value: b,
@@ -4523,7 +4534,7 @@ const an = {
4523
4534
  };
4524
4535
  function Es() {
4525
4536
  var je, mt, Ot;
4526
- const [e, t] = C(null), [n, o] = C(!0), [a, i] = C(null), [l, c] = C(null), [h, u] = C(!1), [g, y] = C(!1), [b, S] = C(!1), [v, D] = C(null), [E, B] = C(""), [O, W] = C(an), [z, Q] = C(sn), [I, _] = C(ln), [j, N] = C(cn), [le, V] = C(!0), [s, k] = C(""), [m, A] = C({
4537
+ const [e, t] = C(null), [n, o] = C(!0), [a, i] = C(null), [l, c] = C(null), [h, u] = C(!1), [g, y] = C(!1), [b, S] = C(!1), [v, D] = C(null), [E, B] = C(""), [O, _] = C(an), [z, Q] = C(sn), [I, F] = C(ln), [j, N] = C(cn), [le, W] = C(!0), [s, k] = C(""), [m, A] = C({
4527
4538
  enabled: !1,
4528
4539
  clientId: "",
4529
4540
  clientSecret: ""
@@ -4544,7 +4555,7 @@ function Es() {
4544
4555
  const Te = await q.getAuthConfig();
4545
4556
  if (t(Te), Te.runtimeConfig) {
4546
4557
  const pe = Te.runtimeConfig;
4547
- if (B(pe.adapter || ""), V(pe.settings.authRequired ?? !0), k(((x = pe.settings.excludePaths) == null ? void 0 : x.join(", ")) || ""), pe.config.auth0 && W({ ...an, ...pe.config.auth0 }), pe.config.supabase && Q({ ...sn, ...pe.config.supabase }), pe.config.basic && _({ ...ln, ...pe.config.basic }), pe.config.supertokens) {
4558
+ if (B(pe.adapter || ""), W(pe.settings.authRequired ?? !0), k(((x = pe.settings.excludePaths) == null ? void 0 : x.join(", ")) || ""), pe.config.auth0 && _({ ...an, ...pe.config.auth0 }), pe.config.supabase && Q({ ...sn, ...pe.config.supabase }), pe.config.basic && F({ ...ln, ...pe.config.basic }), pe.config.supertokens) {
4548
4559
  const ge = pe.config.supertokens;
4549
4560
  N({ ...cn, ...ge }), (ae = ge.socialProviders) != null && ae.google && A({
4550
4561
  enabled: !0,
@@ -4672,7 +4683,7 @@ function Es() {
4672
4683
  return /* @__PURE__ */ d(f, { children: [
4673
4684
  /* @__PURE__ */ d(f, { sx: { display: "flex", justifyContent: "space-between", alignItems: "center", mb: 1 }, children: [
4674
4685
  /* @__PURE__ */ r($, { variant: "h4", sx: { color: "var(--theme-text-primary)" }, children: "Authentication" }),
4675
- /* @__PURE__ */ r(f, { sx: { display: "flex", gap: 1 }, children: !h && /* @__PURE__ */ d(We, { children: [
4686
+ /* @__PURE__ */ r(f, { sx: { display: "flex", gap: 1 }, children: !h && /* @__PURE__ */ d(_e, { children: [
4676
4687
  /* @__PURE__ */ r(Ee, { title: "Edit Configuration", children: /* @__PURE__ */ r(De, { onClick: ze, sx: { color: "var(--theme-primary)" }, children: /* @__PURE__ */ r(wr, {}) }) }),
4677
4688
  /* @__PURE__ */ r(Ee, { title: "Refresh", children: /* @__PURE__ */ r(De, { onClick: T, sx: { color: "var(--theme-text-secondary)" }, children: /* @__PURE__ */ r(Ar, {}) }) })
4678
4689
  ] }) })
@@ -4709,7 +4720,7 @@ function Es() {
4709
4720
  bt,
4710
4721
  {
4711
4722
  checked: le,
4712
- onChange: (x) => V(x.target.checked),
4723
+ onChange: (x) => W(x.target.checked),
4713
4724
  sx: { "& .MuiSwitch-switchBase.Mui-checked": { color: "var(--theme-primary)" } }
4714
4725
  }
4715
4726
  ),
@@ -4718,7 +4729,7 @@ function Es() {
4718
4729
  }
4719
4730
  ),
4720
4731
  /* @__PURE__ */ r(
4721
- F,
4732
+ V,
4722
4733
  {
4723
4734
  label: "Exclude Paths (comma-separated)",
4724
4735
  value: s,
@@ -4734,65 +4745,65 @@ function Es() {
4734
4745
  /* @__PURE__ */ r($, { variant: "h6", sx: { color: "var(--theme-text-primary)", mb: 2 }, children: "Auth0 Configuration" }),
4735
4746
  /* @__PURE__ */ d(f, { sx: { display: "grid", gridTemplateColumns: { xs: "1fr", md: "1fr 1fr" }, gap: 2 }, children: [
4736
4747
  /* @__PURE__ */ r(
4737
- F,
4748
+ V,
4738
4749
  {
4739
4750
  label: "Domain",
4740
4751
  value: O.domain,
4741
- onChange: (x) => W({ ...O, domain: x.target.value }),
4752
+ onChange: (x) => _({ ...O, domain: x.target.value }),
4742
4753
  required: !0,
4743
4754
  placeholder: "your-tenant.auth0.com",
4744
4755
  sx: { "& .MuiInputBase-input": { color: "var(--theme-text-primary)" } }
4745
4756
  }
4746
4757
  ),
4747
4758
  /* @__PURE__ */ r(
4748
- F,
4759
+ V,
4749
4760
  {
4750
4761
  label: "Client ID",
4751
4762
  value: O.clientId,
4752
- onChange: (x) => W({ ...O, clientId: x.target.value }),
4763
+ onChange: (x) => _({ ...O, clientId: x.target.value }),
4753
4764
  required: !0,
4754
4765
  sx: { "& .MuiInputBase-input": { color: "var(--theme-text-primary)" } }
4755
4766
  }
4756
4767
  ),
4757
4768
  /* @__PURE__ */ r(
4758
- F,
4769
+ V,
4759
4770
  {
4760
4771
  label: "Client Secret",
4761
4772
  type: "password",
4762
4773
  value: O.clientSecret,
4763
- onChange: (x) => W({ ...O, clientSecret: x.target.value }),
4774
+ onChange: (x) => _({ ...O, clientSecret: x.target.value }),
4764
4775
  required: !0,
4765
4776
  sx: { "& .MuiInputBase-input": { color: "var(--theme-text-primary)" } }
4766
4777
  }
4767
4778
  ),
4768
4779
  /* @__PURE__ */ r(
4769
- F,
4780
+ V,
4770
4781
  {
4771
4782
  label: "Base URL",
4772
4783
  value: O.baseUrl,
4773
- onChange: (x) => W({ ...O, baseUrl: x.target.value }),
4784
+ onChange: (x) => _({ ...O, baseUrl: x.target.value }),
4774
4785
  required: !0,
4775
4786
  placeholder: "https://your-app.com",
4776
4787
  sx: { "& .MuiInputBase-input": { color: "var(--theme-text-primary)" } }
4777
4788
  }
4778
4789
  ),
4779
4790
  /* @__PURE__ */ r(
4780
- F,
4791
+ V,
4781
4792
  {
4782
4793
  label: "Session Secret",
4783
4794
  type: "password",
4784
4795
  value: O.secret,
4785
- onChange: (x) => W({ ...O, secret: x.target.value }),
4796
+ onChange: (x) => _({ ...O, secret: x.target.value }),
4786
4797
  required: !0,
4787
4798
  sx: { "& .MuiInputBase-input": { color: "var(--theme-text-primary)" } }
4788
4799
  }
4789
4800
  ),
4790
4801
  /* @__PURE__ */ r(
4791
- F,
4802
+ V,
4792
4803
  {
4793
4804
  label: "API Audience (optional)",
4794
4805
  value: O.audience || "",
4795
- onChange: (x) => W({ ...O, audience: x.target.value }),
4806
+ onChange: (x) => _({ ...O, audience: x.target.value }),
4796
4807
  sx: { "& .MuiInputBase-input": { color: "var(--theme-text-primary)" } }
4797
4808
  }
4798
4809
  )
@@ -4802,7 +4813,7 @@ function Es() {
4802
4813
  /* @__PURE__ */ r($, { variant: "h6", sx: { color: "var(--theme-text-primary)", mb: 2 }, children: "Supabase Configuration" }),
4803
4814
  /* @__PURE__ */ d(f, { sx: { display: "grid", gridTemplateColumns: { xs: "1fr", md: "1fr 1fr" }, gap: 2 }, children: [
4804
4815
  /* @__PURE__ */ r(
4805
- F,
4816
+ V,
4806
4817
  {
4807
4818
  label: "Project URL",
4808
4819
  value: z.url,
@@ -4813,7 +4824,7 @@ function Es() {
4813
4824
  }
4814
4825
  ),
4815
4826
  /* @__PURE__ */ r(
4816
- F,
4827
+ V,
4817
4828
  {
4818
4829
  label: "Anon Key",
4819
4830
  type: "password",
@@ -4829,44 +4840,44 @@ function Es() {
4829
4840
  /* @__PURE__ */ r($, { variant: "h6", sx: { color: "var(--theme-text-primary)", mb: 2 }, children: "Basic Auth Configuration" }),
4830
4841
  /* @__PURE__ */ d(f, { sx: { display: "grid", gridTemplateColumns: { xs: "1fr", md: "1fr 1fr 1fr" }, gap: 2 }, children: [
4831
4842
  /* @__PURE__ */ r(
4832
- F,
4843
+ V,
4833
4844
  {
4834
4845
  label: "Username",
4835
4846
  value: I.username,
4836
- onChange: (x) => _({ ...I, username: x.target.value }),
4847
+ onChange: (x) => F({ ...I, username: x.target.value }),
4837
4848
  required: !0,
4838
4849
  sx: { "& .MuiInputBase-input": { color: "var(--theme-text-primary)" } }
4839
4850
  }
4840
4851
  ),
4841
4852
  /* @__PURE__ */ r(
4842
- F,
4853
+ V,
4843
4854
  {
4844
4855
  label: "Password",
4845
4856
  type: "password",
4846
4857
  value: I.password,
4847
- onChange: (x) => _({ ...I, password: x.target.value }),
4858
+ onChange: (x) => F({ ...I, password: x.target.value }),
4848
4859
  required: !0,
4849
4860
  sx: { "& .MuiInputBase-input": { color: "var(--theme-text-primary)" } }
4850
4861
  }
4851
4862
  ),
4852
4863
  /* @__PURE__ */ r(
4853
- F,
4864
+ V,
4854
4865
  {
4855
4866
  label: "Realm (optional)",
4856
4867
  value: I.realm || "",
4857
- onChange: (x) => _({ ...I, realm: x.target.value }),
4868
+ onChange: (x) => F({ ...I, realm: x.target.value }),
4858
4869
  placeholder: "Protected Area",
4859
4870
  sx: { "& .MuiInputBase-input": { color: "var(--theme-text-primary)" } }
4860
4871
  }
4861
4872
  )
4862
4873
  ] })
4863
4874
  ] }) }),
4864
- E === "supertokens" && /* @__PURE__ */ d(We, { children: [
4875
+ E === "supertokens" && /* @__PURE__ */ d(_e, { children: [
4865
4876
  /* @__PURE__ */ r(L, { sx: { bgcolor: "var(--theme-surface)", mb: 3 }, children: /* @__PURE__ */ d(U, { children: [
4866
4877
  /* @__PURE__ */ r($, { variant: "h6", sx: { color: "var(--theme-text-primary)", mb: 2 }, children: "SuperTokens Configuration" }),
4867
4878
  /* @__PURE__ */ d(f, { sx: { display: "grid", gridTemplateColumns: { xs: "1fr", md: "1fr 1fr" }, gap: 2 }, children: [
4868
4879
  /* @__PURE__ */ r(
4869
- F,
4880
+ V,
4870
4881
  {
4871
4882
  label: "Connection URI",
4872
4883
  value: j.connectionUri,
@@ -4877,7 +4888,7 @@ function Es() {
4877
4888
  }
4878
4889
  ),
4879
4890
  /* @__PURE__ */ r(
4880
- F,
4891
+ V,
4881
4892
  {
4882
4893
  label: "API Key (optional)",
4883
4894
  type: "password",
@@ -4887,7 +4898,7 @@ function Es() {
4887
4898
  }
4888
4899
  ),
4889
4900
  /* @__PURE__ */ r(
4890
- F,
4901
+ V,
4891
4902
  {
4892
4903
  label: "App Name",
4893
4904
  value: j.appName,
@@ -4897,7 +4908,7 @@ function Es() {
4897
4908
  }
4898
4909
  ),
4899
4910
  /* @__PURE__ */ r(
4900
- F,
4911
+ V,
4901
4912
  {
4902
4913
  label: "API Domain",
4903
4914
  value: j.apiDomain,
@@ -4908,7 +4919,7 @@ function Es() {
4908
4919
  }
4909
4920
  ),
4910
4921
  /* @__PURE__ */ r(
4911
- F,
4922
+ V,
4912
4923
  {
4913
4924
  label: "Website Domain",
4914
4925
  value: j.websiteDomain,
@@ -4919,7 +4930,7 @@ function Es() {
4919
4930
  }
4920
4931
  ),
4921
4932
  /* @__PURE__ */ r(
4922
- F,
4933
+ V,
4923
4934
  {
4924
4935
  label: "API Base Path",
4925
4936
  value: j.apiBasePath || "/auth",
@@ -4981,7 +4992,7 @@ function Es() {
4981
4992
  ),
4982
4993
  m.enabled && /* @__PURE__ */ d(f, { sx: { display: "grid", gridTemplateColumns: { xs: "1fr", md: "1fr 1fr" }, gap: 2, ml: 4 }, children: [
4983
4994
  /* @__PURE__ */ r(
4984
- F,
4995
+ V,
4985
4996
  {
4986
4997
  label: "Client ID",
4987
4998
  size: "small",
@@ -4991,7 +5002,7 @@ function Es() {
4991
5002
  }
4992
5003
  ),
4993
5004
  /* @__PURE__ */ r(
4994
- F,
5005
+ V,
4995
5006
  {
4996
5007
  label: "Client Secret",
4997
5008
  size: "small",
@@ -5021,7 +5032,7 @@ function Es() {
5021
5032
  ),
5022
5033
  R.enabled && /* @__PURE__ */ d(f, { sx: { display: "grid", gridTemplateColumns: { xs: "1fr", md: "1fr 1fr" }, gap: 2, ml: 4 }, children: [
5023
5034
  /* @__PURE__ */ r(
5024
- F,
5035
+ V,
5025
5036
  {
5026
5037
  label: "Client ID",
5027
5038
  size: "small",
@@ -5031,7 +5042,7 @@ function Es() {
5031
5042
  }
5032
5043
  ),
5033
5044
  /* @__PURE__ */ r(
5034
- F,
5045
+ V,
5035
5046
  {
5036
5047
  label: "Client Secret",
5037
5048
  size: "small",
@@ -5061,7 +5072,7 @@ function Es() {
5061
5072
  ),
5062
5073
  H.enabled && /* @__PURE__ */ d(f, { sx: { display: "grid", gridTemplateColumns: { xs: "1fr", md: "1fr 1fr" }, gap: 2, ml: 4 }, children: [
5063
5074
  /* @__PURE__ */ r(
5064
- F,
5075
+ V,
5065
5076
  {
5066
5077
  label: "Client ID",
5067
5078
  size: "small",
@@ -5071,7 +5082,7 @@ function Es() {
5071
5082
  }
5072
5083
  ),
5073
5084
  /* @__PURE__ */ r(
5074
- F,
5085
+ V,
5075
5086
  {
5076
5087
  label: "Client Secret",
5077
5088
  size: "small",
@@ -5082,7 +5093,7 @@ function Es() {
5082
5093
  }
5083
5094
  ),
5084
5095
  /* @__PURE__ */ r(
5085
- F,
5096
+ V,
5086
5097
  {
5087
5098
  label: "Key ID",
5088
5099
  size: "small",
@@ -5092,7 +5103,7 @@ function Es() {
5092
5103
  }
5093
5104
  ),
5094
5105
  /* @__PURE__ */ r(
5095
- F,
5106
+ V,
5096
5107
  {
5097
5108
  label: "Team ID",
5098
5109
  size: "small",
@@ -5174,7 +5185,7 @@ function Es() {
5174
5185
  )
5175
5186
  ] })
5176
5187
  ] })
5177
- ] }) : /* @__PURE__ */ d(We, { children: [
5188
+ ] }) : /* @__PURE__ */ d(_e, { children: [
5178
5189
  /* @__PURE__ */ r(L, { sx: { bgcolor: "var(--theme-surface)", mb: 3 }, children: /* @__PURE__ */ d(U, { children: [
5179
5190
  /* @__PURE__ */ d(f, { sx: { display: "flex", alignItems: "center", gap: 2, mb: 2 }, children: [
5180
5191
  $s((e == null ? void 0 : e.state) || "disabled"),
@@ -5385,7 +5396,7 @@ function As() {
5385
5396
  { id: "system", label: "System", route: "/system", icon: "settings" }
5386
5397
  ];
5387
5398
  }
5388
- function Ws({
5399
+ function _s({
5389
5400
  productName: e = "Control Panel",
5390
5401
  logo: t,
5391
5402
  footerContent: n,
@@ -5408,7 +5419,7 @@ function Ws({
5408
5419
  ...l ? As().filter((z) => !c.includes(z.id)) : [],
5409
5420
  ...i
5410
5421
  ];
5411
- return /* @__PURE__ */ r(Vi, { initialComponents: v, children: /* @__PURE__ */ r(Li, { initialWidgets: o, children: /* @__PURE__ */ r(
5422
+ return /* @__PURE__ */ r(Wi, { initialComponents: v, children: /* @__PURE__ */ r(Li, { initialWidgets: o, children: /* @__PURE__ */ r(
5412
5423
  ho,
5413
5424
  {
5414
5425
  config: go,
@@ -5419,7 +5430,7 @@ function Ws({
5419
5430
  showThemeSwitcher: h,
5420
5431
  showPaletteSwitcher: u,
5421
5432
  children: /* @__PURE__ */ d(Gn, { children: [
5422
- l && /* @__PURE__ */ d(We, { children: [
5433
+ l && /* @__PURE__ */ d(_e, { children: [
5423
5434
  !c.includes("dashboard") && /* @__PURE__ */ r(gt, { path: "/", element: /* @__PURE__ */ r(os, {}) }),
5424
5435
  !c.includes("logs") && /* @__PURE__ */ r(gt, { path: "/logs", element: /* @__PURE__ */ r(ds, {}) }),
5425
5436
  !c.includes("auth") && /* @__PURE__ */ r(gt, { path: "/auth", element: /* @__PURE__ */ r(Es, {}) }),
@@ -5434,7 +5445,7 @@ function Ws({
5434
5445
  const Tt = J(/* @__PURE__ */ r("path", {
5435
5446
  d: "m21.41 11.58-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.58 1.41.58s1.05-.22 1.41-.59l7-7c.37-.36.59-.86.59-1.41s-.23-1.06-.59-1.42M5.5 7C4.67 7 4 6.33 4 5.5S4.67 4 5.5 4 7 4.67 7 5.5 6.33 7 5.5 7"
5436
5447
  }), "LocalOffer");
5437
- function Vs({
5448
+ function Ws({
5438
5449
  title: e = "User Management",
5439
5450
  subtitle: t = "Manage users, bans, and entitlements",
5440
5451
  features: n,
@@ -5446,7 +5457,7 @@ function Vs({
5446
5457
  bans: (n == null ? void 0 : n.bans) ?? !1,
5447
5458
  entitlements: (n == null ? void 0 : n.entitlements) ?? !1,
5448
5459
  entitlementsReadonly: (n == null ? void 0 : n.entitlementsReadonly) ?? !0
5449
- }), [c, h] = C(!!n), [u, g] = C(0), [y, b] = C([]), [S, v] = C(0), [D, E] = C(0), [B, O] = C(25), [W, z] = C(""), [Q, I] = C({}), [_, j] = C([]), [N, le] = C(0), [V, s] = C(!0), [k, m] = C(null), [A, R] = C(null), [re, H] = C(!1), [Z, Ce] = C({
5460
+ }), [c, h] = C(!!n), [u, g] = C(0), [y, b] = C([]), [S, v] = C(0), [D, E] = C(0), [B, O] = C(25), [_, z] = C(""), [Q, I] = C({}), [F, j] = C([]), [N, le] = C(0), [W, s] = C(!0), [k, m] = C(null), [A, R] = C(null), [re, H] = C(!1), [Z, Ce] = C({
5450
5461
  email: "",
5451
5462
  reason: "",
5452
5463
  expiresAt: ""
@@ -5469,15 +5480,15 @@ function Vs({
5469
5480
  const G = await q.getUsers({
5470
5481
  limit: B,
5471
5482
  page: D,
5472
- search: W || void 0
5483
+ search: _ || void 0
5473
5484
  });
5474
5485
  if (b(G.users || []), v(G.total), m(null), i.entitlements && ((w = G.users) != null && w.length)) {
5475
5486
  const ft = {};
5476
5487
  await Promise.all(
5477
5488
  G.users.map(async (pt) => {
5478
5489
  try {
5479
- const Vn = await q.getEntitlements(pt.email);
5480
- ft[pt.email] = Vn.entitlements.length;
5490
+ const Wn = await q.getEntitlements(pt.email);
5491
+ ft[pt.email] = Wn.entitlements.length;
5481
5492
  } catch {
5482
5493
  ft[pt.email] = 0;
5483
5494
  }
@@ -5490,7 +5501,7 @@ function Vs({
5490
5501
  s(!1);
5491
5502
  }
5492
5503
  }
5493
- }, [i.users, i.entitlements, D, B, W]), Be = ye(async () => {
5504
+ }, [i.users, i.entitlements, D, B, _]), Be = ye(async () => {
5494
5505
  if (i.bans) {
5495
5506
  s(!0);
5496
5507
  try {
@@ -5513,7 +5524,7 @@ function Vs({
5513
5524
  u === 0 && i.users && (E(0), ae());
5514
5525
  }, 300);
5515
5526
  return () => clearTimeout(w);
5516
- }, [W, u, c, i.users, ae]);
5527
+ }, [_, u, c, i.users, ae]);
5517
5528
  const Nt = async () => {
5518
5529
  try {
5519
5530
  await q.banUser(Z.email, Z.reason, Z.expiresAt || void 0), R("User banned successfully"), H(!1), Ce({ email: "", reason: "", expiresAt: "" }), Be();
@@ -5569,7 +5580,7 @@ function Vs({
5569
5580
  x(!1);
5570
5581
  }
5571
5582
  }
5572
- }, Wn = async (w) => {
5583
+ }, _n = async (w) => {
5573
5584
  if (ee && confirm(`Revoke "${w}" from ${ee.identifier}?`))
5574
5585
  try {
5575
5586
  await q.revokeEntitlement(ee.identifier, w), R(`Entitlement "${w}" revoked`);
@@ -5621,7 +5632,7 @@ function Vs({
5621
5632
  )
5622
5633
  ] })
5623
5634
  ] }),
5624
- V && /* @__PURE__ */ r(_t, { sx: { mb: 2 } }),
5635
+ W && /* @__PURE__ */ r(Ft, { sx: { mb: 2 } }),
5625
5636
  k && /* @__PURE__ */ r(de, { severity: "error", onClose: () => m(null), sx: { mb: 2 }, children: k }),
5626
5637
  A && /* @__PURE__ */ r(de, { severity: "success", onClose: () => R(null), sx: { mb: 2 }, children: A }),
5627
5638
  i.users && /* @__PURE__ */ d(Ht, { columns: i.bans ? 3 : 2, spacing: "medium", sx: { mb: 3 }, equalHeight: !0, children: [
@@ -5666,11 +5677,11 @@ function Vs({
5666
5677
  ),
5667
5678
  /* @__PURE__ */ d(U, { sx: { p: 0 }, children: [
5668
5679
  /* @__PURE__ */ r(f, { sx: { p: 2, borderBottom: 1, borderColor: "var(--theme-border)" }, children: /* @__PURE__ */ r(
5669
- F,
5680
+ V,
5670
5681
  {
5671
5682
  size: "small",
5672
5683
  placeholder: "Search by email or name...",
5673
- value: W,
5684
+ value: _,
5674
5685
  onChange: (w) => z(w.target.value),
5675
5686
  InputProps: {
5676
5687
  startAdornment: /* @__PURE__ */ r(fn, { position: "start", children: /* @__PURE__ */ r(Dr, { sx: { color: "var(--theme-text-secondary)" } }) })
@@ -5678,7 +5689,7 @@ function Vs({
5678
5689
  sx: { minWidth: 300 }
5679
5690
  }
5680
5691
  ) }),
5681
- u === 0 && i.users && /* @__PURE__ */ d(We, { children: [
5692
+ u === 0 && i.users && /* @__PURE__ */ d(_e, { children: [
5682
5693
  /* @__PURE__ */ r(it, { children: /* @__PURE__ */ d(st, { children: [
5683
5694
  /* @__PURE__ */ r(lt, { children: /* @__PURE__ */ d(fe, { children: [
5684
5695
  /* @__PURE__ */ r(P, { sx: { color: "var(--theme-text-secondary)", borderColor: "var(--theme-border)" }, children: "ID" }),
@@ -5722,7 +5733,7 @@ function Vs({
5722
5733
  },
5723
5734
  w.id
5724
5735
  )),
5725
- y.length === 0 && !V && /* @__PURE__ */ r(fe, { children: /* @__PURE__ */ r(P, { colSpan: i.entitlements ? 6 : 5, align: "center", sx: { py: 4, color: "var(--theme-text-secondary)" }, children: W ? "No users match your search" : "No users found" }) })
5736
+ y.length === 0 && !W && /* @__PURE__ */ r(fe, { children: /* @__PURE__ */ r(P, { colSpan: i.entitlements ? 6 : 5, align: "center", sx: { py: 4, color: "var(--theme-text-secondary)" }, children: _ ? "No users match your search" : "No users found" }) })
5726
5737
  ] })
5727
5738
  ] }) }),
5728
5739
  /* @__PURE__ */ r(
@@ -5751,7 +5762,7 @@ function Vs({
5751
5762
  /* @__PURE__ */ r(P, { sx: { color: "var(--theme-text-secondary)", borderColor: "var(--theme-border)" }, align: "right", children: "Actions" })
5752
5763
  ] }) }),
5753
5764
  /* @__PURE__ */ d(ct, { children: [
5754
- _.map((w) => /* @__PURE__ */ d(fe, { children: [
5765
+ F.map((w) => /* @__PURE__ */ d(fe, { children: [
5755
5766
  /* @__PURE__ */ r(P, { sx: { color: "var(--theme-text-primary)", borderColor: "var(--theme-border)" }, children: /* @__PURE__ */ r(M, { variant: "body1", content: w.email, fontWeight: "500" }) }),
5756
5767
  /* @__PURE__ */ r(P, { sx: { color: "var(--theme-text-secondary)", borderColor: "var(--theme-border)", maxWidth: 200 }, children: /* @__PURE__ */ r(M, { variant: "body2", content: w.reason, noWrap: !0 }) }),
5757
5768
  /* @__PURE__ */ r(P, { sx: { color: "var(--theme-text-secondary)", borderColor: "var(--theme-border)" }, children: Rt(w.banned_at) }),
@@ -5779,7 +5790,7 @@ function Vs({
5779
5790
  }
5780
5791
  ) })
5781
5792
  ] }, w.id)),
5782
- _.length === 0 && !V && /* @__PURE__ */ r(fe, { children: /* @__PURE__ */ r(P, { colSpan: 6, align: "center", sx: { py: 4, color: "var(--theme-text-secondary)" }, children: "No users are currently banned" }) })
5793
+ F.length === 0 && !W && /* @__PURE__ */ r(fe, { children: /* @__PURE__ */ r(P, { colSpan: 6, align: "center", sx: { py: 4, color: "var(--theme-text-secondary)" }, children: "No users are currently banned" }) })
5783
5794
  ] })
5784
5795
  ] }) })
5785
5796
  ] })
@@ -5795,7 +5806,7 @@ function Vs({
5795
5806
  /* @__PURE__ */ r($t, { children: "Ban User" }),
5796
5807
  /* @__PURE__ */ r(Et, { children: /* @__PURE__ */ d(f, { sx: { display: "flex", flexDirection: "column", gap: 2, mt: 1 }, children: [
5797
5808
  /* @__PURE__ */ r(
5798
- F,
5809
+ V,
5799
5810
  {
5800
5811
  label: "Email",
5801
5812
  fullWidth: !0,
@@ -5805,7 +5816,7 @@ function Vs({
5805
5816
  }
5806
5817
  ),
5807
5818
  /* @__PURE__ */ r(
5808
- F,
5819
+ V,
5809
5820
  {
5810
5821
  label: "Reason",
5811
5822
  fullWidth: !0,
@@ -5817,7 +5828,7 @@ function Vs({
5817
5828
  }
5818
5829
  ),
5819
5830
  /* @__PURE__ */ r(
5820
- F,
5831
+ V,
5821
5832
  {
5822
5833
  label: "Expiration (Optional)",
5823
5834
  type: "datetime-local",
@@ -5866,7 +5877,7 @@ function Vs({
5866
5877
  /* @__PURE__ */ r(Et, { children: /* @__PURE__ */ d(f, { sx: { display: "flex", flexDirection: "column", gap: 2, mt: 1 }, children: [
5867
5878
  /* @__PURE__ */ d(f, { sx: { display: "flex", gap: 1 }, children: [
5868
5879
  /* @__PURE__ */ r(
5869
- F,
5880
+ V,
5870
5881
  {
5871
5882
  label: "Email",
5872
5883
  fullWidth: !0,
@@ -5916,7 +5927,7 @@ function Vs({
5916
5927
  getOptionLabel: (w) => w.name,
5917
5928
  value: ir.find((w) => w.name === je) || null,
5918
5929
  onChange: (w, G) => mt((G == null ? void 0 : G.name) || ""),
5919
- renderInput: (w) => /* @__PURE__ */ r(F, { ...w, label: "Grant Entitlement", placeholder: "Select entitlement" }),
5930
+ renderInput: (w) => /* @__PURE__ */ r(V, { ...w, label: "Grant Entitlement", placeholder: "Select entitlement" }),
5920
5931
  sx: { flex: 1 }
5921
5932
  }
5922
5933
  ),
@@ -5938,7 +5949,7 @@ function Vs({
5938
5949
  {
5939
5950
  icon: /* @__PURE__ */ r(Ze, { sx: { fontSize: 16 } }),
5940
5951
  label: w,
5941
- onDelete: i.entitlementsReadonly ? void 0 : () => Wn(w),
5952
+ onDelete: i.entitlementsReadonly ? void 0 : () => _n(w),
5942
5953
  deleteIcon: /* @__PURE__ */ r(zr, { sx: { fontSize: 16 } }),
5943
5954
  sx: {
5944
5955
  bgcolor: "var(--theme-success)20",
@@ -5969,13 +5980,13 @@ function Vs({
5969
5980
  const dn = J(/* @__PURE__ */ r("path", {
5970
5981
  d: "M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1s3.1 1.39 3.1 3.1z"
5971
5982
  }), "Lock");
5972
- function Fs({
5983
+ function Vs({
5973
5984
  title: e = "Entitlements",
5974
5985
  subtitle: t = "Manage available entitlements",
5975
5986
  headerActions: n
5976
5987
  }) {
5977
5988
  var we;
5978
- const [o, a] = C(null), [i, l] = C(!0), [c, h] = C([]), [u, g] = C([]), [y, b] = C(!0), [S, v] = C(null), [D, E] = C(null), [B, O] = C(""), [W, z] = C(!1), [Q, I] = C(!1), [_, j] = C(!1), [N, le] = C(null), [V, s] = C({
5989
+ const [o, a] = C(null), [i, l] = C(!0), [c, h] = C([]), [u, g] = C([]), [y, b] = C(!0), [S, v] = C(null), [D, E] = C(null), [B, O] = C(""), [_, z] = C(!1), [Q, I] = C(!1), [F, j] = C(!1), [N, le] = C(null), [W, s] = C({
5979
5990
  name: "",
5980
5991
  category: "",
5981
5992
  description: ""
@@ -6012,13 +6023,13 @@ function Fs({
6012
6023
  }
6013
6024
  }, [c, B]);
6014
6025
  const R = [...new Set(c.map((T) => T.category || "Uncategorized"))], re = async () => {
6015
- if (!V.name.trim()) {
6026
+ if (!W.name.trim()) {
6016
6027
  v("Name is required");
6017
6028
  return;
6018
6029
  }
6019
6030
  m(!0);
6020
6031
  try {
6021
- E(`Entitlement "${V.name}" created`), z(!1), s({ name: "", category: "", description: "" }), A();
6032
+ E(`Entitlement "${W.name}" created`), z(!1), s({ name: "", category: "", description: "" }), A();
6022
6033
  } catch (T) {
6023
6034
  v(T instanceof Error ? T.message : "Failed to create entitlement");
6024
6035
  } finally {
@@ -6070,7 +6081,7 @@ function Fs({
6070
6081
  )
6071
6082
  ] })
6072
6083
  ] }),
6073
- y && /* @__PURE__ */ r(_t, { sx: { mb: 2 } }),
6084
+ y && /* @__PURE__ */ r(Ft, { sx: { mb: 2 } }),
6074
6085
  S && /* @__PURE__ */ r(de, { severity: "error", onClose: () => v(null), sx: { mb: 2 }, children: S }),
6075
6086
  D && /* @__PURE__ */ r(de, { severity: "success", onClose: () => E(null), sx: { mb: 2 }, children: D }),
6076
6087
  /* @__PURE__ */ d(Ht, { columns: 3, spacing: "medium", sx: { mb: 3 }, equalHeight: !0, children: [
@@ -6120,7 +6131,7 @@ function Fs({
6120
6131
  ] }),
6121
6132
  /* @__PURE__ */ r(L, { sx: { bgcolor: "var(--theme-surface)" }, children: /* @__PURE__ */ d(U, { sx: { p: 0 }, children: [
6122
6133
  /* @__PURE__ */ r(f, { sx: { p: 2, borderBottom: 1, borderColor: "var(--theme-border)" }, children: /* @__PURE__ */ r(
6123
- F,
6134
+ V,
6124
6135
  {
6125
6136
  size: "small",
6126
6137
  placeholder: "Search entitlements...",
@@ -6200,7 +6211,7 @@ function Fs({
6200
6211
  !he && /* @__PURE__ */ d(
6201
6212
  St,
6202
6213
  {
6203
- open: W,
6214
+ open: _,
6204
6215
  onClose: () => z(!1),
6205
6216
  maxWidth: "sm",
6206
6217
  fullWidth: !0,
@@ -6208,35 +6219,35 @@ function Fs({
6208
6219
  /* @__PURE__ */ r($t, { children: "Add Entitlement" }),
6209
6220
  /* @__PURE__ */ r(Et, { children: /* @__PURE__ */ d(f, { sx: { display: "flex", flexDirection: "column", gap: 2, mt: 1 }, children: [
6210
6221
  /* @__PURE__ */ r(
6211
- F,
6222
+ V,
6212
6223
  {
6213
6224
  label: "Name",
6214
6225
  fullWidth: !0,
6215
- value: V.name,
6216
- onChange: (T) => s({ ...V, name: T.target.value }),
6226
+ value: W.name,
6227
+ onChange: (T) => s({ ...W, name: T.target.value }),
6217
6228
  placeholder: "e.g., premium, pro, feature:analytics",
6218
6229
  required: !0
6219
6230
  }
6220
6231
  ),
6221
6232
  /* @__PURE__ */ r(
6222
- F,
6233
+ V,
6223
6234
  {
6224
6235
  label: "Category (Optional)",
6225
6236
  fullWidth: !0,
6226
- value: V.category,
6227
- onChange: (T) => s({ ...V, category: T.target.value }),
6237
+ value: W.category,
6238
+ onChange: (T) => s({ ...W, category: T.target.value }),
6228
6239
  placeholder: "e.g., subscription, feature, access"
6229
6240
  }
6230
6241
  ),
6231
6242
  /* @__PURE__ */ r(
6232
- F,
6243
+ V,
6233
6244
  {
6234
6245
  label: "Description (Optional)",
6235
6246
  fullWidth: !0,
6236
6247
  multiline: !0,
6237
6248
  rows: 2,
6238
- value: V.description,
6239
- onChange: (T) => s({ ...V, description: T.target.value }),
6249
+ value: W.description,
6250
+ onChange: (T) => s({ ...W, description: T.target.value }),
6240
6251
  placeholder: "Describe what this entitlement grants access to"
6241
6252
  }
6242
6253
  )
@@ -6249,7 +6260,7 @@ function Fs({
6249
6260
  variant: "primary",
6250
6261
  label: "Create",
6251
6262
  onClick: re,
6252
- disabled: !V.name.trim() || k
6263
+ disabled: !W.name.trim() || k
6253
6264
  }
6254
6265
  )
6255
6266
  ] })
@@ -6267,7 +6278,7 @@ function Fs({
6267
6278
  /* @__PURE__ */ r($t, { children: "Edit Entitlement" }),
6268
6279
  /* @__PURE__ */ r(Et, { children: /* @__PURE__ */ d(f, { sx: { display: "flex", flexDirection: "column", gap: 2, mt: 1 }, children: [
6269
6280
  /* @__PURE__ */ r(
6270
- F,
6281
+ V,
6271
6282
  {
6272
6283
  label: "Name",
6273
6284
  fullWidth: !0,
@@ -6277,7 +6288,7 @@ function Fs({
6277
6288
  }
6278
6289
  ),
6279
6290
  /* @__PURE__ */ r(
6280
- F,
6291
+ V,
6281
6292
  {
6282
6293
  label: "Category",
6283
6294
  fullWidth: !0,
@@ -6286,7 +6297,7 @@ function Fs({
6286
6297
  }
6287
6298
  ),
6288
6299
  /* @__PURE__ */ r(
6289
- F,
6300
+ V,
6290
6301
  {
6291
6302
  label: "Description",
6292
6303
  fullWidth: !0,
@@ -6315,7 +6326,7 @@ function Fs({
6315
6326
  !he && N && /* @__PURE__ */ d(
6316
6327
  St,
6317
6328
  {
6318
- open: _,
6329
+ open: F,
6319
6330
  onClose: () => j(!1),
6320
6331
  maxWidth: "sm",
6321
6332
  fullWidth: !0,
@@ -6351,22 +6362,22 @@ function Fs({
6351
6362
  ] });
6352
6363
  }
6353
6364
  export {
6354
- Ws as ControlPanelApp,
6365
+ _s as ControlPanelApp,
6355
6366
  os as DashboardPage,
6356
6367
  Li as DashboardWidgetProvider,
6357
- Wi as DashboardWidgetRenderer,
6358
- Fs as EntitlementsPage,
6368
+ _i as DashboardWidgetRenderer,
6369
+ Vs as EntitlementsPage,
6359
6370
  ds as LogsPage,
6360
6371
  Is as NotFoundPage,
6361
- _i as PluginWidgetRenderer,
6372
+ Fi as PluginWidgetRenderer,
6362
6373
  Gi as ServiceHealthWidget,
6363
6374
  vs as SystemPage,
6364
- Vs as UsersPage,
6365
- Vi as WidgetComponentRegistryProvider,
6375
+ Ws as UsersPage,
6376
+ Wi as WidgetComponentRegistryProvider,
6366
6377
  q as api,
6367
6378
  rs as getBuiltInWidgetComponents,
6368
6379
  Rn as useDashboardWidgets,
6369
6380
  Ls as useRegisterWidget,
6370
- Fi as useWidgetComponentRegistry
6381
+ Vi as useWidgetComponentRegistry
6371
6382
  };
6372
6383
  //# sourceMappingURL=index.js.map