@zerodev/wallet-react-ui 0.0.4 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_types/auth/components/BlobAnimation/index.d.ts +1 -1
- package/dist/_types/auth/components/BlobAnimation/index.d.ts.map +1 -1
- package/dist/_types/auth/components/CodeInput/index.d.ts +1 -1
- package/dist/_types/auth/components/CodeInput/index.d.ts.map +1 -1
- package/dist/_types/auth/index.d.ts +1 -1
- package/dist/_types/auth/index.d.ts.map +1 -1
- package/dist/_types/auth/pages/EmailVerification.d.ts +1 -1
- package/dist/_types/auth/pages/EmailVerification.d.ts.map +1 -1
- package/dist/_types/auth/pages/ErrorScreen.d.ts +1 -1
- package/dist/_types/auth/pages/ErrorScreen.d.ts.map +1 -1
- package/dist/_types/auth/pages/OtpInput.d.ts +1 -1
- package/dist/_types/auth/pages/OtpInput.d.ts.map +1 -1
- package/dist/_types/auth/pages/SignUp.d.ts +1 -1
- package/dist/_types/auth/pages/SignUp.d.ts.map +1 -1
- package/dist/_types/auth/pages/Verifying.d.ts +1 -1
- package/dist/_types/auth/pages/Verifying.d.ts.map +1 -1
- package/dist/_types/auth/pages/WalletSelection.d.ts +1 -1
- package/dist/_types/auth/pages/WalletSelection.d.ts.map +1 -1
- package/dist/_types/shared/components/SignUpFooter/index.d.ts +1 -1
- package/dist/_types/shared/components/SignUpFooter/index.d.ts.map +1 -1
- package/dist/_types/shared/components/StatusScreen/index.d.ts +1 -1
- package/dist/_types/shared/components/StatusScreen/index.d.ts.map +1 -1
- package/dist/_types/shared/utils/common.d.ts +0 -1
- package/dist/_types/shared/utils/common.d.ts.map +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +454 -881
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +2 -2
- package/package.json +10 -9
- package/src/auth/index.tsx +3 -4
- package/src/auth/pages/EmailVerification.tsx +1 -2
- package/src/auth/pages/ErrorScreen.tsx +1 -2
- package/src/auth/pages/OtpInput.tsx +1 -2
- package/src/auth/pages/SignUp.tsx +11 -3
- package/src/auth/pages/Verifying.tsx +1 -2
- package/src/auth/pages/WalletSelection.tsx +12 -4
- package/src/shared/components/SignUpFooter/index.tsx +1 -2
- package/src/shared/utils/common.ts +0 -12
- package/dist/_types/shared/components/PoweredBy/index.d.ts +0 -6
- package/dist/_types/shared/components/PoweredBy/index.d.ts.map +0 -1
- package/dist/_types/shared/components/Screen/EllipticalRadial.d.ts +0 -23
- package/dist/_types/shared/components/Screen/EllipticalRadial.d.ts.map +0 -1
- package/dist/_types/shared/components/Screen/MultiRadialBackground.d.ts +0 -4
- package/dist/_types/shared/components/Screen/MultiRadialBackground.d.ts.map +0 -1
- package/dist/_types/shared/components/Screen/index.d.ts +0 -10
- package/dist/_types/shared/components/Screen/index.d.ts.map +0 -1
- package/dist/_types/shared/components/TopNav/index.d.ts +0 -10
- package/dist/_types/shared/components/TopNav/index.d.ts.map +0 -1
- package/src/shared/components/PoweredBy/index.tsx +0 -27
- package/src/shared/components/Screen/EllipticalRadial.tsx +0 -65
- package/src/shared/components/Screen/MultiRadialBackground.tsx +0 -323
- package/src/shared/components/Screen/index.tsx +0 -85
- package/src/shared/components/TopNav/index.tsx +0 -48
package/dist/index.mjs
CHANGED
|
@@ -1,516 +1,83 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { jsxs as c, jsx as n, Fragment as A } from "react/jsx-runtime";
|
|
2
|
+
import { Text as m, cn as G, PoweredBy as B, Button as E, Wrapper as ne, ListItem as $, ListItemChevron as re, ListItemIcon as D, Input as se, Icon as ie, Screen as ae, TopNav as oe } from "@zerodev/react-ui";
|
|
3
|
+
import { useState as w, useEffect as O, useMemo as le, useRef as K } from "react";
|
|
4
|
+
import { useStore as I, create as de } from "zustand";
|
|
5
5
|
import { useConfig as ce, useConnect as ue } from "wagmi";
|
|
6
|
-
import { useSendMagicLink as Y, useSendOTP as J, useVerifyOTP as
|
|
6
|
+
import { useSendMagicLink as Y, useSendOTP as J, useVerifyOTP as he, useAuthenticateOAuth as pe, useRegisterPasskey as me, useLoginPasskey as ze, useVerifyMagicLink as fe, zeroDevWallet as ge, NotAuthenticatedError as ye } from "@zerodev/wallet-react";
|
|
7
7
|
import { subscribeWithSelector as xe } from "zustand/middleware";
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
logo: n,
|
|
14
|
-
className: o
|
|
15
|
-
}) {
|
|
16
|
-
return /* @__PURE__ */ d(
|
|
17
|
-
"div",
|
|
18
|
-
{
|
|
19
|
-
className: R(
|
|
20
|
-
"zd:absolute zd:top-4 zd:left-0 zd:right-0 zd:flex zd:flex-row zd:items-center zd:justify-between",
|
|
21
|
-
o
|
|
22
|
-
),
|
|
23
|
-
style: { height: `calc(${Z / 4} * var(--zd-spacing))` },
|
|
24
|
-
children: [
|
|
25
|
-
e ? /* @__PURE__ */ t(q, { iconName: "chevronLeft", onClick: e }) : /* @__PURE__ */ t("div", { className: "zd:h-13 zd:w-13" }),
|
|
26
|
-
n && /* @__PURE__ */ t("div", { className: "zd:absolute zd:left-0 zd:right-0 zd:flex zd:items-center zd:justify-center zd:pointer-events-none", children: n }),
|
|
27
|
-
r && /* @__PURE__ */ t("div", { className: "zd:absolute zd:left-0 zd:right-0 zd:flex zd:items-center zd:justify-center zd:pointer-events-none", children: /* @__PURE__ */ t(h, { className: "zd:text-body1", children: r }) }),
|
|
28
|
-
/* @__PURE__ */ t(q, { iconName: "x", onClick: i })
|
|
29
|
-
]
|
|
30
|
-
}
|
|
31
|
-
);
|
|
32
|
-
}
|
|
33
|
-
function ve({
|
|
34
|
-
layer: e,
|
|
35
|
-
rect: i
|
|
36
|
-
}) {
|
|
37
|
-
const { id: r, matrix: n, fillOpacity: o, stops: c } = e;
|
|
38
|
-
return /* @__PURE__ */ d(b, { children: [
|
|
39
|
-
/* @__PURE__ */ t("defs", { children: /* @__PURE__ */ t(
|
|
40
|
-
"radialGradient",
|
|
41
|
-
{
|
|
42
|
-
id: r,
|
|
43
|
-
cx: "0",
|
|
44
|
-
cy: "0",
|
|
45
|
-
r: "1",
|
|
46
|
-
gradientUnits: "userSpaceOnUse",
|
|
47
|
-
gradientTransform: `matrix(${n.join(" ")})`,
|
|
48
|
-
children: c.map((s, u) => /* @__PURE__ */ t(
|
|
49
|
-
"stop",
|
|
50
|
-
{
|
|
51
|
-
offset: s.offset,
|
|
52
|
-
stopColor: s.color,
|
|
53
|
-
stopOpacity: s.opacity
|
|
54
|
-
},
|
|
55
|
-
s.color + u.toString()
|
|
56
|
-
))
|
|
57
|
-
}
|
|
58
|
-
) }),
|
|
59
|
-
/* @__PURE__ */ t(
|
|
60
|
-
"rect",
|
|
61
|
-
{
|
|
62
|
-
x: i.x,
|
|
63
|
-
y: i.y,
|
|
64
|
-
width: i.width,
|
|
65
|
-
height: i.height,
|
|
66
|
-
fill: `url(#${r})`,
|
|
67
|
-
fillOpacity: o
|
|
68
|
-
}
|
|
69
|
-
)
|
|
70
|
-
] });
|
|
71
|
-
}
|
|
72
|
-
const Ne = "-6 -6 412 812";
|
|
73
|
-
function Se() {
|
|
74
|
-
return /* @__PURE__ */ t("div", { className: "zd:absolute zd:inset-0 zd:z-0 zd:rounded-4xl zd:pointer-events-none", children: /* @__PURE__ */ t(
|
|
75
|
-
"svg",
|
|
76
|
-
{
|
|
77
|
-
width: "100%",
|
|
78
|
-
height: "100%",
|
|
79
|
-
viewBox: Ne,
|
|
80
|
-
preserveAspectRatio: "none",
|
|
81
|
-
role: "img",
|
|
82
|
-
"aria-label": "Decorative gradient background",
|
|
83
|
-
children: /* @__PURE__ */ t("rect", { x: "-6", y: "-6", width: "412", height: "812", fill: "#FBF7F2" })
|
|
84
|
-
}
|
|
85
|
-
) });
|
|
86
|
-
}
|
|
87
|
-
function Ee() {
|
|
88
|
-
const e = V(), i = [
|
|
89
|
-
{
|
|
90
|
-
// (CSS #6) blue → top-right. x-radius widened so the lobe reaches further
|
|
91
|
-
// left; y-radius kept short so it stays up top and doesn't bleed into the
|
|
92
|
-
// orange band.
|
|
93
|
-
id: `${e}-blue`,
|
|
94
|
-
matrix: [1850, 0, 0, 645, 381.44, 0],
|
|
95
|
-
fillOpacity: 1,
|
|
96
|
-
stops: [
|
|
97
|
-
{ offset: 0, color: "#45ABFB", opacity: 0.66 },
|
|
98
|
-
{ offset: 0.4615, color: "#1E9AFB", opacity: 0.35 },
|
|
99
|
-
{ offset: 1, color: "#45ABFB", opacity: 0 }
|
|
100
|
-
]
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
// (CSS #5) offWhite → blue, very faint
|
|
104
|
-
id: `${e}-offwhite-tr`,
|
|
105
|
-
matrix: [55.28, 0, 0, 773.36, 386.68, 13.28],
|
|
106
|
-
fillOpacity: 1,
|
|
107
|
-
stops: [
|
|
108
|
-
{ offset: 0, color: "#F7F5F0", opacity: 0.1 },
|
|
109
|
-
{ offset: 1, color: "#45ABFB", opacity: 0 }
|
|
110
|
-
]
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
// (CSS #4) warmGrey
|
|
114
|
-
id: `${e}-warmgrey`,
|
|
115
|
-
matrix: [326.72, 0, 0, 855.52, 0, 50.32],
|
|
116
|
-
fillOpacity: 1,
|
|
117
|
-
stops: [
|
|
118
|
-
{ offset: 0, color: "#E3CFC3", opacity: 1 },
|
|
119
|
-
{ offset: 1, color: "#E3CFC3", opacity: 0 }
|
|
120
|
-
]
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
// (CSS #3) orange — spans the full width across the bottom ~30%, uniform.
|
|
124
|
-
id: `${e}-orange`,
|
|
125
|
-
matrix: [580, 0, 0, 380, 200, 835],
|
|
126
|
-
fillOpacity: 1,
|
|
127
|
-
stops: [
|
|
128
|
-
{ offset: 0, color: "#EE6C2E", opacity: 0.8 },
|
|
129
|
-
{ offset: 0.55, color: "#EE6C2E", opacity: 0.6 },
|
|
130
|
-
{ offset: 1, color: "#EE6C2E", opacity: 0.15 }
|
|
131
|
-
]
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
// (CSS #2) peach — spread further up (~30% of the bottom), a bit more vivid
|
|
135
|
-
id: `${e}-peach`,
|
|
136
|
-
matrix: [520, 0, 0, 560, 180, 830],
|
|
137
|
-
fillOpacity: 1,
|
|
138
|
-
stops: [
|
|
139
|
-
{ offset: 0, color: "#FAC8AC", opacity: 1 },
|
|
140
|
-
{ offset: 1, color: "#F27B3E", opacity: 0 }
|
|
141
|
-
]
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
// (CSS #1) white glow (topmost of the colour stack)
|
|
145
|
-
id: `${e}-white-bl`,
|
|
146
|
-
matrix: [90.72, 0, 0, 550.48, 38.04, 702.64],
|
|
147
|
-
fillOpacity: 1,
|
|
148
|
-
stops: [
|
|
149
|
-
{ offset: 0, color: "white", opacity: 0.58 },
|
|
150
|
-
{ offset: 1, color: "white", opacity: 0 }
|
|
151
|
-
]
|
|
152
|
-
}
|
|
153
|
-
];
|
|
154
|
-
return /* @__PURE__ */ t("div", { className: "zd:absolute zd:inset-0 zd:z-0 zd:rounded-4xl zd:pointer-events-none zd:overflow-hidden", children: /* @__PURE__ */ d(
|
|
155
|
-
"svg",
|
|
156
|
-
{
|
|
157
|
-
width: "100%",
|
|
158
|
-
height: "100%",
|
|
159
|
-
viewBox: "0 0 400 800",
|
|
160
|
-
preserveAspectRatio: "none",
|
|
161
|
-
role: "presentation",
|
|
162
|
-
children: [
|
|
163
|
-
i.map((r) => /* @__PURE__ */ t(
|
|
164
|
-
ve,
|
|
165
|
-
{
|
|
166
|
-
layer: r,
|
|
167
|
-
rect: { x: 0, y: 0, width: 400, height: 800 }
|
|
168
|
-
},
|
|
169
|
-
r.id
|
|
170
|
-
)),
|
|
171
|
-
/* @__PURE__ */ t("defs", { children: /* @__PURE__ */ d(
|
|
172
|
-
"linearGradient",
|
|
173
|
-
{
|
|
174
|
-
id: `${e}-vfade`,
|
|
175
|
-
x1: "0",
|
|
176
|
-
y1: "0",
|
|
177
|
-
x2: "0",
|
|
178
|
-
y2: "800",
|
|
179
|
-
gradientUnits: "userSpaceOnUse",
|
|
180
|
-
children: [
|
|
181
|
-
/* @__PURE__ */ t("stop", { offset: "0", stopColor: "white", stopOpacity: "0.55" }),
|
|
182
|
-
/* @__PURE__ */ t("stop", { offset: "0.45", stopColor: "white", stopOpacity: "0.52" }),
|
|
183
|
-
/* @__PURE__ */ t("stop", { offset: "0.65", stopColor: "white", stopOpacity: "0.5" }),
|
|
184
|
-
/* @__PURE__ */ t("stop", { offset: "0.85", stopColor: "white", stopOpacity: "0.5" }),
|
|
185
|
-
/* @__PURE__ */ t("stop", { offset: "1", stopColor: "white", stopOpacity: "0.5" })
|
|
186
|
-
]
|
|
187
|
-
}
|
|
188
|
-
) }),
|
|
189
|
-
/* @__PURE__ */ t(
|
|
190
|
-
"rect",
|
|
191
|
-
{
|
|
192
|
-
x: "0",
|
|
193
|
-
y: "0",
|
|
194
|
-
width: "400",
|
|
195
|
-
height: "800",
|
|
196
|
-
fill: `url(#${e}-vfade)`
|
|
197
|
-
}
|
|
198
|
-
),
|
|
199
|
-
/* @__PURE__ */ t("defs", { children: /* @__PURE__ */ d(
|
|
200
|
-
"linearGradient",
|
|
201
|
-
{
|
|
202
|
-
id: `${e}-bluefade`,
|
|
203
|
-
x1: "0",
|
|
204
|
-
y1: "800",
|
|
205
|
-
x2: "120",
|
|
206
|
-
y2: "640",
|
|
207
|
-
gradientUnits: "userSpaceOnUse",
|
|
208
|
-
children: [
|
|
209
|
-
/* @__PURE__ */ t("stop", { offset: "0", stopColor: "#A7B8E2", stopOpacity: "1" }),
|
|
210
|
-
/* @__PURE__ */ t("stop", { offset: "0.33", stopColor: "#A7B8E2", stopOpacity: "0.7" }),
|
|
211
|
-
/* @__PURE__ */ t("stop", { offset: "0.66", stopColor: "#A7B8E2", stopOpacity: "0.35" }),
|
|
212
|
-
/* @__PURE__ */ t("stop", { offset: "1", stopColor: "#A7B8E2", stopOpacity: "0" })
|
|
213
|
-
]
|
|
214
|
-
}
|
|
215
|
-
) }),
|
|
216
|
-
/* @__PURE__ */ t(
|
|
217
|
-
"rect",
|
|
218
|
-
{
|
|
219
|
-
x: "0",
|
|
220
|
-
y: "0",
|
|
221
|
-
width: "400",
|
|
222
|
-
height: "800",
|
|
223
|
-
fill: `url(#${e}-bluefade)`
|
|
224
|
-
}
|
|
225
|
-
)
|
|
226
|
-
]
|
|
227
|
-
}
|
|
228
|
-
) });
|
|
229
|
-
}
|
|
230
|
-
function be() {
|
|
231
|
-
const e = V(), i = [
|
|
232
|
-
{
|
|
233
|
-
id: `${e}-g6`,
|
|
234
|
-
// (CSS #6) blue, top-right
|
|
235
|
-
cx: 0.9536,
|
|
236
|
-
cy: 0,
|
|
237
|
-
rx: 0.9385,
|
|
238
|
-
ry: 1.2256,
|
|
239
|
-
stops: [
|
|
240
|
-
{ offset: 0, color: "#45ABFB", opacity: 0.6 },
|
|
241
|
-
{ offset: 0.4615, color: "#1E9AFB", opacity: 0.32 },
|
|
242
|
-
{ offset: 1, color: "#45ABFB", opacity: 0 }
|
|
243
|
-
]
|
|
244
|
-
},
|
|
245
|
-
{
|
|
246
|
-
id: `${e}-g5`,
|
|
247
|
-
// (CSS #5) faint light, top-right
|
|
248
|
-
cx: 0.9667,
|
|
249
|
-
cy: 0.0166,
|
|
250
|
-
rx: 0.1382,
|
|
251
|
-
ry: 0.9667,
|
|
252
|
-
stops: [
|
|
253
|
-
{ offset: 0, color: "#F7F5F0", opacity: 0.1 },
|
|
254
|
-
{ offset: 1, color: "#45ABFB", opacity: 0 }
|
|
255
|
-
]
|
|
256
|
-
},
|
|
257
|
-
{
|
|
258
|
-
id: `${e}-g4`,
|
|
259
|
-
// (CSS #4) warm grey, top-left
|
|
260
|
-
cx: 0,
|
|
261
|
-
cy: 0.0629,
|
|
262
|
-
rx: 0.8168,
|
|
263
|
-
ry: 1.0694,
|
|
264
|
-
stops: [
|
|
265
|
-
{ offset: 0, color: "#E3CFC3", opacity: 1 },
|
|
266
|
-
{ offset: 1, color: "#E3CFC3", opacity: 0 }
|
|
267
|
-
]
|
|
268
|
-
},
|
|
269
|
-
{
|
|
270
|
-
id: `${e}-g3`,
|
|
271
|
-
// (CSS #3) orange, bottom-left
|
|
272
|
-
cx: 0.0393,
|
|
273
|
-
cy: 1,
|
|
274
|
-
rx: 1.0628,
|
|
275
|
-
ry: 1.0303,
|
|
276
|
-
stops: [
|
|
277
|
-
{ offset: 0, color: "#FF6B1F", opacity: 1 },
|
|
278
|
-
{ offset: 0.476, color: "#E76000", opacity: 0.72 },
|
|
279
|
-
{ offset: 1, color: "#E76000", opacity: 0 }
|
|
280
|
-
]
|
|
281
|
-
},
|
|
282
|
-
{
|
|
283
|
-
id: `${e}-g2`,
|
|
284
|
-
// (CSS #2) peach, bottom-center
|
|
285
|
-
cx: 0.3476,
|
|
286
|
-
cy: 1,
|
|
287
|
-
rx: 0.9614,
|
|
288
|
-
ry: 0.338,
|
|
289
|
-
stops: [
|
|
290
|
-
{ offset: 0, color: "#FAC8AC", opacity: 0.7 },
|
|
291
|
-
{ offset: 1, color: "#F27B3E", opacity: 0 }
|
|
292
|
-
]
|
|
293
|
-
},
|
|
294
|
-
{
|
|
295
|
-
id: `${e}-g1`,
|
|
296
|
-
// (CSS #1) white glow, bottom-left
|
|
297
|
-
cx: 0.0951,
|
|
298
|
-
cy: 0.8783,
|
|
299
|
-
rx: 0.2268,
|
|
300
|
-
ry: 0.6881,
|
|
301
|
-
stops: [
|
|
302
|
-
{ offset: 0, color: "#FFFFFF", opacity: 0.58 },
|
|
303
|
-
{ offset: 1, color: "#FFFFFF", opacity: 0 }
|
|
304
|
-
]
|
|
305
|
-
}
|
|
306
|
-
];
|
|
307
|
-
return /* @__PURE__ */ t("div", { className: "zd:absolute zd:inset-0 zd:z-0 zd:rounded-4xl zd:pointer-events-none zd:overflow-hidden", children: /* @__PURE__ */ d(
|
|
308
|
-
"svg",
|
|
309
|
-
{
|
|
310
|
-
width: "100%",
|
|
311
|
-
height: "100%",
|
|
312
|
-
preserveAspectRatio: "none",
|
|
313
|
-
role: "presentation",
|
|
314
|
-
children: [
|
|
315
|
-
/* @__PURE__ */ t("rect", { width: "100%", height: "100%", fill: "#130E0B" }),
|
|
316
|
-
/* @__PURE__ */ t("defs", { children: i.map((r) => /* @__PURE__ */ t(
|
|
317
|
-
"radialGradient",
|
|
318
|
-
{
|
|
319
|
-
id: r.id,
|
|
320
|
-
cx: `${r.cx / r.rx * 100}%`,
|
|
321
|
-
cy: `${r.cy / r.ry * 100}%`,
|
|
322
|
-
r: "100%",
|
|
323
|
-
gradientUnits: "objectBoundingBox",
|
|
324
|
-
gradientTransform: `scale(${r.rx}, ${r.ry})`,
|
|
325
|
-
children: r.stops.map((n, o) => /* @__PURE__ */ t(
|
|
326
|
-
"stop",
|
|
327
|
-
{
|
|
328
|
-
offset: n.offset,
|
|
329
|
-
stopColor: n.color,
|
|
330
|
-
stopOpacity: n.opacity
|
|
331
|
-
},
|
|
332
|
-
n.color + o.toString()
|
|
333
|
-
))
|
|
334
|
-
},
|
|
335
|
-
r.id
|
|
336
|
-
)) }),
|
|
337
|
-
i.map((r) => /* @__PURE__ */ t(
|
|
338
|
-
"rect",
|
|
339
|
-
{
|
|
340
|
-
width: "100%",
|
|
341
|
-
height: "100%",
|
|
342
|
-
fill: `url(#${r.id})`
|
|
343
|
-
},
|
|
344
|
-
`${r.id}-rect`
|
|
345
|
-
))
|
|
346
|
-
]
|
|
347
|
-
}
|
|
348
|
-
) });
|
|
349
|
-
}
|
|
350
|
-
const Ce = Z + 16;
|
|
351
|
-
function ke({
|
|
352
|
-
children: e,
|
|
353
|
-
className: i,
|
|
354
|
-
contentClassName: r,
|
|
355
|
-
size: n = "lg",
|
|
356
|
-
style: o,
|
|
357
|
-
topNav: c
|
|
358
|
-
}) {
|
|
359
|
-
return /* @__PURE__ */ d(
|
|
360
|
-
"div",
|
|
361
|
-
{
|
|
362
|
-
"data-zd-size": n,
|
|
363
|
-
className: R(
|
|
364
|
-
// 400×810 by default, but never taller/wider than the parent — a
|
|
365
|
-
// consumer wrapper with its own size caps the Screen (max-w/h-full =
|
|
366
|
-
// 100% of the parent). overflow-hidden clips the frame to its rounded
|
|
367
|
-
// border ring; content scrolls in the inner div below.
|
|
368
|
-
"zd:relative zd:flex zd:flex-col zd:text-left",
|
|
369
|
-
// w-100 = 400px, h-202.5 = 810px at density 1; both compile to
|
|
370
|
-
// calc(var(--zd-spacing) * N), so they scale with the size variants.
|
|
371
|
-
// rounded-[38px] = inner card radius (32px) + the 6px border-ring gap,
|
|
372
|
-
// so the ring has a uniform width — equal inner/outer radii would make
|
|
373
|
-
// the corners read thicker than the sides.
|
|
374
|
-
"zd:w-100 zd:h-202.5 zd:max-w-full zd:max-h-full zd:overflow-hidden zd:rounded-[38px]",
|
|
375
|
-
i
|
|
376
|
-
),
|
|
377
|
-
style: o,
|
|
378
|
-
children: [
|
|
379
|
-
/* @__PURE__ */ t(be, {}),
|
|
380
|
-
/* @__PURE__ */ d(
|
|
381
|
-
"div",
|
|
382
|
-
{
|
|
383
|
-
className: R(
|
|
384
|
-
// m-1.5 = calc(var(--zd-spacing) * 1.5) = 6px at density 1, so the
|
|
385
|
-
// gradient border ring thins with the size variants. (Corner radii
|
|
386
|
-
// stay fixed, so at smaller sizes the ring is marginally non-uniform
|
|
387
|
-
// at the corners — a minor cosmetic trade-off.)
|
|
388
|
-
"zd:flex zd:flex-1 zd:flex-col zd:m-1.5 zd:px-4 zd:overflow-hidden zd:rounded-4xl zd:relative",
|
|
389
|
-
r
|
|
390
|
-
),
|
|
391
|
-
style: { clipPath: "inset(0 round 32px)" },
|
|
392
|
-
children: [
|
|
393
|
-
/* @__PURE__ */ t(Se, {}),
|
|
394
|
-
/* @__PURE__ */ t(Ee, {}),
|
|
395
|
-
/* @__PURE__ */ d("div", { className: "zd:relative zd:z-10 zd:flex zd:flex-1 zd:flex-col zd:min-h-0", children: [
|
|
396
|
-
c,
|
|
397
|
-
/* @__PURE__ */ t(
|
|
398
|
-
"div",
|
|
399
|
-
{
|
|
400
|
-
className: "zd:flex zd:flex-1 zd:flex-col zd:min-h-0 zd:overflow-y-auto zd:overflow-x-hidden",
|
|
401
|
-
style: {
|
|
402
|
-
paddingTop: `calc(${Ce / 4} * var(--zd-spacing))`
|
|
403
|
-
},
|
|
404
|
-
children: e
|
|
405
|
-
}
|
|
406
|
-
)
|
|
407
|
-
] })
|
|
408
|
-
]
|
|
409
|
-
}
|
|
410
|
-
)
|
|
411
|
-
]
|
|
412
|
-
}
|
|
413
|
-
);
|
|
414
|
-
}
|
|
415
|
-
const Ae = "" + new URL("error.webp", import.meta.url).href, Oe = "" + new URL("loading.webp", import.meta.url).href, Te = "" + new URL("send.webp", import.meta.url).href, Be = "" + new URL("success.webp", import.meta.url).href, Ie = {
|
|
416
|
-
error: Ae,
|
|
417
|
-
loading: Oe,
|
|
418
|
-
send: Te,
|
|
419
|
-
success: Be
|
|
8
|
+
const we = "" + new URL("error.webp", import.meta.url).href, Se = "" + new URL("loading.webp", import.meta.url).href, Ne = "" + new URL("send.webp", import.meta.url).href, ve = "" + new URL("success.webp", import.meta.url).href, be = {
|
|
9
|
+
error: we,
|
|
10
|
+
loading: Se,
|
|
11
|
+
send: Ne,
|
|
12
|
+
success: ve
|
|
420
13
|
};
|
|
421
|
-
function
|
|
14
|
+
function P({
|
|
422
15
|
imageName: e,
|
|
423
|
-
title:
|
|
424
|
-
children:
|
|
425
|
-
className:
|
|
16
|
+
title: s,
|
|
17
|
+
children: a,
|
|
18
|
+
className: t
|
|
426
19
|
}) {
|
|
427
|
-
return /* @__PURE__ */
|
|
20
|
+
return /* @__PURE__ */ c(
|
|
428
21
|
"div",
|
|
429
22
|
{
|
|
430
|
-
className:
|
|
23
|
+
className: G("zd:flex zd:flex-col zd:gap-8 zd:items-center", t),
|
|
431
24
|
children: [
|
|
432
|
-
/* @__PURE__ */
|
|
25
|
+
/* @__PURE__ */ n(
|
|
433
26
|
"img",
|
|
434
27
|
{
|
|
435
|
-
src:
|
|
28
|
+
src: be[e],
|
|
436
29
|
alt: e,
|
|
437
30
|
className: "zd:w-[118px] zd:h-[118px] zd:bg-transparent"
|
|
438
31
|
}
|
|
439
32
|
),
|
|
440
|
-
/* @__PURE__ */
|
|
441
|
-
/* @__PURE__ */
|
|
442
|
-
/* @__PURE__ */
|
|
33
|
+
/* @__PURE__ */ c("div", { className: "zd:flex zd:flex-col zd:gap-4 zd:items-center", children: [
|
|
34
|
+
/* @__PURE__ */ n(m, { className: "zd:text-h2 zd:text-center zd:whitespace-pre-wrap", children: s }),
|
|
35
|
+
/* @__PURE__ */ n(m, { className: "zd:text-center zd:whitespace-pre-wrap", children: a })
|
|
443
36
|
] })
|
|
444
37
|
]
|
|
445
38
|
}
|
|
446
39
|
);
|
|
447
40
|
}
|
|
448
|
-
function
|
|
449
|
-
const
|
|
450
|
-
if (!
|
|
41
|
+
function X() {
|
|
42
|
+
const s = ce().connectors.find((a) => a.id === "zerodev-wallet");
|
|
43
|
+
if (!s || !("getKitStore" in s))
|
|
451
44
|
throw new Error("useKitStore must be used with the zeroDevWallet connector");
|
|
452
|
-
return
|
|
45
|
+
return s.getKitStore();
|
|
453
46
|
}
|
|
454
|
-
function
|
|
455
|
-
const e =
|
|
47
|
+
function R() {
|
|
48
|
+
const e = X(), s = I(e, (l) => l.auth.step), a = I(e, (l) => l.auth.stepHistory), t = I(e, (l) => l.auth.email), r = I(e, (l) => l.auth.otpId), d = I(
|
|
456
49
|
e,
|
|
457
50
|
(l) => l.auth.otpEncryptionTargetBundle
|
|
458
|
-
),
|
|
51
|
+
), i = I(e, (l) => l.auth.enabledMethods), u = I(e, (l) => l.auth.config);
|
|
459
52
|
return {
|
|
460
|
-
step:
|
|
461
|
-
email:
|
|
462
|
-
otpId:
|
|
463
|
-
otpEncryptionTargetBundle:
|
|
464
|
-
enabledMethods:
|
|
53
|
+
step: s,
|
|
54
|
+
email: t,
|
|
55
|
+
otpId: r,
|
|
56
|
+
otpEncryptionTargetBundle: d,
|
|
57
|
+
enabledMethods: i,
|
|
465
58
|
config: u,
|
|
466
59
|
goToStep: e.getState().auth.goToStep,
|
|
467
|
-
goBack:
|
|
60
|
+
goBack: a.length > 0 ? e.getState().auth.goBack : null,
|
|
468
61
|
reset: e.getState().auth.reset,
|
|
469
62
|
setEmail: e.getState().auth.setEmail,
|
|
470
63
|
setOtpSession: e.getState().auth.setOtpSession,
|
|
471
64
|
clearOtpSession: e.getState().auth.clearOtpSession
|
|
472
65
|
};
|
|
473
66
|
}
|
|
474
|
-
function
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
return /* @__PURE__ */ d(
|
|
479
|
-
"div",
|
|
480
|
-
{
|
|
481
|
-
className: R(
|
|
482
|
-
"zd:gap-1.5 zd:flex zd:flex-row zd:items-center",
|
|
483
|
-
e
|
|
484
|
-
),
|
|
485
|
-
children: [
|
|
486
|
-
/* @__PURE__ */ t(h, { children: "Powered by" }),
|
|
487
|
-
/* @__PURE__ */ t(
|
|
488
|
-
se,
|
|
489
|
-
{
|
|
490
|
-
variant: "lockup",
|
|
491
|
-
tone: "black",
|
|
492
|
-
className: "zd:h-4.5 zd:w-auto",
|
|
493
|
-
style: i
|
|
494
|
-
}
|
|
495
|
-
)
|
|
496
|
-
]
|
|
497
|
-
}
|
|
498
|
-
);
|
|
499
|
-
}
|
|
500
|
-
function Fe() {
|
|
501
|
-
const { email: e, setOtpSession: i } = F(), { mutateAsync: r, isPending: n } = Y(), [o, c] = w(60), s = o <= 0 && !n;
|
|
502
|
-
return P(() => {
|
|
503
|
-
if (o <= 0) return;
|
|
67
|
+
function Ee() {
|
|
68
|
+
const { email: e, setOtpSession: s } = R(), { mutateAsync: a, isPending: t } = Y(), [r, d] = w(60), i = r <= 0 && !t;
|
|
69
|
+
return O(() => {
|
|
70
|
+
if (r <= 0) return;
|
|
504
71
|
const l = setInterval(() => {
|
|
505
|
-
|
|
72
|
+
d((h) => Math.max(0, h - 1));
|
|
506
73
|
}, 1e3);
|
|
507
74
|
return () => {
|
|
508
75
|
clearInterval(l);
|
|
509
76
|
};
|
|
510
|
-
}, [
|
|
511
|
-
/* @__PURE__ */
|
|
512
|
-
/* @__PURE__ */
|
|
513
|
-
|
|
77
|
+
}, [r]), /* @__PURE__ */ c(A, { children: [
|
|
78
|
+
/* @__PURE__ */ c("div", { className: "zd:flex-1 zd:flex zd:flex-col zd:gap-8 zd:justify-center", children: [
|
|
79
|
+
/* @__PURE__ */ c(
|
|
80
|
+
P,
|
|
514
81
|
{
|
|
515
82
|
imageName: "send",
|
|
516
83
|
title: `Check your email!
|
|
@@ -518,280 +85,280 @@ function Fe() {
|
|
|
518
85
|
children: [
|
|
519
86
|
"We've sent a magic link to",
|
|
520
87
|
" ",
|
|
521
|
-
/* @__PURE__ */
|
|
88
|
+
/* @__PURE__ */ n(m, { as: "span", className: "zd:text-solarOrange", children: e }),
|
|
522
89
|
`
|
|
523
90
|
`,
|
|
524
91
|
"Please open the email and click the link to log in."
|
|
525
92
|
]
|
|
526
93
|
}
|
|
527
94
|
),
|
|
528
|
-
/* @__PURE__ */
|
|
95
|
+
/* @__PURE__ */ n("div", { className: "zd:flex zd:flex-col zd:gap-1", children: /* @__PURE__ */ c(m, { className: "zd:text-center", children: [
|
|
529
96
|
"Did not get an email?",
|
|
530
97
|
" ",
|
|
531
|
-
/* @__PURE__ */
|
|
98
|
+
/* @__PURE__ */ n(
|
|
532
99
|
"button",
|
|
533
100
|
{
|
|
534
101
|
type: "button",
|
|
535
|
-
disabled: !
|
|
102
|
+
disabled: !i,
|
|
536
103
|
onClick: async () => {
|
|
537
|
-
if (!(!e || !
|
|
104
|
+
if (!(!e || !i))
|
|
538
105
|
try {
|
|
539
|
-
const { otpId: l, otpEncryptionTargetBundle:
|
|
106
|
+
const { otpId: l, otpEncryptionTargetBundle: h } = await a({
|
|
540
107
|
email: e
|
|
541
108
|
});
|
|
542
|
-
|
|
109
|
+
s({ otpId: l, otpEncryptionTargetBundle: h }), d(60);
|
|
543
110
|
} catch {
|
|
544
111
|
}
|
|
545
112
|
},
|
|
546
113
|
className: "zd:cursor-pointer zd:underline zd:disabled:opacity-50 zd:disabled:cursor-not-allowed",
|
|
547
|
-
children:
|
|
114
|
+
children: i ? "Resend" : `Resend in ${r} ${r === 1 ? "second" : "seconds"}`
|
|
548
115
|
}
|
|
549
116
|
)
|
|
550
117
|
] }) })
|
|
551
118
|
] }),
|
|
552
|
-
/* @__PURE__ */
|
|
119
|
+
/* @__PURE__ */ n(B, { className: "zd:self-center zd:pt-4 zd:pb-6" })
|
|
553
120
|
] });
|
|
554
121
|
}
|
|
555
|
-
function
|
|
122
|
+
function ke() {
|
|
556
123
|
return typeof window > "u" ? !1 : new URLSearchParams(window.location.search).has("code");
|
|
557
124
|
}
|
|
558
|
-
function
|
|
125
|
+
function M() {
|
|
559
126
|
if (typeof window > "u") return;
|
|
560
127
|
const e = new URL(window.location.href);
|
|
561
128
|
e.searchParams.has("code") && (e.searchParams.delete("code"), window.history.replaceState(null, "", e.toString()));
|
|
562
129
|
}
|
|
563
|
-
function
|
|
130
|
+
function Te({
|
|
564
131
|
title: e = "Oops, something went wrong",
|
|
565
|
-
message:
|
|
566
|
-
showRetry:
|
|
567
|
-
showChooseAnother:
|
|
132
|
+
message: s = "We couldn't complete the sign-in process. This could be due to timeout, an expired link, or a cancelled request.",
|
|
133
|
+
showRetry: a = !1,
|
|
134
|
+
showChooseAnother: t = !0
|
|
568
135
|
}) {
|
|
569
|
-
const { goToStep:
|
|
570
|
-
return /* @__PURE__ */
|
|
571
|
-
/* @__PURE__ */
|
|
572
|
-
/* @__PURE__ */
|
|
573
|
-
/* @__PURE__ */
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
136
|
+
const { goToStep: r, goBack: d, reset: i } = R();
|
|
137
|
+
return /* @__PURE__ */ c(A, { children: [
|
|
138
|
+
/* @__PURE__ */ c("div", { className: "zd:flex-1 zd:flex zd:flex-col zd:gap-8 zd:items-center zd:justify-center", children: [
|
|
139
|
+
/* @__PURE__ */ n(P, { imageName: "error", title: e, children: s }),
|
|
140
|
+
/* @__PURE__ */ c("div", { className: "zd:flex zd:flex-col zd:gap-1", children: [
|
|
141
|
+
a && /* @__PURE__ */ n(E, { action: "primary", text: "Try again", onClick: d ?? (() => r("sign-up")) }),
|
|
142
|
+
t && /* @__PURE__ */ n(
|
|
143
|
+
E,
|
|
577
144
|
{
|
|
578
|
-
action:
|
|
145
|
+
action: a ? "secondary" : "primary",
|
|
579
146
|
onClick: () => {
|
|
580
|
-
|
|
147
|
+
M(), r("sign-up");
|
|
581
148
|
},
|
|
582
149
|
text: "Choose another sign-in method"
|
|
583
150
|
}
|
|
584
151
|
),
|
|
585
|
-
!
|
|
152
|
+
!a && !t && /* @__PURE__ */ n(E, { action: "primary", text: "Start over", onClick: i })
|
|
586
153
|
] })
|
|
587
154
|
] }),
|
|
588
|
-
/* @__PURE__ */
|
|
155
|
+
/* @__PURE__ */ n(B, { className: "zd:self-center zd:pt-4 zd:pb-6" })
|
|
589
156
|
] });
|
|
590
157
|
}
|
|
591
|
-
const
|
|
592
|
-
function
|
|
593
|
-
return Math.max(
|
|
158
|
+
const Ie = 4, Ae = 8, Ce = 6;
|
|
159
|
+
function Le(e) {
|
|
160
|
+
return Math.max(Ie, Math.min(Ae, e));
|
|
594
161
|
}
|
|
595
|
-
function
|
|
596
|
-
return /* @__PURE__ */
|
|
597
|
-
|
|
162
|
+
function Pe({ char: e, isFocused: s }) {
|
|
163
|
+
return /* @__PURE__ */ n(
|
|
164
|
+
ne,
|
|
598
165
|
{
|
|
599
166
|
"data-testid": "code-input-box",
|
|
600
|
-
"data-active":
|
|
601
|
-
className:
|
|
167
|
+
"data-active": s || void 0,
|
|
168
|
+
className: G(
|
|
602
169
|
"zd:h-16 zd:w-14 zd:rounded-lg zd:flex zd:items-center zd:justify-center",
|
|
603
|
-
|
|
170
|
+
s && "zd:border-[1.5px] zd:border-greyScale"
|
|
604
171
|
),
|
|
605
|
-
children: /* @__PURE__ */
|
|
172
|
+
children: /* @__PURE__ */ n(m, { className: "zd:text-h2", children: e })
|
|
606
173
|
}
|
|
607
174
|
);
|
|
608
175
|
}
|
|
609
|
-
function
|
|
176
|
+
function Re({
|
|
610
177
|
onChange: e,
|
|
611
|
-
onComplete:
|
|
612
|
-
disabled:
|
|
613
|
-
error:
|
|
614
|
-
autoFocus:
|
|
615
|
-
length:
|
|
616
|
-
"data-testid":
|
|
178
|
+
onComplete: s,
|
|
179
|
+
disabled: a = !1,
|
|
180
|
+
error: t = !1,
|
|
181
|
+
autoFocus: r = !1,
|
|
182
|
+
length: d = Ce,
|
|
183
|
+
"data-testid": i
|
|
617
184
|
}) {
|
|
618
|
-
const u =
|
|
619
|
-
() => Array.from({ length: u }, (
|
|
185
|
+
const u = Le(d), l = le(
|
|
186
|
+
() => Array.from({ length: u }, (p, g) => ({
|
|
620
187
|
id: `char-${g}`,
|
|
621
188
|
index: g
|
|
622
189
|
})),
|
|
623
190
|
[u]
|
|
624
|
-
), [
|
|
625
|
-
|
|
626
|
-
var
|
|
627
|
-
|
|
628
|
-
}, [
|
|
629
|
-
x((
|
|
191
|
+
), [h, x] = w(""), [f, N] = w(!1), k = K(null);
|
|
192
|
+
O(() => {
|
|
193
|
+
var p;
|
|
194
|
+
r && !a && ((p = k.current) == null || p.focus());
|
|
195
|
+
}, [r, a]), O(() => {
|
|
196
|
+
x((p) => p.slice(0, u));
|
|
630
197
|
}, [u]);
|
|
631
|
-
const
|
|
632
|
-
const g =
|
|
198
|
+
const v = (p) => {
|
|
199
|
+
const g = p.slice(0, u).toUpperCase();
|
|
633
200
|
x(g), e == null || e(g), g.length === u && setTimeout(() => {
|
|
634
|
-
var
|
|
635
|
-
|
|
201
|
+
var C;
|
|
202
|
+
s == null || s(g), (C = k.current) == null || C.blur();
|
|
636
203
|
}, 0);
|
|
637
204
|
};
|
|
638
|
-
return /* @__PURE__ */
|
|
205
|
+
return /* @__PURE__ */ c(
|
|
639
206
|
"button",
|
|
640
207
|
{
|
|
641
208
|
type: "button",
|
|
642
209
|
className: "zd:flex zd:flex-row zd:items-center zd:justify-between zd:gap-2 zd:w-full zd:cursor-text",
|
|
643
210
|
onClick: () => {
|
|
644
|
-
var
|
|
645
|
-
return (
|
|
211
|
+
var p;
|
|
212
|
+
return (p = k.current) == null ? void 0 : p.focus();
|
|
646
213
|
},
|
|
647
|
-
disabled:
|
|
648
|
-
"data-testid":
|
|
214
|
+
disabled: a,
|
|
215
|
+
"data-testid": i,
|
|
649
216
|
children: [
|
|
650
|
-
/* @__PURE__ */
|
|
217
|
+
/* @__PURE__ */ n(
|
|
651
218
|
"input",
|
|
652
219
|
{
|
|
653
220
|
ref: k,
|
|
654
|
-
value:
|
|
655
|
-
onChange: (
|
|
221
|
+
value: h,
|
|
222
|
+
onChange: (p) => v(p.target.value),
|
|
656
223
|
onFocus: () => N(!0),
|
|
657
224
|
onBlur: () => N(!1),
|
|
658
225
|
maxLength: u,
|
|
659
|
-
disabled:
|
|
226
|
+
disabled: a,
|
|
660
227
|
className: "zd:absolute zd:opacity-0 zd:pointer-events-none",
|
|
661
228
|
style: { position: "absolute", opacity: 0 },
|
|
662
229
|
"aria-label": "Verification code"
|
|
663
230
|
}
|
|
664
231
|
),
|
|
665
|
-
l.map((
|
|
666
|
-
|
|
232
|
+
l.map((p) => /* @__PURE__ */ n(
|
|
233
|
+
Pe,
|
|
667
234
|
{
|
|
668
|
-
char: p
|
|
669
|
-
isFocused: !
|
|
235
|
+
char: h[p.index] ?? "",
|
|
236
|
+
isFocused: !t && f && p.index === h.length
|
|
670
237
|
},
|
|
671
|
-
|
|
238
|
+
p.id
|
|
672
239
|
))
|
|
673
240
|
]
|
|
674
241
|
}
|
|
675
242
|
);
|
|
676
243
|
}
|
|
677
|
-
function
|
|
244
|
+
function Oe() {
|
|
678
245
|
const {
|
|
679
246
|
email: e,
|
|
680
|
-
otpId:
|
|
681
|
-
otpEncryptionTargetBundle:
|
|
682
|
-
setOtpSession:
|
|
683
|
-
clearOtpSession:
|
|
684
|
-
goToStep:
|
|
685
|
-
config:
|
|
686
|
-
} =
|
|
687
|
-
|
|
688
|
-
if (
|
|
689
|
-
const
|
|
690
|
-
g((
|
|
247
|
+
otpId: s,
|
|
248
|
+
otpEncryptionTargetBundle: a,
|
|
249
|
+
setOtpSession: t,
|
|
250
|
+
clearOtpSession: r,
|
|
251
|
+
goToStep: d,
|
|
252
|
+
config: i
|
|
253
|
+
} = R(), { mutateAsync: u, isPending: l } = J(), { mutateAsync: h, isPending: x } = he(), [f, N] = w(""), [k, v] = w(!1), [p, g] = w(60);
|
|
254
|
+
O(() => {
|
|
255
|
+
if (p <= 0) return;
|
|
256
|
+
const S = setInterval(() => {
|
|
257
|
+
g((T) => Math.max(0, T - 1));
|
|
691
258
|
}, 1e3);
|
|
692
|
-
return () => clearInterval(
|
|
693
|
-
}, [
|
|
694
|
-
const
|
|
695
|
-
var
|
|
696
|
-
if (!(!
|
|
697
|
-
|
|
259
|
+
return () => clearInterval(S);
|
|
260
|
+
}, [p]);
|
|
261
|
+
const C = async () => {
|
|
262
|
+
var S, T;
|
|
263
|
+
if (!(!f.trim() || !s || !a)) {
|
|
264
|
+
v(!1);
|
|
698
265
|
try {
|
|
699
|
-
await
|
|
700
|
-
otpId:
|
|
701
|
-
code:
|
|
702
|
-
otpEncryptionTargetBundle:
|
|
703
|
-
}),
|
|
704
|
-
} catch (
|
|
705
|
-
|
|
266
|
+
await h({
|
|
267
|
+
otpId: s,
|
|
268
|
+
code: f.trim(),
|
|
269
|
+
otpEncryptionTargetBundle: a
|
|
270
|
+
}), r(), d("authenticated"), (S = i == null ? void 0 : i.onSuccess) == null || S.call(i);
|
|
271
|
+
} catch (F) {
|
|
272
|
+
v(!0), (T = i == null ? void 0 : i.onError) == null || T.call(i, F);
|
|
706
273
|
}
|
|
707
274
|
}
|
|
708
|
-
}, y = (
|
|
709
|
-
N(
|
|
710
|
-
},
|
|
711
|
-
if (!(!e ||
|
|
275
|
+
}, y = (S) => {
|
|
276
|
+
N(S);
|
|
277
|
+
}, H = async () => {
|
|
278
|
+
if (!(!e || p > 0 || l))
|
|
712
279
|
try {
|
|
713
|
-
const { otpId:
|
|
714
|
-
|
|
715
|
-
otpId:
|
|
716
|
-
otpEncryptionTargetBundle:
|
|
717
|
-
}), g(60),
|
|
280
|
+
const { otpId: S, otpEncryptionTargetBundle: T } = await u({ email: e });
|
|
281
|
+
t({
|
|
282
|
+
otpId: S,
|
|
283
|
+
otpEncryptionTargetBundle: T
|
|
284
|
+
}), g(60), v(!1);
|
|
718
285
|
} catch {
|
|
719
|
-
|
|
286
|
+
v(!0);
|
|
720
287
|
}
|
|
721
|
-
}, U =
|
|
722
|
-
return /* @__PURE__ */
|
|
723
|
-
/* @__PURE__ */
|
|
724
|
-
/* @__PURE__ */
|
|
725
|
-
/* @__PURE__ */
|
|
726
|
-
/* @__PURE__ */
|
|
288
|
+
}, U = p <= 0 && !l;
|
|
289
|
+
return /* @__PURE__ */ c(A, { children: [
|
|
290
|
+
/* @__PURE__ */ c("div", { className: "zd:flex-1 zd:flex zd:flex-col zd:gap-8 zd:justify-center zd:items-center", children: [
|
|
291
|
+
/* @__PURE__ */ c("div", { className: "zd:flex zd:flex-col zd:gap-4", children: [
|
|
292
|
+
/* @__PURE__ */ n(m, { className: "zd:text-h2 zd:text-center", children: "Enter verification code" }),
|
|
293
|
+
/* @__PURE__ */ c(m, { className: "zd:text-center", children: [
|
|
727
294
|
"Enter the code from the email we sent to",
|
|
728
295
|
" ",
|
|
729
|
-
/* @__PURE__ */
|
|
296
|
+
/* @__PURE__ */ n(m, { className: "zd:text-solarOrange", children: e })
|
|
730
297
|
] })
|
|
731
298
|
] }),
|
|
732
|
-
/* @__PURE__ */
|
|
733
|
-
|
|
299
|
+
/* @__PURE__ */ n(
|
|
300
|
+
Re,
|
|
734
301
|
{
|
|
735
302
|
onComplete: y,
|
|
736
|
-
onChange: () =>
|
|
303
|
+
onChange: () => v(!1),
|
|
737
304
|
disabled: x,
|
|
738
305
|
error: k,
|
|
739
306
|
autoFocus: !0
|
|
740
307
|
}
|
|
741
308
|
),
|
|
742
|
-
/* @__PURE__ */
|
|
743
|
-
|
|
309
|
+
/* @__PURE__ */ n(
|
|
310
|
+
E,
|
|
744
311
|
{
|
|
745
312
|
text: "Confirm code",
|
|
746
|
-
onClick:
|
|
747
|
-
disabled: !
|
|
313
|
+
onClick: C,
|
|
314
|
+
disabled: !f.trim() || x
|
|
748
315
|
}
|
|
749
316
|
),
|
|
750
|
-
/* @__PURE__ */
|
|
317
|
+
/* @__PURE__ */ n("div", { className: "zd:flex zd:flex-col zd:gap-1", children: /* @__PURE__ */ c(m, { className: "zd:text-center", children: [
|
|
751
318
|
"Did not get an email?",
|
|
752
319
|
" ",
|
|
753
|
-
/* @__PURE__ */
|
|
320
|
+
/* @__PURE__ */ n(
|
|
754
321
|
"button",
|
|
755
322
|
{
|
|
756
323
|
type: "button",
|
|
757
324
|
disabled: !U,
|
|
758
|
-
onClick:
|
|
325
|
+
onClick: H,
|
|
759
326
|
className: "zd:cursor-pointer zd:underline zd:disabled:opacity-50 zd:disabled:cursor-not-allowed",
|
|
760
|
-
children: U ? "Resend" : `Resend in ${
|
|
327
|
+
children: U ? "Resend" : `Resend in ${p} ${p === 1 ? "second" : "seconds"}`
|
|
761
328
|
}
|
|
762
329
|
)
|
|
763
330
|
] }) })
|
|
764
331
|
] }),
|
|
765
|
-
/* @__PURE__ */
|
|
332
|
+
/* @__PURE__ */ n(B, { className: "zd:self-center zd:pt-4 zd:pb-6" })
|
|
766
333
|
] });
|
|
767
334
|
}
|
|
768
|
-
function
|
|
335
|
+
function Be({
|
|
769
336
|
termsAndConditionsUrl: e,
|
|
770
|
-
privacyPolicyUrl:
|
|
771
|
-
agreedToTerms:
|
|
772
|
-
setAgreedToTerms:
|
|
773
|
-
highlight:
|
|
337
|
+
privacyPolicyUrl: s,
|
|
338
|
+
agreedToTerms: a,
|
|
339
|
+
setAgreedToTerms: t,
|
|
340
|
+
highlight: r = !1
|
|
774
341
|
}) {
|
|
775
|
-
return /* @__PURE__ */
|
|
776
|
-
!!(e ||
|
|
342
|
+
return /* @__PURE__ */ c("div", { className: "zd:flex zd:flex-col zd:items-center zd:gap-5", children: [
|
|
343
|
+
!!(e || s) && /* @__PURE__ */ c(
|
|
777
344
|
"div",
|
|
778
345
|
{
|
|
779
|
-
className: `zd:flex zd:flex-row zd:items-center zd:gap-2 zd:rounded-md zd:p-2 zd:transition-colors ${
|
|
346
|
+
className: `zd:flex zd:flex-row zd:items-center zd:gap-2 zd:rounded-md zd:p-2 zd:transition-colors ${r ? "zd:border zd:border-negative" : "zd:border zd:border-transparent"}`,
|
|
780
347
|
children: [
|
|
781
|
-
/* @__PURE__ */
|
|
348
|
+
/* @__PURE__ */ n(
|
|
782
349
|
"input",
|
|
783
350
|
{
|
|
784
351
|
type: "checkbox",
|
|
785
|
-
checked:
|
|
786
|
-
onChange: (
|
|
352
|
+
checked: a,
|
|
353
|
+
onChange: (i) => t(i.target.checked),
|
|
787
354
|
className: "zd:cursor-pointer zd:[color-scheme:light]"
|
|
788
355
|
}
|
|
789
356
|
),
|
|
790
|
-
/* @__PURE__ */
|
|
357
|
+
/* @__PURE__ */ c(m, { className: "zd:flex-1", children: [
|
|
791
358
|
"I agree to the",
|
|
792
359
|
" ",
|
|
793
|
-
e && /* @__PURE__ */
|
|
794
|
-
|
|
360
|
+
e && /* @__PURE__ */ n(
|
|
361
|
+
m,
|
|
795
362
|
{
|
|
796
363
|
as: "a",
|
|
797
364
|
href: e,
|
|
@@ -801,12 +368,12 @@ function Ge({
|
|
|
801
368
|
children: "Terms & Conditions"
|
|
802
369
|
}
|
|
803
370
|
),
|
|
804
|
-
e &&
|
|
805
|
-
|
|
806
|
-
|
|
371
|
+
e && s && " and ",
|
|
372
|
+
s && /* @__PURE__ */ n(
|
|
373
|
+
m,
|
|
807
374
|
{
|
|
808
375
|
as: "a",
|
|
809
|
-
href:
|
|
376
|
+
href: s,
|
|
810
377
|
target: "_blank",
|
|
811
378
|
rel: "noopener noreferrer",
|
|
812
379
|
className: "zd:underline",
|
|
@@ -817,21 +384,21 @@ function Ge({
|
|
|
817
384
|
]
|
|
818
385
|
}
|
|
819
386
|
),
|
|
820
|
-
/* @__PURE__ */
|
|
387
|
+
/* @__PURE__ */ n(B, {})
|
|
821
388
|
] });
|
|
822
389
|
}
|
|
823
|
-
const
|
|
824
|
-
function
|
|
825
|
-
return
|
|
390
|
+
const Me = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
391
|
+
function j(e) {
|
|
392
|
+
return Me.test(e.trim());
|
|
826
393
|
}
|
|
827
|
-
const
|
|
828
|
-
function
|
|
829
|
-
return /* @__PURE__ */
|
|
394
|
+
const Ue = "" + new URL("blob.webm", import.meta.url).href;
|
|
395
|
+
function je({ className: e }) {
|
|
396
|
+
return /* @__PURE__ */ n(
|
|
830
397
|
"video",
|
|
831
398
|
{
|
|
832
399
|
className: e,
|
|
833
400
|
style: { aspectRatio: "1 / 1" },
|
|
834
|
-
src:
|
|
401
|
+
src: Ue,
|
|
835
402
|
autoPlay: !0,
|
|
836
403
|
loop: !0,
|
|
837
404
|
muted: !0,
|
|
@@ -841,194 +408,194 @@ function De({ className: e }) {
|
|
|
841
408
|
}
|
|
842
409
|
);
|
|
843
410
|
}
|
|
844
|
-
function
|
|
411
|
+
function _(e) {
|
|
845
412
|
return e instanceof Error ? e.name === "AbortError" || e.name === "NotAllowedError" ? !0 : e.message.toLowerCase().includes("oauth popup was closed") : !1;
|
|
846
413
|
}
|
|
847
|
-
function
|
|
848
|
-
const { goToStep: e, setEmail:
|
|
414
|
+
function He() {
|
|
415
|
+
const { goToStep: e, setEmail: s, setOtpSession: a, config: t, enabledMethods: r } = R(), [d, i] = w(!1), [u, l] = w(!1), [h, x] = w(""), f = (t == null ? void 0 : t.emailAuthMethod) === "otp", { mutateAsync: N, isPending: k } = J(), { mutateAsync: v, isPending: p } = Y(), g = k || p, [C, y] = w(null), { mutateAsync: H, isPending: U } = pe({
|
|
849
416
|
mutation: {
|
|
850
417
|
onSuccess: async () => {
|
|
851
|
-
var
|
|
852
|
-
e("authenticated"), (
|
|
418
|
+
var o;
|
|
419
|
+
e("authenticated"), (o = t == null ? void 0 : t.onSuccess) == null || o.call(t);
|
|
853
420
|
},
|
|
854
|
-
onError: (
|
|
421
|
+
onError: (o) => {
|
|
855
422
|
var z;
|
|
856
|
-
(z =
|
|
423
|
+
(z = t == null ? void 0 : t.onError) == null || z.call(t, o);
|
|
857
424
|
}
|
|
858
425
|
}
|
|
859
|
-
}), { mutate:
|
|
426
|
+
}), { mutate: S, isPending: T } = me({
|
|
860
427
|
mutation: {
|
|
861
428
|
onSuccess: () => {
|
|
862
|
-
var
|
|
863
|
-
e("authenticated"), (
|
|
429
|
+
var o;
|
|
430
|
+
e("authenticated"), (o = t == null ? void 0 : t.onSuccess) == null || o.call(t);
|
|
864
431
|
},
|
|
865
|
-
onError: (
|
|
432
|
+
onError: (o) => {
|
|
866
433
|
var z;
|
|
867
|
-
|
|
434
|
+
_(o) || y(o instanceof Error ? o.message : String(o)), (z = t == null ? void 0 : t.onError) == null || z.call(t, o);
|
|
868
435
|
}
|
|
869
436
|
}
|
|
870
|
-
}), { mutate:
|
|
437
|
+
}), { mutate: F, isPending: Q } = ze({
|
|
871
438
|
mutation: {
|
|
872
439
|
onSuccess: () => {
|
|
873
|
-
var
|
|
874
|
-
e("authenticated"), (
|
|
440
|
+
var o;
|
|
441
|
+
e("authenticated"), (o = t == null ? void 0 : t.onSuccess) == null || o.call(t);
|
|
875
442
|
},
|
|
876
|
-
onError: (
|
|
443
|
+
onError: (o) => {
|
|
877
444
|
var z;
|
|
878
|
-
|
|
445
|
+
_(o) || y(o instanceof Error ? o.message : String(o)), (z = t == null ? void 0 : t.onError) == null || z.call(t, o);
|
|
879
446
|
}
|
|
880
447
|
}
|
|
881
|
-
}),
|
|
882
|
-
if (!
|
|
883
|
-
if (
|
|
448
|
+
}), b = U || g || T || Q, L = !!(t != null && t.termsAndConditionsUrl || t != null && t.privacyPolicyUrl) && !d, Z = () => {
|
|
449
|
+
if (!b) {
|
|
450
|
+
if (L) {
|
|
884
451
|
l(!0);
|
|
885
452
|
return;
|
|
886
453
|
}
|
|
887
|
-
y(null),
|
|
454
|
+
y(null), S();
|
|
888
455
|
}
|
|
889
|
-
},
|
|
890
|
-
if (!
|
|
891
|
-
if (
|
|
456
|
+
}, ee = () => {
|
|
457
|
+
if (!b) {
|
|
458
|
+
if (L) {
|
|
892
459
|
l(!0);
|
|
893
460
|
return;
|
|
894
461
|
}
|
|
895
|
-
y(null),
|
|
462
|
+
y(null), F();
|
|
896
463
|
}
|
|
897
|
-
},
|
|
898
|
-
if (
|
|
464
|
+
}, te = async () => {
|
|
465
|
+
if (L) {
|
|
899
466
|
l(!0);
|
|
900
467
|
return;
|
|
901
468
|
}
|
|
902
469
|
y(null);
|
|
903
470
|
try {
|
|
904
|
-
await
|
|
905
|
-
} catch (
|
|
906
|
-
const z =
|
|
907
|
-
|
|
471
|
+
await H({ provider: "google" });
|
|
472
|
+
} catch (o) {
|
|
473
|
+
const z = o instanceof Error ? o.message : String(o);
|
|
474
|
+
_(o) || y(z);
|
|
908
475
|
}
|
|
909
|
-
}, W =
|
|
910
|
-
if (!(!
|
|
911
|
-
if (
|
|
476
|
+
}, W = f ? async () => {
|
|
477
|
+
if (!(!h || b) && j(h)) {
|
|
478
|
+
if (L) {
|
|
912
479
|
l(!0);
|
|
913
480
|
return;
|
|
914
481
|
}
|
|
915
482
|
y(null);
|
|
916
483
|
try {
|
|
917
|
-
const { otpId:
|
|
918
|
-
email:
|
|
484
|
+
const { otpId: o, otpEncryptionTargetBundle: z } = await N({
|
|
485
|
+
email: h
|
|
919
486
|
});
|
|
920
|
-
|
|
921
|
-
} catch (
|
|
487
|
+
s(h), a({ otpId: o, otpEncryptionTargetBundle: z }), e("otp-input");
|
|
488
|
+
} catch (o) {
|
|
922
489
|
y(
|
|
923
|
-
|
|
490
|
+
o instanceof Error ? o.message : "Failed to send verification code"
|
|
924
491
|
);
|
|
925
492
|
}
|
|
926
493
|
}
|
|
927
494
|
} : async () => {
|
|
928
|
-
if (!(!
|
|
929
|
-
if (
|
|
495
|
+
if (!(!h || b) && j(h)) {
|
|
496
|
+
if (L) {
|
|
930
497
|
l(!0);
|
|
931
498
|
return;
|
|
932
499
|
}
|
|
933
500
|
y(null);
|
|
934
501
|
try {
|
|
935
|
-
const { otpId:
|
|
936
|
-
email:
|
|
502
|
+
const { otpId: o, otpEncryptionTargetBundle: z } = await v({
|
|
503
|
+
email: h
|
|
937
504
|
});
|
|
938
|
-
|
|
939
|
-
} catch (
|
|
505
|
+
s(h), a({ otpId: o, otpEncryptionTargetBundle: z }), e("email-verification");
|
|
506
|
+
} catch (o) {
|
|
940
507
|
y(
|
|
941
|
-
|
|
508
|
+
o instanceof Error ? o.message : "Failed to send verification code"
|
|
942
509
|
);
|
|
943
510
|
}
|
|
944
511
|
}
|
|
945
512
|
};
|
|
946
|
-
return
|
|
947
|
-
/* @__PURE__ */
|
|
948
|
-
/* @__PURE__ */
|
|
949
|
-
/* @__PURE__ */
|
|
950
|
-
|
|
513
|
+
return C ? /* @__PURE__ */ n("div", { className: "zd:flex zd:items-center zd:justify-center zd:h-full", children: /* @__PURE__ */ c("div", { className: "zd:flex zd:flex-col zd:gap-4 zd:max-w-md", children: [
|
|
514
|
+
/* @__PURE__ */ n(m, { className: "zd:text-h2 zd:text-center", children: "Error occurred" }),
|
|
515
|
+
/* @__PURE__ */ n(m, { className: "zd:text-center zd:text-red-500", children: C }),
|
|
516
|
+
/* @__PURE__ */ n(
|
|
517
|
+
E,
|
|
951
518
|
{
|
|
952
519
|
action: "primary",
|
|
953
520
|
text: "Try again",
|
|
954
521
|
onClick: () => y(null)
|
|
955
522
|
}
|
|
956
523
|
)
|
|
957
|
-
] }) }) : /* @__PURE__ */
|
|
958
|
-
/* @__PURE__ */
|
|
959
|
-
/* @__PURE__ */
|
|
960
|
-
/* @__PURE__ */
|
|
961
|
-
/* @__PURE__ */
|
|
962
|
-
/* @__PURE__ */
|
|
524
|
+
] }) }) : /* @__PURE__ */ c("div", { className: "zd:flex-1 zd:flex zd:flex-col zd:justify-between zd:pb-4 zd:overflow-y-auto zd:overflow-x-hidden", children: [
|
|
525
|
+
/* @__PURE__ */ c("div", { className: "zd:flex-1 zd:flex zd:flex-col zd:justify-center", children: [
|
|
526
|
+
/* @__PURE__ */ c("div", { className: "zd:px-4 zd:flex zd:flex-col zd:items-center", children: [
|
|
527
|
+
/* @__PURE__ */ n("div", { className: "zd:w-full zd:px-16 zd:py-4", children: /* @__PURE__ */ n(je, { className: "zd:w-full zd:pointer-events-none zd:select-none" }) }),
|
|
528
|
+
/* @__PURE__ */ n(m, { className: "zd:text-h2 zd:text-center", children: "Continue to your wallet" }),
|
|
529
|
+
/* @__PURE__ */ n(m, { className: "zd:mt-2 zd:text-center zd:text-greyScale/50", children: "Choose a sign-in method to proceed" })
|
|
963
530
|
] }),
|
|
964
|
-
/* @__PURE__ */
|
|
965
|
-
|
|
966
|
-
/* @__PURE__ */
|
|
967
|
-
/* @__PURE__ */
|
|
968
|
-
|
|
531
|
+
/* @__PURE__ */ c("div", { className: "zd:mt-6 zd:flex zd:flex-col zd:gap-4 zd:mb-4", children: [
|
|
532
|
+
r.includes("passkey") && /* @__PURE__ */ c(A, { children: [
|
|
533
|
+
/* @__PURE__ */ c("div", { className: "zd:px-4 zd:flex zd:flex-col zd:gap-2", children: [
|
|
534
|
+
/* @__PURE__ */ n(
|
|
535
|
+
E,
|
|
969
536
|
{
|
|
970
537
|
action: "secondary",
|
|
971
538
|
text: "Create a passkey",
|
|
972
539
|
iconName: "key",
|
|
973
540
|
trailIcon: !0,
|
|
974
|
-
disabled:
|
|
975
|
-
onClick:
|
|
541
|
+
disabled: b,
|
|
542
|
+
onClick: Z
|
|
976
543
|
}
|
|
977
544
|
),
|
|
978
|
-
/* @__PURE__ */
|
|
979
|
-
|
|
545
|
+
/* @__PURE__ */ n(
|
|
546
|
+
E,
|
|
980
547
|
{
|
|
981
548
|
action: "secondary",
|
|
982
549
|
text: "Log in with passkey",
|
|
983
550
|
iconName: "key",
|
|
984
551
|
trailIcon: !0,
|
|
985
|
-
disabled:
|
|
986
|
-
onClick:
|
|
552
|
+
disabled: b,
|
|
553
|
+
onClick: ee
|
|
987
554
|
}
|
|
988
555
|
)
|
|
989
556
|
] }),
|
|
990
|
-
/* @__PURE__ */
|
|
991
|
-
/* @__PURE__ */
|
|
992
|
-
/* @__PURE__ */
|
|
993
|
-
/* @__PURE__ */
|
|
557
|
+
/* @__PURE__ */ c("div", { className: "zd:flex zd:items-center zd:gap-3", children: [
|
|
558
|
+
/* @__PURE__ */ n("div", { className: "zd:h-px zd:flex-1 zd:bg-greyScale/30" }),
|
|
559
|
+
/* @__PURE__ */ n(m, { className: "zd:text-body3", children: "or" }),
|
|
560
|
+
/* @__PURE__ */ n("div", { className: "zd:h-px zd:flex-1 zd:bg-greyScale/30" })
|
|
994
561
|
] })
|
|
995
562
|
] }),
|
|
996
|
-
/* @__PURE__ */
|
|
997
|
-
|
|
998
|
-
|
|
563
|
+
/* @__PURE__ */ c("div", { className: "zd:px-4 zd:flex zd:flex-col zd:gap-2", children: [
|
|
564
|
+
r.includes("google") && /* @__PURE__ */ n(
|
|
565
|
+
$,
|
|
999
566
|
{
|
|
1000
|
-
|
|
567
|
+
icon: /* @__PURE__ */ n(D, { name: "google" }),
|
|
1001
568
|
title: "Google",
|
|
1002
|
-
|
|
569
|
+
trailing: /* @__PURE__ */ n(re, {}),
|
|
1003
570
|
className: "zd:rounded-3xl",
|
|
1004
|
-
disabled:
|
|
1005
|
-
onClick:
|
|
571
|
+
disabled: b,
|
|
572
|
+
onClick: te
|
|
1006
573
|
}
|
|
1007
574
|
),
|
|
1008
|
-
|
|
1009
|
-
|
|
575
|
+
r.includes("email") && /* @__PURE__ */ n(
|
|
576
|
+
se,
|
|
1010
577
|
{
|
|
1011
578
|
iconName: "email",
|
|
1012
579
|
placeholder: "Enter your email",
|
|
1013
|
-
value:
|
|
1014
|
-
onChange: (
|
|
580
|
+
value: h,
|
|
581
|
+
onChange: (o) => x(o.target.value),
|
|
1015
582
|
type: "email",
|
|
1016
583
|
autoCapitalize: "none",
|
|
1017
584
|
autoComplete: "email",
|
|
1018
|
-
disabled:
|
|
585
|
+
disabled: b,
|
|
1019
586
|
variant: "listItemStyle",
|
|
1020
587
|
containerClassName: "zd:rounded-3xl",
|
|
1021
|
-
onKeyDown: (
|
|
1022
|
-
|
|
588
|
+
onKeyDown: (o) => {
|
|
589
|
+
o.key === "Enter" && h && !b && W();
|
|
1023
590
|
},
|
|
1024
|
-
children: g ? /* @__PURE__ */
|
|
591
|
+
children: g ? /* @__PURE__ */ n("div", { className: "zd:w-13 zd:h-13 zd:flex zd:items-center zd:justify-center", children: /* @__PURE__ */ n("div", { className: "zd:w-5 zd:h-5 zd:border-2 zd:border-solarOrange zd:border-t-transparent zd:rounded-full zd:animate-spin" }) }) : /* @__PURE__ */ n(
|
|
1025
592
|
"button",
|
|
1026
593
|
{
|
|
1027
594
|
type: "button",
|
|
1028
|
-
disabled: !
|
|
1029
|
-
className: `zd:w-13 zd:h-13 zd:rounded-2xl zd:flex zd:items-center zd:justify-center zd:transition-colors ${
|
|
595
|
+
disabled: !j(h) || L,
|
|
596
|
+
className: `zd:w-13 zd:h-13 zd:rounded-2xl zd:flex zd:items-center zd:justify-center zd:transition-colors ${j(h) && !L ? "zd:cursor-pointer" : "zd:cursor-not-allowed zd:opacity-50"}`,
|
|
1030
597
|
onClick: () => W(),
|
|
1031
|
-
children: /* @__PURE__ */
|
|
598
|
+
children: /* @__PURE__ */ n(ie, { name: "chevronRight", className: "zd:text-greyScale" })
|
|
1032
599
|
}
|
|
1033
600
|
)
|
|
1034
601
|
}
|
|
@@ -1036,91 +603,91 @@ function Ve() {
|
|
|
1036
603
|
] })
|
|
1037
604
|
] })
|
|
1038
605
|
] }),
|
|
1039
|
-
/* @__PURE__ */
|
|
1040
|
-
|
|
606
|
+
/* @__PURE__ */ n("div", { className: "zd:px-4", children: /* @__PURE__ */ n(
|
|
607
|
+
Be,
|
|
1041
608
|
{
|
|
1042
|
-
termsAndConditionsUrl:
|
|
1043
|
-
privacyPolicyUrl:
|
|
1044
|
-
agreedToTerms:
|
|
1045
|
-
setAgreedToTerms: (
|
|
1046
|
-
|
|
609
|
+
termsAndConditionsUrl: t == null ? void 0 : t.termsAndConditionsUrl,
|
|
610
|
+
privacyPolicyUrl: t == null ? void 0 : t.privacyPolicyUrl,
|
|
611
|
+
agreedToTerms: d,
|
|
612
|
+
setAgreedToTerms: (o) => {
|
|
613
|
+
i(o), o && l(!1);
|
|
1047
614
|
},
|
|
1048
615
|
highlight: u
|
|
1049
616
|
}
|
|
1050
617
|
) })
|
|
1051
618
|
] });
|
|
1052
619
|
}
|
|
1053
|
-
function
|
|
620
|
+
function Fe() {
|
|
1054
621
|
return typeof window > "u" ? null : new URLSearchParams(window.location.search).get("code");
|
|
1055
622
|
}
|
|
1056
|
-
function
|
|
623
|
+
function _e() {
|
|
1057
624
|
const {
|
|
1058
625
|
otpId: e,
|
|
1059
|
-
otpEncryptionTargetBundle:
|
|
1060
|
-
goToStep:
|
|
1061
|
-
clearOtpSession:
|
|
1062
|
-
config:
|
|
1063
|
-
} =
|
|
626
|
+
otpEncryptionTargetBundle: s,
|
|
627
|
+
goToStep: a,
|
|
628
|
+
clearOtpSession: t,
|
|
629
|
+
config: r
|
|
630
|
+
} = R(), [d] = w(Fe), [i, u] = w(null), l = K(!1), { mutate: h, isPending: x } = fe({
|
|
1064
631
|
mutation: {
|
|
1065
632
|
onSuccess: async () => {
|
|
1066
|
-
var
|
|
1067
|
-
|
|
633
|
+
var f;
|
|
634
|
+
t(), a("authenticated"), (f = r == null ? void 0 : r.onSuccess) == null || f.call(r);
|
|
1068
635
|
},
|
|
1069
|
-
onError: (
|
|
636
|
+
onError: (f) => {
|
|
1070
637
|
var N;
|
|
1071
|
-
u(
|
|
638
|
+
u(f), (N = r == null ? void 0 : r.onError) == null || N.call(r, f);
|
|
1072
639
|
}
|
|
1073
640
|
}
|
|
1074
641
|
});
|
|
1075
|
-
return
|
|
1076
|
-
if (!(l.current || !
|
|
1077
|
-
if (l.current = !0, !e || !
|
|
1078
|
-
|
|
642
|
+
return O(() => {
|
|
643
|
+
if (!(l.current || !d)) {
|
|
644
|
+
if (l.current = !0, !e || !s) {
|
|
645
|
+
M(), a(null);
|
|
1079
646
|
return;
|
|
1080
647
|
}
|
|
1081
|
-
|
|
648
|
+
h({ otpId: e, code: d, otpEncryptionTargetBundle: s });
|
|
1082
649
|
}
|
|
1083
|
-
}, [e,
|
|
1084
|
-
/* @__PURE__ */
|
|
1085
|
-
!
|
|
1086
|
-
!
|
|
1087
|
-
/* @__PURE__ */
|
|
650
|
+
}, [e, s, d, h, a]), /* @__PURE__ */ c(A, { children: [
|
|
651
|
+
/* @__PURE__ */ c("div", { className: "zd:flex-1 zd:flex zd:flex-col zd:gap-8 zd:items-center zd:justify-center", children: [
|
|
652
|
+
!i && x && /* @__PURE__ */ n(P, { imageName: "loading", title: "Verifying Your Email", children: "Please wait while we securely connect your wallet." }),
|
|
653
|
+
!i && !d && !x && /* @__PURE__ */ c(A, { children: [
|
|
654
|
+
/* @__PURE__ */ c(P, { imageName: "error", title: "Invalid Link", children: [
|
|
1088
655
|
"This verification link is invalid or incomplete.",
|
|
1089
|
-
/* @__PURE__ */
|
|
656
|
+
/* @__PURE__ */ n("br", {}),
|
|
1090
657
|
"Please check your email and try again with the correct link."
|
|
1091
658
|
] }),
|
|
1092
|
-
/* @__PURE__ */
|
|
1093
|
-
|
|
659
|
+
/* @__PURE__ */ n(
|
|
660
|
+
E,
|
|
1094
661
|
{
|
|
1095
662
|
action: "primary",
|
|
1096
663
|
onClick: () => {
|
|
1097
|
-
|
|
664
|
+
M(), a("sign-up");
|
|
1098
665
|
},
|
|
1099
666
|
text: "Choose another sign-in method"
|
|
1100
667
|
}
|
|
1101
668
|
)
|
|
1102
669
|
] }),
|
|
1103
|
-
|
|
1104
|
-
/* @__PURE__ */
|
|
1105
|
-
/* @__PURE__ */
|
|
1106
|
-
|
|
670
|
+
i != null && /* @__PURE__ */ c(A, { children: [
|
|
671
|
+
/* @__PURE__ */ n(P, { imageName: "error", title: "Oops, something went wrong", children: "We couldn't complete the sign-in process. This could be due to timeout, an expired link, or a cancelled request." }),
|
|
672
|
+
/* @__PURE__ */ n(
|
|
673
|
+
E,
|
|
1107
674
|
{
|
|
1108
675
|
action: "primary",
|
|
1109
676
|
onClick: () => {
|
|
1110
|
-
|
|
677
|
+
M(), a("sign-up");
|
|
1111
678
|
},
|
|
1112
679
|
text: "Choose another sign-in method"
|
|
1113
680
|
}
|
|
1114
681
|
)
|
|
1115
682
|
] })
|
|
1116
683
|
] }),
|
|
1117
|
-
/* @__PURE__ */
|
|
684
|
+
/* @__PURE__ */ n(B, { className: "zd:self-center zd:pt-4 zd:pb-6" })
|
|
1118
685
|
] });
|
|
1119
686
|
}
|
|
1120
|
-
function
|
|
1121
|
-
const { goToStep: e } =
|
|
1122
|
-
|
|
1123
|
-
{ connector:
|
|
687
|
+
function qe() {
|
|
688
|
+
const { goToStep: e } = R(), { connect: s, connectors: a, isPending: t } = ue(), r = a.filter((i) => i.id !== "zerodev-wallet"), d = (i) => {
|
|
689
|
+
s(
|
|
690
|
+
{ connector: i },
|
|
1124
691
|
{
|
|
1125
692
|
onSuccess: () => {
|
|
1126
693
|
e(null);
|
|
@@ -1128,82 +695,88 @@ function Ye() {
|
|
|
1128
695
|
}
|
|
1129
696
|
);
|
|
1130
697
|
};
|
|
1131
|
-
return /* @__PURE__ */
|
|
1132
|
-
/* @__PURE__ */
|
|
1133
|
-
/* @__PURE__ */
|
|
1134
|
-
/* @__PURE__ */
|
|
1135
|
-
|
|
698
|
+
return /* @__PURE__ */ c(A, { children: [
|
|
699
|
+
/* @__PURE__ */ c("div", { className: "zd:flex-1 zd:flex zd:flex-col zd:gap-8 zd:justify-center", children: [
|
|
700
|
+
/* @__PURE__ */ n(m, { className: "zd:text-h2 zd:text-center", children: "Select your wallet" }),
|
|
701
|
+
/* @__PURE__ */ n("div", { className: "zd:flex zd:flex-col zd:gap-2", children: r.length === 0 ? /* @__PURE__ */ n(m, { className: "zd:text-center", children: "No wallets detected. Install a browser wallet extension to continue." }) : r.map((i) => /* @__PURE__ */ n(
|
|
702
|
+
$,
|
|
1136
703
|
{
|
|
1137
|
-
title:
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
704
|
+
title: i.name,
|
|
705
|
+
icon: i.icon ? /* @__PURE__ */ n(
|
|
706
|
+
"img",
|
|
707
|
+
{
|
|
708
|
+
src: i.icon,
|
|
709
|
+
alt: "",
|
|
710
|
+
className: "zd:w-6 zd:h-6"
|
|
711
|
+
}
|
|
712
|
+
) : /* @__PURE__ */ n(D, { name: "walletOutline" }),
|
|
713
|
+
disabled: t,
|
|
714
|
+
onClick: () => d(i),
|
|
1142
715
|
className: "zd:rounded-3xl"
|
|
1143
716
|
},
|
|
1144
|
-
|
|
717
|
+
i.uid
|
|
1145
718
|
)) })
|
|
1146
719
|
] }),
|
|
1147
|
-
/* @__PURE__ */
|
|
720
|
+
/* @__PURE__ */ n(B, { className: "zd:self-center zd:pt-4 zd:pb-6" })
|
|
1148
721
|
] });
|
|
1149
722
|
}
|
|
1150
|
-
const
|
|
723
|
+
const We = {
|
|
1151
724
|
"wallet-selection": "Choose your wallet"
|
|
1152
725
|
};
|
|
1153
|
-
function
|
|
1154
|
-
return /* @__PURE__ */
|
|
726
|
+
function Ve() {
|
|
727
|
+
return /* @__PURE__ */ n("div", { className: "zd:flex zd:flex-1 zd:items-center zd:justify-center", children: /* @__PURE__ */ n(P, { imageName: "loading", title: "Authenticating...", children: "Please wait while we complete the OAuth authentication." }) });
|
|
1155
728
|
}
|
|
1156
|
-
function
|
|
1157
|
-
return /* @__PURE__ */
|
|
729
|
+
function Ge() {
|
|
730
|
+
return /* @__PURE__ */ n("div", { className: "zd:flex zd:flex-1 zd:items-center zd:justify-center", children: /* @__PURE__ */ n(P, { imageName: "loading", title: "Passkey authentication", children: "Please authenticate with your passkey." }) });
|
|
1158
731
|
}
|
|
1159
|
-
function
|
|
732
|
+
function $e(e) {
|
|
1160
733
|
switch (e) {
|
|
1161
734
|
case "sign-up":
|
|
1162
|
-
return /* @__PURE__ */
|
|
735
|
+
return /* @__PURE__ */ n(He, {});
|
|
1163
736
|
case "email-verification":
|
|
1164
|
-
return /* @__PURE__ */
|
|
737
|
+
return /* @__PURE__ */ n(Ee, {});
|
|
1165
738
|
case "otp-input":
|
|
1166
|
-
return /* @__PURE__ */
|
|
739
|
+
return /* @__PURE__ */ n(Oe, {});
|
|
1167
740
|
case "verifying-otp":
|
|
1168
|
-
return /* @__PURE__ */
|
|
741
|
+
return /* @__PURE__ */ n(_e, {});
|
|
1169
742
|
case "oauth-in-progress":
|
|
1170
|
-
return /* @__PURE__ */
|
|
743
|
+
return /* @__PURE__ */ n(Ve, {});
|
|
1171
744
|
case "passkey-prompt":
|
|
1172
|
-
return /* @__PURE__ */
|
|
745
|
+
return /* @__PURE__ */ n(Ge, {});
|
|
1173
746
|
case "wallet-selection":
|
|
1174
|
-
return /* @__PURE__ */
|
|
747
|
+
return /* @__PURE__ */ n(qe, {});
|
|
1175
748
|
case "error":
|
|
1176
|
-
return /* @__PURE__ */
|
|
749
|
+
return /* @__PURE__ */ n(Te, {});
|
|
1177
750
|
default:
|
|
1178
751
|
return null;
|
|
1179
752
|
}
|
|
1180
753
|
}
|
|
1181
|
-
function
|
|
754
|
+
function lt({
|
|
1182
755
|
onClose: e,
|
|
1183
|
-
size:
|
|
756
|
+
size: s
|
|
1184
757
|
} = {}) {
|
|
1185
|
-
const { step:
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
}, [
|
|
1189
|
-
const u =
|
|
758
|
+
const { step: a, goToStep: t, goBack: r, reset: d } = R(), i = I(X(), (x) => x.logo);
|
|
759
|
+
O(() => {
|
|
760
|
+
a === null && ke() && t("verifying-otp");
|
|
761
|
+
}, [a, t]);
|
|
762
|
+
const u = $e(a);
|
|
1190
763
|
if (!u) return null;
|
|
1191
764
|
const l = () => {
|
|
1192
|
-
|
|
1193
|
-
},
|
|
1194
|
-
return /* @__PURE__ */
|
|
1195
|
-
|
|
765
|
+
M(), d(), e == null || e();
|
|
766
|
+
}, h = a ? We[a] : void 0;
|
|
767
|
+
return /* @__PURE__ */ n(
|
|
768
|
+
ae,
|
|
1196
769
|
{
|
|
1197
|
-
...
|
|
1198
|
-
contentClassName:
|
|
1199
|
-
topNav: /* @__PURE__ */
|
|
1200
|
-
|
|
770
|
+
...s && { size: s },
|
|
771
|
+
contentClassName: a === "sign-up" ? "zd:px-0" : void 0,
|
|
772
|
+
topNav: /* @__PURE__ */ n(
|
|
773
|
+
oe,
|
|
1201
774
|
{
|
|
1202
|
-
...
|
|
1203
|
-
|
|
1204
|
-
...
|
|
1205
|
-
...
|
|
1206
|
-
...
|
|
775
|
+
...r !== null && { onLeftButtonClick: r },
|
|
776
|
+
onRightButtonClick: l,
|
|
777
|
+
...h && { title: h },
|
|
778
|
+
...a === "sign-up" && {
|
|
779
|
+
...i && { logo: i },
|
|
1207
780
|
className: "zd:px-4"
|
|
1208
781
|
}
|
|
1209
782
|
}
|
|
@@ -1212,36 +785,36 @@ function mt({
|
|
|
1212
785
|
}
|
|
1213
786
|
);
|
|
1214
787
|
}
|
|
1215
|
-
const
|
|
1216
|
-
function
|
|
788
|
+
const q = "zerodev:auth:otpSession";
|
|
789
|
+
function De() {
|
|
1217
790
|
if (typeof window > "u") return null;
|
|
1218
791
|
try {
|
|
1219
|
-
const e = window.localStorage.getItem(
|
|
792
|
+
const e = window.localStorage.getItem(q);
|
|
1220
793
|
if (!e) return null;
|
|
1221
|
-
const
|
|
1222
|
-
return !(
|
|
794
|
+
const s = JSON.parse(e);
|
|
795
|
+
return !(s != null && s.otpId) || !(s != null && s.otpEncryptionTargetBundle) ? null : s;
|
|
1223
796
|
} catch {
|
|
1224
797
|
return null;
|
|
1225
798
|
}
|
|
1226
799
|
}
|
|
1227
|
-
function
|
|
800
|
+
function Ke(e) {
|
|
1228
801
|
if (!(typeof window > "u"))
|
|
1229
802
|
try {
|
|
1230
803
|
window.localStorage.setItem(
|
|
1231
|
-
|
|
804
|
+
q,
|
|
1232
805
|
JSON.stringify(e)
|
|
1233
806
|
);
|
|
1234
807
|
} catch {
|
|
1235
808
|
}
|
|
1236
809
|
}
|
|
1237
|
-
function
|
|
810
|
+
function V() {
|
|
1238
811
|
if (!(typeof window > "u"))
|
|
1239
812
|
try {
|
|
1240
|
-
window.localStorage.removeItem(
|
|
813
|
+
window.localStorage.removeItem(q);
|
|
1241
814
|
} catch {
|
|
1242
815
|
}
|
|
1243
816
|
}
|
|
1244
|
-
const
|
|
817
|
+
const Ye = (e, s, a) => ({
|
|
1245
818
|
auth: {
|
|
1246
819
|
// Initial state
|
|
1247
820
|
step: null,
|
|
@@ -1252,45 +825,45 @@ const ot = (e, i, r) => ({
|
|
|
1252
825
|
otpEncryptionTargetBundle: null,
|
|
1253
826
|
config: null,
|
|
1254
827
|
// Actions
|
|
1255
|
-
initialize: (
|
|
1256
|
-
const
|
|
1257
|
-
e((
|
|
828
|
+
initialize: (t) => {
|
|
829
|
+
const r = De();
|
|
830
|
+
e((d) => ({
|
|
1258
831
|
auth: {
|
|
1259
|
-
...
|
|
1260
|
-
config:
|
|
1261
|
-
enabledMethods:
|
|
1262
|
-
...
|
|
1263
|
-
otpId:
|
|
1264
|
-
otpEncryptionTargetBundle:
|
|
832
|
+
...d.auth,
|
|
833
|
+
config: t,
|
|
834
|
+
enabledMethods: t.enabledMethods,
|
|
835
|
+
...r && {
|
|
836
|
+
otpId: r.otpId,
|
|
837
|
+
otpEncryptionTargetBundle: r.otpEncryptionTargetBundle
|
|
1265
838
|
}
|
|
1266
839
|
}
|
|
1267
840
|
}));
|
|
1268
841
|
},
|
|
1269
|
-
goToStep: (
|
|
1270
|
-
e((
|
|
842
|
+
goToStep: (t) => {
|
|
843
|
+
e((r) => ({
|
|
1271
844
|
auth: {
|
|
1272
|
-
...
|
|
1273
|
-
step:
|
|
1274
|
-
stepHistory:
|
|
845
|
+
...r.auth,
|
|
846
|
+
step: t,
|
|
847
|
+
stepHistory: r.auth.step === null ? r.auth.stepHistory : [...r.auth.stepHistory, r.auth.step]
|
|
1275
848
|
}
|
|
1276
849
|
}));
|
|
1277
850
|
},
|
|
1278
851
|
goBack: () => {
|
|
1279
|
-
const { auth:
|
|
1280
|
-
if (
|
|
1281
|
-
const
|
|
1282
|
-
e((
|
|
852
|
+
const { auth: t } = s();
|
|
853
|
+
if (t.stepHistory.length === 0) return;
|
|
854
|
+
const r = [...t.stepHistory], d = r.pop();
|
|
855
|
+
e((i) => ({
|
|
1283
856
|
auth: {
|
|
1284
|
-
...
|
|
1285
|
-
step:
|
|
1286
|
-
stepHistory:
|
|
857
|
+
...i.auth,
|
|
858
|
+
step: d,
|
|
859
|
+
stepHistory: r
|
|
1287
860
|
}
|
|
1288
861
|
}));
|
|
1289
862
|
},
|
|
1290
863
|
reset: () => {
|
|
1291
|
-
|
|
864
|
+
V(), e((t) => ({
|
|
1292
865
|
auth: {
|
|
1293
|
-
...
|
|
866
|
+
...t.auth,
|
|
1294
867
|
step: null,
|
|
1295
868
|
stepHistory: [],
|
|
1296
869
|
email: null,
|
|
@@ -1299,95 +872,95 @@ const ot = (e, i, r) => ({
|
|
|
1299
872
|
}
|
|
1300
873
|
}));
|
|
1301
874
|
},
|
|
1302
|
-
setEmail: (
|
|
1303
|
-
e((
|
|
875
|
+
setEmail: (t) => {
|
|
876
|
+
e((r) => ({
|
|
1304
877
|
auth: {
|
|
1305
|
-
...
|
|
1306
|
-
email:
|
|
878
|
+
...r.auth,
|
|
879
|
+
email: t
|
|
1307
880
|
}
|
|
1308
881
|
}));
|
|
1309
882
|
},
|
|
1310
|
-
setOtpSession: ({ otpId:
|
|
1311
|
-
|
|
883
|
+
setOtpSession: ({ otpId: t, otpEncryptionTargetBundle: r }) => {
|
|
884
|
+
Ke({ otpId: t, otpEncryptionTargetBundle: r }), e((d) => ({
|
|
1312
885
|
auth: {
|
|
1313
|
-
...
|
|
1314
|
-
otpId:
|
|
1315
|
-
otpEncryptionTargetBundle:
|
|
886
|
+
...d.auth,
|
|
887
|
+
otpId: t,
|
|
888
|
+
otpEncryptionTargetBundle: r
|
|
1316
889
|
}
|
|
1317
890
|
}));
|
|
1318
891
|
},
|
|
1319
892
|
clearOtpSession: () => {
|
|
1320
|
-
|
|
893
|
+
V(), e((t) => ({
|
|
1321
894
|
auth: {
|
|
1322
|
-
...
|
|
895
|
+
...t.auth,
|
|
1323
896
|
otpId: null,
|
|
1324
897
|
otpEncryptionTargetBundle: null
|
|
1325
898
|
}
|
|
1326
899
|
}));
|
|
1327
900
|
}
|
|
1328
901
|
}
|
|
1329
|
-
}),
|
|
1330
|
-
xe((
|
|
902
|
+
}), Je = (e = {}) => de()(
|
|
903
|
+
xe((s, a, t) => ({
|
|
1331
904
|
pendingRequests: [],
|
|
1332
905
|
userConfirmationListenerActive: !1,
|
|
1333
906
|
logo: e.logo ?? null,
|
|
1334
|
-
addPendingRequest: (
|
|
1335
|
-
pendingRequests: [...
|
|
907
|
+
addPendingRequest: (r) => s((d) => ({
|
|
908
|
+
pendingRequests: [...d.pendingRequests, r]
|
|
1336
909
|
})),
|
|
1337
|
-
removePendingRequest: (
|
|
1338
|
-
pendingRequests:
|
|
910
|
+
removePendingRequest: (r) => s((d) => ({
|
|
911
|
+
pendingRequests: d.pendingRequests.filter((i) => i.id !== r)
|
|
1339
912
|
})),
|
|
1340
|
-
clearPendingRequests: () =>
|
|
1341
|
-
setUserConfirmationListenerActive: (
|
|
1342
|
-
...
|
|
913
|
+
clearPendingRequests: () => s({ pendingRequests: [] }),
|
|
914
|
+
setUserConfirmationListenerActive: (r) => s({ userConfirmationListenerActive: r }),
|
|
915
|
+
...Ye(s, a)
|
|
1343
916
|
}))
|
|
1344
917
|
);
|
|
1345
|
-
function
|
|
1346
|
-
return new Promise((
|
|
1347
|
-
const
|
|
1348
|
-
(
|
|
1349
|
-
(
|
|
1350
|
-
|
|
918
|
+
function Xe(e) {
|
|
919
|
+
return new Promise((s, a) => {
|
|
920
|
+
const t = e.subscribe(
|
|
921
|
+
(r) => r.auth.step,
|
|
922
|
+
(r) => {
|
|
923
|
+
r === "authenticated" ? (t(), s()) : r === null && (t(), a(new Error("Auth flow dismissed")));
|
|
1351
924
|
}
|
|
1352
925
|
);
|
|
1353
926
|
});
|
|
1354
927
|
}
|
|
1355
|
-
function
|
|
1356
|
-
var
|
|
1357
|
-
const
|
|
1358
|
-
return (
|
|
1359
|
-
const
|
|
928
|
+
function dt(e) {
|
|
929
|
+
var t, r;
|
|
930
|
+
const s = ge(e), a = Je({ logo: (t = e.config) == null ? void 0 : t.logo });
|
|
931
|
+
return (r = e.config) != null && r.auth && a.getState().auth.initialize(e.config.auth), (d) => {
|
|
932
|
+
const i = s(d);
|
|
1360
933
|
return {
|
|
1361
|
-
...
|
|
934
|
+
...i,
|
|
1362
935
|
async connect(u) {
|
|
1363
936
|
var l;
|
|
1364
937
|
try {
|
|
1365
|
-
return await
|
|
1366
|
-
} catch (
|
|
1367
|
-
if (u != null && u.isReconnecting || !((l = e.config) != null && l.auth) || !(
|
|
1368
|
-
throw
|
|
1369
|
-
if (
|
|
938
|
+
return await i.connect(u);
|
|
939
|
+
} catch (h) {
|
|
940
|
+
if (u != null && u.isReconnecting || !((l = e.config) != null && l.auth) || !(h instanceof ye))
|
|
941
|
+
throw h;
|
|
942
|
+
if (a.getState().auth.step !== null)
|
|
1370
943
|
throw new Error("Auth flow already in progress");
|
|
1371
|
-
return
|
|
944
|
+
return a.getState().auth.goToStep("sign-up"), await Xe(a), i.connect(u);
|
|
1372
945
|
}
|
|
1373
946
|
},
|
|
1374
947
|
async disconnect() {
|
|
1375
948
|
var u, l;
|
|
1376
|
-
await ((u =
|
|
949
|
+
await ((u = i.disconnect) == null ? void 0 : u.call(i)), (l = e.config) != null && l.auth && a.getState().auth.reset();
|
|
1377
950
|
},
|
|
1378
951
|
async setup() {
|
|
1379
952
|
var u;
|
|
1380
|
-
await ((u =
|
|
953
|
+
await ((u = i.setup) == null ? void 0 : u.call(i)), typeof window > "u";
|
|
1381
954
|
},
|
|
1382
955
|
getKitStore() {
|
|
1383
|
-
return
|
|
956
|
+
return a;
|
|
1384
957
|
}
|
|
1385
958
|
};
|
|
1386
959
|
};
|
|
1387
960
|
}
|
|
1388
961
|
export {
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
962
|
+
lt as AuthFlow,
|
|
963
|
+
R as useAuth,
|
|
964
|
+
dt as zeroDevWallet
|
|
1392
965
|
};
|
|
1393
966
|
//# sourceMappingURL=index.mjs.map
|