doct-ui-auth-kit 1.0.18 → 1.0.21

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.
@@ -0,0 +1,1793 @@
1
+ "use client";
2
+ import { jsx as u, jsxs as R, Fragment as fe } from "react/jsx-runtime";
3
+ import K, { createContext as nt, useContext as lt, useState as Y, useEffect as J, useRef as ne } from "react";
4
+ import { DoctButton as B, DoctTypography as O, DoctCircularProgress as be, DoctPhoneInput as it, DoctLabeledInput as ot, DoctOtpInput as rt } from "docthub-core-components";
5
+ import { MdArrowBack as st, MdChevronRight as at } from "react-icons/md";
6
+ import { useFormContext as le, Controller as me, useForm as xe, FormProvider as we } from "react-hook-form";
7
+ import { z as j } from "zod";
8
+ var ae = { exports: {} }, ve = {};
9
+ var Fe;
10
+ function ct() {
11
+ if (Fe) return ve;
12
+ Fe = 1;
13
+ var n = K.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
14
+ return ve.c = function(e) {
15
+ return n.H.useMemoCache(e);
16
+ }, ve;
17
+ }
18
+ var Ce = {};
19
+ var ke;
20
+ function ut() {
21
+ return ke || (ke = 1, process.env.NODE_ENV !== "production" && (function() {
22
+ var n = K.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
23
+ Ce.c = function(e) {
24
+ var t = n.H;
25
+ return t === null && console.error(
26
+ `Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
27
+ 1. You might have mismatching versions of React and the renderer (such as React DOM)
28
+ 2. You might be breaking the Rules of Hooks
29
+ 3. You might have more than one copy of React in the same app
30
+ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`
31
+ ), t.useMemoCache(e);
32
+ };
33
+ })()), Ce;
34
+ }
35
+ var De;
36
+ function dt() {
37
+ return De || (De = 1, process.env.NODE_ENV === "production" ? ae.exports = ct() : ae.exports = ut()), ae.exports;
38
+ }
39
+ var E = dt();
40
+ const ze = "/main-logo.svg", ft = "/docthub.svg", Ve = ["/slider/slide-1.png", "/slider/slide-2.png", "/slider/slide-3.png", "/slider/slide-4.png", "/slider/slide-5.png"], mt = 5e3, Ne = "[&_main]:!justify-start [&_main]:!pt-5 md:[&_main]:!pt-[104px]";
41
+ function ye(n) {
42
+ const e = E.c(4), {
43
+ onClick: t,
44
+ ariaLabel: l
45
+ } = n, i = l === void 0 ? "Go back" : l;
46
+ let o;
47
+ e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */ u(st, { className: "h-5 w-5 text-neutral-black" }), e[0] = o) : o = e[0];
48
+ let r;
49
+ return e[1] !== i || e[2] !== t ? (r = /* @__PURE__ */ u(B, { icon: o, iconOnly: !0, onClick: t, size: "medium", variant: "outline", "aria-label": i, className: "mb-4 md:mb-6 h-10 w-10" }), e[1] = i, e[2] = t, e[3] = r) : r = e[3], r;
50
+ }
51
+ function ht() {
52
+ const n = typeof window < "u" ? window.location.hostname : "";
53
+ return n.endsWith(".com") || n.includes(".com:") ? "https://www.dochub.com" : "https://dev.dochub.in/";
54
+ }
55
+ function Ge() {
56
+ const n = E.c(4);
57
+ let e;
58
+ n[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e = ht(), n[0] = e) : e = n[0];
59
+ const t = e;
60
+ let l, i;
61
+ n[1] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (l = /* @__PURE__ */ u("br", {}), i = /* @__PURE__ */ u("a", { href: `${t}/terms-conditions`, className: "font-semibold text-neutral-black underline", children: "Terms of Use" }), n[1] = l, n[2] = i) : (l = n[1], i = n[2]);
62
+ let o;
63
+ return n[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */ R(O, { variant: "body3", align: "center", className: "opacity-60 text-neutral-black", children: [
64
+ "by continuing you agree to Docthub's",
65
+ l,
66
+ i,
67
+ " ",
68
+ "and",
69
+ " ",
70
+ /* @__PURE__ */ u("a", { href: `${t}/privacy-policy`, className: "font-semibold text-neutral-black underline", children: "Privacy Policy." })
71
+ ] }), n[3] = o) : o = n[3], o;
72
+ }
73
+ const gt = "https://docthub.com/";
74
+ function pt(n) {
75
+ const e = E.c(8);
76
+ let t;
77
+ e[0] !== n ? (t = n === void 0 ? {} : n, e[0] = n, e[1] = t) : t = e[1];
78
+ const {
79
+ onClick: l,
80
+ href: i
81
+ } = t, o = i === void 0 ? gt : i;
82
+ let r;
83
+ e[2] !== o || e[3] !== l ? (r = () => {
84
+ if (l) {
85
+ l();
86
+ return;
87
+ }
88
+ typeof window < "u" && window.location.assign(o);
89
+ }, e[2] = o, e[3] = l, e[4] = r) : r = e[4];
90
+ const s = r;
91
+ let a;
92
+ e[5] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (a = /* @__PURE__ */ u("div", { className: "flex items-center justify-center p-2 bg-primary rounded-[10px]", children: /* @__PURE__ */ u(at, { color: "white", className: "h-5 w-5" }) }), e[5] = a) : a = e[5];
93
+ let c;
94
+ return e[6] !== s ? (c = /* @__PURE__ */ u(B, { icon: a, iconPosition: "right", size: "large", variant: "outline", "aria-label": "Go to Enterprise Login", className: "hidden sm:flex items-center gap-4 border border-neutral-12 px-[22px] py-[14px]", onClick: s, children: "Enterprise Login" }), e[6] = s, e[7] = c) : c = e[7], c;
95
+ }
96
+ function He(n) {
97
+ var e, t, l = "";
98
+ if (typeof n == "string" || typeof n == "number") l += n;
99
+ else if (typeof n == "object") if (Array.isArray(n)) {
100
+ var i = n.length;
101
+ for (e = 0; e < i; e++) n[e] && (t = He(n[e])) && (l && (l += " "), l += t);
102
+ } else for (t in n) n[t] && (l && (l += " "), l += t);
103
+ return l;
104
+ }
105
+ function k() {
106
+ for (var n, e, t = 0, l = "", i = arguments.length; t < i; t++) (n = arguments[t]) && (e = He(n)) && (l && (l += " "), l += e);
107
+ return l;
108
+ }
109
+ const qe = nt(null);
110
+ function Ee() {
111
+ const n = lt(qe);
112
+ if (!n)
113
+ throw new Error("AuthLayout compound components must be used within AuthLayout.Root");
114
+ return n;
115
+ }
116
+ function bt(n, e) {
117
+ return e === "md" ? "max-w-md" : e === "lg" ? "max-w-lg" : n === "desktop" ? "max-w-[320px]" : "max-w-[360px]";
118
+ }
119
+ function _e(n = "center") {
120
+ switch (n) {
121
+ case "left":
122
+ return {
123
+ flex: "justify-start",
124
+ text: "text-left"
125
+ };
126
+ case "right":
127
+ return {
128
+ flex: "justify-end",
129
+ text: "text-right"
130
+ };
131
+ default:
132
+ return {
133
+ flex: "justify-center",
134
+ text: "text-center"
135
+ };
136
+ }
137
+ }
138
+ const Pe = "flex w-full mb-4 md:mb-4";
139
+ function yt(n) {
140
+ const e = E.c(15), {
141
+ children: t,
142
+ variant: l,
143
+ maxWidth: i,
144
+ className: o
145
+ } = n, r = l === void 0 ? "mobile" : l, s = i === void 0 ? "sm" : i;
146
+ let a;
147
+ e[0] !== s || e[1] !== r ? (a = bt(r, s), e[0] = s, e[1] = r, e[2] = a) : a = e[2];
148
+ const c = a;
149
+ let f;
150
+ e[3] !== s || e[4] !== c || e[5] !== r ? (f = {
151
+ variant: r,
152
+ maxWidth: s,
153
+ maxWidthClass: c
154
+ }, e[3] = s, e[4] = c, e[5] = r, e[6] = f) : f = e[6];
155
+ const h = f;
156
+ let d;
157
+ e[7] !== o ? (d = k("min-h-svh w-full bg-neutral-white flex flex-col", o), e[7] = o, e[8] = d) : d = e[8];
158
+ let m;
159
+ e[9] !== t || e[10] !== d ? (m = /* @__PURE__ */ u("div", { className: d, children: t }), e[9] = t, e[10] = d, e[11] = m) : m = e[11];
160
+ let p;
161
+ return e[12] !== h || e[13] !== m ? (p = /* @__PURE__ */ u(qe.Provider, { value: h, children: m }), e[12] = h, e[13] = m, e[14] = p) : p = e[14], p;
162
+ }
163
+ function vt(n) {
164
+ const e = E.c(12), {
165
+ children: t,
166
+ className: l
167
+ } = n, {
168
+ variant: i
169
+ } = Ee();
170
+ if (i === "desktop") {
171
+ let s;
172
+ e[0] !== l ? (s = k("flex justify-end px-5 pt-5", l), e[0] = l, e[1] = s) : s = e[1];
173
+ let a;
174
+ e[2] !== t ? (a = /* @__PURE__ */ u("div", { className: "w-auto", children: t }), e[2] = t, e[3] = a) : a = e[3];
175
+ let c;
176
+ return e[4] !== s || e[5] !== a ? (c = /* @__PURE__ */ u("div", { className: s, children: a }), e[4] = s, e[5] = a, e[6] = c) : c = e[6], c;
177
+ }
178
+ let o;
179
+ e[7] !== l ? (o = k("mb-4 w-full md:mb-6", l), e[7] = l, e[8] = o) : o = e[8];
180
+ let r;
181
+ return e[9] !== t || e[10] !== o ? (r = /* @__PURE__ */ u("div", { className: o, children: t }), e[9] = t, e[10] = o, e[11] = r) : r = e[11], r;
182
+ }
183
+ function Ct(n) {
184
+ const e = E.c(6), {
185
+ children: t,
186
+ align: l,
187
+ className: i
188
+ } = n, o = l === void 0 ? "center" : l;
189
+ let r;
190
+ if (e[0] !== o || e[1] !== i) {
191
+ const {
192
+ flex: a
193
+ } = _e(o);
194
+ r = k(Pe, a, i), e[0] = o, e[1] = i, e[2] = r;
195
+ } else
196
+ r = e[2];
197
+ let s;
198
+ return e[3] !== t || e[4] !== r ? (s = /* @__PURE__ */ u("div", { className: r, children: t }), e[3] = t, e[4] = r, e[5] = s) : s = e[5], s;
199
+ }
200
+ function St(n) {
201
+ const e = E.c(6), {
202
+ children: t,
203
+ align: l,
204
+ className: i
205
+ } = n, o = l === void 0 ? "center" : l;
206
+ let r;
207
+ if (e[0] !== o || e[1] !== i) {
208
+ const {
209
+ flex: a,
210
+ text: c
211
+ } = _e(o);
212
+ r = k(Pe, a, c, i), e[0] = o, e[1] = i, e[2] = r;
213
+ } else
214
+ r = e[2];
215
+ let s;
216
+ return e[3] !== t || e[4] !== r ? (s = /* @__PURE__ */ u("div", { className: r, children: t }), e[3] = t, e[4] = r, e[5] = s) : s = e[5], s;
217
+ }
218
+ function xt(n) {
219
+ const e = E.c(6), {
220
+ children: t,
221
+ align: l,
222
+ className: i
223
+ } = n, o = l === void 0 ? "center" : l;
224
+ let r;
225
+ if (e[0] !== o || e[1] !== i) {
226
+ const {
227
+ flex: a,
228
+ text: c
229
+ } = _e(o);
230
+ r = k(Pe, a, c, i), e[0] = o, e[1] = i, e[2] = r;
231
+ } else
232
+ r = e[2];
233
+ let s;
234
+ return e[3] !== t || e[4] !== r ? (s = /* @__PURE__ */ u("div", { className: r, children: t }), e[3] = t, e[4] = r, e[5] = s) : s = e[5], s;
235
+ }
236
+ function wt(n) {
237
+ const e = E.c(5), {
238
+ children: t,
239
+ className: l
240
+ } = n;
241
+ let i;
242
+ e[0] !== l ? (i = k("w-full flex flex-col space-y-4 mb-4 md:mb-6", l), e[0] = l, e[1] = i) : i = e[1];
243
+ let o;
244
+ return e[2] !== t || e[3] !== i ? (o = /* @__PURE__ */ u("div", { className: i, children: t }), e[2] = t, e[3] = i, e[4] = o) : o = e[4], o;
245
+ }
246
+ function Nt(n) {
247
+ const e = E.c(10), {
248
+ children: t,
249
+ sm: l,
250
+ className: i
251
+ } = n, {
252
+ maxWidthClass: o
253
+ } = Ee();
254
+ let r;
255
+ e[0] !== i ? (r = k("flex-1 flex flex-col items-center justify-center", "px-5 py-8 md:py-12", "w-full", i), e[0] = i, e[1] = r) : r = e[1];
256
+ const s = l ? "max-w-[320px]" : o;
257
+ let a;
258
+ e[2] !== s ? (a = k("w-full flex flex-col items-center", s), e[2] = s, e[3] = a) : a = e[3];
259
+ let c;
260
+ e[4] !== t || e[5] !== a ? (c = /* @__PURE__ */ u("div", { className: a, children: t }), e[4] = t, e[5] = a, e[6] = c) : c = e[6];
261
+ let f;
262
+ return e[7] !== r || e[8] !== c ? (f = /* @__PURE__ */ u("main", { className: r, children: c }), e[7] = r, e[8] = c, e[9] = f) : f = e[9], f;
263
+ }
264
+ function Et(n) {
265
+ const e = E.c(10), {
266
+ children: t,
267
+ className: l
268
+ } = n, {
269
+ maxWidthClass: i
270
+ } = Ee();
271
+ let o;
272
+ e[0] !== l ? (o = k("px-5 py-6 md:py-8 w-full flex justify-center", l), e[0] = l, e[1] = o) : o = e[1];
273
+ let r;
274
+ e[2] !== i ? (r = k("w-full text-center", i), e[2] = i, e[3] = r) : r = e[3];
275
+ let s;
276
+ e[4] !== t || e[5] !== r ? (s = /* @__PURE__ */ u("div", { className: r, children: t }), e[4] = t, e[5] = r, e[6] = s) : s = e[6];
277
+ let a;
278
+ return e[7] !== o || e[8] !== s ? (a = /* @__PURE__ */ u("footer", { className: o, children: s }), e[7] = o, e[8] = s, e[9] = a) : a = e[9], a;
279
+ }
280
+ const q = {
281
+ Root: yt,
282
+ Header: vt,
283
+ Main: Nt,
284
+ Logo: Ct,
285
+ Title: St,
286
+ Description: xt,
287
+ Body: wt,
288
+ Footer: Et
289
+ };
290
+ function _t(n) {
291
+ const e = E.c(38), {
292
+ images: t,
293
+ autoPlayInterval: l,
294
+ className: i,
295
+ hideIndicators: o,
296
+ onSlideChange: r,
297
+ activeIndex: s,
298
+ onNavigate: a
299
+ } = n, c = l === void 0 ? 5e3 : l, [f, h] = Y(0), d = s !== void 0, m = d ? s : f;
300
+ let p, b;
301
+ e[0] !== c || e[1] !== m || e[2] !== t.length || e[3] !== d || e[4] !== r ? (p = () => {
302
+ if (c > 0 && t.length > 1) {
303
+ const A = setInterval(() => {
304
+ const I = (m + 1) % t.length;
305
+ d || h(I), r?.(I);
306
+ }, c);
307
+ return () => clearInterval(A);
308
+ }
309
+ }, b = [c, t.length, m, d, r], e[0] = c, e[1] = m, e[2] = t.length, e[3] = d, e[4] = r, e[5] = p, e[6] = b) : (p = e[5], b = e[6]), J(p, b);
310
+ let g, y;
311
+ e[7] !== t.length || e[8] !== d || e[9] !== r ? (g = () => {
312
+ !d && t.length > 0 && r?.(0);
313
+ }, y = [t.length, d, r], e[7] = t.length, e[8] = d, e[9] = r, e[10] = g, e[11] = y) : (g = e[10], y = e[11]), J(g, y);
314
+ let v;
315
+ e[12] !== d || e[13] !== a || e[14] !== r ? (v = (A) => {
316
+ d ? (a?.(A), r?.(A)) : (h(A), r?.(A));
317
+ }, e[12] = d, e[13] = a, e[14] = r, e[15] = v) : v = e[15];
318
+ const C = v;
319
+ if (t.length === 0)
320
+ return null;
321
+ const w = t.length;
322
+ let S;
323
+ e[16] !== i ? (S = k("relative w-full h-full min-h-0", i), e[16] = i, e[17] = S) : S = e[17];
324
+ const x = `${w * 100}%`, _ = `translateX(-${m * 100 / w}%)`;
325
+ let N;
326
+ e[18] !== x || e[19] !== _ ? (N = {
327
+ width: x,
328
+ transform: _
329
+ }, e[18] = x, e[19] = _, e[20] = N) : N = e[20];
330
+ let P;
331
+ if (e[21] !== t || e[22] !== w) {
332
+ let A;
333
+ e[24] !== w ? (A = (I, F) => /* @__PURE__ */ u("div", { className: "relative flex-shrink-0 h-full", style: {
334
+ width: `${100 / w}%`
335
+ }, children: /* @__PURE__ */ u("img", { src: I, alt: `Slide ${F + 1}`, className: "h-full w-full object-cover object-center" }) }, `${I}-${F}`), e[24] = w, e[25] = A) : A = e[25], P = t.map(A), e[21] = t, e[22] = w, e[23] = P;
336
+ } else
337
+ P = e[23];
338
+ let T;
339
+ e[26] !== N || e[27] !== P ? (T = /* @__PURE__ */ u("div", { className: "relative w-full h-full overflow-hidden", children: /* @__PURE__ */ u("div", { className: "flex h-full transition-transform duration-500 ease-in-out", style: N, children: P }) }), e[26] = N, e[27] = P, e[28] = T) : T = e[28];
340
+ let D;
341
+ e[29] !== m || e[30] !== C || e[31] !== o || e[32] !== t ? (D = t.length > 1 && !o && /* @__PURE__ */ u("div", { className: "absolute -top-10 left-1/2 flex -translate-x-1/2 gap-2 z-20", children: t.map((A, I) => /* @__PURE__ */ u("button", { type: "button", onClick: () => C(I), className: k("h-1 rounded-[3px] transition-all duration-300", I === m ? "w-8 bg-neutral-white" : "w-2 bg-neutral-white/40"), "aria-label": `Go to slide ${I + 1}` }, `indicator-${A}-${I}`)) }), e[29] = m, e[30] = C, e[31] = o, e[32] = t, e[33] = D) : D = e[33];
342
+ let W;
343
+ return e[34] !== T || e[35] !== D || e[36] !== S ? (W = /* @__PURE__ */ R("div", { className: S, children: [
344
+ T,
345
+ D
346
+ ] }), e[34] = T, e[35] = D, e[36] = S, e[37] = W) : W = e[37], W;
347
+ }
348
+ function Pt(n) {
349
+ const e = E.c(20), {
350
+ sliderImages: t,
351
+ sliderAutoPlayInterval: l,
352
+ activeSlideIndex: i,
353
+ onSlideChange: o,
354
+ ctaText: r,
355
+ sliderTitles: s,
356
+ className: a
357
+ } = n, c = s?.[i];
358
+ let f = r ?? null;
359
+ if (c != null) {
360
+ let g;
361
+ e[0] !== c ? (g = typeof c == "string" ? /* @__PURE__ */ u(O, { variant: "h6", weight: "medium", align: "center", className: "whitespace-pre-line text-primary-170", children: c }) : c, e[0] = c, e[1] = g) : g = e[1], f = g;
362
+ }
363
+ let h;
364
+ e[2] !== a ? (h = k("relative w-full h-[100dvh] transition-colors duration-500", a), e[2] = a, e[3] = h) : h = e[3];
365
+ let d;
366
+ e[4] !== i || e[5] !== o || e[6] !== t ? (d = t.length > 1 && /* @__PURE__ */ u("div", { className: "absolute top-2.5 left-1/2 z-20 flex w-full max-w-[400px] -translate-x-1/2 gap-1.5 px-4", children: t.map((g, y) => /* @__PURE__ */ u("button", { type: "button", onClick: () => o(y), "aria-label": `Go to slide ${y + 1}`, "aria-current": y === i ? "true" : void 0, className: k("h-1 flex-1 rounded-[3px] cursor-pointer transition-all duration-300", y === i ? "bg-neutral-white" : "bg-neutral-white/40 hover:bg-neutral-white/60") }, `indicator-${g}-${y}`)) }), e[4] = i, e[5] = o, e[6] = t, e[7] = d) : d = e[7];
367
+ let m;
368
+ e[8] !== f ? (m = f != null && /* @__PURE__ */ u("div", { className: k("absolute left-1/2 top-[152.5px] z-10 flex w-[328px] -translate-x-1/2 items-center justify-center text-center transition-opacity duration-300"), children: f }), e[8] = f, e[9] = m) : m = e[9];
369
+ let p;
370
+ e[10] !== i || e[11] !== o || e[12] !== l || e[13] !== t ? (p = /* @__PURE__ */ u("div", { className: "absolute inset-0", children: t.length > 0 ? /* @__PURE__ */ u(_t, { images: t, autoPlayInterval: l, className: "h-full w-full", hideIndicators: !0, activeIndex: i, onSlideChange: o, onNavigate: o }) : /* @__PURE__ */ u("div", { className: "flex h-full w-full items-center justify-center bg-neutral-white/50 p-8", children: /* @__PURE__ */ u(O, { variant: "h6", weight: "medium", align: "center", className: "opacity-40 text-primary-170", children: "No slides configured" }) }) }), e[10] = i, e[11] = o, e[12] = l, e[13] = t, e[14] = p) : p = e[14];
371
+ let b;
372
+ return e[15] !== h || e[16] !== d || e[17] !== m || e[18] !== p ? (b = /* @__PURE__ */ R("div", { className: h, children: [
373
+ d,
374
+ m,
375
+ p
376
+ ] }), e[15] = h, e[16] = d, e[17] = m, e[18] = p, e[19] = b) : b = e[19], b;
377
+ }
378
+ function At(n) {
379
+ const e = E.c(22), {
380
+ sliderImages: t,
381
+ sliderAutoPlayInterval: l,
382
+ ctaText: i,
383
+ sliderTitles: o,
384
+ className: r,
385
+ marketingClassName: s,
386
+ contentClassName: a,
387
+ children: c
388
+ } = n, f = l === void 0 ? 5e3 : l, [h, d] = Y(0), m = t ?? Ve;
389
+ let p;
390
+ e[0] !== r ? (p = k("min-h-svh w-full flex flex-1 flex-col bg-neutral-white transition-colors duration-500", r), e[0] = r, e[1] = p) : p = e[1];
391
+ let b;
392
+ e[2] !== s ? (b = s && {
393
+ className: s
394
+ }, e[2] = s, e[3] = b) : b = e[3];
395
+ let g;
396
+ e[4] !== h || e[5] !== i || e[6] !== m || e[7] !== f || e[8] !== o || e[9] !== b ? (g = /* @__PURE__ */ u("div", { className: "hidden lg:block lg:w-[432px] lg:h-[100dvh] lg:flex-shrink-0 lg:flex-grow-0", children: /* @__PURE__ */ u(Pt, { sliderImages: m, sliderAutoPlayInterval: f, activeSlideIndex: h, onSlideChange: d, ctaText: i, sliderTitles: o, ...b }) }), e[4] = h, e[5] = i, e[6] = m, e[7] = f, e[8] = o, e[9] = b, e[10] = g) : g = e[10];
397
+ let y;
398
+ e[11] !== a ? (y = k("flex-1 min-w-0 flex flex-col overflow-x-hidden", a), e[11] = a, e[12] = y) : y = e[12];
399
+ let v;
400
+ e[13] !== c || e[14] !== y ? (v = /* @__PURE__ */ u("div", { className: y, children: c }), e[13] = c, e[14] = y, e[15] = v) : v = e[15];
401
+ let C;
402
+ e[16] !== g || e[17] !== v ? (C = /* @__PURE__ */ R("div", { className: "flex w-full h-full min-h-svh flex-col lg:flex-row", children: [
403
+ g,
404
+ v
405
+ ] }), e[16] = g, e[17] = v, e[18] = C) : C = e[18];
406
+ let w;
407
+ return e[19] !== p || e[20] !== C ? (w = /* @__PURE__ */ u("div", { className: p, children: C }), e[19] = p, e[20] = C, e[21] = w) : w = e[21], w;
408
+ }
409
+ function ie(n) {
410
+ const e = E.c(58), {
411
+ children: t,
412
+ layoutType: l,
413
+ logo: i,
414
+ title: o,
415
+ description: r,
416
+ footer: s,
417
+ header: a,
418
+ onBack: c,
419
+ backButton: f,
420
+ sliderImages: h,
421
+ sliderAutoPlayInterval: d,
422
+ sliderTitles: m,
423
+ variant: p,
424
+ maxWidth: b,
425
+ contentWidth: g,
426
+ align: y,
427
+ className: v
428
+ } = n, C = l === void 0 ? "withSlider" : l, w = h === void 0 ? Ve : h, S = d === void 0 ? mt : d, x = b === void 0 ? "sm" : b, _ = g === void 0 ? "default" : g, N = y === void 0 ? "center" : y, P = _ === "sm", T = p ?? (C === "withSlider" ? "desktop" : "mobile");
429
+ let D;
430
+ e[0] !== f || e[1] !== i || e[2] !== c ? (D = () => f ?? (c != null ? /* @__PURE__ */ u(ye, { onClick: c }) : i ? typeof i == "string" ? /* @__PURE__ */ u("div", { className: "h-[30px] w-[140px]", children: /* @__PURE__ */ u("img", { src: i, alt: "Docthub", className: "block h-full w-full object-cover" }) }) : i : null), e[0] = f, e[1] = i, e[2] = c, e[3] = D) : D = e[3];
431
+ const W = D;
432
+ let A;
433
+ e[4] !== N || e[5] !== o ? (A = () => o ? typeof o == "string" ? /* @__PURE__ */ u(O, { variant: "h5", weight: "extraBold", align: N, className: "text-neutral-black", children: o }) : o : null, e[4] = N, e[5] = o, e[6] = A) : A = e[6];
434
+ const I = A;
435
+ let F;
436
+ e[7] !== N || e[8] !== r ? (F = () => r ? typeof r == "string" ? /* @__PURE__ */ u(O, { variant: "body1", align: N, className: "text-neutral-black", children: r }) : r : null, e[7] = N, e[8] = r, e[9] = F) : F = e[9];
437
+ const M = F;
438
+ let L;
439
+ e[10] !== a ? (L = a && /* @__PURE__ */ u(q.Header, { children: a }), e[10] = a, e[11] = L) : L = e[11];
440
+ let U;
441
+ e[12] !== W ? (U = W(), e[12] = W, e[13] = U) : U = e[13];
442
+ let V;
443
+ e[14] !== N || e[15] !== U ? (V = /* @__PURE__ */ u(q.Logo, { align: N, children: U }), e[14] = N, e[15] = U, e[16] = V) : V = e[16];
444
+ let G;
445
+ e[17] !== N || e[18] !== I || e[19] !== o ? (G = o && /* @__PURE__ */ u(q.Title, { align: N, children: I() }), e[17] = N, e[18] = I, e[19] = o, e[20] = G) : G = e[20];
446
+ let H;
447
+ e[21] !== N || e[22] !== r || e[23] !== M ? (H = r && /* @__PURE__ */ u(q.Description, { align: N, children: M() }), e[21] = N, e[22] = r, e[23] = M, e[24] = H) : H = e[24];
448
+ let $;
449
+ e[25] !== t ? ($ = /* @__PURE__ */ u(q.Body, { children: t }), e[25] = t, e[26] = $) : $ = e[26];
450
+ let z;
451
+ e[27] !== V || e[28] !== G || e[29] !== H || e[30] !== $ || e[31] !== P ? (z = /* @__PURE__ */ R(q.Main, { sm: P, children: [
452
+ V,
453
+ G,
454
+ H,
455
+ $
456
+ ] }), e[27] = V, e[28] = G, e[29] = H, e[30] = $, e[31] = P, e[32] = z) : z = e[32];
457
+ let X;
458
+ e[33] !== s ? (X = s && /* @__PURE__ */ u(q.Footer, { children: s }), e[33] = s, e[34] = X) : X = e[34];
459
+ let oe;
460
+ e[35] !== L || e[36] !== z || e[37] !== X ? (oe = /* @__PURE__ */ R(fe, { children: [
461
+ L,
462
+ z,
463
+ X
464
+ ] }), e[35] = L, e[36] = z, e[37] = X, e[38] = oe) : oe = e[38];
465
+ const Z = oe;
466
+ if (C === "withSlider") {
467
+ let ee;
468
+ e[39] !== v ? (ee = v && {
469
+ className: v
470
+ }, e[39] = v, e[40] = ee) : ee = e[40];
471
+ let te;
472
+ e[41] !== Z || e[42] !== x || e[43] !== T ? (te = /* @__PURE__ */ u(q.Root, { variant: T, maxWidth: x, className: "bg-transparent", children: Z }), e[41] = Z, e[42] = x, e[43] = T, e[44] = te) : te = e[44];
473
+ let se;
474
+ return e[45] !== S || e[46] !== w || e[47] !== m || e[48] !== ee || e[49] !== te ? (se = /* @__PURE__ */ u(At, { sliderImages: w, sliderAutoPlayInterval: S, sliderTitles: m, ...ee, children: te }), e[45] = S, e[46] = w, e[47] = m, e[48] = ee, e[49] = te, e[50] = se) : se = e[50], se;
475
+ }
476
+ let Q;
477
+ e[51] !== v ? (Q = v && {
478
+ className: v
479
+ }, e[51] = v, e[52] = Q) : Q = e[52];
480
+ let re;
481
+ return e[53] !== Z || e[54] !== x || e[55] !== T || e[56] !== Q ? (re = /* @__PURE__ */ u(q.Root, { variant: T, maxWidth: x, ...Q, children: Z }), e[53] = Z, e[54] = x, e[55] = T, e[56] = Q, e[57] = re) : re = e[57], re;
482
+ }
483
+ function Ot(n) {
484
+ return {
485
+ triggerSignIn() {
486
+ }
487
+ };
488
+ }
489
+ const $e = "https://accounts.google.com/gsi/client";
490
+ function Tt() {
491
+ return typeof window > "u" ? Promise.reject(new Error("GSI requires browser")) : window.google?.accounts?.id ? Promise.resolve() : new Promise((n, e) => {
492
+ if (document.querySelector(`script[src="${$e}"]`)) {
493
+ const i = () => window.google?.accounts?.id ? n() : setTimeout(i, 50);
494
+ i();
495
+ return;
496
+ }
497
+ const l = document.createElement("script");
498
+ l.src = $e, l.async = !0, l.defer = !0, l.onload = () => n(), l.onerror = () => e(new Error("Failed to load Google Identity Services script")), document.body.appendChild(l);
499
+ });
500
+ }
501
+ const It = "openid email profile", We = 2e3;
502
+ function Lt(n) {
503
+ const e = E.c(18), {
504
+ clientId: t,
505
+ onCredential: l,
506
+ enableOneTap: i
507
+ } = n, o = i === void 0 ? !1 : i, r = ne(!1), s = ne(null), a = ne(l), c = ne(0), f = ne(!1);
508
+ let h, d;
509
+ e[0] !== l ? (h = () => {
510
+ a.current = l;
511
+ }, d = [l], e[0] = l, e[1] = h, e[2] = d) : (h = e[1], d = e[2]), J(h, d);
512
+ let m;
513
+ e[3] !== t ? (m = async () => {
514
+ t && (await Tt(), !(!window.google?.accounts?.id || !window.google?.accounts?.oauth2) && (r.current || (window.google.accounts.id.initialize({
515
+ client_id: t,
516
+ callback: (x) => {
517
+ a.current(x.credential);
518
+ },
519
+ auto_select: !1
520
+ }), s.current = window.google.accounts.oauth2.initCodeClient({
521
+ client_id: t,
522
+ scope: It,
523
+ ux_mode: "popup",
524
+ callback: (x) => {
525
+ a.current(x.code);
526
+ },
527
+ error_callback: Rt
528
+ }), r.current = !0)));
529
+ }, e[3] = t, e[4] = m) : m = e[4];
530
+ const p = m;
531
+ let b;
532
+ e[5] !== t ? (b = async () => {
533
+ if (!t)
534
+ return;
535
+ const x = Date.now();
536
+ x - c.current < We || (c.current = x, s.current?.requestCode());
537
+ }, e[5] = t, e[6] = b) : b = e[6];
538
+ const g = b;
539
+ let y, v;
540
+ e[7] !== t || e[8] !== p ? (y = () => {
541
+ t && p();
542
+ }, v = [t, p], e[7] = t, e[8] = p, e[9] = y, e[10] = v) : (y = e[9], v = e[10]), J(y, v);
543
+ let C, w;
544
+ e[11] !== t || e[12] !== o || e[13] !== p ? (C = () => {
545
+ !o || !t || f.current || (f.current = !0, p().then(() => {
546
+ if (!window.google?.accounts?.id)
547
+ return;
548
+ const x = Date.now();
549
+ x - c.current < We || (c.current = x, window.google.accounts.id.prompt());
550
+ }));
551
+ }, w = [o, t, p], e[11] = t, e[12] = o, e[13] = p, e[14] = C, e[15] = w) : (C = e[14], w = e[15]), J(C, w);
552
+ let S;
553
+ return e[16] !== g ? (S = {
554
+ loginWithGoogle: g
555
+ }, e[16] = g, e[17] = S) : S = e[17], S;
556
+ }
557
+ function Rt() {
558
+ }
559
+ function ce(n) {
560
+ const e = E.c(7), {
561
+ label: t,
562
+ value: l
563
+ } = n;
564
+ if (!l)
565
+ return null;
566
+ let i;
567
+ e[0] !== t ? (i = /* @__PURE__ */ u(O, { variant: "textLabel3", className: "text-neutral-500", children: t }), e[0] = t, e[1] = i) : i = e[1];
568
+ let o;
569
+ e[2] !== l ? (o = /* @__PURE__ */ u(O, { variant: "body1", weight: "semiBold", className: "break-words text-neutral-black", children: l }), e[2] = l, e[3] = o) : o = e[3];
570
+ let r;
571
+ return e[4] !== i || e[5] !== o ? (r = /* @__PURE__ */ R("div", { className: "flex w-full flex-col gap-1 rounded-lg border border-neutral-200 bg-white px-4 py-3", children: [
572
+ i,
573
+ o
574
+ ] }), e[4] = i, e[5] = o, e[6] = r) : r = e[6], r;
575
+ }
576
+ function In(n) {
577
+ const {
578
+ details: e,
579
+ onBack: t,
580
+ onVerify: l
581
+ } = n, [i, o] = Y(!1), [r, s] = Y(""), a = e.conflictField === "email", c = a ? "Verify Email" : "Verify Mobile Number", f = a ? "This email is already connected with another account." : "This mobile number is already connected with another account.", h = async () => {
582
+ s(""), o(!0);
583
+ try {
584
+ await l();
585
+ } catch (d) {
586
+ s(d?.message ?? "Unable to verify right now");
587
+ } finally {
588
+ o(!1);
589
+ }
590
+ };
591
+ return /* @__PURE__ */ u(ie, { layoutType: "standalone", variant: "mobile", contentWidth: "sm", align: "left", backButton: t != null ? /* @__PURE__ */ u(ye, { onClick: t }) : void 0, title: /* @__PURE__ */ u(O, { variant: "h5", weight: "extraBold", align: "left", className: "-mb-1.5", children: c }), description: /* @__PURE__ */ u(O, { variant: "body1", align: "left", className: "mb-4 md:mb-4", children: f }), className: Ne, children: /* @__PURE__ */ R("div", { className: "flex w-full flex-col gap-4", children: [
592
+ a ? /* @__PURE__ */ R(fe, { children: [
593
+ /* @__PURE__ */ u(ce, { label: "Existing Email", value: e.oldEmail }),
594
+ /* @__PURE__ */ u(ce, { label: "New Email", value: e.newEmail })
595
+ ] }) : /* @__PURE__ */ R(fe, { children: [
596
+ /* @__PURE__ */ u(ce, { label: "Existing Mobile Number", value: e.oldPhone ? `${e.oldCountryCode ? `+${e.oldCountryCode} ` : ""}${e.oldPhone}` : void 0 }),
597
+ /* @__PURE__ */ u(ce, { label: "New Mobile Number", value: `+${e.newCountryCode} ${e.newPhone}` })
598
+ ] }),
599
+ r ? /* @__PURE__ */ u(O, { variant: "body5", className: "text-error", children: r }) : null,
600
+ /* @__PURE__ */ u(B, { type: "button", variant: "primary", size: "large", fullWidth: !0, disabled: i, onClick: h, children: i ? /* @__PURE__ */ u(be, { size: 32, strokeWidth: 2 }) : "Verify" })
601
+ ] }) });
602
+ }
603
+ function Se(n) {
604
+ const e = E.c(43);
605
+ let t, l, i, o, r, s, a, c, f, h, d, m, p, b, g, y, v, C;
606
+ e[0] !== n ? ({
607
+ name: f,
608
+ label: y,
609
+ countryCode: v,
610
+ countryCodeName: o,
611
+ phoneArrayName: p,
612
+ selectedCountryName: g,
613
+ countries: i,
614
+ defaultCountry: r,
615
+ onValuesChange: m,
616
+ onCountryChange: h,
617
+ onCountryCodeChange: d,
618
+ placeholder: C,
619
+ disabled: s,
620
+ required: b,
621
+ className: t,
622
+ helperText: c,
623
+ control: l,
624
+ ...a
625
+ } = n, e[0] = n, e[1] = t, e[2] = l, e[3] = i, e[4] = o, e[5] = r, e[6] = s, e[7] = a, e[8] = c, e[9] = f, e[10] = h, e[11] = d, e[12] = m, e[13] = p, e[14] = b, e[15] = g, e[16] = y, e[17] = v, e[18] = C) : (t = e[1], l = e[2], i = e[3], o = e[4], r = e[5], s = e[6], a = e[7], c = e[8], f = e[9], h = e[10], d = e[11], m = e[12], p = e[13], b = e[14], g = e[15], y = e[16], v = e[17], C = e[18]);
626
+ const w = y === void 0 ? "Phone Number" : y, S = v === void 0 ? "91" : v, x = C === void 0 ? "Enter phone number" : C, _ = le(), N = l || _.control;
627
+ let P;
628
+ e[19] !== t || e[20] !== i || e[21] !== S || e[22] !== o || e[23] !== r || e[24] !== s || e[25] !== a || e[26] !== c || e[27] !== w || e[28] !== _ || e[29] !== f || e[30] !== h || e[31] !== d || e[32] !== m || e[33] !== p || e[34] !== x || e[35] !== b || e[36] !== N || e[37] !== g ? (P = (D) => {
629
+ const {
630
+ field: W,
631
+ fieldState: A
632
+ } = D, I = (F, M) => /* @__PURE__ */ u(it, { ...a, id: f, value: String(W.value ?? ""), ...w !== void 0 && {
633
+ label: w
634
+ }, ...F ? {
635
+ countryCode: F
636
+ } : {}, ...x !== void 0 && {
637
+ placeholder: x
638
+ }, ...s !== void 0 && {
639
+ disabled: s
640
+ }, ...b !== void 0 && {
641
+ required: b
642
+ }, ...i !== void 0 && {
643
+ countries: i
644
+ }, ...r !== void 0 && {
645
+ defaultCountry: r
646
+ }, ...t !== void 0 && {
647
+ className: t
648
+ }, ...A.error?.message !== void 0 && {
649
+ error: A.error?.message
650
+ }, ...A.error === void 0 && c !== void 0 && {
651
+ helperText: c
652
+ }, onPhoneChange: (L) => {
653
+ W.onChange(L.replaceAll(/\D/g, ""));
654
+ }, onCountryCodeChange: (L) => {
655
+ const U = String(L || "").replaceAll(/\D/g, "");
656
+ M?.(U), d?.(L);
657
+ }, onValuesChange: (L) => {
658
+ p && _.setValue(p, L, {
659
+ shouldDirty: !0
660
+ }), m?.(L);
661
+ }, onCountryChange: (L) => {
662
+ g && _.setValue(g, JSON.stringify(L), {
663
+ shouldDirty: !0
664
+ }), h?.(L);
665
+ }, onBlur: W.onBlur });
666
+ if (!o) {
667
+ const F = String(S || "").replaceAll(/\D/g, "");
668
+ return I(F);
669
+ }
670
+ return /* @__PURE__ */ u(me, { name: o, control: N, render: (F) => {
671
+ const {
672
+ field: M
673
+ } = F, L = String(M.value ?? S ?? "").replaceAll(/\D/g, "");
674
+ return I(L, M.onChange);
675
+ } });
676
+ }, e[19] = t, e[20] = i, e[21] = S, e[22] = o, e[23] = r, e[24] = s, e[25] = a, e[26] = c, e[27] = w, e[28] = _, e[29] = f, e[30] = h, e[31] = d, e[32] = m, e[33] = p, e[34] = x, e[35] = b, e[36] = N, e[37] = g, e[38] = P) : P = e[38];
677
+ let T;
678
+ return e[39] !== f || e[40] !== N || e[41] !== P ? (T = /* @__PURE__ */ u(me, { name: f, control: N, render: P }), e[39] = f, e[40] = N, e[41] = P, e[42] = T) : T = e[42], T;
679
+ }
680
+ function de(n) {
681
+ const e = E.c(15), {
682
+ name: t,
683
+ label: l,
684
+ placeholder: i,
685
+ className: o,
686
+ control: r,
687
+ required: s,
688
+ type: a,
689
+ disabled: c,
690
+ onKeyDown: f,
691
+ maxLength: h,
692
+ numericOnly: d,
693
+ autoFocus: m
694
+ } = n, p = le(), b = r || p.control;
695
+ let g;
696
+ e[0] !== m || e[1] !== o || e[2] !== c || e[3] !== l || e[4] !== h || e[5] !== d || e[6] !== f || e[7] !== i || e[8] !== s || e[9] !== a ? (g = (v) => {
697
+ const {
698
+ field: C,
699
+ fieldState: w
700
+ } = v;
701
+ return /* @__PURE__ */ u(ot, { ...C, value: C.value ?? "", ...m !== void 0 && {
702
+ autoFocus: m
703
+ }, ...l !== void 0 && {
704
+ label: l
705
+ }, ...i !== void 0 && {
706
+ placeholder: i
707
+ }, ...w.error?.message !== void 0 && {
708
+ error: w.error.message
709
+ }, ...o !== void 0 && {
710
+ className: o
711
+ }, ...s !== void 0 && {
712
+ required: s
713
+ }, type: a, ...c !== void 0 && {
714
+ disabled: c
715
+ }, onKeyDown: d ? (S) => {
716
+ !/[0-9]/.test(S.key) && !["Backspace", "Tab", "Delete", "ArrowLeft", "ArrowRight", "Home", "End"].includes(S.key) && S.preventDefault(), f?.(S);
717
+ } : f, ...h !== void 0 && {
718
+ maxLength: h
719
+ }, onChange: (S) => {
720
+ const x = S?.target?.value;
721
+ if (typeof x == "string") {
722
+ let _ = x.replace(/^\s+/, "");
723
+ d && (_ = _.replace(/\D/g, "")), C.onChange(_);
724
+ } else
725
+ C.onChange(x);
726
+ }, onBlur: () => {
727
+ const S = C.value;
728
+ if (typeof S == "string") {
729
+ const x = S.trim();
730
+ x !== S && C.onChange(x);
731
+ }
732
+ C.onBlur();
733
+ } });
734
+ }, e[0] = m, e[1] = o, e[2] = c, e[3] = l, e[4] = h, e[5] = d, e[6] = f, e[7] = i, e[8] = s, e[9] = a, e[10] = g) : g = e[10];
735
+ let y;
736
+ return e[11] !== t || e[12] !== b || e[13] !== g ? (y = /* @__PURE__ */ u(me, { name: t, control: b, render: g }), e[11] = t, e[12] = b, e[13] = g, e[14] = y) : y = e[14], y;
737
+ }
738
+ function Ft(n, e) {
739
+ const t = (n ?? "").trim();
740
+ if (t.length === 0) return "";
741
+ if (t.startsWith("+")) return t;
742
+ const l = (e ?? "").replaceAll(/\D/g, "");
743
+ return l.length > 0 ? `+${l}${t}` : t;
744
+ }
745
+ const Ae = "doct-auth-kit:form:";
746
+ function Oe() {
747
+ if (typeof window > "u") return null;
748
+ try {
749
+ return window.sessionStorage;
750
+ } catch {
751
+ return null;
752
+ }
753
+ }
754
+ function kt(n) {
755
+ const e = Oe();
756
+ if (!e) return null;
757
+ try {
758
+ const t = e.getItem(Ae + n);
759
+ return t ? JSON.parse(t) : null;
760
+ } catch {
761
+ return null;
762
+ }
763
+ }
764
+ function Dt(n, e) {
765
+ const t = Oe();
766
+ if (t)
767
+ try {
768
+ t.setItem(Ae + n, JSON.stringify(e));
769
+ } catch {
770
+ }
771
+ }
772
+ function Ln() {
773
+ const n = Oe();
774
+ if (n)
775
+ try {
776
+ const e = [];
777
+ for (let t = 0; t < n.length; t++) {
778
+ const l = n.key(t);
779
+ l && l.startsWith(Ae) && e.push(l);
780
+ }
781
+ e.forEach((t) => n.removeItem(t));
782
+ } catch {
783
+ }
784
+ }
785
+ function Ke(n, e) {
786
+ for (const t of n.issues) {
787
+ const l = t.path[0];
788
+ typeof l == "string" && e(l, {
789
+ message: t.message
790
+ });
791
+ }
792
+ }
793
+ function $t(n) {
794
+ return n.trim().replace(/\b\w/g, (e) => e.toUpperCase());
795
+ }
796
+ const Te = j.string().trim().min(1, "Full name is required").refine((n) => n == null || n.length === 0 ? !0 : n.length >= 3, "Full name must be at least 3 characters").transform($t), Ie = j.string().trim().min(1, "Phone number is required").refine((n) => {
797
+ if (n == null || n.length === 0) return !0;
798
+ const [, e] = n.split("-"), l = (e ?? n).replaceAll(/\D/g, "");
799
+ return l.length >= 7 && l.length <= 15;
800
+ }, "Phone number must be between 7 and 15 digits"), Le = j.string().trim().transform((n) => n.replaceAll(/\D/g, "")).optional(), Re = j.string().trim().min(1, "Email is required").refine((n) => n == null || n.length === 0 ? !0 : j.string().email().safeParse(n).success, "Enter a valid email address").transform((n) => n.toLowerCase()), Wt = j.object({
801
+ fullName: Te,
802
+ phone: Ie,
803
+ countryCode: Le
804
+ }), Mt = j.object({
805
+ fullName: Te,
806
+ email: Re
807
+ }), Ut = j.object({
808
+ fullName: Te,
809
+ email: Re,
810
+ phone: Ie,
811
+ countryCode: Le
812
+ }), Me = {
813
+ phone: Wt,
814
+ email: Mt,
815
+ foreign: Ut
816
+ }, Bt = j.object({
817
+ phone: Ie,
818
+ countryCode: Le
819
+ }), jt = j.object({
820
+ email: Re
821
+ }), Ue = {
822
+ phone: Bt,
823
+ email: jt
824
+ }, he = 6, zt = 60, Vt = 120;
825
+ function Gt(n) {
826
+ return n === "phone" ? zt : Vt;
827
+ }
828
+ const Ye = j.object({
829
+ otp: j.array(j.string()).length(he, "Enter all 6 digits").refine((n) => n.every((e) => /^\d$/.test(e)) && n.join("").length === he, "Invalid OTP! Please use correct code and submit again.")
830
+ });
831
+ function Je(n, e) {
832
+ const t = ne(null);
833
+ J(() => {
834
+ if (t.current === n) return;
835
+ t.current = n;
836
+ const l = kt(n);
837
+ l && e.reset(l);
838
+ }, [n]), J(() => {
839
+ const l = e.watch((i) => {
840
+ Dt(n, i);
841
+ });
842
+ return () => l.unsubscribe();
843
+ }, [e, n]);
844
+ }
845
+ function Ht(n) {
846
+ const e = E.c(19), {
847
+ mode: t,
848
+ onSubmit: l,
849
+ submitApi: i,
850
+ onSuccess: o,
851
+ onError: r
852
+ } = n, [s, a] = Y(!1), c = t === "phone";
853
+ let f;
854
+ e[0] !== c ? (f = c ? {
855
+ phone: "",
856
+ countryCode: "91"
857
+ } : {
858
+ email: ""
859
+ }, e[0] = c, e[1] = f) : f = e[1];
860
+ const h = f;
861
+ let d;
862
+ e[2] !== h ? (d = {
863
+ defaultValues: h,
864
+ mode: "onChange"
865
+ }, e[2] = h, e[3] = d) : d = e[3];
866
+ const m = xe(d);
867
+ Je(`login-entry:${t}`, m);
868
+ let p;
869
+ e[4] !== m || e[5] !== t || e[6] !== r || e[7] !== l || e[8] !== o || e[9] !== i ? (p = (C) => {
870
+ const S = Ue[t].safeParse(C);
871
+ if (!S.success) {
872
+ Ke(S.error, (_, N) => m.setError(_, N));
873
+ return;
874
+ }
875
+ const x = S.data;
876
+ if (i) {
877
+ a(!0);
878
+ const _ = x.phone ? Ft(x.phone, x.countryCode) : x.email ?? "", N = {
879
+ mode: t,
880
+ recipient: _
881
+ };
882
+ i(x).then(() => {
883
+ o?.(N);
884
+ }).catch((P) => {
885
+ r?.(P);
886
+ }).finally(() => {
887
+ a(!1);
888
+ });
889
+ return;
890
+ }
891
+ l?.(x);
892
+ }, e[4] = m, e[5] = t, e[6] = r, e[7] = l, e[8] = o, e[9] = i, e[10] = p) : p = e[10];
893
+ const b = p;
894
+ let g;
895
+ e[11] !== t ? (g = (C) => Ue[t].safeParse(C).success, e[11] = t, e[12] = g) : g = e[12];
896
+ const y = g;
897
+ let v;
898
+ return e[13] !== b || e[14] !== y || e[15] !== c || e[16] !== s || e[17] !== m ? (v = {
899
+ methods: m,
900
+ handleSubmit: b,
901
+ isPhone: c,
902
+ isFormValid: y,
903
+ isSubmitting: s
904
+ }, e[13] = b, e[14] = y, e[15] = c, e[16] = s, e[17] = m, e[18] = v) : v = e[18], v;
905
+ }
906
+ function qt(n) {
907
+ const e = E.c(14), {
908
+ isPhone: t,
909
+ handleSubmit: l,
910
+ isSubmitting: i
911
+ } = n, o = le();
912
+ let r;
913
+ e[0] !== l || e[1] !== o ? (r = o.handleSubmit(l), e[0] = l, e[1] = o, e[2] = r) : r = e[2];
914
+ let s;
915
+ e[3] !== t ? (s = /* @__PURE__ */ u("div", { className: "mb-6 flex w-full flex-col gap-[12px]", children: t ? /* @__PURE__ */ u(Se, { name: "phone", label: "", placeholder: "Phone number", countryCode: "+91", countryCodeName: "countryCode", defaultCountry: "IN", className: "[&_button]:!h-[44px] [&_input]:!h-[44px]", autoFocus: !0 }) : /* @__PURE__ */ u(de, { name: "email", placeholder: "Enter email address", type: "email", className: "[&_input]:!h-[44px]", autoFocus: !0 }) }), e[3] = t, e[4] = s) : s = e[4];
916
+ let a;
917
+ e[5] !== i ? (a = i ? /* @__PURE__ */ u(be, { size: 32, strokeWidth: 2 }) : "Continue", e[5] = i, e[6] = a) : a = e[6];
918
+ let c;
919
+ e[7] !== i || e[8] !== a ? (c = /* @__PURE__ */ u(B, { type: "submit", variant: "primary", size: "large", fullWidth: !0, disabled: i, children: a }), e[7] = i, e[8] = a, e[9] = c) : c = e[9];
920
+ let f;
921
+ return e[10] !== r || e[11] !== s || e[12] !== c ? (f = /* @__PURE__ */ R("form", { onSubmit: r, className: "w-full flex flex-col", noValidate: !0, children: [
922
+ s,
923
+ c
924
+ ] }), e[10] = r, e[11] = s, e[12] = c, e[13] = f) : f = e[13], f;
925
+ }
926
+ function Kt(n) {
927
+ const e = E.c(13), {
928
+ mode: t,
929
+ onSubmit: l,
930
+ submitApi: i,
931
+ onSuccess: o,
932
+ onError: r
933
+ } = n;
934
+ let s;
935
+ e[0] !== t || e[1] !== r || e[2] !== l || e[3] !== o || e[4] !== i ? (s = {
936
+ mode: t,
937
+ onSubmit: l,
938
+ submitApi: i,
939
+ onSuccess: o,
940
+ onError: r
941
+ }, e[0] = t, e[1] = r, e[2] = l, e[3] = o, e[4] = i, e[5] = s) : s = e[5];
942
+ const {
943
+ methods: a,
944
+ handleSubmit: c,
945
+ isPhone: f,
946
+ isSubmitting: h
947
+ } = Ht(s);
948
+ let d;
949
+ e[6] !== c || e[7] !== f || e[8] !== h ? (d = /* @__PURE__ */ u(qt, { isPhone: f, handleSubmit: c, isSubmitting: h }), e[6] = c, e[7] = f, e[8] = h, e[9] = d) : d = e[9];
950
+ let m;
951
+ return e[10] !== a || e[11] !== d ? (m = /* @__PURE__ */ u(we, { ...a, children: d }), e[10] = a, e[11] = d, e[12] = m) : m = e[12], m;
952
+ }
953
+ const Yt = {
954
+ phone: "Enter Phone Number",
955
+ email: "Enter Email Address"
956
+ }, Jt = {
957
+ phone: "We will send you 6 digit OTP on the given Phone Number.",
958
+ email: "We will send you 6 digit OTP on the given Email Address."
959
+ };
960
+ function Rn(n) {
961
+ const e = E.c(27), {
962
+ mode: t,
963
+ title: l,
964
+ subtitle: i,
965
+ onBack: o,
966
+ onSubmit: r,
967
+ submitApi: s,
968
+ onSuccess: a,
969
+ onError: c,
970
+ layoutType: f,
971
+ variant: h
972
+ } = n, d = f === void 0 ? "withSlider" : f, m = h === void 0 ? "desktop" : h, p = l ?? Yt[t], b = i ?? Jt[t];
973
+ let g;
974
+ e[0] !== o ? (g = o != null ? /* @__PURE__ */ u(ye, { onClick: o }) : void 0, e[0] = o, e[1] = g) : g = e[1];
975
+ let y;
976
+ e[2] !== p ? (y = /* @__PURE__ */ u(O, { variant: "h5", weight: "extraBold", align: "left", className: "-mb-1.5", children: p }), e[2] = p, e[3] = y) : y = e[3];
977
+ let v;
978
+ e[4] !== b ? (v = /* @__PURE__ */ u(O, { variant: "body1", align: "left", className: "mb-4 md:mb-4", children: b }), e[4] = b, e[5] = v) : v = e[5];
979
+ let C;
980
+ e[6] !== r ? (C = r && {
981
+ onSubmit: r
982
+ }, e[6] = r, e[7] = C) : C = e[7];
983
+ let w;
984
+ e[8] !== s ? (w = s && {
985
+ submitApi: s
986
+ }, e[8] = s, e[9] = w) : w = e[9];
987
+ let S;
988
+ e[10] !== a ? (S = a && {
989
+ onSuccess: a
990
+ }, e[10] = a, e[11] = S) : S = e[11];
991
+ let x;
992
+ e[12] !== c ? (x = c && {
993
+ onError: c
994
+ }, e[12] = c, e[13] = x) : x = e[13];
995
+ let _;
996
+ e[14] !== t || e[15] !== C || e[16] !== w || e[17] !== S || e[18] !== x ? (_ = /* @__PURE__ */ u(Kt, { mode: t, ...C, ...w, ...S, ...x }), e[14] = t, e[15] = C, e[16] = w, e[17] = S, e[18] = x, e[19] = _) : _ = e[19];
997
+ let N;
998
+ return e[20] !== d || e[21] !== g || e[22] !== y || e[23] !== v || e[24] !== _ || e[25] !== m ? (N = /* @__PURE__ */ u(ie, { layoutType: d, variant: m, contentWidth: "sm", align: "left", backButton: g, title: y, description: v, className: Ne, children: _ }), e[20] = d, e[21] = g, e[22] = y, e[23] = v, e[24] = _, e[25] = m, e[26] = N) : N = e[26], N;
999
+ }
1000
+ var Xe = {
1001
+ color: void 0,
1002
+ size: void 0,
1003
+ className: void 0,
1004
+ style: void 0,
1005
+ attr: void 0
1006
+ }, Be = K.createContext && /* @__PURE__ */ K.createContext(Xe), Xt = ["attr", "size", "title"];
1007
+ function Zt(n, e) {
1008
+ if (n == null) return {};
1009
+ var t = Qt(n, e), l, i;
1010
+ if (Object.getOwnPropertySymbols) {
1011
+ var o = Object.getOwnPropertySymbols(n);
1012
+ for (i = 0; i < o.length; i++)
1013
+ l = o[i], !(e.indexOf(l) >= 0) && Object.prototype.propertyIsEnumerable.call(n, l) && (t[l] = n[l]);
1014
+ }
1015
+ return t;
1016
+ }
1017
+ function Qt(n, e) {
1018
+ if (n == null) return {};
1019
+ var t = {};
1020
+ for (var l in n)
1021
+ if (Object.prototype.hasOwnProperty.call(n, l)) {
1022
+ if (e.indexOf(l) >= 0) continue;
1023
+ t[l] = n[l];
1024
+ }
1025
+ return t;
1026
+ }
1027
+ function ge() {
1028
+ return ge = Object.assign ? Object.assign.bind() : function(n) {
1029
+ for (var e = 1; e < arguments.length; e++) {
1030
+ var t = arguments[e];
1031
+ for (var l in t)
1032
+ Object.prototype.hasOwnProperty.call(t, l) && (n[l] = t[l]);
1033
+ }
1034
+ return n;
1035
+ }, ge.apply(this, arguments);
1036
+ }
1037
+ function je(n, e) {
1038
+ var t = Object.keys(n);
1039
+ if (Object.getOwnPropertySymbols) {
1040
+ var l = Object.getOwnPropertySymbols(n);
1041
+ e && (l = l.filter(function(i) {
1042
+ return Object.getOwnPropertyDescriptor(n, i).enumerable;
1043
+ })), t.push.apply(t, l);
1044
+ }
1045
+ return t;
1046
+ }
1047
+ function pe(n) {
1048
+ for (var e = 1; e < arguments.length; e++) {
1049
+ var t = arguments[e] != null ? arguments[e] : {};
1050
+ e % 2 ? je(Object(t), !0).forEach(function(l) {
1051
+ en(n, l, t[l]);
1052
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(n, Object.getOwnPropertyDescriptors(t)) : je(Object(t)).forEach(function(l) {
1053
+ Object.defineProperty(n, l, Object.getOwnPropertyDescriptor(t, l));
1054
+ });
1055
+ }
1056
+ return n;
1057
+ }
1058
+ function en(n, e, t) {
1059
+ return e = tn(e), e in n ? Object.defineProperty(n, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : n[e] = t, n;
1060
+ }
1061
+ function tn(n) {
1062
+ var e = nn(n, "string");
1063
+ return typeof e == "symbol" ? e : e + "";
1064
+ }
1065
+ function nn(n, e) {
1066
+ if (typeof n != "object" || !n) return n;
1067
+ var t = n[Symbol.toPrimitive];
1068
+ if (t !== void 0) {
1069
+ var l = t.call(n, e);
1070
+ if (typeof l != "object") return l;
1071
+ throw new TypeError("@@toPrimitive must return a primitive value.");
1072
+ }
1073
+ return (e === "string" ? String : Number)(n);
1074
+ }
1075
+ function Ze(n) {
1076
+ return n && n.map((e, t) => /* @__PURE__ */ K.createElement(e.tag, pe({
1077
+ key: t
1078
+ }, e.attr), Ze(e.child)));
1079
+ }
1080
+ function Qe(n) {
1081
+ return (e) => /* @__PURE__ */ K.createElement(ln, ge({
1082
+ attr: pe({}, n.attr)
1083
+ }, e), Ze(n.child));
1084
+ }
1085
+ function ln(n) {
1086
+ var e = (t) => {
1087
+ var {
1088
+ attr: l,
1089
+ size: i,
1090
+ title: o
1091
+ } = n, r = Zt(n, Xt), s = i || t.size || "1em", a;
1092
+ return t.className && (a = t.className), n.className && (a = (a ? a + " " : "") + n.className), /* @__PURE__ */ K.createElement("svg", ge({
1093
+ stroke: "currentColor",
1094
+ fill: "currentColor",
1095
+ strokeWidth: "0"
1096
+ }, t.attr, l, r, {
1097
+ className: a,
1098
+ style: pe(pe({
1099
+ color: n.color || t.color
1100
+ }, t.style), n.style),
1101
+ height: s,
1102
+ width: s,
1103
+ xmlns: "http://www.w3.org/2000/svg"
1104
+ }), o && /* @__PURE__ */ K.createElement("title", null, o), n.children);
1105
+ };
1106
+ return Be !== void 0 ? /* @__PURE__ */ K.createElement(Be.Consumer, null, (t) => e(t)) : e(Xe);
1107
+ }
1108
+ function on(n) {
1109
+ return Qe({ attr: { viewBox: "0 0 384 512" }, child: [{ tag: "path", attr: { d: "M318.7 268.7c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7C63.3 141.2 4 184.8 4 273.5q0 39.3 14.4 81.2c12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.9zm-56.6-164.2c27.3-32.4 24.8-61.9 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3z" }, child: [] }] })(n);
1110
+ }
1111
+ function rn(n) {
1112
+ return Qe({ attr: { version: "1.1", x: "0px", y: "0px", viewBox: "0 0 48 48", enableBackground: "new 0 0 48 48" }, child: [{ tag: "path", attr: { fill: "#FFC107", d: `M43.611,20.083H42V20H24v8h11.303c-1.649,4.657-6.08,8-11.303,8c-6.627,0-12-5.373-12-12\r
1113
+ c0-6.627,5.373-12,12-12c3.059,0,5.842,1.154,7.961,3.039l5.657-5.657C34.046,6.053,29.268,4,24,4C12.955,4,4,12.955,4,24\r
1114
+ c0,11.045,8.955,20,20,20c11.045,0,20-8.955,20-20C44,22.659,43.862,21.35,43.611,20.083z` }, child: [] }, { tag: "path", attr: { fill: "#FF3D00", d: `M6.306,14.691l6.571,4.819C14.655,15.108,18.961,12,24,12c3.059,0,5.842,1.154,7.961,3.039l5.657-5.657\r
1115
+ C34.046,6.053,29.268,4,24,4C16.318,4,9.656,8.337,6.306,14.691z` }, child: [] }, { tag: "path", attr: { fill: "#4CAF50", d: `M24,44c5.166,0,9.86-1.977,13.409-5.192l-6.19-5.238C29.211,35.091,26.715,36,24,36\r
1116
+ c-5.202,0-9.619-3.317-11.283-7.946l-6.522,5.025C9.505,39.556,16.227,44,24,44z` }, child: [] }, { tag: "path", attr: { fill: "#1976D2", d: `M43.611,20.083H42V20H24v8h11.303c-0.792,2.237-2.231,4.166-4.087,5.571\r
1117
+ c0.001-0.001,0.002-0.001,0.003-0.002l6.19,5.238C36.971,39.205,44,34,44,24C44,22.659,43.862,21.35,43.611,20.083z` }, child: [] }] })(n);
1118
+ }
1119
+ function et(n) {
1120
+ const e = E.c(23);
1121
+ let t;
1122
+ e[0] !== n ? (t = n === void 0 ? {} : n, e[0] = n, e[1] = t) : t = e[1];
1123
+ const l = t, i = cn, o = l.providers?.google?.clientId ?? "";
1124
+ let r;
1125
+ e[2] !== l.providers?.google?.onCredential ? (r = l.providers?.google?.onCredential ?? an, e[2] = l.providers?.google?.onCredential, e[3] = r) : r = e[3];
1126
+ const s = l.providers?.google?.enableOneTap ?? !1;
1127
+ let a;
1128
+ e[4] !== o || e[5] !== r || e[6] !== s ? (a = {
1129
+ clientId: o,
1130
+ onCredential: r,
1131
+ enableOneTap: s
1132
+ }, e[4] = o, e[5] = r, e[6] = s, e[7] = a) : a = e[7];
1133
+ const {
1134
+ loginWithGoogle: c
1135
+ } = Lt(a), f = l.providers?.apple?.clientId ?? "", h = l.providers?.apple?.redirectUri ?? "";
1136
+ let d;
1137
+ e[8] !== l.providers?.apple?.onCredential ? (d = l.providers?.apple?.onCredential ?? sn, e[8] = l.providers?.apple?.onCredential, e[9] = d) : d = e[9];
1138
+ let m;
1139
+ e[10] !== f || e[11] !== h || e[12] !== d ? (m = {
1140
+ clientId: f,
1141
+ redirectUri: h,
1142
+ onCredential: d
1143
+ }, e[10] = f, e[11] = h, e[12] = d, e[13] = m) : m = e[13];
1144
+ const {
1145
+ triggerSignIn: p
1146
+ } = Ot(), b = l.onContinueWithMobile ?? i, g = l.onContinueWithEmail ?? i;
1147
+ let y;
1148
+ e[14] !== c || e[15] !== l.onContinueWithGoogle || e[16] !== l.providers?.google?.clientId ? (y = l.onContinueWithGoogle ?? (l.providers?.google?.clientId ? () => {
1149
+ c();
1150
+ } : i), e[14] = c, e[15] = l.onContinueWithGoogle, e[16] = l.providers?.google?.clientId, e[17] = y) : y = e[17];
1151
+ const v = l.onContinueWithApple ?? (l.providers?.apple?.clientId ? p : i);
1152
+ let C;
1153
+ return e[18] !== b || e[19] !== g || e[20] !== y || e[21] !== v ? (C = {
1154
+ onContinueWithMobile: b,
1155
+ onContinueWithEmail: g,
1156
+ onContinueWithGoogle: y,
1157
+ onContinueWithApple: v
1158
+ }, e[18] = b, e[19] = g, e[20] = y, e[21] = v, e[22] = C) : C = e[22], C;
1159
+ }
1160
+ function sn() {
1161
+ }
1162
+ function an() {
1163
+ }
1164
+ function cn() {
1165
+ }
1166
+ const un = {
1167
+ phone: "Kindly check your Mobile.",
1168
+ email: "Kindly check your Email Inbox."
1169
+ }, dn = {
1170
+ phone: "6 digit OTP has been sent to your Mobile",
1171
+ email: "6 digit OTP has been sent to your Email"
1172
+ };
1173
+ function fn(n) {
1174
+ const e = E.c(30), {
1175
+ mode: t,
1176
+ onSubmit: l,
1177
+ onResendCode: i,
1178
+ submitApi: o,
1179
+ onSuccess: r,
1180
+ onError: s,
1181
+ validate: a
1182
+ } = n, [c, f] = Y(!1);
1183
+ let h;
1184
+ e[0] !== t ? (h = Gt(t), e[0] = t, e[1] = h) : h = e[1];
1185
+ const d = h, [m, p] = Y(d), b = m <= 0;
1186
+ let g;
1187
+ e[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (g = Array.from({
1188
+ length: he
1189
+ }, gn), e[2] = g) : g = e[2];
1190
+ const y = g;
1191
+ let v;
1192
+ e[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (v = {
1193
+ defaultValues: {
1194
+ otp: y
1195
+ },
1196
+ mode: "onChange"
1197
+ }, e[3] = v) : v = e[3];
1198
+ const C = xe(v);
1199
+ let w, S;
1200
+ e[4] !== m ? (w = () => {
1201
+ if (m <= 0)
1202
+ return;
1203
+ const V = setInterval(() => {
1204
+ p(hn);
1205
+ }, 1e3);
1206
+ return () => clearInterval(V);
1207
+ }, S = [m], e[4] = m, e[5] = w, e[6] = S) : (w = e[5], S = e[6]), J(w, S);
1208
+ let x;
1209
+ e[7] !== C || e[8] !== s || e[9] !== l || e[10] !== r || e[11] !== o || e[12] !== a ? (x = async (V) => {
1210
+ C.clearErrors("otp");
1211
+ const G = Ye.safeParse(V);
1212
+ if (!G.success) {
1213
+ const $ = G.error.issues[0]?.message ?? "Invalid OTP";
1214
+ C.setError("otp", {
1215
+ message: $
1216
+ });
1217
+ return;
1218
+ }
1219
+ const H = G.data.otp.join("");
1220
+ if (a) {
1221
+ f(!0);
1222
+ try {
1223
+ const $ = await a(H);
1224
+ if ($ !== !0) {
1225
+ C.setError("otp", {
1226
+ type: "validate",
1227
+ message: $
1228
+ }), f(!1);
1229
+ return;
1230
+ }
1231
+ } catch ($) {
1232
+ s?.($), f(!1);
1233
+ return;
1234
+ }
1235
+ o || f(!1);
1236
+ }
1237
+ if (o) {
1238
+ f(!0), o(H).then(() => {
1239
+ r?.();
1240
+ }).catch(($) => {
1241
+ const z = $?.message;
1242
+ C.setError("otp", {
1243
+ type: "submit",
1244
+ message: typeof z == "string" && z.length > 0 ? z : "OTP verification failed"
1245
+ }), s?.($);
1246
+ }).finally(() => {
1247
+ f(!1);
1248
+ });
1249
+ return;
1250
+ }
1251
+ l?.(H);
1252
+ }, e[7] = C, e[8] = s, e[9] = l, e[10] = r, e[11] = o, e[12] = a, e[13] = x) : x = e[13];
1253
+ const _ = x;
1254
+ let N;
1255
+ e[14] !== b || e[15] !== d || e[16] !== i ? (N = () => {
1256
+ b && (i?.(), p(d));
1257
+ }, e[14] = b, e[15] = d, e[16] = i, e[17] = N) : N = e[17];
1258
+ const P = N, T = mn, D = Math.floor(m / 60), W = m % 60, A = String(D);
1259
+ let I;
1260
+ e[18] !== A ? (I = A.padStart(2, "0"), e[18] = A, e[19] = I) : I = e[19];
1261
+ const F = String(W);
1262
+ let M;
1263
+ e[20] !== F ? (M = F.padStart(2, "0"), e[20] = F, e[21] = M) : M = e[21];
1264
+ const L = `Resend code in: ${I}:${M}`;
1265
+ let U;
1266
+ return e[22] !== b || e[23] !== P || e[24] !== _ || e[25] !== c || e[26] !== C || e[27] !== m || e[28] !== L ? (U = {
1267
+ methods: C,
1268
+ handleSubmit: _,
1269
+ isFormValid: T,
1270
+ handleResend: P,
1271
+ resendSecondsLeft: m,
1272
+ canResend: b,
1273
+ timerText: L,
1274
+ isSubmitting: c
1275
+ }, e[22] = b, e[23] = P, e[24] = _, e[25] = c, e[26] = C, e[27] = m, e[28] = L, e[29] = U) : U = e[29], U;
1276
+ }
1277
+ function mn(n) {
1278
+ return Ye.safeParse(n).success;
1279
+ }
1280
+ function hn(n) {
1281
+ return n <= 1 ? 0 : n - 1;
1282
+ }
1283
+ function gn() {
1284
+ return "";
1285
+ }
1286
+ const pn = "Mobile";
1287
+ function bn(n) {
1288
+ const e = E.c(11);
1289
+ let t;
1290
+ e[0] !== n ? (t = n === void 0 ? {} : n, e[0] = n, e[1] = t) : t = e[1];
1291
+ const l = t, [i, o] = Y(!1), {
1292
+ lastUsedMethod: r,
1293
+ onContinueWithLastMethod: s,
1294
+ continueApi: a,
1295
+ onSuccess: c,
1296
+ onError: f
1297
+ } = l, h = r === void 0 ? pn : r;
1298
+ let d;
1299
+ e[2] !== a || e[3] !== s || e[4] !== f || e[5] !== c ? (d = () => {
1300
+ if (a) {
1301
+ o(!0), a().then(() => {
1302
+ c?.();
1303
+ }).catch((b) => {
1304
+ f?.(b);
1305
+ }).finally(() => {
1306
+ o(!1);
1307
+ });
1308
+ return;
1309
+ }
1310
+ s?.();
1311
+ }, e[2] = a, e[3] = s, e[4] = f, e[5] = c, e[6] = d) : d = e[6];
1312
+ const m = d;
1313
+ let p;
1314
+ return e[7] !== m || e[8] !== i || e[9] !== h ? (p = {
1315
+ handleContinue: m,
1316
+ isSubmitting: i,
1317
+ lastUsedMethod: h
1318
+ }, e[7] = m, e[8] = i, e[9] = h, e[10] = p) : p = e[10], p;
1319
+ }
1320
+ function yn(n) {
1321
+ const e = E.c(22), {
1322
+ mode: t,
1323
+ defaultPhone: l,
1324
+ onSubmit: i,
1325
+ submitApi: o,
1326
+ onSuccess: r,
1327
+ onError: s
1328
+ } = n, a = l === void 0 ? "" : l, [c, f] = Y(!1), h = t === "phone", d = t === "foreign";
1329
+ let m;
1330
+ e[0] !== a || e[1] !== d || e[2] !== h ? (m = d ? {
1331
+ fullName: "",
1332
+ email: "",
1333
+ phone: a,
1334
+ countryCode: "91"
1335
+ } : h ? {
1336
+ fullName: "",
1337
+ phone: "",
1338
+ countryCode: "91"
1339
+ } : {
1340
+ fullName: "",
1341
+ email: ""
1342
+ }, e[0] = a, e[1] = d, e[2] = h, e[3] = m) : m = e[3];
1343
+ const p = m;
1344
+ let b;
1345
+ e[4] !== p ? (b = {
1346
+ defaultValues: p,
1347
+ mode: "onChange"
1348
+ }, e[4] = p, e[5] = b) : b = e[5];
1349
+ const g = xe(b);
1350
+ Je(`signup:${t}`, g);
1351
+ let y;
1352
+ e[6] !== g || e[7] !== t || e[8] !== s || e[9] !== i || e[10] !== r || e[11] !== o ? (y = (x) => {
1353
+ const N = Me[t].safeParse(x);
1354
+ if (!N.success) {
1355
+ Ke(N.error, (T, D) => g.setError(T, D));
1356
+ return;
1357
+ }
1358
+ const P = {
1359
+ fullName: N.data.fullName,
1360
+ ..."phone" in N.data && N.data.phone && {
1361
+ phone: N.data.phone
1362
+ },
1363
+ ..."countryCode" in N.data && N.data.countryCode && {
1364
+ countryCode: N.data.countryCode
1365
+ },
1366
+ ..."email" in N.data && N.data.email && {
1367
+ email: N.data.email
1368
+ }
1369
+ };
1370
+ if (o) {
1371
+ f(!0), o(P).then(() => {
1372
+ r?.();
1373
+ }).catch((T) => {
1374
+ s?.(T);
1375
+ }).finally(() => {
1376
+ f(!1);
1377
+ });
1378
+ return;
1379
+ }
1380
+ i?.(P);
1381
+ }, e[6] = g, e[7] = t, e[8] = s, e[9] = i, e[10] = r, e[11] = o, e[12] = y) : y = e[12];
1382
+ const v = y;
1383
+ let C;
1384
+ e[13] !== t ? (C = (x) => Me[t].safeParse(x).success, e[13] = t, e[14] = C) : C = e[14];
1385
+ const w = C;
1386
+ let S;
1387
+ return e[15] !== v || e[16] !== d || e[17] !== w || e[18] !== h || e[19] !== c || e[20] !== g ? (S = {
1388
+ methods: g,
1389
+ handleSubmit: v,
1390
+ isPhone: h,
1391
+ isForeign: d,
1392
+ isFormValid: w,
1393
+ isSubmitting: c
1394
+ }, e[15] = v, e[16] = d, e[17] = w, e[18] = h, e[19] = c, e[20] = g, e[21] = S) : S = e[21], S;
1395
+ }
1396
+ const tt = (n) => {
1397
+ const e = E.c(19), {
1398
+ handlers: t
1399
+ } = n, {
1400
+ onContinueWithMobile: l,
1401
+ onContinueWithEmail: i,
1402
+ onContinueWithGoogle: o,
1403
+ onContinueWithApple: r
1404
+ } = t;
1405
+ let s;
1406
+ e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (s = /* @__PURE__ */ u(ue, { children: "Continue with Mobile" }), e[0] = s) : s = e[0];
1407
+ let a;
1408
+ e[1] !== l ? (a = /* @__PURE__ */ u(B, { variant: "outline", size: "large", fullWidth: !0, onClick: l, children: s }), e[1] = l, e[2] = a) : a = e[2];
1409
+ let c;
1410
+ e[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (c = /* @__PURE__ */ u(ue, { children: "Continue with Email" }), e[3] = c) : c = e[3];
1411
+ let f;
1412
+ e[4] !== i ? (f = /* @__PURE__ */ u(B, { variant: "outline", size: "large", fullWidth: !0, onClick: i, children: c }), e[4] = i, e[5] = f) : f = e[5];
1413
+ let h;
1414
+ e[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ u(rn, { "aria-hidden": !0 }), e[6] = h) : h = e[6];
1415
+ let d;
1416
+ e[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (d = /* @__PURE__ */ u(ue, { children: "Continue with Google" }), e[7] = d) : d = e[7];
1417
+ let m;
1418
+ e[8] !== o ? (m = /* @__PURE__ */ u(B, { variant: "outline", size: "large", fullWidth: !0, icon: h, iconPosition: "left", onClick: o, children: d }), e[8] = o, e[9] = m) : m = e[9];
1419
+ let p;
1420
+ e[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (p = /* @__PURE__ */ u(on, { "aria-hidden": !0 }), e[10] = p) : p = e[10];
1421
+ let b;
1422
+ e[11] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (b = /* @__PURE__ */ u(ue, { children: "Continue with Apple" }), e[11] = b) : b = e[11];
1423
+ let g;
1424
+ e[12] !== r ? (g = /* @__PURE__ */ u(B, { variant: "outline", size: "large", fullWidth: !0, icon: p, iconPosition: "left", onClick: r, children: b }), e[12] = r, e[13] = g) : g = e[13];
1425
+ let y;
1426
+ return e[14] !== g || e[15] !== a || e[16] !== f || e[17] !== m ? (y = /* @__PURE__ */ R("div", { className: "w-full flex flex-col gap-2", children: [
1427
+ a,
1428
+ f,
1429
+ m,
1430
+ g
1431
+ ] }), e[14] = g, e[15] = a, e[16] = f, e[17] = m, e[18] = y) : y = e[18], y;
1432
+ }, ue = (n) => {
1433
+ const e = E.c(2), {
1434
+ children: t
1435
+ } = n;
1436
+ let l;
1437
+ return e[0] !== t ? (l = /* @__PURE__ */ u(O, { variant: "textLabel1", weight: "semiBold", align: "center", className: "opacity-80", children: t }), e[0] = t, e[1] = l) : l = e[1], l;
1438
+ };
1439
+ function Fn(n) {
1440
+ const e = E.c(2), t = et(n);
1441
+ let l;
1442
+ return e[0] !== t ? (l = /* @__PURE__ */ u(tt, { handlers: t }), e[0] = t, e[1] = l) : l = e[1], l;
1443
+ }
1444
+ const kn = (n) => {
1445
+ const e = E.c(17), t = et(n);
1446
+ let l;
1447
+ e[0] !== n.onEnterpriseLogin ? (l = n.onEnterpriseLogin != null && {
1448
+ onClick: n.onEnterpriseLogin
1449
+ }, e[0] = n.onEnterpriseLogin, e[1] = l) : l = e[1];
1450
+ let i;
1451
+ e[2] !== n.enterpriseLoginUrl ? (i = n.enterpriseLoginUrl != null && {
1452
+ href: n.enterpriseLoginUrl
1453
+ }, e[2] = n.enterpriseLoginUrl, e[3] = i) : i = e[3];
1454
+ let o;
1455
+ e[4] !== l || e[5] !== i ? (o = {
1456
+ ...l,
1457
+ ...i
1458
+ }, e[4] = l, e[5] = i, e[6] = o) : o = e[6];
1459
+ const r = o;
1460
+ let s;
1461
+ e[7] !== r ? (s = /* @__PURE__ */ u(pt, { ...r }), e[7] = r, e[8] = s) : s = e[8];
1462
+ let a, c, f;
1463
+ e[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (a = /* @__PURE__ */ u(O, { variant: "title1", weight: "bold", align: "center", className: "max-w-[250px] mx-auto mb-0 md:mb-2", children: "The Healthcare Career App" }), c = /* @__PURE__ */ u(O, { variant: "body1", align: "center", className: "mb-0 md:mb-2", children: "Continue to Signup, If you already have an account we'll log you in." }), f = /* @__PURE__ */ u(Ge, {}), e[9] = a, e[10] = c, e[11] = f) : (a = e[9], c = e[10], f = e[11]);
1464
+ let h;
1465
+ e[12] !== t ? (h = /* @__PURE__ */ u(tt, { handlers: t }), e[12] = t, e[13] = h) : h = e[13];
1466
+ let d;
1467
+ return e[14] !== s || e[15] !== h ? (d = /* @__PURE__ */ u(ie, { layoutType: "withSlider", variant: "desktop", header: s, logo: ze, align: "center", title: a, description: c, footer: f, children: h }), e[14] = s, e[15] = h, e[16] = d) : d = e[16], d;
1468
+ };
1469
+ function vn(n) {
1470
+ const e = E.c(10), {
1471
+ name: t,
1472
+ label: l,
1473
+ className: i,
1474
+ control: o,
1475
+ length: r,
1476
+ inputClassName: s,
1477
+ autoFocus: a
1478
+ } = n, c = r === void 0 ? 6 : r, f = le(), h = o || f.control;
1479
+ let d;
1480
+ e[0] !== a || e[1] !== i || e[2] !== s || e[3] !== l || e[4] !== c ? (d = (p) => {
1481
+ const {
1482
+ field: b,
1483
+ fieldState: g
1484
+ } = p;
1485
+ return /* @__PURE__ */ R("div", { children: [
1486
+ l && /* @__PURE__ */ u("label", { className: "block mb-1", children: l }),
1487
+ /* @__PURE__ */ u(rt, { length: c, value: b.value || [], onChange: b.onChange, ...a !== void 0 && {
1488
+ autoFocus: a
1489
+ }, ...i && {
1490
+ className: i
1491
+ }, ...s && {
1492
+ inputClassName: s
1493
+ }, ...g.error?.message !== void 0 && g.error?.message !== "" && {
1494
+ error: g.error.message
1495
+ } })
1496
+ ] });
1497
+ }, e[0] = a, e[1] = i, e[2] = s, e[3] = l, e[4] = c, e[5] = d) : d = e[5];
1498
+ let m;
1499
+ return e[6] !== t || e[7] !== h || e[8] !== d ? (m = /* @__PURE__ */ u(me, { name: t, control: h, render: d }), e[6] = t, e[7] = h, e[8] = d, e[9] = m) : m = e[9], m;
1500
+ }
1501
+ function Cn(n) {
1502
+ const e = E.c(28), {
1503
+ mode: t,
1504
+ title: l,
1505
+ recipientDisplay: i,
1506
+ isForeignUser: o,
1507
+ handleSubmit: r,
1508
+ handleResend: s,
1509
+ canResend: a,
1510
+ timerText: c,
1511
+ isSubmitting: f
1512
+ } = n, h = le();
1513
+ let d;
1514
+ e[0] !== r || e[1] !== h ? (d = h.handleSubmit(r), e[0] = r, e[1] = h, e[2] = d) : d = e[2];
1515
+ let m;
1516
+ e[3] !== l ? (m = /* @__PURE__ */ u(O, { variant: "h5", weight: "extraBold", align: "left", className: "mb-2 text-neutral-black", children: l }), e[3] = l, e[4] = m) : m = e[4];
1517
+ const p = o ? "mb-2 text-neutral-black" : "mb-6 text-neutral-black";
1518
+ let b;
1519
+ e[5] !== i || e[6] !== p ? (b = /* @__PURE__ */ u(O, { variant: "title2", align: "left", className: p, children: i }), e[5] = i, e[6] = p, e[7] = b) : b = e[7];
1520
+ let g;
1521
+ e[8] !== o || e[9] !== t ? (g = o && /* @__PURE__ */ u(O, { variant: "textLabel1", weight: "semiBold", align: "left", className: "mb-6 text-neutral-black", children: un[t] }), e[8] = o, e[9] = t, e[10] = g) : g = e[10];
1522
+ let y;
1523
+ e[11] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (y = /* @__PURE__ */ u("div", { className: "mb-4 flex w-full flex-col gap-[12px]", children: /* @__PURE__ */ u(vn, { name: "otp", length: he, autoFocus: !0, inputClassName: "!h-[44px] !w-[44px]" }) }), e[11] = y) : y = e[11];
1524
+ let v;
1525
+ e[12] !== a || e[13] !== s || e[14] !== c ? (v = /* @__PURE__ */ u("div", { className: "mb-6 font-medium flex items-center gap-2", children: a ? /* @__PURE__ */ u(B, { type: "button", variant: "outline", size: "small", onClick: s, className: "!h-[28px]", children: "Resend Code" }) : /* @__PURE__ */ u(O, { variant: "textLabel3", align: "left", className: "text-neutral-black", children: c }) }), e[12] = a, e[13] = s, e[14] = c, e[15] = v) : v = e[15];
1526
+ let C;
1527
+ e[16] !== f ? (C = f ? /* @__PURE__ */ u(be, { size: 32, strokeWidth: 2 }) : "Submit", e[16] = f, e[17] = C) : C = e[17];
1528
+ let w;
1529
+ e[18] !== f || e[19] !== C ? (w = /* @__PURE__ */ u(B, { type: "submit", variant: "primary", size: "large", fullWidth: !0, disabled: f, children: C }), e[18] = f, e[19] = C, e[20] = w) : w = e[20];
1530
+ let S;
1531
+ return e[21] !== d || e[22] !== m || e[23] !== b || e[24] !== g || e[25] !== v || e[26] !== w ? (S = /* @__PURE__ */ R("form", { onSubmit: d, className: "flex w-full flex-col", noValidate: !0, children: [
1532
+ m,
1533
+ b,
1534
+ g,
1535
+ y,
1536
+ v,
1537
+ w
1538
+ ] }), e[21] = d, e[22] = m, e[23] = b, e[24] = g, e[25] = v, e[26] = w, e[27] = S) : S = e[27], S;
1539
+ }
1540
+ function Sn(n) {
1541
+ const e = E.c(21), {
1542
+ mode: t,
1543
+ title: l,
1544
+ recipientDisplay: i,
1545
+ isForeignUser: o,
1546
+ onSubmit: r,
1547
+ onResendCode: s,
1548
+ submitApi: a,
1549
+ onSuccess: c,
1550
+ onError: f,
1551
+ validate: h
1552
+ } = n, d = o === void 0 ? !1 : o;
1553
+ let m;
1554
+ e[0] !== t || e[1] !== f || e[2] !== s || e[3] !== r || e[4] !== c || e[5] !== a || e[6] !== h ? (m = {
1555
+ mode: t,
1556
+ onSubmit: r,
1557
+ onResendCode: s,
1558
+ submitApi: a,
1559
+ onSuccess: c,
1560
+ onError: f,
1561
+ validate: h
1562
+ }, e[0] = t, e[1] = f, e[2] = s, e[3] = r, e[4] = c, e[5] = a, e[6] = h, e[7] = m) : m = e[7];
1563
+ const {
1564
+ methods: p,
1565
+ handleSubmit: b,
1566
+ handleResend: g,
1567
+ canResend: y,
1568
+ timerText: v,
1569
+ isSubmitting: C
1570
+ } = fn(m), w = l ?? dn[t];
1571
+ let S;
1572
+ e[8] !== y || e[9] !== w || e[10] !== g || e[11] !== b || e[12] !== d || e[13] !== C || e[14] !== t || e[15] !== i || e[16] !== v ? (S = /* @__PURE__ */ u(Cn, { mode: t, title: w, recipientDisplay: i, isForeignUser: d, handleSubmit: b, handleResend: g, canResend: y, timerText: v, isSubmitting: C }), e[8] = y, e[9] = w, e[10] = g, e[11] = b, e[12] = d, e[13] = C, e[14] = t, e[15] = i, e[16] = v, e[17] = S) : S = e[17];
1573
+ let x;
1574
+ return e[18] !== p || e[19] !== S ? (x = /* @__PURE__ */ u(we, { ...p, children: S }), e[18] = p, e[19] = S, e[20] = x) : x = e[20], x;
1575
+ }
1576
+ function Dn(n) {
1577
+ const e = E.c(24);
1578
+ let t, l, i, o;
1579
+ e[0] !== n ? ({
1580
+ layoutType: i,
1581
+ variant: o,
1582
+ onBack: l,
1583
+ ...t
1584
+ } = n, e[0] = n, e[1] = t, e[2] = l, e[3] = i, e[4] = o) : (t = e[1], l = e[2], i = e[3], o = e[4]);
1585
+ const r = i === void 0 ? "withSlider" : i;
1586
+ let s;
1587
+ e[5] !== l ? (s = l != null ? /* @__PURE__ */ u(ye, { onClick: l }) : void 0, e[5] = l, e[6] = s) : s = e[6];
1588
+ let a;
1589
+ e[7] !== t.isForeignUser || e[8] !== t.mode || e[9] !== t.onError || e[10] !== t.onResendCode || e[11] !== t.onSubmit || e[12] !== t.onSuccess || e[13] !== t.recipientDisplay || e[14] !== t.submitApi || e[15] !== t.title || e[16] !== t.validate || e[17] !== l ? (a = /* @__PURE__ */ u(Sn, { mode: t.mode, recipientDisplay: t.recipientDisplay, title: t.title, isForeignUser: t.isForeignUser, onBack: l, onSubmit: t.onSubmit, onResendCode: t.onResendCode, submitApi: t.submitApi, onSuccess: t.onSuccess, onError: t.onError, validate: t.validate }), e[7] = t.isForeignUser, e[8] = t.mode, e[9] = t.onError, e[10] = t.onResendCode, e[11] = t.onSubmit, e[12] = t.onSuccess, e[13] = t.recipientDisplay, e[14] = t.submitApi, e[15] = t.title, e[16] = t.validate, e[17] = l, e[18] = a) : a = e[18];
1590
+ let c;
1591
+ return e[19] !== r || e[20] !== s || e[21] !== a || e[22] !== o ? (c = /* @__PURE__ */ u(ie, { layoutType: r, variant: o, contentWidth: "sm", align: "left", backButton: s, className: Ne, children: a }), e[19] = r, e[20] = s, e[21] = a, e[22] = o, e[23] = c) : c = e[23], c;
1592
+ }
1593
+ function xn(n) {
1594
+ const e = E.c(21);
1595
+ let t, l;
1596
+ e[0] !== n ? ({
1597
+ onUseAnotherMethod: l,
1598
+ ...t
1599
+ } = n, e[0] = n, e[1] = t, e[2] = l) : (t = e[1], l = e[2]);
1600
+ let i;
1601
+ e[3] !== t.continueApi || e[4] !== t.lastUsedMethod || e[5] !== t.onContinueWithLastMethod || e[6] !== t.onError || e[7] !== t.onSuccess ? (i = {
1602
+ lastUsedMethod: t.lastUsedMethod,
1603
+ onContinueWithLastMethod: t.onContinueWithLastMethod,
1604
+ continueApi: t.continueApi,
1605
+ onSuccess: t.onSuccess,
1606
+ onError: t.onError
1607
+ }, e[3] = t.continueApi, e[4] = t.lastUsedMethod, e[5] = t.onContinueWithLastMethod, e[6] = t.onError, e[7] = t.onSuccess, e[8] = i) : i = e[8];
1608
+ const {
1609
+ handleContinue: o,
1610
+ isSubmitting: r,
1611
+ lastUsedMethod: s
1612
+ } = bn(i), a = r ? "Continuing…" : `Continue with ${s}`;
1613
+ let c;
1614
+ e[9] !== a ? (c = /* @__PURE__ */ u(O, { variant: "textLabel1", weight: "semiBold", align: "center", className: "text-neutral-white", children: a }), e[9] = a, e[10] = c) : c = e[10];
1615
+ let f;
1616
+ e[11] !== o || e[12] !== r || e[13] !== c ? (f = /* @__PURE__ */ u(B, { variant: "primary", size: "large", fullWidth: !0, onClick: o, disabled: r, children: c }), e[11] = o, e[12] = r, e[13] = c, e[14] = f) : f = e[14];
1617
+ let h;
1618
+ e[15] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ u(O, { variant: "textLabel1", weight: "semiBold", align: "center", className: "opacity-80", children: "Use another method" }), e[15] = h) : h = e[15];
1619
+ let d;
1620
+ e[16] !== l ? (d = /* @__PURE__ */ u(B, { variant: "outline", size: "large", fullWidth: !0, onClick: l, children: h }), e[16] = l, e[17] = d) : d = e[17];
1621
+ let m;
1622
+ return e[18] !== f || e[19] !== d ? (m = /* @__PURE__ */ R("div", { className: "w-full flex flex-col gap-[12px]", children: [
1623
+ f,
1624
+ d
1625
+ ] }), e[18] = f, e[19] = d, e[20] = m) : m = e[20], m;
1626
+ }
1627
+ function $n(n) {
1628
+ const e = E.c(18), {
1629
+ lastUsedMethod: t,
1630
+ onContinueWithLastMethod: l,
1631
+ onUseAnotherMethod: i,
1632
+ continueApi: o,
1633
+ onSuccess: r,
1634
+ onError: s,
1635
+ layoutType: a,
1636
+ variant: c
1637
+ } = n, f = t === void 0 ? "Mobile" : t, h = a === void 0 ? "withSlider" : a, d = c === "mobile" || h === "standalone";
1638
+ let m;
1639
+ e[0] !== d ? (m = d ? /* @__PURE__ */ u(O, { variant: "h5", weight: "bold", align: "center", className: "text-primary -mb-2 mt-4", children: "Welcome Back!" }) : /* @__PURE__ */ R(O, { variant: "h6", weight: "extraBold", align: "left", className: "text-neutral-black -mb-2 mt-4", children: [
1640
+ " ",
1641
+ "Welcome Back!",
1642
+ " "
1643
+ ] }), e[0] = d, e[1] = m) : m = e[1];
1644
+ let p;
1645
+ e[2] !== f ? (p = /* @__PURE__ */ R(O, { variant: "body1", align: "center", className: "text-neutral-black mb-4 md:mb-4", children: [
1646
+ "Last time you used ",
1647
+ f,
1648
+ " to log in."
1649
+ ] }), e[2] = f, e[3] = p) : p = e[3];
1650
+ let b;
1651
+ e[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (b = /* @__PURE__ */ u(Ge, {}), e[4] = b) : b = e[4];
1652
+ let g;
1653
+ e[5] !== o || e[6] !== f || e[7] !== l || e[8] !== s || e[9] !== r || e[10] !== i ? (g = /* @__PURE__ */ u(xn, { lastUsedMethod: f, onContinueWithLastMethod: l, onUseAnotherMethod: i, continueApi: o, onSuccess: r, onError: s }), e[5] = o, e[6] = f, e[7] = l, e[8] = s, e[9] = r, e[10] = i, e[11] = g) : g = e[11];
1654
+ let y;
1655
+ return e[12] !== h || e[13] !== m || e[14] !== p || e[15] !== g || e[16] !== c ? (y = /* @__PURE__ */ u(ie, { layoutType: h, variant: c, logo: ze, title: m, description: p, footer: b, children: g }), e[12] = h, e[13] = m, e[14] = p, e[15] = g, e[16] = c, e[17] = y) : y = e[17], y;
1656
+ }
1657
+ function wn(n) {
1658
+ const e = E.c(16), {
1659
+ isPhone: t,
1660
+ isForeign: l,
1661
+ handleSubmit: i,
1662
+ isSubmitting: o
1663
+ } = n, r = le();
1664
+ let s;
1665
+ e[0] !== i || e[1] !== r ? (s = r.handleSubmit(i), e[0] = i, e[1] = r, e[2] = s) : s = e[2];
1666
+ let a;
1667
+ e[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (a = /* @__PURE__ */ u(de, { name: "fullName", placeholder: "Full name", type: "text", className: "w-full", autoFocus: !0 }), e[3] = a) : a = e[3];
1668
+ let c;
1669
+ e[4] !== l || e[5] !== t ? (c = /* @__PURE__ */ R("div", { className: "mb-6 flex w-full flex-col gap-[12px]", children: [
1670
+ a,
1671
+ l ? /* @__PURE__ */ R(fe, { children: [
1672
+ /* @__PURE__ */ u(de, { name: "email", placeholder: "Email address", type: "email", className: "w-full" }),
1673
+ /* @__PURE__ */ u(Se, { name: "phone", label: "", placeholder: "Phone number", countryCode: "+91", countryCodeName: "countryCode", defaultCountry: "IN" })
1674
+ ] }) : t ? /* @__PURE__ */ u(Se, { name: "phone", label: "", placeholder: "Phone number", countryCode: "+91", countryCodeName: "countryCode", defaultCountry: "IN" }) : /* @__PURE__ */ u(de, { name: "email", placeholder: "Email address", type: "email", className: "w-full" })
1675
+ ] }), e[4] = l, e[5] = t, e[6] = c) : c = e[6];
1676
+ let f;
1677
+ e[7] !== o ? (f = o ? /* @__PURE__ */ u(be, { size: 32, strokeWidth: 2 }) : "Continue", e[7] = o, e[8] = f) : f = e[8];
1678
+ let h;
1679
+ e[9] !== o || e[10] !== f ? (h = /* @__PURE__ */ u(B, { type: "submit", variant: "primary", size: "large", fullWidth: !0, disabled: o, children: f }), e[9] = o, e[10] = f, e[11] = h) : h = e[11];
1680
+ let d;
1681
+ return e[12] !== s || e[13] !== c || e[14] !== h ? (d = /* @__PURE__ */ R("form", { onSubmit: s, className: "w-full flex flex-col items-center", noValidate: !0, children: [
1682
+ c,
1683
+ h
1684
+ ] }), e[12] = s, e[13] = c, e[14] = h, e[15] = d) : d = e[15], d;
1685
+ }
1686
+ function Nn(n) {
1687
+ const e = E.c(15), {
1688
+ userType: t,
1689
+ signupCollectField: l,
1690
+ pendingPhone: i,
1691
+ onSubmit: o,
1692
+ submitApi: r,
1693
+ onSuccess: s,
1694
+ onError: a
1695
+ } = n, c = i === void 0 ? "" : i, f = t === "FOREIGN" ? "foreign" : l === "phone" ? "phone" : "email";
1696
+ let h;
1697
+ e[0] !== f || e[1] !== a || e[2] !== o || e[3] !== s || e[4] !== c || e[5] !== r ? (h = {
1698
+ mode: f,
1699
+ defaultPhone: c,
1700
+ onSubmit: o,
1701
+ submitApi: r,
1702
+ onSuccess: s,
1703
+ onError: a
1704
+ }, e[0] = f, e[1] = a, e[2] = o, e[3] = s, e[4] = c, e[5] = r, e[6] = h) : h = e[6];
1705
+ const {
1706
+ methods: d,
1707
+ handleSubmit: m,
1708
+ isPhone: p,
1709
+ isForeign: b,
1710
+ isSubmitting: g
1711
+ } = yn(h);
1712
+ let y;
1713
+ e[7] !== m || e[8] !== b || e[9] !== p || e[10] !== g ? (y = /* @__PURE__ */ u(wn, { isPhone: p, isForeign: b, handleSubmit: m, isSubmitting: g }), e[7] = m, e[8] = b, e[9] = p, e[10] = g, e[11] = y) : y = e[11];
1714
+ let v;
1715
+ return e[12] !== d || e[13] !== y ? (v = /* @__PURE__ */ u(we, { ...d, children: y }), e[12] = d, e[13] = y, e[14] = v) : v = e[14], v;
1716
+ }
1717
+ function Wn(n) {
1718
+ const e = E.c(21), {
1719
+ layoutType: t,
1720
+ variant: l
1721
+ } = n, i = t === void 0 ? "standalone" : t, o = l === void 0 ? "mobile" : l;
1722
+ let r;
1723
+ e[0] !== n.loginMethod || e[1] !== n.onError || e[2] !== n.onSubmit || e[3] !== n.onSuccess || e[4] !== n.pendingPhone || e[5] !== n.signupCollectField || e[6] !== n.submitApi || e[7] !== n.userType ? (r = {
1724
+ userType: n.userType,
1725
+ loginMethod: n.loginMethod,
1726
+ signupCollectField: n.signupCollectField,
1727
+ pendingPhone: n.pendingPhone,
1728
+ onSubmit: n.onSubmit,
1729
+ submitApi: n.submitApi,
1730
+ onSuccess: n.onSuccess,
1731
+ onError: n.onError
1732
+ }, e[0] = n.loginMethod, e[1] = n.onError, e[2] = n.onSubmit, e[3] = n.onSuccess, e[4] = n.pendingPhone, e[5] = n.signupCollectField, e[6] = n.submitApi, e[7] = n.userType, e[8] = r) : r = e[8];
1733
+ const s = r;
1734
+ let a;
1735
+ e[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (a = /* @__PURE__ */ u("img", { src: ft, alt: "Docthub Logo", width: 46, height: 46 }), e[9] = a) : a = e[9];
1736
+ const c = a;
1737
+ let f;
1738
+ e[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (f = /* @__PURE__ */ u(O, { variant: "h5", weight: "extraBold", align: "center", className: "text-neutral-black mt-4 md:mt-6 -mb-1", children: "Welcome to Docthub" }), e[10] = f) : f = e[10];
1739
+ const h = f, d = n.userType === "FOREIGN" ? "email" : n.signupCollectField;
1740
+ let m;
1741
+ e[11] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (m = /* @__PURE__ */ u("span", { className: "font-bold", children: "Full Name" }), e[11] = m) : m = e[11];
1742
+ const p = d === "phone" ? "Phone Number" : "Email Address";
1743
+ let b;
1744
+ e[12] !== p ? (b = /* @__PURE__ */ R(O, { variant: "title2", align: "center", className: "mb-4 md:mb-6", children: [
1745
+ "Please tell us your ",
1746
+ m,
1747
+ " and",
1748
+ " ",
1749
+ /* @__PURE__ */ u("span", { className: "font-bold", children: p }),
1750
+ " ",
1751
+ "for extended security of your account."
1752
+ ] }), e[12] = p, e[13] = b) : b = e[13];
1753
+ const g = b;
1754
+ let y;
1755
+ e[14] !== s ? (y = /* @__PURE__ */ u(Nn, { ...s }), e[14] = s, e[15] = y) : y = e[15];
1756
+ let v;
1757
+ return e[16] !== g || e[17] !== i || e[18] !== y || e[19] !== o ? (v = /* @__PURE__ */ u(ie, { layoutType: i, variant: o, contentWidth: "sm", logo: c, title: h, description: g, children: y }), e[16] = g, e[17] = i, e[18] = y, e[19] = o, e[20] = v) : v = e[20], v;
1758
+ }
1759
+ export {
1760
+ ie as A,
1761
+ ye as B,
1762
+ dn as D,
1763
+ pt as E,
1764
+ _t as I,
1765
+ In as L,
1766
+ Fn as M,
1767
+ Sn as O,
1768
+ xn as R,
1769
+ Nn as S,
1770
+ Kt as a,
1771
+ Rn as b,
1772
+ kn as c,
1773
+ Dn as d,
1774
+ $n as e,
1775
+ Wn as f,
1776
+ E as g,
1777
+ q as h,
1778
+ Ot as i,
1779
+ Ln as j,
1780
+ Ft as k,
1781
+ Ge as l,
1782
+ At as m,
1783
+ he as n,
1784
+ Vt as o,
1785
+ zt as p,
1786
+ Je as q,
1787
+ Ht as r,
1788
+ et as s,
1789
+ fn as t,
1790
+ Lt as u,
1791
+ bn as v,
1792
+ yn as w
1793
+ };