@neuctra/authix 1.1.43 → 1.1.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import Le, { forwardRef as Nt, createElement as Xe, useState as O, useEffect as te, useRef as xt } from "react";
1
+ import Le, { forwardRef as Nt, createElement as Xe, useState as P, useEffect as te, useRef as xt } from "react";
2
2
  function Dt(t, e) {
3
3
  return function() {
4
4
  return t.apply(e, arguments);
@@ -33,8 +33,8 @@ const hr = Me("string"), re = Me("function"), Ft = Me("number"), Te = (t) => t !
33
33
  let e;
34
34
  return t && (typeof FormData == "function" && t instanceof FormData || re(t.append) && ((e = qe(t)) === "formdata" || // detect form-data instance
35
35
  e === "object" && re(t.toString) && t.toString() === "[object FormData]"));
36
- }, kr = oe("URLSearchParams"), [Er, Cr, Tr, Ir] = ["ReadableStream", "Request", "Response", "Headers"].map(oe), Rr = (t) => t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
37
- function Ie(t, e, { allOwnKeys: r = !1 } = {}) {
36
+ }, kr = oe("URLSearchParams"), [Er, Cr, Tr, Rr] = ["ReadableStream", "Request", "Response", "Headers"].map(oe), Ir = (t) => t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
37
+ function Re(t, e, { allOwnKeys: r = !1 } = {}) {
38
38
  if (t === null || typeof t > "u")
39
39
  return;
40
40
  let s, a;
@@ -68,10 +68,10 @@ function Ze() {
68
68
  ze(r[o]) && ze(a) ? r[o] = Ze(r[o], a) : ze(a) ? r[o] = Ze({}, a) : we(a) ? r[o] = a.slice() : (!e || !ye(a)) && (r[o] = a);
69
69
  };
70
70
  for (let a = 0, i = arguments.length; a < i; a++)
71
- arguments[a] && Ie(arguments[a], s);
71
+ arguments[a] && Re(arguments[a], s);
72
72
  return r;
73
73
  }
74
- const Pr = (t, e, r, { allOwnKeys: s } = {}) => (Ie(e, (a, i) => {
74
+ const Pr = (t, e, r, { allOwnKeys: s } = {}) => (Re(e, (a, i) => {
75
75
  r && re(a) ? t[i] = Dt(a, r) : t[i] = a;
76
76
  }, { allOwnKeys: s }), t), Or = (t) => (t.charCodeAt(0) === 65279 && (t = t.slice(1)), t), Ar = (t, e, r, s) => {
77
77
  t.prototype = Object.create(e.prototype, s), t.prototype.constructor = t, Object.defineProperty(t, "super", {
@@ -120,7 +120,7 @@ const Pr = (t, e, r, { allOwnKeys: s } = {}) => (Ie(e, (a, i) => {
120
120
  }
121
121
  ), ht = (({ hasOwnProperty: t }) => (e, r) => t.call(e, r))(Object.prototype), qr = oe("RegExp"), Bt = (t, e) => {
122
122
  const r = Object.getOwnPropertyDescriptors(t), s = {};
123
- Ie(r, (a, i) => {
123
+ Re(r, (a, i) => {
124
124
  let o;
125
125
  (o = e(a, i, t)) !== !1 && (s[i] = o || a);
126
126
  }), Object.defineProperties(t, s);
@@ -161,7 +161,7 @@ const Yr = (t) => {
161
161
  if (!("toJSON" in s)) {
162
162
  e[a] = s;
163
163
  const i = we(s) ? [] : {};
164
- return Ie(s, (o, l) => {
164
+ return Re(s, (o, l) => {
165
165
  const h = r(o, a + 1);
166
166
  !ye(h) && (i[l] = h);
167
167
  }), e[a] = void 0, i;
@@ -192,7 +192,7 @@ const Yr = (t) => {
192
192
  isReadableStream: Er,
193
193
  isRequest: Cr,
194
194
  isResponse: Tr,
195
- isHeaders: Ir,
195
+ isHeaders: Rr,
196
196
  isUndefined: ye,
197
197
  isDate: yr,
198
198
  isFile: br,
@@ -203,10 +203,10 @@ const Yr = (t) => {
203
203
  isURLSearchParams: kr,
204
204
  isTypedArray: Nr,
205
205
  isFileList: jr,
206
- forEach: Ie,
206
+ forEach: Re,
207
207
  merge: Ze,
208
208
  extend: Pr,
209
- trim: Rr,
209
+ trim: Ir,
210
210
  stripBOM: Or,
211
211
  inherits: Ar,
212
212
  toFlatObject: zr,
@@ -283,8 +283,8 @@ Object.defineProperties(L, Vt);
283
283
  Object.defineProperty(Ht, "isAxiosError", { value: !0 });
284
284
  L.from = (t, e, r, s, a, i) => {
285
285
  const o = Object.create(Ht);
286
- p.toFlatObject(t, o, function(u) {
287
- return u !== Error.prototype;
286
+ p.toFlatObject(t, o, function(c) {
287
+ return c !== Error.prototype;
288
288
  }, (d) => d !== "isAxiosError");
289
289
  const l = t && t.message ? t.message : "Error", h = e == null && t ? t.code : e;
290
290
  return L.call(o, l, h, r, s, a), t && o.cause == null && Object.defineProperty(o, "cause", { value: t, configurable: !0 }), o.name = t && t.name || "Error", i && Object.assign(o, i), o;
@@ -317,25 +317,25 @@ function Be(t, e, r) {
317
317
  }, !1, function(j, m) {
318
318
  return !p.isUndefined(m[j]);
319
319
  });
320
- const s = r.metaTokens, a = r.visitor || u, i = r.dots, o = r.indexes, h = (r.Blob || typeof Blob < "u" && Blob) && p.isSpecCompliantForm(e);
320
+ const s = r.metaTokens, a = r.visitor || c, i = r.dots, o = r.indexes, h = (r.Blob || typeof Blob < "u" && Blob) && p.isSpecCompliantForm(e);
321
321
  if (!p.isFunction(a))
322
322
  throw new TypeError("visitor must be a function");
323
- function d(c) {
324
- if (c === null) return "";
325
- if (p.isDate(c))
326
- return c.toISOString();
327
- if (p.isBoolean(c))
328
- return c.toString();
329
- if (!h && p.isBlob(c))
323
+ function d(u) {
324
+ if (u === null) return "";
325
+ if (p.isDate(u))
326
+ return u.toISOString();
327
+ if (p.isBoolean(u))
328
+ return u.toString();
329
+ if (!h && p.isBlob(u))
330
330
  throw new L("Blob is not supported. Use a Buffer instead.");
331
- return p.isArrayBuffer(c) || p.isTypedArray(c) ? h && typeof Blob == "function" ? new Blob([c]) : Buffer.from(c) : c;
331
+ return p.isArrayBuffer(u) || p.isTypedArray(u) ? h && typeof Blob == "function" ? new Blob([u]) : Buffer.from(u) : u;
332
332
  }
333
- function u(c, j, m) {
334
- let $ = c;
335
- if (c && !m && typeof c == "object") {
333
+ function c(u, j, m) {
334
+ let $ = u;
335
+ if (u && !m && typeof u == "object") {
336
336
  if (p.endsWith(j, "{}"))
337
- j = s ? j : j.slice(0, -2), c = JSON.stringify(c);
338
- else if (p.isArray(c) && Qr(c) || (p.isFileList(c) || p.endsWith(j, "[]")) && ($ = p.toArray(c)))
337
+ j = s ? j : j.slice(0, -2), u = JSON.stringify(u);
338
+ else if (p.isArray(u) && Qr(u) || (p.isFileList(u) || p.endsWith(j, "[]")) && ($ = p.toArray(u)))
339
339
  return j = Yt(j), $.forEach(function(z, C) {
340
340
  !(p.isUndefined(z) || z === null) && e.append(
341
341
  // eslint-disable-next-line no-nested-ternary
@@ -344,25 +344,25 @@ function Be(t, e, r) {
344
344
  );
345
345
  }), !1;
346
346
  }
347
- return Qe(c) ? !0 : (e.append(gt(m, j, i), d(c)), !1);
347
+ return Qe(u) ? !0 : (e.append(gt(m, j, i), d(u)), !1);
348
348
  }
349
349
  const b = [], y = Object.assign(en, {
350
- defaultVisitor: u,
350
+ defaultVisitor: c,
351
351
  convertValue: d,
352
352
  isVisitable: Qe
353
353
  });
354
- function w(c, j) {
355
- if (!p.isUndefined(c)) {
356
- if (b.indexOf(c) !== -1)
354
+ function w(u, j) {
355
+ if (!p.isUndefined(u)) {
356
+ if (b.indexOf(u) !== -1)
357
357
  throw Error("Circular reference detected in " + j.join("."));
358
- b.push(c), p.forEach(c, function($, I) {
358
+ b.push(u), p.forEach(u, function($, R) {
359
359
  (!(p.isUndefined($) || $ === null) && a.call(
360
360
  e,
361
361
  $,
362
- p.isString(I) ? I.trim() : I,
362
+ p.isString(R) ? R.trim() : R,
363
363
  j,
364
364
  y
365
- )) === !0 && w($, j ? j.concat(I) : [I]);
365
+ )) === !0 && w($, j ? j.concat(R) : [R]);
366
366
  }), b.pop();
367
367
  }
368
368
  }
@@ -540,7 +540,7 @@ function xn(t, e, r) {
540
540
  }
541
541
  return (r || JSON.stringify)(t);
542
542
  }
543
- const Re = {
543
+ const Ie = {
544
544
  transitional: Gt,
545
545
  adapter: ["xhr", "http", "fetch"],
546
546
  transformRequest: [function(e, r) {
@@ -569,7 +569,7 @@ const Re = {
569
569
  return i || a ? (r.setContentType("application/json", !1), xn(e)) : e;
570
570
  }],
571
571
  transformResponse: [function(e) {
572
- const r = this.transitional || Re.transitional, s = r && r.forcedJSONParsing, a = this.responseType === "json";
572
+ const r = this.transitional || Ie.transitional, s = r && r.forcedJSONParsing, a = this.responseType === "json";
573
573
  if (p.isResponse(e) || p.isReadableStream(e))
574
574
  return e;
575
575
  if (e && p.isString(e) && (s && !this.responseType || a)) {
@@ -607,7 +607,7 @@ const Re = {
607
607
  }
608
608
  };
609
609
  p.forEach(["delete", "get", "head", "post", "put", "patch"], (t) => {
610
- Re.headers[t] = {};
610
+ Ie.headers[t] = {};
611
611
  });
612
612
  const hn = p.toObjectSet([
613
613
  "age",
@@ -680,23 +680,23 @@ let ne = class {
680
680
  set(e, r, s) {
681
681
  const a = this;
682
682
  function i(l, h, d) {
683
- const u = Se(h);
684
- if (!u)
683
+ const c = Se(h);
684
+ if (!c)
685
685
  throw new Error("header name must be a non-empty string");
686
- const b = p.findKey(a, u);
686
+ const b = p.findKey(a, c);
687
687
  (!b || a[b] === void 0 || d === !0 || d === void 0 && a[b] !== !1) && (a[b || h] = $e(l));
688
688
  }
689
- const o = (l, h) => p.forEach(l, (d, u) => i(d, u, h));
689
+ const o = (l, h) => p.forEach(l, (d, c) => i(d, c, h));
690
690
  if (p.isPlainObject(e) || e instanceof this.constructor)
691
691
  o(e, r);
692
692
  else if (p.isString(e) && (e = e.trim()) && !yn(e))
693
693
  o(gn(e), r);
694
694
  else if (p.isObject(e) && p.isIterable(e)) {
695
695
  let l = {}, h, d;
696
- for (const u of e) {
697
- if (!p.isArray(u))
696
+ for (const c of e) {
697
+ if (!p.isArray(c))
698
698
  throw TypeError("Object iterator must return a key-value pair");
699
- l[d = u[0]] = (h = l[d]) ? p.isArray(h) ? [...h, u[1]] : [h, u[1]] : u[1];
699
+ l[d = c[0]] = (h = l[d]) ? p.isArray(h) ? [...h, c[1]] : [h, c[1]] : c[1];
700
700
  }
701
701
  o(l, r);
702
702
  } else
@@ -811,7 +811,7 @@ p.reduceDescriptors(ne.prototype, ({ value: t }, e) => {
811
811
  });
812
812
  p.freezeMethods(ne);
813
813
  function Ke(t, e) {
814
- const r = this || Re, s = e || r, a = ne.from(s.headers);
814
+ const r = this || Ie, s = e || r, a = ne.from(s.headers);
815
815
  let i = s.data;
816
816
  return p.forEach(t, function(l) {
817
817
  i = l.call(r, i, a.normalize(), e ? e.status : void 0);
@@ -845,25 +845,25 @@ function vn(t, e) {
845
845
  const r = new Array(t), s = new Array(t);
846
846
  let a = 0, i = 0, o;
847
847
  return e = e !== void 0 ? e : 1e3, function(h) {
848
- const d = Date.now(), u = s[i];
848
+ const d = Date.now(), c = s[i];
849
849
  o || (o = d), r[a] = h, s[a] = d;
850
850
  let b = i, y = 0;
851
851
  for (; b !== a; )
852
852
  y += r[b++], b = b % t;
853
853
  if (a = (a + 1) % t, a === i && (i = (i + 1) % t), d - o < e)
854
854
  return;
855
- const w = u && d - u;
855
+ const w = c && d - c;
856
856
  return w ? Math.round(y * 1e3 / w) : void 0;
857
857
  };
858
858
  }
859
859
  function Sn(t, e) {
860
860
  let r = 0, s = 1e3 / e, a, i;
861
- const o = (d, u = Date.now()) => {
862
- r = u, a = null, i && (clearTimeout(i), i = null), t(...d);
861
+ const o = (d, c = Date.now()) => {
862
+ r = c, a = null, i && (clearTimeout(i), i = null), t(...d);
863
863
  };
864
864
  return [(...d) => {
865
- const u = Date.now(), b = u - r;
866
- b >= s ? o(d, u) : (a = d, i || (i = setTimeout(() => {
865
+ const c = Date.now(), b = c - r;
866
+ b >= s ? o(d, c) : (a = d, i || (i = setTimeout(() => {
867
867
  i = null, o(a);
868
868
  }, s - b)));
869
869
  }, () => a && o(a)];
@@ -872,7 +872,7 @@ const Ue = (t, e, r = 3) => {
872
872
  let s = 0;
873
873
  const a = vn(50, 250);
874
874
  return Sn((i) => {
875
- const o = i.loaded, l = i.lengthComputable ? i.total : void 0, h = o - s, d = a(h), u = o <= l;
875
+ const o = i.loaded, l = i.lengthComputable ? i.total : void 0, h = o - s, d = a(h), c = o <= l;
876
876
  s = o;
877
877
  const b = {
878
878
  loaded: o,
@@ -880,7 +880,7 @@ const Ue = (t, e, r = 3) => {
880
880
  progress: l ? o / l : void 0,
881
881
  bytes: h,
882
882
  rate: d || void 0,
883
- estimated: d && l && u ? (l - o) / d : void 0,
883
+ estimated: d && l && c ? (l - o) / d : void 0,
884
884
  event: i,
885
885
  lengthComputable: l != null,
886
886
  [e ? "download" : "upload"]: !0
@@ -938,28 +938,28 @@ const vt = (t) => t instanceof ne ? { ...t } : t;
938
938
  function he(t, e) {
939
939
  e = e || {};
940
940
  const r = {};
941
- function s(d, u, b, y) {
942
- return p.isPlainObject(d) && p.isPlainObject(u) ? p.merge.call({ caseless: y }, d, u) : p.isPlainObject(u) ? p.merge({}, u) : p.isArray(u) ? u.slice() : u;
941
+ function s(d, c, b, y) {
942
+ return p.isPlainObject(d) && p.isPlainObject(c) ? p.merge.call({ caseless: y }, d, c) : p.isPlainObject(c) ? p.merge({}, c) : p.isArray(c) ? c.slice() : c;
943
943
  }
944
- function a(d, u, b, y) {
945
- if (p.isUndefined(u)) {
944
+ function a(d, c, b, y) {
945
+ if (p.isUndefined(c)) {
946
946
  if (!p.isUndefined(d))
947
947
  return s(void 0, d, b, y);
948
- } else return s(d, u, b, y);
948
+ } else return s(d, c, b, y);
949
949
  }
950
- function i(d, u) {
951
- if (!p.isUndefined(u))
952
- return s(void 0, u);
950
+ function i(d, c) {
951
+ if (!p.isUndefined(c))
952
+ return s(void 0, c);
953
953
  }
954
- function o(d, u) {
955
- if (p.isUndefined(u)) {
954
+ function o(d, c) {
955
+ if (p.isUndefined(c)) {
956
956
  if (!p.isUndefined(d))
957
957
  return s(void 0, d);
958
- } else return s(void 0, u);
958
+ } else return s(void 0, c);
959
959
  }
960
- function l(d, u, b) {
960
+ function l(d, c, b) {
961
961
  if (b in e)
962
- return s(d, u);
962
+ return s(d, c);
963
963
  if (b in t)
964
964
  return s(void 0, d);
965
965
  }
@@ -992,11 +992,11 @@ function he(t, e) {
992
992
  socketPath: o,
993
993
  responseEncoding: o,
994
994
  validateStatus: l,
995
- headers: (d, u, b) => a(vt(d), vt(u), b, !0)
995
+ headers: (d, c, b) => a(vt(d), vt(c), b, !0)
996
996
  };
997
- return p.forEach(Object.keys({ ...t, ...e }), function(u) {
998
- const b = h[u] || a, y = b(t[u], e[u], u);
999
- p.isUndefined(y) && b !== l || (r[u] = y);
997
+ return p.forEach(Object.keys({ ...t, ...e }), function(c) {
998
+ const b = h[c] || a, y = b(t[c], e[c], c);
999
+ p.isUndefined(y) && b !== l || (r[c] = y);
1000
1000
  }), r;
1001
1001
  }
1002
1002
  const tr = (t) => {
@@ -1010,8 +1010,8 @@ const tr = (t) => {
1010
1010
  o.setContentType(void 0);
1011
1011
  else if (p.isFunction(r.getHeaders)) {
1012
1012
  const h = r.getHeaders(), d = ["content-type", "content-length"];
1013
- Object.entries(h).forEach(([u, b]) => {
1014
- d.includes(u.toLowerCase()) && o.set(u, b);
1013
+ Object.entries(h).forEach(([c, b]) => {
1014
+ d.includes(c.toLowerCase()) && o.set(c, b);
1015
1015
  });
1016
1016
  }
1017
1017
  }
@@ -1020,14 +1020,14 @@ const tr = (t) => {
1020
1020
  h && o.set(a, h);
1021
1021
  }
1022
1022
  return e;
1023
- }, In = typeof XMLHttpRequest < "u", Rn = In && function(t) {
1023
+ }, Rn = typeof XMLHttpRequest < "u", In = Rn && function(t) {
1024
1024
  return new Promise(function(r, s) {
1025
1025
  const a = tr(t);
1026
1026
  let i = a.data;
1027
1027
  const o = ne.from(a.headers).normalize();
1028
- let { responseType: l, onUploadProgress: h, onDownloadProgress: d } = a, u, b, y, w, c;
1028
+ let { responseType: l, onUploadProgress: h, onDownloadProgress: d } = a, c, b, y, w, u;
1029
1029
  function j() {
1030
- w && w(), c && c(), a.cancelToken && a.cancelToken.unsubscribe(u), a.signal && a.signal.removeEventListener("abort", u);
1030
+ w && w(), u && u(), a.cancelToken && a.cancelToken.unsubscribe(c), a.signal && a.signal.removeEventListener("abort", c);
1031
1031
  }
1032
1032
  let m = new XMLHttpRequest();
1033
1033
  m.open(a.method.toUpperCase(), a.url, !0), m.timeout = a.timeout;
@@ -1044,10 +1044,10 @@ const tr = (t) => {
1044
1044
  config: t,
1045
1045
  request: m
1046
1046
  };
1047
- Qt(function(R) {
1048
- r(R), j();
1049
- }, function(R) {
1050
- s(R), j();
1047
+ Qt(function(I) {
1048
+ r(I), j();
1049
+ }, function(I) {
1050
+ s(I), j();
1051
1051
  }, q), m = null;
1052
1052
  }
1053
1053
  "onloadend" in m ? m.onloadend = $ : m.onreadystatechange = function() {
@@ -1068,12 +1068,12 @@ const tr = (t) => {
1068
1068
  )), m = null;
1069
1069
  }, i === void 0 && o.setContentType(null), "setRequestHeader" in m && p.forEach(o.toJSON(), function(C, q) {
1070
1070
  m.setRequestHeader(q, C);
1071
- }), p.isUndefined(a.withCredentials) || (m.withCredentials = !!a.withCredentials), l && l !== "json" && (m.responseType = a.responseType), d && ([y, c] = Ue(d, !0), m.addEventListener("progress", y)), h && m.upload && ([b, w] = Ue(h), m.upload.addEventListener("progress", b), m.upload.addEventListener("loadend", w)), (a.cancelToken || a.signal) && (u = (z) => {
1071
+ }), p.isUndefined(a.withCredentials) || (m.withCredentials = !!a.withCredentials), l && l !== "json" && (m.responseType = a.responseType), d && ([y, u] = Ue(d, !0), m.addEventListener("progress", y)), h && m.upload && ([b, w] = Ue(h), m.upload.addEventListener("progress", b), m.upload.addEventListener("loadend", w)), (a.cancelToken || a.signal) && (c = (z) => {
1072
1072
  m && (s(!z || z.type ? new je(null, t, m) : z), m.abort(), m = null);
1073
- }, a.cancelToken && a.cancelToken.subscribe(u), a.signal && (a.signal.aborted ? u() : a.signal.addEventListener("abort", u)));
1074
- const I = jn(a.url);
1075
- if (I && ee.protocols.indexOf(I) === -1) {
1076
- s(new L("Unsupported protocol " + I + ":", L.ERR_BAD_REQUEST, t));
1073
+ }, a.cancelToken && a.cancelToken.subscribe(c), a.signal && (a.signal.aborted ? c() : a.signal.addEventListener("abort", c)));
1074
+ const R = jn(a.url);
1075
+ if (R && ee.protocols.indexOf(R) === -1) {
1076
+ s(new L("Unsupported protocol " + R + ":", L.ERR_BAD_REQUEST, t));
1077
1077
  return;
1078
1078
  }
1079
1079
  m.send(i || null);
@@ -1085,8 +1085,8 @@ const tr = (t) => {
1085
1085
  const i = function(d) {
1086
1086
  if (!a) {
1087
1087
  a = !0, l();
1088
- const u = d instanceof Error ? d : this.reason;
1089
- s.abort(u instanceof L ? u : new je(u instanceof Error ? u.message : u));
1088
+ const c = d instanceof Error ? d : this.reason;
1089
+ s.abort(c instanceof L ? c : new je(c instanceof Error ? c.message : c));
1090
1090
  }
1091
1091
  };
1092
1092
  let o = e && setTimeout(() => {
@@ -1137,17 +1137,17 @@ const tr = (t) => {
1137
1137
  return new ReadableStream({
1138
1138
  async pull(h) {
1139
1139
  try {
1140
- const { done: d, value: u } = await a.next();
1140
+ const { done: d, value: c } = await a.next();
1141
1141
  if (d) {
1142
1142
  l(), h.close();
1143
1143
  return;
1144
1144
  }
1145
- let b = u.byteLength;
1145
+ let b = c.byteLength;
1146
1146
  if (r) {
1147
1147
  let y = i += b;
1148
1148
  r(y);
1149
1149
  }
1150
- h.enqueue(new Uint8Array(u));
1150
+ h.enqueue(new Uint8Array(c));
1151
1151
  } catch (d) {
1152
1152
  throw l(d), d;
1153
1153
  }
@@ -1177,62 +1177,62 @@ const tr = (t) => {
1177
1177
  const { fetch: e, Request: r, Response: s } = t, a = e ? Oe(e) : typeof fetch == "function", i = Oe(r), o = Oe(s);
1178
1178
  if (!a)
1179
1179
  return !1;
1180
- const l = a && Oe(Et), h = a && (typeof Ct == "function" ? /* @__PURE__ */ ((c) => (j) => c.encode(j))(new Ct()) : async (c) => new Uint8Array(await new r(c).arrayBuffer())), d = i && l && Tt(() => {
1181
- let c = !1;
1180
+ const l = a && Oe(Et), h = a && (typeof Ct == "function" ? /* @__PURE__ */ ((u) => (j) => u.encode(j))(new Ct()) : async (u) => new Uint8Array(await new r(u).arrayBuffer())), d = i && l && Tt(() => {
1181
+ let u = !1;
1182
1182
  const j = new r(ee.origin, {
1183
1183
  body: new Et(),
1184
1184
  method: "POST",
1185
1185
  get duplex() {
1186
- return c = !0, "half";
1186
+ return u = !0, "half";
1187
1187
  }
1188
1188
  }).headers.has("Content-Type");
1189
- return c && !j;
1190
- }), u = o && l && Tt(() => p.isReadableStream(new s("").body)), b = {
1191
- stream: u && ((c) => c.body)
1189
+ return u && !j;
1190
+ }), c = o && l && Tt(() => p.isReadableStream(new s("").body)), b = {
1191
+ stream: c && ((u) => u.body)
1192
1192
  };
1193
- a && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((c) => {
1194
- !b[c] && (b[c] = (j, m) => {
1195
- let $ = j && j[c];
1193
+ a && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((u) => {
1194
+ !b[u] && (b[u] = (j, m) => {
1195
+ let $ = j && j[u];
1196
1196
  if ($)
1197
1197
  return $.call(j);
1198
- throw new L(`Response type '${c}' is not supported`, L.ERR_NOT_SUPPORT, m);
1198
+ throw new L(`Response type '${u}' is not supported`, L.ERR_NOT_SUPPORT, m);
1199
1199
  });
1200
1200
  });
1201
- const y = async (c) => {
1202
- if (c == null)
1201
+ const y = async (u) => {
1202
+ if (u == null)
1203
1203
  return 0;
1204
- if (p.isBlob(c))
1205
- return c.size;
1206
- if (p.isSpecCompliantForm(c))
1204
+ if (p.isBlob(u))
1205
+ return u.size;
1206
+ if (p.isSpecCompliantForm(u))
1207
1207
  return (await new r(ee.origin, {
1208
1208
  method: "POST",
1209
- body: c
1209
+ body: u
1210
1210
  }).arrayBuffer()).byteLength;
1211
- if (p.isArrayBufferView(c) || p.isArrayBuffer(c))
1212
- return c.byteLength;
1213
- if (p.isURLSearchParams(c) && (c = c + ""), p.isString(c))
1214
- return (await h(c)).byteLength;
1215
- }, w = async (c, j) => {
1216
- const m = p.toFiniteNumber(c.getContentLength());
1211
+ if (p.isArrayBufferView(u) || p.isArrayBuffer(u))
1212
+ return u.byteLength;
1213
+ if (p.isURLSearchParams(u) && (u = u + ""), p.isString(u))
1214
+ return (await h(u)).byteLength;
1215
+ }, w = async (u, j) => {
1216
+ const m = p.toFiniteNumber(u.getContentLength());
1217
1217
  return m ?? y(j);
1218
1218
  };
1219
- return async (c) => {
1219
+ return async (u) => {
1220
1220
  let {
1221
1221
  url: j,
1222
1222
  method: m,
1223
1223
  data: $,
1224
- signal: I,
1224
+ signal: R,
1225
1225
  cancelToken: z,
1226
1226
  timeout: C,
1227
1227
  onDownloadProgress: q,
1228
1228
  onUploadProgress: g,
1229
- responseType: R,
1229
+ responseType: I,
1230
1230
  headers: v,
1231
1231
  withCredentials: D = "same-origin",
1232
1232
  fetchOptions: B
1233
- } = tr(c), F = e || fetch;
1234
- R = R ? (R + "").toLowerCase() : "text";
1235
- let V = Pn([I, z && z.toAbortSignal()], C), Z = null;
1233
+ } = tr(u), F = e || fetch;
1234
+ I = I ? (I + "").toLowerCase() : "text";
1235
+ let V = Pn([R, z && z.toAbortSignal()], C), Z = null;
1236
1236
  const T = V && V.unsubscribe && (() => {
1237
1237
  V.unsubscribe();
1238
1238
  });
@@ -1253,7 +1253,7 @@ const tr = (t) => {
1253
1253
  }
1254
1254
  }
1255
1255
  p.isString(D) || (D = D ? "include" : "omit");
1256
- const A = i && "credentials" in r.prototype, P = {
1256
+ const A = i && "credentials" in r.prototype, O = {
1257
1257
  ...B,
1258
1258
  signal: V,
1259
1259
  method: m.toUpperCase(),
@@ -1262,10 +1262,10 @@ const tr = (t) => {
1262
1262
  duplex: "half",
1263
1263
  credentials: A ? D : void 0
1264
1264
  };
1265
- Z = i && new r(j, P);
1266
- let K = await (i ? F(Z, B) : F(j, P));
1267
- const Q = u && (R === "stream" || R === "response");
1268
- if (u && (q || Q && T)) {
1265
+ Z = i && new r(j, O);
1266
+ let K = await (i ? F(Z, B) : F(j, O));
1267
+ const Q = c && (I === "stream" || I === "response");
1268
+ if (c && (q || Q && T)) {
1269
1269
  const f = {};
1270
1270
  ["status", "statusText", "headers"].forEach((_) => {
1271
1271
  f[_] = K[_];
@@ -1281,25 +1281,25 @@ const tr = (t) => {
1281
1281
  f
1282
1282
  );
1283
1283
  }
1284
- R = R || "text";
1285
- let G = await b[p.findKey(b, R) || "text"](K, c);
1284
+ I = I || "text";
1285
+ let G = await b[p.findKey(b, I) || "text"](K, u);
1286
1286
  return !Q && T && T(), await new Promise((f, S) => {
1287
1287
  Qt(f, S, {
1288
1288
  data: G,
1289
1289
  headers: ne.from(K.headers),
1290
1290
  status: K.status,
1291
1291
  statusText: K.statusText,
1292
- config: c,
1292
+ config: u,
1293
1293
  request: Z
1294
1294
  });
1295
1295
  });
1296
1296
  } catch (A) {
1297
1297
  throw T && T(), A && A.name === "TypeError" && /Load failed|fetch/i.test(A.message) ? Object.assign(
1298
- new L("Network Error", L.ERR_NETWORK, c, Z),
1298
+ new L("Network Error", L.ERR_NETWORK, u, Z),
1299
1299
  {
1300
1300
  cause: A.cause || A
1301
1301
  }
1302
- ) : L.from(A, A && A.code, c, Z);
1302
+ ) : L.from(A, A && A.code, u, Z);
1303
1303
  }
1304
1304
  };
1305
1305
  }, Nn = /* @__PURE__ */ new Map(), rr = (t) => {
@@ -1309,15 +1309,15 @@ const tr = (t) => {
1309
1309
  a,
1310
1310
  r
1311
1311
  ];
1312
- let o = i.length, l = o, h, d, u = Nn;
1312
+ let o = i.length, l = o, h, d, c = Nn;
1313
1313
  for (; l--; )
1314
- h = i[l], d = u.get(h), d === void 0 && u.set(h, d = l ? /* @__PURE__ */ new Map() : _n(e)), u = d;
1314
+ h = i[l], d = c.get(h), d === void 0 && c.set(h, d = l ? /* @__PURE__ */ new Map() : _n(e)), c = d;
1315
1315
  return d;
1316
1316
  };
1317
1317
  rr();
1318
1318
  const tt = {
1319
1319
  http: Zr,
1320
- xhr: Rn,
1320
+ xhr: In,
1321
1321
  fetch: {
1322
1322
  get: rr
1323
1323
  }
@@ -1331,7 +1331,7 @@ p.forEach(tt, (t, e) => {
1331
1331
  Object.defineProperty(t, "adapterName", { value: e });
1332
1332
  }
1333
1333
  });
1334
- const It = (t) => `- ${t}`, Dn = (t) => p.isFunction(t) || t === null || t === !1, nr = {
1334
+ const Rt = (t) => `- ${t}`, Dn = (t) => p.isFunction(t) || t === null || t === !1, nr = {
1335
1335
  getAdapter: (t, e) => {
1336
1336
  t = p.isArray(t) ? t : [t];
1337
1337
  const { length: r } = t;
@@ -1351,8 +1351,8 @@ const It = (t) => `- ${t}`, Dn = (t) => p.isFunction(t) || t === null || t === !
1351
1351
  ([h, d]) => `adapter ${h} ` + (d === !1 ? "is not supported by the environment" : "is not available in the build")
1352
1352
  );
1353
1353
  let l = r ? o.length > 1 ? `since :
1354
- ` + o.map(It).join(`
1355
- `) : " " + It(o[0]) : "as no adapter specified";
1354
+ ` + o.map(Rt).join(`
1355
+ `) : " " + Rt(o[0]) : "as no adapter specified";
1356
1356
  throw new L(
1357
1357
  "There is no suitable adapter to dispatch the request " + l,
1358
1358
  "ERR_NOT_SUPPORT"
@@ -1366,11 +1366,11 @@ function Je(t) {
1366
1366
  if (t.cancelToken && t.cancelToken.throwIfRequested(), t.signal && t.signal.aborted)
1367
1367
  throw new je(null, t);
1368
1368
  }
1369
- function Rt(t) {
1369
+ function It(t) {
1370
1370
  return Je(t), t.headers = ne.from(t.headers), t.data = Ke.call(
1371
1371
  t,
1372
1372
  t.transformRequest
1373
- ), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), nr.getAdapter(t.adapter || Re.adapter, t)(t).then(function(s) {
1373
+ ), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), nr.getAdapter(t.adapter || Ie.adapter, t)(t).then(function(s) {
1374
1374
  return Je(t), s.data = Ke.call(
1375
1375
  t,
1376
1376
  t.transformResponse,
@@ -1487,8 +1487,8 @@ let xe = class {
1487
1487
  );
1488
1488
  i && p.forEach(
1489
1489
  ["delete", "get", "head", "post", "put", "patch", "common"],
1490
- (c) => {
1491
- delete i[c];
1490
+ (u) => {
1491
+ delete i[u];
1492
1492
  }
1493
1493
  ), r.headers = ne.concat(o, i);
1494
1494
  const l = [];
@@ -1500,32 +1500,32 @@ let xe = class {
1500
1500
  this.interceptors.response.forEach(function(j) {
1501
1501
  d.push(j.fulfilled, j.rejected);
1502
1502
  });
1503
- let u, b = 0, y;
1503
+ let c, b = 0, y;
1504
1504
  if (!h) {
1505
- const c = [Rt.bind(this), void 0];
1506
- for (c.unshift(...l), c.push(...d), y = c.length, u = Promise.resolve(r); b < y; )
1507
- u = u.then(c[b++], c[b++]);
1508
- return u;
1505
+ const u = [It.bind(this), void 0];
1506
+ for (u.unshift(...l), u.push(...d), y = u.length, c = Promise.resolve(r); b < y; )
1507
+ c = c.then(u[b++], u[b++]);
1508
+ return c;
1509
1509
  }
1510
1510
  y = l.length;
1511
1511
  let w = r;
1512
1512
  for (; b < y; ) {
1513
- const c = l[b++], j = l[b++];
1513
+ const u = l[b++], j = l[b++];
1514
1514
  try {
1515
- w = c(w);
1515
+ w = u(w);
1516
1516
  } catch (m) {
1517
1517
  j.call(this, m);
1518
1518
  break;
1519
1519
  }
1520
1520
  }
1521
1521
  try {
1522
- u = Rt.call(this, w);
1523
- } catch (c) {
1524
- return Promise.reject(c);
1522
+ c = It.call(this, w);
1523
+ } catch (u) {
1524
+ return Promise.reject(u);
1525
1525
  }
1526
1526
  for (b = 0, y = d.length; b < y; )
1527
- u = u.then(d[b++], d[b++]);
1528
- return u;
1527
+ c = c.then(d[b++], d[b++]);
1528
+ return c;
1529
1529
  }
1530
1530
  getUri(e) {
1531
1531
  e = he(this.defaults, e);
@@ -1712,7 +1712,7 @@ function or(t) {
1712
1712
  return or(he(t, a));
1713
1713
  }, r;
1714
1714
  }
1715
- const M = or(Re);
1715
+ const M = or(Ie);
1716
1716
  M.Axios = xe;
1717
1717
  M.CanceledError = je;
1718
1718
  M.CancelToken = Ln;
@@ -2233,13 +2233,13 @@ function Bn() {
2233
2233
  switch (f) {
2234
2234
  case m:
2235
2235
  return "Fragment";
2236
- case I:
2236
+ case R:
2237
2237
  return "Profiler";
2238
2238
  case $:
2239
2239
  return "StrictMode";
2240
2240
  case g:
2241
2241
  return "Suspense";
2242
- case R:
2242
+ case I:
2243
2243
  return "SuspenseList";
2244
2244
  case B:
2245
2245
  return "Activity";
@@ -2327,14 +2327,14 @@ function Bn() {
2327
2327
  }
2328
2328
  function h() {
2329
2329
  var f = t(this.type);
2330
- return P[f] || (P[f] = !0, console.error(
2330
+ return O[f] || (O[f] = !0, console.error(
2331
2331
  "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."
2332
2332
  )), f = this.props.ref, f !== void 0 ? f : null;
2333
2333
  }
2334
2334
  function d(f, S, x, k, _, N) {
2335
2335
  var Y = x.ref;
2336
2336
  return f = {
2337
- $$typeof: c,
2337
+ $$typeof: u,
2338
2338
  type: f,
2339
2339
  key: S,
2340
2340
  props: x,
@@ -2364,7 +2364,7 @@ function Bn() {
2364
2364
  value: N
2365
2365
  }), Object.freeze && (Object.freeze(f.props), Object.freeze(f)), f;
2366
2366
  }
2367
- function u(f, S, x, k, _, N) {
2367
+ function c(f, S, x, k, _, N) {
2368
2368
  var Y = S.children;
2369
2369
  if (Y !== void 0)
2370
2370
  if (k)
@@ -2416,9 +2416,9 @@ React keys must be passed directly to JSX without using spread:
2416
2416
  y(f) ? f._store && (f._store.validated = 1) : typeof f == "object" && f !== null && f.$$typeof === D && (f._payload.status === "fulfilled" ? y(f._payload.value) && f._payload.value._store && (f._payload.value._store.validated = 1) : f._store && (f._store.validated = 1));
2417
2417
  }
2418
2418
  function y(f) {
2419
- return typeof f == "object" && f !== null && f.$$typeof === c;
2419
+ return typeof f == "object" && f !== null && f.$$typeof === u;
2420
2420
  }
2421
- var w = Le, c = Symbol.for("react.transitional.element"), j = Symbol.for("react.portal"), m = Symbol.for("react.fragment"), $ = Symbol.for("react.strict_mode"), I = Symbol.for("react.profiler"), z = Symbol.for("react.consumer"), C = Symbol.for("react.context"), q = Symbol.for("react.forward_ref"), g = Symbol.for("react.suspense"), R = Symbol.for("react.suspense_list"), v = Symbol.for("react.memo"), D = Symbol.for("react.lazy"), B = Symbol.for("react.activity"), F = Symbol.for("react.client.reference"), V = w.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Z = Object.prototype.hasOwnProperty, T = Array.isArray, J = console.createTask ? console.createTask : function() {
2421
+ var w = Le, u = Symbol.for("react.transitional.element"), j = Symbol.for("react.portal"), m = Symbol.for("react.fragment"), $ = Symbol.for("react.strict_mode"), R = Symbol.for("react.profiler"), z = Symbol.for("react.consumer"), C = Symbol.for("react.context"), q = Symbol.for("react.forward_ref"), g = Symbol.for("react.suspense"), I = Symbol.for("react.suspense_list"), v = Symbol.for("react.memo"), D = Symbol.for("react.lazy"), B = Symbol.for("react.activity"), F = Symbol.for("react.client.reference"), V = w.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Z = Object.prototype.hasOwnProperty, T = Array.isArray, J = console.createTask ? console.createTask : function() {
2422
2422
  return null;
2423
2423
  };
2424
2424
  w = {
@@ -2426,13 +2426,13 @@ React keys must be passed directly to JSX without using spread:
2426
2426
  return f();
2427
2427
  }
2428
2428
  };
2429
- var A, P = {}, K = w.react_stack_bottom_frame.bind(
2429
+ var A, O = {}, K = w.react_stack_bottom_frame.bind(
2430
2430
  w,
2431
2431
  i
2432
2432
  )(), Q = J(s(i)), G = {};
2433
2433
  Ee.Fragment = m, Ee.jsx = function(f, S, x) {
2434
2434
  var k = 1e4 > V.recentlyCreatedOwnerStacks++;
2435
- return u(
2435
+ return c(
2436
2436
  f,
2437
2437
  S,
2438
2438
  x,
@@ -2442,7 +2442,7 @@ React keys must be passed directly to JSX without using spread:
2442
2442
  );
2443
2443
  }, Ee.jsxs = function(f, S, x) {
2444
2444
  var k = 1e4 > V.recentlyCreatedOwnerStacks++;
2445
- return u(
2445
+ return c(
2446
2446
  f,
2447
2447
  S,
2448
2448
  x,
@@ -2459,7 +2459,7 @@ function Wn() {
2459
2459
  }
2460
2460
  var n = Wn();
2461
2461
  const Hn = async (t, e) => {
2462
- const { name: r, email: s, password: a, appId: i, phone: o, address: l, avatarUrl: h, isActive: d = !0, role: u = "user" } = t, { baseUrl: b, apiKey: y } = e;
2462
+ const { name: r, email: s, password: a, appId: i, phone: o, address: l, avatarUrl: h, isActive: d = !0, role: c = "user" } = t, { baseUrl: b, apiKey: y } = e;
2463
2463
  if (!y)
2464
2464
  throw new Error("API key is required for signup");
2465
2465
  if (!r || !s || !a || !i)
@@ -2476,7 +2476,7 @@ const Hn = async (t, e) => {
2476
2476
  address: l,
2477
2477
  avatarUrl: h,
2478
2478
  isActive: d,
2479
- role: u
2479
+ role: c
2480
2480
  },
2481
2481
  {
2482
2482
  headers: {
@@ -2487,15 +2487,15 @@ const Hn = async (t, e) => {
2487
2487
  );
2488
2488
  return w.data?.user && localStorage.setItem("userInfo", JSON.stringify(w.data.user)), w.data.user;
2489
2489
  } catch (w) {
2490
- const c = w.response?.data?.message || w.message || "Signup failed";
2491
- if (console.error("Signup API Error:", c), w.response?.status === 400) {
2492
- if (c.includes("already exists"))
2490
+ const u = w.response?.data?.message || w.message || "Signup failed";
2491
+ if (console.error("Signup API Error:", u), w.response?.status === 400) {
2492
+ if (u.includes("already exists"))
2493
2493
  throw {
2494
2494
  success: !1,
2495
2495
  message: "User with this email already exists for this app",
2496
2496
  status: 400
2497
2497
  };
2498
- if (c.includes("inactive"))
2498
+ if (u.includes("inactive"))
2499
2499
  throw {
2500
2500
  success: !1,
2501
2501
  message: "Cannot signup under an inactive app",
@@ -2508,7 +2508,7 @@ const Hn = async (t, e) => {
2508
2508
  status: 404
2509
2509
  } : {
2510
2510
  success: !1,
2511
- message: c,
2511
+ message: u,
2512
2512
  status: w.response?.status || 500
2513
2513
  };
2514
2514
  }
@@ -2577,7 +2577,7 @@ const Gn = Nt(
2577
2577
  ...l
2578
2578
  },
2579
2579
  [
2580
- ...o.map(([d, u]) => Xe(d, u)),
2580
+ ...o.map(([d, c]) => Xe(d, c)),
2581
2581
  ...Array.isArray(i) ? i : [i]
2582
2582
  ]
2583
2583
  )
@@ -2891,7 +2891,7 @@ const Cs = [
2891
2891
  * This source code is licensed under the ISC license.
2892
2892
  * See the LICENSE file in the root directory of this source tree.
2893
2893
  */
2894
- const Is = [
2894
+ const Rs = [
2895
2895
  [
2896
2896
  "path",
2897
2897
  {
@@ -2901,7 +2901,7 @@ const Is = [
2901
2901
  ],
2902
2902
  ["path", { d: "M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7", key: "1ydtos" }],
2903
2903
  ["path", { d: "M7 3v4a1 1 0 0 0 1 1h7", key: "t51u73" }]
2904
- ], Rs = W("save", Is);
2904
+ ], Is = W("save", Rs);
2905
2905
  /**
2906
2906
  * @license lucide-react v0.544.0 - ISC
2907
2907
  *
@@ -3031,19 +3031,19 @@ const Ls = [
3031
3031
  showAvatar: h = !1,
3032
3032
  roles: d = [],
3033
3033
  // 🔥 FIXED
3034
- showRoleSelector: u = !1,
3034
+ showRoleSelector: c = !1,
3035
3035
  // 🔥 FIXED
3036
3036
  loginUrl: b,
3037
3037
  onSuccess: y,
3038
3038
  onError: w
3039
3039
  }) => {
3040
- const { baseUrl: c, apiKey: j, appId: m } = ge(), $ = {
3040
+ const { baseUrl: u, apiKey: j, appId: m } = ge(), $ = {
3041
3041
  name: "",
3042
3042
  email: "",
3043
3043
  password: "",
3044
3044
  role: d.length ? d[0] : "user",
3045
3045
  ...h && { avatarUrl: "" }
3046
- }, [I, z] = O($), [C, q] = O(!1), [g, R] = O(!1), [v, D] = O(null), [B, F] = O({}), [V, Z] = O(!1), T = l ? "#ffffff" : "#111827", J = l ? "#a1a1aa" : "#6b7280", A = l ? "rgba(255,255,255,0.05)" : "rgba(0,0,0,0.02)", P = l ? "rgba(255,255,255,0.1)" : "rgba(0,0,0,0.1)";
3046
+ }, [R, z] = P($), [C, q] = P(!1), [g, I] = P(!1), [v, D] = P(null), [B, F] = P({}), [V, Z] = P(!1), T = l ? "#ffffff" : "#111827", J = l ? "#a1a1aa" : "#6b7280", A = l ? "rgba(255,255,255,0.05)" : "rgba(0,0,0,0.02)", O = l ? "rgba(255,255,255,0.1)" : "rgba(0,0,0,0.1)";
3047
3047
  Le.useEffect(() => {
3048
3048
  if (typeof window < "u") {
3049
3049
  const S = () => Z(window.innerWidth < 768);
@@ -3055,28 +3055,28 @@ const Ls = [
3055
3055
  z((_) => ({ ..._, [x]: k })), B[x] && F((_) => ({ ..._, [x]: void 0 }));
3056
3056
  }, Q = () => {
3057
3057
  const S = {};
3058
- return I.name.trim() || (S.name = "Name is required"), I.email.trim() ? /\S+@\S+\.\S+/.test(I.email) || (S.email = "Invalid email address") : S.email = "Email is required", I.password ? I.password.length < 6 && (S.password = "Password must be at least 6 characters") : S.password = "Password is required", F(S), Object.keys(S).length === 0;
3058
+ return R.name.trim() || (S.name = "Name is required"), R.email.trim() ? /\S+@\S+\.\S+/.test(R.email) || (S.email = "Invalid email address") : S.email = "Email is required", R.password ? R.password.length < 6 && (S.password = "Password must be at least 6 characters") : S.password = "Password is required", F(S), Object.keys(S).length === 0;
3059
3059
  }, G = async (S) => {
3060
3060
  if (S.preventDefault(), !!Q()) {
3061
- R(!0), D(null);
3061
+ I(!0), D(null);
3062
3062
  try {
3063
3063
  const x = {
3064
- ...I,
3064
+ ...R,
3065
3065
  appId: m
3066
- }, k = await Hn(x, { baseUrl: c, apiKey: j });
3066
+ }, k = await Hn(x, { baseUrl: u, apiKey: j });
3067
3067
  D({ type: "success", text: "Account created successfully!" }), y && y(k);
3068
3068
  } catch (x) {
3069
3069
  const k = x.message || "Signup failed. Please try again.";
3070
3070
  D({ type: "error", text: k }), w && w(x);
3071
3071
  } finally {
3072
- R(!1);
3072
+ I(!1);
3073
3073
  }
3074
3074
  }
3075
3075
  }, f = {
3076
3076
  width: "100%",
3077
3077
  padding: V ? "10px 14px 10px 44px" : "10px 16px 10px 44px",
3078
3078
  backgroundColor: A,
3079
- border: `1px solid ${P}`,
3079
+ border: `1px solid ${O}`,
3080
3080
  borderRadius: "10px",
3081
3081
  color: T,
3082
3082
  fontSize: "15px",
@@ -3166,7 +3166,7 @@ const Ls = [
3166
3166
  ]
3167
3167
  }
3168
3168
  ),
3169
- h && I.avatarUrl && /* @__PURE__ */ n.jsx(
3169
+ h && R.avatarUrl && /* @__PURE__ */ n.jsx(
3170
3170
  "div",
3171
3171
  {
3172
3172
  style: {
@@ -3177,7 +3177,7 @@ const Ls = [
3177
3177
  children: /* @__PURE__ */ n.jsx(
3178
3178
  "img",
3179
3179
  {
3180
- src: I.avatarUrl,
3180
+ src: R.avatarUrl,
3181
3181
  alt: "Avatar Preview",
3182
3182
  style: {
3183
3183
  width: "60px",
@@ -3200,7 +3200,7 @@ const Ls = [
3200
3200
  onSubmit: G,
3201
3201
  style: { display: "flex", flexDirection: "column", gap: "14px" },
3202
3202
  children: [
3203
- u && d && d.length === 2 && /* @__PURE__ */ n.jsxs(
3203
+ c && d && d.length === 2 && /* @__PURE__ */ n.jsxs(
3204
3204
  "div",
3205
3205
  {
3206
3206
  style: { display: "flex", flexDirection: "column", gap: "4px" },
@@ -3223,7 +3223,7 @@ const Ls = [
3223
3223
  position: "relative",
3224
3224
  display: "flex",
3225
3225
  borderRadius: "10px",
3226
- border: `1px solid ${P}`,
3226
+ border: `1px solid ${O}`,
3227
3227
  backgroundColor: A,
3228
3228
  overflow: "hidden",
3229
3229
  cursor: "pointer",
@@ -3245,7 +3245,7 @@ const Ls = [
3245
3245
  // subtle shadow
3246
3246
  borderRadius: "10px",
3247
3247
  transition: "transform 0.3s ease, background-color 0.3s ease",
3248
- transform: I.role === d[1] ? "translateX(100%)" : "translateX(0)",
3248
+ transform: R.role === d[1] ? "translateX(100%)" : "translateX(0)",
3249
3249
  zIndex: 0
3250
3250
  }
3251
3251
  }
@@ -3260,9 +3260,9 @@ const Ls = [
3260
3260
  zIndex: 10,
3261
3261
  border: "none",
3262
3262
  background: "transparent",
3263
- color: I.role === d[0] ? i : l ? "#9ca3af" : "#6b7280",
3263
+ color: R.role === d[0] ? i : l ? "#9ca3af" : "#6b7280",
3264
3264
  // theme-aware inactive color
3265
- fontWeight: I.role === d[0] ? 600 : 500,
3265
+ fontWeight: R.role === d[0] ? 600 : 500,
3266
3266
  fontSize: "14px",
3267
3267
  display: "flex",
3268
3268
  alignItems: "center",
@@ -3282,8 +3282,8 @@ const Ls = [
3282
3282
  zIndex: 10,
3283
3283
  border: "none",
3284
3284
  background: "transparent",
3285
- color: I.role === d[1] ? i : l ? "#9ca3af" : "#6b7280",
3286
- fontWeight: I.role === d[1] ? 600 : 500,
3285
+ color: R.role === d[1] ? i : l ? "#9ca3af" : "#6b7280",
3286
+ fontWeight: R.role === d[1] ? 600 : 500,
3287
3287
  fontSize: "14px",
3288
3288
  display: "flex",
3289
3289
  alignItems: "center",
@@ -3333,11 +3333,11 @@ const Ls = [
3333
3333
  type: "text",
3334
3334
  name: "name",
3335
3335
  placeholder: "Enter your full name",
3336
- value: I.name,
3336
+ value: R.name,
3337
3337
  onChange: K,
3338
3338
  style: {
3339
3339
  ...f,
3340
- borderColor: B.name ? "#ef4444" : P
3340
+ borderColor: B.name ? "#ef4444" : O
3341
3341
  }
3342
3342
  }
3343
3343
  )
@@ -3388,11 +3388,11 @@ const Ls = [
3388
3388
  type: "email",
3389
3389
  name: "email",
3390
3390
  placeholder: "Enter your email address",
3391
- value: I.email,
3391
+ value: R.email,
3392
3392
  onChange: K,
3393
3393
  style: {
3394
3394
  ...f,
3395
- borderColor: B.email ? "#ef4444" : P
3395
+ borderColor: B.email ? "#ef4444" : O
3396
3396
  }
3397
3397
  }
3398
3398
  )
@@ -3443,11 +3443,11 @@ const Ls = [
3443
3443
  type: C ? "text" : "password",
3444
3444
  name: "password",
3445
3445
  placeholder: "Create a secure password",
3446
- value: I.password,
3446
+ value: R.password,
3447
3447
  onChange: K,
3448
3448
  style: {
3449
3449
  ...f,
3450
- borderColor: B.password ? "#ef4444" : P
3450
+ borderColor: B.password ? "#ef4444" : O
3451
3451
  }
3452
3452
  }
3453
3453
  ),
@@ -3521,7 +3521,7 @@ const Ls = [
3521
3521
  type: "url",
3522
3522
  name: "avatarUrl",
3523
3523
  placeholder: "Paste your avatar image URL",
3524
- value: I.avatarUrl || "",
3524
+ value: R.avatarUrl || "",
3525
3525
  onChange: K,
3526
3526
  style: f
3527
3527
  }
@@ -3671,14 +3671,14 @@ const Ls = [
3671
3671
  darkMode: l = !0,
3672
3672
  signupUrl: h,
3673
3673
  onSuccess: d,
3674
- onError: u
3674
+ onError: c
3675
3675
  }) => {
3676
- const { baseUrl: b, apiKey: y, appId: w } = ge(), [c, j] = O("login"), [m, $] = O(1), [I, z] = O(!1), [C, q] = O(!1), [g, R] = O(null), [v, D] = O(""), [B, F] = O(""), [V, Z] = O({
3676
+ const { baseUrl: b, apiKey: y, appId: w } = ge(), [u, j] = P("login"), [m, $] = P(1), [R, z] = P(!1), [C, q] = P(!1), [g, I] = P(null), [v, D] = P(""), [B, F] = P(""), [V, Z] = P({
3677
3677
  email: "",
3678
3678
  otp: "",
3679
3679
  newPassword: "",
3680
3680
  appId: w
3681
- }), [T, J] = O(!1), A = l ? "#ffffff" : "#111827", P = l ? "#a1a1aa" : "#6b7280", K = l ? "rgba(255,255,255,0.05)" : "rgba(0,0,0,0.02)", Q = l ? "rgba(255,255,255,0.1)" : "rgba(0,0,0,0.1)";
3681
+ }), [T, J] = P(!1), A = l ? "#ffffff" : "#111827", O = l ? "#a1a1aa" : "#6b7280", K = l ? "rgba(255,255,255,0.05)" : "rgba(0,0,0,0.02)", Q = l ? "rgba(255,255,255,0.1)" : "rgba(0,0,0,0.1)";
3682
3682
  Le.useEffect(() => {
3683
3683
  if (typeof window < "u") {
3684
3684
  const _ = () => J(window.innerWidth < 768);
@@ -3686,23 +3686,23 @@ const Ls = [
3686
3686
  }
3687
3687
  }, []);
3688
3688
  const G = async (_) => {
3689
- _.preventDefault(), q(!0), R(null);
3689
+ _.preventDefault(), q(!0), I(null);
3690
3690
  try {
3691
3691
  const N = await Fs(
3692
3692
  { email: v, password: B, appId: w },
3693
3693
  { baseUrl: b, apiKey: y }
3694
3694
  );
3695
- R({ type: "success", text: `Welcome ${N.name}` }), d?.(N);
3695
+ I({ type: "success", text: `Welcome ${N.name}` }), d?.(N);
3696
3696
  } catch (N) {
3697
3697
  const Y = N.message || "Login failed";
3698
- R({ type: "error", text: Y }), u?.(N);
3698
+ I({ type: "error", text: Y }), c?.(N);
3699
3699
  } finally {
3700
3700
  q(!1);
3701
3701
  }
3702
3702
  }, f = (_) => {
3703
3703
  Z({ ...V, [_.target.name]: _.target.value });
3704
3704
  }, S = async (_) => {
3705
- _.preventDefault(), q(!0), R(null);
3705
+ _.preventDefault(), q(!0), I(null);
3706
3706
  try {
3707
3707
  const N = await M.post(
3708
3708
  `${b}/users/forgot-password`,
@@ -3712,12 +3712,12 @@ const Ls = [
3712
3712
  },
3713
3713
  { headers: { "x-api-key": y } }
3714
3714
  );
3715
- N.data.success ? ($(2), R({ type: "success", text: "OTP sent to your email" })) : R({
3715
+ N.data.success ? ($(2), I({ type: "success", text: "OTP sent to your email" })) : I({
3716
3716
  type: "error",
3717
3717
  text: N.data.message || "Failed to send OTP"
3718
3718
  });
3719
3719
  } catch (N) {
3720
- R({
3720
+ I({
3721
3721
  type: "error",
3722
3722
  text: N.response?.data?.message || "Something went wrong"
3723
3723
  });
@@ -3725,16 +3725,16 @@ const Ls = [
3725
3725
  q(!1);
3726
3726
  }
3727
3727
  }, x = async (_) => {
3728
- _.preventDefault(), q(!0), R(null);
3728
+ _.preventDefault(), q(!0), I(null);
3729
3729
  try {
3730
3730
  const N = await M.post(
3731
3731
  `${b}/users/reset-password`,
3732
3732
  V,
3733
3733
  { headers: { "x-api-key": y } }
3734
3734
  );
3735
- N.data.success ? (R({ type: "success", text: "Password reset successfully!" }), $(1), Z({ email: "", otp: "", newPassword: "", appId: w }), j("login")) : R({ type: "error", text: N.data.message || "Reset failed" });
3735
+ N.data.success ? (I({ type: "success", text: "Password reset successfully!" }), $(1), Z({ email: "", otp: "", newPassword: "", appId: w }), j("login")) : I({ type: "error", text: N.data.message || "Reset failed" });
3736
3736
  } catch (N) {
3737
- R({
3737
+ I({
3738
3738
  type: "error",
3739
3739
  text: N.response?.data?.message || "Something went wrong"
3740
3740
  });
@@ -3817,7 +3817,7 @@ const Ls = [
3817
3817
  color: A,
3818
3818
  margin: 0
3819
3819
  },
3820
- children: c === "login" ? r : m === 1 ? "Forgot Password" : "Reset Password"
3820
+ children: u === "login" ? r : m === 1 ? "Forgot Password" : "Reset Password"
3821
3821
  }
3822
3822
  ),
3823
3823
  /* @__PURE__ */ n.jsx(
@@ -3825,15 +3825,15 @@ const Ls = [
3825
3825
  {
3826
3826
  style: {
3827
3827
  fontSize: "14px",
3828
- color: P
3828
+ color: O
3829
3829
  },
3830
- children: c === "login" ? s : "Follow the steps to reset your password"
3830
+ children: u === "login" ? s : "Follow the steps to reset your password"
3831
3831
  }
3832
3832
  )
3833
3833
  ]
3834
3834
  }
3835
3835
  ),
3836
- c === "login" && /* @__PURE__ */ n.jsxs(
3836
+ u === "login" && /* @__PURE__ */ n.jsxs(
3837
3837
  "form",
3838
3838
  {
3839
3839
  onSubmit: G,
@@ -3866,7 +3866,7 @@ const Ls = [
3866
3866
  left: "14px",
3867
3867
  top: "50%",
3868
3868
  transform: "translateY(-50%)",
3869
- color: P
3869
+ color: O
3870
3870
  }
3871
3871
  }
3872
3872
  ),
@@ -3912,7 +3912,7 @@ const Ls = [
3912
3912
  left: "14px",
3913
3913
  top: "50%",
3914
3914
  transform: "translateY(-50%)",
3915
- color: P
3915
+ color: O
3916
3916
  }
3917
3917
  }
3918
3918
  ),
@@ -3920,7 +3920,7 @@ const Ls = [
3920
3920
  "input",
3921
3921
  {
3922
3922
  id: "login-password",
3923
- type: I ? "text" : "password",
3923
+ type: R ? "text" : "password",
3924
3924
  placeholder: "Enter your password",
3925
3925
  value: B,
3926
3926
  onChange: (_) => F(_.target.value),
@@ -3931,7 +3931,7 @@ const Ls = [
3931
3931
  "button",
3932
3932
  {
3933
3933
  type: "button",
3934
- onClick: () => z(!I),
3934
+ onClick: () => z(!R),
3935
3935
  style: {
3936
3936
  position: "absolute",
3937
3937
  right: "14px",
@@ -3940,10 +3940,10 @@ const Ls = [
3940
3940
  transform: "translateY(-50%)",
3941
3941
  background: "transparent",
3942
3942
  border: "none",
3943
- color: P,
3943
+ color: O,
3944
3944
  cursor: "pointer"
3945
3945
  },
3946
- children: I ? /* @__PURE__ */ n.jsx(it, { size: 20 }) : /* @__PURE__ */ n.jsx(lt, { size: 20 })
3946
+ children: R ? /* @__PURE__ */ n.jsx(it, { size: 20 }) : /* @__PURE__ */ n.jsx(lt, { size: 20 })
3947
3947
  }
3948
3948
  )
3949
3949
  ] })
@@ -4009,7 +4009,7 @@ const Ls = [
4009
4009
  ]
4010
4010
  }
4011
4011
  ),
4012
- c === "forgot" && /* @__PURE__ */ n.jsxs(
4012
+ u === "forgot" && /* @__PURE__ */ n.jsxs(
4013
4013
  "form",
4014
4014
  {
4015
4015
  onSubmit: m === 1 ? S : x,
@@ -4042,7 +4042,7 @@ const Ls = [
4042
4042
  left: "14px",
4043
4043
  top: "50%",
4044
4044
  transform: "translateY(-50%)",
4045
- color: P
4045
+ color: O
4046
4046
  }
4047
4047
  }
4048
4048
  ),
@@ -4093,7 +4093,7 @@ const Ls = [
4093
4093
  left: "14px",
4094
4094
  top: "50%",
4095
4095
  transform: "translateY(-50%)",
4096
- color: P
4096
+ color: O
4097
4097
  }
4098
4098
  }
4099
4099
  ),
@@ -4144,7 +4144,7 @@ const Ls = [
4144
4144
  left: "14px",
4145
4145
  top: "50%",
4146
4146
  transform: "translateY(-50%)",
4147
- color: P
4147
+ color: O
4148
4148
  }
4149
4149
  }
4150
4150
  ),
@@ -4193,7 +4193,7 @@ const Ls = [
4193
4193
  background: "none",
4194
4194
  border: "none",
4195
4195
  fontSize: "14px",
4196
- color: P,
4196
+ color: O,
4197
4197
  marginTop: "6px",
4198
4198
  cursor: "pointer"
4199
4199
  },
@@ -4230,7 +4230,7 @@ const Ls = [
4230
4230
  style: {
4231
4231
  textAlign: "center",
4232
4232
  fontSize: "12px",
4233
- color: P,
4233
+ color: O,
4234
4234
  marginTop: "16px",
4235
4235
  padding: "0 4px"
4236
4236
  },
@@ -4249,35 +4249,33 @@ const Ls = [
4249
4249
  }, xa = ({
4250
4250
  children: t,
4251
4251
  fallback: e = null,
4252
- className: r,
4252
+ className: r = "",
4253
4253
  width: s,
4254
4254
  height: a
4255
4255
  }) => {
4256
- const [i, o] = O(() => {
4257
- if (typeof window > "u") return !1;
4256
+ const [i, o] = P(!1), [l, h] = P(!1);
4257
+ return te(() => {
4258
+ o(!0);
4258
4259
  try {
4259
- const l = localStorage.getItem("userInfo");
4260
- return !!(l && l !== "undefined" && l !== "null");
4260
+ const c = localStorage.getItem("userInfo");
4261
+ h(
4262
+ !!(c && c !== "undefined" && c !== "null")
4263
+ );
4261
4264
  } catch {
4262
- return !1;
4265
+ h(!1);
4263
4266
  }
4264
- });
4265
- return te(() => {
4266
- const l = () => {
4267
- if (!(typeof window > "u"))
4268
- try {
4269
- const h = localStorage.getItem("userInfo");
4270
- o(
4271
- !!(h && h !== "undefined" && h !== "null")
4272
- );
4273
- } catch {
4274
- o(!1);
4275
- }
4276
- };
4277
- return window.addEventListener("storage", l), () => {
4278
- window.removeEventListener("storage", l);
4267
+ const d = () => {
4268
+ try {
4269
+ const c = localStorage.getItem("userInfo");
4270
+ h(
4271
+ !!(c && c !== "undefined" && c !== "null")
4272
+ );
4273
+ } catch {
4274
+ h(!1);
4275
+ }
4279
4276
  };
4280
- }, []), i ? /* @__PURE__ */ n.jsx(
4277
+ return window.addEventListener("storage", d), () => window.removeEventListener("storage", d);
4278
+ }, []), i ? l ? /* @__PURE__ */ n.jsx(
4281
4279
  "div",
4282
4280
  {
4283
4281
  className: r,
@@ -4289,36 +4287,29 @@ const Ls = [
4289
4287
  },
4290
4288
  children: t
4291
4289
  }
4292
- ) : typeof e == "function" ? e() : e;
4290
+ ) : typeof e == "function" ? e() : e : null;
4293
4291
  }, ha = ({
4294
4292
  children: t,
4295
4293
  fallback: e = null,
4296
- className: r,
4294
+ className: r = "",
4297
4295
  width: s,
4298
4296
  height: a
4299
4297
  }) => {
4300
- const [i, o] = O(() => {
4301
- if (typeof window > "u") return !0;
4302
- try {
4303
- const l = localStorage.getItem("userInfo");
4304
- return !l || l === "undefined" || l === "null";
4305
- } catch {
4306
- return !0;
4307
- }
4308
- });
4298
+ const [i, o] = P(!1), [l, h] = P(!0);
4309
4299
  return te(() => {
4310
- const l = () => {
4300
+ o(!0);
4301
+ const d = () => {
4311
4302
  try {
4312
- const h = localStorage.getItem("userInfo");
4313
- o(
4314
- !h || h === "undefined" || h === "null"
4303
+ const c = localStorage.getItem("userInfo");
4304
+ h(
4305
+ !c || c === "undefined" || c === "null"
4315
4306
  );
4316
4307
  } catch {
4317
- o(!0);
4308
+ h(!0);
4318
4309
  }
4319
4310
  };
4320
- return l(), window.addEventListener("storage", l), () => window.removeEventListener("storage", l);
4321
- }, []), i ? /* @__PURE__ */ n.jsx(
4311
+ return d(), window.addEventListener("storage", d), () => window.removeEventListener("storage", d);
4312
+ }, []), i ? l ? /* @__PURE__ */ n.jsx(
4322
4313
  "div",
4323
4314
  {
4324
4315
  className: r,
@@ -4330,7 +4321,7 @@ const Ls = [
4330
4321
  },
4331
4322
  children: t
4332
4323
  }
4333
- ) : typeof e == "function" ? e() : e;
4324
+ ) : typeof e == "function" ? e() : e : null;
4334
4325
  }, qs = ({
4335
4326
  isOpen: t,
4336
4327
  onClose: e,
@@ -4340,7 +4331,7 @@ const Ls = [
4340
4331
  token: i,
4341
4332
  colors: o
4342
4333
  }) => {
4343
- const { baseUrl: l, apiKey: h, appId: d } = ge(), [u, b] = O(!1), [y, w] = O(""), [c, j] = O("warning"), [m, $] = O(!1);
4334
+ const { baseUrl: l, apiKey: h, appId: d } = ge(), [c, b] = P(!1), [y, w] = P(""), [u, j] = P("warning"), [m, $] = P(!1);
4344
4335
  if (te(() => {
4345
4336
  if (typeof window > "u") return;
4346
4337
  const g = () => {
@@ -4348,7 +4339,7 @@ const Ls = [
4348
4339
  };
4349
4340
  return g(), window.addEventListener("resize", g), () => window.removeEventListener("resize", g);
4350
4341
  }, []), !t) return null;
4351
- const I = async () => {
4342
+ const R = async () => {
4352
4343
  b(!0), j("processing");
4353
4344
  try {
4354
4345
  const { data: g } = await M.delete(`${l}/users/delete/${a}`, {
@@ -4366,9 +4357,9 @@ const Ls = [
4366
4357
  b(!1);
4367
4358
  }
4368
4359
  }, z = y.toLowerCase() === "delete my account", C = (g) => {
4369
- g.target === g.currentTarget && c !== "processing" && c !== "success" && e();
4360
+ g.target === g.currentTarget && u !== "processing" && u !== "success" && e();
4370
4361
  }, q = () => {
4371
- switch (c) {
4362
+ switch (u) {
4372
4363
  case "warning":
4373
4364
  return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
4374
4365
  /* @__PURE__ */ n.jsxs(
@@ -4516,7 +4507,7 @@ const Ls = [
4516
4507
  icon: /* @__PURE__ */ n.jsx(ct, { size: 16 }),
4517
4508
  text: "You will lose access to all services"
4518
4509
  }
4519
- ].map((g, R) => /* @__PURE__ */ n.jsxs(
4510
+ ].map((g, I) => /* @__PURE__ */ n.jsxs(
4520
4511
  "div",
4521
4512
  {
4522
4513
  style: {
@@ -4531,7 +4522,7 @@ const Ls = [
4531
4522
  /* @__PURE__ */ n.jsx("span", { children: g.text })
4532
4523
  ]
4533
4524
  },
4534
- R
4525
+ I
4535
4526
  ))
4536
4527
  }
4537
4528
  )
@@ -4767,8 +4758,8 @@ const Ls = [
4767
4758
  /* @__PURE__ */ n.jsxs(
4768
4759
  "button",
4769
4760
  {
4770
- onClick: I,
4771
- disabled: !z || u,
4761
+ onClick: R,
4762
+ disabled: !z || c,
4772
4763
  style: {
4773
4764
  padding: "10px 24px",
4774
4765
  borderRadius: "10px",
@@ -4777,22 +4768,22 @@ const Ls = [
4777
4768
  color: "white",
4778
4769
  fontSize: "14px",
4779
4770
  fontWeight: 600,
4780
- cursor: !z || u ? "not-allowed" : "pointer",
4771
+ cursor: !z || c ? "not-allowed" : "pointer",
4781
4772
  flex: m ? "none" : 1,
4782
4773
  minWidth: m ? "100%" : "140px",
4783
- opacity: !z || u ? 0.6 : 1,
4774
+ opacity: !z || c ? 0.6 : 1,
4784
4775
  display: "flex",
4785
4776
  alignItems: "center",
4786
4777
  justifyContent: "center",
4787
4778
  gap: "8px",
4788
4779
  transition: "all 0.2s ease",
4789
- boxShadow: !z || u ? "none" : "0 4px 12px rgba(239, 68, 68, 0.4)"
4780
+ boxShadow: !z || c ? "none" : "0 4px 12px rgba(239, 68, 68, 0.4)"
4790
4781
  },
4791
4782
  onMouseOver: (g) => {
4792
- z && !u && (g.currentTarget.style.transform = "translateY(-1px)", g.currentTarget.style.boxShadow = "0 6px 20px rgba(239, 68, 68, 0.5)");
4783
+ z && !c && (g.currentTarget.style.transform = "translateY(-1px)", g.currentTarget.style.boxShadow = "0 6px 20px rgba(239, 68, 68, 0.5)");
4793
4784
  },
4794
4785
  onMouseOut: (g) => {
4795
- z && !u && (g.currentTarget.style.transform = "translateY(0)", g.currentTarget.style.boxShadow = "0 4px 12px rgba(239, 68, 68, 0.4)");
4786
+ z && !c && (g.currentTarget.style.transform = "translateY(0)", g.currentTarget.style.boxShadow = "0 4px 12px rgba(239, 68, 68, 0.4)");
4796
4787
  },
4797
4788
  children: [
4798
4789
  /* @__PURE__ */ n.jsx(Ne, { size: 16 }),
@@ -4883,7 +4874,7 @@ const Ls = [
4883
4874
  { text: "Removing your data", active: !0 },
4884
4875
  { text: "Closing active sessions", active: !1 },
4885
4876
  { text: "Finalizing deletion", active: !1 }
4886
- ].map((g, R) => /* @__PURE__ */ n.jsxs(
4877
+ ].map((g, I) => /* @__PURE__ */ n.jsxs(
4887
4878
  "div",
4888
4879
  {
4889
4880
  style: {
@@ -4922,7 +4913,7 @@ const Ls = [
4922
4913
  )
4923
4914
  ]
4924
4915
  },
4925
- R
4916
+ I
4926
4917
  ))
4927
4918
  }
4928
4919
  ) }),
@@ -5192,20 +5183,20 @@ const Ls = [
5192
5183
  onUpdate: r,
5193
5184
  colors: s
5194
5185
  }) => {
5195
- const [a, i] = O(""), [o, l] = O(!1), [h, d] = O(!1), [u, b] = O({ isValid: !1, message: "", type: null });
5186
+ const [a, i] = P(""), [o, l] = P(!1), [h, d] = P(!1), [c, b] = P({ isValid: !1, message: "", type: null });
5196
5187
  if (te(() => {
5197
5188
  if (typeof window > "u") return;
5198
- const c = () => {
5189
+ const u = () => {
5199
5190
  d(window.innerWidth < 640);
5200
5191
  };
5201
- return c(), window.addEventListener("resize", c), () => window.removeEventListener("resize", c);
5192
+ return u(), window.addEventListener("resize", u), () => window.removeEventListener("resize", u);
5202
5193
  }, []), te(() => {
5203
5194
  if (!a.trim()) {
5204
5195
  b({ isValid: !1, message: "", type: null });
5205
5196
  return;
5206
5197
  }
5207
5198
  try {
5208
- const c = new URL(a), j = /\.(jpg|jpeg|png|gif|webp|svg)$/i.test(c.pathname);
5199
+ const u = new URL(a), j = /\.(jpg|jpeg|png|gif|webp|svg)$/i.test(u.pathname);
5209
5200
  b(j ? {
5210
5201
  isValid: !0,
5211
5202
  message: "Valid image URL",
@@ -5224,7 +5215,7 @@ const Ls = [
5224
5215
  }
5225
5216
  }, [a]), !t) return null;
5226
5217
  const y = async () => {
5227
- if (!(!a || !u.isValid)) {
5218
+ if (!(!a || !c.isValid)) {
5228
5219
  l(!0);
5229
5220
  try {
5230
5221
  await r(a) && (i(""), e());
@@ -5232,8 +5223,8 @@ const Ls = [
5232
5223
  l(!1);
5233
5224
  }
5234
5225
  }
5235
- }, w = (c) => {
5236
- c.target === c.currentTarget && e();
5226
+ }, w = (u) => {
5227
+ u.target === u.currentTarget && e();
5237
5228
  };
5238
5229
  return /* @__PURE__ */ n.jsxs(
5239
5230
  "div",
@@ -5340,11 +5331,11 @@ const Ls = [
5340
5331
  flexShrink: 0,
5341
5332
  transition: "all 0.2s ease"
5342
5333
  },
5343
- onMouseOver: (c) => {
5344
- c.currentTarget.style.backgroundColor = s.border, c.currentTarget.style.color = s.textPrimary;
5334
+ onMouseOver: (u) => {
5335
+ u.currentTarget.style.backgroundColor = s.border, u.currentTarget.style.color = s.textPrimary;
5345
5336
  },
5346
- onMouseOut: (c) => {
5347
- c.currentTarget.style.backgroundColor = "transparent", c.currentTarget.style.color = s.textTertiary;
5337
+ onMouseOut: (u) => {
5338
+ u.currentTarget.style.backgroundColor = "transparent", u.currentTarget.style.color = s.textTertiary;
5348
5339
  },
5349
5340
  children: /* @__PURE__ */ n.jsx(Pe, { size: 20 })
5350
5341
  }
@@ -5389,13 +5380,13 @@ const Ls = [
5389
5380
  id: "avatar-url",
5390
5381
  placeholder: "https://example.com/your-avatar.jpg",
5391
5382
  value: a,
5392
- onChange: (c) => i(c.target.value),
5383
+ onChange: (u) => i(u.target.value),
5393
5384
  style: {
5394
5385
  width: "100%",
5395
5386
  padding: "14px 16px",
5396
5387
  paddingLeft: "44px",
5397
5388
  borderRadius: "12px",
5398
- border: `1.5px solid ${u.type === "error" ? s.error : u.type === "success" ? s.success : s.border}`,
5389
+ border: `1.5px solid ${c.type === "error" ? s.error : c.type === "success" ? s.success : s.border}`,
5399
5390
  backgroundColor: "transparent",
5400
5391
  color: s.textPrimary,
5401
5392
  fontSize: "15px",
@@ -5403,11 +5394,11 @@ const Ls = [
5403
5394
  transition: "all 0.2s ease",
5404
5395
  boxSizing: "border-box"
5405
5396
  },
5406
- onFocus: (c) => {
5407
- c.target.style.borderColor = s.accent, c.target.style.boxShadow = `0 0 0 3px ${s.accent}20`;
5397
+ onFocus: (u) => {
5398
+ u.target.style.borderColor = s.accent, u.target.style.boxShadow = `0 0 0 3px ${s.accent}20`;
5408
5399
  },
5409
- onBlur: (c) => {
5410
- c.target.style.borderColor = u.type === "error" ? s.error : u.type === "success" ? s.success : s.border, c.target.style.boxShadow = "none";
5400
+ onBlur: (u) => {
5401
+ u.target.style.borderColor = c.type === "error" ? s.error : c.type === "success" ? s.success : s.border, u.target.style.boxShadow = "none";
5411
5402
  },
5412
5403
  disabled: o
5413
5404
  }
@@ -5426,7 +5417,7 @@ const Ls = [
5426
5417
  }
5427
5418
  )
5428
5419
  ] }),
5429
- u.message && /* @__PURE__ */ n.jsxs(
5420
+ c.message && /* @__PURE__ */ n.jsxs(
5430
5421
  "div",
5431
5422
  {
5432
5423
  style: {
@@ -5435,18 +5426,18 @@ const Ls = [
5435
5426
  gap: "6px",
5436
5427
  marginTop: "8px",
5437
5428
  fontSize: "13px",
5438
- color: u.type === "success" ? s.success : u.type === "error" ? s.error : s.textTertiary
5429
+ color: c.type === "success" ? s.success : c.type === "error" ? s.error : s.textTertiary
5439
5430
  },
5440
5431
  children: [
5441
- u.type === "success" && /* @__PURE__ */ n.jsx(de, { size: 14 }),
5442
- u.type === "error" && /* @__PURE__ */ n.jsx(le, { size: 14 }),
5443
- u.type === "warning" && /* @__PURE__ */ n.jsx(le, { size: 14 }),
5444
- u.message
5432
+ c.type === "success" && /* @__PURE__ */ n.jsx(de, { size: 14 }),
5433
+ c.type === "error" && /* @__PURE__ */ n.jsx(le, { size: 14 }),
5434
+ c.type === "warning" && /* @__PURE__ */ n.jsx(le, { size: 14 }),
5435
+ c.message
5445
5436
  ]
5446
5437
  }
5447
5438
  )
5448
5439
  ] }),
5449
- a && u.type === "success" && /* @__PURE__ */ n.jsxs(
5440
+ a && c.type === "success" && /* @__PURE__ */ n.jsxs(
5450
5441
  "div",
5451
5442
  {
5452
5443
  style: {
@@ -5482,8 +5473,8 @@ const Ls = [
5482
5473
  border: `2px solid ${s.success}40`,
5483
5474
  margin: "0 auto"
5484
5475
  },
5485
- onError: (c) => {
5486
- c.currentTarget.style.display = "none";
5476
+ onError: (u) => {
5477
+ u.currentTarget.style.display = "none";
5487
5478
  }
5488
5479
  }
5489
5480
  )
@@ -5524,11 +5515,11 @@ const Ls = [
5524
5515
  opacity: o ? 0.6 : 1,
5525
5516
  transition: "all 0.2s ease"
5526
5517
  },
5527
- onMouseOver: (c) => {
5528
- o || (c.currentTarget.style.backgroundColor = s.border, c.currentTarget.style.transform = "translateY(-1px)");
5518
+ onMouseOver: (u) => {
5519
+ o || (u.currentTarget.style.backgroundColor = s.border, u.currentTarget.style.transform = "translateY(-1px)");
5529
5520
  },
5530
- onMouseOut: (c) => {
5531
- o || (c.currentTarget.style.backgroundColor = "transparent", c.currentTarget.style.transform = "translateY(0)");
5521
+ onMouseOut: (u) => {
5522
+ o || (u.currentTarget.style.backgroundColor = "transparent", u.currentTarget.style.transform = "translateY(0)");
5532
5523
  },
5533
5524
  children: "Cancel"
5534
5525
  }
@@ -5537,7 +5528,7 @@ const Ls = [
5537
5528
  "button",
5538
5529
  {
5539
5530
  onClick: y,
5540
- disabled: o || !u.isValid,
5531
+ disabled: o || !c.isValid,
5541
5532
  style: {
5542
5533
  padding: "10px 24px",
5543
5534
  borderRadius: "10px",
@@ -5546,22 +5537,22 @@ const Ls = [
5546
5537
  color: "#fff",
5547
5538
  fontSize: "14px",
5548
5539
  fontWeight: 600,
5549
- cursor: o || !u.isValid ? "not-allowed" : "pointer",
5540
+ cursor: o || !c.isValid ? "not-allowed" : "pointer",
5550
5541
  flex: h ? "none" : 1,
5551
5542
  minWidth: h ? "100%" : "140px",
5552
- opacity: o || !u.isValid ? 0.6 : 1,
5543
+ opacity: o || !c.isValid ? 0.6 : 1,
5553
5544
  display: "flex",
5554
5545
  alignItems: "center",
5555
5546
  justifyContent: "center",
5556
5547
  gap: "8px",
5557
5548
  transition: "all 0.2s ease",
5558
- boxShadow: o || !u.isValid ? "none" : `0 4px 12px ${s.accent}40`
5549
+ boxShadow: o || !c.isValid ? "none" : `0 4px 12px ${s.accent}40`
5559
5550
  },
5560
- onMouseOver: (c) => {
5561
- !o && u.isValid && (c.currentTarget.style.transform = "translateY(-1px)", c.currentTarget.style.boxShadow = `0 6px 20px ${s.accent}60`);
5551
+ onMouseOver: (u) => {
5552
+ !o && c.isValid && (u.currentTarget.style.transform = "translateY(-1px)", u.currentTarget.style.boxShadow = `0 6px 20px ${s.accent}60`);
5562
5553
  },
5563
- onMouseOut: (c) => {
5564
- !o && u.isValid && (c.currentTarget.style.transform = "translateY(0)", c.currentTarget.style.boxShadow = `0 4px 12px ${s.accent}40`);
5554
+ onMouseOut: (u) => {
5555
+ !o && c.isValid && (u.currentTarget.style.transform = "translateY(0)", u.currentTarget.style.boxShadow = `0 4px 12px ${s.accent}40`);
5565
5556
  },
5566
5557
  children: o ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
5567
5558
  /* @__PURE__ */ n.jsx(
@@ -5646,25 +5637,25 @@ const Ls = [
5646
5637
  userId: a,
5647
5638
  colors: i
5648
5639
  }) => {
5649
- const { baseUrl: o, apiKey: l, appId: h } = ge(), [d, u] = O({
5640
+ const { baseUrl: o, apiKey: l, appId: h } = ge(), [d, c] = P({
5650
5641
  currentPassword: "",
5651
5642
  newPassword: "",
5652
5643
  confirmPassword: ""
5653
- }), [b, y] = O({}), [w, c] = O(!1), [j, m] = O({
5644
+ }), [b, y] = P({}), [w, u] = P(!1), [j, m] = P({
5654
5645
  currentPassword: !1,
5655
5646
  newPassword: !1,
5656
5647
  confirmPassword: !1
5657
- }), [$, I] = O(!1);
5648
+ }), [$, R] = P(!1);
5658
5649
  if (Le.useEffect(() => {
5659
5650
  if (typeof window > "u") return;
5660
5651
  const v = () => {
5661
- I(window.innerWidth < 640);
5652
+ R(window.innerWidth < 640);
5662
5653
  };
5663
5654
  return v(), window.addEventListener("resize", v), () => window.removeEventListener("resize", v);
5664
5655
  }, []), !t) return null;
5665
5656
  const z = (v) => {
5666
5657
  const { name: D, value: B } = v.target;
5667
- u((F) => ({ ...F, [D]: B })), b[D] && y((F) => ({ ...F, [D]: "" }));
5658
+ c((F) => ({ ...F, [D]: B })), b[D] && y((F) => ({ ...F, [D]: "" }));
5668
5659
  }, C = (v) => {
5669
5660
  m((D) => ({ ...D, [v]: !D[v] }));
5670
5661
  }, q = () => {
@@ -5672,7 +5663,7 @@ const Ls = [
5672
5663
  return d.currentPassword || (v.currentPassword = "Current password is required"), d.newPassword ? d.newPassword.length < 6 && (v.newPassword = "Password must be at least 6 characters") : v.newPassword = "New password is required", d.newPassword !== d.confirmPassword && (v.confirmPassword = "Passwords do not match"), y(v), Object.keys(v).length === 0;
5673
5664
  }, g = async (v) => {
5674
5665
  if (v.preventDefault(), !!q()) {
5675
- c(!0);
5666
+ u(!0);
5676
5667
  try {
5677
5668
  const { data: D } = await M.put(
5678
5669
  `${o}/users/change-password/${a}`,
@@ -5687,7 +5678,7 @@ const Ls = [
5687
5678
  }
5688
5679
  }
5689
5680
  );
5690
- D.success ? (r(D.message || "Password updated successfully"), u({
5681
+ D.success ? (r(D.message || "Password updated successfully"), c({
5691
5682
  currentPassword: "",
5692
5683
  newPassword: "",
5693
5684
  confirmPassword: ""
@@ -5695,10 +5686,10 @@ const Ls = [
5695
5686
  } catch (D) {
5696
5687
  s(D.response?.data?.message || "Something went wrong");
5697
5688
  } finally {
5698
- c(!1);
5689
+ u(!1);
5699
5690
  }
5700
5691
  }
5701
- }, R = [
5692
+ }, I = [
5702
5693
  {
5703
5694
  field: "currentPassword",
5704
5695
  label: "Current Password",
@@ -5831,7 +5822,7 @@ const Ls = [
5831
5822
  }
5832
5823
  ),
5833
5824
  /* @__PURE__ */ n.jsxs("form", { onSubmit: g, children: [
5834
- R.map(({ field: v, label: D, icon: B }) => /* @__PURE__ */ n.jsxs(
5825
+ I.map(({ field: v, label: D, icon: B }) => /* @__PURE__ */ n.jsxs(
5835
5826
  "div",
5836
5827
  {
5837
5828
  style: {
@@ -6094,7 +6085,7 @@ const Ls = [
6094
6085
  verifying: l,
6095
6086
  user: h,
6096
6087
  colors: d,
6097
- darkMode: u
6088
+ darkMode: c
6098
6089
  }) => {
6099
6090
  if (!t) return null;
6100
6091
  const b = () => {
@@ -6105,7 +6096,7 @@ const Ls = [
6105
6096
  {
6106
6097
  className: "modal-overlay",
6107
6098
  style: {
6108
- backgroundColor: u ? "rgba(0, 0, 0, 0.8)" : "rgba(0, 0, 0, 0.5)"
6099
+ backgroundColor: c ? "rgba(0, 0, 0, 0.8)" : "rgba(0, 0, 0, 0.5)"
6109
6100
  },
6110
6101
  children: [
6111
6102
  /* @__PURE__ */ n.jsxs(
@@ -6264,7 +6255,7 @@ const Ls = [
6264
6255
  }
6265
6256
 
6266
6257
  .close-btn:hover {
6267
- background-color: ${u ? "rgba(255,255,255,0.1)" : "rgba(0,0,0,0.1)"};
6258
+ background-color: ${c ? "rgba(255,255,255,0.1)" : "rgba(0,0,0,0.1)"};
6268
6259
  }
6269
6260
 
6270
6261
  .verify-form {
@@ -6375,11 +6366,11 @@ const Ls = [
6375
6366
  onVerify: i,
6376
6367
  primaryColor: o = "#00C212"
6377
6368
  }) => {
6378
- const { baseUrl: l, apiKey: h, appId: d } = ge(), [u, b] = O(null), [y, w] = O(e), [c, j] = O(!0), [m, $] = O(!1), [I, z] = O(!1), [C, q] = O(!1), [g, R] = O(!1), [v, D] = O(!1), [B, F] = O(!1), [V, Z] = O(!1), [T, J] = O(!1), [A, P] = O(null), [K, Q] = O(!1), [G, f] = O({
6369
+ const { baseUrl: l, apiKey: h, appId: d } = ge(), [c, b] = P(null), [y, w] = P(e), [u, j] = P(!0), [m, $] = P(!1), [R, z] = P(!1), [C, q] = P(!1), [g, I] = P(!1), [v, D] = P(!1), [B, F] = P(!1), [V, Z] = P(!1), [T, J] = P(!1), [A, O] = P(null), [K, Q] = P(!1), [G, f] = P({
6379
6370
  email: "",
6380
6371
  otp: "",
6381
6372
  appId: d
6382
- }), [S, x] = O(!1), [k, _] = O(!1);
6373
+ }), [S, x] = P(!1), [k, _] = P(!1);
6383
6374
  te(() => {
6384
6375
  if (typeof window < "u") {
6385
6376
  const E = () => b(window.innerWidth);
@@ -6387,7 +6378,7 @@ const Ls = [
6387
6378
  }
6388
6379
  }, []);
6389
6380
  const N = (E, H) => {
6390
- P({ type: E, message: H }), setTimeout(() => P(null), 3e3);
6381
+ O({ type: E, message: H }), setTimeout(() => O(null), 3e3);
6391
6382
  }, Y = () => {
6392
6383
  J(!0);
6393
6384
  const E = setTimeout(() => {
@@ -6547,7 +6538,7 @@ const Ls = [
6547
6538
  border: "#e4e4e7",
6548
6539
  warning: "#d97706"
6549
6540
  };
6550
- if (c)
6541
+ if (u)
6551
6542
  return /* @__PURE__ */ n.jsx(
6552
6543
  "div",
6553
6544
  {
@@ -6715,14 +6706,14 @@ const Ls = [
6715
6706
  display: "grid",
6716
6707
  gap: "24px",
6717
6708
  gridTemplateColumns: "1fr",
6718
- ...u && window.innerWidth >= 1024 && {
6709
+ ...c && window.innerWidth >= 1024 && {
6719
6710
  gridTemplateColumns: "1fr 2fr",
6720
6711
  gap: "10px"
6721
6712
  },
6722
- ...u && window.innerWidth >= 768 && u && window.innerWidth < 1024 && {
6713
+ ...c && window.innerWidth >= 768 && c && window.innerWidth < 1024 && {
6723
6714
  gap: "10px"
6724
6715
  },
6725
- ...u && window.innerWidth >= 600 && u && window.innerWidth < 768 && {
6716
+ ...c && window.innerWidth >= 600 && c && window.innerWidth < 768 && {
6726
6717
  gap: "28px"
6727
6718
  }
6728
6719
  },
@@ -6907,7 +6898,7 @@ const Ls = [
6907
6898
  gap: "8px",
6908
6899
  textDecoration: "none",
6909
6900
  minHeight: "36px",
6910
- flex: u && window.innerWidth < 1024 ? "1" : "auto"
6901
+ flex: c && window.innerWidth < 1024 ? "1" : "auto"
6911
6902
  },
6912
6903
  children: [
6913
6904
  /* @__PURE__ */ n.jsx(Pe, { size: 16, "aria-hidden": "true" }),
@@ -6919,15 +6910,15 @@ const Ls = [
6919
6910
  "button",
6920
6911
  {
6921
6912
  onClick: ur,
6922
- disabled: I,
6913
+ disabled: R,
6923
6914
  style: {
6924
6915
  background: `linear-gradient(to right, ${U.accent}, ${U.accentHover})`,
6925
- opacity: I ? 0.7 : 1,
6916
+ opacity: R ? 0.7 : 1,
6926
6917
  color: "white",
6927
6918
  padding: "10px 20px",
6928
6919
  borderRadius: "6px",
6929
6920
  border: "none",
6930
- cursor: I ? "not-allowed" : "pointer",
6921
+ cursor: R ? "not-allowed" : "pointer",
6931
6922
  transition: "all 0.2s ease",
6932
6923
  fontSize: "12px",
6933
6924
  fontWeight: 500,
@@ -6937,18 +6928,18 @@ const Ls = [
6937
6928
  gap: "8px",
6938
6929
  textDecoration: "none",
6939
6930
  minHeight: "36px",
6940
- flex: u && window.innerWidth < 1024 ? "1" : "auto"
6931
+ flex: c && window.innerWidth < 1024 ? "1" : "auto"
6941
6932
  },
6942
6933
  children: [
6943
- I ? /* @__PURE__ */ n.jsx(
6934
+ R ? /* @__PURE__ */ n.jsx(
6944
6935
  ae,
6945
6936
  {
6946
6937
  size: 16,
6947
6938
  style: { animation: "spin 1s linear infinite" },
6948
6939
  "aria-hidden": "true"
6949
6940
  }
6950
- ) : /* @__PURE__ */ n.jsx(Rs, { size: 16, "aria-hidden": "true" }),
6951
- I ? "Saving..." : "Save Changes"
6941
+ ) : /* @__PURE__ */ n.jsx(Is, { size: 16, "aria-hidden": "true" }),
6942
+ R ? "Saving..." : "Save Changes"
6952
6943
  ]
6953
6944
  }
6954
6945
  )
@@ -6973,7 +6964,7 @@ const Ls = [
6973
6964
  gap: "8px",
6974
6965
  textDecoration: "none",
6975
6966
  minHeight: "36px",
6976
- flex: u && window.innerWidth < 1024 ? "1" : "auto"
6967
+ flex: c && window.innerWidth < 1024 ? "1" : "auto"
6977
6968
  },
6978
6969
  children: [
6979
6970
  /* @__PURE__ */ n.jsx(Es, { size: 16, "aria-hidden": "true" }),
@@ -7003,7 +6994,7 @@ const Ls = [
7003
6994
  gap: "8px",
7004
6995
  minHeight: "36px",
7005
6996
  opacity: K ? 0.7 : 1,
7006
- flex: u && window.innerWidth < 1024 ? "1" : "auto"
6997
+ flex: c && window.innerWidth < 1024 ? "1" : "auto"
7007
6998
  },
7008
6999
  children: [
7009
7000
  K ? /* @__PURE__ */ n.jsx(
@@ -7071,7 +7062,7 @@ const Ls = [
7071
7062
  "button",
7072
7063
  {
7073
7064
  onClick: () => {
7074
- R(!0), Y();
7065
+ I(!0), Y();
7075
7066
  },
7076
7067
  style: {
7077
7068
  width: "100%",
@@ -7213,7 +7204,7 @@ const Ls = [
7213
7204
  display: "grid",
7214
7205
  gap: "20px",
7215
7206
  gridTemplateColumns: "1fr",
7216
- ...u && window.innerWidth >= 600 && {
7207
+ ...c && window.innerWidth >= 600 && {
7217
7208
  gridTemplateColumns: "1fr 1fr",
7218
7209
  gap: "20px"
7219
7210
  }
@@ -7448,7 +7439,7 @@ const Ls = [
7448
7439
  appId: d,
7449
7440
  userId: y.id,
7450
7441
  isOpen: g,
7451
- onClose: () => R(!1),
7442
+ onClose: () => I(!1),
7452
7443
  onSuccess: (E) => N("success", E),
7453
7444
  onError: (E) => N("error", E),
7454
7445
  colors: U
@@ -7592,14 +7583,14 @@ const Ls = [
7592
7583
  // Menu item visibility with defaults
7593
7584
  showProfileMenuItem: h = !0,
7594
7585
  showSettingsMenuItem: d = !0,
7595
- showViewProfileMenuItem: u = !0,
7586
+ showViewProfileMenuItem: c = !0,
7596
7587
  // Custom labels with defaults
7597
7588
  profileLabel: b = "My Profile",
7598
7589
  settingsLabel: y = "Settings",
7599
7590
  viewProfileLabel: w = "View Profile",
7600
- logoutLabel: c = "Sign Out"
7591
+ logoutLabel: u = "Sign Out"
7601
7592
  }) => {
7602
- const { baseUrl: j, apiKey: m, appId: $ } = ge(), [I, z] = O(!1), [C, q] = O(null), [g, R] = O(!0), [v, D] = O(null), B = xt(null), F = xt(null), [V, Z] = O(!1), [T, J] = O(!1);
7593
+ const { baseUrl: j, apiKey: m, appId: $ } = ge(), [R, z] = P(!1), [C, q] = P(null), [g, I] = P(!0), [v, D] = P(null), B = xt(null), F = xt(null), [V, Z] = P(!1), [T, J] = P(!1);
7603
7594
  te(() => {
7604
7595
  if (typeof window > "u") return;
7605
7596
  const x = () => {
@@ -7609,7 +7600,7 @@ const Ls = [
7609
7600
  }, []), te(() => {
7610
7601
  (async () => {
7611
7602
  try {
7612
- if (R(!0), D(null), a) {
7603
+ if (I(!0), D(null), a) {
7613
7604
  if (!a.id || !a.name || !a.email)
7614
7605
  throw new Error("Invalid user data provided");
7615
7606
  q(a);
@@ -7628,20 +7619,20 @@ const Ls = [
7628
7619
  } catch (k) {
7629
7620
  console.error("User initialization failed:", k), D(k.message || "Failed to load user");
7630
7621
  } finally {
7631
- R(!1);
7622
+ I(!1);
7632
7623
  }
7633
7624
  })();
7634
7625
  }, [a]), te(() => {
7635
7626
  if (typeof window > "u") return;
7636
7627
  const x = () => {
7637
- if (!I || !F.current) return;
7628
+ if (!R || !F.current) return;
7638
7629
  const k = F.current.getBoundingClientRect(), _ = window.innerWidth, N = window.innerHeight, Y = 280, se = _ - k.right, ue = k.left;
7639
7630
  N - k.bottom;
7640
7631
  const ve = se >= Y || se > ue;
7641
7632
  Z(ve);
7642
7633
  };
7643
7634
  return x(), window.addEventListener("resize", x), () => window.removeEventListener("resize", x);
7644
- }, [I]), te(() => {
7635
+ }, [R]), te(() => {
7645
7636
  if (typeof window > "u" || typeof document > "u")
7646
7637
  return;
7647
7638
  const x = (N) => {
@@ -7649,12 +7640,12 @@ const Ls = [
7649
7640
  }, k = (N) => {
7650
7641
  N.key === "Escape" && z(!1);
7651
7642
  }, _ = () => {
7652
- I && z(!1);
7643
+ R && z(!1);
7653
7644
  };
7654
- return I && (document.addEventListener("mousedown", x), document.addEventListener("keydown", k), window.addEventListener("scroll", _)), () => {
7645
+ return R && (document.addEventListener("mousedown", x), document.addEventListener("keydown", k), window.addEventListener("scroll", _)), () => {
7655
7646
  document.removeEventListener("mousedown", x), document.removeEventListener("keydown", k), window.removeEventListener("scroll", _);
7656
7647
  };
7657
- }, [I]);
7648
+ }, [R]);
7658
7649
  const A = t ? {
7659
7650
  surface: "#000000",
7660
7651
  surfaceElevated: "#000000",
@@ -7679,7 +7670,7 @@ const Ls = [
7679
7670
  accent: e,
7680
7671
  accentHover: `${e}e6`,
7681
7672
  error: "#ef4444"
7682
- }, P = {
7673
+ }, O = {
7683
7674
  wrapper: {
7684
7675
  position: "relative",
7685
7676
  display: "inline-block"
@@ -7734,7 +7725,7 @@ const Ls = [
7734
7725
  },
7735
7726
  chevron: {
7736
7727
  transition: "transform 0.2s ease",
7737
- transform: I ? "rotate(180deg)" : "rotate(0deg)",
7728
+ transform: R ? "rotate(180deg)" : "rotate(0deg)",
7738
7729
  color: A.textTertiary,
7739
7730
  flexShrink: 0
7740
7731
  },
@@ -7752,10 +7743,10 @@ const Ls = [
7752
7743
  padding: "6px 6px 16px 6px",
7753
7744
  zIndex: 1e3,
7754
7745
  fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",
7755
- opacity: I ? 1 : 0,
7756
- pointerEvents: I ? "auto" : "none",
7746
+ opacity: R ? 1 : 0,
7747
+ pointerEvents: R ? "auto" : "none",
7757
7748
  transition: "all 0.2s cubic-bezier(0.4, 0, 0.2, 1)",
7758
- transform: I ? "translateY(0) scale(1)" : "translateY(-8px) scale(0.95)",
7749
+ transform: R ? "translateY(0) scale(1)" : "translateY(-8px) scale(0.95)",
7759
7750
  overflow: "hidden"
7760
7751
  },
7761
7752
  dropdownSection: {
@@ -7872,7 +7863,7 @@ const Ls = [
7872
7863
  transition: "background-color 0.2s ease"
7873
7864
  }
7874
7865
  }, K = async () => {
7875
- D(null), R(!0);
7866
+ D(null), I(!0);
7876
7867
  try {
7877
7868
  const x = localStorage.getItem("userInfo");
7878
7869
  if (x) {
@@ -7882,7 +7873,7 @@ const Ls = [
7882
7873
  } catch (x) {
7883
7874
  console.error("Retry failed:", x), D("Invalid user data"), localStorage.removeItem("userInfo"), q(null);
7884
7875
  } finally {
7885
- R(!1);
7876
+ I(!1);
7886
7877
  }
7887
7878
  }, Q = (x, k) => {
7888
7879
  (x.key === "Enter" || x.key === " ") && (x.preventDefault(), k());
@@ -7895,7 +7886,7 @@ const Ls = [
7895
7886
  return /* @__PURE__ */ n.jsxs(
7896
7887
  "div",
7897
7888
  {
7898
- style: P.wrapper,
7889
+ style: O.wrapper,
7899
7890
  ref: B,
7900
7891
  className: i,
7901
7892
  role: "menu",
@@ -7910,7 +7901,7 @@ const Ls = [
7910
7901
  tabIndex: 0,
7911
7902
  role: "button",
7912
7903
  "aria-haspopup": "true",
7913
- "aria-expanded": I,
7904
+ "aria-expanded": R,
7914
7905
  "aria-label": "Toggle user menu",
7915
7906
  children: C?.avatarUrl ? /* @__PURE__ */ n.jsx(
7916
7907
  "img",
@@ -7956,13 +7947,13 @@ const Ls = [
7956
7947
  "div",
7957
7948
  {
7958
7949
  ref: F,
7959
- style: P.avatarButton,
7950
+ style: O.avatarButton,
7960
7951
  onClick: () => z((x) => !x),
7961
7952
  onKeyDown: (x) => Q(x, () => z((k) => !k)),
7962
7953
  tabIndex: 0,
7963
7954
  role: "button",
7964
7955
  "aria-haspopup": "true",
7965
- "aria-expanded": I,
7956
+ "aria-expanded": R,
7966
7957
  "aria-label": "Toggle user menu",
7967
7958
  onMouseOver: (x) => {
7968
7959
  x.currentTarget.style.backgroundColor = A.surfaceHover, x.currentTarget.style.boxShadow = "0 4px 12px rgba(0,0,0,0.15)";
@@ -7979,7 +7970,7 @@ const Ls = [
7979
7970
  {
7980
7971
  src: C.avatarUrl,
7981
7972
  alt: `${C.name}'s avatar`,
7982
- style: P.avatarImage,
7973
+ style: O.avatarImage,
7983
7974
  loading: "lazy",
7984
7975
  onError: (x) => {
7985
7976
  const k = x.target;
@@ -7991,33 +7982,33 @@ const Ls = [
7991
7982
  {
7992
7983
  src: "https://api.dicebear.com/9.x/glass/svg?seed=Kingston",
7993
7984
  alt: "Default user avatar",
7994
- style: P.avatarImage,
7985
+ style: O.avatarImage,
7995
7986
  loading: "lazy"
7996
7987
  }
7997
7988
  ),
7998
- !T && /* @__PURE__ */ n.jsxs("div", { style: P.userInfo, children: [
7999
- /* @__PURE__ */ n.jsx("div", { style: P.userName, title: C?.name, children: C?.name || "Guest" }),
8000
- C?.email && /* @__PURE__ */ n.jsx("div", { style: P.userEmail, title: C.email, children: C.email })
7989
+ !T && /* @__PURE__ */ n.jsxs("div", { style: O.userInfo, children: [
7990
+ /* @__PURE__ */ n.jsx("div", { style: O.userName, title: C?.name, children: C?.name || "Guest" }),
7991
+ C?.email && /* @__PURE__ */ n.jsx("div", { style: O.userEmail, title: C.email, children: C.email })
8001
7992
  ] }),
8002
7993
  /* @__PURE__ */ n.jsx(
8003
7994
  Qn,
8004
7995
  {
8005
7996
  size: T ? 14 : 16,
8006
- style: P.chevron,
7997
+ style: O.chevron,
8007
7998
  "aria-hidden": "true"
8008
7999
  }
8009
8000
  )
8010
8001
  ]
8011
8002
  }
8012
8003
  ),
8013
- I && /* @__PURE__ */ n.jsx("div", { style: P.dropdown, role: "menu", "aria-label": "User options", children: g ? /* @__PURE__ */ n.jsx("div", { style: P.loadingText, role: "status", "aria-live": "polite", children: "Loading user information..." }) : C ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
8014
- /* @__PURE__ */ n.jsxs("div", { style: P.userSection, children: [
8004
+ R && /* @__PURE__ */ n.jsx("div", { style: O.dropdown, role: "menu", "aria-label": "User options", children: g ? /* @__PURE__ */ n.jsx("div", { style: O.loadingText, role: "status", "aria-live": "polite", children: "Loading user information..." }) : C ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
8005
+ /* @__PURE__ */ n.jsxs("div", { style: O.userSection, children: [
8015
8006
  C?.avatarUrl ? /* @__PURE__ */ n.jsx(
8016
8007
  "img",
8017
8008
  {
8018
8009
  src: C.avatarUrl,
8019
8010
  alt: `${C.name}'s profile picture`,
8020
- style: P.dropdownAvatar,
8011
+ style: O.dropdownAvatar,
8021
8012
  loading: "lazy",
8022
8013
  onError: (x) => {
8023
8014
  const k = x.target;
@@ -8029,20 +8020,20 @@ const Ls = [
8029
8020
  {
8030
8021
  src: `https://api.dicebear.com/9.x/initials/svg?seed=${C.name}`,
8031
8022
  alt: `${C.name}'s default avatar`,
8032
- style: P.dropdownAvatar,
8023
+ style: O.dropdownAvatar,
8033
8024
  loading: "lazy"
8034
8025
  }
8035
8026
  ),
8036
- /* @__PURE__ */ n.jsxs("div", { style: P.dropdownUserInfo, children: [
8037
- /* @__PURE__ */ n.jsx("div", { style: P.dropdownUserName, title: C.name, children: C.name }),
8038
- /* @__PURE__ */ n.jsx("div", { style: P.dropdownUserEmail, title: C.email, children: C.email })
8027
+ /* @__PURE__ */ n.jsxs("div", { style: O.dropdownUserInfo, children: [
8028
+ /* @__PURE__ */ n.jsx("div", { style: O.dropdownUserName, title: C.name, children: C.name }),
8029
+ /* @__PURE__ */ n.jsx("div", { style: O.dropdownUserEmail, title: C.email, children: C.email })
8039
8030
  ] })
8040
8031
  ] }),
8041
- /* @__PURE__ */ n.jsxs("div", { style: P.dropdownSection, children: [
8032
+ /* @__PURE__ */ n.jsxs("div", { style: O.dropdownSection, children: [
8042
8033
  h && G() && /* @__PURE__ */ n.jsxs(
8043
8034
  "button",
8044
8035
  {
8045
- style: P.menuItem,
8036
+ style: O.menuItem,
8046
8037
  onClick: f,
8047
8038
  onMouseOver: (x) => {
8048
8039
  x.currentTarget.style.backgroundColor = A.surfaceHover;
@@ -8054,15 +8045,15 @@ const Ls = [
8054
8045
  role: "menuitem",
8055
8046
  tabIndex: 0,
8056
8047
  children: [
8057
- /* @__PURE__ */ n.jsx(be, { style: P.icon, "aria-hidden": "true" }),
8058
- /* @__PURE__ */ n.jsx("span", { style: P.menuItemText, children: b })
8048
+ /* @__PURE__ */ n.jsx(be, { style: O.icon, "aria-hidden": "true" }),
8049
+ /* @__PURE__ */ n.jsx("span", { style: O.menuItemText, children: b })
8059
8050
  ]
8060
8051
  }
8061
8052
  ),
8062
8053
  d && l && /* @__PURE__ */ n.jsxs(
8063
8054
  "button",
8064
8055
  {
8065
- style: P.menuItem,
8056
+ style: O.menuItem,
8066
8057
  onClick: S,
8067
8058
  onMouseOver: (x) => {
8068
8059
  x.currentTarget.style.backgroundColor = A.surfaceHover;
@@ -8074,18 +8065,18 @@ const Ls = [
8074
8065
  role: "menuitem",
8075
8066
  tabIndex: 0,
8076
8067
  children: [
8077
- /* @__PURE__ */ n.jsx(As, { style: P.icon, "aria-hidden": "true" }),
8078
- /* @__PURE__ */ n.jsx("span", { style: P.menuItemText, children: y })
8068
+ /* @__PURE__ */ n.jsx(As, { style: O.icon, "aria-hidden": "true" }),
8069
+ /* @__PURE__ */ n.jsx("span", { style: O.menuItemText, children: y })
8079
8070
  ]
8080
8071
  }
8081
8072
  ),
8082
- u && C.profileUrl && /* @__PURE__ */ n.jsxs(
8073
+ c && C.profileUrl && /* @__PURE__ */ n.jsxs(
8083
8074
  "a",
8084
8075
  {
8085
8076
  href: C.profileUrl,
8086
8077
  target: "_self",
8087
8078
  rel: "noopener noreferrer",
8088
- style: P.menuItem,
8079
+ style: O.menuItem,
8089
8080
  onMouseOver: (x) => {
8090
8081
  x.currentTarget.style.backgroundColor = A.surfaceHover;
8091
8082
  },
@@ -8095,16 +8086,16 @@ const Ls = [
8095
8086
  role: "menuitem",
8096
8087
  tabIndex: 0,
8097
8088
  children: [
8098
- /* @__PURE__ */ n.jsx(ce, { style: P.icon, "aria-hidden": "true" }),
8099
- /* @__PURE__ */ n.jsx("span", { style: P.menuItemText, children: w })
8089
+ /* @__PURE__ */ n.jsx(ce, { style: O.icon, "aria-hidden": "true" }),
8090
+ /* @__PURE__ */ n.jsx("span", { style: O.menuItemText, children: w })
8100
8091
  ]
8101
8092
  }
8102
8093
  )
8103
8094
  ] }),
8104
- /* @__PURE__ */ n.jsx("div", { style: P.dropdownSection, children: /* @__PURE__ */ n.jsxs(
8095
+ /* @__PURE__ */ n.jsx("div", { style: O.dropdownSection, children: /* @__PURE__ */ n.jsxs(
8105
8096
  "button",
8106
8097
  {
8107
- style: P.logoutButton,
8098
+ style: O.logoutButton,
8108
8099
  onClick: r,
8109
8100
  onMouseOver: (x) => {
8110
8101
  x.currentTarget.style.backgroundColor = A.surfaceHover;
@@ -8119,15 +8110,15 @@ const Ls = [
8119
8110
  /* @__PURE__ */ n.jsx(
8120
8111
  ct,
8121
8112
  {
8122
- style: { ...P.icon, color: A.error },
8113
+ style: { ...O.icon, color: A.error },
8123
8114
  "aria-hidden": "true"
8124
8115
  }
8125
8116
  ),
8126
- /* @__PURE__ */ n.jsx("span", { style: P.menuItemText, children: c })
8117
+ /* @__PURE__ */ n.jsx("span", { style: O.menuItemText, children: u })
8127
8118
  ]
8128
8119
  }
8129
8120
  ) })
8130
- ] }) : /* @__PURE__ */ n.jsxs("div", { style: P.errorState, role: "alert", children: [
8121
+ ] }) : /* @__PURE__ */ n.jsxs("div", { style: O.errorState, role: "alert", children: [
8131
8122
  /* @__PURE__ */ n.jsxs(
8132
8123
  "div",
8133
8124
  {
@@ -8141,7 +8132,7 @@ const Ls = [
8141
8132
  v && v !== "Not signed in" && /* @__PURE__ */ n.jsx(
8142
8133
  "button",
8143
8134
  {
8144
- style: P.retryButton,
8135
+ style: O.retryButton,
8145
8136
  onClick: K,
8146
8137
  onMouseOver: (x) => {
8147
8138
  x.currentTarget.style.backgroundColor = A.accentHover;
@@ -8162,12 +8153,12 @@ const Ls = [
8162
8153
  primaryColor: r = "#00C212",
8163
8154
  onVerify: s
8164
8155
  }) => {
8165
- const { appId: a, baseUrl: i, apiKey: o } = ge(), [l, h] = O({
8156
+ const { appId: a, baseUrl: i, apiKey: o } = ge(), [l, h] = P({
8166
8157
  email: t?.email || "",
8167
8158
  otp: "",
8168
8159
  appId: a
8169
- }), [d, u] = O(!1), [b, y] = O(!1), [w, c] = O(null), j = (g, R) => {
8170
- let v = parseInt(g.replace("#", ""), 16), D = (v >> 16) + R, B = (v >> 8 & 255) + R, F = (v & 255) + R;
8160
+ }), [d, c] = P(!1), [b, y] = P(!1), [w, u] = P(null), j = (g, I) => {
8161
+ let v = parseInt(g.replace("#", ""), 16), D = (v >> 16) + I, B = (v >> 8 & 255) + I, F = (v & 255) + I;
8171
8162
  return D = Math.min(255, Math.max(0, D)), B = Math.min(255, Math.max(0, B)), F = Math.min(255, Math.max(0, F)), `#${(F | B << 8 | D << 16).toString(16).padStart(6, "0")}`;
8172
8163
  }, m = e ? {
8173
8164
  surface: "#09090b",
@@ -8195,9 +8186,9 @@ const Ls = [
8195
8186
  te(() => {
8196
8187
  t?.email && h((g) => ({ ...g, email: t.email }));
8197
8188
  }, [t?.email]);
8198
- const $ = (g, R) => {
8199
- c({ type: g, message: R }), setTimeout(() => c(null), 3e3);
8200
- }, I = async () => {
8189
+ const $ = (g, I) => {
8190
+ u({ type: g, message: I }), setTimeout(() => u(null), 3e3);
8191
+ }, R = async () => {
8201
8192
  if (!l.email || !/\S+@\S+\.\S+/.test(l.email)) {
8202
8193
  $("error", "Please enter a valid email");
8203
8194
  return;
@@ -8209,7 +8200,7 @@ const Ls = [
8209
8200
  { email: l.email },
8210
8201
  { headers: { "x-api-key": o, "x-app-id": a } }
8211
8202
  );
8212
- g.data.success ? ($("success", g.data.message || "OTP sent!"), u(!0)) : $("error", g.data.message || "Failed to send OTP");
8203
+ g.data.success ? ($("success", g.data.message || "OTP sent!"), c(!0)) : $("error", g.data.message || "Failed to send OTP");
8213
8204
  } catch (g) {
8214
8205
  $("error", g.response?.data?.message || "Server error");
8215
8206
  } finally {
@@ -8222,14 +8213,14 @@ const Ls = [
8222
8213
  }
8223
8214
  try {
8224
8215
  y(!0);
8225
- const R = await M.post(`${i}/users/verify-email`, l);
8226
- if (R.data.success && t) {
8216
+ const I = await M.post(`${i}/users/verify-email`, l);
8217
+ if (I.data.success && t) {
8227
8218
  const v = { ...t, isVerified: !0 };
8228
- s?.(v), $("success", R.data.message || "Email verified!"), u(!1), h({ email: t.email, otp: "", appId: a });
8219
+ s?.(v), $("success", I.data.message || "Email verified!"), c(!1), h({ email: t.email, otp: "", appId: a });
8229
8220
  } else
8230
- $("error", R.data.message || "Verification failed");
8231
- } catch (R) {
8232
- $("error", R.response?.data?.message || "Server error");
8221
+ $("error", I.data.message || "Verification failed");
8222
+ } catch (I) {
8223
+ $("error", I.response?.data?.message || "Server error");
8233
8224
  } finally {
8234
8225
  y(!1);
8235
8226
  }
@@ -8317,7 +8308,7 @@ const Ls = [
8317
8308
  {
8318
8309
  type: "email",
8319
8310
  value: l.email,
8320
- onChange: (g) => h((R) => ({ ...R, email: g.target.value })),
8311
+ onChange: (g) => h((I) => ({ ...I, email: g.target.value })),
8321
8312
  placeholder: "Enter your email",
8322
8313
  style: C,
8323
8314
  required: !0
@@ -8347,7 +8338,7 @@ const Ls = [
8347
8338
  {
8348
8339
  type: "text",
8349
8340
  value: l.otp,
8350
- onChange: (g) => h((R) => ({ ...R, otp: g.target.value })),
8341
+ onChange: (g) => h((I) => ({ ...I, otp: g.target.value })),
8351
8342
  placeholder: "Enter OTP",
8352
8343
  style: C,
8353
8344
  required: !0
@@ -8362,7 +8353,7 @@ const Ls = [
8362
8353
  "button",
8363
8354
  {
8364
8355
  type: "button",
8365
- onClick: I,
8356
+ onClick: R,
8366
8357
  disabled: b,
8367
8358
  style: q(b),
8368
8359
  children: [