@neuctra/authix 1.2.14 → 1.2.16

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.
@@ -4,23 +4,23 @@ function At(t, e) {
4
4
  return t.apply(e, arguments);
5
5
  };
6
6
  }
7
- const { toString: ur } = Object.prototype, { getPrototypeOf: rt } = Object, { iterator: Fe, toStringTag: _t } = Symbol, Le = /* @__PURE__ */ ((t) => (e) => {
7
+ const { toString: ur } = Object.prototype, { getPrototypeOf: rt } = Object, { iterator: Fe, toStringTag: Ut } = Symbol, Le = /* @__PURE__ */ ((t) => (e) => {
8
8
  const n = ur.call(e);
9
9
  return t[n] || (t[n] = n.slice(8, -1).toLowerCase());
10
10
  })(/* @__PURE__ */ Object.create(null)), ae = (t) => (t = t.toLowerCase(), (e) => Le(e) === t), qe = (t) => (e) => typeof e === t, { isArray: je } = Array, be = qe("undefined");
11
11
  function Te(t) {
12
12
  return t !== null && !be(t) && t.constructor !== null && !be(t.constructor) && te(t.constructor.isBuffer) && t.constructor.isBuffer(t);
13
13
  }
14
- const Ut = ae("ArrayBuffer");
14
+ const _t = ae("ArrayBuffer");
15
15
  function pr(t) {
16
16
  let e;
17
- return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer && Ut(t.buffer), e;
17
+ return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer && _t(t.buffer), e;
18
18
  }
19
- const fr = qe("string"), te = qe("function"), Dt = qe("number"), Re = (t) => t !== null && typeof t == "object", xr = (t) => t === !0 || t === !1, _e = (t) => {
19
+ const fr = qe("string"), te = qe("function"), $t = qe("number"), Re = (t) => t !== null && typeof t == "object", xr = (t) => t === !0 || t === !1, Ue = (t) => {
20
20
  if (Le(t) !== "object")
21
21
  return !1;
22
22
  const e = rt(t);
23
- return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(_t in t) && !(Fe in t);
23
+ return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(Ut in t) && !(Fe in t);
24
24
  }, hr = (t) => {
25
25
  if (!Re(t) || Te(t))
26
26
  return !1;
@@ -50,7 +50,7 @@ function Pe(t, e, { allOwnKeys: n = !1 } = {}) {
50
50
  c = a[s], e.call(null, t[c], c, t);
51
51
  }
52
52
  }
53
- function $t(t, e) {
53
+ function Dt(t, e) {
54
54
  if (Te(t))
55
55
  return null;
56
56
  e = e.toLowerCase();
@@ -64,8 +64,8 @@ function $t(t, e) {
64
64
  const fe = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Nt = (t) => !be(t) && t !== fe;
65
65
  function Ge() {
66
66
  const { caseless: t, skipUndefined: e } = Nt(this) && this || {}, n = {}, s = (i, a) => {
67
- const o = t && $t(n, a) || a;
68
- _e(n[o]) && _e(i) ? n[o] = Ge(n[o], i) : _e(i) ? n[o] = Ge({}, i) : je(i) ? n[o] = i.slice() : (!e || !be(i)) && (n[o] = i);
67
+ const o = t && Dt(n, a) || a;
68
+ Ue(n[o]) && Ue(i) ? n[o] = Ge(n[o], i) : Ue(i) ? n[o] = Ge({}, i) : je(i) ? n[o] = i.slice() : (!e || !be(i)) && (n[o] = i);
69
69
  };
70
70
  for (let i = 0, a = arguments.length; i < a; i++)
71
71
  arguments[i] && Pe(arguments[i], s);
@@ -95,25 +95,25 @@ const Rr = (t, e, n, { allOwnKeys: s } = {}) => (Pe(e, (i, a) => {
95
95
  if (!t) return null;
96
96
  if (je(t)) return t;
97
97
  let e = t.length;
98
- if (!Dt(e)) return null;
98
+ if (!$t(e)) return null;
99
99
  const n = new Array(e);
100
100
  for (; e-- > 0; )
101
101
  n[e] = t[e];
102
102
  return n;
103
- }, _r = /* @__PURE__ */ ((t) => (e) => t && e instanceof t)(typeof Uint8Array < "u" && rt(Uint8Array)), Ur = (t, e) => {
103
+ }, Ur = /* @__PURE__ */ ((t) => (e) => t && e instanceof t)(typeof Uint8Array < "u" && rt(Uint8Array)), _r = (t, e) => {
104
104
  const s = (t && t[Fe]).call(t);
105
105
  let i;
106
106
  for (; (i = s.next()) && !i.done; ) {
107
107
  const a = i.value;
108
108
  e.call(t, a[0], a[1]);
109
109
  }
110
- }, Dr = (t, e) => {
110
+ }, $r = (t, e) => {
111
111
  let n;
112
112
  const s = [];
113
113
  for (; (n = t.exec(e)) !== null; )
114
114
  s.push(n);
115
115
  return s;
116
- }, $r = ae("HTMLFormElement"), Nr = (t) => t.toLowerCase().replace(
116
+ }, Dr = ae("HTMLFormElement"), Nr = (t) => t.toLowerCase().replace(
117
117
  /[-_\s]([a-z\d])(\w*)/g,
118
118
  function(n, s, i) {
119
119
  return s.toUpperCase() + i;
@@ -149,7 +149,7 @@ const Rr = (t, e, n, { allOwnKeys: s } = {}) => (Pe(e, (i, a) => {
149
149
  }, Mr = () => {
150
150
  }, Wr = (t, e) => t != null && Number.isFinite(t = +t) ? t : e;
151
151
  function Br(t) {
152
- return !!(t && te(t.append) && t[_t] === "FormData" && t[Fe]);
152
+ return !!(t && te(t.append) && t[Ut] === "FormData" && t[Fe]);
153
153
  }
154
154
  const Hr = (t) => {
155
155
  const e = new Array(10), n = (s, i) => {
@@ -179,15 +179,15 @@ const Hr = (t) => {
179
179
  te(fe.postMessage)
180
180
  ), Jr = typeof queueMicrotask < "u" ? queueMicrotask.bind(fe) : typeof process < "u" && process.nextTick || Lt, Kr = (t) => t != null && te(t[Fe]), p = {
181
181
  isArray: je,
182
- isArrayBuffer: Ut,
182
+ isArrayBuffer: _t,
183
183
  isBuffer: Te,
184
184
  isFormData: jr,
185
185
  isArrayBufferView: pr,
186
186
  isString: fr,
187
- isNumber: Dt,
187
+ isNumber: $t,
188
188
  isBoolean: xr,
189
189
  isObject: Re,
190
- isPlainObject: _e,
190
+ isPlainObject: Ue,
191
191
  isEmptyObject: hr,
192
192
  isReadableStream: Sr,
193
193
  isRequest: kr,
@@ -201,7 +201,7 @@ const Hr = (t) => {
201
201
  isFunction: te,
202
202
  isStream: wr,
203
203
  isURLSearchParams: vr,
204
- isTypedArray: _r,
204
+ isTypedArray: Ur,
205
205
  isFileList: br,
206
206
  forEach: Pe,
207
207
  merge: Ge,
@@ -214,9 +214,9 @@ const Hr = (t) => {
214
214
  kindOfTest: ae,
215
215
  endsWith: zr,
216
216
  toArray: Ar,
217
- forEachEntry: Ur,
218
- matchAll: Dr,
219
- isHTMLForm: $r,
217
+ forEachEntry: _r,
218
+ matchAll: $r,
219
+ isHTMLForm: Dr,
220
220
  hasOwnProperty: ut,
221
221
  hasOwnProp: ut,
222
222
  // an alias to avoid ESLint no-prototype-builtins detection
@@ -226,7 +226,7 @@ const Hr = (t) => {
226
226
  toCamelCase: Nr,
227
227
  noop: Mr,
228
228
  toFiniteNumber: Wr,
229
- findKey: $t,
229
+ findKey: Dt,
230
230
  global: fe,
231
231
  isContextDefined: Nt,
232
232
  isSpecCompliantForm: Br,
@@ -237,10 +237,10 @@ const Hr = (t) => {
237
237
  asap: Jr,
238
238
  isIterable: Kr
239
239
  };
240
- function D(t, e, n, s, i) {
240
+ function $(t, e, n, s, i) {
241
241
  Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = t, this.name = "AxiosError", e && (this.code = e), n && (this.config = n), s && (this.request = s), i && (this.response = i, this.status = i.status ? i.status : null);
242
242
  }
243
- p.inherits(D, Error, {
243
+ p.inherits($, Error, {
244
244
  toJSON: function() {
245
245
  return {
246
246
  // Standard
@@ -261,7 +261,7 @@ p.inherits(D, Error, {
261
261
  };
262
262
  }
263
263
  });
264
- const qt = D.prototype, Mt = {};
264
+ const qt = $.prototype, Mt = {};
265
265
  [
266
266
  "ERR_BAD_OPTION_VALUE",
267
267
  "ERR_BAD_OPTION",
@@ -279,15 +279,15 @@ const qt = D.prototype, Mt = {};
279
279
  ].forEach((t) => {
280
280
  Mt[t] = { value: t };
281
281
  });
282
- Object.defineProperties(D, Mt);
282
+ Object.defineProperties($, Mt);
283
283
  Object.defineProperty(qt, "isAxiosError", { value: !0 });
284
- D.from = (t, e, n, s, i, a) => {
284
+ $.from = (t, e, n, s, i, a) => {
285
285
  const o = Object.create(qt);
286
286
  p.toFlatObject(t, o, function(x) {
287
287
  return x !== Error.prototype;
288
288
  }, (f) => f !== "isAxiosError");
289
289
  const c = t && t.message ? t.message : "Error", d = e == null && t ? t.code : e;
290
- return D.call(o, c, d, n, s, i), t && o.cause == null && Object.defineProperty(o, "cause", { value: t, configurable: !0 }), o.name = t && t.name || "Error", a && Object.assign(o, a), o;
290
+ return $.call(o, c, d, n, s, i), t && o.cause == null && Object.defineProperty(o, "cause", { value: t, configurable: !0 }), o.name = t && t.name || "Error", a && Object.assign(o, a), o;
291
291
  };
292
292
  const Gr = null;
293
293
  function Xe(t) {
@@ -327,7 +327,7 @@ function Me(t, e, n) {
327
327
  if (p.isBoolean(u))
328
328
  return u.toString();
329
329
  if (!d && p.isBlob(u))
330
- throw new D("Blob is not supported. Use a Buffer instead.");
330
+ throw new $("Blob is not supported. Use a Buffer instead.");
331
331
  return p.isArrayBuffer(u) || p.isTypedArray(u) ? d && typeof Blob == "function" ? new Blob([u]) : Buffer.from(u) : u;
332
332
  }
333
333
  function x(u, w, h) {
@@ -578,7 +578,7 @@ const Ie = {
578
578
  return JSON.parse(e, this.parseReviver);
579
579
  } catch (c) {
580
580
  if (o)
581
- throw c.name === "SyntaxError" ? D.from(c, D.ERR_BAD_RESPONSE, this, null, this.response) : c;
581
+ throw c.name === "SyntaxError" ? $.from(c, $.ERR_BAD_RESPONSE, this, null, this.response) : c;
582
582
  }
583
583
  }
584
584
  return e;
@@ -638,8 +638,8 @@ const fn = p.toObjectSet([
638
638
  function Se(t) {
639
639
  return t && String(t).trim().toLowerCase();
640
640
  }
641
- function Ue(t) {
642
- return t === !1 || t == null ? t : p.isArray(t) ? t.map(Ue) : String(t);
641
+ function _e(t) {
642
+ return t === !1 || t == null ? t : p.isArray(t) ? t.map(_e) : String(t);
643
643
  }
644
644
  function hn(t) {
645
645
  const e = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
@@ -684,7 +684,7 @@ let re = class {
684
684
  if (!x)
685
685
  throw new Error("header name must be a non-empty string");
686
686
  const y = p.findKey(i, x);
687
- (!y || i[y] === void 0 || f === !0 || f === void 0 && i[y] !== !1) && (i[y || d] = Ue(c));
687
+ (!y || i[y] === void 0 || f === !0 || f === void 0 && i[y] !== !1) && (i[y || d] = _e(c));
688
688
  }
689
689
  const o = (c, d) => p.forEach(c, (f, x) => a(f, x, d));
690
690
  if (p.isPlainObject(e) || e instanceof this.constructor)
@@ -752,11 +752,11 @@ let re = class {
752
752
  return p.forEach(this, (i, a) => {
753
753
  const o = p.findKey(s, a);
754
754
  if (o) {
755
- n[o] = Ue(i), delete n[a];
755
+ n[o] = _e(i), delete n[a];
756
756
  return;
757
757
  }
758
758
  const c = e ? gn(a) : String(a).trim();
759
- c !== a && delete n[a], n[c] = Ue(i), s[c] = !0;
759
+ c !== a && delete n[a], n[c] = _e(i), s[c] = !0;
760
760
  }), this;
761
761
  }
762
762
  concat(...e) {
@@ -821,16 +821,16 @@ function Jt(t) {
821
821
  return !!(t && t.__CANCEL__);
822
822
  }
823
823
  function ve(t, e, n) {
824
- D.call(this, t ?? "canceled", D.ERR_CANCELED, e, n), this.name = "CanceledError";
824
+ $.call(this, t ?? "canceled", $.ERR_CANCELED, e, n), this.name = "CanceledError";
825
825
  }
826
- p.inherits(ve, D, {
826
+ p.inherits(ve, $, {
827
827
  __CANCEL__: !0
828
828
  });
829
829
  function Kt(t, e, n) {
830
830
  const s = n.config.validateStatus;
831
- !n.status || !s || s(n.status) ? t(n) : e(new D(
831
+ !n.status || !s || s(n.status) ? t(n) : e(new $(
832
832
  "Request failed with status code " + n.status,
833
- [D.ERR_BAD_REQUEST, D.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
833
+ [$.ERR_BAD_REQUEST, $.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
834
834
  n.config,
835
835
  n.request,
836
836
  n
@@ -1053,16 +1053,16 @@ const Xt = (t) => {
1053
1053
  "onloadend" in h ? h.onloadend = I : h.onreadystatechange = function() {
1054
1054
  !h || h.readyState !== 4 || h.status === 0 && !(h.responseURL && h.responseURL.indexOf("file:") === 0) || setTimeout(I);
1055
1055
  }, h.onabort = function() {
1056
- h && (s(new D("Request aborted", D.ECONNABORTED, t, h)), h = null);
1056
+ h && (s(new $("Request aborted", $.ECONNABORTED, t, h)), h = null);
1057
1057
  }, h.onerror = function(A) {
1058
- const N = A && A.message ? A.message : "Network Error", b = new D(N, D.ERR_NETWORK, t, h);
1058
+ const N = A && A.message ? A.message : "Network Error", b = new $(N, $.ERR_NETWORK, t, h);
1059
1059
  b.event = A || null, s(b), h = null;
1060
1060
  }, h.ontimeout = function() {
1061
1061
  let A = i.timeout ? "timeout of " + i.timeout + "ms exceeded" : "timeout exceeded";
1062
1062
  const N = i.transitional || Vt;
1063
- i.timeoutErrorMessage && (A = i.timeoutErrorMessage), s(new D(
1063
+ i.timeoutErrorMessage && (A = i.timeoutErrorMessage), s(new $(
1064
1064
  A,
1065
- N.clarifyTimeoutError ? D.ETIMEDOUT : D.ECONNABORTED,
1065
+ N.clarifyTimeoutError ? $.ETIMEDOUT : $.ECONNABORTED,
1066
1066
  t,
1067
1067
  h
1068
1068
  )), h = null;
@@ -1073,7 +1073,7 @@ const Xt = (t) => {
1073
1073
  }, i.cancelToken && i.cancelToken.subscribe(x), i.signal && (i.signal.aborted ? x() : i.signal.addEventListener("abort", x)));
1074
1074
  const C = bn(i.url);
1075
1075
  if (C && Q.protocols.indexOf(C) === -1) {
1076
- s(new D("Unsupported protocol " + C + ":", D.ERR_BAD_REQUEST, t));
1076
+ s(new $("Unsupported protocol " + C + ":", $.ERR_BAD_REQUEST, t));
1077
1077
  return;
1078
1078
  }
1079
1079
  h.send(a || null);
@@ -1086,11 +1086,11 @@ const Xt = (t) => {
1086
1086
  if (!i) {
1087
1087
  i = !0, c();
1088
1088
  const x = f instanceof Error ? f : this.reason;
1089
- s.abort(x instanceof D ? x : new ve(x instanceof Error ? x.message : x));
1089
+ s.abort(x instanceof $ ? x : new ve(x instanceof Error ? x.message : x));
1090
1090
  }
1091
1091
  };
1092
1092
  let o = e && setTimeout(() => {
1093
- o = null, a(new D(`timeout ${e} of ms exceeded`, D.ETIMEDOUT));
1093
+ o = null, a(new $(`timeout ${e} of ms exceeded`, $.ETIMEDOUT));
1094
1094
  }, e);
1095
1095
  const c = () => {
1096
1096
  t && (o && clearTimeout(o), o = null, t.forEach((f) => {
@@ -1195,7 +1195,7 @@ const Xt = (t) => {
1195
1195
  let I = w && w[u];
1196
1196
  if (I)
1197
1197
  return I.call(w);
1198
- throw new D(`Response type '${u}' is not supported`, D.ERR_NOT_SUPPORT, h);
1198
+ throw new $(`Response type '${u}' is not supported`, $.ERR_NOT_SUPPORT, h);
1199
1199
  });
1200
1200
  });
1201
1201
  const k = async (u) => {
@@ -1245,11 +1245,11 @@ const Xt = (t) => {
1245
1245
  duplex: "half"
1246
1246
  }), m;
1247
1247
  if (p.isFormData(I) && (m = l.headers.get("content-type")) && q.setContentType(m), l.body) {
1248
- const [S, $] = mt(
1248
+ const [S, D] = mt(
1249
1249
  z,
1250
1250
  Ne(gt(b))
1251
1251
  );
1252
- I = bt(l.body, wt, S, $);
1252
+ I = bt(l.body, wt, S, D);
1253
1253
  }
1254
1254
  }
1255
1255
  p.isString(O) || (O = O ? "include" : "omit");
@@ -1270,13 +1270,13 @@ const Xt = (t) => {
1270
1270
  ["status", "statusText", "headers"].forEach((ne) => {
1271
1271
  l[ne] = H[ne];
1272
1272
  });
1273
- const m = p.toFiniteNumber(H.headers.get("content-length")), [S, $] = N && mt(
1273
+ const m = p.toFiniteNumber(H.headers.get("content-length")), [S, D] = N && mt(
1274
1274
  m,
1275
1275
  Ne(gt(N), !0)
1276
1276
  ) || [];
1277
1277
  H = new s(
1278
1278
  bt(H.body, wt, S, () => {
1279
- $ && $(), T && T();
1279
+ D && D(), T && T();
1280
1280
  }),
1281
1281
  l
1282
1282
  );
@@ -1295,21 +1295,21 @@ const Xt = (t) => {
1295
1295
  });
1296
1296
  } catch (M) {
1297
1297
  throw T && T(), M && M.name === "TypeError" && /Load failed|fetch/i.test(M.message) ? Object.assign(
1298
- new D("Network Error", D.ERR_NETWORK, u, G),
1298
+ new $("Network Error", $.ERR_NETWORK, u, G),
1299
1299
  {
1300
1300
  cause: M.cause || M
1301
1301
  }
1302
- ) : D.from(M, M && M.code, u, G);
1302
+ ) : $.from(M, M && M.code, u, G);
1303
1303
  }
1304
1304
  };
1305
- }, _n = /* @__PURE__ */ new Map(), Zt = (t) => {
1305
+ }, Un = /* @__PURE__ */ new Map(), Zt = (t) => {
1306
1306
  let e = t ? t.env : {};
1307
1307
  const { fetch: n, Request: s, Response: i } = e, a = [
1308
1308
  s,
1309
1309
  i,
1310
1310
  n
1311
1311
  ];
1312
- let o = a.length, c = o, d, f, x = _n;
1312
+ let o = a.length, c = o, d, f, x = Un;
1313
1313
  for (; c--; )
1314
1314
  d = a[c], f = x.get(d), f === void 0 && x.set(d, f = c ? /* @__PURE__ */ new Map() : An(e)), x = f;
1315
1315
  return f;
@@ -1331,7 +1331,7 @@ p.forEach(Qe, (t, e) => {
1331
1331
  Object.defineProperty(t, "adapterName", { value: e });
1332
1332
  }
1333
1333
  });
1334
- const kt = (t) => `- ${t}`, Un = (t) => p.isFunction(t) || t === null || t === !1, Qt = {
1334
+ const kt = (t) => `- ${t}`, _n = (t) => p.isFunction(t) || t === null || t === !1, Qt = {
1335
1335
  getAdapter: (t, e) => {
1336
1336
  t = p.isArray(t) ? t : [t];
1337
1337
  const { length: n } = t;
@@ -1340,8 +1340,8 @@ const kt = (t) => `- ${t}`, Un = (t) => p.isFunction(t) || t === null || t === !
1340
1340
  for (let o = 0; o < n; o++) {
1341
1341
  s = t[o];
1342
1342
  let c;
1343
- if (i = s, !Un(s) && (i = Qe[(c = String(s)).toLowerCase()], i === void 0))
1344
- throw new D(`Unknown adapter '${c}'`);
1343
+ if (i = s, !_n(s) && (i = Qe[(c = String(s)).toLowerCase()], i === void 0))
1344
+ throw new $(`Unknown adapter '${c}'`);
1345
1345
  if (i && (p.isFunction(i) || (i = i.get(e))))
1346
1346
  break;
1347
1347
  a[c || "#" + o] = i;
@@ -1353,7 +1353,7 @@ const kt = (t) => `- ${t}`, Un = (t) => p.isFunction(t) || t === null || t === !
1353
1353
  let c = n ? o.length > 1 ? `since :
1354
1354
  ` + o.map(kt).join(`
1355
1355
  `) : " " + kt(o[0]) : "as no adapter specified";
1356
- throw new D(
1356
+ throw new $(
1357
1357
  "There is no suitable adapter to dispatch the request " + c,
1358
1358
  "ERR_NOT_SUPPORT"
1359
1359
  );
@@ -1397,9 +1397,9 @@ We.transitional = function(e, n, s) {
1397
1397
  }
1398
1398
  return (a, o, c) => {
1399
1399
  if (e === !1)
1400
- throw new D(
1400
+ throw new $(
1401
1401
  i(o, " has been removed" + (n ? " in " + n : "")),
1402
- D.ERR_DEPRECATED
1402
+ $.ERR_DEPRECATED
1403
1403
  );
1404
1404
  return n && !Ct[o] && (Ct[o] = !0, console.warn(
1405
1405
  i(
@@ -1412,9 +1412,9 @@ We.transitional = function(e, n, s) {
1412
1412
  We.spelling = function(e) {
1413
1413
  return (n, s) => (console.warn(`${s} is likely a misspelling of ${e}`), !0);
1414
1414
  };
1415
- function Dn(t, e, n) {
1415
+ function $n(t, e, n) {
1416
1416
  if (typeof t != "object")
1417
- throw new D("options must be an object", D.ERR_BAD_OPTION_VALUE);
1417
+ throw new $("options must be an object", $.ERR_BAD_OPTION_VALUE);
1418
1418
  const s = Object.keys(t);
1419
1419
  let i = s.length;
1420
1420
  for (; i-- > 0; ) {
@@ -1422,17 +1422,17 @@ function Dn(t, e, n) {
1422
1422
  if (o) {
1423
1423
  const c = t[a], d = c === void 0 || o(c, a, t);
1424
1424
  if (d !== !0)
1425
- throw new D("option " + a + " must be " + d, D.ERR_BAD_OPTION_VALUE);
1425
+ throw new $("option " + a + " must be " + d, $.ERR_BAD_OPTION_VALUE);
1426
1426
  continue;
1427
1427
  }
1428
1428
  if (n !== !0)
1429
- throw new D("Unknown option " + a, D.ERR_BAD_OPTION);
1429
+ throw new $("Unknown option " + a, $.ERR_BAD_OPTION);
1430
1430
  }
1431
1431
  }
1432
- const De = {
1433
- assertOptions: Dn,
1432
+ const $e = {
1433
+ assertOptions: $n,
1434
1434
  validators: We
1435
- }, ce = De.validators;
1435
+ }, ce = $e.validators;
1436
1436
  let xe = class {
1437
1437
  constructor(e) {
1438
1438
  this.defaults = e || {}, this.interceptors = {
@@ -1468,16 +1468,16 @@ let xe = class {
1468
1468
  _request(e, n) {
1469
1469
  typeof e == "string" ? (n = n || {}, n.url = e) : n = e || {}, n = he(this.defaults, n);
1470
1470
  const { transitional: s, paramsSerializer: i, headers: a } = n;
1471
- s !== void 0 && De.assertOptions(s, {
1471
+ s !== void 0 && $e.assertOptions(s, {
1472
1472
  silentJSONParsing: ce.transitional(ce.boolean),
1473
1473
  forcedJSONParsing: ce.transitional(ce.boolean),
1474
1474
  clarifyTimeoutError: ce.transitional(ce.boolean)
1475
1475
  }, !1), i != null && (p.isFunction(i) ? n.paramsSerializer = {
1476
1476
  serialize: i
1477
- } : De.assertOptions(i, {
1477
+ } : $e.assertOptions(i, {
1478
1478
  encode: ce.function,
1479
1479
  serialize: ce.function
1480
- }, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), De.assertOptions(n, {
1480
+ }, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), $e.assertOptions(n, {
1481
1481
  baseUrl: ce.spelling("baseURL"),
1482
1482
  withXsrfToken: ce.spelling("withXSRFToken")
1483
1483
  }, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
@@ -1557,7 +1557,7 @@ p.forEach(["post", "put", "patch"], function(e) {
1557
1557
  }
1558
1558
  xe.prototype[e] = n(), xe.prototype[e + "Form"] = n(!0);
1559
1559
  });
1560
- let $n = class tr {
1560
+ let Dn = class tr {
1561
1561
  constructor(e) {
1562
1562
  if (typeof e != "function")
1563
1563
  throw new TypeError("executor must be a function.");
@@ -1715,11 +1715,11 @@ function rr(t) {
1715
1715
  const J = rr(Ie);
1716
1716
  J.Axios = xe;
1717
1717
  J.CanceledError = ve;
1718
- J.CancelToken = $n;
1718
+ J.CancelToken = Dn;
1719
1719
  J.isCancel = Jt;
1720
1720
  J.VERSION = er;
1721
1721
  J.toFormData = Me;
1722
- J.AxiosError = D;
1722
+ J.AxiosError = $;
1723
1723
  J.Cancel = J.CanceledError;
1724
1724
  J.all = function(e) {
1725
1725
  return Promise.all(e);
@@ -2207,12 +2207,30 @@ class li {
2207
2207
  * GET /api/app/:appId/users-data
2208
2208
  * GET /api/app/:appId/users-data/:category
2209
2209
  */
2210
- async getUsersData(e) {
2210
+ async getAppUsersData(e) {
2211
2211
  const n = this.appId;
2212
2212
  if (!n) throw new Error("getUsersData: 'appId' is required");
2213
2213
  const s = e ? `/app/${encodeURIComponent(n)}/users-data/${encodeURIComponent(e)}` : `/app/${encodeURIComponent(n)}/users-data`;
2214
2214
  return await this.request("GET", s, void 0, {}, !1);
2215
2215
  }
2216
+ /**
2217
+ * 👥 Get all app users
2218
+ *
2219
+ * Route:
2220
+ * GET /api/app/:appId/users
2221
+ */
2222
+ async getAllAppUsers() {
2223
+ const e = this.appId;
2224
+ if (!e)
2225
+ throw new Error("getAllAppUsers: 'appId' is required");
2226
+ return await this.request(
2227
+ "GET",
2228
+ `/app/${encodeURIComponent(e)}/users`,
2229
+ void 0,
2230
+ {},
2231
+ !1
2232
+ );
2233
+ }
2216
2234
  /**
2217
2235
  * 🔍 Get single app data item by id
2218
2236
  *
@@ -2414,11 +2432,11 @@ function qn() {
2414
2432
  }
2415
2433
  if (m) {
2416
2434
  m = console;
2417
- var S = m.error, $ = typeof Symbol == "function" && Symbol.toStringTag && l[Symbol.toStringTag] || l.constructor.name || "Object";
2435
+ var S = m.error, D = typeof Symbol == "function" && Symbol.toStringTag && l[Symbol.toStringTag] || l.constructor.name || "Object";
2418
2436
  return S.call(
2419
2437
  m,
2420
2438
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
2421
- $
2439
+ D
2422
2440
  ), e(l);
2423
2441
  }
2424
2442
  }
@@ -2465,14 +2483,14 @@ function qn() {
2465
2483
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
2466
2484
  )), l = this.props.ref, l !== void 0 ? l : null;
2467
2485
  }
2468
- function f(l, m, S, $, ne, oe) {
2486
+ function f(l, m, S, D, ne, oe) {
2469
2487
  var B = S.ref;
2470
2488
  return l = {
2471
2489
  $$typeof: u,
2472
2490
  type: l,
2473
2491
  key: m,
2474
2492
  props: S,
2475
- _owner: $
2493
+ _owner: D
2476
2494
  }, (B !== void 0 ? B : null) !== null ? Object.defineProperty(l, "ref", {
2477
2495
  enumerable: !1,
2478
2496
  get: d
@@ -2498,13 +2516,13 @@ function qn() {
2498
2516
  value: oe
2499
2517
  }), Object.freeze && (Object.freeze(l.props), Object.freeze(l)), l;
2500
2518
  }
2501
- function x(l, m, S, $, ne, oe) {
2519
+ function x(l, m, S, D, ne, oe) {
2502
2520
  var B = m.children;
2503
2521
  if (B !== void 0)
2504
- if ($)
2522
+ if (D)
2505
2523
  if (T(B)) {
2506
- for ($ = 0; $ < B.length; $++)
2507
- y(B[$]);
2524
+ for (D = 0; D < B.length; D++)
2525
+ y(B[D]);
2508
2526
  Object.freeze && Object.freeze(B);
2509
2527
  } else
2510
2528
  console.error(
@@ -2513,21 +2531,21 @@ function qn() {
2513
2531
  else y(B);
2514
2532
  if (G.call(m, "key")) {
2515
2533
  B = t(l);
2516
- var le = Object.keys(m).filter(function(_) {
2517
- return _ !== "key";
2534
+ var le = Object.keys(m).filter(function(U) {
2535
+ return U !== "key";
2518
2536
  });
2519
- $ = 0 < le.length ? "{key: someKey, " + le.join(": ..., ") + ": ...}" : "{key: someKey}", Y[B + $] || (le = 0 < le.length ? "{" + le.join(": ..., ") + ": ...}" : "{}", console.error(
2537
+ D = 0 < le.length ? "{key: someKey, " + le.join(": ..., ") + ": ...}" : "{key: someKey}", Y[B + D] || (le = 0 < le.length ? "{" + le.join(": ..., ") + ": ...}" : "{}", console.error(
2520
2538
  `A props object containing a "key" prop is being spread into JSX:
2521
2539
  let props = %s;
2522
2540
  <%s {...props} />
2523
2541
  React keys must be passed directly to JSX without using spread:
2524
2542
  let props = %s;
2525
2543
  <%s key={someKey} {...props} />`,
2526
- $,
2544
+ D,
2527
2545
  B,
2528
2546
  le,
2529
2547
  B
2530
- ), Y[B + $] = !0);
2548
+ ), Y[B + D] = !0);
2531
2549
  }
2532
2550
  if (B = null, S !== void 0 && (n(S), B = "" + S), o(m) && (n(m.key), B = "" + m.key), "key" in m) {
2533
2551
  S = {};
@@ -2565,24 +2583,24 @@ React keys must be passed directly to JSX without using spread:
2565
2583
  a
2566
2584
  )(), F = z(s(a)), Y = {};
2567
2585
  Ee.Fragment = h, Ee.jsx = function(l, m, S) {
2568
- var $ = 1e4 > R.recentlyCreatedOwnerStacks++;
2586
+ var D = 1e4 > R.recentlyCreatedOwnerStacks++;
2569
2587
  return x(
2570
2588
  l,
2571
2589
  m,
2572
2590
  S,
2573
2591
  !1,
2574
- $ ? Error("react-stack-top-frame") : H,
2575
- $ ? z(s(l)) : F
2592
+ D ? Error("react-stack-top-frame") : H,
2593
+ D ? z(s(l)) : F
2576
2594
  );
2577
2595
  }, Ee.jsxs = function(l, m, S) {
2578
- var $ = 1e4 > R.recentlyCreatedOwnerStacks++;
2596
+ var D = 1e4 > R.recentlyCreatedOwnerStacks++;
2579
2597
  return x(
2580
2598
  l,
2581
2599
  m,
2582
2600
  S,
2583
2601
  !0,
2584
- $ ? Error("react-stack-top-frame") : H,
2585
- $ ? z(s(l)) : F
2602
+ D ? Error("react-stack-top-frame") : H,
2603
+ D ? z(s(l)) : F
2586
2604
  );
2587
2605
  };
2588
2606
  })()), Ee;
@@ -3056,14 +3074,14 @@ const As = [
3056
3074
  ["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6", key: "miytrc" }],
3057
3075
  ["path", { d: "M3 6h18", key: "d0wm0j" }],
3058
3076
  ["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2", key: "e791ji" }]
3059
- ], $e = L("trash-2", As);
3077
+ ], De = L("trash-2", As);
3060
3078
  /**
3061
3079
  * @license lucide-react v0.544.0 - ISC
3062
3080
  *
3063
3081
  * This source code is licensed under the ISC license.
3064
3082
  * See the LICENSE file in the root directory of this source tree.
3065
3083
  */
3066
- const _s = [
3084
+ const Us = [
3067
3085
  [
3068
3086
  "path",
3069
3087
  {
@@ -3073,29 +3091,29 @@ const _s = [
3073
3091
  ],
3074
3092
  ["path", { d: "M12 9v4", key: "juzpu7" }],
3075
3093
  ["path", { d: "M12 17h.01", key: "p32p05" }]
3076
- ], Ot = L("triangle-alert", _s);
3094
+ ], Ot = L("triangle-alert", Us);
3077
3095
  /**
3078
3096
  * @license lucide-react v0.544.0 - ISC
3079
3097
  *
3080
3098
  * This source code is licensed under the ISC license.
3081
3099
  * See the LICENSE file in the root directory of this source tree.
3082
3100
  */
3083
- const Us = [
3101
+ const _s = [
3084
3102
  ["path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2", key: "1yyitq" }],
3085
3103
  ["circle", { cx: "9", cy: "7", r: "4", key: "nufk8" }],
3086
3104
  ["line", { x1: "17", x2: "22", y1: "8", y2: "13", key: "3nzzx3" }],
3087
3105
  ["line", { x1: "22", x2: "17", y1: "8", y2: "13", key: "1swrse" }]
3088
- ], Ds = L("user-x", Us);
3106
+ ], $s = L("user-x", _s);
3089
3107
  /**
3090
3108
  * @license lucide-react v0.544.0 - ISC
3091
3109
  *
3092
3110
  * This source code is licensed under the ISC license.
3093
3111
  * See the LICENSE file in the root directory of this source tree.
3094
3112
  */
3095
- const $s = [
3113
+ const Ds = [
3096
3114
  ["path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2", key: "975kel" }],
3097
3115
  ["circle", { cx: "12", cy: "7", r: "4", key: "17ys0d" }]
3098
- ], we = L("user", $s);
3116
+ ], we = L("user", Ds);
3099
3117
  /**
3100
3118
  * @license lucide-react v0.544.0 - ISC
3101
3119
  *
@@ -3764,17 +3782,17 @@ const Ns = [
3764
3782
  const K = async (m) => {
3765
3783
  m.preventDefault(), C(!0), A(null);
3766
3784
  try {
3767
- const S = await x.loginUser({ email: N, password: j }), { user: $ } = S;
3768
- if (!$)
3785
+ const S = await x.loginUser({ email: N, password: j }), { user: D } = S;
3786
+ if (!D)
3769
3787
  throw new Error(S.message || "Login failed");
3770
3788
  if (typeof document < "u") {
3771
3789
  const ne = "a_s_b", oe = "true", B = /* @__PURE__ */ new Date();
3772
3790
  B.setTime(B.getTime() + 1440 * 60 * 1e3), document.cookie = `${ne}=${oe}; path=/; expires=${B.toUTCString()}; SameSite=Lax`;
3773
3791
  }
3774
- A({ type: "success", text: `Welcome ${$.name}` }), d?.($), typeof window < "u" && window.location.reload();
3792
+ A({ type: "success", text: `Welcome ${D.name}` }), d?.(D);
3775
3793
  } catch (S) {
3776
- const $ = S.message || "Login failed";
3777
- A({ type: "error", text: $ }), f?.(S);
3794
+ const D = S.message || "Login failed";
3795
+ A({ type: "error", text: D }), f?.(S);
3778
3796
  } finally {
3779
3797
  C(!1);
3780
3798
  }
@@ -4332,22 +4350,26 @@ const Ns = [
4332
4350
  }) => {
4333
4351
  const [n, s] = P("loading");
4334
4352
  ee(() => {
4335
- const c = document.cookie.split(";").map((d) => d.trim()).find((d) => d.startsWith("a_s_b="))?.split("=")[1] === "true";
4353
+ if (typeof window > "u")
4354
+ return;
4355
+ const c = window.document.cookie.split(";").map((d) => d.trim()).find((d) => d.startsWith("a_s_b="))?.split("=")[1] === "true";
4336
4356
  s(c ? "authenticated" : "unauthenticated");
4337
4357
  }, []);
4338
4358
  const i = (a) => typeof a == "function" ? a() : a;
4339
- return n === "loading" ? null : n === "unauthenticated" ? i(e) ?? null : /* @__PURE__ */ r.jsx(r.Fragment, { children: t });
4359
+ return n === "loading" ? null : n === "unauthenticated" ? /* @__PURE__ */ r.jsx(r.Fragment, { children: i(e) }) : /* @__PURE__ */ r.jsx(r.Fragment, { children: t });
4340
4360
  }, fi = ({
4341
4361
  children: t,
4342
4362
  fallback: e = null
4343
4363
  }) => {
4344
4364
  const [n, s] = P("loading");
4345
4365
  ee(() => {
4346
- const c = document.cookie.split(";").map((d) => d.trim()).find((d) => d.startsWith("a_s_b="))?.split("=")[1] === "true";
4366
+ if (typeof window > "u")
4367
+ return;
4368
+ const c = window.document.cookie.split(";").map((d) => d.trim()).find((d) => d.startsWith("a_s_b="))?.split("=")[1] === "true";
4347
4369
  s(c ? "authenticated" : "unauthenticated");
4348
4370
  }, []);
4349
4371
  const i = (a) => typeof a == "function" ? a() : a;
4350
- return n === "loading" ? null : n === "authenticated" ? i(e) ?? null : /* @__PURE__ */ r.jsx(r.Fragment, { children: t });
4372
+ return n === "loading" ? null : n === "authenticated" ? /* @__PURE__ */ r.jsx(r.Fragment, { children: i(e) }) : /* @__PURE__ */ r.jsx(r.Fragment, { children: t });
4351
4373
  }, Fs = ({
4352
4374
  isOpen: t,
4353
4375
  onClose: e,
@@ -4419,7 +4441,7 @@ const Ns = [
4419
4441
  color: "white",
4420
4442
  flexShrink: 0
4421
4443
  },
4422
- children: /* @__PURE__ */ r.jsx($e, { size: 20 })
4444
+ children: /* @__PURE__ */ r.jsx(De, { size: 20 })
4423
4445
  }
4424
4446
  ),
4425
4447
  /* @__PURE__ */ r.jsx("div", { children: /* @__PURE__ */ r.jsx(
@@ -4522,7 +4544,7 @@ const Ns = [
4522
4544
  text: "All your data will be permanently deleted"
4523
4545
  },
4524
4546
  {
4525
- icon: /* @__PURE__ */ r.jsx(Ds, { size: 16 }),
4547
+ icon: /* @__PURE__ */ r.jsx($s, { size: 16 }),
4526
4548
  text: "This action cannot be reversed"
4527
4549
  },
4528
4550
  {
@@ -4618,7 +4640,7 @@ const Ns = [
4618
4640
  g.currentTarget.style.transform = "translateY(0)", g.currentTarget.style.boxShadow = "0 4px 12px rgba(239, 68, 68, 0.4)";
4619
4641
  },
4620
4642
  children: [
4621
- /* @__PURE__ */ r.jsx($e, { size: 16 }),
4643
+ /* @__PURE__ */ r.jsx(De, { size: 16 }),
4622
4644
  "Continue to Delete"
4623
4645
  ]
4624
4646
  }
@@ -4808,7 +4830,7 @@ const Ns = [
4808
4830
  h && !c && (g.currentTarget.style.transform = "translateY(0)", g.currentTarget.style.boxShadow = "0 4px 12px rgba(239, 68, 68, 0.4)");
4809
4831
  },
4810
4832
  children: [
4811
- /* @__PURE__ */ r.jsx($e, { size: 16 }),
4833
+ /* @__PURE__ */ r.jsx(De, { size: 16 }),
4812
4834
  "Yes, Delete My Account"
4813
4835
  ]
4814
4836
  }
@@ -6408,8 +6430,8 @@ const Ns = [
6408
6430
  return v(), window.addEventListener("resize", v), () => window.removeEventListener("resize", v);
6409
6431
  }
6410
6432
  }, []);
6411
- const m = (v, U) => {
6412
- G({ type: v, message: U }), setTimeout(() => G(null), 3e3);
6433
+ const m = (v, _) => {
6434
+ G({ type: v, message: _ }), setTimeout(() => G(null), 3e3);
6413
6435
  }, S = () => {
6414
6436
  W(!0);
6415
6437
  const v = setTimeout(() => {
@@ -6418,15 +6440,15 @@ const Ns = [
6418
6440
  return () => clearTimeout(v);
6419
6441
  };
6420
6442
  ee(() => {
6421
- const v = (U) => {
6443
+ const v = (_) => {
6422
6444
  const V = document.querySelector(".dropdown-container");
6423
- V && !V.contains(U.target) && S();
6445
+ V && !V.contains(_.target) && S();
6424
6446
  };
6425
6447
  return q && document.addEventListener("mousedown", v), () => {
6426
6448
  document.removeEventListener("mousedown", v);
6427
6449
  };
6428
6450
  }, [q]);
6429
- const $ = async () => {
6451
+ const D = async () => {
6430
6452
  if (!M.email || !/\S+@\S+\.\S+/.test(M.email)) {
6431
6453
  m("error", "Please enter a valid email");
6432
6454
  return;
@@ -6440,11 +6462,11 @@ const Ns = [
6440
6462
  const v = await a.requestEmailVerificationOTP({
6441
6463
  userId: d.id,
6442
6464
  email: M.email
6443
- }), U = v?.data?.success ?? v?.success, V = v?.data?.message ?? v?.message;
6444
- U ? (m("success", V || "OTP sent to email!"), F(!0)) : m("error", V || "Failed to send OTP");
6465
+ }), _ = v?.data?.success ?? v?.success, V = v?.data?.message ?? v?.message;
6466
+ _ ? (m("success", V || "OTP sent to email!"), F(!0)) : m("error", V || "Failed to send OTP");
6445
6467
  } catch (v) {
6446
- const U = v?.response?.data?.message || v?.message || "Server error";
6447
- m("error", U);
6468
+ const _ = v?.response?.data?.message || v?.message || "Server error";
6469
+ m("error", _);
6448
6470
  } finally {
6449
6471
  l(!1);
6450
6472
  }
@@ -6459,18 +6481,18 @@ const Ns = [
6459
6481
  }
6460
6482
  try {
6461
6483
  l(!0);
6462
- const U = await a.verifyEmail({
6484
+ const _ = await a.verifyEmail({
6463
6485
  email: M.email,
6464
6486
  otp: M.otp
6465
- }), V = U?.data?.success ?? U?.success, Z = U?.data?.message ?? U?.message;
6487
+ }), V = _?.data?.success ?? _?.success, Z = _?.data?.message ?? _?.message;
6466
6488
  if (V) {
6467
6489
  m("success", Z || "Email verified!");
6468
6490
  const de = { ...d, isVerified: !0 };
6469
6491
  f(de), typeof s == "function" && s(de), K({ email: de.email, otp: "" }), F(!1), j?.(!1);
6470
6492
  } else
6471
6493
  m("error", Z || "Verification failed");
6472
- } catch (U) {
6473
- const V = U?.response?.data?.message || U?.message || "Something went wrong";
6494
+ } catch (_) {
6495
+ const V = _?.response?.data?.message || _?.message || "Something went wrong";
6474
6496
  m("error", V);
6475
6497
  } finally {
6476
6498
  l(!1);
@@ -6478,37 +6500,37 @@ const Ns = [
6478
6500
  }, oe = async (v) => {
6479
6501
  if (!d) return !1;
6480
6502
  try {
6481
- const U = await a.updateUser({
6503
+ const _ = await a.updateUser({
6482
6504
  userId: d.id,
6483
6505
  avatarUrl: v
6484
6506
  });
6485
- if (U?.success) {
6507
+ if (_?.success) {
6486
6508
  const V = {
6487
6509
  ...d,
6488
6510
  // 🔒 keep existing auth fields
6489
- ...U.user,
6511
+ ..._.user,
6490
6512
  // 🔁 merge backend response if present
6491
6513
  avatarUrl: v
6492
6514
  };
6493
6515
  return f(V), m("success", "Avatar updated successfully!"), !0;
6494
6516
  }
6495
- return m("error", U?.message || "Failed to update avatar"), !1;
6496
- } catch (U) {
6497
- return console.error("Avatar update error:", U), m("error", "Failed to update avatar"), !1;
6517
+ return m("error", _?.message || "Failed to update avatar"), !1;
6518
+ } catch (_) {
6519
+ return console.error("Avatar update error:", _), m("error", "Failed to update avatar"), !1;
6498
6520
  }
6499
6521
  }, B = async () => {
6500
6522
  if (d) {
6501
6523
  w(!0);
6502
6524
  try {
6503
- const v = d.email, U = await a.updateUser({
6525
+ const v = d.email, _ = await a.updateUser({
6504
6526
  userId: d.id,
6505
6527
  ...d
6506
6528
  });
6507
- if (U.success && U.user) {
6508
- const V = U.user.email !== v, Z = {
6529
+ if (_.success && _.user) {
6530
+ const V = _.user.email !== v, Z = {
6509
6531
  ...d,
6510
6532
  // keep old state
6511
- ...U.user,
6533
+ ..._.user,
6512
6534
  // overwrite updated fields
6513
6535
  isVerified: V ? !1 : d.isVerified
6514
6536
  };
@@ -6517,7 +6539,7 @@ const Ns = [
6517
6539
  V ? "Email updated. Please verify your new email." : "Profile updated successfully"
6518
6540
  ), E(!1);
6519
6541
  } else
6520
- m("error", U.message || "Update failed");
6542
+ m("error", _.message || "Update failed");
6521
6543
  } catch (v) {
6522
6544
  console.error(v), m("error", "Update failed");
6523
6545
  } finally {
@@ -6526,19 +6548,19 @@ const Ns = [
6526
6548
  }
6527
6549
  }, le = async (v) => {
6528
6550
  try {
6529
- const U = await a.checkIfUserExists(v);
6530
- U?.success === !0 && U?.exists === !1 && (console.warn("❌ User does not exist on server. Clearing session..."), localStorage.removeItem("userInfo"), f(null));
6531
- } catch (U) {
6532
- console.error("⚠️ User validation request failed:", U);
6551
+ const _ = await a.checkIfUserExists(v);
6552
+ _?.success === !0 && _?.exists === !1 && (console.warn("❌ User does not exist on server. Clearing session..."), localStorage.removeItem("userInfo"), f(null));
6553
+ } catch (_) {
6554
+ console.error("⚠️ User validation request failed:", _);
6533
6555
  }
6534
6556
  };
6535
6557
  ee(() => {
6536
6558
  (async () => {
6537
6559
  try {
6538
6560
  y(!0);
6539
- const U = await a.checkUserSession();
6540
- if (U.user?.id) {
6541
- const V = U.user.id, Z = await a.getUserProfile({ userId: V });
6561
+ const _ = await a.checkUserSession();
6562
+ if (_.user?.id) {
6563
+ const V = _.user.id, Z = await a.getUserProfile({ userId: V });
6542
6564
  if (Z.user) {
6543
6565
  const de = Z.user;
6544
6566
  f(de), le(V);
@@ -6546,8 +6568,8 @@ const Ns = [
6546
6568
  f(null), localStorage.removeItem("userInfo");
6547
6569
  } else
6548
6570
  f(null), localStorage.removeItem("userInfo");
6549
- } catch (U) {
6550
- console.error("User init failed:", U), f(null), localStorage.removeItem("userInfo");
6571
+ } catch (_) {
6572
+ console.error("User init failed:", _), f(null), localStorage.removeItem("userInfo");
6551
6573
  } finally {
6552
6574
  y(!1);
6553
6575
  }
@@ -6555,10 +6577,10 @@ const Ns = [
6555
6577
  }, []), ee(() => {
6556
6578
  d?.email && K((v) => ({ ...v, email: d.email }));
6557
6579
  }, [d?.email]);
6558
- const ge = (v, U) => {
6559
- let V = parseInt(v.replace("#", ""), 16), Z = (V >> 16) + U, de = (V >> 8 & 255) + U, Be = (V & 255) + U;
6580
+ const ge = (v, _) => {
6581
+ let V = parseInt(v.replace("#", ""), 16), Z = (V >> 16) + _, de = (V >> 8 & 255) + _, Be = (V & 255) + _;
6560
6582
  return Z = Math.min(255, Math.max(0, Z)), de = Math.min(255, Math.max(0, de)), Be = Math.min(255, Math.max(0, Be)), `#${(Be | de << 8 | Z << 16).toString(16).padStart(6, "0")}`;
6561
- }, _ = t ? {
6583
+ }, U = t ? {
6562
6584
  background: "#000000",
6563
6585
  surface: "#09090b",
6564
6586
  surfaceLight: "#27272a",
@@ -6597,7 +6619,7 @@ const Ns = [
6597
6619
  display: "flex",
6598
6620
  alignItems: "center",
6599
6621
  justifyContent: "center",
6600
- color: _.textPrimary,
6622
+ color: U.textPrimary,
6601
6623
  fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, sans-serif"
6602
6624
  },
6603
6625
  children: /* @__PURE__ */ r.jsxs(
@@ -6615,12 +6637,12 @@ const Ns = [
6615
6637
  se,
6616
6638
  {
6617
6639
  size: 40,
6618
- color: _.accent,
6640
+ color: U.accent,
6619
6641
  style: { animation: "spin 1s linear infinite" },
6620
6642
  "aria-hidden": "true"
6621
6643
  }
6622
6644
  ),
6623
- /* @__PURE__ */ r.jsx("p", { style: { color: _.textTertiary, margin: 0 }, children: "Loading your profile..." })
6645
+ /* @__PURE__ */ r.jsx("p", { style: { color: U.textTertiary, margin: 0 }, children: "Loading your profile..." })
6624
6646
  ]
6625
6647
  }
6626
6648
  )
@@ -6636,7 +6658,7 @@ const Ns = [
6636
6658
  display: "flex",
6637
6659
  alignItems: "center",
6638
6660
  justifyContent: "center",
6639
- color: _.textPrimary,
6661
+ color: U.textPrimary,
6640
6662
  fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, sans-serif"
6641
6663
  },
6642
6664
  children: /* @__PURE__ */ r.jsxs(
@@ -6650,8 +6672,8 @@ const Ns = [
6650
6672
  textAlign: "center"
6651
6673
  },
6652
6674
  children: [
6653
- /* @__PURE__ */ r.jsx(ie, { size: 40, color: _.error, "aria-hidden": "true" }),
6654
- /* @__PURE__ */ r.jsx("p", { style: { color: _.textTertiary, margin: 0 }, children: "No profile found. Please log in again." })
6675
+ /* @__PURE__ */ r.jsx(ie, { size: 40, color: U.error, "aria-hidden": "true" }),
6676
+ /* @__PURE__ */ r.jsx("p", { style: { color: U.textTertiary, margin: 0 }, children: "No profile found. Please log in again." })
6655
6677
  ]
6656
6678
  }
6657
6679
  )
@@ -6695,7 +6717,7 @@ const Ns = [
6695
6717
  display: "flex",
6696
6718
  alignItems: "center",
6697
6719
  justifyContent: "center",
6698
- color: _.textPrimary,
6720
+ color: U.textPrimary,
6699
6721
  fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, sans-serif",
6700
6722
  lineHeight: 1.5,
6701
6723
  minHeight: "80vh"
@@ -6781,7 +6803,7 @@ const Ns = [
6781
6803
  "section",
6782
6804
  {
6783
6805
  style: {
6784
- backgroundColor: _.surface,
6806
+ backgroundColor: U.surface,
6785
6807
  borderRadius: "16px",
6786
6808
  position: "relative",
6787
6809
  padding: "24px",
@@ -6835,7 +6857,7 @@ const Ns = [
6835
6857
  borderRadius: "50%",
6836
6858
  objectFit: "cover",
6837
6859
  boxShadow: "0 10px 25px -5px rgba(0, 0, 0, 0.3)",
6838
- border: `3px solid ${_.border}`
6860
+ border: `3px solid ${U.border}`
6839
6861
  },
6840
6862
  width: 128,
6841
6863
  height: 128,
@@ -6850,7 +6872,7 @@ const Ns = [
6850
6872
  position: "absolute",
6851
6873
  bottom: "8px",
6852
6874
  right: "8px",
6853
- backgroundColor: _.accent,
6875
+ backgroundColor: U.accent,
6854
6876
  color: "white",
6855
6877
  padding: "8px",
6856
6878
  borderRadius: "50%",
@@ -6877,7 +6899,7 @@ const Ns = [
6877
6899
  fontSize: "24px",
6878
6900
  fontWeight: 600,
6879
6901
  margin: "0 0 4px 0",
6880
- color: _.textPrimary
6902
+ color: U.textPrimary
6881
6903
  },
6882
6904
  children: d.name
6883
6905
  }
@@ -6886,7 +6908,7 @@ const Ns = [
6886
6908
  "p",
6887
6909
  {
6888
6910
  style: {
6889
- color: _.textTertiary,
6911
+ color: U.textTertiary,
6890
6912
  margin: "0 0 8px 0"
6891
6913
  },
6892
6914
  children: d.email
@@ -6897,7 +6919,7 @@ const Ns = [
6897
6919
  {
6898
6920
  style: {
6899
6921
  backgroundColor: d.isVerified ? t ? "rgba(16, 185, 129, 0.1)" : "rgba(16, 185, 129, 0.05)" : t ? "rgba(245, 158, 11, 0.1)" : "rgba(245, 158, 11, 0.05)",
6900
- color: d.isVerified ? _.success : _.warning,
6922
+ color: d.isVerified ? U.success : U.warning,
6901
6923
  border: `1px solid ${d.isVerified ? t ? "rgba(16, 185, 129, 0.3)" : "rgba(16, 185, 129, 0.2)" : t ? "rgba(245, 158, 11, 0.3)" : "rgba(245, 158, 11, 0.2)"}`,
6902
6924
  padding: "6px 12px",
6903
6925
  borderRadius: "20px",
@@ -6931,9 +6953,9 @@ const Ns = [
6931
6953
  {
6932
6954
  onClick: () => E(!1),
6933
6955
  style: {
6934
- backgroundColor: _.surfaceLight,
6935
- border: `1px solid ${_.border}`,
6936
- color: _.textPrimary,
6956
+ backgroundColor: U.surfaceLight,
6957
+ border: `1px solid ${U.border}`,
6958
+ color: U.textPrimary,
6937
6959
  padding: "10px 20px",
6938
6960
  borderRadius: "6px",
6939
6961
  borderStyle: "solid",
@@ -6961,7 +6983,7 @@ const Ns = [
6961
6983
  onClick: B,
6962
6984
  disabled: u,
6963
6985
  style: {
6964
- background: `linear-gradient(to right, ${_.accent}, ${_.accentHover})`,
6986
+ background: `linear-gradient(to right, ${U.accent}, ${U.accentHover})`,
6965
6987
  opacity: u ? 0.7 : 1,
6966
6988
  color: "white",
6967
6989
  padding: "10px 20px",
@@ -6998,7 +7020,7 @@ const Ns = [
6998
7020
  {
6999
7021
  onClick: () => E(!0),
7000
7022
  style: {
7001
- background: `linear-gradient(to right, ${_.accent}, ${_.accentHover})`,
7023
+ background: `linear-gradient(to right, ${U.accent}, ${U.accentHover})`,
7002
7024
  color: "white",
7003
7025
  padding: "10px 20px",
7004
7026
  borderRadius: "6px",
@@ -7063,8 +7085,8 @@ const Ns = [
7063
7085
  "button",
7064
7086
  {
7065
7087
  style: {
7066
- backgroundColor: _.surfaceLight,
7067
- color: _.textPrimary,
7088
+ backgroundColor: U.surfaceLight,
7089
+ color: U.textPrimary,
7068
7090
  padding: "10px 20px",
7069
7091
  borderRadius: "6px",
7070
7092
  border: "none",
@@ -7097,8 +7119,8 @@ const Ns = [
7097
7119
  bottom: "100%",
7098
7120
  left: 0,
7099
7121
  right: 0,
7100
- backgroundColor: _.surface,
7101
- border: `1px solid ${_.border}`,
7122
+ backgroundColor: U.surface,
7123
+ border: `1px solid ${U.border}`,
7102
7124
  borderRadius: "12px 12px 0 0",
7103
7125
  boxShadow: "0 -8px 24px rgba(0, 0, 0, 0.25)",
7104
7126
  zIndex: 200,
@@ -7118,7 +7140,7 @@ const Ns = [
7118
7140
  padding: "14px 18px",
7119
7141
  backgroundColor: "transparent",
7120
7142
  border: "none",
7121
- color: _.textPrimary,
7143
+ color: U.textPrimary,
7122
7144
  cursor: "pointer",
7123
7145
  transition: "all 0.2s ease",
7124
7146
  fontSize: "13px",
@@ -7128,7 +7150,7 @@ const Ns = [
7128
7150
  gap: "8px",
7129
7151
  textAlign: "left"
7130
7152
  },
7131
- onMouseEnter: (v) => v.currentTarget.style.backgroundColor = _.surfaceLight,
7153
+ onMouseEnter: (v) => v.currentTarget.style.backgroundColor = U.surfaceLight,
7132
7154
  onMouseLeave: (v) => v.currentTarget.style.backgroundColor = "transparent",
7133
7155
  children: [
7134
7156
  /* @__PURE__ */ r.jsx(ot, { size: 14, "aria-hidden": "true" }),
@@ -7193,7 +7215,7 @@ const Ns = [
7193
7215
  },
7194
7216
  onMouseLeave: (v) => v.currentTarget.style.backgroundColor = "transparent",
7195
7217
  children: [
7196
- /* @__PURE__ */ r.jsx($e, { size: 14, "aria-hidden": "true" }),
7218
+ /* @__PURE__ */ r.jsx(De, { size: 14, "aria-hidden": "true" }),
7197
7219
  "Delete Account"
7198
7220
  ]
7199
7221
  }
@@ -7222,7 +7244,7 @@ const Ns = [
7222
7244
  "section",
7223
7245
  {
7224
7246
  style: {
7225
- backgroundColor: _.surface,
7247
+ backgroundColor: U.surface,
7226
7248
  borderRadius: "16px",
7227
7249
  padding: "24px",
7228
7250
  boxShadow: "0 1px 3px rgba(0, 0, 0, 0.1)"
@@ -7235,7 +7257,7 @@ const Ns = [
7235
7257
  fontSize: "20px",
7236
7258
  fontWeight: 600,
7237
7259
  margin: "0 0 24px 0",
7238
- color: _.textSecondary,
7260
+ color: U.textSecondary,
7239
7261
  display: "flex",
7240
7262
  alignItems: "center",
7241
7263
  gap: "8px"
@@ -7259,7 +7281,7 @@ const Ns = [
7259
7281
  }
7260
7282
  },
7261
7283
  children: lr.map((v) => {
7262
- const U = v.icon;
7284
+ const _ = v.icon;
7263
7285
  return /* @__PURE__ */ r.jsxs(
7264
7286
  "div",
7265
7287
  {
@@ -7273,7 +7295,7 @@ const Ns = [
7273
7295
  "label",
7274
7296
  {
7275
7297
  style: {
7276
- color: _.textTertiary,
7298
+ color: U.textTertiary,
7277
7299
  fontSize: "12px",
7278
7300
  fontWeight: 500,
7279
7301
  display: "flex",
@@ -7281,7 +7303,7 @@ const Ns = [
7281
7303
  gap: "8px"
7282
7304
  },
7283
7305
  children: [
7284
- /* @__PURE__ */ r.jsx(U, { size: 16, "aria-hidden": "true" }),
7306
+ /* @__PURE__ */ r.jsx(_, { size: 16, "aria-hidden": "true" }),
7285
7307
  v.label
7286
7308
  ]
7287
7309
  }
@@ -7300,7 +7322,7 @@ const Ns = [
7300
7322
  borderRadius: "8px",
7301
7323
  border: `1px solid ${i}`,
7302
7324
  backgroundColor: "transparent",
7303
- color: _.textPrimary,
7325
+ color: U.textPrimary,
7304
7326
  fontSize: "12px",
7305
7327
  outline: "none",
7306
7328
  transition: "border-color 0.2s ease",
@@ -7323,7 +7345,7 @@ const Ns = [
7323
7345
  display: "flex",
7324
7346
  alignItems: "center",
7325
7347
  boxSizing: "border-box",
7326
- color: _.textPrimary,
7348
+ color: U.textPrimary,
7327
7349
  backgroundColor: t ? "rgba(255,255,255,0.05)" : "rgba(0,0,0,0.05)"
7328
7350
  },
7329
7351
  children: v.value
@@ -7343,7 +7365,7 @@ const Ns = [
7343
7365
  "section",
7344
7366
  {
7345
7367
  style: {
7346
- backgroundColor: _.surface,
7368
+ backgroundColor: U.surface,
7347
7369
  borderRadius: "16px",
7348
7370
  padding: "30px 24px",
7349
7371
  boxShadow: "0 1px 3px rgba(0, 0, 0, 0.1)"
@@ -7356,7 +7378,7 @@ const Ns = [
7356
7378
  fontSize: "20px",
7357
7379
  fontWeight: 600,
7358
7380
  margin: "0 0 24px 0",
7359
- color: _.textSecondary,
7381
+ color: U.textSecondary,
7360
7382
  display: "flex",
7361
7383
  alignItems: "center",
7362
7384
  gap: "8px"
@@ -7393,7 +7415,7 @@ const Ns = [
7393
7415
  display: "flex",
7394
7416
  alignItems: "center",
7395
7417
  gap: "12px",
7396
- color: _.textSecondary
7418
+ color: U.textSecondary
7397
7419
  },
7398
7420
  children: [
7399
7421
  /* @__PURE__ */ r.jsx(pe, { size: 16, "aria-hidden": "true" }),
@@ -7414,11 +7436,11 @@ const Ns = [
7414
7436
  gap: "6px",
7415
7437
  ...d.isVerified ? {
7416
7438
  backgroundColor: t ? "rgba(16, 185, 129, 0.1)" : "rgba(16, 185, 129, 0.05)",
7417
- color: _.success,
7439
+ color: U.success,
7418
7440
  border: `1px solid ${t ? "rgba(16, 185, 129, 0.3)" : "rgba(16, 185, 129, 0.2)"}`
7419
7441
  } : {
7420
7442
  backgroundColor: t ? "rgba(245, 158, 11, 0.1)" : "rgba(245, 158, 11, 0.05)",
7421
- color: _.warning,
7443
+ color: U.warning,
7422
7444
  border: `1px solid ${t ? "rgba(245, 158, 11, 0.3)" : "rgba(245, 158, 11, 0.2)"}`
7423
7445
  }
7424
7446
  },
@@ -7446,7 +7468,7 @@ const Ns = [
7446
7468
  "p",
7447
7469
  {
7448
7470
  style: {
7449
- color: _.textTertiary,
7471
+ color: U.textTertiary,
7450
7472
  fontSize: "12px",
7451
7473
  margin: 0
7452
7474
  },
@@ -7477,7 +7499,7 @@ const Ns = [
7477
7499
  I(!1);
7478
7500
  },
7479
7501
  onUpdate: oe,
7480
- colors: _
7502
+ colors: U
7481
7503
  }
7482
7504
  ),
7483
7505
  /* @__PURE__ */ r.jsx(
@@ -7488,7 +7510,7 @@ const Ns = [
7488
7510
  onClose: () => g(!1),
7489
7511
  onSuccess: (v) => m("success", v),
7490
7512
  onError: (v) => m("error", v),
7491
- colors: _
7513
+ colors: U
7492
7514
  }
7493
7515
  ),
7494
7516
  /* @__PURE__ */ r.jsx(
@@ -7499,7 +7521,7 @@ const Ns = [
7499
7521
  onClose: () => N(!1),
7500
7522
  onSuccess: (v) => m("success", v),
7501
7523
  onError: (v) => m("error", v),
7502
- colors: _
7524
+ colors: U
7503
7525
  }
7504
7526
  ),
7505
7527
  /* @__PURE__ */ r.jsx(
@@ -7510,13 +7532,13 @@ const Ns = [
7510
7532
  j(!1), F(!1), K({ email: d?.email || "", otp: "" });
7511
7533
  },
7512
7534
  onVerify: ne,
7513
- onSendOTP: $,
7535
+ onSendOTP: D,
7514
7536
  verifyFormData: M,
7515
7537
  setVerifyFormData: K,
7516
7538
  otpSent: H,
7517
7539
  verifying: Y,
7518
7540
  user: d,
7519
- colors: _,
7541
+ colors: U,
7520
7542
  darkMode: t
7521
7543
  }
7522
7544
  ),
@@ -7655,13 +7677,13 @@ const Ns = [
7655
7677
  g(null);
7656
7678
  return;
7657
7679
  }
7658
- const $ = {
7680
+ const D = {
7659
7681
  id: S.user.id,
7660
7682
  email: S.user.email,
7661
7683
  name: S.user.email.split("@")[0]
7662
7684
  // fallback until backend sends name
7663
7685
  };
7664
- g($);
7686
+ g(D);
7665
7687
  } catch (S) {
7666
7688
  console.error("User initialization failed:", S), l && (g(null), j(S.message || "Failed to load user"));
7667
7689
  } finally {
@@ -7674,8 +7696,8 @@ const Ns = [
7674
7696
  if (typeof window > "u") return;
7675
7697
  const l = () => {
7676
7698
  if (!h || !O.current) return;
7677
- const m = O.current.getBoundingClientRect(), S = window.innerWidth, $ = window.innerHeight, ne = 280, oe = S - m.right, B = m.left;
7678
- $ - m.bottom;
7699
+ const m = O.current.getBoundingClientRect(), S = window.innerWidth, D = window.innerHeight, ne = 280, oe = S - m.right, B = m.left;
7700
+ D - m.bottom;
7679
7701
  const le = oe >= ne || oe > B;
7680
7702
  W(le);
7681
7703
  };
@@ -7683,10 +7705,10 @@ const Ns = [
7683
7705
  }, [h]), ee(() => {
7684
7706
  if (typeof window > "u" || typeof document > "u")
7685
7707
  return;
7686
- const l = ($) => {
7687
- q.current && !q.current.contains($.target) && !O.current?.contains($.target) && I(!1);
7688
- }, m = ($) => {
7689
- $.key === "Escape" && I(!1);
7708
+ const l = (D) => {
7709
+ q.current && !q.current.contains(D.target) && !O.current?.contains(D.target) && I(!1);
7710
+ }, m = (D) => {
7711
+ D.key === "Escape" && I(!1);
7690
7712
  }, S = () => {
7691
7713
  h && I(!1);
7692
7714
  };