doct-ui-auth-kit 1.0.12 → 1.0.13

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