doct-ui-auth-kit 1.0.24 → 1.0.26

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