@arcblock/did-connect-react 3.3.1 → 3.3.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,128 +1,128 @@
1
- import { jsx as s, jsxs as ee } from "react/jsx-runtime";
1
+ import { jsx as s, jsxs as oe } from "react/jsx-runtime";
2
2
  import t from "prop-types";
3
- import { Box as d } from "@mui/material";
4
- import { LOGIN_PROVIDER as r, LOGIN_PROVIDER_NAME as oe } from "@arcblock/ux/lib/Util/constant";
5
- import { checkSameProtocol as te, getWebWalletUrl as ne } from "@arcblock/ux/lib/Util/wallet";
3
+ import { Box as p } from "@mui/material";
4
+ import { LOGIN_PROVIDER as r, LOGIN_PROVIDER_ICON_SIZE as h, LOGIN_PROVIDER_NAME as te } from "@arcblock/ux/lib/Util/constant";
5
+ import { checkSameProtocol as ne, getWebWalletUrl as re } from "@arcblock/ux/lib/Util/wallet";
6
6
  import u from "lodash/noop";
7
- import { useMemoizedFn as h } from "ahooks";
8
- import y from "js-cookie";
9
- import { detectWalletExtension as re, getCookieOptions as ie } from "@arcblock/ux/lib/Util";
10
- import { useRef as x, useEffect as se } from "react";
11
- import { mergeSx as le } from "@arcblock/ux/lib/Util/style";
12
- import ce from "@arcblock/ux/lib/DIDConnect/provider-icon";
13
- import { GA_LAST_LOGIN_METHOD as p } from "@arcblock/ux/lib/withTracker/constant";
14
- import { translate as ae } from "@arcblock/ux/lib/Locale/util";
15
- import me from "@arcblock/ux/lib/Empty";
7
+ import { useMemoizedFn as g } from "ahooks";
8
+ import I from "js-cookie";
9
+ import { detectWalletExtension as ie, getCookieOptions as se } from "@arcblock/ux/lib/Util";
10
+ import { useRef as L, useEffect as le } from "react";
11
+ import { mergeSx as ce } from "@arcblock/ux/lib/Util/style";
12
+ import ae from "@arcblock/ux/lib/DIDConnect/provider-icon";
13
+ import { GA_LAST_LOGIN_METHOD as d } from "@arcblock/ux/lib/withTracker/constant";
14
+ import { translate as me } from "@arcblock/ux/lib/Locale/util";
15
+ import de from "@arcblock/ux/lib/Empty";
16
16
  import { useBrowser as pe } from "@arcblock/react-hooks";
17
- import de from "./mobile-login-item.js";
17
+ import he from "./mobile-login-item.js";
18
18
  import ue from "./web-login-item.js";
19
- import he from "./login-method-item.js";
20
- import { useOAuth as ge } from "../../../OAuth/context.js";
21
- import { useStateContext as fe } from "../../contexts/state.js";
22
- import { getAppId as ye, logger as xe, getApiErrorMessage as Le } from "../../../utils.js";
19
+ import ge from "./login-method-item.js";
20
+ import { useOAuth as fe } from "../../../OAuth/context.js";
21
+ import { useStateContext as ye } from "../../contexts/state.js";
22
+ import { getAppId as Ie, logger as Le, getApiErrorMessage as xe } from "../../../utils.js";
23
23
  import Ae from "./passkey-login-item.js";
24
- import { usePasskey as Ie } from "../../../Passkey/context.js";
24
+ import { usePasskey as Ee } from "../../../Passkey/context.js";
25
25
  import "../../../Passkey/actions.js";
