@springmicro/auth 0.6.1 → 0.6.3

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 { Y as I, Z as N, $ as M, a0 as O, am as me, a4 as _, a7 as w, a8 as G, a9 as T, aa as V, ab as C, ac as Y, ad as _e, ae as we, af as D, a1 as h, a3 as m, aA as Ce, ah as H, a2 as L, b7 as W, ai as $, a5 as g, a6 as S, ay as be, bg as ze, bh as Te, bi as je, aD as Le, aU as xe, aG as Pe, aW as Se, aj as F, aO as Z, aR as Re, bj as Ee, bk as ye, aV as Ie, az as Ne, bl as U, bm as B, aw as A, aH as he, an as Me, ao as ge, bn as Oe, ag as ke, bo as X, bp as J, al as E, bq as Q, au as R, aC as K, br as ee, bs as De, bt as te, bu as x, at as He, aX as q, bv as $e } from "./Web3Auth-DtI3oRQ3.js";
1
+ import { Y as I, Z as N, $ as M, a0 as O, am as me, a4 as _, a7 as w, a8 as G, a9 as T, aa as V, ab as C, ac as Y, ad as _e, ae as we, af as D, a1 as h, a3 as m, aA as Ce, ah as H, a2 as L, b7 as W, ai as $, a5 as g, a6 as S, ay as be, bg as ze, bh as Te, bi as je, aD as Le, aU as xe, aG as Pe, aW as Se, aj as F, aO as Z, aR as Re, bj as Ee, bk as ye, aV as Ie, az as Ne, bl as U, bm as B, aw as A, aH as he, an as Me, ao as ge, bn as Oe, ag as ke, bo as X, bp as J, al as E, bq as Q, au as R, aC as K, br as ee, bs as De, bt as te, bu as x, at as He, aX as q, bv as $e } from "./Web3Auth-BZvmXZfr.js";
2
2
  function Fe(i, { from: e, to: t }, n = {}) {
3
3
  const o = getComputedStyle(i), a = o.transform === "none" ? "" : o.transform, [f, l] = o.transformOrigin.split(" ").map(parseFloat), s = e.left + e.width * f / t.width - (t.left + f), r = e.top + e.height * l / t.height - (t.top + l), { delay: c = 0, duration: d = (u) => Math.sqrt(u) * 120, easing: v = ye } = n;
4
4
  return {
@@ -1,4 +1,4 @@
1
- import { _ as He, J as Ht, K as Bt, L as Dt, M as Wt, N as Nt, O as Et, P as Ft, Q as Ot, R as Zt, T as Rt, U as Gt, V as Ut, W as Xt, X as Yt, Y as pe, Z as ve, $ as me, a0 as he, a1 as h, a2 as z, a3 as p, a4 as M, a5 as c, a6 as Y, a7 as y, a8 as ae, a9 as A, aa as ie, ab as S, ac as te, ad as ye, ae as Ce, af as ee, ag as Jt, ah as F, ai as O, aj as Z, ak as Be, al as R, am as ue, an as Me, ao as qe, ap as $t, aq as De, ar as P, as as be, at as ge, au as L, av as _e, aw as ce, ax as Kt, ay as fe, az as we, aA as At, aB as Qt, aC as j, aD as Ae, aE as We, aF as Ne, aG as Ee, aH as ke, aI as Tt, aJ as xt, aK as en, aL as Ve, aM as ze, aN as Mt, aO as tn, aP as nn, aQ as rn, aR as St, aS as on, aT as de, aU as Ie, aV as $e, aW as ln, aX as je, aY as an, aZ as sn, a_ as It, a$ as Pt, b0 as cn, b1 as dn, b2 as Fe, b3 as un, b4 as Oe, b5 as fn, b6 as Ze, b7 as Pe, b8 as Re, b9 as pn, ba as Le, bb as Ge, bc as vn, bd as mn, be as Ue, bf as hn } from "./Web3Auth-DtI3oRQ3.js";
1
+ import { _ as He, J as Ht, K as Bt, L as Dt, M as Wt, N as Nt, O as Et, P as Ft, Q as Ot, R as Zt, T as Rt, U as Gt, V as Ut, W as Xt, X as Yt, Y as pe, Z as ve, $ as me, a0 as he, a1 as h, a2 as z, a3 as p, a4 as M, a5 as c, a6 as Y, a7 as y, a8 as ae, a9 as A, aa as ie, ab as S, ac as te, ad as ye, ae as Ce, af as ee, ag as Jt, ah as F, ai as O, aj as Z, ak as Be, al as R, am as ue, an as Me, ao as qe, ap as $t, aq as De, ar as P, as as be, at as ge, au as L, av as _e, aw as ce, ax as Kt, ay as fe, az as we, aA as At, aB as Qt, aC as j, aD as Ae, aE as We, aF as Ne, aG as Ee, aH as ke, aI as Tt, aJ as xt, aK as en, aL as Ve, aM as ze, aN as Mt, aO as tn, aP as nn, aQ as rn, aR as St, aS as on, aT as de, aU as Ie, aV as $e, aW as ln, aX as je, aY as an, aZ as sn, a_ as It, a$ as Pt, b0 as cn, b1 as dn, b2 as Fe, b3 as un, b4 as Oe, b5 as fn, b6 as Ze, b7 as Pe, b8 as Re, b9 as pn, ba as Le, bb as Ge, bc as vn, bd as mn, be as Ue, bf as hn } from "./Web3Auth-BZvmXZfr.js";
2
2
  var gn = function(e) {
3
3
  He(t, e);
4
4
  function t(n, r) {
@@ -1,4 +1,4 @@
1
- import { s as pu, g as mp, a as yp } from "./index-DEZkLpuR.js";
1
+ import { s as pu, g as mp, a as yp } from "./index-CPg63-IP.js";
2
2
  import gu from "i18next";
3
3
  var Ze = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
4
4
  function _o(e) {
@@ -21308,7 +21308,7 @@ const py = (e) => py(), KE = (e) => {
21308
21308
  const t = Uu(e, "bigint");
21309
21309
  return hy(t);
21310
21310
  }, VI = (e) => Zf(e), zc = (e, t) => t ? typeof t == "function" ? `Please <a href="#" onclick="${() => t()}">install</a> or enable to ${e} to continue` : `Please <a href="${t}" target="_blank">install</a> or enable to ${e} to continue` : `Please switch to ${e} to continue`, JE = async (e) => {
21311
- const t = await import("./index-C621Bj_G.js"), { id: r, label: n, token: i, publicRpcUrl: o, blockExplorerUrl: a, rpcUrl: s } = e;
21311
+ const t = await import("./index-wK6pELVV.js"), { id: r, label: n, token: i, publicRpcUrl: o, blockExplorerUrl: a, rpcUrl: s } = e;
21312
21312
  switch (r) {
21313
21313
  case "0x89": {
21314
21314
  const { polygon: l } = t;
@@ -21371,7 +21371,7 @@ const py = (e) => py(), KE = (e) => {
21371
21371
  return l;
21372
21372
  }
21373
21373
  default: {
21374
- const { extractChain: l, defineChain: u } = await import("./index-DaoGTpZx.js"), f = l({
21374
+ const { extractChain: l, defineChain: u } = await import("./index-BMS1BfQU.js"), f = l({
21375
21375
  chains: Object.values(t),
21376
21376
  id: Uu(r, "number")
21377
21377
  });
@@ -24450,7 +24450,7 @@ const Ya = async (e, t) => {
24450
24450
  const r = t.rpcUrl;
24451
24451
  return !t.secondaryTokens || !t.secondaryTokens.length || !r ? [] : await Promise.all(t.secondaryTokens.map(async (i) => {
24452
24452
  try {
24453
- const { createPublicClient: o, http: a } = await import("./index-DaoGTpZx.js"), s = await JE(t), l = o({
24453
+ const { createPublicClient: o, http: a } = await import("./index-BMS1BfQU.js"), s = await JE(t), l = o({
24454
24454
  chain: s,
24455
24455
  transport: a(t.providerConnectionInfo && t.providerConnectionInfo.url ? t.providerConnectionInfo.url : r)
24456
24456
  }), u = {
@@ -24493,7 +24493,7 @@ async function K9(e) {
24493
24493
  const t = await E7(e.id);
24494
24494
  if (!t)
24495
24495
  return null;
24496
- const { createPublicClient: r, http: n } = await import("./index-DaoGTpZx.js"), i = r({
24496
+ const { createPublicClient: r, http: n } = await import("./index-BMS1BfQU.js"), i = r({
24497
24497
  chain: t,
24498
24498
  transport: n()
24499
24499
  });
@@ -29806,7 +29806,7 @@ function OA(e, t, r) {
29806
29806
  bottomLeft: `
29807
29807
  bottom: var(--${O}-position-bottom, 0);
29808
29808
  left: var(--${O}-position-left, 0);`
29809
- }), $ = u.enabled ? import("./Index-6c094240-BoxR5zsn.js").then((O) => O.default) : Promise.resolve(null), M = c.enabled ? import("./Index-64ac63ff-vb_yo1iM.js").then((O) => O.default) : Promise.resolve(null), j = u.enabled && b && b.accountCenter, A = (O, I, P, S) => {
29809
+ }), $ = u.enabled ? import("./Index-6c094240-MY1bN_-H.js").then((O) => O.default) : Promise.resolve(null), M = c.enabled ? import("./Index-64ac63ff-BZqOq8A-.js").then((O) => O.default) : Promise.resolve(null), j = u.enabled && b && b.accountCenter, A = (O, I, P, S) => {
29810
29810
  const T = O.attachShadow({ mode: "open" });
29811
29811
  let R = document.querySelector("onboard-v2").shadowRoot.styleSheets;
29812
29812
  const U = new CSSStyleSheet();
@@ -29952,7 +29952,7 @@ function $A(e) {
29952
29952
  return Ms;
29953
29953
  }
29954
29954
  const kA = (e, t) => t || document.body && (getComputedStyle(document.body).getPropertyValue("--onboard-font-family-normal") || getComputedStyle(document.body).getPropertyValue("--w3o-font-family")) ? !0 : e ? !!(typeof e == "object" && e["--w3o-font-family"]) : !1, RA = async () => {
29955
- const { InterVar: e } = await import("./index-CxmovbaE.js"), t = document.createElement("style");
29955
+ const { InterVar: e } = await import("./index-BwFS5ERT.js"), t = document.createElement("style");
29956
29956
  t.innerHTML = `
29957
29957
  ${e}
29958
29958
  `, document.body.appendChild(t);
@@ -31962,7 +31962,7 @@ function yI() {
31962
31962
  label: "Frontier",
31963
31963
  getIcon: async () => (await import("./icon-C_O4nprO.js")).default,
31964
31964
  getInterface: async () => {
31965
- const { createEIP1193Provider: e } = await import("./index-CxmovbaE.js"), t = window.hasOwnProperty("ethereum");
31965
+ const { createEIP1193Provider: e } = await import("./index-BwFS5ERT.js"), t = window.hasOwnProperty("ethereum");
31966
31966
  let r;
31967
31967
  if (t && window.ethereum.isFrontier)
31968
31968
  r = e(window.ethereum);
@@ -32223,7 +32223,7 @@ function AI({ supportedWalletType: e = "all", darkMode: t = !1, enableMobileWall
32223
32223
  getIcon: async () => (await import("./icon-DbgmZCnU.js")).default,
32224
32224
  getInterface: async ({ chains: i, appMetadata: o }) => {
32225
32225
  (r || n || t) && console.warn("darkMode, enableMobileWalletLink and reloadOnDisconnect init props are deprecated after version 2.2.7 of @web3-onboard/coinbase");
32226
- const { name: a, icon: s } = o || {}, { default: l } = await import("./index-CRVK3Pq6.js").then(($) => $.i), u = l.default ? l.default : l, { isHex: f, toHex: c, createEIP1193Provider: h, fromHex: d } = await import("./index-CxmovbaE.js"), g = `data:image/svg+xml;base64,${window.btoa(s || "")}`, b = i.map(({ id: $ }) => d($, "number")), m = new u({
32226
+ const { name: a, icon: s } = o || {}, { default: l } = await import("./index-BcAl576H.js").then(($) => $.i), u = l.default ? l.default : l, { isHex: f, toHex: c, createEIP1193Provider: h, fromHex: d } = await import("./index-BwFS5ERT.js"), g = `data:image/svg+xml;base64,${window.btoa(s || "")}`, b = i.map(({ id: $ }) => d($, "number")), m = new u({
32227
32227
  appName: a || "",
32228
32228
  appLogoUrl: g,
32229
32229
  appChainIds: b
@@ -32258,7 +32258,7 @@ function CI(e) {
32258
32258
  label: "Safe",
32259
32259
  getIcon: async () => (await import("./icon-2Zqy7pqQ.js")).default,
32260
32260
  getInterface: async () => {
32261
- const { default: n } = await import("./index-Cjw60RFG.js"), { SafeAppProvider: i } = await import("./index-opG_F1g6.js").then((h) => h.i), { createEIP1193Provider: o } = await import("./index-CxmovbaE.js"), a = (
32261
+ const { default: n } = await import("./index-D1pMMcC-.js"), { SafeAppProvider: i } = await import("./index-CHbx8A-C.js").then((h) => h.i), { createEIP1193Provider: o } = await import("./index-BwFS5ERT.js"), a = (
32262
32262
  // @ts-ignore
32263
32263
  n.default || n
32264
32264
  ), s = {
@@ -1,4 +1,4 @@
1
- import { bK as L } from "./Web3Auth-DtI3oRQ3.js";
1
+ import { bK as L } from "./Web3Auth-BZvmXZfr.js";
2
2
  var Yt = {}, I = {}, T = {}, ie = L && L.__awaiter || function(e, t, n, i) {
3
3
  function r(s) {
4
4
  return s instanceof n ? s : new n(function(o) {
@@ -1,7 +1,7 @@
1
- import { B as O, s as Z, t as Ne, n as j, p as he, b as ys, a as gs, i as Re, c as Bt, d as Q, h as Ue, e as At, I as ms, f as ft, g as ws, j as pr, k as vs, l as lt, m as Cn, o as ye, q as qe } from "./Web3Auth-DtI3oRQ3.js";
2
- import { v as lc, w as dc, x as pc, S as bc, y as hc, z as yc, r as gc, C as mc, D as wc, u as vc, E as Ec, F as xc, A as Pc, G as Bc, H as Ac } from "./Web3Auth-DtI3oRQ3.js";
3
- import { k as W, c as ee, i as te, I as ve, s as xt, a as br, b as Es, d as xs, e as Ps, p as an, f as ge, E as mt, F as Ht, g as jn, N as Fn, h as qn, j as Mn, l as zn, m as Ln, n as _n, T as Dn, o as Gt, U as cn, q as Bs, r as hr, t as As, u as Ts, v as Is, w as Os, x as Ss, y as yr, P as ks, z as Ee, C as Ut, A as gr, B as mr, D as Ns, G as wr, H as Rs, J as $s, K as Cs, L as js, M as Hn, O as Fs, Q as qs, R as Ms, S as zs, W as Gn } from "./number-BE79AmF4.js";
4
- import { X as Ic, Y as Oc, Z as Sc, _ as kc, a6 as Nc, a7 as Rc, a8 as $c, a9 as Cc, ab as jc, $ as Fc, ac as qc, a0 as Mc, a2 as zc, a3 as Lc, V as _c, a4 as Dc, ae as Hc, af as Gc, ad as Uc, ag as Vc, aa as Zc, a5 as Wc, a1 as Yc } from "./number-BE79AmF4.js";
1
+ import { B as O, s as Z, t as Ne, n as j, p as he, b as ys, a as gs, i as Re, c as Bt, d as Q, h as Ue, e as At, I as ms, f as ft, g as ws, j as pr, k as vs, l as lt, m as Cn, o as ye, q as qe } from "./Web3Auth-BZvmXZfr.js";
2
+ import { v as lc, w as dc, x as pc, S as bc, y as hc, z as yc, r as gc, C as mc, D as wc, u as vc, E as Ec, F as xc, A as Pc, G as Bc, H as Ac } from "./Web3Auth-BZvmXZfr.js";
3
+ import { k as W, c as ee, i as te, I as ve, s as xt, a as br, b as Es, d as xs, e as Ps, p as an, f as ge, E as mt, F as Ht, g as jn, N as Fn, h as qn, j as Mn, l as zn, m as Ln, n as _n, T as Dn, o as Gt, U as cn, q as Bs, r as hr, t as As, u as Ts, v as Is, w as Os, x as Ss, y as yr, P as ks, z as Ee, C as Ut, A as gr, B as mr, D as Ns, G as wr, H as Rs, J as $s, K as Cs, L as js, M as Hn, O as Fs, Q as qs, R as Ms, S as zs, W as Gn } from "./number-D6mr0b-k.js";
4
+ import { X as Ic, Y as Oc, Z as Sc, _ as kc, a6 as Nc, a7 as Rc, a8 as $c, a9 as Cc, ab as jc, $ as Fc, ac as qc, a0 as Mc, a2 as zc, a3 as Lc, V as _c, a4 as Dc, ae as Hc, af as Gc, ad as Uc, ag as Vc, aa as Zc, a5 as Wc, a1 as Yc } from "./number-D6mr0b-k.js";
5
5
  function Ls(e, t) {
6
6
  const n = e.exec(t);
7
7
  return n == null ? void 0 : n.groups;
@@ -1,4 +1,4 @@
1
- import { bH as Xi, bI as qt, bJ as es, bK as Z, bL as de, bM as Wn, bN as Sa } from "./Web3Auth-DtI3oRQ3.js";
1
+ import { bH as Xi, bI as qt, bJ as es, bK as Z, bL as de, bM as Wn, bN as Sa } from "./Web3Auth-BZvmXZfr.js";
2
2
  var ts = {}, gt = {}, Kt = {};
3
3
  Object.defineProperty(Kt, "__esModule", { value: !0 });
4
4
  Kt.walletLogo = void 0;
@@ -1,4 +1,4 @@
1
- import { bw as o, b2 as r, bs as t, bC as i, bE as n, bF as f, bG as b, bB as d, bx as c, D as l, bA as m, i as p, q as h, bD as w, by as x, bz as I } from "./Web3Auth-DtI3oRQ3.js";
1
+ import { bw as o, b2 as r, bs as t, bC as i, bE as n, bF as f, bG as b, bB as d, bx as c, D as l, bA as m, i as p, q as h, bD as w, by as x, bz as I } from "./Web3Auth-BZvmXZfr.js";
2
2
  const a = `
3
3
  @font-face {
4
4
  font-family: 'Inter';
@@ -1,5 +1,5 @@
1
- import { bK as Z, bM as Qu, bH as ed } from "./Web3Auth-DtI3oRQ3.js";
2
- import { b as Qe, c as ti, i as ni, d as ri, B as A, g as yt, A as As, f as bt, t as ln, k as me, j as he, l as gt, n as $, m as D, o as wr, p as U, q as Be, I as si, r as H, s as oe, u as je, v as en, w as ea, x as ai, y as oi, z as xr, C as ii, D as ut, E as pn, F as ta, G as K, H as j, J as L, K as Ie, L as de, M as fe, N as lo, O as ci, P as as, Q as tr, R as ui, S as td, T as di, U as Ae, e as be, V as fi, W as na, X as wn, Y as Mt, Z as hn, _ as ra, $ as sa, a0 as mn, a1 as aa, a2 as vr, a3 as $t, a4 as Pr, a5 as li, a6 as Ts, a7 as pi, a8 as hi, a9 as dn, aa as mi, ab as nd, ac as rd, ad as yi, ae as sd, af as bi, ag as _e, ah as gi, ai as Hn, h as Er, a as oa, aj as ia, ak as Bs, al as ad, am as _s, an as od, ao as id, ap as cd, aq as ud, ar as wi, as as xi, at as vi, au as Pi, av as dd, aw as fd, ax as ld, ay as pd, az as hd, aA as md, aB as yd, aC as bd, aD as gd, aE as wd, aF as xd, aG as vd, aH as Pd, aI as Ed, aJ as Id, aK as Sd, aL as Ad, aM as Td, aN as Gn, aO as Bd, aP as _d, aQ as Cd, aR as $d, aS as kd, aT as Md, aU as Nd, aV as Rd, aW as po, aX as Od, aY as Fd } from "./hashMessage-DCmgnd-x.js";
1
+ import { bK as Z, bM as Qu, bH as ed } from "./Web3Auth-BZvmXZfr.js";
2
+ import { b as Qe, c as ti, i as ni, d as ri, B as A, g as yt, A as As, f as bt, t as ln, k as me, j as he, l as gt, n as $, m as D, o as wr, p as U, q as Be, I as si, r as H, s as oe, u as je, v as en, w as ea, x as ai, y as oi, z as xr, C as ii, D as ut, E as pn, F as ta, G as K, H as j, J as L, K as Ie, L as de, M as fe, N as lo, O as ci, P as as, Q as tr, R as ui, S as td, T as di, U as Ae, e as be, V as fi, W as na, X as wn, Y as Mt, Z as hn, _ as ra, $ as sa, a0 as mn, a1 as aa, a2 as vr, a3 as $t, a4 as Pr, a5 as li, a6 as Ts, a7 as pi, a8 as hi, a9 as dn, aa as mi, ab as nd, ac as rd, ad as yi, ae as sd, af as bi, ag as _e, ah as gi, ai as Hn, h as Er, a as oa, aj as ia, ak as Bs, al as ad, am as _s, an as od, ao as id, ap as cd, aq as ud, ar as wi, as as xi, at as vi, au as Pi, av as dd, aw as fd, ax as ld, ay as pd, az as hd, aA as md, aB as yd, aC as bd, aD as gd, aE as wd, aF as xd, aG as vd, aH as Pd, aI as Ed, aJ as Id, aK as Sd, aL as Ad, aM as Td, aN as Gn, aO as Bd, aP as _d, aQ as Cd, aR as $d, aS as kd, aT as Md, aU as Nd, aV as Rd, aW as po, aX as Od, aY as Fd } from "./hashMessage-DXQQ5wqb.js";
3
3
  function Ld(e, t) {
4
4
  for (var n = 0; n < t.length; n++) {
5
5
  const r = t[n];
@@ -2963,10 +2963,10 @@ function Qe(t, e) {
2963
2963
  });
2964
2964
  }
2965
2965
  function Bt(t, e, o) {
2966
- e.type === "MetaMask" ? import("./Web3Auth-DtI3oRQ3.js").then((r) => r.bO).then((r) => {
2966
+ e.type === "MetaMask" ? import("./Web3Auth-BZvmXZfr.js").then((r) => r.bO).then((r) => {
2967
2967
  const i = r.authViaMetaMask;
2968
2968
  i(t, e, o);
2969
- }) : e.type === "Web3Onboard" && import("./Web3Auth-DtI3oRQ3.js").then((r) => r.bO).then((r) => {
2969
+ }) : e.type === "Web3Onboard" && import("./Web3Auth-BZvmXZfr.js").then((r) => r.bO).then((r) => {
2970
2970
  const i = r.authViaWeb3Onboard;
2971
2971
  i(t, e, o);
2972
2972
  });
@@ -3646,7 +3646,7 @@ function er(t, e, o) {
3646
3646
  {
3647
3647
  variant: "ghost",
3648
3648
  size: "icon",
3649
- className: "absolute top-1/2 right-2 -translate-y-1/2",
3649
+ className: "top-1/2 right-2 -translate-y-1/2",
3650
3650
  onClick: (s) => {
3651
3651
  s.preventDefault(), s.stopPropagation(), e.password.setState({
3652
3652
  ...e.password.state,
@@ -1,4 +1,4 @@
1
- import { e as y, h as T, a as k } from "./hashMessage-DCmgnd-x.js";
1
+ import { e as y, h as T, a as k } from "./hashMessage-DXQQ5wqb.js";
2
2
  const I = () => "9.1.0", q = (t) => t.toString(16).padStart(2, "0"), v = (t) => {
3
3
  const e = new Uint8Array(t / 2);
4
4
  return window.crypto.getRandomValues(e), Array.from(e, q).join("");
@@ -1,5 +1,5 @@
1
- import { ac as e, $ as G, D as J, a0 as V, a2 as ee, af as X, a as q, a5 as Z, i as k, I as E, a3 as te, ae as de, ah as me, X as ae, F as ue, o as be, V as he, z as ke, ad as xe } from "./number-BE79AmF4.js";
2
- import { h as i, q as o, e as W, B as u, f as fe, g as R, t as K, G as ye } from "./Web3Auth-DtI3oRQ3.js";
1
+ import { ac as e, $ as G, D as J, a0 as V, a2 as ee, af as X, a as q, a5 as Z, i as k, I as E, a3 as te, ae as de, ah as me, X as ae, F as ue, o as be, V as he, z as ke, ad as xe } from "./number-D6mr0b-k.js";
2
+ import { h as i, q as o, e as W, B as u, f as fe, g as R, t as K, G as ye } from "./Web3Auth-BZvmXZfr.js";
3
3
  const et = /* @__PURE__ */ e({
4
4
  id: 787,
5
5
  name: "Acala",
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { S as r, b as s, u as S } from "./index-DEZkLpuR.js";
1
+ import { S as r, b as s, u as S } from "./index-CPg63-IP.js";
2
2
  export {
3
3
  r as SignUp,
4
4
  s as SignUpProvider,
@@ -55,7 +55,7 @@ React keys must be passed directly to JSX without using spread:
55
55
  c-0.564-3.887-1.183-28.422-0.619-31.098c2.54-7.765,43.816-39.902,48.059-41.112l3.997-0.901h12.472
56
56
  C210.405,118.002,212.353,114.98,212.353,114.98z M202.266,179.079l11.689,0.892l13.628-49.979
57
57
  c-2.276-0.082-22.95-1.93-25.636-2.431L202.266,179.079z M200.245,187.091l0.064,12.208l5.917,0.492l6.391,0.446l1.875-11.944
58
- l-6.737-0.31C207.756,187.983,200.245,187.091,200.245,187.091z`})))}var Kv=fr(xt),Dz={activeStyle:{background:"#008FF3"},icon:Hz,style:{background:"#0573ff"},text:"Log in with Zalo"},Uz=Lr(Dz);function Hz({size:e,color:t}){return Kv.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24"},Kv.default.createElement("path",{fill:t,d:"M12.49 10.2722v-.4496h1.3467v6.3218h-.7704a.576.576 0 01-.5763-.5729l-.0006.0005a3.273 3.273 0 01-1.9372.6321c-1.8138 0-3.2844-1.4697-3.2844-3.2823 0-1.8125 1.4706-3.2822 3.2844-3.2822a3.273 3.273 0 011.9372.6321l.0006.0005zM6.9188 7.7896v.205c0 .3823-.051.6944-.2995 1.0605l-.03.0343c-.0542.0615-.1815.206-.2421.2843L2.024 14.8h4.8948v.7682a.5764.5764 0 01-.5767.5761H0v-.3622c0-.4436.1102-.6414.2495-.8476L4.8582 9.23H.1922V7.7896h6.7266zm8.5513 8.3548a.4805.4805 0 01-.4803-.4798v-7.875h1.4416v8.3548H15.47zM20.6934 9.6C22.52 9.6 24 11.0807 24 12.9044c0 1.8252-1.4801 3.306-3.3066 3.306-1.8264 0-3.3066-1.4808-3.3066-3.306 0-1.8237 1.4802-3.3044 3.3066-3.3044zm-10.1412 5.253c1.0675 0 1.9324-.8645 1.9324-1.9312 0-1.065-.865-1.9295-1.9324-1.9295s-1.9324.8644-1.9324 1.9295c0 1.0667.865 1.9312 1.9324 1.9312zm10.1412-.0033c1.0737 0 1.945-.8707 1.945-1.9453 0-1.073-.8713-1.9436-1.945-1.9436-1.0753 0-1.945.8706-1.945 1.9436 0 1.0746.8697 1.9453 1.945 1.9453z"}))}var Yv=fr(xt),zz={activeStyle:{background:"#333333"},icon:Vz,style:{background:"#000000",color:"#FFFFFF"},text:"Log in with TikTok"},Gz=Lr(zz);function Vz({size:e,color:t}){return Yv.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,fill:t,viewBox:"0 0 512 512"},Yv.default.createElement("path",{d:"M412.19 118.66a109.27 109.27 0 01-9.45-5.5 132.87 132.87 0 01-24.27-20.62c-18.1-20.71-24.86-41.72-27.35-56.43h.1C349.14 23.9 350 16 350.13 16h-82.44v318.78c0 4.28 0 8.51-.18 12.69 0 .52-.05 1-.08 1.56 0 .23 0 .47-.05.71v.18a70 70 0 01-35.22 55.56 68.8 68.8 0 01-34.11 9c-38.41 0-69.54-31.32-69.54-70s31.13-70 69.54-70a68.9 68.9 0 0121.41 3.39l.1-83.94a153.14 153.14 0 00-118 34.52 161.79 161.79 0 00-35.3 43.53c-3.48 6-16.61 30.11-18.2 69.24-1 22.21 5.67 45.22 8.85 54.73v.2c2 5.6 9.75 24.71 22.38 40.82A167.53 167.53 0 00115 470.66v-.2l.2.2c39.91 27.12 84.16 25.34 84.16 25.34 7.66-.31 33.32 0 62.46-13.81 32.32-15.31 50.72-38.12 50.72-38.12a158.46 158.46 0 0027.64-45.93c7.46-19.61 9.95-43.13 9.95-52.53V176.49c1 .6 14.32 9.41 14.32 9.41s19.19 12.3 49.13 20.31c21.48 5.7 50.42 6.9 50.42 6.9v-81.84c-10.14 1.1-30.73-2.1-51.81-12.61z"}))}var ms=fr(xt),Wz={activeStyle:{background:"#eeeeee"},icon:Zz,style:{background:"#ffffff",color:"#333333"},text:"Log in with Metamask"},qz=Lr(Wz);function Zz({size:e}){return ms.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",x:"0",y:"0",version:"1.1",width:e,height:e,viewBox:"0 0 318.6 318.6",xmlSpace:"preserve"},ms.default.createElement("path",{fill:"#e2761b",stroke:"#e2761b",strokeLinecap:"round",strokeLinejoin:"round",d:"M274.1 35.5l-99.5 73.9L193 65.8z"}),ms.default.createElement("path",Ti({d:"M44.4 35.5l98.7 74.6-17.5-44.3zm193.9 171.3l-26.5 40.6 56.7 15.6 16.3-55.3zm-204.4.9L50.1 263l56.7-15.6-26.5-40.6z"},Jv)),ms.default.createElement("path",Ti({d:"M103.6 138.2l-15.8 23.9 56.3 2.5-2-60.5zm111.3 0l-39-34.8-1.3 61.2 56.2-2.5zM106.8 247.4l33.8-16.5-29.2-22.8zm71.1-16.5l33.9 16.5-4.7-39.3z"},Jv)),ms.default.createElement("path",{fill:"#d7c1b3",stroke:"#d7c1b3",strokeLinecap:"round",strokeLinejoin:"round",d:"M211.8 247.4l-33.9-16.5 2.7 22.1-.3 9.3zm-105 0l31.5 14.9-.2-9.3 2.5-22.1z"}),ms.default.createElement("path",{fill:"#233447",stroke:"#233447",strokeLinecap:"round",strokeLinejoin:"round",d:"M138.8 193.5l-28.2-8.3 19.9-9.1zm40.9 0l8.3-17.4 20 9.1z"}),ms.default.createElement("path",{fill:"#cd6116",stroke:"#cd6116",strokeLinecap:"round",strokeLinejoin:"round",d:"M106.8 247.4l4.8-40.6-31.3.9zM207 206.8l4.8 40.6 26.5-39.7zm23.8-44.7l-56.2 2.5 5.2 28.9 8.3-17.4 20 9.1zm-120.2 23.1l20-9.1 8.2 17.4 5.3-28.9-56.3-2.5z"}),ms.default.createElement("path",{fill:"#e4751f",stroke:"#e4751f",strokeLinecap:"round",strokeLinejoin:"round",d:"M87.8 162.1l23.6 46-.8-22.9zm120.3 23.1l-1 22.9 23.7-46zm-64-20.6l-5.3 28.9 6.6 34.1 1.5-44.9zm30.5 0l-2.7 18 1.2 45 6.7-34.1z"}),ms.default.createElement("path",Ti({d:"M179.8 193.5l-6.7 34.1 4.8 3.3 29.2-22.8 1-22.9zm-69.2-8.3l.8 22.9 29.2 22.8 4.8-3.3-6.6-34.1z"},Xv)),ms.default.createElement("path",{fill:"#c0ad9e",stroke:"#c0ad9e",strokeLinecap:"round",strokeLinejoin:"round",d:"M180.3 262.3l.3-9.3-2.5-2.2h-37.7l-2.3 2.2.2 9.3-31.5-14.9 11 9 22.3 15.5h38.3l22.4-15.5 11-9z"}),ms.default.createElement("path",{fill:"#161616",stroke:"#161616",strokeLinecap:"round",strokeLinejoin:"round",d:"M177.9 230.9l-4.8-3.3h-27.7l-4.8 3.3-2.5 22.1 2.3-2.2h37.7l2.5 2.2z"}),ms.default.createElement("path",{fill:"#763d16",stroke:"#763d16",strokeLinecap:"round",strokeLinejoin:"round",d:"M278.3 114.2l8.5-40.8-12.7-37.9-96.2 71.4 37 31.3 52.3 15.3 11.6-13.5-5-3.6 8-7.3-6.2-4.8 8-6.1zM31.8 73.4l8.5 40.8-5.4 4 8 6.1-6.1 4.8 8 7.3-5 3.6 11.5 13.5 52.3-15.3 37-31.3-96.2-71.4z"}),ms.default.createElement("path",Ti({d:"M267.2 153.5l-52.3-15.3 15.9 23.9-23.7 46 31.2-.4h46.5zm-163.6-15.3l-52.3 15.3-17.4 54.2h46.4l31.1.4-23.6-46zm71 26.4l3.3-57.7 15.2-41.1h-67.5l15 41.1 3.5 57.7 1.2 18.2.1 44.8h27.7l.2-44.8z"},Xv)))}var Jv={fill:"#e4761b",stroke:"#e4761b",strokeLinecap:"round",strokeLinejoin:"round"},Xv={fill:"#f6851b",stroke:"#f6851b",strokeLinecap:"round",strokeLinejoin:"round"},eE=fr(xt),Qz={icon:Yz,style:{background:"#fc6d26"},activeStyle:{background:"#d55a1c"},text:"Log in with Gitlab"},Kz=Lr(Qz);function Yz({size:e,color:t}){return eE.default.createElement("svg",{fill:t,role:"img",viewBox:"0 0 24 24",width:e,height:e,xmlns:"http://www.w3.org/2000/svg"},eE.default.createElement("path",{d:"M21.94 13.11L20.89 9.89C20.89 9.86 20.88 9.83 20.87 9.8L18.76 3.32C18.65 3 18.33 2.75 17.96 2.75C17.6 2.75 17.28 3 17.17 3.33L15.17 9.5H8.84L6.83 3.33C6.72 3 6.4 2.75 6.04 2.75H6.04C5.67 2.75 5.35 3 5.24 3.33L3.13 9.82C3.13 9.82 3.13 9.83 3.13 9.83L2.06 13.11C1.9 13.61 2.07 14.15 2.5 14.45L11.72 21.16C11.89 21.28 12.11 21.28 12.28 21.15L21.5 14.45C21.93 14.15 22.1 13.61 21.94 13.11M8.15 10.45L10.72 18.36L4.55 10.45M13.28 18.37L15.75 10.78L15.85 10.45H19.46L13.87 17.61M17.97 3.94L19.78 9.5H16.16M14.86 10.45L13.07 15.96L12 19.24L9.14 10.45M6.03 3.94L7.84 9.5H4.23M3.05 13.69C2.96 13.62 2.92 13.5 2.96 13.4L3.75 10.97L9.57 18.42M20.95 13.69L14.44 18.42L14.46 18.39L20.25 10.97L21.04 13.4C21.08 13.5 21.04 13.62 20.95 13.69"}))}var tE=fr(xt),Jz={activeStyle:{background:"#282e36"},icon:eG,style:{background:"#0f1419"},text:"Log in with X"},Xz=Lr(Jz);function eG({size:e,color:t}){return tE.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24"},tE.default.createElement("path",{fill:t,d:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"}))}function tG({width:e=24,height:t=24,color:n}){return Ae.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",height:"48",width:"32",viewBox:"-18.15 -35.9725 157.3 215.835",children:[Ae.jsx("path",{fill:"#faab07",d:"M60.503 142.237c-12.533 0-24.038-4.195-31.445-10.46-3.762 1.124-8.574 2.932-11.61 5.175-2.6 1.918-2.275 3.874-1.807 4.663 2.056 3.47 35.273 2.216 44.862 1.136zm0 0c12.535 0 24.039-4.195 31.447-10.46 3.76 1.124 8.573 2.932 11.61 5.175 2.598 1.918 2.274 3.874 1.805 4.663-2.056 3.47-35.272 2.216-44.862 1.136zm0 0"}),Ae.jsx("path",{d:"M60.576 67.119c20.698-.14 37.286-4.147 42.907-5.683 1.34-.367 2.056-1.024 2.056-1.024.005-.189.085-3.37.085-5.01C105.624 27.768 92.58.001 60.5 0 28.42.001 15.375 27.769 15.375 55.401c0 1.642.08 4.822.086 5.01 0 0 .583.615 1.65.913 5.19 1.444 22.09 5.65 43.312 5.795zm56.245 23.02c-1.283-4.129-3.034-8.944-4.808-13.568 0 0-1.02-.126-1.537.023-15.913 4.623-35.202 7.57-49.9 7.392h-.153c-14.616.175-33.774-2.737-49.634-7.315-.606-.175-1.802-.1-1.802-.1-1.774 4.624-3.525 9.44-4.808 13.568-6.119 19.69-4.136 27.838-2.627 28.02 3.239.392 12.606-14.821 12.606-14.821 0 15.459 13.957 39.195 45.918 39.413h.848c31.96-.218 45.917-23.954 45.917-39.413 0 0 9.368 15.213 12.607 14.822 1.508-.183 3.491-8.332-2.627-28.021"}),Ae.jsx("path",{fill:"#fff",d:"M49.085 40.824c-4.352.197-8.07-4.76-8.304-11.063-.236-6.305 3.098-11.576 7.45-11.773 4.347-.195 8.064 4.76 8.3 11.065.238 6.306-3.097 11.577-7.446 11.771m31.133-11.063c-.233 6.302-3.951 11.26-8.303 11.063-4.35-.195-7.684-5.465-7.446-11.77.236-6.305 3.952-11.26 8.3-11.066 4.352.197 7.686 5.468 7.449 11.773"}),Ae.jsx("path",{fill:"#faab07",d:"M87.952 49.725C86.79 47.15 75.077 44.28 60.578 44.28h-.156c-14.5 0-26.212 2.87-27.375 5.446a.863.863 0 00-.085.367.88.88 0 00.16.496c.98 1.427 13.985 8.487 27.3 8.487h.156c13.314 0 26.319-7.058 27.299-8.487a.873.873 0 00.16-.498.856.856 0 00-.085-.365"}),Ae.jsx("path",{d:"M54.434 29.854c.199 2.49-1.167 4.702-3.046 4.943-1.883.242-3.568-1.58-3.768-4.07-.197-2.492 1.167-4.704 3.043-4.944 1.886-.244 3.574 1.58 3.771 4.07m11.956.833c.385-.689 3.004-4.312 8.427-2.993 1.425.347 2.084.857 2.223 1.057.205.296.262.718.053 1.286-.412 1.126-1.263 1.095-1.734.875-.305-.142-4.082-2.66-7.562 1.097-.24.257-.668.346-1.073.04-.407-.308-.574-.93-.334-1.362"}),Ae.jsx("path",{fill:"#fff",d:"M60.576 83.08h-.153c-9.996.12-22.116-1.204-33.854-3.518-1.004 5.818-1.61 13.132-1.09 21.853 1.316 22.043 14.407 35.9 34.614 36.1h.82c20.208-.2 33.298-14.057 34.616-36.1.52-8.723-.087-16.035-1.092-21.854-11.739 2.315-23.862 3.64-33.86 3.518"}),Ae.jsx("path",{fill:"#eb1923",d:"M32.102 81.235v21.693s9.937 2.004 19.893.616V83.535c-6.307-.357-13.109-1.152-19.893-2.3"}),Ae.jsx("path",{fill:"#eb1923",d:"M105.539 60.412s-19.33 6.102-44.963 6.275h-.153c-25.591-.172-44.896-6.255-44.962-6.275L8.987 76.57c16.193 4.882 36.261 8.028 51.436 7.845h.153c15.175.183 35.242-2.963 51.437-7.845zm0 0"})]})}const nG={text:"Sign in with QQ",icon:tG,iconFormat:e=>`fa fa-${e}`,style:{background:"rgb(94,188,249)"},activeStyle:{background:"rgb(76,143,208)"}},rG=er.createButton(nG);function iG({width:e=24,height:t=24,color:n}){return Ae.jsx("img",{src:`${Xe}/buttons/facebook.svg`,alt:"Sign in with Facebook"})}const sG={text:"Sign in with Facebook",icon:iG,iconFormat:e=>`fa fa-${e}`,style:{background:"#3b5998"},activeStyle:{background:"#2b3f65"}},oG=er.createButton(sG);function aG({width:e=24,height:t=24,color:n}){return Ae.jsx("img",{src:`${Xe}/buttons/weibo.svg`,alt:"Sign in with Weibo"})}const cG={text:"Sign in with Weibo",icon:aG,iconFormat:e=>`fa fa-${e}`,style:{background:"#e62329"},activeStyle:{background:"#e54329"}},lG=er.createButton(cG);function uG({width:e=24,height:t=24,color:n}){return Ae.jsx("img",{src:`${Xe}/buttons/gitee.svg`,alt:"Sign in with Gitee"})}const fG={text:"Sign in with Gitee",icon:uG,iconFormat:e=>`fa fa-${e}`,style:{background:"rgb(199,29,35)"},activeStyle:{background:"rgb(147,22,26)"}},dG=er.createButton(fG);function hG({width:e=24,height:t=24,color:n}){return Ae.jsx("img",{src:`${Xe}/buttons/wechat.svg`,alt:"Sign in with Wechat"})}const pG={text:"Sign in with Wechat",icon:hG,iconFormat:e=>`fa fa-${e}`,style:{background:"rgb(0,194,80)"},activeStyle:{background:"rgb(0,158,64)"}},mG=er.createButton(pG);function gG({width:e=24,height:t=24,color:n}){return Ae.jsx("img",{src:`${Xe}/buttons/dingtalk.svg`,alt:"Sign in with DingTalk"})}const bG={text:"Sign in with DingTalk",icon:gG,iconFormat:e=>`fa fa-${e}`,style:{background:"#0191e0"},activeStyle:{background:"rgb(76,143,208)"}},yG=er.createButton(bG);function wG({width:e=24,height:t=24,color:n}){return Ae.jsx("img",{src:`${Xe}/buttons/linkedin.svg`,alt:"Sign in with LinkedIn"})}const vG={text:"Sign in with LinkedIn",icon:wG,iconFormat:e=>`fa fa-${e}`,style:{background:"rgb(255,255,255)",color:"#000000"},activeStyle:{background:"rgb(240,240,250)"}},EG=er.createButton(vG);function xG({width:e=24,height:t=24,color:n}){return Ae.jsx("img",{src:`${Xe}/buttons/wecom.svg`,alt:"Sign in with WeCom"})}const AG={text:"Sign in with WeCom",icon:xG,iconFormat:e=>`fa fa-${e}`,style:{background:"rgb(255,255,255)",color:"#000000"},activeStyle:{background:"rgb(100,150,250)"}},_G=er.createButton(AG);function CG({width:e=24,height:t=24,color:n}){return Ae.jsx("img",{src:`${Xe}/buttons/lark.svg`,alt:"Sign in with Lark",style:{width:24,height:24}})}const SG={text:"Sign in with Lark",icon:CG,iconFormat:e=>`fa fa-${e}`,style:{background:"#ffffff",color:"#000000"},activeStyle:{background:"#ededee"}},kG=er.createButton(SG);function IG({width:e=24,height:t=24,color:n}){return Ae.jsx("img",{src:`${Xe}/buttons/gitlab.svg`,alt:"Sign in with GitLab",style:{width:24,height:24}})}const TG={text:"Sign in with GitLab",icon:IG,iconFormat:e=>`fa fa-${e}`,style:{background:"rgb(255,255,255)",color:"#000000"},activeStyle:{background:"rgb(100,150,250)"}},BG=er.createButton(TG);function PG({width:e=24,height:t=24,color:n}){return Ae.jsx("img",{src:`${Xe}/buttons/adfs.svg`,alt:"Sign in with ADFS",style:{width:24,height:24}})}const OG={text:"Sign in with ADFS",icon:PG,iconFormat:e=>`fa fa-${e}`,style:{background:"#ffffff",color:"#000000"},activeStyle:{background:"#ededee"}},MG=er.createButton(OG);function LG({width:e=24,height:t=24,color:n}){return Ae.jsx("img",{src:`${Xe}/buttons/casdoor.svg`,alt:"Sign in with Casdoor",style:{width:24,height:24}})}const RG={text:"Sign in with Casdoor",icon:LG,iconFormat:e=>`fa fa-${e}`,style:{background:"#ffffff",color:"#000000"},activeStyle:{background:"#ededee"}},jG=er.createButton(RG);function NG({width:e=24,height:t=24,color:n}){return Ae.jsx("img",{src:`${Xe}/buttons/baidu.svg`,alt:"Sign in with Baidu",style:{width:24,height:24}})}const $G={text:"Sign in with Baidu",icon:NG,iconFormat:e=>`fa fa-${e}`,style:{background:"#ffffff",color:"#000000"},activeStyle:{background:"#ededee"}},FG=er.createButton($G);function DG({width:e=24,height:t=24,color:n}){return Ae.jsx("img",{src:`${Xe}/buttons/alipay.svg`,alt:"Sign in with Alipay",style:{width:24,height:24}})}const UG={text:"Sign in with Alipay",icon:DG,iconFormat:e=>`fa fa-${e}`,style:{background:"#ffffff",color:"#000000"},activeStyle:{background:"#ededee"}},HG=er.createButton(UG);function zG({width:e=24,height:t=24,color:n}){return Ae.jsx("img",{src:`${Xe}/buttons/infoflow.svg`,alt:"Sign in with Infoflow",style:{width:24,height:24}})}const GG={text:"Sign in with Infoflow",icon:zG,iconFormat:e=>`fa fa-${e}`,style:{background:"#ffffff",color:"#000000"},activeStyle:{background:"#ededee"}},VG=er.createButton(GG);function WG({width:e=24,height:t=24,color:n}){return Ae.jsx("img",{src:`${Xe}/buttons/apple.svg`,alt:"Sign in with Apple",style:{width:24,height:24}})}const qG={text:"Sign in with Apple",icon:WG,iconFormat:e=>`fa fa-${e}`,style:{background:"#ffffff",color:"#000000"},activeStyle:{background:"#ededee"}},ZG=er.createButton(qG);function QG({width:e=24,height:t=24,color:n}){return Ae.jsx("img",{src:`${Xe}/buttons/azuread.svg`,alt:"Sign in with Azure AD",style:{width:24,height:24}})}const KG={text:"Sign in with Azure AD",icon:QG,iconFormat:e=>`fa fa-${e}`,style:{background:"#ffffff",color:"#000000"},activeStyle:{background:"#ededee"}},YG=er.createButton(KG);function JG({width:e=24,height:t=24,color:n}){return Ae.jsx("img",{src:`${Xe}/buttons/azuread.svg`,alt:"Sign in with Azure AD B2C",style:{width:24,height:24}})}const XG={text:"Sign in with Azure AD B2C",icon:JG,iconFormat:e=>`fa fa-${e}`,style:{background:"#ffffff",color:"#000000"},activeStyle:{background:"#ededee"}},eV=er.createButton(XG);function tV({width:e=24,height:t=24,color:n}){return Ae.jsx("img",{src:`${Xe}/buttons/slack.svg`,alt:"Sign in with Slack",style:{width:24,height:24}})}const nV={text:"Sign in with Slack",icon:tV,iconFormat:e=>`fa fa-${e}`,style:{background:"#ffffff",color:"#000000"},activeStyle:{background:"#ededee"}},rV=er.createButton(nV);function iV({width:e=24,height:t=24,color:n}){return Ae.jsx("img",{src:`${Xe}/buttons/steam.svg`,alt:"Sign in with Steam",style:{width:24,height:24}})}const sV={text:"Sign in with Steam",icon:iV,iconFormat:e=>`fa fa-${e}`,style:{background:"#ffffff",color:"#000000"},activeStyle:{background:"#ededee"}},oV=er.createButton(sV);function aV({width:e=24,height:t=24,color:n}){return Ae.jsx("img",{src:`${Xe}/buttons/bilibili.svg`,alt:"Sign in with Bilibili"})}const cV={text:"Sign in with Bilibili",icon:aV,iconFormat:e=>`fa fa-${e}`,style:{background:"#0191e0"},activeStyle:{background:"rgb(76,143,208)"}},lV=er.createButton(cV);function uV({width:e=24,height:t=24,color:n}){return Ae.jsx("img",{src:`${Xe}/buttons/okta.svg`,alt:"Sign in with Okta",style:{width:24,height:24}})}const fV={text:"Sign in with Okta",icon:uV,iconFormat:e=>`fa fa-${e}`,style:{background:"#ffffff",color:"#000000"},activeStyle:{background:"#ededee"}},dV=er.createButton(fV);function hV({width:e=24,height:t=24,color:n}){return Ae.jsx("img",{src:`${Xe}/buttons/douyin.svg`,alt:"Sign in with Douyin",style:{width:24,height:24}})}const pV={text:"Sign in with Douyin",icon:hV,iconFormat:e=>`fa fa-${e}`,style:{background:"#ffffff",color:"#000000"},activeStyle:{background:"#ededee"}},mV=er.createButton(pV);function gV({type:e,logoUrl:t,align:n="center",style:r={background:"#ffffff",color:"#000000"},activeStyle:i={background:"#ededee"}}){function s({width:l=24,height:f=24,color:u}){return Ae.jsx("img",{src:t,alt:`Sign in with ${e}`,style:{width:l,height:f}})}const o={text:`Sign in with ${e}`,icon:s,style:r,activeStyle:i},a=er.createButton(o),c=ss.t("login:Sign in with {type}").replace("{type}",e);return Ae.jsx(a,{text:c,align:n})}function M3(e){const t=ss.t("login:Sign in with {type}").replace("{type}",e.displayName!==""?e.displayName:e.type);return e.type==="GitHub"?Ae.jsx(er.GithubLoginButton,{text:t,align:"center"}):e.type==="Google"?Ae.jsx(er.GoogleLoginButton,{text:t,align:"center"}):e.type==="QQ"?Ae.jsx(rG,{text:t,align:"center"}):e.type==="Facebook"?Ae.jsx(oG,{text:t,align:"center"}):e.type==="Weibo"?Ae.jsx(lG,{text:t,align:"center"}):e.type==="Gitee"?Ae.jsx(dG,{text:t,align:"center"}):e.type==="WeChat"?Ae.jsx(mG,{text:t,align:"center"}):e.type==="DingTalk"?Ae.jsx(yG,{text:t,align:"center"}):e.type==="LinkedIn"?Ae.jsx(EG,{text:t,align:"center"}):e.type==="WeCom"?Ae.jsx(_G,{text:t,align:"center"}):e.type==="Lark"?Ae.jsx(kG,{text:t,align:"center"}):e.type==="GitLab"?Ae.jsx(BG,{text:t,align:"center"}):e.type==="ADFS"?Ae.jsx(MG,{text:t,align:"center"}):e.type==="Casdoor"?Ae.jsx(jG,{text:t,align:"center"}):e.type==="Baidu"?Ae.jsx(FG,{text:t,align:"center"}):e.type==="Alipay"?Ae.jsx(HG,{text:t,align:"center"}):e.type==="Infoflow"?Ae.jsx(VG,{text:t,align:"center"}):e.type==="Apple"?Ae.jsx(ZG,{text:t,align:"center"}):e.type==="AzureAD"?Ae.jsx(YG,{text:t,align:"center"}):e.type==="AzureADB2C"?Ae.jsx(eV,{text:t,align:"center"}):e.type==="Slack"?Ae.jsx(rV,{text:t,align:"center"}):e.type==="Steam"?Ae.jsx(oV,{text:t,align:"center"}):e.type==="Bilibili"?Ae.jsx(lV,{text:t,align:"center"}):e.type==="Okta"?Ae.jsx(dV,{text:t,align:"center"}):e.type==="Douyin"?Ae.jsx(mV,{text:t,align:"center"}):Ae.jsx(gV,{type:e.type,logoUrl:pl(e)},e.type)}function L3(e,t){const n=new URLSearchParams(t.search),r=n.get("client_id")??"",i=n.get("state"),s=n.get("redirect_uri"),o=`${window.location.origin}/callback/saml`,a=e.name,c=`${r}&${i}&${a}&${s}&${o}`;AH(`${e.owner}/${a}`,btoa(c)).then(l=>{l.data2==="POST"?document.write(l.data):window.location.href=l.data})}function nE(e,t,n){t.type==="MetaMask"?Promise.resolve().then(()=>WP).then(r=>{const i=r.authViaMetaMask;i(e,t,n)}):t.type==="Web3Onboard"&&Promise.resolve().then(()=>WP).then(r=>{const i=r.authViaWeb3Onboard;i(e,t,n)})}function bV(e,t,n,r,i,s){if(i==="small"){if(e.category==="OAuth")return e.type==="WeChat"&&e.clientId2!==""&&e.clientSecret2!==""&&e.disableSsl===!0&&!navigator.userAgent.includes("MicroMessenger")?Ae.jsx("a",{children:Ae.jsx("img",{width:n,height:n,src:pl(e),alt:e.displayName,className:"provider-img",style:{margin:r},onClick:()=>{IH(t,e,"signup")}})},e.displayName):Ae.jsx("a",{href:(void 0)(t,e,"signup"),children:Ae.jsx("img",{width:n,height:n,src:pl(e),alt:e.displayName,className:"provider-img",style:{margin:r}})},e.displayName);if(e.category==="SAML")return Ae.jsx("a",{onClick:()=>L3(e,s),children:Ae.jsx("img",{width:n,height:n,src:pl(e),alt:e.displayName,className:"provider-img",style:{margin:r}})},e.displayName);if(e.category==="Web3")return Ae.jsx("a",{onClick:()=>nE(t,e,"signup"),children:Ae.jsx("img",{width:n,height:n,src:pl(e),alt:e.displayName,className:"provider-img",style:{margin:r}})},e.displayName)}else if(e.type==="Custom"){const o=ss.t("login:Sign in with {type}").replace("{type}",e.displayName),a={display:"block",height:"55px",color:"#000"},c={display:"flex",alignItems:"center",width:"calc(100% - 10px)",height:"50px",margin:"5px",padding:"0 10px",backgroundColor:"transparent",boxShadow:"0px 1px 3px rgba(0,0,0,0.5)",border:"0px",borderRadius:"3px",cursor:"pointer"},l={justfyContent:"space-between"},f={textAlign:"center",width:"100%",fontSize:"19px"};if(e.category==="OAuth")return Ae.jsx("a",{href:(void 0)(t,e,"signup"),style:a,children:Ae.jsxs("div",{style:c,children:[Ae.jsx("img",{width:26,src:pl(e),alt:e.displayName,className:"provider-img",style:l}),Ae.jsx("span",{style:f,children:o})]})},e.displayName);if(e.category==="SAML")return Ae.jsx("a",{onClick:()=>L3(e,s),style:a,children:Ae.jsxs("div",{style:c,children:[Ae.jsx("img",{width:26,src:pl(e),alt:e.displayName,className:"provider-img",style:l}),Ae.jsx("span",{style:f,children:o})]})},e.displayName)}else return e.category==="SAML"?Ae.jsx("div",{className:"provider-big-img",children:Ae.jsx("a",{onClick:()=>L3(e,s),children:M3(e)})},e.displayName):e.category==="Web3"?Ae.jsx("div",{className:"provider-big-img",children:Ae.jsx("a",{onClick:()=>nE(t,e,"signup"),children:M3(e)})},e.displayName):Ae.jsx("div",{className:"provider-big-img",children:Ae.jsx("a",{href:(void 0)(t,e,"signup"),children:M3(e)})},e.displayName)}function yV(e){return e.length<6?ss.t("user:The password must have at least 6 characters"):""}function wV(e){return e.length<8?ss.t("user:The password must have at least 8 characters"):""}function vV(e){return/^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9]).+$/.test(e)?"":ss.t("user:The password must contain at least one uppercase letter, one lowercase letter and one digit")}function EV(e){return/^(?=.*[!-/:-@[-`{-~]).+$/.test(e)?"":ss.t("user:The password must contain at least one special character")}function xV(e){return/(.)\1+/.test(e)?ss.t("user:The password must not contain any repeated characters"):""}function AV(e,t){if(e.length===0)return ss.t("login:Please input your password!");(!t||t.length===0)&&(t=["AtLeast6"]);const n={AtLeast6:yV,AtLeast8:wV,Aa123:vV,SpecialChar:EV,NoRepeat:xV};for(const r of t){const i=n[r];if(i){const s=i(e);if(s!=="")return s}}return""}function _V({application:e,state:t,setState:n}){const[r,i]=xt.useState(!1),s=xt.useRef(null);xt.useEffect(()=>{s.current||(s.current=document.getElementById("agreementDialog"))},[]),xt.useEffect(()=>{s.current&&(r?s.current.showModal():s.current.close())},[r]);const o=()=>{n({...t,agreement:!1}),i(!1)},a=()=>{n({...t,agreement:!0}),i(!1)},c=()=>{i(!0)};return Ae.jsxs(Ae.Fragment,{children:[Ae.jsx("dialog",{id:"agreementDialog",className:"modal",children:Ae.jsxs("div",{className:"modal-box",children:[Ae.jsx("div",{className:"mt-4 mb-8",children:Ae.jsx("iframe",{src:e.termsOfUse,width:"100%",height:"300px",sandbox:"allow-scripts"})}),Ae.jsxs("div",{className:"modal-action",children:[Ae.jsx("form",{method:"dialog",className:"modal-backdrop",children:Ae.jsx("button",{children:"Close"})}),Ae.jsxs("form",{method:"dialog",className:"flex gap-3",children:[Ae.jsx("button",{className:"btn",onClick:o,children:"Cancel"},"closebtn"),Ae.jsx("button",{className:"btn btn-primary",onClick:a,children:"OK"},"okbtn")]})]})]})}),Ae.jsx("input",{checked:!!t.agreement,type:"checkbox",readOnly:!0}),Ae.jsx("button",{onClick:c,children:"Open Terms"})]})}function no({label:e,name:t,rules:n,inputEl:r,setFieldValue:i,onChange:s,...o}){return Ae.jsxs("label",{className:"form-control w-full max-w-xs",htmlFor:t,children:[Ae.jsx("div",{className:"label",children:Ae.jsx("span",{className:"label-text",children:e})}),r||Ae.jsx("input",{type:"text",...o,name:t,className:"input input-bordered w-full max-w-xs",onChange:a=>{i(t,a.target.value),s==null||s(a)}}),Ae.jsx("div",{className:"label flex-col",children:n==null?void 0:n.map((a,c)=>Ae.jsx("span",{className:"label-text-alt",children:a.message},t+c))})]})}const CV=(e,t)=>(delete e.applicationName,delete e.emailOrPhoneMode,delete e.isTermsOfUseVisible,{application:t.name,organization:t.organization,plan:null,pricing:null,...e}),SV=(e,t,n)=>{e.preventDefault();const r=CV(t,n);console.log(r),vH(r).then(i=>{i.status==="ok"?(r.username=i.data.split("/")[1],n&&bH(n)?wH("").then(s=>{let o=null;s.status==="ok"?(o=s.data,o.organization=s.data2,console.log("account",o),alert("redirect")):$i("error",`Failed to sign in: ${s.msg}`)}):alert("redirect")):$i("error",i.msg)})};function kV(e,t,n,r,i){if(!t.visible)return null;const s=(a,c)=>{n[a]=c,r(n)},o=t.required;if(t.name==="Username")return Ae.jsx(no,{name:"username",className:"signup-username",label:t.label?t.label:i("signup.username"),rules:[{required:o,message:i("forget.username"),whitespace:!0}],placeholder:t.placeholder,disabled:n.invitation!==void 0&&n.invitation.username!=="",setFieldValue:s});if(t.name==="Display name")return t.rule==="First, last"&&oH()!=="zh"?Ae.jsxs(xt.Fragment,{children:[Ae.jsx(no,{name:"firstName",className:"signup-first-name",label:t.label?t.label:i("general.firstName"),rules:[{required:o,message:i("forget.firstName"),whitespace:!0}],placeholder:t.placeholder,setFieldValue:s}),Ae.jsx(no,{name:"lastName",className:"signup-last-name",label:t.label?t.label:i("general.lastName"),rules:[{required:o,message:i("forget.lastName"),whitespace:!0}],placeholder:t.placeholder,setFieldValue:s})]}):Ae.jsx(no,{name:"name",className:"signup-name",label:t.label?t.label:t.rule==="Real name"||t.rule==="First, last"?i("general.realName"):i("general.displayName"),rules:[{required:o,message:t.rule==="Real name"||t.rule==="First, last"?i("forget.realName"):i("forget.displayName"),whitespace:!0}],placeholder:t.placeholder,setFieldValue:s});if(t.name==="Affiliation")return Ae.jsx(no,{name:"affiliation",className:"signup-affiliation",label:t.label?t.label:i("user.affiliation"),rules:[{required:o,message:i("forget.affiliation"),whitespace:!0}],placeholder:t.placeholder,setFieldValue:s});if(t.name==="ID card")return Ae.jsx(no,{name:"idCard",className:"signup-idcard",label:t.label?t.label:i("user.idCard"),rules:[{required:o,message:i("forget.idCard"),whitespace:!0},{required:o,pattern:new RegExp(/^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9X]$/,"g"),message:i("format.idCard")}],placeholder:t.placeholder,setFieldValue:s});if(t.name==="Email"||t.name==="Phone"||t.name==="Email or Phone"||t.name==="Phone or Email"){const a=()=>Ae.jsxs(xt.Fragment,{children:[Ae.jsx(no,{name:"email",label:t.label?t.label:i("general.email"),rules:[{required:o,message:i("forget.email")}],placeholder:t.placeholder,disabled:n.invitation!==void 0&&n.invitation.email!=="",onChange:l=>{const f=l.target.value;console.log("email",f,Ov(f)),f!==""&&!Ov(f)?r({...n,email:f,validEmail:!1}):r({...n,email:f,validEmail:!0})},setFieldValue:s}),t.rule!=="No verification"&&Ae.jsx(no,{name:"emailCode",className:"signup-email-code",label:t.label?t.label:i("code.email"),rules:[{required:o,message:i("forget.code")}],inputEl:Ae.jsx(PH,{disabled:!n.validEmail,method:"signup",onButtonClickArgs:[n.email,"email",e.name],application:e,countryCode:"US",onChange:l=>r({...n,emailCode:l})}),setFieldValue:s})]}),c=()=>Ae.jsx(Ae.Fragment,{});if(t.name==="Email")return a();if(t.name==="Phone")return c();if(t.name==="Email or Phone"||t.name==="Phone or Email"){let l=n.emailOrPhoneMode;return l===""&&(l=t.name==="Email or Phone"?"Email":"Phone"),Ae.jsxs(xt.Fragment,{children:[Ae.jsx("div",{style:{marginTop:"30px",marginBottom:"20px"}}),l==="Email"?a():c()]})}else return null}else{if(t.name==="Password")return Ae.jsx(no,{name:"password",className:"signup-password",label:t.label?t.label:i("general.password"),rules:[{required:o,validateTrigger:"onChange",validator:(a,c)=>{const l=AV(c,e.organizationObj.passwordOptions);return l===""?Promise.resolve():Promise.reject(l)}}],setFieldValue:s,type:"password",placeholder:t.placeholder});if(t.name==="Confirm password")return Ae.jsx(no,{name:"confirm",className:"signup-confirm",label:t.label?t.label:i("signup.confirm"),rules:[{required:o,message:i("forget.confirm")}],type:"password",placeholder:t.placeholder,setFieldValue:s});if(t.name==="Invitation code")return Ae.jsx(no,{name:"invitationCode",className:"signup-invitation-code",label:t.label?t.label:i("application.invitationCode"),rules:[{required:o,message:i("forget.invitationCode")}],placeholder:t.placeholder,disabled:n.invitation!==void 0&&n.invitation!=="",setFieldValue:s});if(t.name==="Agreement")return Ae.jsx(_V,{state:n,setState:r,application:e});if(t.name.startsWith("Text "))return Ae.jsx("div",{dangerouslySetInnerHTML:{__html:t.label}});if(t.name==="Signup button")return Ae.jsxs("form",{onSubmit:a=>SV(a,n,e),children:[Ae.jsx("button",{className:"btn btn-primary",type:"submit",children:i("signup.signUp")}),"  ",i("signup.haveAccount")," ",Ae.jsx("a",{className:"signup-link",onClick:()=>{const a=sessionStorage.getItem("signinUrl");alert("redirect")},children:i("signup.signInNow")})]});if(t.name==="Providers"&&e.providers){const a=hH(e)||pH(e)||mH(e)||gH(e);return(t.rule==="None"||t.rule==="")&&(t.rule=a?"small":"big"),e.providers.filter(c=>Pv(c)).map(c=>bV(c.provider,e,null,null,t.rule,{search:window.location.search}))}}return t.name}const IV={translation:{signup:{username:"Username",confirm:"Confirm password",signInNow:"Sign In Now",signUp:"Sign Up",haveAccount:"Have account?"},forget:{username:"Please input your username.",firstName:"Please input your first name.",lastName:"Please input your last name.",realName:"Please input your real name.",displayName:"Please input your display name.",affliation:"Please input your affliation.",idCard:"Please input your ID card number.",code:"Please input your verification code.",email:"Please input your email.",confirm:"Please confirm your password and ensure it matches.",invitationCode:"Please input your invitation code."},format:{idCard:"The ID card number format is incorrect."},general:{firstName:"First name",lastName:"Last name",displayName:"Display name",realName:"Real name",email:"Email",password:"Password",captcha:"Captcha"},user:{affliation:"Affliation",idCard:"ID card"},code:{email:"Email code",sending:"Sending",sendCode:"Send code"},application:{invitationCode:"Invitation code"}}};ss.use(bu.initReactI18next).init({lng:"en",fallbackLng:"en",resources:{en:IV}});function TV(e,t,n){const r=Ae.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",className:"lucide lucide-eye",children:[Ae.jsx("path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z"}),Ae.jsx("circle",{cx:"12",cy:"12",r:"3"})]}),i=Ae.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",className:"lucide lucide-eye-off",children:[Ae.jsx("path",{d:"M9.88 9.88a3 3 0 1 0 4.24 4.24"}),Ae.jsx("path",{d:"M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68"}),Ae.jsx("path",{d:"M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61"}),Ae.jsx("line",{x1:"2",x2:"22",y1:"2",y2:"22"})]}),s=kh(e),o=ma(e);if(s==="password"){const a=t.password.state[o];return Ae.jsxs(n,{variant:"ghost",size:"icon",className:"absolute top-1/2 right-2 -translate-y-1/2",onClick:c=>{c.preventDefault(),c.stopPropagation(),t.password.setState({...t.password.state,[o]:!a})},children:[a?i:r,Ae.jsx("span",{className:"sr-only",children:"Toggle password visibility"})]})}else return null}function ma(e){const t={ID:"id",Username:"username","Display name":"name",Affiliation:"affiliation","ID card":"idCard",Email:"email",Phone:"phone",Password:"password","Confirm password":"confirm","Invitation code":"invitationCode","Country/Region":"country_region",Agreement:"agreement"};return Object.keys(t).includes(e.name)?t[e.name]:e.name}function kh(e,t){const n=["password","confirm"],r=ma(e);return n.includes(r)&&!(t!=null&&t.hidePassword[r])?"password":"text"}function BV(e){return Object.fromEntries(e.filter(t=>kh(t)==="password").map(t=>[ma(t),!1]))}function PV(e){return{name:ma(e),label:e.label||e.name,placeholder:e.placeholder,required:e.required,type:kh(e)}}function OV(e,t){const n=ma(t);let r=e.string();return n==="email"&&(r=r.email()),t.required||(r=r.optional()),r}function MV(e){const t=e.map(r=>[ma(r),""]),n=e.filter(r=>rE(r)).map(r=>[ma(r)+"Code",""]);return Object.fromEntries([...t,...n])}function rE(e){const t=ma(e);return(t==="email"||t==="phone")&&!["None","No verification"].includes(e.rule)}function LV(e){return e.visible===!0}function RV(e){var u;const{t,i18n:n}=bu.useTranslation(),[r,i]=xt.useState({applicationName:e.applicationName??null,email:"",phone:"",emailOrPhoneMode:"",countryCode:"",emailCode:"",phoneCode:"",validEmail:!1,validPhone:!1,region:"",isTermsOfUseVisible:!1,termsOfUseContent:""});xt.useRef();const s=d=>{d!==void 0&&C3("admin",d).then(h=>{if(h.status==="error"){$i("error",h.msg);return}l(h.data)})},o=d=>{Mv(d).then(h=>{if(h.status==="ok"){const p=h.data;l(p)}else l(null),i({...r,msg:h.msg})})},a=()=>e.application,c=(d,h)=>{Rv(d,h).then(p=>{if(p.status==="error"){$i("error",p.msg);return}i({...r,invitation:p.data})})},l=d=>{e.onUpdateApplication(d)};xt.useEffect(()=>{const d=Lv();if(d!==null){const h=window.location.pathname.replace("/signup/oauth/authorize","/login/oauth/authorize");sessionStorage.setItem("signinUrl",h+window.location.search)}if(a()===void 0)if(r.applicationName!==null){s(r.applicationName);const h=new URLSearchParams(window.location.search);if(h.has("invitationCode")){const p=h.get("invitationCode")??"";i({...r,invitationCode:p}),p!==""&&c(p,"admin/"+r.applicationName)}}else d!==null?o(d):($i("error",`Unknown application name: ${r.applicationName}`),l(null))},[]);const f=a();return f==null?null:(u=f.signupItems)==null?void 0:u.map((d,h)=>Ae.jsx("div",{children:kV(f,d,r,i,t)},h))}function jV({applicationName:e,casdoorApiRoot:t,springmicroApiRoot:n}){Jr.casdoor=t,n&&(Jr.springmicro=n);const[r,i]=xt.useState({application:null}),s=()=>{C3("admin",e).then(o=>{if(console.log(o),o.status==="error"){$i("error",o.msg);return}i({application:o.data})})};return xt.useEffect(()=>{s()},[]),r.application===void 0?Ae.jsx(Ae.Fragment,{}):Ae.jsx(bu.I18nextProvider,{i18n:ss,children:Ae.jsx(RV,{application:r.application,onUpdateApplication:o=>{i({application:o})}})})}const iE=xt.createContext(void 0);function NV({applicationName:e,casdoorApiRoot:t,springmicroApiRoot:n,children:r}){bu.useTranslation(),Jr.casdoor=t,n&&(Jr.springmicro=n);const[i,s]=xt.useState({application:null}),[o,a]=xt.useState({}),c=()=>{C3("admin",e).then(b=>{if(console.log(b),b.status==="error"){$i("error",b.msg);return}s({application:b.data})})},l=b=>{s({application:b})},f=(b,g)=>{Rv(b,g).then(y=>{if(y.status==="error"){$i("error",y.msg);return}s({...i,invitation:y.data})})},u=b=>{Mv(b).then(g=>{if(g.status==="ok"){const y=g.data;l(y)}else l(null),s({...i,msg:g.msg})})},d=(b,g)=>TV(b,{password:{state:o,setState:a}},g),h=b=>kh(b,{hidePassword:o}),p=jv,m=Nv;return xt.useEffect(()=>{c()},[]),xt.useEffect(()=>{i.application&&a(BV(i.application.signupItems))},[i.application]),xt.useEffect(()=>{const b=Lv();if(b!==null){const g=window.location.pathname.replace("/signup/oauth/authorize","/login/oauth/authorize");sessionStorage.setItem("signinUrl",g+window.location.search)}if(i.application===void 0)if(i.applicationName!==null){c();const g=new URLSearchParams(window.location.search);if(g.has("invitationCode")){const y=g.get("invitationCode")??"";s({...i,invitationCode:y}),y!==""&&f(y,"admin/"+i.applicationName)}}else b!==null?u(b):($i("error",`Unknown application name: ${i.applicationName}`),l(null))},[]),i.application===void 0||i.application===null?null:Ae.jsx(iE.Provider,{value:{application:i.application,getDefaultValues:MV,getFormProps:PV,icon:d,getZod:OV,getKey:ma,type:h,sendCode:p,requiresCode:rE,getCaptcha:m,isVisible:LV},children:r})}const $V=()=>{const e=xt.useContext(iE);if(!e)throw new Error("useSignUp must be used within a SignUpProvider");return e};let Ih;const FV=new Uint8Array(16);function DV(){if(!Ih&&(Ih=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ih))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ih(FV)}const wi=[];for(let e=0;e<256;++e)wi.push((e+256).toString(16).slice(1));function UV(e,t=0){return wi[e[t+0]]+wi[e[t+1]]+wi[e[t+2]]+wi[e[t+3]]+"-"+wi[e[t+4]]+wi[e[t+5]]+"-"+wi[e[t+6]]+wi[e[t+7]]+"-"+wi[e[t+8]]+wi[e[t+9]]+"-"+wi[e[t+10]]+wi[e[t+11]]+wi[e[t+12]]+wi[e[t+13]]+wi[e[t+14]]+wi[e[t+15]]}const sE={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function HV(e,t,n){if(sE.randomUUID&&!t&&!e)return sE.randomUUID();e=e||{};const r=e.random||(e.rng||DV)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,UV(r)}var R3={},cc={},Th={},Bh={},gl={},Ph={};Ph.byteLength=VV,Ph.toByteArray=qV,Ph.fromByteArray=KV;for(var So=[],Is=[],zV=typeof Uint8Array<"u"?Uint8Array:Array,j3="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",wu=0,GV=j3.length;wu<GV;++wu)So[wu]=j3[wu],Is[j3.charCodeAt(wu)]=wu;Is[45]=62,Is[95]=63;function oE(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");n===-1&&(n=t);var r=n===t?0:4-n%4;return[n,r]}function VV(e){var t=oE(e),n=t[0],r=t[1];return(n+r)*3/4-r}function WV(e,t,n){return(t+n)*3/4-n}function qV(e){var t,n=oE(e),r=n[0],i=n[1],s=new zV(WV(e,r,i)),o=0,a=i>0?r-4:r,c;for(c=0;c<a;c+=4)t=Is[e.charCodeAt(c)]<<18|Is[e.charCodeAt(c+1)]<<12|Is[e.charCodeAt(c+2)]<<6|Is[e.charCodeAt(c+3)],s[o++]=t>>16&255,s[o++]=t>>8&255,s[o++]=t&255;return i===2&&(t=Is[e.charCodeAt(c)]<<2|Is[e.charCodeAt(c+1)]>>4,s[o++]=t&255),i===1&&(t=Is[e.charCodeAt(c)]<<10|Is[e.charCodeAt(c+1)]<<4|Is[e.charCodeAt(c+2)]>>2,s[o++]=t>>8&255,s[o++]=t&255),s}function ZV(e){return So[e>>18&63]+So[e>>12&63]+So[e>>6&63]+So[e&63]}function QV(e,t,n){for(var r,i=[],s=t;s<n;s+=3)r=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(e[s+2]&255),i.push(ZV(r));return i.join("")}function KV(e){for(var t,n=e.length,r=n%3,i=[],s=16383,o=0,a=n-r;o<a;o+=s)i.push(QV(e,o,o+s>a?a:o+s));return r===1?(t=e[n-1],i.push(So[t>>2]+So[t<<4&63]+"==")):r===2&&(t=(e[n-2]<<8)+e[n-1],i.push(So[t>>10]+So[t>>4&63]+So[t<<2&63]+"=")),i.join("")}var N3={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */N3.read=function(e,t,n,r,i){var s,o,a=i*8-r-1,c=(1<<a)-1,l=c>>1,f=-7,u=n?i-1:0,d=n?-1:1,h=e[t+u];for(u+=d,s=h&(1<<-f)-1,h>>=-f,f+=a;f>0;s=s*256+e[t+u],u+=d,f-=8);for(o=s&(1<<-f)-1,s>>=-f,f+=r;f>0;o=o*256+e[t+u],u+=d,f-=8);if(s===0)s=1-l;else{if(s===c)return o?NaN:(h?-1:1)*(1/0);o=o+Math.pow(2,r),s=s-l}return(h?-1:1)*o*Math.pow(2,s-r)},N3.write=function(e,t,n,r,i,s){var o,a,c,l=s*8-i-1,f=(1<<l)-1,u=f>>1,d=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:s-1,p=r?1:-1,m=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,o=f):(o=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-o))<1&&(o--,c*=2),o+u>=1?t+=d/c:t+=d*Math.pow(2,1-u),t*c>=2&&(o++,c/=2),o+u>=f?(a=0,o=f):o+u>=1?(a=(t*c-1)*Math.pow(2,i),o=o+u):(a=t*Math.pow(2,u-1)*Math.pow(2,i),o=0));i>=8;e[n+h]=a&255,h+=p,a/=256,i-=8);for(o=o<<i|a,l+=i;l>0;e[n+h]=o&255,h+=p,o/=256,l-=8);e[n+h-p]|=m*128};/*!
58
+ l-6.737-0.31C207.756,187.983,200.245,187.091,200.245,187.091z`})))}var Kv=fr(xt),Dz={activeStyle:{background:"#008FF3"},icon:Hz,style:{background:"#0573ff"},text:"Log in with Zalo"},Uz=Lr(Dz);function Hz({size:e,color:t}){return Kv.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24"},Kv.default.createElement("path",{fill:t,d:"M12.49 10.2722v-.4496h1.3467v6.3218h-.7704a.576.576 0 01-.5763-.5729l-.0006.0005a3.273 3.273 0 01-1.9372.6321c-1.8138 0-3.2844-1.4697-3.2844-3.2823 0-1.8125 1.4706-3.2822 3.2844-3.2822a3.273 3.273 0 011.9372.6321l.0006.0005zM6.9188 7.7896v.205c0 .3823-.051.6944-.2995 1.0605l-.03.0343c-.0542.0615-.1815.206-.2421.2843L2.024 14.8h4.8948v.7682a.5764.5764 0 01-.5767.5761H0v-.3622c0-.4436.1102-.6414.2495-.8476L4.8582 9.23H.1922V7.7896h6.7266zm8.5513 8.3548a.4805.4805 0 01-.4803-.4798v-7.875h1.4416v8.3548H15.47zM20.6934 9.6C22.52 9.6 24 11.0807 24 12.9044c0 1.8252-1.4801 3.306-3.3066 3.306-1.8264 0-3.3066-1.4808-3.3066-3.306 0-1.8237 1.4802-3.3044 3.3066-3.3044zm-10.1412 5.253c1.0675 0 1.9324-.8645 1.9324-1.9312 0-1.065-.865-1.9295-1.9324-1.9295s-1.9324.8644-1.9324 1.9295c0 1.0667.865 1.9312 1.9324 1.9312zm10.1412-.0033c1.0737 0 1.945-.8707 1.945-1.9453 0-1.073-.8713-1.9436-1.945-1.9436-1.0753 0-1.945.8706-1.945 1.9436 0 1.0746.8697 1.9453 1.945 1.9453z"}))}var Yv=fr(xt),zz={activeStyle:{background:"#333333"},icon:Vz,style:{background:"#000000",color:"#FFFFFF"},text:"Log in with TikTok"},Gz=Lr(zz);function Vz({size:e,color:t}){return Yv.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,fill:t,viewBox:"0 0 512 512"},Yv.default.createElement("path",{d:"M412.19 118.66a109.27 109.27 0 01-9.45-5.5 132.87 132.87 0 01-24.27-20.62c-18.1-20.71-24.86-41.72-27.35-56.43h.1C349.14 23.9 350 16 350.13 16h-82.44v318.78c0 4.28 0 8.51-.18 12.69 0 .52-.05 1-.08 1.56 0 .23 0 .47-.05.71v.18a70 70 0 01-35.22 55.56 68.8 68.8 0 01-34.11 9c-38.41 0-69.54-31.32-69.54-70s31.13-70 69.54-70a68.9 68.9 0 0121.41 3.39l.1-83.94a153.14 153.14 0 00-118 34.52 161.79 161.79 0 00-35.3 43.53c-3.48 6-16.61 30.11-18.2 69.24-1 22.21 5.67 45.22 8.85 54.73v.2c2 5.6 9.75 24.71 22.38 40.82A167.53 167.53 0 00115 470.66v-.2l.2.2c39.91 27.12 84.16 25.34 84.16 25.34 7.66-.31 33.32 0 62.46-13.81 32.32-15.31 50.72-38.12 50.72-38.12a158.46 158.46 0 0027.64-45.93c7.46-19.61 9.95-43.13 9.95-52.53V176.49c1 .6 14.32 9.41 14.32 9.41s19.19 12.3 49.13 20.31c21.48 5.7 50.42 6.9 50.42 6.9v-81.84c-10.14 1.1-30.73-2.1-51.81-12.61z"}))}var ms=fr(xt),Wz={activeStyle:{background:"#eeeeee"},icon:Zz,style:{background:"#ffffff",color:"#333333"},text:"Log in with Metamask"},qz=Lr(Wz);function Zz({size:e}){return ms.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",x:"0",y:"0",version:"1.1",width:e,height:e,viewBox:"0 0 318.6 318.6",xmlSpace:"preserve"},ms.default.createElement("path",{fill:"#e2761b",stroke:"#e2761b",strokeLinecap:"round",strokeLinejoin:"round",d:"M274.1 35.5l-99.5 73.9L193 65.8z"}),ms.default.createElement("path",Ti({d:"M44.4 35.5l98.7 74.6-17.5-44.3zm193.9 171.3l-26.5 40.6 56.7 15.6 16.3-55.3zm-204.4.9L50.1 263l56.7-15.6-26.5-40.6z"},Jv)),ms.default.createElement("path",Ti({d:"M103.6 138.2l-15.8 23.9 56.3 2.5-2-60.5zm111.3 0l-39-34.8-1.3 61.2 56.2-2.5zM106.8 247.4l33.8-16.5-29.2-22.8zm71.1-16.5l33.9 16.5-4.7-39.3z"},Jv)),ms.default.createElement("path",{fill:"#d7c1b3",stroke:"#d7c1b3",strokeLinecap:"round",strokeLinejoin:"round",d:"M211.8 247.4l-33.9-16.5 2.7 22.1-.3 9.3zm-105 0l31.5 14.9-.2-9.3 2.5-22.1z"}),ms.default.createElement("path",{fill:"#233447",stroke:"#233447",strokeLinecap:"round",strokeLinejoin:"round",d:"M138.8 193.5l-28.2-8.3 19.9-9.1zm40.9 0l8.3-17.4 20 9.1z"}),ms.default.createElement("path",{fill:"#cd6116",stroke:"#cd6116",strokeLinecap:"round",strokeLinejoin:"round",d:"M106.8 247.4l4.8-40.6-31.3.9zM207 206.8l4.8 40.6 26.5-39.7zm23.8-44.7l-56.2 2.5 5.2 28.9 8.3-17.4 20 9.1zm-120.2 23.1l20-9.1 8.2 17.4 5.3-28.9-56.3-2.5z"}),ms.default.createElement("path",{fill:"#e4751f",stroke:"#e4751f",strokeLinecap:"round",strokeLinejoin:"round",d:"M87.8 162.1l23.6 46-.8-22.9zm120.3 23.1l-1 22.9 23.7-46zm-64-20.6l-5.3 28.9 6.6 34.1 1.5-44.9zm30.5 0l-2.7 18 1.2 45 6.7-34.1z"}),ms.default.createElement("path",Ti({d:"M179.8 193.5l-6.7 34.1 4.8 3.3 29.2-22.8 1-22.9zm-69.2-8.3l.8 22.9 29.2 22.8 4.8-3.3-6.6-34.1z"},Xv)),ms.default.createElement("path",{fill:"#c0ad9e",stroke:"#c0ad9e",strokeLinecap:"round",strokeLinejoin:"round",d:"M180.3 262.3l.3-9.3-2.5-2.2h-37.7l-2.3 2.2.2 9.3-31.5-14.9 11 9 22.3 15.5h38.3l22.4-15.5 11-9z"}),ms.default.createElement("path",{fill:"#161616",stroke:"#161616",strokeLinecap:"round",strokeLinejoin:"round",d:"M177.9 230.9l-4.8-3.3h-27.7l-4.8 3.3-2.5 22.1 2.3-2.2h37.7l2.5 2.2z"}),ms.default.createElement("path",{fill:"#763d16",stroke:"#763d16",strokeLinecap:"round",strokeLinejoin:"round",d:"M278.3 114.2l8.5-40.8-12.7-37.9-96.2 71.4 37 31.3 52.3 15.3 11.6-13.5-5-3.6 8-7.3-6.2-4.8 8-6.1zM31.8 73.4l8.5 40.8-5.4 4 8 6.1-6.1 4.8 8 7.3-5 3.6 11.5 13.5 52.3-15.3 37-31.3-96.2-71.4z"}),ms.default.createElement("path",Ti({d:"M267.2 153.5l-52.3-15.3 15.9 23.9-23.7 46 31.2-.4h46.5zm-163.6-15.3l-52.3 15.3-17.4 54.2h46.4l31.1.4-23.6-46zm71 26.4l3.3-57.7 15.2-41.1h-67.5l15 41.1 3.5 57.7 1.2 18.2.1 44.8h27.7l.2-44.8z"},Xv)))}var Jv={fill:"#e4761b",stroke:"#e4761b",strokeLinecap:"round",strokeLinejoin:"round"},Xv={fill:"#f6851b",stroke:"#f6851b",strokeLinecap:"round",strokeLinejoin:"round"},eE=fr(xt),Qz={icon:Yz,style:{background:"#fc6d26"},activeStyle:{background:"#d55a1c"},text:"Log in with Gitlab"},Kz=Lr(Qz);function Yz({size:e,color:t}){return eE.default.createElement("svg",{fill:t,role:"img",viewBox:"0 0 24 24",width:e,height:e,xmlns:"http://www.w3.org/2000/svg"},eE.default.createElement("path",{d:"M21.94 13.11L20.89 9.89C20.89 9.86 20.88 9.83 20.87 9.8L18.76 3.32C18.65 3 18.33 2.75 17.96 2.75C17.6 2.75 17.28 3 17.17 3.33L15.17 9.5H8.84L6.83 3.33C6.72 3 6.4 2.75 6.04 2.75H6.04C5.67 2.75 5.35 3 5.24 3.33L3.13 9.82C3.13 9.82 3.13 9.83 3.13 9.83L2.06 13.11C1.9 13.61 2.07 14.15 2.5 14.45L11.72 21.16C11.89 21.28 12.11 21.28 12.28 21.15L21.5 14.45C21.93 14.15 22.1 13.61 21.94 13.11M8.15 10.45L10.72 18.36L4.55 10.45M13.28 18.37L15.75 10.78L15.85 10.45H19.46L13.87 17.61M17.97 3.94L19.78 9.5H16.16M14.86 10.45L13.07 15.96L12 19.24L9.14 10.45M6.03 3.94L7.84 9.5H4.23M3.05 13.69C2.96 13.62 2.92 13.5 2.96 13.4L3.75 10.97L9.57 18.42M20.95 13.69L14.44 18.42L14.46 18.39L20.25 10.97L21.04 13.4C21.08 13.5 21.04 13.62 20.95 13.69"}))}var tE=fr(xt),Jz={activeStyle:{background:"#282e36"},icon:eG,style:{background:"#0f1419"},text:"Log in with X"},Xz=Lr(Jz);function eG({size:e,color:t}){return tE.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24"},tE.default.createElement("path",{fill:t,d:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"}))}function tG({width:e=24,height:t=24,color:n}){return Ae.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",height:"48",width:"32",viewBox:"-18.15 -35.9725 157.3 215.835",children:[Ae.jsx("path",{fill:"#faab07",d:"M60.503 142.237c-12.533 0-24.038-4.195-31.445-10.46-3.762 1.124-8.574 2.932-11.61 5.175-2.6 1.918-2.275 3.874-1.807 4.663 2.056 3.47 35.273 2.216 44.862 1.136zm0 0c12.535 0 24.039-4.195 31.447-10.46 3.76 1.124 8.573 2.932 11.61 5.175 2.598 1.918 2.274 3.874 1.805 4.663-2.056 3.47-35.272 2.216-44.862 1.136zm0 0"}),Ae.jsx("path",{d:"M60.576 67.119c20.698-.14 37.286-4.147 42.907-5.683 1.34-.367 2.056-1.024 2.056-1.024.005-.189.085-3.37.085-5.01C105.624 27.768 92.58.001 60.5 0 28.42.001 15.375 27.769 15.375 55.401c0 1.642.08 4.822.086 5.01 0 0 .583.615 1.65.913 5.19 1.444 22.09 5.65 43.312 5.795zm56.245 23.02c-1.283-4.129-3.034-8.944-4.808-13.568 0 0-1.02-.126-1.537.023-15.913 4.623-35.202 7.57-49.9 7.392h-.153c-14.616.175-33.774-2.737-49.634-7.315-.606-.175-1.802-.1-1.802-.1-1.774 4.624-3.525 9.44-4.808 13.568-6.119 19.69-4.136 27.838-2.627 28.02 3.239.392 12.606-14.821 12.606-14.821 0 15.459 13.957 39.195 45.918 39.413h.848c31.96-.218 45.917-23.954 45.917-39.413 0 0 9.368 15.213 12.607 14.822 1.508-.183 3.491-8.332-2.627-28.021"}),Ae.jsx("path",{fill:"#fff",d:"M49.085 40.824c-4.352.197-8.07-4.76-8.304-11.063-.236-6.305 3.098-11.576 7.45-11.773 4.347-.195 8.064 4.76 8.3 11.065.238 6.306-3.097 11.577-7.446 11.771m31.133-11.063c-.233 6.302-3.951 11.26-8.303 11.063-4.35-.195-7.684-5.465-7.446-11.77.236-6.305 3.952-11.26 8.3-11.066 4.352.197 7.686 5.468 7.449 11.773"}),Ae.jsx("path",{fill:"#faab07",d:"M87.952 49.725C86.79 47.15 75.077 44.28 60.578 44.28h-.156c-14.5 0-26.212 2.87-27.375 5.446a.863.863 0 00-.085.367.88.88 0 00.16.496c.98 1.427 13.985 8.487 27.3 8.487h.156c13.314 0 26.319-7.058 27.299-8.487a.873.873 0 00.16-.498.856.856 0 00-.085-.365"}),Ae.jsx("path",{d:"M54.434 29.854c.199 2.49-1.167 4.702-3.046 4.943-1.883.242-3.568-1.58-3.768-4.07-.197-2.492 1.167-4.704 3.043-4.944 1.886-.244 3.574 1.58 3.771 4.07m11.956.833c.385-.689 3.004-4.312 8.427-2.993 1.425.347 2.084.857 2.223 1.057.205.296.262.718.053 1.286-.412 1.126-1.263 1.095-1.734.875-.305-.142-4.082-2.66-7.562 1.097-.24.257-.668.346-1.073.04-.407-.308-.574-.93-.334-1.362"}),Ae.jsx("path",{fill:"#fff",d:"M60.576 83.08h-.153c-9.996.12-22.116-1.204-33.854-3.518-1.004 5.818-1.61 13.132-1.09 21.853 1.316 22.043 14.407 35.9 34.614 36.1h.82c20.208-.2 33.298-14.057 34.616-36.1.52-8.723-.087-16.035-1.092-21.854-11.739 2.315-23.862 3.64-33.86 3.518"}),Ae.jsx("path",{fill:"#eb1923",d:"M32.102 81.235v21.693s9.937 2.004 19.893.616V83.535c-6.307-.357-13.109-1.152-19.893-2.3"}),Ae.jsx("path",{fill:"#eb1923",d:"M105.539 60.412s-19.33 6.102-44.963 6.275h-.153c-25.591-.172-44.896-6.255-44.962-6.275L8.987 76.57c16.193 4.882 36.261 8.028 51.436 7.845h.153c15.175.183 35.242-2.963 51.437-7.845zm0 0"})]})}const nG={text:"Sign in with QQ",icon:tG,iconFormat:e=>`fa fa-${e}`,style:{background:"rgb(94,188,249)"},activeStyle:{background:"rgb(76,143,208)"}},rG=er.createButton(nG);function iG({width:e=24,height:t=24,color:n}){return Ae.jsx("img",{src:`${Xe}/buttons/facebook.svg`,alt:"Sign in with Facebook"})}const sG={text:"Sign in with Facebook",icon:iG,iconFormat:e=>`fa fa-${e}`,style:{background:"#3b5998"},activeStyle:{background:"#2b3f65"}},oG=er.createButton(sG);function aG({width:e=24,height:t=24,color:n}){return Ae.jsx("img",{src:`${Xe}/buttons/weibo.svg`,alt:"Sign in with Weibo"})}const cG={text:"Sign in with Weibo",icon:aG,iconFormat:e=>`fa fa-${e}`,style:{background:"#e62329"},activeStyle:{background:"#e54329"}},lG=er.createButton(cG);function uG({width:e=24,height:t=24,color:n}){return Ae.jsx("img",{src:`${Xe}/buttons/gitee.svg`,alt:"Sign in with Gitee"})}const fG={text:"Sign in with Gitee",icon:uG,iconFormat:e=>`fa fa-${e}`,style:{background:"rgb(199,29,35)"},activeStyle:{background:"rgb(147,22,26)"}},dG=er.createButton(fG);function hG({width:e=24,height:t=24,color:n}){return Ae.jsx("img",{src:`${Xe}/buttons/wechat.svg`,alt:"Sign in with Wechat"})}const pG={text:"Sign in with Wechat",icon:hG,iconFormat:e=>`fa fa-${e}`,style:{background:"rgb(0,194,80)"},activeStyle:{background:"rgb(0,158,64)"}},mG=er.createButton(pG);function gG({width:e=24,height:t=24,color:n}){return Ae.jsx("img",{src:`${Xe}/buttons/dingtalk.svg`,alt:"Sign in with DingTalk"})}const bG={text:"Sign in with DingTalk",icon:gG,iconFormat:e=>`fa fa-${e}`,style:{background:"#0191e0"},activeStyle:{background:"rgb(76,143,208)"}},yG=er.createButton(bG);function wG({width:e=24,height:t=24,color:n}){return Ae.jsx("img",{src:`${Xe}/buttons/linkedin.svg`,alt:"Sign in with LinkedIn"})}const vG={text:"Sign in with LinkedIn",icon:wG,iconFormat:e=>`fa fa-${e}`,style:{background:"rgb(255,255,255)",color:"#000000"},activeStyle:{background:"rgb(240,240,250)"}},EG=er.createButton(vG);function xG({width:e=24,height:t=24,color:n}){return Ae.jsx("img",{src:`${Xe}/buttons/wecom.svg`,alt:"Sign in with WeCom"})}const AG={text:"Sign in with WeCom",icon:xG,iconFormat:e=>`fa fa-${e}`,style:{background:"rgb(255,255,255)",color:"#000000"},activeStyle:{background:"rgb(100,150,250)"}},_G=er.createButton(AG);function CG({width:e=24,height:t=24,color:n}){return Ae.jsx("img",{src:`${Xe}/buttons/lark.svg`,alt:"Sign in with Lark",style:{width:24,height:24}})}const SG={text:"Sign in with Lark",icon:CG,iconFormat:e=>`fa fa-${e}`,style:{background:"#ffffff",color:"#000000"},activeStyle:{background:"#ededee"}},kG=er.createButton(SG);function IG({width:e=24,height:t=24,color:n}){return Ae.jsx("img",{src:`${Xe}/buttons/gitlab.svg`,alt:"Sign in with GitLab",style:{width:24,height:24}})}const TG={text:"Sign in with GitLab",icon:IG,iconFormat:e=>`fa fa-${e}`,style:{background:"rgb(255,255,255)",color:"#000000"},activeStyle:{background:"rgb(100,150,250)"}},BG=er.createButton(TG);function PG({width:e=24,height:t=24,color:n}){return Ae.jsx("img",{src:`${Xe}/buttons/adfs.svg`,alt:"Sign in with ADFS",style:{width:24,height:24}})}const OG={text:"Sign in with ADFS",icon:PG,iconFormat:e=>`fa fa-${e}`,style:{background:"#ffffff",color:"#000000"},activeStyle:{background:"#ededee"}},MG=er.createButton(OG);function LG({width:e=24,height:t=24,color:n}){return Ae.jsx("img",{src:`${Xe}/buttons/casdoor.svg`,alt:"Sign in with Casdoor",style:{width:24,height:24}})}const RG={text:"Sign in with Casdoor",icon:LG,iconFormat:e=>`fa fa-${e}`,style:{background:"#ffffff",color:"#000000"},activeStyle:{background:"#ededee"}},jG=er.createButton(RG);function NG({width:e=24,height:t=24,color:n}){return Ae.jsx("img",{src:`${Xe}/buttons/baidu.svg`,alt:"Sign in with Baidu",style:{width:24,height:24}})}const $G={text:"Sign in with Baidu",icon:NG,iconFormat:e=>`fa fa-${e}`,style:{background:"#ffffff",color:"#000000"},activeStyle:{background:"#ededee"}},FG=er.createButton($G);function DG({width:e=24,height:t=24,color:n}){return Ae.jsx("img",{src:`${Xe}/buttons/alipay.svg`,alt:"Sign in with Alipay",style:{width:24,height:24}})}const UG={text:"Sign in with Alipay",icon:DG,iconFormat:e=>`fa fa-${e}`,style:{background:"#ffffff",color:"#000000"},activeStyle:{background:"#ededee"}},HG=er.createButton(UG);function zG({width:e=24,height:t=24,color:n}){return Ae.jsx("img",{src:`${Xe}/buttons/infoflow.svg`,alt:"Sign in with Infoflow",style:{width:24,height:24}})}const GG={text:"Sign in with Infoflow",icon:zG,iconFormat:e=>`fa fa-${e}`,style:{background:"#ffffff",color:"#000000"},activeStyle:{background:"#ededee"}},VG=er.createButton(GG);function WG({width:e=24,height:t=24,color:n}){return Ae.jsx("img",{src:`${Xe}/buttons/apple.svg`,alt:"Sign in with Apple",style:{width:24,height:24}})}const qG={text:"Sign in with Apple",icon:WG,iconFormat:e=>`fa fa-${e}`,style:{background:"#ffffff",color:"#000000"},activeStyle:{background:"#ededee"}},ZG=er.createButton(qG);function QG({width:e=24,height:t=24,color:n}){return Ae.jsx("img",{src:`${Xe}/buttons/azuread.svg`,alt:"Sign in with Azure AD",style:{width:24,height:24}})}const KG={text:"Sign in with Azure AD",icon:QG,iconFormat:e=>`fa fa-${e}`,style:{background:"#ffffff",color:"#000000"},activeStyle:{background:"#ededee"}},YG=er.createButton(KG);function JG({width:e=24,height:t=24,color:n}){return Ae.jsx("img",{src:`${Xe}/buttons/azuread.svg`,alt:"Sign in with Azure AD B2C",style:{width:24,height:24}})}const XG={text:"Sign in with Azure AD B2C",icon:JG,iconFormat:e=>`fa fa-${e}`,style:{background:"#ffffff",color:"#000000"},activeStyle:{background:"#ededee"}},eV=er.createButton(XG);function tV({width:e=24,height:t=24,color:n}){return Ae.jsx("img",{src:`${Xe}/buttons/slack.svg`,alt:"Sign in with Slack",style:{width:24,height:24}})}const nV={text:"Sign in with Slack",icon:tV,iconFormat:e=>`fa fa-${e}`,style:{background:"#ffffff",color:"#000000"},activeStyle:{background:"#ededee"}},rV=er.createButton(nV);function iV({width:e=24,height:t=24,color:n}){return Ae.jsx("img",{src:`${Xe}/buttons/steam.svg`,alt:"Sign in with Steam",style:{width:24,height:24}})}const sV={text:"Sign in with Steam",icon:iV,iconFormat:e=>`fa fa-${e}`,style:{background:"#ffffff",color:"#000000"},activeStyle:{background:"#ededee"}},oV=er.createButton(sV);function aV({width:e=24,height:t=24,color:n}){return Ae.jsx("img",{src:`${Xe}/buttons/bilibili.svg`,alt:"Sign in with Bilibili"})}const cV={text:"Sign in with Bilibili",icon:aV,iconFormat:e=>`fa fa-${e}`,style:{background:"#0191e0"},activeStyle:{background:"rgb(76,143,208)"}},lV=er.createButton(cV);function uV({width:e=24,height:t=24,color:n}){return Ae.jsx("img",{src:`${Xe}/buttons/okta.svg`,alt:"Sign in with Okta",style:{width:24,height:24}})}const fV={text:"Sign in with Okta",icon:uV,iconFormat:e=>`fa fa-${e}`,style:{background:"#ffffff",color:"#000000"},activeStyle:{background:"#ededee"}},dV=er.createButton(fV);function hV({width:e=24,height:t=24,color:n}){return Ae.jsx("img",{src:`${Xe}/buttons/douyin.svg`,alt:"Sign in with Douyin",style:{width:24,height:24}})}const pV={text:"Sign in with Douyin",icon:hV,iconFormat:e=>`fa fa-${e}`,style:{background:"#ffffff",color:"#000000"},activeStyle:{background:"#ededee"}},mV=er.createButton(pV);function gV({type:e,logoUrl:t,align:n="center",style:r={background:"#ffffff",color:"#000000"},activeStyle:i={background:"#ededee"}}){function s({width:l=24,height:f=24,color:u}){return Ae.jsx("img",{src:t,alt:`Sign in with ${e}`,style:{width:l,height:f}})}const o={text:`Sign in with ${e}`,icon:s,style:r,activeStyle:i},a=er.createButton(o),c=ss.t("login:Sign in with {type}").replace("{type}",e);return Ae.jsx(a,{text:c,align:n})}function M3(e){const t=ss.t("login:Sign in with {type}").replace("{type}",e.displayName!==""?e.displayName:e.type);return e.type==="GitHub"?Ae.jsx(er.GithubLoginButton,{text:t,align:"center"}):e.type==="Google"?Ae.jsx(er.GoogleLoginButton,{text:t,align:"center"}):e.type==="QQ"?Ae.jsx(rG,{text:t,align:"center"}):e.type==="Facebook"?Ae.jsx(oG,{text:t,align:"center"}):e.type==="Weibo"?Ae.jsx(lG,{text:t,align:"center"}):e.type==="Gitee"?Ae.jsx(dG,{text:t,align:"center"}):e.type==="WeChat"?Ae.jsx(mG,{text:t,align:"center"}):e.type==="DingTalk"?Ae.jsx(yG,{text:t,align:"center"}):e.type==="LinkedIn"?Ae.jsx(EG,{text:t,align:"center"}):e.type==="WeCom"?Ae.jsx(_G,{text:t,align:"center"}):e.type==="Lark"?Ae.jsx(kG,{text:t,align:"center"}):e.type==="GitLab"?Ae.jsx(BG,{text:t,align:"center"}):e.type==="ADFS"?Ae.jsx(MG,{text:t,align:"center"}):e.type==="Casdoor"?Ae.jsx(jG,{text:t,align:"center"}):e.type==="Baidu"?Ae.jsx(FG,{text:t,align:"center"}):e.type==="Alipay"?Ae.jsx(HG,{text:t,align:"center"}):e.type==="Infoflow"?Ae.jsx(VG,{text:t,align:"center"}):e.type==="Apple"?Ae.jsx(ZG,{text:t,align:"center"}):e.type==="AzureAD"?Ae.jsx(YG,{text:t,align:"center"}):e.type==="AzureADB2C"?Ae.jsx(eV,{text:t,align:"center"}):e.type==="Slack"?Ae.jsx(rV,{text:t,align:"center"}):e.type==="Steam"?Ae.jsx(oV,{text:t,align:"center"}):e.type==="Bilibili"?Ae.jsx(lV,{text:t,align:"center"}):e.type==="Okta"?Ae.jsx(dV,{text:t,align:"center"}):e.type==="Douyin"?Ae.jsx(mV,{text:t,align:"center"}):Ae.jsx(gV,{type:e.type,logoUrl:pl(e)},e.type)}function L3(e,t){const n=new URLSearchParams(t.search),r=n.get("client_id")??"",i=n.get("state"),s=n.get("redirect_uri"),o=`${window.location.origin}/callback/saml`,a=e.name,c=`${r}&${i}&${a}&${s}&${o}`;AH(`${e.owner}/${a}`,btoa(c)).then(l=>{l.data2==="POST"?document.write(l.data):window.location.href=l.data})}function nE(e,t,n){t.type==="MetaMask"?Promise.resolve().then(()=>WP).then(r=>{const i=r.authViaMetaMask;i(e,t,n)}):t.type==="Web3Onboard"&&Promise.resolve().then(()=>WP).then(r=>{const i=r.authViaWeb3Onboard;i(e,t,n)})}function bV(e,t,n,r,i,s){if(i==="small"){if(e.category==="OAuth")return e.type==="WeChat"&&e.clientId2!==""&&e.clientSecret2!==""&&e.disableSsl===!0&&!navigator.userAgent.includes("MicroMessenger")?Ae.jsx("a",{children:Ae.jsx("img",{width:n,height:n,src:pl(e),alt:e.displayName,className:"provider-img",style:{margin:r},onClick:()=>{IH(t,e,"signup")}})},e.displayName):Ae.jsx("a",{href:(void 0)(t,e,"signup"),children:Ae.jsx("img",{width:n,height:n,src:pl(e),alt:e.displayName,className:"provider-img",style:{margin:r}})},e.displayName);if(e.category==="SAML")return Ae.jsx("a",{onClick:()=>L3(e,s),children:Ae.jsx("img",{width:n,height:n,src:pl(e),alt:e.displayName,className:"provider-img",style:{margin:r}})},e.displayName);if(e.category==="Web3")return Ae.jsx("a",{onClick:()=>nE(t,e,"signup"),children:Ae.jsx("img",{width:n,height:n,src:pl(e),alt:e.displayName,className:"provider-img",style:{margin:r}})},e.displayName)}else if(e.type==="Custom"){const o=ss.t("login:Sign in with {type}").replace("{type}",e.displayName),a={display:"block",height:"55px",color:"#000"},c={display:"flex",alignItems:"center",width:"calc(100% - 10px)",height:"50px",margin:"5px",padding:"0 10px",backgroundColor:"transparent",boxShadow:"0px 1px 3px rgba(0,0,0,0.5)",border:"0px",borderRadius:"3px",cursor:"pointer"},l={justfyContent:"space-between"},f={textAlign:"center",width:"100%",fontSize:"19px"};if(e.category==="OAuth")return Ae.jsx("a",{href:(void 0)(t,e,"signup"),style:a,children:Ae.jsxs("div",{style:c,children:[Ae.jsx("img",{width:26,src:pl(e),alt:e.displayName,className:"provider-img",style:l}),Ae.jsx("span",{style:f,children:o})]})},e.displayName);if(e.category==="SAML")return Ae.jsx("a",{onClick:()=>L3(e,s),style:a,children:Ae.jsxs("div",{style:c,children:[Ae.jsx("img",{width:26,src:pl(e),alt:e.displayName,className:"provider-img",style:l}),Ae.jsx("span",{style:f,children:o})]})},e.displayName)}else return e.category==="SAML"?Ae.jsx("div",{className:"provider-big-img",children:Ae.jsx("a",{onClick:()=>L3(e,s),children:M3(e)})},e.displayName):e.category==="Web3"?Ae.jsx("div",{className:"provider-big-img",children:Ae.jsx("a",{onClick:()=>nE(t,e,"signup"),children:M3(e)})},e.displayName):Ae.jsx("div",{className:"provider-big-img",children:Ae.jsx("a",{href:(void 0)(t,e,"signup"),children:M3(e)})},e.displayName)}function yV(e){return e.length<6?ss.t("user:The password must have at least 6 characters"):""}function wV(e){return e.length<8?ss.t("user:The password must have at least 8 characters"):""}function vV(e){return/^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9]).+$/.test(e)?"":ss.t("user:The password must contain at least one uppercase letter, one lowercase letter and one digit")}function EV(e){return/^(?=.*[!-/:-@[-`{-~]).+$/.test(e)?"":ss.t("user:The password must contain at least one special character")}function xV(e){return/(.)\1+/.test(e)?ss.t("user:The password must not contain any repeated characters"):""}function AV(e,t){if(e.length===0)return ss.t("login:Please input your password!");(!t||t.length===0)&&(t=["AtLeast6"]);const n={AtLeast6:yV,AtLeast8:wV,Aa123:vV,SpecialChar:EV,NoRepeat:xV};for(const r of t){const i=n[r];if(i){const s=i(e);if(s!=="")return s}}return""}function _V({application:e,state:t,setState:n}){const[r,i]=xt.useState(!1),s=xt.useRef(null);xt.useEffect(()=>{s.current||(s.current=document.getElementById("agreementDialog"))},[]),xt.useEffect(()=>{s.current&&(r?s.current.showModal():s.current.close())},[r]);const o=()=>{n({...t,agreement:!1}),i(!1)},a=()=>{n({...t,agreement:!0}),i(!1)},c=()=>{i(!0)};return Ae.jsxs(Ae.Fragment,{children:[Ae.jsx("dialog",{id:"agreementDialog",className:"modal",children:Ae.jsxs("div",{className:"modal-box",children:[Ae.jsx("div",{className:"mt-4 mb-8",children:Ae.jsx("iframe",{src:e.termsOfUse,width:"100%",height:"300px",sandbox:"allow-scripts"})}),Ae.jsxs("div",{className:"modal-action",children:[Ae.jsx("form",{method:"dialog",className:"modal-backdrop",children:Ae.jsx("button",{children:"Close"})}),Ae.jsxs("form",{method:"dialog",className:"flex gap-3",children:[Ae.jsx("button",{className:"btn",onClick:o,children:"Cancel"},"closebtn"),Ae.jsx("button",{className:"btn btn-primary",onClick:a,children:"OK"},"okbtn")]})]})]})}),Ae.jsx("input",{checked:!!t.agreement,type:"checkbox",readOnly:!0}),Ae.jsx("button",{onClick:c,children:"Open Terms"})]})}function no({label:e,name:t,rules:n,inputEl:r,setFieldValue:i,onChange:s,...o}){return Ae.jsxs("label",{className:"form-control w-full max-w-xs",htmlFor:t,children:[Ae.jsx("div",{className:"label",children:Ae.jsx("span",{className:"label-text",children:e})}),r||Ae.jsx("input",{type:"text",...o,name:t,className:"input input-bordered w-full max-w-xs",onChange:a=>{i(t,a.target.value),s==null||s(a)}}),Ae.jsx("div",{className:"label flex-col",children:n==null?void 0:n.map((a,c)=>Ae.jsx("span",{className:"label-text-alt",children:a.message},t+c))})]})}const CV=(e,t)=>(delete e.applicationName,delete e.emailOrPhoneMode,delete e.isTermsOfUseVisible,{application:t.name,organization:t.organization,plan:null,pricing:null,...e}),SV=(e,t,n)=>{e.preventDefault();const r=CV(t,n);console.log(r),vH(r).then(i=>{i.status==="ok"?(r.username=i.data.split("/")[1],n&&bH(n)?wH("").then(s=>{let o=null;s.status==="ok"?(o=s.data,o.organization=s.data2,console.log("account",o),alert("redirect")):$i("error",`Failed to sign in: ${s.msg}`)}):alert("redirect")):$i("error",i.msg)})};function kV(e,t,n,r,i){if(!t.visible)return null;const s=(a,c)=>{n[a]=c,r(n)},o=t.required;if(t.name==="Username")return Ae.jsx(no,{name:"username",className:"signup-username",label:t.label?t.label:i("signup.username"),rules:[{required:o,message:i("forget.username"),whitespace:!0}],placeholder:t.placeholder,disabled:n.invitation!==void 0&&n.invitation.username!=="",setFieldValue:s});if(t.name==="Display name")return t.rule==="First, last"&&oH()!=="zh"?Ae.jsxs(xt.Fragment,{children:[Ae.jsx(no,{name:"firstName",className:"signup-first-name",label:t.label?t.label:i("general.firstName"),rules:[{required:o,message:i("forget.firstName"),whitespace:!0}],placeholder:t.placeholder,setFieldValue:s}),Ae.jsx(no,{name:"lastName",className:"signup-last-name",label:t.label?t.label:i("general.lastName"),rules:[{required:o,message:i("forget.lastName"),whitespace:!0}],placeholder:t.placeholder,setFieldValue:s})]}):Ae.jsx(no,{name:"name",className:"signup-name",label:t.label?t.label:t.rule==="Real name"||t.rule==="First, last"?i("general.realName"):i("general.displayName"),rules:[{required:o,message:t.rule==="Real name"||t.rule==="First, last"?i("forget.realName"):i("forget.displayName"),whitespace:!0}],placeholder:t.placeholder,setFieldValue:s});if(t.name==="Affiliation")return Ae.jsx(no,{name:"affiliation",className:"signup-affiliation",label:t.label?t.label:i("user.affiliation"),rules:[{required:o,message:i("forget.affiliation"),whitespace:!0}],placeholder:t.placeholder,setFieldValue:s});if(t.name==="ID card")return Ae.jsx(no,{name:"idCard",className:"signup-idcard",label:t.label?t.label:i("user.idCard"),rules:[{required:o,message:i("forget.idCard"),whitespace:!0},{required:o,pattern:new RegExp(/^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9X]$/,"g"),message:i("format.idCard")}],placeholder:t.placeholder,setFieldValue:s});if(t.name==="Email"||t.name==="Phone"||t.name==="Email or Phone"||t.name==="Phone or Email"){const a=()=>Ae.jsxs(xt.Fragment,{children:[Ae.jsx(no,{name:"email",label:t.label?t.label:i("general.email"),rules:[{required:o,message:i("forget.email")}],placeholder:t.placeholder,disabled:n.invitation!==void 0&&n.invitation.email!=="",onChange:l=>{const f=l.target.value;console.log("email",f,Ov(f)),f!==""&&!Ov(f)?r({...n,email:f,validEmail:!1}):r({...n,email:f,validEmail:!0})},setFieldValue:s}),t.rule!=="No verification"&&Ae.jsx(no,{name:"emailCode",className:"signup-email-code",label:t.label?t.label:i("code.email"),rules:[{required:o,message:i("forget.code")}],inputEl:Ae.jsx(PH,{disabled:!n.validEmail,method:"signup",onButtonClickArgs:[n.email,"email",e.name],application:e,countryCode:"US",onChange:l=>r({...n,emailCode:l})}),setFieldValue:s})]}),c=()=>Ae.jsx(Ae.Fragment,{});if(t.name==="Email")return a();if(t.name==="Phone")return c();if(t.name==="Email or Phone"||t.name==="Phone or Email"){let l=n.emailOrPhoneMode;return l===""&&(l=t.name==="Email or Phone"?"Email":"Phone"),Ae.jsxs(xt.Fragment,{children:[Ae.jsx("div",{style:{marginTop:"30px",marginBottom:"20px"}}),l==="Email"?a():c()]})}else return null}else{if(t.name==="Password")return Ae.jsx(no,{name:"password",className:"signup-password",label:t.label?t.label:i("general.password"),rules:[{required:o,validateTrigger:"onChange",validator:(a,c)=>{const l=AV(c,e.organizationObj.passwordOptions);return l===""?Promise.resolve():Promise.reject(l)}}],setFieldValue:s,type:"password",placeholder:t.placeholder});if(t.name==="Confirm password")return Ae.jsx(no,{name:"confirm",className:"signup-confirm",label:t.label?t.label:i("signup.confirm"),rules:[{required:o,message:i("forget.confirm")}],type:"password",placeholder:t.placeholder,setFieldValue:s});if(t.name==="Invitation code")return Ae.jsx(no,{name:"invitationCode",className:"signup-invitation-code",label:t.label?t.label:i("application.invitationCode"),rules:[{required:o,message:i("forget.invitationCode")}],placeholder:t.placeholder,disabled:n.invitation!==void 0&&n.invitation!=="",setFieldValue:s});if(t.name==="Agreement")return Ae.jsx(_V,{state:n,setState:r,application:e});if(t.name.startsWith("Text "))return Ae.jsx("div",{dangerouslySetInnerHTML:{__html:t.label}});if(t.name==="Signup button")return Ae.jsxs("form",{onSubmit:a=>SV(a,n,e),children:[Ae.jsx("button",{className:"btn btn-primary",type:"submit",children:i("signup.signUp")}),"  ",i("signup.haveAccount")," ",Ae.jsx("a",{className:"signup-link",onClick:()=>{const a=sessionStorage.getItem("signinUrl");alert("redirect")},children:i("signup.signInNow")})]});if(t.name==="Providers"&&e.providers){const a=hH(e)||pH(e)||mH(e)||gH(e);return(t.rule==="None"||t.rule==="")&&(t.rule=a?"small":"big"),e.providers.filter(c=>Pv(c)).map(c=>bV(c.provider,e,null,null,t.rule,{search:window.location.search}))}}return t.name}const IV={translation:{signup:{username:"Username",confirm:"Confirm password",signInNow:"Sign In Now",signUp:"Sign Up",haveAccount:"Have account?"},forget:{username:"Please input your username.",firstName:"Please input your first name.",lastName:"Please input your last name.",realName:"Please input your real name.",displayName:"Please input your display name.",affliation:"Please input your affliation.",idCard:"Please input your ID card number.",code:"Please input your verification code.",email:"Please input your email.",confirm:"Please confirm your password and ensure it matches.",invitationCode:"Please input your invitation code."},format:{idCard:"The ID card number format is incorrect."},general:{firstName:"First name",lastName:"Last name",displayName:"Display name",realName:"Real name",email:"Email",password:"Password",captcha:"Captcha"},user:{affliation:"Affliation",idCard:"ID card"},code:{email:"Email code",sending:"Sending",sendCode:"Send code"},application:{invitationCode:"Invitation code"}}};ss.use(bu.initReactI18next).init({lng:"en",fallbackLng:"en",resources:{en:IV}});function TV(e,t,n){const r=Ae.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",className:"lucide lucide-eye",children:[Ae.jsx("path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z"}),Ae.jsx("circle",{cx:"12",cy:"12",r:"3"})]}),i=Ae.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",className:"lucide lucide-eye-off",children:[Ae.jsx("path",{d:"M9.88 9.88a3 3 0 1 0 4.24 4.24"}),Ae.jsx("path",{d:"M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68"}),Ae.jsx("path",{d:"M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61"}),Ae.jsx("line",{x1:"2",x2:"22",y1:"2",y2:"22"})]}),s=kh(e),o=ma(e);if(s==="password"){const a=t.password.state[o];return Ae.jsxs(n,{variant:"ghost",size:"icon",className:"top-1/2 right-2 -translate-y-1/2",onClick:c=>{c.preventDefault(),c.stopPropagation(),t.password.setState({...t.password.state,[o]:!a})},children:[a?i:r,Ae.jsx("span",{className:"sr-only",children:"Toggle password visibility"})]})}else return null}function ma(e){const t={ID:"id",Username:"username","Display name":"name",Affiliation:"affiliation","ID card":"idCard",Email:"email",Phone:"phone",Password:"password","Confirm password":"confirm","Invitation code":"invitationCode","Country/Region":"country_region",Agreement:"agreement"};return Object.keys(t).includes(e.name)?t[e.name]:e.name}function kh(e,t){const n=["password","confirm"],r=ma(e);return n.includes(r)&&!(t!=null&&t.hidePassword[r])?"password":"text"}function BV(e){return Object.fromEntries(e.filter(t=>kh(t)==="password").map(t=>[ma(t),!1]))}function PV(e){return{name:ma(e),label:e.label||e.name,placeholder:e.placeholder,required:e.required,type:kh(e)}}function OV(e,t){const n=ma(t);let r=e.string();return n==="email"&&(r=r.email()),t.required||(r=r.optional()),r}function MV(e){const t=e.map(r=>[ma(r),""]),n=e.filter(r=>rE(r)).map(r=>[ma(r)+"Code",""]);return Object.fromEntries([...t,...n])}function rE(e){const t=ma(e);return(t==="email"||t==="phone")&&!["None","No verification"].includes(e.rule)}function LV(e){return e.visible===!0}function RV(e){var u;const{t,i18n:n}=bu.useTranslation(),[r,i]=xt.useState({applicationName:e.applicationName??null,email:"",phone:"",emailOrPhoneMode:"",countryCode:"",emailCode:"",phoneCode:"",validEmail:!1,validPhone:!1,region:"",isTermsOfUseVisible:!1,termsOfUseContent:""});xt.useRef();const s=d=>{d!==void 0&&C3("admin",d).then(h=>{if(h.status==="error"){$i("error",h.msg);return}l(h.data)})},o=d=>{Mv(d).then(h=>{if(h.status==="ok"){const p=h.data;l(p)}else l(null),i({...r,msg:h.msg})})},a=()=>e.application,c=(d,h)=>{Rv(d,h).then(p=>{if(p.status==="error"){$i("error",p.msg);return}i({...r,invitation:p.data})})},l=d=>{e.onUpdateApplication(d)};xt.useEffect(()=>{const d=Lv();if(d!==null){const h=window.location.pathname.replace("/signup/oauth/authorize","/login/oauth/authorize");sessionStorage.setItem("signinUrl",h+window.location.search)}if(a()===void 0)if(r.applicationName!==null){s(r.applicationName);const h=new URLSearchParams(window.location.search);if(h.has("invitationCode")){const p=h.get("invitationCode")??"";i({...r,invitationCode:p}),p!==""&&c(p,"admin/"+r.applicationName)}}else d!==null?o(d):($i("error",`Unknown application name: ${r.applicationName}`),l(null))},[]);const f=a();return f==null?null:(u=f.signupItems)==null?void 0:u.map((d,h)=>Ae.jsx("div",{children:kV(f,d,r,i,t)},h))}function jV({applicationName:e,casdoorApiRoot:t,springmicroApiRoot:n}){Jr.casdoor=t,n&&(Jr.springmicro=n);const[r,i]=xt.useState({application:null}),s=()=>{C3("admin",e).then(o=>{if(console.log(o),o.status==="error"){$i("error",o.msg);return}i({application:o.data})})};return xt.useEffect(()=>{s()},[]),r.application===void 0?Ae.jsx(Ae.Fragment,{}):Ae.jsx(bu.I18nextProvider,{i18n:ss,children:Ae.jsx(RV,{application:r.application,onUpdateApplication:o=>{i({application:o})}})})}const iE=xt.createContext(void 0);function NV({applicationName:e,casdoorApiRoot:t,springmicroApiRoot:n,children:r}){bu.useTranslation(),Jr.casdoor=t,n&&(Jr.springmicro=n);const[i,s]=xt.useState({application:null}),[o,a]=xt.useState({}),c=()=>{C3("admin",e).then(b=>{if(console.log(b),b.status==="error"){$i("error",b.msg);return}s({application:b.data})})},l=b=>{s({application:b})},f=(b,g)=>{Rv(b,g).then(y=>{if(y.status==="error"){$i("error",y.msg);return}s({...i,invitation:y.data})})},u=b=>{Mv(b).then(g=>{if(g.status==="ok"){const y=g.data;l(y)}else l(null),s({...i,msg:g.msg})})},d=(b,g)=>TV(b,{password:{state:o,setState:a}},g),h=b=>kh(b,{hidePassword:o}),p=jv,m=Nv;return xt.useEffect(()=>{c()},[]),xt.useEffect(()=>{i.application&&a(BV(i.application.signupItems))},[i.application]),xt.useEffect(()=>{const b=Lv();if(b!==null){const g=window.location.pathname.replace("/signup/oauth/authorize","/login/oauth/authorize");sessionStorage.setItem("signinUrl",g+window.location.search)}if(i.application===void 0)if(i.applicationName!==null){c();const g=new URLSearchParams(window.location.search);if(g.has("invitationCode")){const y=g.get("invitationCode")??"";s({...i,invitationCode:y}),y!==""&&f(y,"admin/"+i.applicationName)}}else b!==null?u(b):($i("error",`Unknown application name: ${i.applicationName}`),l(null))},[]),i.application===void 0||i.application===null?null:Ae.jsx(iE.Provider,{value:{application:i.application,getDefaultValues:MV,getFormProps:PV,icon:d,getZod:OV,getKey:ma,type:h,sendCode:p,requiresCode:rE,getCaptcha:m,isVisible:LV},children:r})}const $V=()=>{const e=xt.useContext(iE);if(!e)throw new Error("useSignUp must be used within a SignUpProvider");return e};let Ih;const FV=new Uint8Array(16);function DV(){if(!Ih&&(Ih=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ih))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ih(FV)}const wi=[];for(let e=0;e<256;++e)wi.push((e+256).toString(16).slice(1));function UV(e,t=0){return wi[e[t+0]]+wi[e[t+1]]+wi[e[t+2]]+wi[e[t+3]]+"-"+wi[e[t+4]]+wi[e[t+5]]+"-"+wi[e[t+6]]+wi[e[t+7]]+"-"+wi[e[t+8]]+wi[e[t+9]]+"-"+wi[e[t+10]]+wi[e[t+11]]+wi[e[t+12]]+wi[e[t+13]]+wi[e[t+14]]+wi[e[t+15]]}const sE={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function HV(e,t,n){if(sE.randomUUID&&!t&&!e)return sE.randomUUID();e=e||{};const r=e.random||(e.rng||DV)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,UV(r)}var R3={},cc={},Th={},Bh={},gl={},Ph={};Ph.byteLength=VV,Ph.toByteArray=qV,Ph.fromByteArray=KV;for(var So=[],Is=[],zV=typeof Uint8Array<"u"?Uint8Array:Array,j3="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",wu=0,GV=j3.length;wu<GV;++wu)So[wu]=j3[wu],Is[j3.charCodeAt(wu)]=wu;Is[45]=62,Is[95]=63;function oE(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");n===-1&&(n=t);var r=n===t?0:4-n%4;return[n,r]}function VV(e){var t=oE(e),n=t[0],r=t[1];return(n+r)*3/4-r}function WV(e,t,n){return(t+n)*3/4-n}function qV(e){var t,n=oE(e),r=n[0],i=n[1],s=new zV(WV(e,r,i)),o=0,a=i>0?r-4:r,c;for(c=0;c<a;c+=4)t=Is[e.charCodeAt(c)]<<18|Is[e.charCodeAt(c+1)]<<12|Is[e.charCodeAt(c+2)]<<6|Is[e.charCodeAt(c+3)],s[o++]=t>>16&255,s[o++]=t>>8&255,s[o++]=t&255;return i===2&&(t=Is[e.charCodeAt(c)]<<2|Is[e.charCodeAt(c+1)]>>4,s[o++]=t&255),i===1&&(t=Is[e.charCodeAt(c)]<<10|Is[e.charCodeAt(c+1)]<<4|Is[e.charCodeAt(c+2)]>>2,s[o++]=t>>8&255,s[o++]=t&255),s}function ZV(e){return So[e>>18&63]+So[e>>12&63]+So[e>>6&63]+So[e&63]}function QV(e,t,n){for(var r,i=[],s=t;s<n;s+=3)r=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(e[s+2]&255),i.push(ZV(r));return i.join("")}function KV(e){for(var t,n=e.length,r=n%3,i=[],s=16383,o=0,a=n-r;o<a;o+=s)i.push(QV(e,o,o+s>a?a:o+s));return r===1?(t=e[n-1],i.push(So[t>>2]+So[t<<4&63]+"==")):r===2&&(t=(e[n-2]<<8)+e[n-1],i.push(So[t>>10]+So[t>>4&63]+So[t<<2&63]+"=")),i.join("")}var N3={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */N3.read=function(e,t,n,r,i){var s,o,a=i*8-r-1,c=(1<<a)-1,l=c>>1,f=-7,u=n?i-1:0,d=n?-1:1,h=e[t+u];for(u+=d,s=h&(1<<-f)-1,h>>=-f,f+=a;f>0;s=s*256+e[t+u],u+=d,f-=8);for(o=s&(1<<-f)-1,s>>=-f,f+=r;f>0;o=o*256+e[t+u],u+=d,f-=8);if(s===0)s=1-l;else{if(s===c)return o?NaN:(h?-1:1)*(1/0);o=o+Math.pow(2,r),s=s-l}return(h?-1:1)*o*Math.pow(2,s-r)},N3.write=function(e,t,n,r,i,s){var o,a,c,l=s*8-i-1,f=(1<<l)-1,u=f>>1,d=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:s-1,p=r?1:-1,m=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,o=f):(o=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-o))<1&&(o--,c*=2),o+u>=1?t+=d/c:t+=d*Math.pow(2,1-u),t*c>=2&&(o++,c/=2),o+u>=f?(a=0,o=f):o+u>=1?(a=(t*c-1)*Math.pow(2,i),o=o+u):(a=t*Math.pow(2,u-1)*Math.pow(2,i),o=0));i>=8;e[n+h]=a&255,h+=p,a/=256,i-=8);for(o=o<<i|a,l+=i;l>0;e[n+h]=o&255,h+=p,o/=256,l-=8);e[n+h-p]|=m*128};/*!
59
59
  * The buffer module from node.js, for the browser.
60
60
  *
61
61
  * @author Feross Aboukhadijeh <https://feross.org>
@@ -1,4 +1,4 @@
1
- import { i as D, t as ue, q as h, B as f, o as He, s as I, y as ce, C as ze, u as je, d as P, n as w, f as $, g as U, e as te } from "./Web3Auth-DtI3oRQ3.js";
1
+ import { i as D, t as ue, q as h, B as f, o as He, s as I, y as ce, C as ze, u as je, d as P, n as w, f as $, g as U, e as te } from "./Web3Auth-BZvmXZfr.js";
2
2
  function A(e) {
3
3
  if (!Number.isSafeInteger(e) || e < 0)
4
4
  throw new Error(`Wrong positive integer: ${e}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@springmicro/auth",
3
- "version": "0.6.1",
3
+ "version": "0.6.3",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -53,5 +53,5 @@
53
53
  "react-social-login-buttons": "^4.1.0",
54
54
  "uuid": "^9.0.1"
55
55
  },
56
- "gitHead": "232d9b1996bd1dbd66a020beee58eeefca8a40a2"
56
+ "gitHead": "019c24a20cf964d4987dd3bcc8672047a0001313"
57
57
  }
Binary file
@@ -64,7 +64,7 @@ export function getIcon(
64
64
  <Button
65
65
  variant="ghost"
66
66
  size="icon"
67
- className="absolute top-1/2 right-2 -translate-y-1/2"
67
+ className="top-1/2 right-2 -translate-y-1/2"
68
68
  onClick={(e) => {
69
69
  e.preventDefault();
70
70
  e.stopPropagation();