@wacht/jsx 1.0.0-beta.60 → 1.0.0-beta.61

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.
package/dist/index.es.js CHANGED
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
  import { jsx as a, Fragment as se, jsxs as d } from "react/jsx-runtime";
3
3
  import * as r from "react";
4
- import xe, { createContext as sa, useState as C, useRef as G, useEffect as X, useMemo as ot, useContext as oa, useCallback as I, useLayoutEffect as x0, useDebugValue as k0, createElement as N0, memo as A0, forwardRef as ce } from "react";
4
+ import xe, { createContext as sa, useState as C, useRef as j, useEffect as X, useMemo as ot, useContext as oa, useCallback as I, useLayoutEffect as x0, useDebugValue as k0, createElement as N0, memo as A0, forwardRef as ce } from "react";
5
5
  import or from "react-dom";
6
6
  export * from "@wacht/types";
7
7
  const qi = "__dev_session__", C0 = "__dev_session_updated_at", E0 = "__dev_session_updated_at";
@@ -93,7 +93,7 @@ function J6({
93
93
  adapter: n,
94
94
  uiOverrides: i
95
95
  }) {
96
- const [s, o] = C(!0), [m, l] = C(null), c = G(!1);
96
+ const [s, o] = C(!0), [m, l] = C(null), c = j(!1);
97
97
  X(() => {
98
98
  async function u() {
99
99
  if (!c.current)
@@ -1073,7 +1073,7 @@ const Sr = xe.use || // This extra generic is to avoid TypeScript mixing up the
1073
1073
  }), Mr = {
1074
1074
  dedupe: !0
1075
1075
  }, os = Promise.resolve(yt), b1 = () => aa, y1 = (e, t, n) => {
1076
- const { cache: i, compare: s, suspense: o, fallbackData: m, revalidateOnMount: l, revalidateIfStale: c, refreshInterval: p, refreshWhenHidden: u, refreshWhenOffline: f, keepPreviousData: h, strictServerPrefetchWarning: g } = n, [v, w, y, x] = qt.get(i), [b, N] = xn(e), E = G(!1), k = G(!1), A = G(b), _ = G(t), M = G(n), L = () => M.current, F = () => L().isVisible() && L().isOnline(), [R, z, O, S] = _a(i, b), Z = G({}).current, T = Le(m) ? Le(n.fallback) ? yt : n.fallback[b] : m, P = (fe, K) => {
1076
+ const { cache: i, compare: s, suspense: o, fallbackData: m, revalidateOnMount: l, revalidateIfStale: c, refreshInterval: p, refreshWhenHidden: u, refreshWhenOffline: f, keepPreviousData: h, strictServerPrefetchWarning: g } = n, [v, w, y, x] = qt.get(i), [b, N] = xn(e), E = j(!1), k = j(!1), A = j(b), _ = j(t), M = j(n), L = () => M.current, F = () => L().isVisible() && L().isOnline(), [R, z, O, S] = _a(i, b), Z = j({}).current, T = Le(m) ? Le(n.fallback) ? yt : n.fallback[b] : m, P = (fe, K) => {
1077
1077
  for (const Q in Z) {
1078
1078
  const ne = Q;
1079
1079
  if (ne === "data") {
@@ -1117,7 +1117,7 @@ const Sr = xe.use || // This extra generic is to avoid TypeScript mixing up the
1117
1117
  i,
1118
1118
  b
1119
1119
  ]
1120
- ), H[0], H[1]), q = v[b] && v[b].length > 0, j = V.data, U = Le(j) ? T && bo(T) ? Sr(T) : T : j, Y = V.error, ee = G(U), we = h ? Le(j) ? Le(ee.current) ? U : ee.current : j : U, _e = b && Le(U), de = G(null);
1120
+ ), H[0], H[1]), q = v[b] && v[b].length > 0, G = V.data, U = Le(G) ? T && bo(T) ? Sr(T) : T : G, Y = V.error, ee = j(U), we = h ? Le(G) ? Le(ee.current) ? U : ee.current : G : U, _e = b && Le(U), de = j(null);
1121
1121
  !tn && // getServerSnapshot is only called during hydration
1122
1122
  // eslint-disable-next-line react-hooks/rules-of-hooks
1123
1123
  Qr.useSyncExternalStore(b1, () => (de.current = !1, de), () => (de.current = !0, de));
@@ -1193,7 +1193,7 @@ const Sr = xe.use || // This extra generic is to avoid TypeScript mixing up the
1193
1193
  []
1194
1194
  );
1195
1195
  if (Gn(() => {
1196
- _.current = t, M.current = n, Le(j) || (ee.current = j);
1196
+ _.current = t, M.current = n, Le(G) || (ee.current = G);
1197
1197
  }), Gn(() => {
1198
1198
  if (!b) return;
1199
1199
  const fe = qe.bind(yt, Mr);
@@ -1506,7 +1506,7 @@ const la = () => {
1506
1506
  [s, t, i]
1507
1507
  ), f = I(
1508
1508
  async ($, H) => {
1509
- const V = Object.entries(H).reduce((j, [U, Y]) => (Y != null && (Array.isArray(Y) ? Y.forEach((ee) => j.append(U, ee)) : j.append(U, Y)), j), new FormData()), q = await D(
1509
+ const V = Object.entries(H).reduce((G, [U, Y]) => (Y != null && (Array.isArray(Y) ? Y.forEach((ee) => G.append(U, ee)) : G.append(U, Y)), G), new FormData()), q = await D(
1510
1510
  await i(`/organizations/${$.id}/update`, {
1511
1511
  method: "POST",
1512
1512
  body: V
@@ -1643,8 +1643,8 @@ const la = () => {
1643
1643
  ), L = I(
1644
1644
  async ($, H) => {
1645
1645
  const V = new FormData();
1646
- return V.append("name", H.name), H.permissions && H.permissions.forEach((j, U) => {
1647
- V.append(`permissions[${U}]`, j);
1646
+ return V.append("name", H.name), H.permissions && H.permissions.forEach((G, U) => {
1647
+ V.append(`permissions[${U}]`, G);
1648
1648
  }), await D(
1649
1649
  await i(`/organizations/${$.id}/roles`, {
1650
1650
  method: "POST",
@@ -1692,9 +1692,9 @@ const la = () => {
1692
1692
  [i]
1693
1693
  ), S = I(
1694
1694
  async ($, H) => {
1695
- var j, U;
1695
+ var G, U;
1696
1696
  const V = new FormData();
1697
- return V.append("email", H.email), V.append("role_id", H.organizationRole.id), (j = H.workspace) != null && j.id && V.append("workspace_id", H.workspace.id), (U = H.workspaceRole) != null && U.id && V.append("workspace_role_id", H.workspaceRole.id), (await D(
1697
+ return V.append("email", H.email), V.append("role_id", H.organizationRole.id), (G = H.workspace) != null && G.id && V.append("workspace_id", H.workspace.id), (U = H.workspaceRole) != null && U.id && V.append("workspace_role_id", H.workspaceRole.id), (await D(
1698
1698
  await i(`/organizations/${$.id}/invitations`, {
1699
1699
  method: "POST",
1700
1700
  body: V
@@ -1804,7 +1804,7 @@ const la = () => {
1804
1804
  ), H = I(async () => P ? await i(P) : [], [P, i]), V = I(async () => P ? await s(P) : [], [P, s]), q = I(
1805
1805
  async (W) => P ? await m(P, W) : [],
1806
1806
  [P, m]
1807
- ), j = I(
1807
+ ), G = I(
1808
1808
  async (W) => P ? await b(P, W) : void 0,
1809
1809
  [P, b]
1810
1810
  ), U = I(async () => P ? await c(P) : [], [P, c]), Y = I(
@@ -1934,7 +1934,7 @@ const la = () => {
1934
1934
  getInvitations: dt,
1935
1935
  removeMember: q,
1936
1936
  leave: J,
1937
- removeRole: j,
1937
+ removeRole: G,
1938
1938
  addMemberRole: _e,
1939
1939
  removeMemberRole: de,
1940
1940
  inviteMember: oe,
@@ -2312,7 +2312,7 @@ const Ci = () => {
2312
2312
  );
2313
2313
  },
2314
2314
  [$, y]
2315
- ), j = I(
2315
+ ), G = I(
2316
2316
  async (ee) => {
2317
2317
  if ($)
2318
2318
  return await x(
@@ -2361,7 +2361,7 @@ const Ci = () => {
2361
2361
  removeMemberRole: P,
2362
2362
  getInvitations: H,
2363
2363
  discardInvitation: q,
2364
- resendInvitation: j
2364
+ resendInvitation: G
2365
2365
  };
2366
2366
  };
2367
2367
  function Lr(e) {
@@ -2386,8 +2386,8 @@ function Ba() {
2386
2386
  mutate: o
2387
2387
  } = $e(t ? null : "/user", () => R1(e)), m = async ($) => {
2388
2388
  const H = new FormData();
2389
- for (const [q, j] of Object.entries($))
2390
- j != null && j !== "" && H.append(q, String(j));
2389
+ for (const [q, G] of Object.entries($))
2390
+ G != null && G !== "" && H.append(q, String(G));
2391
2391
  const V = await D(
2392
2392
  await e("/me", {
2393
2393
  method: "POST",
@@ -2467,8 +2467,8 @@ function Ba() {
2467
2467
  })
2468
2468
  )).data, E = async ($, H) => {
2469
2469
  const V = new FormData();
2470
- return V.append("authenticator_id", $), H.forEach((j) => {
2471
- V.append("codes", j);
2470
+ return V.append("authenticator_id", $), H.forEach((G) => {
2471
+ V.append("codes", G);
2472
2472
  }), await D(
2473
2473
  await e("/me/authenticator/attempt-verification", {
2474
2474
  method: "POST",
@@ -2529,7 +2529,7 @@ function Ba() {
2529
2529
  provider: $,
2530
2530
  redirectUri: H
2531
2531
  }) => {
2532
- var j;
2532
+ var G;
2533
2533
  const V = new URLSearchParams({ provider: $ });
2534
2534
  H && V.append("redirect_uri", H);
2535
2535
  const q = await D(
@@ -2537,7 +2537,7 @@ function Ba() {
2537
2537
  method: "POST"
2538
2538
  })
2539
2539
  );
2540
- return "data" in q && ((j = q.data) != null && j.oauth_url) && window.open(q.data.oauth_url, "_blank"), q;
2540
+ return "data" in q && ((G = q.data) != null && G.oauth_url) && window.open(q.data.oauth_url, "_blank"), q;
2541
2541
  }, S = async () => await D(
2542
2542
  await e("/me/passkeys", { method: "GET" })
2543
2543
  ), Z = async ($) => {
@@ -2564,15 +2564,15 @@ function Ba() {
2564
2564
  id: Rr(de.id),
2565
2565
  transports: de.transports
2566
2566
  }))
2567
- }, j = await navigator.credentials.create({
2567
+ }, G = await navigator.credentials.create({
2568
2568
  publicKey: q
2569
2569
  });
2570
- if (!j)
2570
+ if (!G)
2571
2571
  throw new Error("Failed to create credential");
2572
- const U = j.response, Y = {
2573
- id: j.id,
2574
- rawId: Lr(j.rawId),
2575
- type: j.type,
2572
+ const U = G.response, Y = {
2573
+ id: G.id,
2574
+ rawId: Lr(G.rawId),
2575
+ type: G.type,
2576
2576
  response: {
2577
2577
  clientDataJSON: Lr(U.clientDataJSON),
2578
2578
  attestationObject: Lr(U.attestationObject),
@@ -2881,7 +2881,7 @@ const li = (e) => {
2881
2881
  t
2882
2882
  ];
2883
2883
  }, j1 = (e) => B1(e ? e(0, null) : null)[0], $r = Promise.resolve(), G1 = (e) => (t, n, i) => {
2884
- const s = G(!1), { cache: o, initialSize: m = 1, revalidateAll: l = !1, persistSize: c = !1, revalidateFirstPage: p = !0, revalidateOnMount: u = !1, parallel: f = !1 } = i, [, , , h] = qt.get(Ai);
2884
+ const s = j(!1), { cache: o, initialSize: m = 1, revalidateAll: l = !1, persistSize: c = !1, revalidateFirstPage: p = !0, revalidateOnMount: u = !1, parallel: f = !1 } = i, [, , , h] = qt.get(Ai);
2885
2885
  let g;
2886
2886
  try {
2887
2887
  g = j1(t), g && (g = _o + g);
@@ -2909,7 +2909,7 @@ const li = (e) => {
2909
2909
  }, [
2910
2910
  g,
2911
2911
  m
2912
- ]), N = G(b());
2912
+ ]), N = j(b());
2913
2913
  Gn(() => {
2914
2914
  if (!s.current) {
2915
2915
  s.current = !0;
@@ -2934,25 +2934,25 @@ const li = (e) => {
2934
2934
  if (!$)
2935
2935
  break;
2936
2936
  const [V, q] = _a(o, $);
2937
- let j = V().data;
2938
- const U = l || L || Le(j) || p && !P && !Le(S) || E || S && !Le(S[P]) && !i.compare(S[P], j);
2939
- if (n && (typeof F == "function" ? F(j, H) : U)) {
2937
+ let G = V().data;
2938
+ const U = l || L || Le(G) || p && !P && !Le(S) || E || S && !Le(S[P]) && !i.compare(S[P], G);
2939
+ if (n && (typeof F == "function" ? F(G, H) : U)) {
2940
2940
  const Y = async () => {
2941
2941
  if (!($ in h))
2942
- j = await n(H);
2942
+ G = await n(H);
2943
2943
  else {
2944
2944
  const we = h[$];
2945
- delete h[$], j = await we;
2945
+ delete h[$], G = await we;
2946
2946
  }
2947
2947
  q({
2948
- data: j,
2948
+ data: G,
2949
2949
  _k: H
2950
- }), R[P] = j;
2950
+ }), R[P] = G;
2951
2951
  };
2952
2952
  f ? Z.push(Y) : await Y();
2953
2953
  } else
2954
- R[P] = j;
2955
- f || (T = j);
2954
+ R[P] = G;
2955
+ f || (T = G);
2956
2956
  }
2957
2957
  return f && await Promise.all(Z.map((P) => P())), w({
2958
2958
  _i: yt
@@ -3036,7 +3036,7 @@ function q1({
3036
3036
  reconnectDelay: m = 1e3,
3037
3037
  maxReconnectAttempts: l = 5
3038
3038
  } = {}) {
3039
- const { session: c, loading: p } = gt(), { deployment: u, loading: f } = Oe(), [h, g] = C(!1), [v, w] = C(null), y = G(null), x = G(null), b = G(0), N = G(null), E = G(s), k = G(o), A = G(t), _ = G(n), M = G(i), L = G(m), F = G(l);
3039
+ const { session: c, loading: p } = gt(), { deployment: u, loading: f } = Oe(), [h, g] = C(!1), [v, w] = C(null), y = j(null), x = j(null), b = j(0), N = j(null), E = j(s), k = j(o), A = j(t), _ = j(n), M = j(i), L = j(m), F = j(l);
3040
3040
  E.current = s, k.current = o, A.current = t, _.current = n, M.current = i, L.current = m, F.current = l;
3041
3041
  const R = I(() => {
3042
3042
  x.current && (clearTimeout(x.current), x.current = null), N.current && (clearInterval(N.current), N.current = null), y.current && (y.current.close(), y.current = null);
@@ -3058,14 +3058,14 @@ function q1({
3058
3058
  H.readyState === WebSocket.OPEN && H.send("ping");
3059
3059
  }, 3e4);
3060
3060
  }, H.onmessage = (V) => {
3061
- var q, j;
3061
+ var q, G;
3062
3062
  try {
3063
3063
  const U = JSON.parse(V.data);
3064
3064
  if (U.type === "notification" && U.data)
3065
3065
  (q = E.current) == null || q.call(E, U.data);
3066
3066
  else if (U.type === "error") {
3067
3067
  const Y = U.error || "Unknown error occurred";
3068
- w(Y), (j = k.current) == null || j.call(k, Y);
3068
+ w(Y), (G = k.current) == null || G.call(k, Y);
3069
3069
  } else U.type;
3070
3070
  } catch {
3071
3071
  }
@@ -3076,10 +3076,10 @@ function q1({
3076
3076
  var q;
3077
3077
  if (g(!1), N.current && (clearInterval(N.current), N.current = null), e && V.code !== 1e3 && b.current < F.current) {
3078
3078
  b.current++;
3079
- const j = L.current * Math.pow(2, b.current - 1);
3079
+ const G = L.current * Math.pow(2, b.current - 1);
3080
3080
  x.current = setTimeout(() => {
3081
3081
  z();
3082
- }, j);
3082
+ }, G);
3083
3083
  } else b.current >= F.current && (w("Max reconnection attempts reached"), (q = k.current) == null || q.call(k, "Max reconnection attempts reached"));
3084
3084
  };
3085
3085
  } catch {
@@ -3512,7 +3512,7 @@ function X6({
3512
3512
  t
3513
3513
  ), [v, w] = C(
3514
3514
  Ge.IDLE
3515
- ), [y, x] = C({ status: qa.DISCONNECTED }), [b, N] = C(!0), [E, k] = C(!1), [A, _] = C(!1), [M, L] = C(null), F = G(null), R = G(e), z = G(0), O = G(Ge.IDLE), S = G(null), Z = I((te) => {
3515
+ ), [y, x] = C({ status: qa.DISCONNECTED }), [b, N] = C(!0), [E, k] = C(!1), [A, _] = C(!1), [M, L] = C(null), F = j(null), R = j(e), z = j(0), O = j(Ge.IDLE), S = j(null), Z = I((te) => {
3516
3516
  l((he) => {
3517
3517
  const ve = [...he], je = ve.findIndex(
3518
3518
  (Ve) => String(Ve.id) === String(te.id)
@@ -3549,7 +3549,7 @@ function X6({
3549
3549
  [P]
3550
3550
  ), q = I(() => {
3551
3551
  p(null), f(null);
3552
- }, []), j = I((te) => {
3552
+ }, []), G = I((te) => {
3553
3553
  g((he) => he && {
3554
3554
  ...he,
3555
3555
  ...te ? { status: te } : {},
@@ -3607,13 +3607,13 @@ function X6({
3607
3607
  (ve = i == null ? void 0 : i.onPlatformEvent) == null || ve.call(i, te, he);
3608
3608
  },
3609
3609
  [i]
3610
- ), we = G(Y), _e = G(ee), de = G(o), oe = G(s);
3610
+ ), we = j(Y), _e = j(ee), de = j(o), oe = j(s);
3611
3611
  X(() => {
3612
3612
  we.current = Y, _e.current = ee, de.current = o, oe.current = s;
3613
3613
  }), X(() => {
3614
3614
  R.current = e;
3615
3615
  }, [e]);
3616
- const ue = G(null), Ie = G(null), J = G(0), dt = 10, qe = I(
3616
+ const ue = j(null), Ie = j(null), J = j(0), dt = 10, qe = I(
3617
3617
  async (te) => {
3618
3618
  if (!e) return;
3619
3619
  const he = e;
@@ -3764,7 +3764,7 @@ function X6({
3764
3764
  });
3765
3765
  if (Ve.ok) {
3766
3766
  const et = await D(Ve), _t = ((ve = et.data) == null ? void 0 : ve.conversation_id) ?? null;
3767
- j(
3767
+ G(
3768
3768
  typeof ((je = et.data) == null ? void 0 : je.status) == "string" ? et.data.status : void 0
3769
3769
  ), _t ? U(_t, te) : q(), $(Ge.RUNNING);
3770
3770
  } else
@@ -3780,7 +3780,7 @@ function X6({
3780
3780
  o,
3781
3781
  $,
3782
3782
  P,
3783
- j,
3783
+ G,
3784
3784
  q,
3785
3785
  U
3786
3786
  ]
@@ -3812,7 +3812,7 @@ function X6({
3812
3812
  te,
3813
3813
  he
3814
3814
  )
3815
- })).ok ? (j(), $(Ge.RUNNING), !0) : (z.current = 0, P(Ge.IDLE), !1);
3815
+ })).ok ? (G(), $(Ge.RUNNING), !0) : (z.current = 0, P(Ge.IDLE), !1);
3816
3816
  } catch {
3817
3817
  return z.current = 0, P(Ge.IDLE), !1;
3818
3818
  }
@@ -3822,7 +3822,7 @@ function X6({
3822
3822
  o,
3823
3823
  $,
3824
3824
  P,
3825
- j
3825
+ G
3826
3826
  ]
3827
3827
  ), pe = I(
3828
3828
  async (te) => {
@@ -3836,7 +3836,7 @@ function X6({
3836
3836
  headers: { "Content-Type": "application/json" },
3837
3837
  body: JSON.stringify(te)
3838
3838
  }
3839
- )).ok ? (j(), $(Ge.RUNNING), !0) : (z.current = 0, P(Ge.IDLE), !1);
3839
+ )).ok ? (G(), $(Ge.RUNNING), !0) : (z.current = 0, P(Ge.IDLE), !1);
3840
3840
  } catch {
3841
3841
  return z.current = 0, P(Ge.IDLE), !1;
3842
3842
  }
@@ -3846,7 +3846,7 @@ function X6({
3846
3846
  o,
3847
3847
  $,
3848
3848
  P,
3849
- j
3849
+ G
3850
3850
  ]
3851
3851
  ), Ze = I(async () => {
3852
3852
  if (!(!e || !Ka(v)))
@@ -3854,7 +3854,7 @@ function X6({
3854
3854
  await o(`/ai/threads/${e}/run`, {
3855
3855
  method: "POST",
3856
3856
  body: fd()
3857
- }), z.current = 0, j(), P(Ge.IDLE);
3857
+ }), z.current = 0, G(), P(Ge.IDLE);
3858
3858
  } catch {
3859
3859
  }
3860
3860
  }, [
@@ -3862,7 +3862,7 @@ function X6({
3862
3862
  v,
3863
3863
  o,
3864
3864
  P,
3865
- j
3865
+ G
3866
3866
  ]), W = I(
3867
3867
  (te) => !s || !e || !te ? null : wd({ deployment: s, threadId: e, file: te }),
3868
3868
  [e, s]
@@ -3907,7 +3907,7 @@ function X6({
3907
3907
  };
3908
3908
  }
3909
3909
  function ep(e) {
3910
- const { client: t } = Me(), [n, i] = C(!e), [s, o] = C(!!e), [m, l] = C(null), c = G(!1), p = G(!1), u = G(null), f = n, h = I(async () => {
3910
+ const { client: t } = Me(), [n, i] = C(!e), [s, o] = C(!!e), [m, l] = C(null), c = j(!1), p = j(!1), u = j(null), f = n, h = I(async () => {
3911
3911
  const E = await t("/ai/session", {
3912
3912
  method: "GET"
3913
3913
  });
@@ -4967,7 +4967,7 @@ async function Vd(e, { taskId: t }) {
4967
4967
  );
4968
4968
  }
4969
4969
  function fp(e) {
4970
- const { client: t } = Me(), [n, i] = C(!e), [s, o] = C(!!e), [m, l] = C(null), c = G(!1), p = G(!1), u = G(null), f = n, h = I(async () => Sd(t), [t]), { data: g, error: v, isLoading: w, mutate: y } = $e(
4970
+ const { client: t } = Me(), [n, i] = C(!e), [s, o] = C(!!e), [m, l] = C(null), c = j(!1), p = j(!1), u = j(null), f = n, h = I(async () => Sd(t), [t]), { data: g, error: v, isLoading: w, mutate: y } = $e(
4971
4971
  f ? "wacht-webhook-app-session" : null,
4972
4972
  h,
4973
4973
  {
@@ -5207,7 +5207,7 @@ function xp(e = {}) {
5207
5207
  };
5208
5208
  }
5209
5209
  function kp(e) {
5210
- const { client: t } = Me(), [n, i] = C(!e), [s, o] = C(!!e), [m, l] = C(null), c = G(!1), p = G(!1), u = G(null), f = n, h = I(async () => {
5210
+ const { client: t } = Me(), [n, i] = C(!e), [s, o] = C(!!e), [m, l] = C(null), c = j(!1), p = j(!1), u = j(null), f = n, h = I(async () => {
5211
5211
  const E = await t("/api-auth/session", {
5212
5212
  method: "GET"
5213
5213
  });
@@ -8182,33 +8182,33 @@ function wu(e, t, n) {
8182
8182
  let S, Z;
8183
8183
  {
8184
8184
  const H = xe.useRef(null), V = H.current;
8185
- if (V !== null && V[1] === O && V[2] === R.styleSheet && V[3] === R.stylis && V[7] === k && (function(q, j, U) {
8186
- const Y = q, ee = j;
8185
+ if (V !== null && V[1] === O && V[2] === R.styleSheet && V[3] === R.stylis && V[7] === k && (function(q, G, U) {
8186
+ const Y = q, ee = G;
8187
8187
  let we = 0;
8188
8188
  for (const _e in ee) if (Es.call(ee, _e) && (we++, Y[_e] !== ee[_e])) return !1;
8189
8189
  return we === U;
8190
8190
  })(V[0], b, V[4])) S = V[5], Z = V[6];
8191
8191
  else {
8192
- S = (function(j, U, Y) {
8193
- const ee = Object.assign(Object.assign({}, U), { className: void 0, theme: Y }), we = j.length > 1;
8194
- for (let _e = 0; _e < j.length; _e++) {
8195
- const de = j[_e], oe = Mn(de) ? de(we ? Object.assign({}, ee) : ee) : de;
8192
+ S = (function(G, U, Y) {
8193
+ const ee = Object.assign(Object.assign({}, U), { className: void 0, theme: Y }), we = G.length > 1;
8194
+ for (let _e = 0; _e < G.length; _e++) {
8195
+ const de = G[_e], oe = Mn(de) ? de(we ? Object.assign({}, ee) : ee) : de;
8196
8196
  for (const ue in oe) ue === "className" ? ee.className = gn(ee.className, oe[ue]) : ue === "style" ? ee.style = Object.assign(Object.assign({}, ee.style), oe[ue]) : ue in U && U[ue] === void 0 || (ee[ue] = oe[ue]);
8197
8197
  }
8198
8198
  return "className" in U && typeof U.className == "string" && (ee.className = gn(ee.className, U.className)), ee;
8199
- })(E, b, O), Z = (function(j, U, Y, ee) {
8200
- const we = j.generateAndInjectStyles(U, Y, ee);
8199
+ })(E, b, O), Z = (function(G, U, Y, ee) {
8200
+ const we = G.generateAndInjectStyles(U, Y, ee);
8201
8201
  return process.env.NODE_ENV !== "production" && xe.useDebugValue && xe.useDebugValue(we), we;
8202
8202
  })(k, S, R.styleSheet, R.stylis);
8203
8203
  let q = 0;
8204
- for (const j in b) Es.call(b, j) && q++;
8204
+ for (const G in b) Es.call(b, G) && q++;
8205
8205
  H.current = [b, O, R.styleSheet, R.stylis, q, S, Z, k];
8206
8206
  }
8207
8207
  }
8208
8208
  process.env.NODE_ENV !== "production" && x.warnTooManyClasses && x.warnTooManyClasses(Z);
8209
- const T = S.as || L, P = (function(H, V, q, j) {
8209
+ const T = S.as || L, P = (function(H, V, q, G) {
8210
8210
  const U = {};
8211
- for (const Y in H) H[Y] === void 0 || Y[0] === "$" || Y === "as" || Y === "theme" && H.theme === q || (Y === "forwardedAs" ? U.as = H.forwardedAs : j && !j(Y, V) || (U[Y] = H[Y], j || process.env.NODE_ENV !== "development" || c8(Y) || (Dr || (Dr = /* @__PURE__ */ new Set())).has(Y) || !Xn(V) || V.includes("-") || (Dr.add(Y), console.warn(`styled-components: it looks like an unknown prop "${Y}" is being sent through to the DOM, which will likely trigger a React console error. If you would like automatic filtering of unknown props, you can opt-into that behavior via \`<StyleSheetManager shouldForwardProp={...}>\` (connect an API like \`@emotion/is-prop-valid\`) or consider using transient props (\`$\` prefix for automatic filtering.)`))));
8211
+ for (const Y in H) H[Y] === void 0 || Y[0] === "$" || Y === "as" || Y === "theme" && H.theme === q || (Y === "forwardedAs" ? U.as = H.forwardedAs : G && !G(Y, V) || (U[Y] = H[Y], G || process.env.NODE_ENV !== "development" || c8(Y) || (Dr || (Dr = /* @__PURE__ */ new Set())).has(Y) || !Xn(V) || V.includes("-") || (Dr.add(Y), console.warn(`styled-components: it looks like an unknown prop "${Y}" is being sent through to the DOM, which will likely trigger a React console error. If you would like automatic filtering of unknown props, you can opt-into that behavior via \`<StyleSheetManager shouldForwardProp={...}>\` (connect an API like \`@emotion/is-prop-valid\`) or consider using transient props (\`$\` prefix for automatic filtering.)`))));
8212
8212
  return U;
8213
8213
  })(S, T, O, z);
8214
8214
  let $ = gn(_, M);
@@ -8398,7 +8398,7 @@ function Ga({
8398
8398
  error: i,
8399
8399
  isSubmitting: s = !1
8400
8400
  }) {
8401
- const [o, m] = C(new Array(e).fill("")), [l, c] = C(60), [p, u] = C(!1), f = G([]), h = I(() => {
8401
+ const [o, m] = C(new Array(e).fill("")), [l, c] = C(60), [p, u] = C(!1), f = j([]), h = I(() => {
8402
8402
  const x = setInterval(() => {
8403
8403
  c((b) => b <= 1 ? (u(!0), clearInterval(x), 0) : b - 1);
8404
8404
  }, 1e3);
@@ -9019,7 +9019,7 @@ const er = [
9019
9019
  }) => {
9020
9020
  const [o, m] = C(!1), [l, c] = C(
9021
9021
  er.find((v) => v.code === i) || er[0]
9022
- ), p = G(null), [u, f] = C(""), h = G(null);
9022
+ ), p = j(null), [u, f] = C(""), h = j(null);
9023
9023
  X(() => {
9024
9024
  function v(w) {
9025
9025
  p.current && !p.current.contains(w.target) && m(!1);
@@ -9226,25 +9226,33 @@ function Tu() {
9226
9226
  });
9227
9227
  }
9228
9228
  function bc({ apiHost: e, onSolve: t, onError: n }) {
9229
- const i = G(null), [s, o] = C(null), m = I(async () => {
9230
- if (e)
9229
+ const i = j(null), [s, o] = C(null), m = j(t), l = j(n), c = j(!1);
9230
+ return m.current = t, l.current = n, X(() => {
9231
+ if (c.current) return;
9232
+ c.current = !0;
9233
+ const p = Hu(e);
9234
+ if (!p) return;
9235
+ let u = !1;
9236
+ return (async () => {
9237
+ var f;
9231
9238
  try {
9232
- if (await Tu(), !window.Cap) throw new Error("Challenge script did not expose Cap");
9233
- const l = Hu(e);
9234
- if (!l) return;
9235
- const c = new window.Cap({ apiEndpoint: `${l}/captcha/` });
9236
- i.current = c;
9237
- const p = await c.solve();
9238
- t(p.token);
9239
- } catch (l) {
9240
- const c = l instanceof Error ? l.message : "Challenge failed";
9241
- o(c), n == null || n("challenge_failed");
9242
- }
9243
- }, [e, t, n]);
9244
- return X(() => (m(), () => {
9245
- var l;
9246
- (l = i.current) == null || l.reset(), i.current = null;
9247
- }), [m]), s ? /* @__PURE__ */ a("div", { style: { fontSize: 12, color: "var(--wa-error)", marginBottom: 12 }, children: s }) : null;
9239
+ if (await Tu(), u || !window.Cap) return;
9240
+ window.CAP_SILENT = !0, window.CAP_DISABLE_WIDGET_REF = !0;
9241
+ const h = new window.Cap({ apiEndpoint: `${p}/captcha/` });
9242
+ i.current = h;
9243
+ const g = await h.solve();
9244
+ if (u) return;
9245
+ m.current(g.token);
9246
+ } catch (h) {
9247
+ if (u) return;
9248
+ const g = h instanceof Error ? h.message : "Challenge failed";
9249
+ o(g), (f = l.current) == null || f.call(l, "challenge_failed");
9250
+ }
9251
+ })(), () => {
9252
+ var f;
9253
+ u = !0, (f = i.current) == null || f.reset(), i.current = null;
9254
+ };
9255
+ }, [e]), s ? /* @__PURE__ */ a("div", { style: { fontSize: 12, color: "var(--wa-error)", marginBottom: 12 }, children: s }) : null;
9248
9256
  }
9249
9257
  function Lp() {
9250
9258
  var _e, de, oe, ue, Ie, J, dt, qe, Qe, Fe, fe, K, Q, ne, pe, Ze;
@@ -9350,7 +9358,7 @@ function Lp() {
9350
9358
  w(!1);
9351
9359
  }
9352
9360
  }
9353
- }, j = (o == null ? void 0 : o.social_connections.filter((W) => W.enabled)) || [], U = o == null ? void 0 : o.auth_settings, Y = !!((Ie = U == null ? void 0 : U.first_name) != null && Ie.enabled && ((J = U == null ? void 0 : U.last_name) != null && J.enabled)), ee = async (W) => {
9361
+ }, G = (o == null ? void 0 : o.social_connections.filter((W) => W.enabled)) || [], U = o == null ? void 0 : o.auth_settings, Y = !!((Ie = U == null ? void 0 : U.first_name) != null && Ie.enabled && ((J = U == null ? void 0 : U.last_name) != null && J.enabled)), ee = async (W) => {
9354
9362
  var ke;
9355
9363
  if (W.preventDefault(), e || v) return;
9356
9364
  w(!0);
@@ -9539,11 +9547,11 @@ function Lp() {
9539
9547
  sub: b != null && b.valid ? "You've been invited — complete your registration below." : "Get started in a few seconds."
9540
9548
  }
9541
9549
  ),
9542
- j.length > 0 && /* @__PURE__ */ d(se, { children: [
9550
+ G.length > 0 && /* @__PURE__ */ d(se, { children: [
9543
9551
  /* @__PURE__ */ a(
9544
9552
  Zi,
9545
9553
  {
9546
- connections: j,
9554
+ connections: G,
9547
9555
  callback: q
9548
9556
  }
9549
9557
  ),
@@ -9786,7 +9794,7 @@ function Fu({ children: e }) {
9786
9794
  var x;
9787
9795
  const { deployment: t } = Oe(), [n, i] = C(
9788
9796
  (t == null ? void 0 : t.auth_settings.first_factor) || "email_password"
9789
- ), s = G(
9797
+ ), s = j(
9790
9798
  !!(t != null && t.auth_settings.first_factor)
9791
9799
  ), [o, m] = C(""), [l, c] = C(!1), [p, u] = C(!1), [f, h] = C(!1), [g, v] = C("identifier"), w = (t == null ? void 0 : t.social_connections.filter((b) => b.enabled)) || [], y = t == null ? void 0 : t.auth_settings;
9792
9800
  return X(() => {
@@ -10616,7 +10624,7 @@ function qu({
10616
10624
  completeVerification: i,
10617
10625
  prepareVerification: s
10618
10626
  }) {
10619
- var H, V, q, j, U, Y, ee, we, _e;
10627
+ var H, V, q, G, U, Y, ee, we, _e;
10620
10628
  const { deployment: o } = Oe(), { navigate: m } = Ot(), [l, c] = C({}), [p, u] = C({}), [f, h] = C("US"), [g, v] = C(!1), [w, y] = C(!1), [x, b] = C(null), [N, E] = C(!1), k = x, A = w, _ = () => {
10621
10629
  var oe;
10622
10630
  E(!0);
@@ -10792,7 +10800,7 @@ function qu({
10792
10800
  gap: 16
10793
10801
  },
10794
10802
  children: [
10795
- (F.includes("first_name") || F.includes("last_name")) && (((q = R == null ? void 0 : R.first_name) == null ? void 0 : q.enabled) || ((j = R == null ? void 0 : R.last_name) == null ? void 0 : j.enabled)) && /* @__PURE__ */ d("div", { className: $ ? "w-grid-2" : "", children: [
10803
+ (F.includes("first_name") || F.includes("last_name")) && (((q = R == null ? void 0 : R.first_name) == null ? void 0 : q.enabled) || ((G = R == null ? void 0 : R.last_name) == null ? void 0 : G.enabled)) && /* @__PURE__ */ d("div", { className: $ ? "w-grid-2" : "", children: [
10796
10804
  F.includes("first_name") && ((U = R == null ? void 0 : R.first_name) == null ? void 0 : U.enabled) && /* @__PURE__ */ d("div", { className: "w-field", children: [
10797
10805
  /* @__PURE__ */ d(
10798
10806
  "label",
@@ -11032,7 +11040,7 @@ function Ku() {
11032
11040
  username: "",
11033
11041
  password: "",
11034
11042
  phone: ""
11035
- }), [O, S] = C({}), [Z, T] = C(!1), [P, $] = C(""), [H, V] = C("US"), [q, j] = C(!1), [U, Y] = C(null), [ee, we] = C(!1), [_e, de] = C(!1), [oe, ue] = C(!1), [Ie, J] = C(60), [dt, qe] = C(!1), [Qe, Fe] = C(
11043
+ }), [O, S] = C({}), [Z, T] = C(!1), [P, $] = C(""), [H, V] = C("US"), [q, G] = C(!1), [U, Y] = C(null), [ee, we] = C(!1), [_e, de] = C(!1), [oe, ue] = C(!1), [Ie, J] = C(60), [dt, qe] = C(!1), [Qe, Fe] = C(
11036
11044
  null
11037
11045
  ), [fe, K] = C(""), Q = !!fe, ne = [...(n == null ? void 0 : n.signins) || []].sort(
11038
11046
  (re, ie) => {
@@ -11063,7 +11071,7 @@ function Ku() {
11063
11071
  );
11064
11072
  Pe || (Pe = ((re = e == null ? void 0 : e.ui_settings) == null ? void 0 : re.after_signin_redirect_url) || null), !Pe && (e != null && e.frontend_host) && (Pe = `https://${e.frontend_host}`);
11065
11073
  const vt = (ie = e == null ? void 0 : e.auth_settings) == null ? void 0 : ie.passkey;
11066
- (vt == null ? void 0 : vt.enabled) && (vt == null ? void 0 : vt.prompt_registration_on_auth) && !((De = (ge = n.active_signin) == null ? void 0 : ge.user) != null && De.has_passkeys) ? (Fe(Pe), we(!0)) : Pe && (j(!0), t(Pe));
11074
+ (vt == null ? void 0 : vt.enabled) && (vt == null ? void 0 : vt.prompt_registration_on_auth) && !((De = (ge = n.active_signin) == null ? void 0 : ge.user) != null && De.has_passkeys) ? (Fe(Pe), we(!0)) : Pe && (G(!0), t(Pe));
11067
11075
  }
11068
11076
  }, [
11069
11077
  n,
@@ -11107,7 +11115,7 @@ function Ku() {
11107
11115
  fe
11108
11116
  );
11109
11117
  if (Pe && Pe.sso_url) {
11110
- j(!0), window.location.href = Pe.sso_url;
11118
+ G(!0), window.location.href = Pe.sso_url;
11111
11119
  return;
11112
11120
  }
11113
11121
  } else if (ie.strategy === "social" && ie.provider) {
@@ -11126,7 +11134,7 @@ function Ku() {
11126
11134
  challenge_token: fe
11127
11135
  });
11128
11136
  if (vt && typeof vt == "object" && "oauth_url" in vt) {
11129
- j(!0), window.location.href = vt.oauth_url;
11137
+ G(!0), window.location.href = vt.oauth_url;
11130
11138
  return;
11131
11139
  }
11132
11140
  } else
@@ -11241,7 +11249,7 @@ function Ku() {
11241
11249
  "redirect_uri"
11242
11250
  )
11243
11251
  );
11244
- ge || (ge = ((re = e == null ? void 0 : e.ui_settings) == null ? void 0 : re.after_signin_redirect_url) || null), !ge && (e != null && e.frontend_host) && (ge = `https://${e.frontend_host}`), j(!0), ge && t(ge);
11252
+ ge || (ge = ((re = e == null ? void 0 : e.ui_settings) == null ? void 0 : re.after_signin_redirect_url) || null), !ge && (e != null && e.frontend_host) && (ge = `https://${e.frontend_host}`), G(!0), ge && t(ge);
11245
11253
  }
11246
11254
  } catch (ie) {
11247
11255
  S({
@@ -11274,7 +11282,7 @@ function Ku() {
11274
11282
  try {
11275
11283
  await m(re);
11276
11284
  const ie = ft();
11277
- ie && (j(!0), t(ie));
11285
+ ie && (G(!0), t(ie));
11278
11286
  } catch (ie) {
11279
11287
  S({
11280
11288
  submit: ie.message || "Failed to continue with selected account"
@@ -11283,7 +11291,7 @@ function Ku() {
11283
11291
  T(!1);
11284
11292
  }
11285
11293
  }
11286
- }, te = (re, ie) => `${re || ""} ${ie || ""}`.trim().split(" ").filter(Boolean).map((ge) => ge[0]).join("").toUpperCase().slice(0, 2) || "?", he = G(!1);
11294
+ }, te = (re, ie) => `${re || ""} ${ie || ""}`.trim().split(" ").filter(Boolean).map((ge) => ge[0]).join("").toUpperCase().slice(0, 2) || "?", he = j(!1);
11287
11295
  if (X(() => {
11288
11296
  if (i) return;
11289
11297
  const re = new URLSearchParams(window.location.search), ie = re.get("ticket");
@@ -11293,7 +11301,7 @@ function Ku() {
11293
11301
  window.history.replaceState({}, "", De), (async () => {
11294
11302
  var vt;
11295
11303
  try {
11296
- T(!0), await o(ie), j(!0);
11304
+ T(!0), await o(ie), G(!0);
11297
11305
  let Gt = At(
11298
11306
  e,
11299
11307
  new URLSearchParams(window.location.search).get(
@@ -11338,7 +11346,7 @@ function Ku() {
11338
11346
  var De;
11339
11347
  if (!A) return;
11340
11348
  if (A.completed) {
11341
- j(!0);
11349
+ G(!0);
11342
11350
  let Pe = new URLSearchParams(
11343
11351
  window.location.search
11344
11352
  ).get("redirect_uri");
@@ -11408,10 +11416,10 @@ function Ku() {
11408
11416
  Nc,
11409
11417
  {
11410
11418
  onComplete: () => {
11411
- we(!1), Qe && (j(!0), t(Qe));
11419
+ we(!1), Qe && (G(!0), t(Qe));
11412
11420
  },
11413
11421
  onSkip: () => {
11414
- we(!1), Qe && (j(!0), t(Qe));
11422
+ we(!1), Qe && (G(!0), t(Qe));
11415
11423
  }
11416
11424
  }
11417
11425
  ) }) });
@@ -12282,7 +12290,7 @@ function Op({
12282
12290
  } = {}) {
12283
12291
  const [n, i] = C(
12284
12292
  "loading"
12285
- ), [s, o] = C(""), { token: m, attempt: l, redirectUri: c } = F1(), { verifyMagicLink: p } = T1(), { navigate: u } = Ot(), { deployment: f } = Oe(), h = G(!1);
12293
+ ), [s, o] = C(""), { token: m, attempt: l, redirectUri: c } = F1(), { verifyMagicLink: p } = T1(), { navigate: u } = Ot(), { deployment: f } = Oe(), h = j(!1);
12286
12294
  return X(() => {
12287
12295
  (async () => {
12288
12296
  if (!h.current) {
@@ -12394,7 +12402,7 @@ function Tp({
12394
12402
  onError: n
12395
12403
  }) {
12396
12404
  var y;
12397
- const { acceptInvitation: i, invitationData: s, loading: o, error: m } = zd(), { navigate: l } = Ot(), { deployment: c } = Oe(), p = G(!1), u = () => {
12405
+ const { acceptInvitation: i, invitationData: s, loading: o, error: m } = zd(), { navigate: l } = Ot(), { deployment: c } = Oe(), p = j(!1), u = () => {
12398
12406
  var b;
12399
12407
  const x = new URLSearchParams(window.location.search);
12400
12408
  return {
@@ -12568,7 +12576,7 @@ const Ac = sa(void 0), Cc = () => {
12568
12576
  document.body
12569
12577
  );
12570
12578
  }, Qu = ({ children: e }) => {
12571
- const { onClose: t } = Cc(), n = G(null);
12579
+ const { onClose: t } = Cc(), n = j(null);
12572
12580
  return /* @__PURE__ */ a("div", { className: "w-modal", onClick: (s) => {
12573
12581
  n.current && !n.current.contains(s.target) && (t == null || t());
12574
12582
  }, children: /* @__PURE__ */ a("div", { ref: n, style: { maxWidth: "100%", minWidth: 0 }, children: e }) });
@@ -12638,7 +12646,7 @@ const Ac = sa(void 0), Cc = () => {
12638
12646
  openChange: n,
12639
12647
  style: i
12640
12648
  }) => {
12641
- const s = G(null), [o, m] = C(!1);
12649
+ const s = j(null), [o, m] = C(!1);
12642
12650
  return X(() => {
12643
12651
  const l = (c) => {
12644
12652
  s.current && !s.current.contains(c.target) && m(!1);
@@ -12665,7 +12673,7 @@ const Ac = sa(void 0), Cc = () => {
12665
12673
  style: t,
12666
12674
  className: n
12667
12675
  }) => {
12668
- const { open: i } = Sc(), [s, o] = C({ top: 0, left: 0 }), [m, l] = C(!1), c = G(null);
12676
+ const { open: i } = Sc(), [s, o] = C({ top: 0, left: 0 }), [m, l] = C(!1), c = j(null);
12669
12677
  return X(() => {
12670
12678
  i && c.current ? (l(!1), requestAnimationFrame(() => {
12671
12679
  var f, h;
@@ -12912,7 +12920,7 @@ const Lc = (e) => ({
12912
12920
  groupsEnabled: p = !1,
12913
12921
  className: u
12914
12922
  }) => {
12915
- const [f, h] = C(!1), [g, v] = C(""), w = G(null), y = G(null), x = p && "options" in e[0], N = (x ? e.flatMap((_) => _.options) : e).find((_) => _.value === t), E = g ? x ? e.map((_) => ({
12923
+ const [f, h] = C(!1), [g, v] = C(""), w = j(null), y = j(null), x = p && "options" in e[0], N = (x ? e.flatMap((_) => _.options) : e).find((_) => _.value === t), E = g ? x ? e.map((_) => ({
12916
12924
  ..._,
12917
12925
  options: _.options.filter(
12918
12926
  (M) => M.label.toLowerCase().includes(g.toLowerCase())
@@ -13032,7 +13040,7 @@ const Lc = (e) => ({
13032
13040
  groupsEnabled: p = !1,
13033
13041
  className: u
13034
13042
  }) => {
13035
- const [f, h] = C(!1), [g, v] = C(""), w = G(null), y = G(null), x = p && "options" in e[0], N = (x ? e.flatMap((_) => _.options) : e).filter(
13043
+ const [f, h] = C(!1), [g, v] = C(""), w = j(null), y = j(null), x = p && "options" in e[0], N = (x ? e.flatMap((_) => _.options) : e).filter(
13036
13044
  (_) => t.includes(_.value)
13037
13045
  ), E = g ? x ? e.map((_) => ({
13038
13046
  ..._,
@@ -13147,7 +13155,7 @@ const Lc = (e) => ({
13147
13155
  onChange: n,
13148
13156
  fullWidth: i
13149
13157
  }) => {
13150
- const [s, o] = C(!1), m = G(null);
13158
+ const [s, o] = C(!1), m = j(null);
13151
13159
  return X(() => {
13152
13160
  if (!s) return;
13153
13161
  const l = (c) => {
@@ -13193,7 +13201,7 @@ const Lc = (e) => ({
13193
13201
  onCreateOrganization: s
13194
13202
  }) => {
13195
13203
  var fe;
13196
- const o = e === "org", m = o ? "organization" : "workspace", l = o ? "Organization" : "Workspace", { createOrganization: c, getOrganizationRoles: p, inviteOrganizationMember: u } = la(), { createWorkspace: f, getWorkspaceRoles: h, createWorkspaceInvitation: g } = Wa(), { organizationMemberships: v } = Ua(), { refetch: w } = gt(), [y, x] = C(0), [b, N] = C(""), [E, k] = C(""), [A, _] = C(), [M, L] = C(null), [F, R] = C(!1), [z, O] = C(null), [S, Z] = C(t), [T, P] = C(!1), $ = G(null), H = G(null), [V, q] = C(null), [j, U] = C([]), [Y, ee] = C([]), [we, _e] = C(""), [de, oe] = C(null), ue = (fe = v == null ? void 0 : v.find(
13204
+ const o = e === "org", m = o ? "organization" : "workspace", l = o ? "Organization" : "Workspace", { createOrganization: c, getOrganizationRoles: p, inviteOrganizationMember: u } = la(), { createWorkspace: f, getWorkspaceRoles: h, createWorkspaceInvitation: g } = Wa(), { organizationMemberships: v } = Ua(), { refetch: w } = gt(), [y, x] = C(0), [b, N] = C(""), [E, k] = C(""), [A, _] = C(), [M, L] = C(null), [F, R] = C(!1), [z, O] = C(null), [S, Z] = C(t), [T, P] = C(!1), $ = j(null), H = j(null), [V, q] = C(null), [G, U] = C([]), [Y, ee] = C([]), [we, _e] = C(""), [de, oe] = C(null), ue = (fe = v == null ? void 0 : v.find(
13197
13205
  (K) => K.organization.id === S
13198
13206
  )) == null ? void 0 : fe.organization;
13199
13207
  X(() => () => {
@@ -13518,7 +13526,7 @@ const Lc = (e) => ({
13518
13526
  /* @__PURE__ */ a(
13519
13527
  s4,
13520
13528
  {
13521
- roles: j,
13529
+ roles: G,
13522
13530
  value: de,
13523
13531
  onChange: oe
13524
13532
  }
@@ -13654,7 +13662,7 @@ const Lc = (e) => ({
13654
13662
  onCancel: i,
13655
13663
  style: s
13656
13664
  }) => {
13657
- const o = G(null);
13665
+ const o = j(null);
13658
13666
  return X(() => {
13659
13667
  const m = (l) => {
13660
13668
  o.current && !o.current.contains(l.target) && i();
@@ -14881,7 +14889,7 @@ const Lc = (e) => ({
14881
14889
  ip_restrictions: !1,
14882
14890
  allowed_ips: "",
14883
14891
  default_workspace_id: ""
14884
- }), [y, x] = C(""), [b, N] = C(!1), [E, k] = C(!1), A = G({ name: c, description: u, security: v, isSaving: h });
14892
+ }), [y, x] = C(""), [b, N] = C(!1), [E, k] = C(!1), A = j({ name: c, description: u, security: v, isSaving: h });
14885
14893
  X(() => {
14886
14894
  A.current = { name: c, description: u, security: v, isSaving: h };
14887
14895
  }, [c, u, v, h]);
@@ -15159,7 +15167,7 @@ const $t = ({
15159
15167
  domain: t,
15160
15168
  triggerRef: n
15161
15169
  }) => {
15162
- const i = G(null), [s, o] = C(), [m, l] = C(""), [c, p] = C(!1), [u, f] = C(!1), { addDomain: h, verifyDomain: g } = Da(), { toast: v } = Pt(), w = St({
15170
+ const i = j(null), [s, o] = C(), [m, l] = C(""), [c, p] = C(!1), [u, f] = C(!1), { addDomain: h, verifyDomain: g } = Da(), { toast: v } = Pt(), w = St({
15163
15171
  contentRef: i,
15164
15172
  triggerRef: n ?? { current: null },
15165
15173
  isOpen: u,
@@ -15298,7 +15306,7 @@ const $t = ({
15298
15306
  const {
15299
15307
  getOrganizationDomains: t,
15300
15308
  removeOrganizationDomain: n
15301
- } = la(), [i, s] = C(null), [o, m] = C(!1), [l, c] = C(null), [p, u] = C(/* @__PURE__ */ new Set()), f = G(null), h = G({}), {
15309
+ } = la(), [i, s] = C(null), [o, m] = C(!1), [l, c] = C(null), [p, u] = C(/* @__PURE__ */ new Set()), f = j(null), h = j({}), {
15302
15310
  data: g = [],
15303
15311
  isLoading: v,
15304
15312
  mutate: w
@@ -15413,7 +15421,7 @@ const $t = ({
15413
15421
  roles: n,
15414
15422
  triggerRef: i
15415
15423
  }) => {
15416
- const s = G(null), [o, m] = C(""), [l, c] = C(null), [p, u] = C(!1), [f, h] = C(!1), { inviteMember: g } = Da(), { toast: v } = Pt(), w = St({
15424
+ const s = j(null), [o, m] = C(""), [l, c] = C(null), [p, u] = C(!1), [f, h] = C(!1), { inviteMember: g } = Da(), { toast: v } = Pt(), w = St({
15417
15425
  contentRef: s,
15418
15426
  triggerRef: i ?? { current: null },
15419
15427
  isOpen: f,
@@ -15530,7 +15538,7 @@ const $t = ({
15530
15538
  addRoleToOrganizationMember: i,
15531
15539
  removeRoleFromOrganizationMember: s,
15532
15540
  removeOrganizationMember: o
15533
- } = la(), { session: m } = gt(), { toast: l } = Pt(), [c, p] = C(""), [u, f] = C(1), [h] = C(10), [g, v] = C(!1), [w, y] = C(/* @__PURE__ */ new Set()), x = G(null), [b, N] = C(c);
15541
+ } = la(), { session: m } = gt(), { toast: l } = Pt(), [c, p] = C(""), [u, f] = C(1), [h] = C(10), [g, v] = C(!1), [w, y] = C(/* @__PURE__ */ new Set()), x = j(null), [b, N] = C(c);
15534
15542
  X(() => {
15535
15543
  const S = setTimeout(() => {
15536
15544
  N(c), f(1);
@@ -15717,7 +15725,7 @@ const $t = ({
15717
15725
  getOrganizationRoles: n,
15718
15726
  discardOrganizationInvitation: i,
15719
15727
  resendOrganizationInvitation: s
15720
- } = la(), { toast: o } = Pt(), [m, l] = C(!1), [c, p] = C(/* @__PURE__ */ new Set()), u = G(null), {
15728
+ } = la(), { toast: o } = Pt(), [m, l] = C(!1), [c, p] = C(/* @__PURE__ */ new Set()), u = j(null), {
15721
15729
  data: f = [],
15722
15730
  isLoading: h,
15723
15731
  mutate: g
@@ -15834,7 +15842,7 @@ const $t = ({
15834
15842
  triggerRef: i
15835
15843
  }) => {
15836
15844
  var k;
15837
- const s = G(null), [o, m] = C((n == null ? void 0 : n.name) || ""), [l, c] = C((n == null ? void 0 : n.permissions) || []), [p, u] = C(!1), [f, h] = C(!1), { deployment: g } = Oe(), { toast: v } = Pt(), w = St({
15845
+ const s = j(null), [o, m] = C((n == null ? void 0 : n.name) || ""), [l, c] = C((n == null ? void 0 : n.permissions) || []), [p, u] = C(!1), [f, h] = C(!1), { deployment: g } = Oe(), { toast: v } = Pt(), w = St({
15838
15846
  contentRef: s,
15839
15847
  triggerRef: i ?? { current: null },
15840
15848
  isOpen: f,
@@ -15976,7 +15984,7 @@ const M4 = ({
15976
15984
  const {
15977
15985
  getOrganizationRoles: t,
15978
15986
  removeOrganizationRoles: n
15979
- } = la(), { deployment: i } = Oe(), [s, o] = C({ isOpen: !1 }), [m, l] = C(null), [c, p] = C(null), [u, f] = C(/* @__PURE__ */ new Set()), h = G(null), g = G(/* @__PURE__ */ new Map()), {
15987
+ } = la(), { deployment: i } = Oe(), [s, o] = C({ isOpen: !1 }), [m, l] = C(null), [c, p] = C(null), [u, f] = C(/* @__PURE__ */ new Set()), h = j(null), g = j(/* @__PURE__ */ new Map()), {
15980
15988
  data: v = [],
15981
15989
  isLoading: w,
15982
15990
  mutate: y
@@ -16142,7 +16150,7 @@ const M4 = ({
16142
16150
  }, [e, t, n]), { activeOrganization: n || e, loading: t };
16143
16151
  }, R4 = () => {
16144
16152
  var w, y, x;
16145
- const { loading: e, activeOrganization: t } = L4(), { updateOrganization: n } = Da(), { deployment: i } = Oe(), [s, o] = C("general"), [m, l] = C(null), [c, p] = C("info"), [u, f] = C(!1), h = G(null), g = I(
16153
+ const { loading: e, activeOrganization: t } = L4(), { updateOrganization: n } = Da(), { deployment: i } = Oe(), [s, o] = C("general"), [m, l] = C(null), [c, p] = C("info"), [u, f] = C(!1), h = j(null), g = I(
16146
16154
  (b, N = "info") => {
16147
16155
  l(b), p(N), setTimeout(() => l(null), 3e3);
16148
16156
  },
@@ -16555,7 +16563,7 @@ const zc = ({ className: e, ...t }) => /* @__PURE__ */ a("div", { className: kt(
16555
16563
  roles: n,
16556
16564
  triggerRef: i
16557
16565
  }) => {
16558
- const s = G(null), [o, m] = C(""), [l, c] = C(null), [p, u] = C(!1), [f, h] = C(!1), { toast: g } = Pt(), { inviteMember: v } = ca(), w = St({
16566
+ const s = j(null), [o, m] = C(""), [l, c] = C(null), [p, u] = C(!1), [f, h] = C(!1), { toast: g } = Pt(), { inviteMember: v } = ca(), w = St({
16559
16567
  contentRef: s,
16560
16568
  triggerRef: i ?? { current: null },
16561
16569
  isOpen: f,
@@ -16675,7 +16683,7 @@ const zc = ({ className: e, ...t }) => /* @__PURE__ */ a("div", { className: kt(
16675
16683
  removeMember: i,
16676
16684
  addMemberRole: s,
16677
16685
  removeMemberRole: o
16678
- } = ca(), { session: m } = gt(), { toast: l } = Pt(), [c, p] = C(""), [u, f] = C(1), [h] = C(10), [g, v] = C(""), [w, y] = C(!1), x = G(null);
16686
+ } = ca(), { session: m } = gt(), { toast: l } = Pt(), [c, p] = C(""), [u, f] = C(1), [h] = C(10), [g, v] = C(""), [w, y] = C(!1), x = j(null);
16679
16687
  X(() => {
16680
16688
  const R = setTimeout(() => {
16681
16689
  v(c), f(1);
@@ -16871,7 +16879,7 @@ const zc = ({ className: e, ...t }) => /* @__PURE__ */ a("div", { className: kt(
16871
16879
  createInvitation: i,
16872
16880
  triggerRef: s
16873
16881
  }) => {
16874
- const o = G(null), [m, l] = C(""), [c, p] = C(
16882
+ const o = j(null), [m, l] = C(""), [c, p] = C(
16875
16883
  n[0] || null
16876
16884
  ), [u, f] = C(!1), [h, g] = C(!1), { toast: v } = Pt(), w = St({
16877
16885
  contentRef: o,
@@ -16994,7 +17002,7 @@ const zc = ({ className: e, ...t }) => /* @__PURE__ */ a("div", { className: kt(
16994
17002
  inviteMember: s,
16995
17003
  discardInvitation: o,
16996
17004
  resendInvitation: m
16997
- } = ca(), { toast: l } = Pt(), [c, p] = C(!0), [u, f] = C(!0), [h, g] = C([]), [v, w] = C([]), [y, x] = C(!1), b = G(null), N = async () => {
17005
+ } = ca(), { toast: l } = Pt(), [c, p] = C(!0), [u, f] = C(!0), [h, g] = C([]), [v, w] = C([]), [y, x] = C(!1), b = j(null), N = async () => {
16998
17006
  if (e) {
16999
17007
  p(!0), f(!0);
17000
17008
  try {
@@ -17102,7 +17110,7 @@ const zc = ({ className: e, ...t }) => /* @__PURE__ */ a("div", { className: kt(
17102
17110
  triggerRef: i
17103
17111
  }) => {
17104
17112
  var A, _;
17105
- const s = G(null), [o, m] = C((n == null ? void 0 : n.name) || ""), [l, c] = C((n == null ? void 0 : n.permissions) || []), [p, u] = C(!1), [f, h] = C(!1), { deployment: g } = Oe(), { toast: v } = Pt(), w = St({
17113
+ const s = j(null), [o, m] = C((n == null ? void 0 : n.name) || ""), [l, c] = C((n == null ? void 0 : n.permissions) || []), [p, u] = C(!1), [f, h] = C(!1), { deployment: g } = Oe(), { toast: v } = Pt(), w = St({
17106
17114
  contentRef: s,
17107
17115
  triggerRef: i ?? { current: null },
17108
17116
  isOpen: f,
@@ -17229,7 +17237,7 @@ const zc = ({ className: e, ...t }) => /* @__PURE__ */ a("div", { className: kt(
17229
17237
  getRoles: n,
17230
17238
  createRole: i,
17231
17239
  deleteRole: s
17232
- } = ca(), { deployment: o } = Oe(), { toast: m } = Pt(), [l, c] = C({ isOpen: !1 }), [p, u] = C(null), [f, h] = C(null), g = G(null), v = G(/* @__PURE__ */ new Map()), {
17240
+ } = ca(), { deployment: o } = Oe(), { toast: m } = Pt(), [l, c] = C({ isOpen: !1 }), [p, u] = C(null), [f, h] = C(null), g = j(null), v = j(/* @__PURE__ */ new Map()), {
17233
17241
  data: w = [],
17234
17242
  isLoading: y,
17235
17243
  mutate: x
@@ -17372,7 +17380,7 @@ const zc = ({ className: e, ...t }) => /* @__PURE__ */ a("div", { className: kt(
17372
17380
  }
17373
17381
  ), Y4 = (e) => (e || "").slice(0, 2).toUpperCase() || "W", Q4 = () => {
17374
17382
  var y, x;
17375
- const { activeWorkspace: e, loading: t, updateWorkspace: n } = ca(), { deployment: i } = Oe(), [s, o] = C("general"), [m, l] = C(null), [c, p] = C("info"), [u, f] = C(!1), h = G(null), g = I(
17383
+ const { activeWorkspace: e, loading: t, updateWorkspace: n } = ca(), { deployment: i } = Oe(), [s, o] = C("general"), [m, l] = C(null), [c, p] = C("info"), [u, f] = C(!1), h = j(null), g = I(
17376
17384
  (b, N = "info") => {
17377
17385
  l(b), p(N), setTimeout(() => l(null), 3e3);
17378
17386
  },
@@ -17564,7 +17572,7 @@ function zp(e) {
17564
17572
  }
17565
17573
  const am = ({ showPersonal: e = !0 }) => {
17566
17574
  var Fe, fe, K;
17567
- const [t, n] = C(!1), [i, s] = C(!1), [o, m] = C(/* @__PURE__ */ new Set()), l = G(null), c = G(null), p = St({ triggerRef: l, isOpen: t, minWidth: 300 }), u = ta(!1), f = ta(!1), h = ta(!1), g = ta(!1), [v, w] = C(null), [y, x] = C(null), b = Rn(), { organizationMemberships: N, loading: E, refetch: k } = Ua(), { activeOrganization: A, activeMembership: _, leave: M } = Da(), { activeWorkspace: L, activeMembership: F, leave: R } = ca(), { workspaces: z, loading: O } = Wa(), { session: S, switchOrganization: Z, switchWorkspace: T } = gt(), { deployment: P } = Oe(), $ = P == null ? void 0 : P.b2b_settings.organizations_enabled, H = $ && (P == null ? void 0 : P.b2b_settings.workspaces_enabled), V = P == null ? void 0 : P.b2b_settings.allow_users_to_create_orgs, q = !_, j = ot(() => {
17575
+ const [t, n] = C(!1), [i, s] = C(!1), [o, m] = C(/* @__PURE__ */ new Set()), l = j(null), c = j(null), p = St({ triggerRef: l, isOpen: t, minWidth: 300 }), u = ta(!1), f = ta(!1), h = ta(!1), g = ta(!1), [v, w] = C(null), [y, x] = C(null), b = Rn(), { organizationMemberships: N, loading: E, refetch: k } = Ua(), { activeOrganization: A, activeMembership: _, leave: M } = Da(), { activeWorkspace: L, activeMembership: F, leave: R } = ca(), { workspaces: z, loading: O } = Wa(), { session: S, switchOrganization: Z, switchWorkspace: T } = gt(), { deployment: P } = Oe(), $ = P == null ? void 0 : P.b2b_settings.organizations_enabled, H = $ && (P == null ? void 0 : P.b2b_settings.workspaces_enabled), V = P == null ? void 0 : P.b2b_settings.allow_users_to_create_orgs, q = !_, G = ot(() => {
17568
17576
  var ne, pe;
17569
17577
  return q ? {
17570
17578
  name: "Personal account",
@@ -17651,11 +17659,11 @@ const am = ({ showPersonal: e = !0 }) => {
17651
17659
  /* @__PURE__ */ a(
17652
17660
  "span",
17653
17661
  {
17654
- className: `w-avatar w-avatar--sm${j.isPersonal, ""}`,
17655
- children: j.image_url ? /* @__PURE__ */ a("img", { src: j.image_url, alt: j.name }) : j.isPersonal ? /* @__PURE__ */ a(Nn, { size: 11 }) : U(j.name)
17662
+ className: `w-avatar w-avatar--sm${G.isPersonal, ""}`,
17663
+ children: G.image_url ? /* @__PURE__ */ a("img", { src: G.image_url, alt: G.name }) : G.isPersonal ? /* @__PURE__ */ a(Nn, { size: 11 }) : U(G.name)
17656
17664
  }
17657
17665
  ),
17658
- /* @__PURE__ */ a("span", { className: "w-grow w-truncate", children: j.name }),
17666
+ /* @__PURE__ */ a("span", { className: "w-grow w-truncate", children: G.name }),
17659
17667
  /* @__PURE__ */ a(W2, { size: 13 })
17660
17668
  ]
17661
17669
  }
@@ -18349,7 +18357,7 @@ const Fm = () => {
18349
18357
  existingEmail: s,
18350
18358
  triggerRef: o
18351
18359
  }) => {
18352
- const m = G(null), [l, c] = C(!1), { toast: p } = da(), u = St({
18360
+ const m = j(null), [l, c] = C(!1), { toast: p } = da(), u = St({
18353
18361
  contentRef: m,
18354
18362
  triggerRef: o ?? { current: null },
18355
18363
  isOpen: l,
@@ -18469,7 +18477,7 @@ const Fm = () => {
18469
18477
  ) : null;
18470
18478
  }, Im = () => {
18471
18479
  var L, F, R, z;
18472
- const { deployment: e } = Oe(), { toast: t } = da(), [n, i] = C(""), [s, o] = C(!1), [m, l] = C(null), [c, p] = C(/* @__PURE__ */ new Set()), u = G(null), f = G({}), {
18480
+ const { deployment: e } = Oe(), { toast: t } = da(), [n, i] = C(""), [s, o] = C(!1), [m, l] = C(null), [c, p] = C(/* @__PURE__ */ new Set()), u = j(null), f = j({}), {
18473
18481
  user: h,
18474
18482
  createEmailAddress: g,
18475
18483
  deleteEmailAddress: v,
@@ -18637,7 +18645,7 @@ const Fm = () => {
18637
18645
  triggerRef: o
18638
18646
  }) => {
18639
18647
  var _;
18640
- const m = G(null), [l, c] = C(!1), { toast: p } = da(), u = St({
18648
+ const m = j(null), [l, c] = C(!1), { toast: p } = da(), u = St({
18641
18649
  contentRef: m,
18642
18650
  triggerRef: o ?? { current: null },
18643
18651
  isOpen: l,
@@ -18757,7 +18765,7 @@ const Fm = () => {
18757
18765
  ) : null;
18758
18766
  }, Vm = () => {
18759
18767
  var F, R, z, O;
18760
- const { deployment: e } = Oe(), { toast: t } = da(), [n, i] = C(""), [s, o] = C(!1), [m, l] = C(null), [c, p] = C(/* @__PURE__ */ new Set()), u = G(null), f = G({}), {
18768
+ const { deployment: e } = Oe(), { toast: t } = da(), [n, i] = C(""), [s, o] = C(!1), [m, l] = C(null), [c, p] = C(/* @__PURE__ */ new Set()), u = j(null), f = j({}), {
18761
18769
  user: h,
18762
18770
  createPhoneNumber: g,
18763
18771
  deletePhoneNumber: v,
@@ -19737,9 +19745,9 @@ var Qm = (function() {
19737
19745
  const H = window.devicePixelRatio || 1;
19738
19746
  S.height = S.width = o * H;
19739
19747
  const V = o / F * H;
19740
- Z.scale(V, V), Z.fillStyle = l, Z.fillRect(0, 0, F, F), Z.fillStyle = c, Qm ? Z.fill(new Path2D(f0(T, M))) : L.forEach(function(q, j) {
19748
+ Z.scale(V, V), Z.fillStyle = l, Z.fillRect(0, 0, F, F), Z.fillStyle = c, Qm ? Z.fill(new Path2D(f0(T, M))) : L.forEach(function(q, G) {
19741
19749
  q.forEach(function(U, Y) {
19742
- U && Z.fillRect(Y + M, j + M, 1, 1);
19750
+ U && Z.fillRect(Y + M, G + M, 1, 1);
19743
19751
  });
19744
19752
  }), R && (Z.globalAlpha = R.opacity), $ && Z.drawImage(
19745
19753
  P,
@@ -19863,7 +19871,7 @@ const Qs = ({
19863
19871
  triggerRef: n,
19864
19872
  isSetup: i = !1
19865
19873
  }) => {
19866
- const s = G(null), [o, m] = C(!1), [l, c] = C(""), [p, u] = C(""), [f, h] = C(""), [g, v] = C(!1), [w, y] = C(!1), [x, b] = C(!1), [N, E] = C(!1), [k, A] = C({}), _ = St({
19874
+ const s = j(null), [o, m] = C(!1), [l, c] = C(""), [p, u] = C(""), [f, h] = C(""), [g, v] = C(!1), [w, y] = C(!1), [x, b] = C(!1), [N, E] = C(!1), [k, A] = C({}), _ = St({
19867
19875
  contentRef: s,
19868
19876
  triggerRef: n ?? { current: null },
19869
19877
  isOpen: o,
@@ -20022,7 +20030,7 @@ const Qs = ({
20022
20030
  onRemovePassword: t,
20023
20031
  triggerRef: n
20024
20032
  }) => {
20025
- const i = G(null), [s, o] = C(!1), [m, l] = C(""), [c, p] = C(!1), { toast: u } = da(), f = St({
20033
+ const i = j(null), [s, o] = C(!1), [m, l] = C(""), [c, p] = C(!1), { toast: u } = da(), f = St({
20026
20034
  contentRef: i,
20027
20035
  triggerRef: n ?? { current: null },
20028
20036
  isOpen: s,
@@ -20113,7 +20121,7 @@ const Qs = ({
20113
20121
  onVerifyTOTP: n,
20114
20122
  triggerRef: i
20115
20123
  }) => {
20116
- const s = G(null), [o, m] = C("qr"), [l, c] = C(""), [p, u] = C(""), [f, h] = C(["", ""]), [g, v] = C(!1), [w, y] = C(!1), { toast: x } = da(), b = St({
20124
+ const s = j(null), [o, m] = C("qr"), [l, c] = C(""), [p, u] = C(""), [f, h] = C(["", ""]), [g, v] = C(!1), [w, y] = C(!1), { toast: x } = da(), b = St({
20117
20125
  contentRef: s,
20118
20126
  triggerRef: i ?? { current: null },
20119
20127
  isOpen: w,
@@ -20269,7 +20277,7 @@ const Qs = ({
20269
20277
  onDownload: i,
20270
20278
  triggerRef: s
20271
20279
  }) => {
20272
- const o = G(null), [m, l] = C(!1), c = St({
20280
+ const o = j(null), [m, l] = C(!1), c = St({
20273
20281
  contentRef: o,
20274
20282
  triggerRef: s ?? { current: null },
20275
20283
  isOpen: m,
@@ -20344,7 +20352,7 @@ const Qs = ({
20344
20352
  onAddPasskey: t,
20345
20353
  triggerRef: n
20346
20354
  }) => {
20347
- const i = G(null), [s, o] = C(!1), [m, l] = C(""), [c, p] = C(!1), [u, f] = C(""), h = St({
20355
+ const i = j(null), [s, o] = C(!1), [m, l] = C(""), [c, p] = C(!1), [u, f] = C(""), h = St({
20348
20356
  contentRef: i,
20349
20357
  triggerRef: n ?? { current: null },
20350
20358
  isOpen: s,
@@ -20445,7 +20453,7 @@ const Qs = ({
20445
20453
  } catch (Ee) {
20446
20454
  g(Ee.message || "Failed to update 2FA requirement", "error");
20447
20455
  }
20448
- }, [N, E] = C(!1), [k, A] = C(!1), [_, M] = C(!1), [L, F] = C(!1), R = G(null), z = G(null), O = G(null), S = G(null), [Z, T] = C([]), [P, $] = C(!1), [H, V] = C(!1), [q, j] = C(!1), [U, Y] = C(!1), [ee, we] = C(null), _e = G(null), [de, oe] = C("table"), [ue, Ie] = C(""), [J, dt] = C(""), [qe, Qe] = C(""), [Fe, fe] = C([
20456
+ }, [N, E] = C(!1), [k, A] = C(!1), [_, M] = C(!1), [L, F] = C(!1), R = j(null), z = j(null), O = j(null), S = j(null), [Z, T] = C([]), [P, $] = C(!1), [H, V] = C(!1), [q, G] = C(!1), [U, Y] = C(!1), [ee, we] = C(null), _e = j(null), [de, oe] = C("table"), [ue, Ie] = C(""), [J, dt] = C(""), [qe, Qe] = C(""), [Fe, fe] = C([
20449
20457
  "",
20450
20458
  ""
20451
20459
  ]), [K, Q] = C([]), [ne, pe] = C(!1), [Ze, W] = C(!1), [B] = C(!1), [ke, Ne] = C(!1), Ae = (pa = e == null ? void 0 : e.auth_settings) == null ? void 0 : pa.auth_factors_enabled, ft = (fa = (ha = e == null ? void 0 : e.auth_settings) == null ? void 0 : ha.password) == null ? void 0 : fa.enabled;
@@ -20975,7 +20983,7 @@ const Qs = ({
20975
20983
  {
20976
20984
  $outline: !0,
20977
20985
  $size: "sm",
20978
- onClick: () => j(
20986
+ onClick: () => G(
20979
20987
  !q
20980
20988
  ),
20981
20989
  children: [
@@ -21863,7 +21871,7 @@ const Qs = ({
21863
21871
  ) });
21864
21872
  }, h6 = (e, t) => `${(e == null ? void 0 : e[0]) || ""}${(t == null ? void 0 : t[0]) || ""}`.toUpperCase() || "U", f6 = () => {
21865
21873
  var E, k, A, _, M, L, F, R;
21866
- const { loading: e, user: t, updateProfilePicture: n } = Ba(), { deployment: i } = Oe(), [s, o] = C("profile"), [m, l] = C(null), [c, p] = C("info"), [u, f] = C(!1), h = G(null), g = I(
21874
+ const { loading: e, user: t, updateProfilePicture: n } = Ba(), { deployment: i } = Oe(), [s, o] = C("profile"), [m, l] = C(null), [c, p] = C("info"), [u, f] = C(!1), h = j(null), g = I(
21867
21875
  (z, O = "info") => {
21868
21876
  l(z), p(O), setTimeout(() => l(null), 3e3);
21869
21877
  },
@@ -22198,7 +22206,7 @@ const Js = (e) => /* @__PURE__ */ a("hr", { ...e, className: ze("w-hr", e.classN
22198
22206
  top: 0,
22199
22207
  left: 0,
22200
22208
  maxHeight: 400
22201
- }), [N, E] = C(/* @__PURE__ */ new Set()), [k, A] = C(null), _ = G(null), M = G(null), L = G(null), F = St({
22209
+ }), [N, E] = C(/* @__PURE__ */ new Set()), [k, A] = C(null), _ = j(null), M = j(null), L = j(null), F = St({
22202
22210
  triggerRef: _,
22203
22211
  isOpen: o,
22204
22212
  minWidth: 300
@@ -22209,7 +22217,7 @@ const Js = (e) => /* @__PURE__ */ a("hr", { ...e, className: ze("w-hr", e.classN
22209
22217
  switchOrganization: H,
22210
22218
  switchWorkspace: V,
22211
22219
  refetch: q
22212
- } = gt(), { navigateToSignIn: j } = Ot(), { deployment: U } = Oe(), {
22220
+ } = gt(), { navigateToSignIn: G } = Ot(), { deployment: U } = Oe(), {
22213
22221
  activeOrganization: Y,
22214
22222
  activeMembership: ee,
22215
22223
  leave: we
@@ -22423,7 +22431,7 @@ const Js = (e) => /* @__PURE__ */ a("hr", { ...e, className: ze("w-hr", e.classN
22423
22431
  Br,
22424
22432
  {
22425
22433
  onClick: () => {
22426
- j(), m(!1);
22434
+ G(), m(!1);
22427
22435
  },
22428
22436
  children: [
22429
22437
  /* @__PURE__ */ a(jr, { style: { color: "var(--wa-text-muted)" }, children: /* @__PURE__ */ a(Zt, {}) }),
@@ -22963,7 +22971,7 @@ function W6({
22963
22971
  }
22964
22972
  const B6 = ce(
22965
22973
  ({ scope: e = "all", onAction: t, fullWidth: n, maxHeight: i, className: s }, o) => {
22966
- const [m, l] = C("inbox"), [c, p] = C(!1), [u, f] = C(!1), h = G(null), g = {
22974
+ const [m, l] = C("inbox"), [c, p] = C(!1), [u, f] = C(!1), h = j(null), g = {
22967
22975
  scope: e,
22968
22976
  limit: 20,
22969
22977
  is_archived: m === "archive",
@@ -23149,7 +23157,7 @@ function G6({
23149
23157
  scope: n = "all",
23150
23158
  onAction: i
23151
23159
  }) {
23152
- const [s, o] = C(!1), m = Rn(), l = G(null), c = G(null), p = G(null), { count: u, refetch: f } = rd({
23160
+ const [s, o] = C(!1), m = Rn(), l = j(null), c = j(null), p = j(null), { count: u, refetch: f } = rd({
23153
23161
  scope: n
23154
23162
  }), h = async (v) => {
23155
23163
  await f(), i == null || i(v.payload);
@@ -23387,7 +23395,7 @@ const Wp = ({
23387
23395
  organizationMemberships: e,
23388
23396
  refetch: t,
23389
23397
  loading: n
23390
- } = Ua(), { workspaces: i } = Wa(), { switchOrganization: s, switchWorkspace: o } = gt(), { deployment: m } = Oe(), [l, c] = C(null), [p, u] = C("orgList"), [f, h] = C(null), g = ((m == null ? void 0 : m.b2b_settings.organizations_enabled) ?? !1) && ((m == null ? void 0 : m.b2b_settings.workspaces_enabled) ?? !1), v = (m == null ? void 0 : m.b2b_settings.allow_users_to_create_orgs) ?? !1, w = G(!1);
23398
+ } = Ua(), { workspaces: i } = Wa(), { switchOrganization: s, switchWorkspace: o } = gt(), { deployment: m } = Oe(), [l, c] = C(null), [p, u] = C("orgList"), [f, h] = C(null), g = ((m == null ? void 0 : m.b2b_settings.organizations_enabled) ?? !1) && ((m == null ? void 0 : m.b2b_settings.workspaces_enabled) ?? !1), v = (m == null ? void 0 : m.b2b_settings.allow_users_to_create_orgs) ?? !1, w = j(!1);
23391
23399
  X(() => {
23392
23400
  if (!(w.current || !e)) {
23393
23401
  if (w.current = !0, e.length === 0) {
@@ -23568,10 +23576,10 @@ const Wp = ({
23568
23576
  }
23569
23577
  ) })
23570
23578
  ] }) }) : e && e.length > 0 ? e.map((O) => {
23571
- var j, U, Y, ee, we;
23579
+ var G, U, Y, ee, we;
23572
23580
  const S = O.organization, Z = i == null ? void 0 : i.filter(
23573
23581
  (_e) => _e.organization.id === S.id
23574
- ), T = (Z == null ? void 0 : Z.length) || 0, P = S.member_count, $ = ((U = (j = O.roles) == null ? void 0 : j[0]) == null ? void 0 : U.name) || "No role", H = O.roles.length - 1, V = H > 0 ? `${$.charAt(0).toUpperCase() + $.slice(1)} +${H}` : $.charAt(0).toUpperCase() + $.slice(1), q = ((Y = O.eligibility_restriction) == null ? void 0 : Y.type) !== "none" && ((ee = O.eligibility_restriction) == null ? void 0 : ee.type) !== void 0;
23582
+ ), T = (Z == null ? void 0 : Z.length) || 0, P = S.member_count, $ = ((U = (G = O.roles) == null ? void 0 : G[0]) == null ? void 0 : U.name) || "No role", H = O.roles.length - 1, V = H > 0 ? `${$.charAt(0).toUpperCase() + $.slice(1)} +${H}` : $.charAt(0).toUpperCase() + $.slice(1), q = ((Y = O.eligibility_restriction) == null ? void 0 : Y.type) !== "none" && ((ee = O.eligibility_restriction) == null ? void 0 : ee.type) !== void 0;
23575
23583
  return /* @__PURE__ */ d(
23576
23584
  "button",
23577
23585
  {