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