26
- import Ee from "../../plugins/email/index.js";
27
- import Ce from "../../assets/locale.js";
28
- function Pe({
29
- onSuccess: L = u,
26
+ import Ce from "../../plugins/email/index.js";
27
+ import Pe from "../../assets/locale.js";
28
+ function ve({
29
+ onSuccess: x = u,
30
30
  onError: A = u,
31
31
  size: m = "small",
32
32
  tokenState: n,
33
- webWalletUrl: I = ne(),
33
+ webWalletUrl: E = re(),
34
34
  tokenKey: U,
35
- passkeyBehavior: E = "none",
36
- onReset: g = u,
37
- providerList: f = [],
38
- slotProps: G = {},
39
- disableSwitchApp: C = !1,
40
- forceUpdate: B = u,
41
- magicToken: P = void 0,
42
- baseUrl: K = "/",
35
+ passkeyBehavior: C = "none",
36
+ onReset: f = u,
37
+ providerList: y = [],
38
+ slotProps: B = {},
39
+ disableSwitchApp: P = !1,
40
+ forceUpdate: K = u,
41
+ magicToken: v = void 0,
42
+ baseUrl: V = "/",
43
43
  customItems: q = []
44
44
  }) {
45
- const v = x(null), M = x(null), w = x(null), b = pe(), V = te(I), _ = re(), { loginOAuth: Y, logoutOAuth: H, t: $, oauthState: l } = ge(), { passkeyState: O } = Ie(), { extraParams: T, locale: R, connectState: i, plugins: k, setPlugins: z, setSelectedPlugin: J, getPlugin: j } = fe(), Q = h((e, o = {}) => ae(Ce, e, R, "en", o)), S = h(async (e) => {
46
- localStorage.setItem(p, e.provider), n.reset(), l.reset({
45
+ const _ = L(null), M = L(null), b = L(null), w = pe(), Y = ne(E), O = ie(), { loginOAuth: H, logoutOAuth: Z, t: $, oauthState: l } = fe(), { passkeyState: R } = Ee(), { extraParams: T, locale: k, connectState: i, plugins: S, setPlugins: z, setSelectedPlugin: J, getPlugin: j } = ye(), Q = g((e, o = {}) => me(Pe, e, k, "en", o)), N = g(async (e) => {
46
+ localStorage.setItem(d, e.provider), n.reset(), l.reset({
47
47
  status: "scanned"
48
- }), O.reset(), i.chooseMethod = e.provider;
48
+ }), R.reset(), i.chooseMethod = e.provider;
49
49
  const o = T?.sourceAppPid;
50
50
  try {
51
51
  l.loading = !0, l.status = "scanned";
52
- const c = await Y(e, {
52
+ const c = await H(e, {
53
53
  action: n.action,
54
54
  ...T
55
- }), a = ie({ returnDomain: !1 });
56
- y.remove("connected_did", a), y.remove("connected_pk", a), y.remove("connected_wallet_os", a), c?.sessionToken && (await L(
55
+ }), a = se({ returnDomain: !1 });
56
+ I.remove("connected_did", a), I.remove("connected_pk", a), I.remove("connected_wallet_os", a), c?.sessionToken && (await x(
57
57
  {
58
58
  ...c,
59
59
  encrypted: !1
60
60
  },
61
- (Z) => Z,
61
+ (ee) => ee,
62
62
  {
63
63
  sourceAppPid: o,
64
- connected_app: ye(n.appInfo, n.memberAppInfo)
64
+ connected_app: Ie(n.appInfo, n.memberAppInfo)
65
65
  }
66
66
  ), l.loading = !1, l.status = "succeed");
67
67
  } catch (c) {
68
- xe.error(`Failed login OAuth: ${e.provider}`, c);
69
- const a = Le(c, $("loginOAuthFailed"));
70
- l.loading = !1, l.error = a, l.status = "error", await H({ provider: e.provider }), A(new Error(a));
68
+ Le.error(`Failed login OAuth: ${e.provider}`, c);
69
+ const a = xe(c, $("loginOAuthFailed"));
70
+ l.loading = !1, l.error = a, l.status = "error", await Z({ provider: e.provider }), A(new Error(a));
71
71
  }
72
- }), W = h(async () => {
73
- n.reset(), await g(), n.status = "created", i.chooseMethod = "wallet";
74
- }), D = f.some((e) => e.provider === r.EMAIL), F = Ee({ baseUrl: K }), X = h(() => {
75
- if (P && f.some((e) => e.name === r.EMAIL) && k.some((e) => e.name === r.EMAIL)) {
72
+ }), D = g(async () => {
73
+ n.reset(), await f(), n.status = "created", i.chooseMethod = "wallet";
74
+ }), W = y.some((e) => e.provider === r.EMAIL), F = Ce({ baseUrl: V }), X = g(() => {
75
+ if (v && y.some((e) => e.name === r.EMAIL) && S.some((e) => e.name === r.EMAIL)) {
76
76
  const e = j(r.EMAIL);
77
- e.state.status === "idle" && (localStorage.setItem(p, "email"), e.state.reset(), e.state.magicToken = P, i.chooseMethod = r.EMAIL, J(e), B());
77
+ e.state.status === "idle" && (localStorage.setItem(d, "email"), e.state.reset(), e.state.magicToken = v, i.chooseMethod = r.EMAIL, J(e), K());
78
78
  }
79
79
  });
80
- se(() => {
80
+ le(() => {
81
81
  const e = [];
82
- if (D) {
82
+ if (W) {
83
83
  const o = j(r.EMAIL);
84
84
  o && o.baseUrl === F.baseUrl ? e.push(o) : e.push(F);
85
85
  }
86
- z(e), i.retryConnect = W, setTimeout(() => {
86
+ z(e), i.retryConnect = D, setTimeout(() => {
87
87
  X();
88
88
  }, 100);
89
- }, [D]);
90
- const N = f.map((e) => {
89
+ }, [W]);
90
+ const G = y.map((e) => {
91
91
  if (e.provider === r.WALLET) {
92
- if (b.mobile.any)
92
+ if (w.mobile.any)
93
93
  return /* @__PURE__ */ s(
94
- de,
94
+ he,
95
95
  {
96
- ref: v,
96
+ ref: _,
97
97
  tokenState: n,
98
98
  sx: [m === "small" ? { p: 1 } : { p: 2 }],
99
- locale: R,
99
+ locale: k,
100
100
  tokenKey: U,
101
- disableSwitchApp: C,
101
+ disableSwitchApp: P,
102
102
  onClick: async () => {
103
- localStorage.setItem(p, "wallet"), n.reset(), await g(), n.status = "created", i.chooseMethod = "wallet";
104
- const o = v.current?.connect;
103
+ localStorage.setItem(d, "wallet"), n.reset(), await f(), n.status = "created", i.chooseMethod = "wallet";
104
+ const o = _.current?.connect;
105
105
  i.retryConnect = () => {
106
- o(W);
106
+ o(D);
107
107
  };
108
108
  }
109
109
  },
110
110
  r.WALLET
111
111
  );
112
- if ((V || _) && (!b.mobile.any || _))
112
+ if ((Y || O) && (!w.mobile.any || O))
113
113
  return /* @__PURE__ */ s(
114
114
  ue,
115
115
  {
116
116
  ref: M,
117
117
  tokenState: n,
118
- webWalletUrl: I,
118
+ webWalletUrl: E,
119
119
  sx: [m === "small" ? { p: 1 } : { p: 2 }],
120
- disableSwitchApp: C,
120
+ disableSwitchApp: P,
121
121
  onClick: () => {
122
- localStorage.setItem(p, "wallet"), n.status = "scanned", i.chooseMethod = "wallet-web";
122
+ localStorage.setItem(d, "wallet"), n.status = "scanned", i.chooseMethod = "wallet-web";
123
123
  const o = M.current.connect;
124
124
  i.retryConnect = async () => {
125
- await g(), n.error = "", n.status = "scanned", o();
125
+ await f(), n.error = "", n.status = "scanned", o();
126
126
  };
127
127
  }
128
128
  },
@@ -130,28 +130,28 @@ function Pe({
130
130
  );
131
131
  }
132
132
  if (e.provider === r.PASSKEY)
133
- return E === "none" ? null : /* @__PURE__ */ s(
133
+ return C === "none" ? null : /* @__PURE__ */ s(
134
134
  Ae,
135
135
  {
136
- ref: w,
137
- onSuccess: L,
136
+ ref: b,
137
+ onSuccess: x,
138
138
  onError: A,
139
139
  tokenState: n,
140
- behavior: E,
140
+ behavior: C,
141
141
  sx: [m === "small" ? { p: 1 } : { p: 2 }],
142
142
  onClick: () => {
143
- localStorage.setItem(p, "passkey");
144
- const o = w.current.connect;
143
+ localStorage.setItem(d, "passkey");
144
+ const o = b.current.connect;
145
145
  i.chooseMethod = "passkey", i.retryConnect = () => {
146
- O.verifying = !0, i.chooseMethod = "passkey", o();
146
+ R.verifying = !0, i.chooseMethod = "passkey", o();
147
147
  };
148
148
  },
149
149
  slotProps: {
150
150
  icon: {
151
151
  sx: {
152
- fontSize: 24,
152
+ fontSize: h,
153
153
  "& svg": {
154
- fontSize: 24,
154
+ fontSize: h,
155
155
  width: "1em",
156
156
  height: "1em"
157
157
  }
@@ -162,7 +162,7 @@ function Pe({
162
162
  r.PASSKEY
163
163
  );
164
164
  if (e.provider === r.EMAIL) {
165
- const o = k.find((c) => c.name === r.EMAIL);
165
+ const o = S.find((c) => c.name === r.EMAIL);
166
166
  return o ? o?.renderListItem({
167
167
  key: o.name,
168
168
  sx: [m === "small" ? { p: 1 } : { p: 2 }]
@@ -170,41 +170,41 @@ function Pe({
170
170
  }) : null;
171
171
  }
172
172
  return e.type === "oauth" ? /* @__PURE__ */ s(
173
- he,
173
+ ge,
174
174
  {
175
- title: oe[e.provider],
175
+ title: te[e.provider],
176
176
  icon: /* @__PURE__ */ s(
177
- ce,
177
+ ae,
178
178
  {
179
179
  provider: e.provider,
180
180
  sx: {
181
181
  transform: "scale(0.95)",
182
- width: 24,
183
- height: 24,
182
+ width: h,
183
+ height: h,
184
184
  color: "text.primary"
185
185
  }
186
186
  }
187
187
  ),
188
188
  onClick: () => {
189
- S(e), i.retryConnect = () => {
190
- S(e);
189
+ N(e), i.retryConnect = () => {
190
+ N(e);
191
191
  };
192
192
  },
193
- sx: [m === "small" ? { p: 1 } : { p: 2 }]
193
+ sx: [m === "small" ? { p: 1.2 } : { p: 2 }]
194
194
  },
195
195
  e.provider
196
196
  ) : null;
197
197
  }).filter(Boolean);
198
- return /* @__PURE__ */ s(d, { className: "did-connect__choose", sx: le({ flex: 1 }, G?.root?.sx), children: /* @__PURE__ */ s(
199
- d,
198
+ return /* @__PURE__ */ s(p, { className: "did-connect__choose", sx: ce({ flex: 1 }, B?.root?.sx), children: /* @__PURE__ */ s(
199
+ p,
200
200
  {
201
201
  sx: {
202
202
  display: "flex",
203
203
  flexDirection: "column",
204
204
  gap: 2
205
205
  },
206
- children: /* @__PURE__ */ ee(
207
- d,
206
+ children: /* @__PURE__ */ oe(
207
+ p,
208
208
  {
209
209
  sx: [
210
210
  {
@@ -215,15 +215,19 @@ function Pe({
215
215
  ],
216
216
  children: [
217
217
  /* @__PURE__ */ s(
218
- d,
218
+ p,
219
219
  {
220
220
  sx: {
221
221
  display: "grid",
222
222
  gridTemplateColumns: "repeat(12, 1fr)",
223
- gap: 1.25,
223
+ gap: 1.5,
224
224
  ".arc-login-item:nth-child(-n+3)": {
225
225
  gridColumn: "span 12"
226
226
  },
227
+ // 当登录项大于等于 5 时,第三个登录项增加一个 marginBottom,用于分割独占一行的和一行多个的登录项
228
+ ".arc-login-item:nth-child(3):nth-last-child(n+3)": {
229
+ mb: 1
230
+ },
227
231
  ".arc-login-item:nth-child(4):last-child": {
228
232
  gridColumn: "span 12"
229
233
  },
@@ -256,8 +260,8 @@ function Pe({
256
260
  }
257
261
  }
258
262
  },
259
- children: N.length > 0 ? N : /* @__PURE__ */ s(
260
- me,
263
+ children: G.length > 0 ? G : /* @__PURE__ */ s(
264
+ de,
261
265
  {
262
266
  className: "arc-login-item",
263
267
  sx: {
@@ -277,7 +281,7 @@ function Pe({
277
281
  }
278
282
  ) });
279
283
  }
280
- Pe.propTypes = {
284
+ ve.propTypes = {
281
285
  onSuccess: t.func,
282
286
  onError: t.func,
283
287
  size: t.oneOf(["small", "normal", "large"]),
@@ -295,5 +299,5 @@ Pe.propTypes = {
295
299
  customItems: t.arrayOf(t.node)
296
300
  };
297
301
  export {
298
- Pe as default
302
+ ve as default
299
303
  };
@@ -1,20 +1,21 @@
1
- import { jsxs as t, jsx as e, Fragment as x } from "react/jsx-runtime";
2
- import { useTheme as g, Box as r, Tooltip as y, Typography as s } from "@mui/material";
1
+ import { jsxs as t, jsx as e, Fragment as g } from "react/jsx-runtime";
2
+ import { useTheme as y, Box as r, Tooltip as u, Typography as s } from "@mui/material";
3
3
  import { Icon as c } from "@iconify/react";
4
- import { isValidElement as u } from "react";
4
+ import { isValidElement as _ } from "react";
5
5
  import o from "prop-types";
6
6
  import { mergeSx as m } from "@arcblock/ux/lib/Util/style";
7
- import b from "@iconify-icons/material-symbols/arrow-right-alt-rounded";
8
- function _({
7
+ import { LOGIN_PROVIDER_ICON_SIZE as p } from "@arcblock/ux/lib/Util/constant";
8
+ import I from "@iconify-icons/material-symbols/arrow-right-alt-rounded";
9
+ function b({
9
10
  title: n,
10
11
  description: a = null,
11
12
  icon: i,
12
- iconScale: p = 0.95,
13
- slotProps: d = {},
14
- mode: f = "normal",
13
+ iconScale: d = 0.95,
14
+ slotProps: f = {},
15
+ mode: h = "normal",
15
16
  ...l
16
17
  }) {
17
- const h = g();
18
+ const x = y();
18
19
  return /* @__PURE__ */ t(
19
20
  r,
20
21
  {
@@ -26,7 +27,7 @@ function _({
26
27
  alignItems: "center",
27
28
  gap: 1,
28
29
  cursor: "pointer",
29
- p: 1,
30
+ p: 1.2,
30
31
  borderRadius: 1,
31
32
  backgroundColor: "grey.50",
32
33
  textDecoration: "none",
@@ -50,7 +51,7 @@ function _({
50
51
  l?.sx
51
52
  ),
52
53
  children: [
53
- /* @__PURE__ */ e(y, { title: n, children: /* @__PURE__ */ e(
54
+ /* @__PURE__ */ e(u, { title: n, children: /* @__PURE__ */ e(
54
55
  r,
55
56
  {
56
57
  className: "arc-login-item__icon",
@@ -61,23 +62,23 @@ function _({
61
62
  alignItems: "center",
62
63
  color: "text.primary"
63
64
  },
64
- d?.icon?.sx
65
+ f?.icon?.sx
65
66
  ),
66
- children: u(i) ? i : /* @__PURE__ */ e(
67
+ children: _(i) ? i : /* @__PURE__ */ e(
67
68
  r,
68
69
  {
69
70
  component: c,
70
71
  icon: i,
71
72
  sx: {
72
- transform: `scale(${p})`,
73
- width: 24,
74
- height: 24
73
+ transform: `scale(${d})`,
74
+ width: p,
75
+ height: p
75
76
  }
76
77
  }
77
78
  )
78
79
  }
79
80
  ) }),
80
- f === "normal" ? /* @__PURE__ */ t(x, { children: [
81
+ h === "normal" ? /* @__PURE__ */ t(g, { children: [
81
82
  /* @__PURE__ */ t(r, { className: "arc-login-item__body", sx: { display: "flex", flexDirection: "column", flex: 1 }, children: [
82
83
  /* @__PURE__ */ e(
83
84
  s,
@@ -107,9 +108,9 @@ function _({
107
108
  c,
108
109
  {
109
110
  className: "other-item-icon",
110
- icon: b,
111
+ icon: I,
111
112
  fontSize: "1.3rem",
112
- color: h.palette.primary.main
113
+ color: x.palette.primary.main
113
114
  }
114
115
  )
115
116
  ] }) : null
@@ -117,7 +118,7 @@ function _({
117
118
  }
118
119
  );
119
120
  }
120
- _.propTypes = {
121
+ b.propTypes = {
121
122
  title: o.string.isRequired,
122
123
  description: o.string,
123
124
  icon: o.any.isRequired,
@@ -126,5 +127,5 @@ _.propTypes = {
126
127
  mode: o.oneOf(["mini", "simple", "normal"])
127
128
  };
128
129
  export {
129
- _ as default
130
+ b as default
130
131
  };
@@ -1,35 +1,35 @@
1
- import { jsx as p } from "react/jsx-runtime";
1
+ import { jsx as m } from "react/jsx-runtime";
2
2
  import n from "prop-types";
3
3
  import { CircularProgress as D } from "@mui/material";
4
- import { useReactive as T, useCreation as W, useMemoizedFn as a } from "ahooks";
5
- import O from "@arcblock/bridge";
6
- import { useBrowser as E } from "@arcblock/react-hooks";
7
- import q from "lodash/noop";
8
- import { useImperativeHandle as F } from "react";
9
- import { mergeSx as M } from "@arcblock/ux/lib/Util/style";
10
- import N from "@arcblock/ux/lib/DIDConnect/provider-icon";
11
- import { LOGIN_PROVIDER as _ } from "@arcblock/ux/lib/Util/constant";
12
- import { useStateContext as j } from "../../contexts/state.js";
13
- import z from "./login-method-item.js";
14
- import { logger as I } from "../../../utils.js";
4
+ import { useReactive as E, useCreation as T, useMemoizedFn as a } from "ahooks";
5
+ import W from "@arcblock/bridge";
6
+ import { useBrowser as _ } from "@arcblock/react-hooks";
7
+ import N from "lodash/noop";
8
+ import { useImperativeHandle as q } from "react";
9
+ import { mergeSx as F } from "@arcblock/ux/lib/Util/style";
10
+ import M from "@arcblock/ux/lib/DIDConnect/provider-icon";
11
+ import { LOGIN_PROVIDER_ICON_SIZE as p, LOGIN_PROVIDER as j } from "@arcblock/ux/lib/Util/constant";
12
+ import { useStateContext as z } from "../../contexts/state.js";
13
+ import G from "./login-method-item.js";
14
+ import { logger as b } from "../../../utils.js";
15
15
  import J from "../../hooks/auth-url.js";
16
16
  function K({
17
- ref: b = null,
17
+ ref: w = null,
18
18
  tokenState: e,
19
- locale: w,
20
- tokenKey: y,
21
- onClick: C = q,
22
- disableSwitchApp: P = !1,
23
- ...m
19
+ locale: C,
20
+ tokenKey: P,
21
+ onClick: y = N,
22
+ disableSwitchApp: R = !1,
23
+ ...f
24
24
  }) {
25
- const l = T({
25
+ const l = E({
26
26
  loading: !1
27
- }), { isWalletWebview: f } = j(), x = "DID Wallet", c = E(), d = new URL(window.location.href), A = J({ disableSwitchApp: P, tokenState: e }), h = W(() => {
27
+ }), { isWalletWebview: d } = z(), A = "DID Wallet", c = _(), h = new URL(window.location.href), L = J({ disableSwitchApp: R, tokenState: e }), u = T(() => {
28
28
  if (!e.url)
29
29
  return "";
30
- d.searchParams.set("tokenKey", e.token);
31
- const o = new URL(A);
32
- c.wallet || (o.searchParams.set("callback", encodeURIComponent(d)), o.searchParams.set("callback_delay", 1500)), o.searchParams.set("locale", w);
30
+ h.searchParams.set("tokenKey", e.token);
31
+ const o = new URL(L);
32
+ c.wallet || (o.searchParams.set("callback", encodeURIComponent(h)), o.searchParams.set("callback_delay", 1500)), o.searchParams.set("locale", C);
33
33
  const g = new TextEncoder(), v = o.href.length;
34
34
  let r = "", i = "";
35
35
  try {
@@ -42,56 +42,56 @@ function K({
42
42
  i = btoa(String.fromCharCode(...t));
43
43
  }
44
44
  if (v + 8 + r.length + 14 + i.length > 2e3)
45
- throw I.warn("URL too long, drop appInfo & memberAppInfo", { appInfo: r, memberAppInfo: i }), new Error("URL too long");
45
+ throw b.warn("URL too long, drop appInfo & memberAppInfo", { appInfo: r, memberAppInfo: i }), new Error("URL too long");
46
46
  i ? r && (o.searchParams.set("appInfo", r), o.searchParams.set("memberAppInfo", i)) : r && o.searchParams.set("appInfo", r);
47
47
  } catch (t) {
48
- I.warn("Failed to convert appInfo & memberAppInfo", t);
48
+ b.warn("Failed to convert appInfo & memberAppInfo", t);
49
49
  }
50
50
  return o.href.replace(/^https?:\/\//, "abt://");
51
- }, [y, e.token, e.appInfo, e.memberAppInfo, e.url]), L = a(() => {
51
+ }, [P, e.token, e.appInfo, e.memberAppInfo, e.url]), x = a(() => {
52
52
  l.loading = !0, setTimeout(() => {
53
- O.call("authAction", { action: "auth", deepLink: h });
53
+ W.call("authAction", { action: "auth", deepLink: u });
54
54
  }, 600), setTimeout(() => {
55
55
  l.loading = !1;
56
56
  }, 2e3);
57
- }), R = a(() => {
57
+ }), O = a(() => {
58
58
  e.checking = !0, e.status = "scanned";
59
59
  }), s = {};
60
- !f && c.mobile.any && (s.component = "a", s.href = h), e.url || (s.sx = {
60
+ !d && c.mobile.any && (s.component = "a", s.href = u), e.url || (s.sx = {
61
61
  cursor: "not-allowed"
62
62
  });
63
- const u = a((o) => {
64
- e.url && (f ? L() : c.mobile.any ? R() : o());
63
+ const I = a((o) => {
64
+ e.url && (d ? x() : c.mobile.any ? O() : o());
65
65
  }), U = a(() => {
66
- u(C);
66
+ I(y);
67
67
  });
68
- return F(b, () => ({
69
- connect: u
70
- })), /* @__PURE__ */ p(
71
- z,
68
+ return q(w, () => ({
69
+ connect: I
70
+ })), /* @__PURE__ */ m(
71
+ G,
72
72
  {
73
- ...m,
73
+ ...f,
74
74
  ...s,
75
- sx: M(m?.sx, s?.sx),
76
- title: x,
77
- icon: l.loading || !e.url ? /* @__PURE__ */ p(
75
+ sx: F(f?.sx, s?.sx),
76
+ title: A,
77
+ icon: l.loading || !e.url ? /* @__PURE__ */ m(
78
78
  D,
79
79
  {
80
80
  color: "primary",
81
- size: 24,
81
+ size: p,
82
82
  sx: {
83
83
  "& svg": {
84
84
  transform: "scale(0.75)"
85
85
  }
86
86
  }
87
87
  }
88
- ) : /* @__PURE__ */ p(
89
- N,
88
+ ) : /* @__PURE__ */ m(
89
+ M,
90
90
  {
91
- width: "24px",
92
- height: "24px",
93
- provider: _.DID_WALLET,
94
- style: {
91
+ provider: j.DID_WALLET,
92
+ sx: {
93
+ width: p,
94
+ height: p,
95
95
  transform: "scale(0.9)"
96
96
  }
97
97
  }