@sikka/hawa 0.23.8-next → 0.23.10-next

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.
Files changed (65) hide show
  1. package/dist/DropdownMenu-jh4puuXw.d.ts +95 -0
  2. package/dist/DropdownMenu-vm2kRAhL.d.mts +95 -0
  3. package/dist/Radio-2ZwcMDWt.d.ts +74 -0
  4. package/dist/Radio-5ZANA8Vh.d.mts +74 -0
  5. package/dist/SimpleTable-EE4ejgUR.d.mts +97 -0
  6. package/dist/SimpleTable-vY1ziD-2.d.ts +97 -0
  7. package/dist/Toast-jAb16JQg.d.mts +23 -0
  8. package/dist/Toast-xcELwcIX.d.ts +23 -0
  9. package/dist/blocks/auth/index.d.mts +202 -0
  10. package/dist/blocks/auth/index.d.ts +202 -0
  11. package/dist/blocks/auth/index.js +4182 -0
  12. package/dist/blocks/auth/index.mjs +1057 -0
  13. package/dist/blocks/feedback/index.d.mts +74 -0
  14. package/dist/blocks/feedback/index.d.ts +74 -0
  15. package/dist/blocks/feedback/index.js +1531 -0
  16. package/dist/blocks/feedback/index.mjs +493 -0
  17. package/dist/blocks/index.d.mts +480 -0
  18. package/dist/blocks/index.d.ts +480 -0
  19. package/dist/blocks/index.js +8119 -0
  20. package/dist/blocks/index.mjs +2535 -0
  21. package/dist/blocks/misc/index.d.mts +90 -0
  22. package/dist/blocks/misc/index.d.ts +90 -0
  23. package/dist/blocks/misc/index.js +1163 -0
  24. package/dist/blocks/misc/index.mjs +322 -0
  25. package/dist/blocks/pricing/index.d.mts +93 -0
  26. package/dist/blocks/pricing/index.d.ts +93 -0
  27. package/dist/blocks/pricing/index.js +3320 -0
  28. package/dist/blocks/pricing/index.mjs +2161 -0
  29. package/dist/chunk-2R2QPJT7.mjs +7519 -0
  30. package/dist/chunk-343SRWR4.mjs +146 -0
  31. package/dist/chunk-677VOLD4.mjs +464 -0
  32. package/dist/chunk-A25EXELT.mjs +131 -0
  33. package/dist/chunk-F6TKEDDP.mjs +57 -0
  34. package/dist/chunk-FNVYY7ND.mjs +22 -0
  35. package/dist/chunk-P2O6R3S6.mjs +268 -0
  36. package/dist/chunk-QGKW5R5F.mjs +196 -0
  37. package/dist/chunk-TR56G3NM.mjs +2350 -0
  38. package/dist/chunk-UAVBFK53.mjs +346 -0
  39. package/dist/commonTypes-CKtkuNFH.d.mts +11 -0
  40. package/dist/commonTypes-CKtkuNFH.d.ts +11 -0
  41. package/dist/commonTypes-MxCJyrHv.d.mts +8 -0
  42. package/dist/commonTypes-MxCJyrHv.d.ts +8 -0
  43. package/dist/elements/index.d.mts +715 -0
  44. package/dist/elements/index.d.ts +715 -0
  45. package/dist/elements/index.js +7719 -0
  46. package/dist/elements/index.mjs +285 -0
  47. package/dist/hooks/index.d.mts +107 -0
  48. package/dist/hooks/index.d.ts +107 -0
  49. package/dist/hooks/index.js +451 -0
  50. package/dist/hooks/index.mjs +254 -0
  51. package/dist/index.d.mts +1905 -0
  52. package/dist/index.d.ts +1905 -0
  53. package/dist/index.js +11987 -0
  54. package/dist/index.mjs +11760 -0
  55. package/dist/layout/index.d.mts +249 -0
  56. package/dist/layout/index.d.ts +249 -0
  57. package/dist/layout/index.js +4373 -0
  58. package/dist/layout/index.mjs +1381 -0
  59. package/dist/textTypes-559CaoOV.d.mts +88 -0
  60. package/dist/textTypes-559CaoOV.d.ts +88 -0
  61. package/dist/types/index.d.mts +115 -0
  62. package/dist/types/index.d.ts +115 -0
  63. package/dist/types/index.js +18 -0
  64. package/dist/types/index.mjs +0 -0
  65. package/package.json +1 -1
@@ -0,0 +1,4182 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // components/blocks/auth/index.ts
31
+ var auth_exports = {};
32
+ __export(auth_exports, {
33
+ AppLanding: () => AppLanding,
34
+ CheckEmail: () => CheckEmail,
35
+ CodeConfirmation: () => CodeConfirmation,
36
+ LoginForm: () => LoginForm,
37
+ NewPasswordForm: () => NewPasswordForm,
38
+ RegisterForm: () => RegisterForm,
39
+ ResetPasswordForm: () => ResetPasswordForm
40
+ });
41
+ module.exports = __toCommonJS(auth_exports);
42
+
43
+ // components/blocks/auth/LoginForm.tsx
44
+ var import_react13 = __toESM(require("react"));
45
+ var import_react_hook_form = require("react-hook-form");
46
+ var import_zod = require("@hookform/resolvers/zod");
47
+ var import_libphonenumber_js = require("libphonenumber-js");
48
+ var z = __toESM(require("zod"));
49
+
50
+ // components/elements/alert/Alert.tsx
51
+ var import_react2 = __toESM(require("react"));
52
+
53
+ // components/util.ts
54
+ var import_clsx = require("clsx");
55
+ var import_tailwind_merge = require("tailwind-merge");
56
+ function cn(...inputs) {
57
+ return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
58
+ }
59
+
60
+ // components/elements/button/Button.tsx
61
+ var React2 = __toESM(require("react"));
62
+ var import_class_variance_authority = require("class-variance-authority");
63
+
64
+ // components/elements/loading/Loading.tsx
65
+ var import_react = __toESM(require("react"));
66
+ var Loading = ({
67
+ design = "spinner",
68
+ size = "sm",
69
+ themeMode = "light",
70
+ color,
71
+ ...props
72
+ }) => {
73
+ let sizeStyles = {
74
+ button: "hawa-h-4 hawa-w-4",
75
+ xs: "hawa-h-1 hawa-w-1",
76
+ sm: "hawa-h-6 hawa-w-6",
77
+ normal: "hawa-h-8 hawa-w-8",
78
+ lg: "hawa-h-14 hawa-w-14",
79
+ xl: "hawa-h-24 hawa-w-24"
80
+ };
81
+ let animationStyles = {
82
+ pulse: "hawa-animate-in hawa-fade-in hawa-duration-1000",
83
+ bounce: "hawa-animate-bounce"
84
+ };
85
+ switch (design.split("-")[0]) {
86
+ case "dots":
87
+ return /* @__PURE__ */ import_react.default.createElement(
88
+ "div",
89
+ {
90
+ className: cn("hawa-flex hawa-flex-row hawa-gap-2", props.className)
91
+ },
92
+ /* @__PURE__ */ import_react.default.createElement(
93
+ "div",
94
+ {
95
+ className: cn(
96
+ "hawa-animate-bounce hawa-rounded-full hawa-delay-100 hawa-repeat-infinite",
97
+ size === "button" ? "hawa-h-2 hawa-w-2" : sizeStyles[size],
98
+ animationStyles[design.split("-")[1]],
99
+ color ? color : "hawa-bg-primary"
100
+ )
101
+ }
102
+ ),
103
+ /* @__PURE__ */ import_react.default.createElement(
104
+ "div",
105
+ {
106
+ className: cn(
107
+ "hawa-animate-bounce hawa-rounded-full hawa-delay-200 hawa-repeat-infinite",
108
+ size === "button" ? "hawa-h-2 hawa-w-2" : sizeStyles[size],
109
+ animationStyles[design.split("-")[1]],
110
+ color ? color : "hawa-bg-primary"
111
+ )
112
+ }
113
+ ),
114
+ /* @__PURE__ */ import_react.default.createElement(
115
+ "div",
116
+ {
117
+ className: cn(
118
+ "hawa-animate-bounce hawa-rounded-full hawa-delay-300 hawa-repeat-infinite",
119
+ size === "button" ? "hawa-h-2 hawa-w-2" : sizeStyles[size],
120
+ animationStyles[design.split("-")[1]],
121
+ color ? color : "hawa-bg-primary"
122
+ )
123
+ }
124
+ )
125
+ );
126
+ case "square":
127
+ return /* @__PURE__ */ import_react.default.createElement(
128
+ "svg",
129
+ {
130
+ className: cn("squircle-container", sizeStyles[size]),
131
+ viewBox: "0 0 35 35",
132
+ height: "35",
133
+ width: "35"
134
+ },
135
+ /* @__PURE__ */ import_react.default.createElement(
136
+ "rect",
137
+ {
138
+ className: "squircle-track",
139
+ x: "2.5",
140
+ y: "2.5",
141
+ fill: "none",
142
+ strokeWidth: "5px",
143
+ width: "32.5",
144
+ height: "32.5"
145
+ }
146
+ ),
147
+ /* @__PURE__ */ import_react.default.createElement(
148
+ "rect",
149
+ {
150
+ className: "square-car",
151
+ x: "2.5",
152
+ y: "2.5",
153
+ fill: "none",
154
+ strokeWidth: "5px",
155
+ width: "32.5",
156
+ height: "32.5",
157
+ pathLength: "100"
158
+ }
159
+ )
160
+ );
161
+ case "squircle":
162
+ return /* @__PURE__ */ import_react.default.createElement(
163
+ "svg",
164
+ {
165
+ className: cn("squircle-container", sizeStyles[size]),
166
+ x: "0px",
167
+ y: "0px",
168
+ viewBox: "0 0 37 37",
169
+ height: "37",
170
+ width: "37",
171
+ preserveAspectRatio: "xMidYMid meet"
172
+ },
173
+ /* @__PURE__ */ import_react.default.createElement(
174
+ "path",
175
+ {
176
+ className: "squircle-track",
177
+ fill: "none",
178
+ strokeWidth: "5",
179
+ pathLength: "100",
180
+ d: "M0.37 18.5 C0.37 5.772 5.772 0.37 18.5 0.37 S36.63 5.772 36.63 18.5 S31.228 36.63 18.5 36.63 S0.37 31.228 0.37 18.5"
181
+ }
182
+ ),
183
+ /* @__PURE__ */ import_react.default.createElement(
184
+ "path",
185
+ {
186
+ className: "squircle-car",
187
+ fill: "none",
188
+ strokeWidth: "5",
189
+ pathLength: "100",
190
+ d: "M0.37 18.5 C0.37 5.772 5.772 0.37 18.5 0.37 S36.63 5.772 36.63 18.5 S31.228 36.63 18.5 36.63 S0.37 31.228 0.37 18.5"
191
+ }
192
+ )
193
+ );
194
+ case "progress":
195
+ return /* @__PURE__ */ import_react.default.createElement("div", { className: "progress-loading" });
196
+ case "orbit":
197
+ return /* @__PURE__ */ import_react.default.createElement("div", { className: "orbit-container" });
198
+ default:
199
+ return /* @__PURE__ */ import_react.default.createElement(
200
+ "svg",
201
+ {
202
+ className: cn("circle-container", sizeStyles[size]),
203
+ viewBox: "0 0 40 40",
204
+ height: "40",
205
+ width: "40"
206
+ },
207
+ /* @__PURE__ */ import_react.default.createElement(
208
+ "circle",
209
+ {
210
+ className: cn("circle-track", {
211
+ "hawa-stroke-primary-foreground": themeMode === "dark",
212
+ "hawa-stroke-primary": themeMode === "light"
213
+ }),
214
+ cx: "20",
215
+ cy: "20",
216
+ r: "17.5",
217
+ pathLength: "100",
218
+ strokeWidth: "5px",
219
+ fill: "none"
220
+ }
221
+ ),
222
+ /* @__PURE__ */ import_react.default.createElement(
223
+ "circle",
224
+ {
225
+ className: cn("circle-car", {
226
+ "hawa-stroke-primary-foreground": themeMode === "dark",
227
+ "hawa-stroke-primary": themeMode === "light"
228
+ }),
229
+ cx: "20",
230
+ cy: "20",
231
+ r: "17.5",
232
+ pathLength: "100",
233
+ strokeWidth: "5px",
234
+ fill: "none"
235
+ }
236
+ )
237
+ );
238
+ }
239
+ };
240
+
241
+ // components/elements/button/Button.tsx
242
+ var buttonVariants = (0, import_class_variance_authority.cva)(
243
+ "hawa-inline-flex hawa-items-center hawa-select-none hawa-rounded-md hawa-text-sm hawa-font-medium hawa-ring-offset-background hawa-transition-colors focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-2 disabled:hawa-pointer-events-none disabled:hawa-opacity-50",
244
+ {
245
+ variants: {
246
+ variant: {
247
+ default: "hawa-bg-primary hawa-text-primary-foreground hover:hawa-bg-primary/90",
248
+ light: "hawa-bg-primary/20 hawa-text-primary hover:hawa-bg-primary/40",
249
+ destructive: "hawa-bg-destructive hawa-text-destructive-foreground hover:hawa-bg-destructive/90",
250
+ outline: "hawa-border hawa-border-input hawa-bg-transparent hover:hawa-bg-accent hover:hawa-text-accent-foreground",
251
+ secondary: "hawa-bg-secondary hawa-text-secondary-foreground hover:hawa-bg-secondary/80",
252
+ ghost: "hover:hawa-bg-accent hover:hawa-text-accent-foreground",
253
+ link: "hawa-text-primary hawa-underline-offset-4 hover:hawa-underline",
254
+ combobox: "hawa-bg-background hawa-border",
255
+ neoBrutalism: "neo-brutalism"
256
+ // "hawa-cursor-pointer hawa-transition-all hawa-uppercase hawa-font-mono dark:hawa-bg-black hawa-font-bold hawa-py-2 hawa-px-4 hawa-rounded hawa-border-2 hawa-border-primary hawa-shadow-color-primary hawa-transition-[hawa-transform_50ms, hawa-box-shadow_50ms] active:hawa-translate-x-0.5 active:hawa-translate-y-0.5 active:hawa-shadow-color-primary-active shadow-color-primary active:shadow-color-primary-active",
257
+ },
258
+ size: {
259
+ default: "hawa-h-10 hawa-px-4 hawa-py-2",
260
+ heightless: "hawa-px-4 hawa-py-4",
261
+ xs: "hawa-h-fit hawa-min-h-[25px] hawa-py-1 hawa-text-[10px] hawa-px-2 ",
262
+ sm: "hawa-h-9 hawa-text-[11px] hawa-rounded-md hawa-px-3",
263
+ lg: "hawa-h-11 hawa-rounded-md hawa-px-8",
264
+ xl: "hawa-h-14 hawa-rounded-md hawa-px-10",
265
+ icon: "hawa-h-10 hawa-w-10",
266
+ smallIcon: "hawa-h-7 hawa-w-7"
267
+ }
268
+ },
269
+ defaultVariants: {
270
+ variant: "default",
271
+ size: "default"
272
+ }
273
+ }
274
+ );
275
+ var Button = React2.forwardRef(
276
+ ({
277
+ className,
278
+ variant,
279
+ size,
280
+ asChild = false,
281
+ centered = true,
282
+ isLoading,
283
+ children,
284
+ ...props
285
+ }, ref) => {
286
+ const Comp = "button";
287
+ const loadingColor = variant === "outline" || variant === "ghost" || variant === "neoBrutalism" ? "hawa-bg-primary" : "hawa-bg-primary-foreground";
288
+ return /* @__PURE__ */ React2.createElement(
289
+ Comp,
290
+ {
291
+ className: cn(
292
+ buttonVariants({ variant, size, className }),
293
+ centered && "hawa-justify-center"
294
+ ),
295
+ ref,
296
+ ...props
297
+ },
298
+ isLoading ? /* @__PURE__ */ React2.createElement(
299
+ Loading,
300
+ {
301
+ design: size === "icon" || size === "smallIcon" ? "spinner" : "dots-pulse",
302
+ themeMode: variant === "outline" ? "light" : "dark",
303
+ color: loadingColor,
304
+ size: size === "sm" || size === "xs" ? "xs" : "button"
305
+ }
306
+ ) : children
307
+ );
308
+ }
309
+ );
310
+ Button.displayName = "Button";
311
+
312
+ // components/elements/alert/Alert.tsx
313
+ var Alert = ({
314
+ variant = "normal",
315
+ direction = "ltr",
316
+ severity = "none",
317
+ duration,
318
+ icon,
319
+ className,
320
+ ...props
321
+ }) => {
322
+ const alertRef = (0, import_react2.useRef)(null);
323
+ const [closed, setClosed] = (0, import_react2.useState)(false);
324
+ (0, import_react2.useEffect)(() => {
325
+ if (duration) {
326
+ const timeoutHide = setTimeout(() => {
327
+ setClosed(true);
328
+ }, duration);
329
+ const timeoutDestroy = setTimeout(() => {
330
+ setClosed(true);
331
+ if (alertRef == null ? void 0 : alertRef.current) {
332
+ alertRef == null ? void 0 : alertRef.current.removeChild(alertRef == null ? void 0 : alertRef.current.children[0]);
333
+ }
334
+ }, duration + 1e3);
335
+ return () => {
336
+ clearTimeout(timeoutHide);
337
+ clearTimeout(timeoutDestroy);
338
+ };
339
+ }
340
+ }, [duration]);
341
+ let closeButtonStyle = {
342
+ none: "",
343
+ info: "",
344
+ warning: "",
345
+ error: "",
346
+ success: "",
347
+ hyper: "",
348
+ oceanic: ""
349
+ };
350
+ let styleVariant = {
351
+ none: "hawa-text-gray-700 hawa-bg-gray-100 dark:hawa-bg-gray-900 ",
352
+ info: "hawa-text-info-foreground hawa-bg-info/90",
353
+ warning: "hawa-text-warning-foreground hawa-bg-warning/90",
354
+ error: "hawa-text-destructive-foreground hawa-bg-destructive/90",
355
+ success: "hawa-text-success-foreground hawa-bg-success/90",
356
+ hyper: "hawa-text-white hawa-bg-gradient-to-tl hawa-from-pink-700 hawa-via-red-500 hawa-to-yellow-600 ",
357
+ oceanic: "hawa-text-white hawa-bg-gradient-to-bl hawa-from-green-500 hawa-via-blue-700 hawa-to-purple-500"
358
+ };
359
+ return /* @__PURE__ */ import_react2.default.createElement("div", { ref: alertRef }, /* @__PURE__ */ import_react2.default.createElement(
360
+ "div",
361
+ {
362
+ "data-testid": "alert",
363
+ "aria-label": "Alert",
364
+ role: "alert",
365
+ dir: direction,
366
+ className: cn(
367
+ "hawa-relative hawa-mb-4 hawa-flex hawa-flex-col hawa-rounded hawa-p-4 hawa-text-sm hawa-transition-all",
368
+ styleVariant[severity],
369
+ closed ? "hawa-opacity-0" : "hawa-opacity-100",
370
+ className
371
+ )
372
+ },
373
+ /* @__PURE__ */ import_react2.default.createElement("div", { className: "hawa-flex hawa-flex-row" }, icon && /* @__PURE__ */ import_react2.default.createElement(
374
+ "div",
375
+ {
376
+ className: direction === "rtl" ? "hawa-pl-2 hawa-pt-1" : "hawa-pr-2 hawa-pt-1"
377
+ },
378
+ icon
379
+ ), /* @__PURE__ */ import_react2.default.createElement("div", { className: "hawa-flex hawa-flex-col" }, /* @__PURE__ */ import_react2.default.createElement(
380
+ "span",
381
+ {
382
+ className: cn(
383
+ "hawa-font-bold",
384
+ direction === "rtl" ? "hawa-ml-8" : "hawa-mr-8"
385
+ )
386
+ },
387
+ props.title
388
+ ), /* @__PURE__ */ import_react2.default.createElement(
389
+ "span",
390
+ {
391
+ className: cn(
392
+ direction === "rtl" ? "hawa-ml-8" : "hawa-mr-8",
393
+ props.persistent ? "hawa-w-full" : "hawa-w-[calc(100% - 40px)]"
394
+ )
395
+ },
396
+ props.text
397
+ ), props.actions && /* @__PURE__ */ import_react2.default.createElement("div", { className: "hawa-mt-2 hawa-flex hawa-flex-row hawa-gap-2" }, props.actions.map((act, index) => /* @__PURE__ */ import_react2.default.createElement(
398
+ Button,
399
+ {
400
+ key: index,
401
+ variant: act.variant,
402
+ onClick: act.onClick()
403
+ },
404
+ act.label
405
+ ))))),
406
+ !props.persistent && /* @__PURE__ */ import_react2.default.createElement(
407
+ "button",
408
+ {
409
+ type: "button",
410
+ "data-dismiss-target": "#alert-default",
411
+ "aria-label": "Close",
412
+ className: cn(
413
+ "hawa-absolute hawa-top-2 hawa-inline-flex hawa-h-9 hawa-w-9 hawa-items-center hawa-justify-center hawa-rounded-inner hawa-p-1.5 hawa-transition-all hover:hawa-text-gray-900",
414
+ closeButtonStyle[severity],
415
+ direction === "rtl" ? "hawa-left-2" : "hawa-right-2"
416
+ ),
417
+ onClick: () => {
418
+ if (props.onAlertClosed) {
419
+ props.onAlertClosed();
420
+ }
421
+ setClosed(true);
422
+ setTimeout(() => {
423
+ if (alertRef == null ? void 0 : alertRef.current) {
424
+ alertRef == null ? void 0 : alertRef.current.removeChild(alertRef == null ? void 0 : alertRef.current.children[0]);
425
+ }
426
+ }, 200);
427
+ }
428
+ },
429
+ /* @__PURE__ */ import_react2.default.createElement("span", { className: "hawa-sr-only" }, "Close"),
430
+ /* @__PURE__ */ import_react2.default.createElement(
431
+ "svg",
432
+ {
433
+ "aria-label": "Close Icon",
434
+ "aria-hidden": "true",
435
+ className: "hawa-h-5 hawa-w-5",
436
+ fill: "currentColor",
437
+ viewBox: "0 0 20 20"
438
+ },
439
+ /* @__PURE__ */ import_react2.default.createElement(
440
+ "path",
441
+ {
442
+ fillRule: "evenodd",
443
+ d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",
444
+ clipRule: "evenodd"
445
+ }
446
+ )
447
+ )
448
+ )
449
+ ));
450
+ };
451
+
452
+ // components/elements/card/Card.tsx
453
+ var React4 = __toESM(require("react"));
454
+ var Card = React4.forwardRef(
455
+ ({ className, variant = "default", clickable = false, ...props }, ref) => {
456
+ let variantStyles = {
457
+ default: cn(
458
+ "hawa-rounded-lg hawa-border hawa-bg-card hawa-text-card-foreground hawa-shadow-sm",
459
+ clickable && "hawa-cursor-pointer hawa-transition-all hover:hawa-drop-shadow-md dark:hover:dark-shadow"
460
+ ),
461
+ neoBrutalism: cn(
462
+ "neo-brutalism",
463
+ // "hawa-transition-all hawa-uppercase hawa-font-mono dark:hawa-bg-black hawa-font-bold hawa-py-2 hawa-px-4 hawa-rounded hawa-border-2 hawa-border-primary hawa-shadow-color-primary hawa-transition-[hawa-transform_50ms, hawa-box-shadow_50ms] transition-all uppercase font-mono dark:bg-black font-bold py-2 px-4 rounded border-2 border-primary shadow-color-primary transition-[transform_50ms, box-shadow_50ms]",
464
+ clickable && "hawa-cursor-pointer active:hawa-translate-x-0.5 active:hawa-translate-y-0.5 active:hawa-shadow-color-primary-active active:translate-x-0.5 active:translate-y-0.5 active:shadow-color-primary-active"
465
+ )
466
+ };
467
+ return /* @__PURE__ */ React4.createElement(
468
+ "div",
469
+ {
470
+ ref,
471
+ className: cn(className, variantStyles[variant]),
472
+ ...props
473
+ }
474
+ );
475
+ }
476
+ );
477
+ var CardHeader = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React4.createElement(
478
+ "div",
479
+ {
480
+ ref,
481
+ className: cn(
482
+ "hawa-flex hawa-flex-col hawa-space-y-1.5 hawa-p-6",
483
+ className
484
+ ),
485
+ ...props
486
+ }
487
+ ));
488
+ var CardTitle = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React4.createElement(
489
+ "h3",
490
+ {
491
+ ref,
492
+ className: cn("hawa-text-2xl hawa-font-semibold ", className),
493
+ ...props
494
+ }
495
+ ));
496
+ var CardDescription = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React4.createElement(
497
+ "p",
498
+ {
499
+ ref,
500
+ className: cn("hawa-text-sm hawa-text-muted-foreground", className),
501
+ ...props
502
+ }
503
+ ));
504
+ var CardContent = React4.forwardRef(
505
+ ({ headless, noPadding, className, ...props }, ref) => /* @__PURE__ */ React4.createElement(
506
+ "div",
507
+ {
508
+ ref,
509
+ className: cn(
510
+ noPadding ? "hawa-p-0" : "hawa-p-6",
511
+ headless ? "hawa-pt-6" : "hawa-pt-0",
512
+ className
513
+ ),
514
+ ...props
515
+ }
516
+ )
517
+ );
518
+ var CardFooter = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React4.createElement(
519
+ "div",
520
+ {
521
+ ref,
522
+ className: cn("hawa-flex hawa-items-center hawa-p-6 hawa-pt-0", className),
523
+ ...props
524
+ }
525
+ ));
526
+ CardDescription.displayName = "CardDescription";
527
+ CardContent.displayName = "CardContent";
528
+ CardHeader.displayName = "CardHeader";
529
+ CardFooter.displayName = "CardFooter";
530
+ CardTitle.displayName = "CardTitle";
531
+ Card.displayName = "Card";
532
+
533
+ // components/elements/input/Input.tsx
534
+ var import_react5 = __toESM(require("react"));
535
+
536
+ // components/elements/label/Label.tsx
537
+ var React6 = __toESM(require("react"));
538
+
539
+ // components/elements/tooltip/Tooltip.tsx
540
+ var import_react3 = __toESM(require("react"));
541
+ var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"));
542
+ var TooltipContent = import_react3.default.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ import_react3.default.createElement(
543
+ TooltipPrimitive.Content,
544
+ {
545
+ ref,
546
+ sideOffset,
547
+ className: cn(
548
+ "hawa-z-50 hawa-overflow-hidden hawa-rounded-md hawa-border hawa-bg-popover hawa-px-3 hawa-py-1.5 hawa-text-sm hawa-text-popover-foreground hawa-shadow-md hawa-animate-in hawa-fade-in-0 hawa-zoom-in-95 data-[state=closed]:hawa-animate-out data-[state=closed]:hawa-fade-out-0 data-[state=closed]:hawa-zoom-out-95 data-[side=bottom]:hawa-slide-in-from-top-2 data-[side=left]:hawa-slide-in-from-right-2 data-[side=right]:hawa-slide-in-from-left-2 data-[side=top]:hawa-slide-in-from-bottom-2",
549
+ className
550
+ ),
551
+ ...props
552
+ }
553
+ ));
554
+ TooltipContent.displayName = TooltipPrimitive.Content.displayName;
555
+ var TooltipArrow = import_react3.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ import_react3.default.createElement(TooltipPrimitive.Arrow, { ref, className: cn(className), ...props }));
556
+ TooltipArrow.displayName = TooltipPrimitive.Arrow.displayName;
557
+ var Tooltip = ({
558
+ side,
559
+ open,
560
+ content,
561
+ children,
562
+ defaultOpen,
563
+ onOpenChange,
564
+ triggerProps,
565
+ contentProps,
566
+ providerProps,
567
+ delayDuration = 300,
568
+ ...props
569
+ }) => {
570
+ return /* @__PURE__ */ import_react3.default.createElement(
571
+ TooltipPrimitive.TooltipProvider,
572
+ {
573
+ delayDuration,
574
+ ...providerProps
575
+ },
576
+ /* @__PURE__ */ import_react3.default.createElement(
577
+ TooltipPrimitive.Root,
578
+ {
579
+ open,
580
+ defaultOpen,
581
+ onOpenChange,
582
+ ...props
583
+ },
584
+ /* @__PURE__ */ import_react3.default.createElement(TooltipPrimitive.Trigger, { ...triggerProps }, children),
585
+ /* @__PURE__ */ import_react3.default.createElement(TooltipContent, { side, align: "center", ...contentProps }, content)
586
+ )
587
+ );
588
+ };
589
+
590
+ // components/elements/label/Label.tsx
591
+ var Label = React6.forwardRef(({ className, hint, hintSide, required, children, ...props }, ref) => /* @__PURE__ */ React6.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-1 hawa-transition-all" }, /* @__PURE__ */ React6.createElement(
592
+ "label",
593
+ {
594
+ ref,
595
+ className: cn(
596
+ "hawa-text-sm hawa-font-medium hawa-leading-none peer-disabled:hawa-cursor-not-allowed peer-disabled:hawa-opacity-70",
597
+ className
598
+ ),
599
+ ...props
600
+ },
601
+ children,
602
+ required && /* @__PURE__ */ React6.createElement("span", { className: "hawa-mx-0.5 hawa-text-red-500" }, "*")
603
+ ), hint && /* @__PURE__ */ React6.createElement(Tooltip, { content: hint, side: hintSide }, /* @__PURE__ */ React6.createElement(
604
+ "svg",
605
+ {
606
+ xmlns: "http://www.w3.org/2000/svg",
607
+ className: "hawa-h-[14px] hawa-w-[14px] hawa-cursor-help",
608
+ viewBox: "0 0 24 24",
609
+ fill: "none",
610
+ stroke: "currentColor",
611
+ strokeWidth: "2",
612
+ strokeLinecap: "round",
613
+ strokeLinejoin: "round"
614
+ },
615
+ /* @__PURE__ */ React6.createElement("circle", { cx: "12", cy: "12", r: "10" }),
616
+ /* @__PURE__ */ React6.createElement("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }),
617
+ /* @__PURE__ */ React6.createElement("path", { d: "M12 17h.01" })
618
+ ))));
619
+ Label.displayName = "Label";
620
+
621
+ // components/elements/skeleton/Skeleton.tsx
622
+ var import_react4 = __toESM(require("react"));
623
+ function Skeleton({
624
+ className,
625
+ content,
626
+ animation = "pulse",
627
+ ...props
628
+ }) {
629
+ const animationStyles = {
630
+ none: "hawa-rounded hawa-bg-muted",
631
+ pulse: "hawa-animate-pulse hawa-rounded hawa-bg-muted",
632
+ shimmer: "hawa-space-y-5 hawa-rounded hawa-bg-muted hawa-p-4 hawa-relative before:hawa-absolute before:hawa-inset-0 before:hawa--translate-x-full before:hawa-animate-[shimmer_2s_infinite] before:hawa-bg-gradient-to-r before:hawa-from-transparent before:hawa-via-gray-300/40 dark:before:hawa-via-white/10 before:hawa-to-transparent hawa-isolate hawa-overflow-hidden before:hawa-border-t before:hawa-border-rose-100/10"
633
+ };
634
+ return /* @__PURE__ */ import_react4.default.createElement(
635
+ "div",
636
+ {
637
+ className: cn(
638
+ animationStyles[animation],
639
+ content && "hawa-flex hawa-flex-col hawa-items-center hawa-justify-center",
640
+ className
641
+ ),
642
+ ...props
643
+ },
644
+ content && content
645
+ );
646
+ }
647
+
648
+ // components/elements/input/Input.tsx
649
+ var Input = (0, import_react5.forwardRef)(
650
+ ({
651
+ margin = "none",
652
+ width = "full",
653
+ preview = false,
654
+ forceHideHelperText = false,
655
+ labelProps,
656
+ placeholder,
657
+ showCount,
658
+ inputProps,
659
+ countPosition = "bottom",
660
+ ...props
661
+ }, ref) => {
662
+ var _a;
663
+ let marginStyles = {
664
+ none: "hawa-mb-0",
665
+ normal: "hawa-mb-3",
666
+ large: "hawa-mb-5"
667
+ };
668
+ let widthStyles = {
669
+ small: "hawa-w-full hawa-max-w-2xs",
670
+ normal: "hawa-w-1/2",
671
+ full: "hawa-w-full",
672
+ auto: ""
673
+ };
674
+ let defaultStyle = "hawa-flex hawa-max-h-fit hawa-h-fit hawa-relative hawa-flex-col hawa-justify-center hawa-gap-0";
675
+ let defaultInputStyle = "hawa-block hawa-w-full hawa-rounded hawa-border hawa-transition-all hawa-bg-background hawa-p-3 hawa-text-sm ";
676
+ return /* @__PURE__ */ import_react5.default.createElement(
677
+ "div",
678
+ {
679
+ className: cn(
680
+ defaultStyle,
681
+ marginStyles[margin],
682
+ widthStyles[width],
683
+ props.containerClassName,
684
+ "hawa-w-full hawa-gap-2"
685
+ )
686
+ },
687
+ props.label && /* @__PURE__ */ import_react5.default.createElement(Label, { ...labelProps }, props.label),
688
+ props.isLoading ? /* @__PURE__ */ import_react5.default.createElement("div", { className: "hawa-pb-2" }, /* @__PURE__ */ import_react5.default.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" })) : /* @__PURE__ */ import_react5.default.createElement(import_react5.default.Fragment, null, !props.hideSeparator && /* @__PURE__ */ import_react5.default.createElement(
689
+ "div",
690
+ {
691
+ className: cn(
692
+ "hawa-absolute hawa-top-[22px] hawa-h-[0.8px] hawa-w-full hawa-bg-gray-200 hawa-transition-all dark:hawa-bg-gray-800",
693
+ preview ? "hawa-opacity-100" : "hawa-opacity-0"
694
+ )
695
+ }
696
+ ), /* @__PURE__ */ import_react5.default.createElement(import_react5.default.Fragment, null, /* @__PURE__ */ import_react5.default.createElement("div", { className: "hawa-relative" }, props.startIcon && /* @__PURE__ */ import_react5.default.createElement("div", { className: "hawa-absolute hawa-start-3 hawa-top-1/2 hawa--translate-y-1/2" }, props.startIcon), props.endIcon && /* @__PURE__ */ import_react5.default.createElement(
697
+ "div",
698
+ {
699
+ className: cn(
700
+ "hawa-absolute hawa-end-3 hawa-top-1/2 hawa--translate-y-1/2",
701
+ (_a = props.endIconProps) == null ? void 0 : _a.className
702
+ )
703
+ },
704
+ props.endIcon
705
+ ), /* @__PURE__ */ import_react5.default.createElement(
706
+ "input",
707
+ {
708
+ required: true,
709
+ dir: props.dir,
710
+ type: props.type,
711
+ value: props.value,
712
+ onChange: props.onChange,
713
+ autoComplete: props.autoComplete,
714
+ defaultValue: props.defaultValue,
715
+ placeholder,
716
+ disabled: props.disabled || preview,
717
+ style: { height: 40 },
718
+ ...inputProps,
719
+ className: cn(
720
+ defaultInputStyle,
721
+ " focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-0 dark:hawa-text-white",
722
+ {
723
+ "hawa-pe-9": props.endIcon,
724
+ "hawa-ps-9": props.startIcon,
725
+ "hawa-pe-[60px]": countPosition === "center"
726
+ },
727
+ preview && "hawa-border-transparent hawa-bg-transparent hawa-px-0",
728
+ inputProps == null ? void 0 : inputProps.className
729
+ )
730
+ }
731
+ )), !forceHideHelperText && /* @__PURE__ */ import_react5.default.createElement(
732
+ "p",
733
+ {
734
+ className: cn(
735
+ "hawa-my-0 hawa-text-start hawa-text-xs hawa-text-helper-color hawa-transition-all",
736
+ props.helperText ? "hawa-h-4 hawa-opacity-100" : "hawa-h-0 hawa-opacity-0"
737
+ )
738
+ },
739
+ props.helperText
740
+ ), !props.disabled && forceHideHelperText && /* @__PURE__ */ import_react5.default.createElement(
741
+ "div",
742
+ {
743
+ className: cn(
744
+ "hawa-absolute hawa-end-0 hawa-top-[47px] hawa-z-20 hawa-translate-y-1/2 hawa-rounded hawa-bg-background hawa-text-start hawa-text-xs hawa-text-helper-color hawa-drop-shadow-md hawa-transition-all",
745
+ props.helperText ? "hawa-border hawa-p-1" : "hawa-border-none hawa-p-0"
746
+ )
747
+ },
748
+ props.helperText
749
+ ), showCount && /* @__PURE__ */ import_react5.default.createElement(
750
+ "div",
751
+ {
752
+ className: cn(
753
+ "hawa-absolute hawa-translate-y-1/2 hawa-text-start hawa-text-xs hawa-transition-all",
754
+ {
755
+ "hawa-end-0 hawa-top-[62px]": countPosition === "bottom",
756
+ "hawa-bottom-[62px] hawa-end-0": countPosition === "top",
757
+ "hawa-end-2": countPosition === "center"
758
+ }
759
+ )
760
+ },
761
+ props.value ? String(props.value).length : 0,
762
+ "/",
763
+ props.maxLength
764
+ )))
765
+ );
766
+ }
767
+ );
768
+
769
+ // components/elements/phoneInput/PhoneInput.tsx
770
+ var import_react7 = __toESM(require("react"));
771
+
772
+ // components/countries.ts
773
+ var countries = [
774
+ {
775
+ country_label: "Saudi Arabia",
776
+ code: "SA",
777
+ unicode: "🇸🇦",
778
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SA.svg",
779
+ label: "+966"
780
+ },
781
+ {
782
+ country_label: "United Arab Emirates",
783
+ code: "AE",
784
+ unicode: "🇦🇪",
785
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/AE.svg",
786
+ label: "+971"
787
+ },
788
+ {
789
+ country_label: "Bahrain",
790
+ code: "BH",
791
+ unicode: "🇧🇭",
792
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BH.svg",
793
+ label: "+973"
794
+ },
795
+ {
796
+ country_label: "Kuwait",
797
+ code: "KW",
798
+ unicode: "🇰🇼",
799
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/KW.svg",
800
+ label: "+965"
801
+ },
802
+ {
803
+ country_label: "Qatar",
804
+ code: "QA",
805
+ unicode: "🇶🇦",
806
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/QA.svg",
807
+ label: "+974"
808
+ },
809
+ {
810
+ country_label: "Oman",
811
+ code: "OM",
812
+ unicode: "🇴🇲",
813
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/OM.svg",
814
+ label: "+968"
815
+ },
816
+ {
817
+ country_label: "Andorra",
818
+ value: "Andorra",
819
+ code: "AD",
820
+ unicode: "🇦🇩",
821
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/AD.svg",
822
+ label: "+376"
823
+ },
824
+ {
825
+ country_label: "Afghanistan",
826
+ code: "AF",
827
+ unicode: "🇦🇫",
828
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/AF.svg",
829
+ label: "+93"
830
+ },
831
+ {
832
+ country_label: "Antigua & Barbuda",
833
+ code: "AG",
834
+ unicode: "🇦🇬",
835
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/AG.svg",
836
+ label: "+1268"
837
+ },
838
+ {
839
+ country_label: "Anguilla",
840
+ code: "AI",
841
+ unicode: "🇦🇮",
842
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/AI.svg",
843
+ label: "+1264"
844
+ },
845
+ {
846
+ country_label: "Albania",
847
+ code: "AL",
848
+ unicode: "🇦🇱",
849
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/AL.svg",
850
+ label: "+355"
851
+ },
852
+ {
853
+ country_label: "Armenia",
854
+ code: "AM",
855
+ unicode: "🇦🇲",
856
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/AM.svg",
857
+ label: "+374"
858
+ },
859
+ {
860
+ country_label: "Angola",
861
+ code: "AO",
862
+ unicode: "🇦🇴",
863
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/AO.svg",
864
+ label: "+244"
865
+ },
866
+ {
867
+ country_label: "Antarctica",
868
+ code: "AQ",
869
+ unicode: "🇦🇶",
870
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/AQ.svg",
871
+ label: "+672"
872
+ },
873
+ {
874
+ country_label: "Argentina",
875
+ code: "AR",
876
+ unicode: "🇦🇷",
877
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/AR.svg",
878
+ label: "+54"
879
+ },
880
+ {
881
+ country_label: "American Samoa",
882
+ code: "AS",
883
+ unicode: "🇦🇸",
884
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/AS.svg",
885
+ label: "+1684"
886
+ },
887
+ {
888
+ country_label: "Austria",
889
+ code: "AT",
890
+ unicode: "🇦🇹",
891
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/AT.svg",
892
+ label: "+43"
893
+ },
894
+ {
895
+ country_label: "Australia",
896
+ code: "AU",
897
+ unicode: "🇦🇺",
898
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/AU.svg",
899
+ label: "+61"
900
+ },
901
+ {
902
+ country_label: "Aruba",
903
+ code: "AW",
904
+ unicode: "🇦🇼",
905
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/AW.svg",
906
+ label: "+297"
907
+ },
908
+ {
909
+ country_label: "\xC5land Islands",
910
+ code: "AX",
911
+ unicode: "🇦🇽",
912
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/AX.svg",
913
+ label: "+358"
914
+ },
915
+ {
916
+ country_label: "Azerbaijan",
917
+ code: "AZ",
918
+ unicode: "🇦🇿",
919
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/AZ.svg",
920
+ label: "+994"
921
+ },
922
+ {
923
+ country_label: "Bosnia & Herzegovina",
924
+ code: "BA",
925
+ unicode: "🇧🇦",
926
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BA.svg",
927
+ label: "+387"
928
+ },
929
+ {
930
+ country_label: "Barbados",
931
+ code: "BB",
932
+ unicode: "🇧🇧",
933
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BB.svg",
934
+ label: "+1246"
935
+ },
936
+ {
937
+ country_label: "Bangladesh",
938
+ code: "BD",
939
+ unicode: "🇧🇩",
940
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BD.svg",
941
+ label: "+880"
942
+ },
943
+ {
944
+ country_label: "Belgium",
945
+ code: "BE",
946
+ unicode: "🇧🇪",
947
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BE.svg",
948
+ label: "+32"
949
+ },
950
+ {
951
+ country_label: "Burkina Faso",
952
+ code: "BF",
953
+ unicode: "🇧🇫",
954
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BF.svg",
955
+ label: "+226"
956
+ },
957
+ {
958
+ country_label: "Bulgaria",
959
+ code: "BG",
960
+ unicode: "🇧🇬",
961
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BG.svg",
962
+ label: "+359"
963
+ },
964
+ {
965
+ country_label: "Burundi",
966
+ code: "BI",
967
+ unicode: "🇧🇮",
968
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BI.svg",
969
+ label: "+257"
970
+ },
971
+ {
972
+ country_label: "Benin",
973
+ code: "BJ",
974
+ unicode: "🇧🇯",
975
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BJ.svg",
976
+ label: "+229"
977
+ },
978
+ {
979
+ country_label: "St. Barth\xE9lemy",
980
+ code: "BL",
981
+ unicode: "🇧🇱",
982
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BL.svg",
983
+ label: "+590"
984
+ },
985
+ {
986
+ country_label: "Bermuda",
987
+ code: "BM",
988
+ unicode: "🇧🇲",
989
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BM.svg",
990
+ label: "+1441"
991
+ },
992
+ {
993
+ country_label: "Brunei",
994
+ code: "BN",
995
+ unicode: "🇧🇳",
996
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BN.svg",
997
+ label: "+673"
998
+ },
999
+ {
1000
+ country_label: "Bolivia",
1001
+ code: "BO",
1002
+ unicode: "🇧🇴",
1003
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BO.svg",
1004
+ label: "+591"
1005
+ },
1006
+ {
1007
+ country_label: "Brazil",
1008
+ code: "BR",
1009
+ unicode: "🇧🇷",
1010
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BR.svg",
1011
+ label: "+55"
1012
+ },
1013
+ {
1014
+ country_label: "Bahamas",
1015
+ code: "BS",
1016
+ unicode: "🇧🇸",
1017
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BS.svg",
1018
+ label: "+1242"
1019
+ },
1020
+ {
1021
+ country_label: "Bhutan",
1022
+ code: "BT",
1023
+ unicode: "🇧🇹",
1024
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BT.svg",
1025
+ label: "+975"
1026
+ },
1027
+ {
1028
+ country_label: "Botswana",
1029
+ code: "BW",
1030
+ unicode: "🇧🇼",
1031
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BW.svg",
1032
+ label: "+267"
1033
+ },
1034
+ {
1035
+ country_label: "Belarus",
1036
+ code: "BY",
1037
+ unicode: "🇧🇾",
1038
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BY.svg",
1039
+ label: "+375"
1040
+ },
1041
+ {
1042
+ country_label: "Belize",
1043
+ code: "BZ",
1044
+ unicode: "🇧🇿",
1045
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BZ.svg",
1046
+ label: "+501"
1047
+ },
1048
+ {
1049
+ country_label: "Canada",
1050
+ code: "CA",
1051
+ unicode: "🇨🇦",
1052
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CA.svg",
1053
+ label: "+1"
1054
+ },
1055
+ {
1056
+ country_label: "Cocos (Keeling) Islands",
1057
+ code: "CC",
1058
+ unicode: "🇨🇨",
1059
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CC.svg",
1060
+ label: "+61"
1061
+ },
1062
+ {
1063
+ country_label: "Congo - Kinshasa",
1064
+ code: "CD",
1065
+ unicode: "🇨🇩",
1066
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CD.svg",
1067
+ label: "+243"
1068
+ },
1069
+ {
1070
+ country_label: "Central African Republic",
1071
+ code: "CF",
1072
+ unicode: "🇨🇫",
1073
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CF.svg",
1074
+ label: "+236"
1075
+ },
1076
+ {
1077
+ country_label: "Congo - Brazzaville",
1078
+ code: "CG",
1079
+ unicode: "🇨🇬",
1080
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CG.svg",
1081
+ label: "+242"
1082
+ },
1083
+ {
1084
+ country_label: "Switzerland",
1085
+ code: "CH",
1086
+ unicode: "🇨🇭",
1087
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CH.svg",
1088
+ label: "+41"
1089
+ },
1090
+ {
1091
+ country_label: "C\xF4te d\u2019Ivoire",
1092
+ code: "CI",
1093
+ unicode: "🇨🇮",
1094
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CI.svg",
1095
+ label: "+225"
1096
+ },
1097
+ {
1098
+ country_label: "Cook Islands",
1099
+ code: "CK",
1100
+ unicode: "🇨🇰",
1101
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CK.svg",
1102
+ label: "+682"
1103
+ },
1104
+ {
1105
+ country_label: "Chile",
1106
+ code: "CL",
1107
+ unicode: "🇨🇱",
1108
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CL.svg",
1109
+ label: "+56"
1110
+ },
1111
+ {
1112
+ country_label: "Cameroon",
1113
+ code: "CM",
1114
+ unicode: "🇨🇲",
1115
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CM.svg",
1116
+ label: "+237"
1117
+ },
1118
+ {
1119
+ country_label: "China",
1120
+ code: "CN",
1121
+ unicode: "🇨🇳",
1122
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CN.svg",
1123
+ label: "+86"
1124
+ },
1125
+ {
1126
+ country_label: "Colombia",
1127
+ code: "CO",
1128
+ unicode: "🇨🇴",
1129
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CO.svg",
1130
+ label: "+57"
1131
+ },
1132
+ {
1133
+ country_label: "Costa Rica",
1134
+ code: "CR",
1135
+ unicode: "🇨🇷",
1136
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CR.svg",
1137
+ label: "+506"
1138
+ },
1139
+ {
1140
+ country_label: "Cuba",
1141
+ code: "CU",
1142
+ unicode: "🇨🇺",
1143
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CU.svg",
1144
+ label: "+53"
1145
+ },
1146
+ {
1147
+ country_label: "Cape Verde",
1148
+ code: "CV",
1149
+ unicode: "🇨🇻",
1150
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CV.svg",
1151
+ label: "+238"
1152
+ },
1153
+ {
1154
+ country_label: "Christmas Island",
1155
+ code: "CX",
1156
+ unicode: "🇨🇽",
1157
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CX.svg",
1158
+ label: "+61"
1159
+ },
1160
+ {
1161
+ country_label: "Cyprus",
1162
+ code: "CY",
1163
+ unicode: "🇨🇾",
1164
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CY.svg",
1165
+ label: "+357"
1166
+ },
1167
+ {
1168
+ country_label: "Czechia",
1169
+ code: "CZ",
1170
+ unicode: "🇨🇿",
1171
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CZ.svg",
1172
+ label: "+420"
1173
+ },
1174
+ {
1175
+ country_label: "Germany",
1176
+ code: "DE",
1177
+ unicode: "🇩🇪",
1178
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/DE.svg",
1179
+ label: "+49"
1180
+ },
1181
+ {
1182
+ country_label: "Djibouti",
1183
+ code: "DJ",
1184
+ unicode: "🇩🇯",
1185
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/DJ.svg",
1186
+ label: "+253"
1187
+ },
1188
+ {
1189
+ country_label: "Denmark",
1190
+ code: "DK",
1191
+ unicode: "🇩🇰",
1192
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/DK.svg",
1193
+ label: "+45"
1194
+ },
1195
+ {
1196
+ country_label: "Dominica",
1197
+ code: "DM",
1198
+ unicode: "🇩🇲",
1199
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/DM.svg",
1200
+ label: "+1767"
1201
+ },
1202
+ {
1203
+ country_label: "Dominican Republic",
1204
+ code: "DO",
1205
+ unicode: "🇩🇴",
1206
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/DO.svg",
1207
+ label: "+1849"
1208
+ },
1209
+ {
1210
+ country_label: "Algeria",
1211
+ code: "DZ",
1212
+ unicode: "🇩🇿",
1213
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/DZ.svg",
1214
+ label: "+213"
1215
+ },
1216
+ {
1217
+ country_label: "Ecuador",
1218
+ code: "EC",
1219
+ unicode: "🇪🇨",
1220
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/EC.svg",
1221
+ label: "+593"
1222
+ },
1223
+ {
1224
+ country_label: "Estonia",
1225
+ code: "EE",
1226
+ unicode: "🇪🇪",
1227
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/EE.svg",
1228
+ label: "+372"
1229
+ },
1230
+ {
1231
+ country_label: "Egypt",
1232
+ code: "EG",
1233
+ unicode: "🇪🇬",
1234
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/EG.svg",
1235
+ label: "+20"
1236
+ },
1237
+ {
1238
+ country_label: "Eritrea",
1239
+ code: "ER",
1240
+ unicode: "🇪🇷",
1241
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/ER.svg",
1242
+ label: "+291"
1243
+ },
1244
+ {
1245
+ country_label: "Spain",
1246
+ code: "ES",
1247
+ unicode: "🇪🇸",
1248
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/ES.svg",
1249
+ label: "+34"
1250
+ },
1251
+ {
1252
+ country_label: "Ethiopia",
1253
+ code: "ET",
1254
+ unicode: "🇪🇹",
1255
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/ET.svg",
1256
+ label: "+251"
1257
+ },
1258
+ {
1259
+ country_label: "Finland",
1260
+ code: "FI",
1261
+ unicode: "🇫🇮",
1262
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/FI.svg",
1263
+ label: "+358"
1264
+ },
1265
+ {
1266
+ country_label: "Fiji",
1267
+ code: "FJ",
1268
+ unicode: "🇫🇯",
1269
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/FJ.svg",
1270
+ label: "+679"
1271
+ },
1272
+ {
1273
+ country_label: "Falkland Islands",
1274
+ code: "FK",
1275
+ unicode: "🇫🇰",
1276
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/FK.svg",
1277
+ label: "+500"
1278
+ },
1279
+ {
1280
+ country_label: "Micronesia",
1281
+ code: "FM",
1282
+ unicode: "🇫🇲",
1283
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/FM.svg",
1284
+ label: "+691"
1285
+ },
1286
+ {
1287
+ country_label: "Faroe Islands",
1288
+ code: "FO",
1289
+ unicode: "🇫🇴",
1290
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/FO.svg",
1291
+ label: "+298"
1292
+ },
1293
+ {
1294
+ country_label: "France",
1295
+ code: "FR",
1296
+ unicode: "🇫🇷",
1297
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/FR.svg",
1298
+ label: "+33"
1299
+ },
1300
+ {
1301
+ country_label: "Gabon",
1302
+ code: "GA",
1303
+ unicode: "🇬🇦",
1304
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GA.svg",
1305
+ label: "+241"
1306
+ },
1307
+ {
1308
+ country_label: "United Kingdom",
1309
+ code: "GB",
1310
+ unicode: "🇬🇧",
1311
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GB.svg",
1312
+ label: "+44"
1313
+ },
1314
+ {
1315
+ country_label: "Grenada",
1316
+ code: "GD",
1317
+ unicode: "🇬🇩",
1318
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GD.svg",
1319
+ label: "+1473"
1320
+ },
1321
+ {
1322
+ country_label: "Georgia",
1323
+ code: "GE",
1324
+ unicode: "🇬🇪",
1325
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GE.svg",
1326
+ label: "+995"
1327
+ },
1328
+ {
1329
+ country_label: "French Guiana",
1330
+ code: "GF",
1331
+ unicode: "🇬🇫",
1332
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GF.svg",
1333
+ label: "+594"
1334
+ },
1335
+ {
1336
+ country_label: "Guernsey",
1337
+ code: "GG",
1338
+ unicode: "🇬🇬",
1339
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GG.svg",
1340
+ label: "+44"
1341
+ },
1342
+ {
1343
+ country_label: "Ghana",
1344
+ code: "GH",
1345
+ unicode: "🇬🇭",
1346
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GH.svg",
1347
+ label: "+233"
1348
+ },
1349
+ {
1350
+ country_label: "Gibraltar",
1351
+ code: "GI",
1352
+ unicode: "🇬🇮",
1353
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GI.svg",
1354
+ label: "+350"
1355
+ },
1356
+ {
1357
+ country_label: "Greenland",
1358
+ code: "GL",
1359
+ unicode: "🇬🇱",
1360
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GL.svg",
1361
+ label: "+299"
1362
+ },
1363
+ {
1364
+ country_label: "Gambia",
1365
+ code: "GM",
1366
+ unicode: "🇬🇲",
1367
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GM.svg",
1368
+ label: "+220"
1369
+ },
1370
+ {
1371
+ country_label: "Guinea",
1372
+ code: "GN",
1373
+ unicode: "🇬🇳",
1374
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GN.svg",
1375
+ label: "+224"
1376
+ },
1377
+ {
1378
+ country_label: "Guadeloupe",
1379
+ code: "GP",
1380
+ unicode: "🇬🇵",
1381
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GP.svg",
1382
+ label: "+590"
1383
+ },
1384
+ {
1385
+ country_label: "Equatorial Guinea",
1386
+ code: "GQ",
1387
+ unicode: "🇬🇶",
1388
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GQ.svg",
1389
+ label: "+240"
1390
+ },
1391
+ {
1392
+ country_label: "Greece",
1393
+ code: "GR",
1394
+ unicode: "🇬🇷",
1395
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GR.svg",
1396
+ label: "+30"
1397
+ },
1398
+ {
1399
+ country_label: "South Georgia & South Sandwich Islands",
1400
+ code: "GS",
1401
+ unicode: "🇬🇸",
1402
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GS.svg",
1403
+ label: "+500"
1404
+ },
1405
+ {
1406
+ country_label: "Guatemala",
1407
+ code: "GT",
1408
+ unicode: "🇬🇹",
1409
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GT.svg",
1410
+ label: "+502"
1411
+ },
1412
+ {
1413
+ country_label: "Guam",
1414
+ code: "GU",
1415
+ unicode: "🇬🇺",
1416
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GU.svg",
1417
+ label: "+1671"
1418
+ },
1419
+ {
1420
+ country_label: "Guinea-Bissau",
1421
+ code: "GW",
1422
+ unicode: "🇬🇼",
1423
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GW.svg",
1424
+ label: "+245"
1425
+ },
1426
+ {
1427
+ country_label: "Guyana",
1428
+ code: "GY",
1429
+ unicode: "🇬🇾",
1430
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GY.svg",
1431
+ label: "+595"
1432
+ },
1433
+ {
1434
+ country_label: "Hong Kong SAR China",
1435
+ code: "HK",
1436
+ unicode: "🇭🇰",
1437
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/HK.svg",
1438
+ label: "+852"
1439
+ },
1440
+ {
1441
+ country_label: "Honduras",
1442
+ code: "HN",
1443
+ unicode: "🇭🇳",
1444
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/HN.svg",
1445
+ label: "+504"
1446
+ },
1447
+ {
1448
+ country_label: "Croatia",
1449
+ code: "HR",
1450
+ unicode: "🇭🇷",
1451
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/HR.svg",
1452
+ label: "+385"
1453
+ },
1454
+ {
1455
+ country_label: "Haiti",
1456
+ code: "HT",
1457
+ unicode: "🇭🇹",
1458
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/HT.svg",
1459
+ label: "+509"
1460
+ },
1461
+ {
1462
+ country_label: "Hungary",
1463
+ code: "HU",
1464
+ unicode: "🇭🇺",
1465
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/HU.svg",
1466
+ label: "+36"
1467
+ },
1468
+ {
1469
+ country_label: "Indonesia",
1470
+ code: "ID",
1471
+ unicode: "🇮🇩",
1472
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/ID.svg",
1473
+ label: "+62"
1474
+ },
1475
+ {
1476
+ country_label: "Ireland",
1477
+ code: "IE",
1478
+ unicode: "🇮🇪",
1479
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/IE.svg",
1480
+ label: "+353"
1481
+ },
1482
+ {
1483
+ country_label: "Israel",
1484
+ code: "IL",
1485
+ unicode: "🇮🇱",
1486
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/IL.svg",
1487
+ label: "+972"
1488
+ },
1489
+ {
1490
+ country_label: "Isle of Man",
1491
+ code: "IM",
1492
+ unicode: "🇮🇲",
1493
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/IM.svg",
1494
+ label: "+44"
1495
+ },
1496
+ {
1497
+ country_label: "India",
1498
+ code: "IN",
1499
+ unicode: "🇮🇳",
1500
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/IN.svg",
1501
+ label: "+91"
1502
+ },
1503
+ {
1504
+ country_label: "British Indian Ocean Territory",
1505
+ code: "IO",
1506
+ unicode: "🇮🇴",
1507
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/IO.svg",
1508
+ label: "+246"
1509
+ },
1510
+ {
1511
+ country_label: "Iraq",
1512
+ code: "IQ",
1513
+ unicode: "🇮🇶",
1514
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/IQ.svg",
1515
+ label: "+964"
1516
+ },
1517
+ {
1518
+ country_label: "Iran",
1519
+ code: "IR",
1520
+ unicode: "🇮🇷",
1521
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/IR.svg",
1522
+ label: "+98"
1523
+ },
1524
+ {
1525
+ country_label: "Iceland",
1526
+ code: "IS",
1527
+ unicode: "🇮🇸",
1528
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/IS.svg",
1529
+ label: "+354"
1530
+ },
1531
+ {
1532
+ country_label: "Italy",
1533
+ code: "IT",
1534
+ unicode: "🇮🇹",
1535
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/IT.svg",
1536
+ label: "+39"
1537
+ },
1538
+ {
1539
+ country_label: "Jersey",
1540
+ code: "JE",
1541
+ unicode: "🇯🇪",
1542
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/JE.svg",
1543
+ label: "+44"
1544
+ },
1545
+ {
1546
+ country_label: "Jamaica",
1547
+ code: "JM",
1548
+ unicode: "🇯🇲",
1549
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/JM.svg",
1550
+ label: "+1876"
1551
+ },
1552
+ {
1553
+ country_label: "Jordan",
1554
+ code: "JO",
1555
+ unicode: "🇯🇴",
1556
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/JO.svg",
1557
+ label: "+962"
1558
+ },
1559
+ {
1560
+ country_label: "Japan",
1561
+ code: "JP",
1562
+ unicode: "🇯🇵",
1563
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/JP.svg",
1564
+ label: "+81"
1565
+ },
1566
+ {
1567
+ country_label: "Kenya",
1568
+ code: "KE",
1569
+ unicode: "🇰🇪",
1570
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/KE.svg",
1571
+ label: "+254"
1572
+ },
1573
+ {
1574
+ country_label: "Kyrgyzstan",
1575
+ code: "KG",
1576
+ unicode: "🇰🇬",
1577
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/KG.svg",
1578
+ label: "+996"
1579
+ },
1580
+ {
1581
+ country_label: "Cambodia",
1582
+ code: "KH",
1583
+ unicode: "🇰🇭",
1584
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/KH.svg",
1585
+ label: "+855"
1586
+ },
1587
+ {
1588
+ country_label: "Kiribati",
1589
+ code: "KI",
1590
+ unicode: "🇰🇮",
1591
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/KI.svg",
1592
+ label: "+686"
1593
+ },
1594
+ {
1595
+ country_label: "Comoros",
1596
+ code: "KM",
1597
+ unicode: "🇰🇲",
1598
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/KM.svg",
1599
+ label: "+269"
1600
+ },
1601
+ {
1602
+ country_label: "St. Kitts & Nevis",
1603
+ code: "KN",
1604
+ unicode: "🇰🇳",
1605
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/KN.svg",
1606
+ label: "+1869"
1607
+ },
1608
+ {
1609
+ country_label: "North Korea",
1610
+ code: "KP",
1611
+ unicode: "🇰🇵",
1612
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/KP.svg",
1613
+ label: "+850"
1614
+ },
1615
+ {
1616
+ country_label: "South Korea",
1617
+ code: "KR",
1618
+ unicode: "🇰🇷",
1619
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/KR.svg",
1620
+ label: "+82"
1621
+ },
1622
+ {
1623
+ country_label: "Cayman Islands",
1624
+ code: "KY",
1625
+ unicode: "🇰🇾",
1626
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/KY.svg",
1627
+ label: "+ 345"
1628
+ },
1629
+ {
1630
+ country_label: "Kazakhstan",
1631
+ code: "KZ",
1632
+ unicode: "🇰🇿",
1633
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/KZ.svg",
1634
+ label: "+77"
1635
+ },
1636
+ {
1637
+ country_label: "Laos",
1638
+ code: "LA",
1639
+ unicode: "🇱🇦",
1640
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/LA.svg",
1641
+ label: "+856"
1642
+ },
1643
+ {
1644
+ country_label: "Lebanon",
1645
+ code: "LB",
1646
+ unicode: "🇱🇧",
1647
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/LB.svg",
1648
+ label: "+961"
1649
+ },
1650
+ {
1651
+ country_label: "St. Lucia",
1652
+ code: "LC",
1653
+ unicode: "🇱🇨",
1654
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/LC.svg",
1655
+ label: "+1758"
1656
+ },
1657
+ {
1658
+ country_label: "Liechtenstein",
1659
+ code: "LI",
1660
+ unicode: "🇱🇮",
1661
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/LI.svg",
1662
+ label: "+423"
1663
+ },
1664
+ {
1665
+ country_label: "Sri Lanka",
1666
+ code: "LK",
1667
+ unicode: "🇱🇰",
1668
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/LK.svg",
1669
+ label: "+94"
1670
+ },
1671
+ {
1672
+ country_label: "Liberia",
1673
+ code: "LR",
1674
+ unicode: "🇱🇷",
1675
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/LR.svg",
1676
+ label: "+231"
1677
+ },
1678
+ {
1679
+ country_label: "Lesotho",
1680
+ code: "LS",
1681
+ unicode: "🇱🇸",
1682
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/LS.svg",
1683
+ label: "+266"
1684
+ },
1685
+ {
1686
+ country_label: "Lithuania",
1687
+ code: "LT",
1688
+ unicode: "🇱🇹",
1689
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/LT.svg",
1690
+ label: "+370"
1691
+ },
1692
+ {
1693
+ country_label: "Luxembourg",
1694
+ code: "LU",
1695
+ unicode: "🇱🇺",
1696
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/LU.svg",
1697
+ label: "+352"
1698
+ },
1699
+ {
1700
+ country_label: "Latvia",
1701
+ code: "LV",
1702
+ unicode: "🇱🇻",
1703
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/LV.svg",
1704
+ label: "+371"
1705
+ },
1706
+ {
1707
+ country_label: "Libya",
1708
+ code: "LY",
1709
+ unicode: "🇱🇾",
1710
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/LY.svg",
1711
+ label: "+218"
1712
+ },
1713
+ {
1714
+ country_label: "Morocco",
1715
+ code: "MA",
1716
+ unicode: "🇲🇦",
1717
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MA.svg",
1718
+ label: "+212"
1719
+ },
1720
+ {
1721
+ country_label: "Monaco",
1722
+ code: "MC",
1723
+ unicode: "🇲🇨",
1724
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MC.svg",
1725
+ label: "+377"
1726
+ },
1727
+ {
1728
+ country_label: "Moldova",
1729
+ code: "MD",
1730
+ unicode: "🇲🇩",
1731
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MD.svg",
1732
+ label: "+373"
1733
+ },
1734
+ {
1735
+ country_label: "Montenegro",
1736
+ code: "ME",
1737
+ unicode: "🇲🇪",
1738
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/ME.svg",
1739
+ label: "+382"
1740
+ },
1741
+ {
1742
+ country_label: "St. Martin",
1743
+ code: "MF",
1744
+ unicode: "🇲🇫",
1745
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MF.svg",
1746
+ label: "+590"
1747
+ },
1748
+ {
1749
+ country_label: "Madagascar",
1750
+ code: "MG",
1751
+ unicode: "🇲🇬",
1752
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MG.svg",
1753
+ label: "+261"
1754
+ },
1755
+ {
1756
+ country_label: "Marshall Islands",
1757
+ code: "MH",
1758
+ unicode: "🇲🇭",
1759
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MH.svg",
1760
+ label: "+692"
1761
+ },
1762
+ {
1763
+ country_label: "North Macedonia",
1764
+ code: "MK",
1765
+ unicode: "🇲🇰",
1766
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MK.svg",
1767
+ label: "+389"
1768
+ },
1769
+ {
1770
+ country_label: "Mali",
1771
+ code: "ML",
1772
+ unicode: "🇲🇱",
1773
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/ML.svg",
1774
+ label: "+223"
1775
+ },
1776
+ {
1777
+ country_label: "Myanmar (Burma)",
1778
+ code: "MM",
1779
+ unicode: "🇲🇲",
1780
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MM.svg",
1781
+ label: "+95"
1782
+ },
1783
+ {
1784
+ country_label: "Mongolia",
1785
+ code: "MN",
1786
+ unicode: "🇲🇳",
1787
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MN.svg",
1788
+ label: "+976"
1789
+ },
1790
+ {
1791
+ country_label: "Macao SAR China",
1792
+ code: "MO",
1793
+ unicode: "🇲🇴",
1794
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MO.svg",
1795
+ label: "+853"
1796
+ },
1797
+ {
1798
+ country_label: "Northern Mariana Islands",
1799
+ code: "MP",
1800
+ unicode: "🇲🇵",
1801
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MP.svg",
1802
+ label: "+1670"
1803
+ },
1804
+ {
1805
+ country_label: "Martinique",
1806
+ code: "MQ",
1807
+ unicode: "🇲🇶",
1808
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MQ.svg",
1809
+ label: "+596"
1810
+ },
1811
+ {
1812
+ country_label: "Mauritania",
1813
+ code: "MR",
1814
+ unicode: "🇲🇷",
1815
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MR.svg",
1816
+ label: "+222"
1817
+ },
1818
+ {
1819
+ country_label: "Montserrat",
1820
+ code: "MS",
1821
+ unicode: "🇲🇸",
1822
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MS.svg",
1823
+ label: "+1664"
1824
+ },
1825
+ {
1826
+ country_label: "Malta",
1827
+ code: "MT",
1828
+ unicode: "🇲🇹",
1829
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MT.svg",
1830
+ label: "+356"
1831
+ },
1832
+ {
1833
+ country_label: "Mauritius",
1834
+ code: "MU",
1835
+ unicode: "🇲🇺",
1836
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MU.svg",
1837
+ label: "+230"
1838
+ },
1839
+ {
1840
+ country_label: "Maldives",
1841
+ code: "MV",
1842
+ unicode: "🇲🇻",
1843
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MV.svg",
1844
+ label: "+960"
1845
+ },
1846
+ {
1847
+ country_label: "Malawi",
1848
+ code: "MW",
1849
+ unicode: "🇲🇼",
1850
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MW.svg",
1851
+ label: "+265"
1852
+ },
1853
+ {
1854
+ country_label: "Mexico",
1855
+ code: "MX",
1856
+ unicode: "🇲🇽",
1857
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MX.svg",
1858
+ label: "+52"
1859
+ },
1860
+ {
1861
+ country_label: "Malaysia",
1862
+ code: "MY",
1863
+ unicode: "🇲🇾",
1864
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MY.svg",
1865
+ label: "+60"
1866
+ },
1867
+ {
1868
+ country_label: "Mozambique",
1869
+ code: "MZ",
1870
+ unicode: "🇲🇿",
1871
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MZ.svg",
1872
+ label: "+258"
1873
+ },
1874
+ {
1875
+ country_label: "Namibia",
1876
+ code: "NA",
1877
+ unicode: "🇳🇦",
1878
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/NA.svg",
1879
+ label: "+264"
1880
+ },
1881
+ {
1882
+ country_label: "New Caledonia",
1883
+ code: "NC",
1884
+ unicode: "🇳🇨",
1885
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/NC.svg",
1886
+ label: "+687"
1887
+ },
1888
+ {
1889
+ country_label: "Niger",
1890
+ code: "NE",
1891
+ unicode: "🇳🇪",
1892
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/NE.svg",
1893
+ label: "+227"
1894
+ },
1895
+ {
1896
+ country_label: "Norfolk Island",
1897
+ code: "NF",
1898
+ unicode: "🇳🇫",
1899
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/NF.svg",
1900
+ label: "+672"
1901
+ },
1902
+ {
1903
+ country_label: "Nigeria",
1904
+ code: "NG",
1905
+ unicode: "🇳🇬",
1906
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/NG.svg",
1907
+ label: "+234"
1908
+ },
1909
+ {
1910
+ country_label: "Nicaragua",
1911
+ code: "NI",
1912
+ unicode: "🇳🇮",
1913
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/NI.svg",
1914
+ label: "+505"
1915
+ },
1916
+ {
1917
+ country_label: "Netherlands",
1918
+ code: "NL",
1919
+ unicode: "🇳🇱",
1920
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/NL.svg",
1921
+ label: "+31"
1922
+ },
1923
+ {
1924
+ country_label: "Norway",
1925
+ code: "NO",
1926
+ unicode: "🇳🇴",
1927
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/NO.svg",
1928
+ label: "+47"
1929
+ },
1930
+ {
1931
+ country_label: "Nepal",
1932
+ code: "NP",
1933
+ unicode: "🇳🇵",
1934
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/NP.svg",
1935
+ label: "+977"
1936
+ },
1937
+ {
1938
+ country_label: "Nauru",
1939
+ code: "NR",
1940
+ unicode: "🇳🇷",
1941
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/NR.svg",
1942
+ label: "+674"
1943
+ },
1944
+ {
1945
+ country_label: "Niue",
1946
+ code: "NU",
1947
+ unicode: "🇳🇺",
1948
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/NU.svg",
1949
+ label: "+683"
1950
+ },
1951
+ {
1952
+ country_label: "New Zealand",
1953
+ code: "NZ",
1954
+ unicode: "🇳🇿",
1955
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/NZ.svg",
1956
+ label: "+64"
1957
+ },
1958
+ {
1959
+ country_label: "Panama",
1960
+ code: "PA",
1961
+ unicode: "🇵🇦",
1962
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/PA.svg",
1963
+ label: "+507"
1964
+ },
1965
+ {
1966
+ country_label: "Peru",
1967
+ code: "PE",
1968
+ unicode: "🇵🇪",
1969
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/PE.svg",
1970
+ label: "+51"
1971
+ },
1972
+ {
1973
+ country_label: "French Polynesia",
1974
+ code: "PF",
1975
+ unicode: "🇵🇫",
1976
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/PF.svg",
1977
+ label: "+689"
1978
+ },
1979
+ {
1980
+ country_label: "Papua New Guinea",
1981
+ code: "PG",
1982
+ unicode: "🇵🇬",
1983
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/PG.svg",
1984
+ label: "+675"
1985
+ },
1986
+ {
1987
+ country_label: "Philippines",
1988
+ code: "PH",
1989
+ unicode: "🇵🇭",
1990
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/PH.svg",
1991
+ label: "+63"
1992
+ },
1993
+ {
1994
+ country_label: "Pakistan",
1995
+ code: "PK",
1996
+ unicode: "🇵🇰",
1997
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/PK.svg",
1998
+ label: "+92"
1999
+ },
2000
+ {
2001
+ country_label: "Poland",
2002
+ code: "PL",
2003
+ unicode: "🇵🇱",
2004
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/PL.svg",
2005
+ label: "+48"
2006
+ },
2007
+ {
2008
+ country_label: "St. Pierre & Miquelon",
2009
+ code: "PM",
2010
+ unicode: "🇵🇲",
2011
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/PM.svg",
2012
+ label: "+508"
2013
+ },
2014
+ {
2015
+ country_label: "Pitcairn Islands",
2016
+ code: "PN",
2017
+ unicode: "🇵🇳",
2018
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/PN.svg",
2019
+ label: "+872"
2020
+ },
2021
+ {
2022
+ country_label: "Puerto Rico",
2023
+ code: "PR",
2024
+ unicode: "🇵🇷",
2025
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/PR.svg",
2026
+ label: "+1939"
2027
+ },
2028
+ {
2029
+ country_label: "Palestinian Territories",
2030
+ code: "PS",
2031
+ unicode: "🇵🇸",
2032
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/PS.svg",
2033
+ label: "+970"
2034
+ },
2035
+ {
2036
+ country_label: "Portugal",
2037
+ code: "PT",
2038
+ unicode: "🇵🇹",
2039
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/PT.svg",
2040
+ label: "+351"
2041
+ },
2042
+ {
2043
+ country_label: "Palau",
2044
+ code: "PW",
2045
+ unicode: "🇵🇼",
2046
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/PW.svg",
2047
+ label: "+680"
2048
+ },
2049
+ {
2050
+ country_label: "Paraguay",
2051
+ code: "PY",
2052
+ unicode: "🇵🇾",
2053
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/PY.svg",
2054
+ label: "+595"
2055
+ },
2056
+ {
2057
+ country_label: "R\xE9union",
2058
+ code: "RE",
2059
+ unicode: "🇷🇪",
2060
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/RE.svg",
2061
+ label: "+262"
2062
+ },
2063
+ {
2064
+ country_label: "Romania",
2065
+ code: "RO",
2066
+ unicode: "🇷🇴",
2067
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/RO.svg",
2068
+ label: "+40"
2069
+ },
2070
+ {
2071
+ country_label: "Serbia",
2072
+ code: "RS",
2073
+ unicode: "🇷🇸",
2074
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/RS.svg",
2075
+ label: "+381"
2076
+ },
2077
+ {
2078
+ country_label: "Russia",
2079
+ code: "RU",
2080
+ unicode: "🇷🇺",
2081
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/RU.svg",
2082
+ label: "+7"
2083
+ },
2084
+ {
2085
+ country_label: "Rwanda",
2086
+ code: "RW",
2087
+ unicode: "🇷🇼",
2088
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/RW.svg",
2089
+ label: "+250"
2090
+ },
2091
+ {
2092
+ country_label: "Solomon Islands",
2093
+ code: "SB",
2094
+ unicode: "🇸🇧",
2095
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SB.svg",
2096
+ label: "+677"
2097
+ },
2098
+ {
2099
+ country_label: "Seychelles",
2100
+ code: "SC",
2101
+ unicode: "🇸🇨",
2102
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SC.svg",
2103
+ label: "+248"
2104
+ },
2105
+ {
2106
+ country_label: "Sudan",
2107
+ code: "SD",
2108
+ unicode: "🇸🇩",
2109
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SD.svg",
2110
+ label: "+249"
2111
+ },
2112
+ {
2113
+ country_label: "Sweden",
2114
+ code: "SE",
2115
+ unicode: "🇸🇪",
2116
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SE.svg",
2117
+ label: "+46"
2118
+ },
2119
+ {
2120
+ country_label: "Singapore",
2121
+ code: "SG",
2122
+ unicode: "🇸🇬",
2123
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SG.svg",
2124
+ label: "+65"
2125
+ },
2126
+ {
2127
+ country_label: "St. Helena",
2128
+ code: "SH",
2129
+ unicode: "🇸🇭",
2130
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SH.svg",
2131
+ label: "+290"
2132
+ },
2133
+ {
2134
+ country_label: "Slovenia",
2135
+ code: "SI",
2136
+ unicode: "🇸🇮",
2137
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SI.svg",
2138
+ label: "+386"
2139
+ },
2140
+ {
2141
+ country_label: "Svalbard & Jan Mayen",
2142
+ code: "SJ",
2143
+ unicode: "🇸🇯",
2144
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SJ.svg",
2145
+ label: "+47"
2146
+ },
2147
+ {
2148
+ country_label: "Slovakia",
2149
+ code: "SK",
2150
+ unicode: "🇸🇰",
2151
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SK.svg",
2152
+ label: "+421"
2153
+ },
2154
+ {
2155
+ country_label: "Sierra Leone",
2156
+ code: "SL",
2157
+ unicode: "🇸🇱",
2158
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SL.svg",
2159
+ label: "+232"
2160
+ },
2161
+ {
2162
+ country_label: "San Marino",
2163
+ code: "SM",
2164
+ unicode: "🇸🇲",
2165
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SM.svg",
2166
+ label: "+378"
2167
+ },
2168
+ {
2169
+ country_label: "Senegal",
2170
+ code: "SN",
2171
+ unicode: "🇸🇳",
2172
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SN.svg",
2173
+ label: "+221"
2174
+ },
2175
+ {
2176
+ country_label: "Somalia",
2177
+ code: "SO",
2178
+ unicode: "🇸🇴",
2179
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SO.svg",
2180
+ label: "+252"
2181
+ },
2182
+ {
2183
+ country_label: "Suriname",
2184
+ code: "SR",
2185
+ unicode: "🇸🇷",
2186
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SR.svg",
2187
+ label: "+597"
2188
+ },
2189
+ {
2190
+ country_label: "South Sudan",
2191
+ code: "SS",
2192
+ unicode: "🇸🇸",
2193
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SS.svg",
2194
+ label: "+211"
2195
+ },
2196
+ {
2197
+ country_label: "S\xE3o Tom\xE9 & Pr\xEDncipe",
2198
+ code: "ST",
2199
+ unicode: "🇸🇹",
2200
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/ST.svg",
2201
+ label: "+239"
2202
+ },
2203
+ {
2204
+ country_label: "El Salvador",
2205
+ code: "SV",
2206
+ unicode: "🇸🇻",
2207
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SV.svg",
2208
+ label: "+503"
2209
+ },
2210
+ {
2211
+ country_label: "Syria",
2212
+ code: "SY",
2213
+ unicode: "🇸🇾",
2214
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SY.svg",
2215
+ label: "+963"
2216
+ },
2217
+ {
2218
+ country_label: "Eswatini",
2219
+ code: "SZ",
2220
+ unicode: "🇸🇿",
2221
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SZ.svg",
2222
+ label: "+268"
2223
+ },
2224
+ {
2225
+ country_label: "Turks & Caicos Islands",
2226
+ code: "TC",
2227
+ unicode: "🇹🇨",
2228
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/TC.svg",
2229
+ label: "+1649"
2230
+ },
2231
+ {
2232
+ country_label: "Chad",
2233
+ code: "TD",
2234
+ unicode: "🇹🇩",
2235
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/TD.svg",
2236
+ label: "+235"
2237
+ },
2238
+ {
2239
+ country_label: "Togo",
2240
+ code: "TG",
2241
+ unicode: "🇹🇬",
2242
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/TG.svg",
2243
+ label: "+228"
2244
+ },
2245
+ {
2246
+ country_label: "Thailand",
2247
+ code: "TH",
2248
+ unicode: "🇹🇭",
2249
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/TH.svg",
2250
+ label: "+66"
2251
+ },
2252
+ {
2253
+ country_label: "Tajikistan",
2254
+ code: "TJ",
2255
+ unicode: "🇹🇯",
2256
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/TJ.svg",
2257
+ label: "+992"
2258
+ },
2259
+ {
2260
+ country_label: "Tokelau",
2261
+ code: "TK",
2262
+ unicode: "🇹🇰",
2263
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/TK.svg",
2264
+ label: "+690"
2265
+ },
2266
+ {
2267
+ country_label: "Timor-Leste",
2268
+ code: "TL",
2269
+ unicode: "🇹🇱",
2270
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/TL.svg",
2271
+ label: "+670"
2272
+ },
2273
+ {
2274
+ country_label: "Turkmenistan",
2275
+ code: "TM",
2276
+ unicode: "🇹🇲",
2277
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/TM.svg",
2278
+ label: "+993"
2279
+ },
2280
+ {
2281
+ country_label: "Tunisia",
2282
+ code: "TN",
2283
+ unicode: "🇹🇳",
2284
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/TN.svg",
2285
+ label: "+216"
2286
+ },
2287
+ {
2288
+ country_label: "Tonga",
2289
+ code: "TO",
2290
+ unicode: "🇹🇴",
2291
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/TO.svg",
2292
+ label: "+676"
2293
+ },
2294
+ {
2295
+ country_label: "Turkey",
2296
+ code: "TR",
2297
+ unicode: "🇹🇷",
2298
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/TR.svg",
2299
+ label: "+90"
2300
+ },
2301
+ {
2302
+ country_label: "Trinidad & Tobago",
2303
+ code: "TT",
2304
+ unicode: "🇹🇹",
2305
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/TT.svg",
2306
+ label: "+1868"
2307
+ },
2308
+ {
2309
+ country_label: "Tuvalu",
2310
+ code: "TV",
2311
+ unicode: "🇹🇻",
2312
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/TV.svg",
2313
+ label: "+688"
2314
+ },
2315
+ {
2316
+ country_label: "Taiwan",
2317
+ code: "TW",
2318
+ unicode: "🇹🇼",
2319
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/TW.svg",
2320
+ label: "+886"
2321
+ },
2322
+ {
2323
+ country_label: "Tanzania",
2324
+ code: "TZ",
2325
+ unicode: "🇹🇿",
2326
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/TZ.svg",
2327
+ label: "+255"
2328
+ },
2329
+ {
2330
+ country_label: "Ukraine",
2331
+ code: "UA",
2332
+ unicode: "🇺🇦",
2333
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/UA.svg",
2334
+ label: "+380"
2335
+ },
2336
+ {
2337
+ country_label: "Uganda",
2338
+ code: "UG",
2339
+ unicode: "🇺🇬",
2340
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/UG.svg",
2341
+ label: "+256"
2342
+ },
2343
+ {
2344
+ country_label: "United States",
2345
+ code: "US",
2346
+ unicode: "🇺🇸",
2347
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/US.svg",
2348
+ label: "+1"
2349
+ },
2350
+ {
2351
+ country_label: "Uruguay",
2352
+ code: "UY",
2353
+ unicode: "🇺🇾",
2354
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/UY.svg",
2355
+ label: "+598"
2356
+ },
2357
+ {
2358
+ country_label: "Uzbekistan",
2359
+ code: "UZ",
2360
+ unicode: "🇺🇿",
2361
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/UZ.svg",
2362
+ label: "+998"
2363
+ },
2364
+ {
2365
+ country_label: "Vatican City",
2366
+ code: "VA",
2367
+ unicode: "🇻🇦",
2368
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/VA.svg",
2369
+ label: "+379"
2370
+ },
2371
+ {
2372
+ country_label: "St. Vincent & Grenadines",
2373
+ code: "VC",
2374
+ unicode: "🇻🇨",
2375
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/VC.svg",
2376
+ label: "+1784"
2377
+ },
2378
+ {
2379
+ country_label: "Venezuela",
2380
+ code: "VE",
2381
+ unicode: "🇻🇪",
2382
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/VE.svg",
2383
+ label: "+58"
2384
+ },
2385
+ {
2386
+ country_label: "British Virgin Islands",
2387
+ code: "VG",
2388
+ unicode: "🇻🇬",
2389
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/VG.svg",
2390
+ label: "+1284"
2391
+ },
2392
+ {
2393
+ country_label: "U.S. Virgin Islands",
2394
+ code: "VI",
2395
+ unicode: "🇻🇮",
2396
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/VI.svg",
2397
+ label: "+1340"
2398
+ },
2399
+ {
2400
+ country_label: "Vietnam",
2401
+ code: "VN",
2402
+ unicode: "🇻🇳",
2403
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/VN.svg",
2404
+ label: "+84"
2405
+ },
2406
+ {
2407
+ country_label: "Vanuatu",
2408
+ code: "VU",
2409
+ unicode: "🇻🇺",
2410
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/VU.svg",
2411
+ label: "+678"
2412
+ },
2413
+ {
2414
+ country_label: "Wallis & Futuna",
2415
+ code: "WF",
2416
+ unicode: "🇼🇫",
2417
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/WF.svg",
2418
+ label: "+681"
2419
+ },
2420
+ {
2421
+ country_label: "Samoa",
2422
+ code: "WS",
2423
+ unicode: "🇼🇸",
2424
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/WS.svg",
2425
+ label: "+685"
2426
+ },
2427
+ {
2428
+ country_label: "Yemen",
2429
+ code: "YE",
2430
+ unicode: "🇾🇪",
2431
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/YE.svg",
2432
+ label: "+967"
2433
+ },
2434
+ {
2435
+ country_label: "Mayotte",
2436
+ code: "YT",
2437
+ unicode: "🇾🇹",
2438
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/YT.svg",
2439
+ label: "+262"
2440
+ },
2441
+ {
2442
+ country_label: "South Africa",
2443
+ code: "ZA",
2444
+ unicode: "🇿🇦",
2445
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/ZA.svg",
2446
+ label: "+27"
2447
+ },
2448
+ {
2449
+ country_label: "Zambia",
2450
+ code: "ZM",
2451
+ unicode: "🇿🇲",
2452
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/ZM.svg",
2453
+ label: "+260"
2454
+ },
2455
+ {
2456
+ country_label: "Zimbabwe",
2457
+ code: "ZW",
2458
+ unicode: "🇿🇼",
2459
+ image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/ZW.svg",
2460
+ label: "+263"
2461
+ }
2462
+ ];
2463
+ var countries_default = countries;
2464
+
2465
+ // components/elements/select/Select.tsx
2466
+ var import_react6 = __toESM(require("react"));
2467
+ var import_react_select = __toESM(require("react-select"));
2468
+ var import_creatable = __toESM(require("react-select/creatable"));
2469
+ var import_clsx2 = __toESM(require("clsx"));
2470
+ var Select = ({
2471
+ labelProps,
2472
+ labelKey = "label",
2473
+ ...props
2474
+ }) => {
2475
+ const NoOption = () => {
2476
+ var _a, _b;
2477
+ return /* @__PURE__ */ import_react6.default.createElement("div", null, (_b = (_a = props.texts) == null ? void 0 : _a.noOptions) != null ? _b : "No Items Found");
2478
+ };
2479
+ const Control = ({ children, innerProps, innerRef }) => {
2480
+ return /* @__PURE__ */ import_react6.default.createElement(
2481
+ "div",
2482
+ {
2483
+ ref: innerRef,
2484
+ className: (0, import_clsx2.default)(
2485
+ "hawa-flex hawa-w-full hawa-rounded hawa-border hawa-bg-background hawa-p-2 hawa-text-sm hawa-text-gray-900 focus:hawa-border-blue-500 focus:hawa-ring-blue-500 dark:focus:hawa-ring-blue-500"
2486
+ ),
2487
+ ...innerProps
2488
+ },
2489
+ children
2490
+ );
2491
+ };
2492
+ const Option = ({ children, innerProps, innerRef }) => {
2493
+ return /* @__PURE__ */ import_react6.default.createElement(
2494
+ "div",
2495
+ {
2496
+ ref: innerRef,
2497
+ className: cn(
2498
+ "hawa-flex hawa-cursor-pointer hawa-select-none hawa-flex-row hawa-items-center hawa-justify-between hawa-rounded-inner hawa-p-1 hawa-px-2 hawa-transition-all hover:hawa-bg-primary hover:hawa-text-primary-foreground"
2499
+ ),
2500
+ ...innerProps
2501
+ },
2502
+ children
2503
+ );
2504
+ };
2505
+ const Menu = ({
2506
+ cx,
2507
+ children,
2508
+ getStyles,
2509
+ innerProps,
2510
+ innerRef,
2511
+ ...menuProps
2512
+ }) => {
2513
+ const menuOpen = menuProps.selectProps.menuIsOpen;
2514
+ return /* @__PURE__ */ import_react6.default.createElement(
2515
+ "div",
2516
+ {
2517
+ className: cn(
2518
+ "dark:dark-shadow hawa-absolute hawa-z-10 -hawa-mx-1 hawa-mt-1 hawa-flex hawa-flex-col hawa-justify-start hawa-rounded hawa-border hawa-bg-background hawa-shadow-md",
2519
+ props.phoneCode ? "hawa-p-1.5" : "hawa-w-full hawa-p-1.5",
2520
+ menuOpen && "hawa-animate-in hawa-fade-in-0 hawa-zoom-in-95 "
2521
+ ),
2522
+ ref: innerRef,
2523
+ ...innerProps
2524
+ },
2525
+ children
2526
+ );
2527
+ };
2528
+ return /* @__PURE__ */ import_react6.default.createElement(
2529
+ "div",
2530
+ {
2531
+ className: cn(
2532
+ "hawa-flex hawa-flex-col hawa-gap-2",
2533
+ props.width === "fit" ? "hawa-w-fit" : "hawa-w-full"
2534
+ )
2535
+ },
2536
+ props.label && /* @__PURE__ */ import_react6.default.createElement(Label, { ...labelProps }, props.label),
2537
+ props.isLoading ? /* @__PURE__ */ import_react6.default.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" }) : !props.isCreatable ? (
2538
+ // TODO: enable keyboard to go to the next item in the list
2539
+ /* @__PURE__ */ import_react6.default.createElement(
2540
+ import_react_select.default,
2541
+ {
2542
+ noOptionsMessage: NoOption,
2543
+ classNames: {
2544
+ control: () => cn(
2545
+ props.phoneCode && "hawa-rounded-r-none",
2546
+ props.controlClassNames
2547
+ ),
2548
+ container: () => cn(
2549
+ "hawa-rounded",
2550
+ props.phoneCode && "hawa-w-fit hawa-min-w-[65px] hawa-text-right hawa-w-[100px] hawa-p-0 hawa-rounded-r-none hawa-h-[40px] ",
2551
+ "hawa-block hawa-w-full hawa-rounded hawa-border hawa-transition-all hawa-bg-background hawa-p-0 hawa-px-1 hawa-text-sm",
2552
+ props.disabled ? "hawa-cursor-not-allowed" : "hawa-cursor-pointer"
2553
+ ),
2554
+ placeholder: () => "hawa-text-muted-foreground hawa-cursor-pointer hawa-px-1",
2555
+ valueContainer: () => "hawa-text-foreground hawa-px-1 ",
2556
+ singleValue: () => "hawa-text-foreground",
2557
+ indicatorsContainer: () => cn(
2558
+ "hawa-cursor-pointer hawa-text-muted-foreground",
2559
+ props.hideIndicator ? "hawa-invisible" : "hawa-px-1"
2560
+ )
2561
+ },
2562
+ unstyled: true,
2563
+ autoFocus: true,
2564
+ components: props.hideIndicator ? { Option, Menu, IndicatorsContainer: () => null } : { Option, Menu },
2565
+ onChange: (newValue, action) => props.onChange(newValue, action),
2566
+ options: props.options,
2567
+ getOptionLabel: props.getOptionLabel,
2568
+ defaultValue: props.defaultValue,
2569
+ placeholder: props.placeholder,
2570
+ isDisabled: props.disabled,
2571
+ isClearable: props.isClearable,
2572
+ isMulti: props.isMulti,
2573
+ isSearchable: props.isSearchable
2574
+ }
2575
+ )
2576
+ ) : /* @__PURE__ */ import_react6.default.createElement(
2577
+ import_creatable.default,
2578
+ {
2579
+ formatCreateLabel: (inputValue) => {
2580
+ var _a, _b;
2581
+ return `${(_b = (_a = props.texts) == null ? void 0 : _a.createLabel) != null ? _b : "Create"} "${inputValue}"`;
2582
+ },
2583
+ classNames: {
2584
+ container: () => cn(
2585
+ "hawa-rounded",
2586
+ props.disabled ? "hawa-cursor-not-allowed" : "hawa-cursor-pointer"
2587
+ ),
2588
+ placeholder: () => "hawa-px-2 hawa-text-muted-foreground",
2589
+ input: () => "hawa-text-primary hawa-px-2",
2590
+ valueContainer: () => "hawa-text-white dark:hawa-text-muted-foreground",
2591
+ singleValue: () => "hawa-text-black dark:hawa-text-white hawa-px-2",
2592
+ indicatorsContainer: () => " hawa-px-2 hawa-cursor-pointer hawa-text-muted-foreground"
2593
+ },
2594
+ unstyled: true,
2595
+ options: props.options,
2596
+ isClearable: props.isClearable,
2597
+ isMulti: props.isMulti,
2598
+ isSearchable: props.isSearchable,
2599
+ placeholder: props.placeholder,
2600
+ onCreateOption: props.handleCreateOption,
2601
+ onChange: (newValue, action) => props.onChange(newValue, action),
2602
+ components: { Control, Option, Menu },
2603
+ onInputChange: (newValue, action) => props.onInputChange(newValue, action)
2604
+ }
2605
+ ),
2606
+ !props.hideHelperText && /* @__PURE__ */ import_react6.default.createElement(
2607
+ "p",
2608
+ {
2609
+ className: cn(
2610
+ "hawa-my-0 hawa-text-start hawa-text-xs hawa-text-helper-color hawa-transition-all",
2611
+ props.helperText ? "hawa-h-4 hawa-opacity-100" : "hawa-h-0 hawa-opacity-0"
2612
+ )
2613
+ },
2614
+ props.helperText
2615
+ )
2616
+ );
2617
+ };
2618
+
2619
+ // components/elements/phoneInput/PhoneInput.tsx
2620
+ var PhoneInput = ({ labelProps, ...props }) => {
2621
+ const [phoneNumber, setPhoneNumber] = (0, import_react7.useState)("");
2622
+ const [countryCode, setCountryCode] = (0, import_react7.useState)(props.preferredCountry);
2623
+ const inputRef = (0, import_react7.useRef)(null);
2624
+ (0, import_react7.useEffect)(() => {
2625
+ var _a;
2626
+ if (inputRef.current) {
2627
+ (_a = inputRef.current) == null ? void 0 : _a.focus();
2628
+ }
2629
+ }, []);
2630
+ const handleInputChange = (e) => {
2631
+ const validChars = /^[0-9-()]+$/;
2632
+ const input = e.target.value;
2633
+ if (input === "" || validChars.test(input)) {
2634
+ setPhoneNumber(input);
2635
+ }
2636
+ if (props.handleChange) {
2637
+ props.handleChange(`${countryCode == null ? void 0 : countryCode.label}-${e.target.value}`);
2638
+ } else {
2639
+ console.log("handleChange prop was not provided in <PhoneInput/>");
2640
+ }
2641
+ };
2642
+ return /* @__PURE__ */ import_react7.default.createElement("div", { className: "hawa-flex hawa-h-fit hawa-w-full hawa-flex-col hawa-gap-2" }, props.label && /* @__PURE__ */ import_react7.default.createElement(Label, { ...labelProps }, props.label), /* @__PURE__ */ import_react7.default.createElement("div", { dir: "ltr", className: "hawa-flex hawa-w-full hawa-flex-row" }, /* @__PURE__ */ import_react7.default.createElement(
2643
+ Select,
2644
+ {
2645
+ width: "fit",
2646
+ hideHelperText: true,
2647
+ phoneCode: true,
2648
+ hideIndicator: true,
2649
+ placeholder: "Code",
2650
+ options: countries_default,
2651
+ isMulti: false,
2652
+ isSearchable: true,
2653
+ isClearable: false,
2654
+ defaultValue: props.preferredCountry,
2655
+ value: countryCode == null ? void 0 : countryCode.label,
2656
+ onChange: setCountryCode
2657
+ }
2658
+ ), /* @__PURE__ */ import_react7.default.createElement("div", { className: "hawa-relative hawa-flex hawa-h-fit hawa-w-full hawa-flex-col hawa-justify-center hawa-gap-0" }, /* @__PURE__ */ import_react7.default.createElement(
2659
+ "input",
2660
+ {
2661
+ ref: inputRef,
2662
+ id: "phone-number",
2663
+ className: cn(
2664
+ "hawa-block hawa-h-[40px] hawa-w-full hawa-rounded hawa-rounded-l-none hawa-border hawa-border-l-0 hawa-border-l-transparent hawa-bg-background hawa-p-2 hawa-text-sm hawa-transition-all"
2665
+ ),
2666
+ onChange: handleInputChange,
2667
+ value: phoneNumber,
2668
+ type: "tel",
2669
+ placeholder: "531045453"
2670
+ }
2671
+ ))), /* @__PURE__ */ import_react7.default.createElement(
2672
+ "p",
2673
+ {
2674
+ className: cn(
2675
+ "hawa-my-0 hawa-text-start hawa-text-xs hawa-text-helper-color hawa-transition-all",
2676
+ props.helperText ? "hawa-h-4 hawa-opacity-100" : "hawa-h-0 hawa-opacity-0"
2677
+ )
2678
+ },
2679
+ props.helperText
2680
+ ));
2681
+ };
2682
+
2683
+ // components/icons/Emojis.tsx
2684
+ var import_react8 = __toESM(require("react"));
2685
+
2686
+ // components/icons/InputIcons.tsx
2687
+ var import_react9 = __toESM(require("react"));
2688
+ var EyeIcon = (props) => /* @__PURE__ */ import_react9.default.createElement("div", { className: cn("hawa-h-5 hawa-w-5", props.className) }, /* @__PURE__ */ import_react9.default.createElement(
2689
+ "svg",
2690
+ {
2691
+ xmlns: "http://www.w3.org/2000/svg",
2692
+ viewBox: "0 0 24 24",
2693
+ fill: "none",
2694
+ stroke: "currentColor",
2695
+ strokeWidth: "2",
2696
+ strokeLinecap: "round",
2697
+ strokeLinejoin: "round"
2698
+ },
2699
+ /* @__PURE__ */ import_react9.default.createElement("path", { d: "M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z" }),
2700
+ /* @__PURE__ */ import_react9.default.createElement("circle", { cx: "12", cy: "12", r: "3" })
2701
+ ));
2702
+ var HiddenEyeIcon = (props) => /* @__PURE__ */ import_react9.default.createElement("div", { className: cn("hawa-h-5 hawa-w-5", props.className) }, /* @__PURE__ */ import_react9.default.createElement(
2703
+ "svg",
2704
+ {
2705
+ xmlns: "http://www.w3.org/2000/svg",
2706
+ viewBox: "0 0 24 24",
2707
+ fill: "none",
2708
+ stroke: "currentColor",
2709
+ strokeWidth: "2",
2710
+ strokeLinecap: "round",
2711
+ strokeLinejoin: "round"
2712
+ },
2713
+ /* @__PURE__ */ import_react9.default.createElement("path", { d: "M9.88 9.88a3 3 0 1 0 4.24 4.24" }),
2714
+ /* @__PURE__ */ import_react9.default.createElement("path", { d: "M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68" }),
2715
+ /* @__PURE__ */ import_react9.default.createElement("path", { d: "M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61" }),
2716
+ /* @__PURE__ */ import_react9.default.createElement("line", { x1: "2", x2: "22", y1: "2", y2: "22" })
2717
+ ));
2718
+
2719
+ // components/icons/CommonIcons.tsx
2720
+ var import_react10 = __toESM(require("react"));
2721
+
2722
+ // components/blocks/auth/AuthButtons.tsx
2723
+ var import_react12 = __toESM(require("react"));
2724
+
2725
+ // components/elements/logos/Logos.tsx
2726
+ var import_react11 = __toESM(require("react"));
2727
+ var Logos = {
2728
+ hawa: (props) => /* @__PURE__ */ import_react11.default.createElement(
2729
+ "svg",
2730
+ {
2731
+ xmlns: "http://www.w3.org/2000/svg",
2732
+ xmlSpace: "preserve",
2733
+ viewBox: "0 0 765 765",
2734
+ ...props
2735
+ },
2736
+ /* @__PURE__ */ import_react11.default.createElement(
2737
+ "path",
2738
+ {
2739
+ d: "M382.5 0C171.6 0 0 171.6 0 382.5V765h382.5C593.4 765 765 593.4 765 382.5S593.4 0 382.5 0zM281.6 305.7c98 0 177.7 79.7 177.7 177.7 0 98-79.7 177.7-177.7 177.7s-177.7-79.7-177.7-177.7c0-98 79.7-177.7 177.7-177.7zm246 314.5c23.2-41.6 35.6-88.7 35.6-136.7 0-155.3-126.3-281.6-281.6-281.6-48 0-95.1 12.4-136.8 35.6C194.9 156 285 104 382.5 104c153.6 0 278.6 125 278.6 278.6 0 97.3-52 187.5-133.5 237.6z",
2740
+ fill: "currentColor"
2741
+ }
2742
+ )
2743
+ ),
2744
+ sikka: (props) => /* @__PURE__ */ import_react11.default.createElement(
2745
+ "svg",
2746
+ {
2747
+ xmlns: "http://www.w3.org/2000/svg",
2748
+ xmlnsXlink: "http://www.w3.org/1999/xlink",
2749
+ xmlSpace: "preserve",
2750
+ viewBox: "0 0 916.5 765",
2751
+ fill: "currentColor",
2752
+ ...props
2753
+ },
2754
+ /* @__PURE__ */ import_react11.default.createElement("defs", null, /* @__PURE__ */ import_react11.default.createElement("path", { id: "a", d: "M0 0h916.5v765H0z" })),
2755
+ /* @__PURE__ */ import_react11.default.createElement("clipPath", { id: "b" }, /* @__PURE__ */ import_react11.default.createElement("use", { xlinkHref: "#a", overflow: "visible" })),
2756
+ /* @__PURE__ */ import_react11.default.createElement("g", { clipPath: "url(#b)" }, /* @__PURE__ */ import_react11.default.createElement("defs", null, /* @__PURE__ */ import_react11.default.createElement("path", { id: "c", d: "M0 0h916.5v765H0z" })), /* @__PURE__ */ import_react11.default.createElement("clipPath", { id: "d" }, /* @__PURE__ */ import_react11.default.createElement("use", { xlinkHref: "#c", overflow: "visible" })), /* @__PURE__ */ import_react11.default.createElement("g", { clipPath: "url(#d)" }, /* @__PURE__ */ import_react11.default.createElement("path", { d: "M458.3 0h-31.9c-14.6 0-26.5 11.9-26.5 26.3v313.3L136.6 17.1C126 3.9 120.7 0 106.1 0H9.7C.5 0 0 7.9 0 17.1 0 21 1.3 26.3 4 29l288.7 353.6L4 736.1c-2.7 2.7-4 7.9-4 11.8 0 9.2.4 17.1 9.7 17.1h96.4c14.6 0 19.9-3.9 30.5-17.1l263.3-322.5v313.3c0 14.4 11.9 26.3 26.5 26.3h31.9M458.3 765h31.9c14.6 0 26.5-11.8 26.5-26.3V425.5L780 748c10.7 13.2 15.9 17.1 30.5 17.1h96.4c9.2 0 9.7-7.9 9.7-17.1 0-3.9-1.3-9.2-4-11.8L623.8 382.5 912.5 28.9c2.7-2.7 4-7.9 4-11.9 0-9.2-.5-17.1-9.7-17.1h-96.4c-14.6 0-19.9 3.9-30.5 17.1L516.7 339.5V26.3c0-14.4-11.9-26.3-26.5-26.3h-31.9" })))
2757
+ ),
2758
+ mail: (props) => /* @__PURE__ */ import_react11.default.createElement(
2759
+ "svg",
2760
+ {
2761
+ stroke: "currentColor",
2762
+ fill: "none",
2763
+ strokeWidth: "2",
2764
+ viewBox: "0 0 24 24",
2765
+ strokeLinecap: "round",
2766
+ strokeLinejoin: "round",
2767
+ xmlns: "http://www.w3.org/2000/svg",
2768
+ ...props
2769
+ },
2770
+ /* @__PURE__ */ import_react11.default.createElement("path", { d: "M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z" }),
2771
+ /* @__PURE__ */ import_react11.default.createElement("polyline", { points: "22,6 12,13 2,6" })
2772
+ ),
2773
+ phone: (props) => /* @__PURE__ */ import_react11.default.createElement(
2774
+ "svg",
2775
+ {
2776
+ stroke: "currentColor",
2777
+ fill: "none",
2778
+ strokeWidth: "2",
2779
+ viewBox: "0 0 24 24",
2780
+ "aria-hidden": "true",
2781
+ xmlns: "http://www.w3.org/2000/svg",
2782
+ ...props
2783
+ },
2784
+ /* @__PURE__ */ import_react11.default.createElement(
2785
+ "path",
2786
+ {
2787
+ strokeLinecap: "round",
2788
+ strokeLinejoin: "round",
2789
+ d: "M10.5 1.5H8.25A2.25 2.25 0 006 3.75v16.5a2.25 2.25 0 002.25 2.25h7.5A2.25 2.25 0 0018 20.25V3.75a2.25 2.25 0 00-2.25-2.25H13.5m-3 0V3h3V1.5m-3 0h3m-3 18.75h3"
2790
+ }
2791
+ )
2792
+ ),
2793
+ twitter: (props) => /* @__PURE__ */ import_react11.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", ...props }, /* @__PURE__ */ import_react11.default.createElement(
2794
+ "path",
2795
+ {
2796
+ fill: "currentColor",
2797
+ d: "M21.543 7.104c.015.211.015.423.015.636 0 6.507-4.954 14.01-14.01 14.01v-.003A13.94 13.94 0 0 1 0 19.539a9.88 9.88 0 0 0 7.287-2.041 4.93 4.93 0 0 1-4.6-3.42 4.916 4.916 0 0 0 2.223-.084A4.926 4.926 0 0 1 .96 9.167v-.062a4.887 4.887 0 0 0 2.235.616A4.928 4.928 0 0 1 1.67 3.148a13.98 13.98 0 0 0 10.15 5.144 4.929 4.929 0 0 1 8.39-4.49 9.868 9.868 0 0 0 3.128-1.196 4.941 4.941 0 0 1-2.165 2.724A9.828 9.828 0 0 0 24 4.555a10.019 10.019 0 0 1-2.457 2.549z"
2798
+ }
2799
+ )),
2800
+ instagram: (props) => /* @__PURE__ */ import_react11.default.createElement(
2801
+ "svg",
2802
+ {
2803
+ xmlns: "http://www.w3.org/2000/svg",
2804
+ fill: "currentColor",
2805
+ viewBox: "0 0 16 16",
2806
+ ...props
2807
+ },
2808
+ /* @__PURE__ */ import_react11.default.createElement("path", { d: "M8 0C5.829 0 5.556.01 4.703.048 3.85.088 3.269.222 2.76.42a3.917 3.917 0 0 0-1.417.923A3.927 3.927 0 0 0 .42 2.76C.222 3.268.087 3.85.048 4.7.01 5.555 0 5.827 0 8.001c0 2.172.01 2.444.048 3.297.04.852.174 1.433.372 1.942.205.526.478.972.923 1.417.444.445.89.719 1.416.923.51.198 1.09.333 1.942.372C5.555 15.99 5.827 16 8 16s2.444-.01 3.298-.048c.851-.04 1.434-.174 1.943-.372a3.916 3.916 0 0 0 1.416-.923c.445-.445.718-.891.923-1.417.197-.509.332-1.09.372-1.942C15.99 10.445 16 10.173 16 8s-.01-2.445-.048-3.299c-.04-.851-.175-1.433-.372-1.941a3.926 3.926 0 0 0-.923-1.417A3.911 3.911 0 0 0 13.24.42c-.51-.198-1.092-.333-1.943-.372C10.443.01 10.172 0 7.998 0h.003zm-.717 1.442h.718c2.136 0 2.389.007 3.232.046.78.035 1.204.166 1.486.275.373.145.64.319.92.599.28.28.453.546.598.92.11.281.24.705.275 1.485.039.843.047 1.096.047 3.231s-.008 2.389-.047 3.232c-.035.78-.166 1.203-.275 1.485a2.47 2.47 0 0 1-.599.919c-.28.28-.546.453-.92.598-.28.11-.704.24-1.485.276-.843.038-1.096.047-3.232.047s-2.39-.009-3.233-.047c-.78-.036-1.203-.166-1.485-.276a2.478 2.478 0 0 1-.92-.598 2.48 2.48 0 0 1-.6-.92c-.109-.281-.24-.705-.275-1.485-.038-.843-.046-1.096-.046-3.233 0-2.136.008-2.388.046-3.231.036-.78.166-1.204.276-1.486.145-.373.319-.64.599-.92.28-.28.546-.453.92-.598.282-.11.705-.24 1.485-.276.738-.034 1.024-.044 2.515-.045v.002zm4.988 1.328a.96.96 0 1 0 0 1.92.96.96 0 0 0 0-1.92zm-4.27 1.122a4.109 4.109 0 1 0 0 8.217 4.109 4.109 0 0 0 0-8.217zm0 1.441a2.667 2.667 0 1 1 0 5.334 2.667 2.667 0 0 1 0-5.334z" })
2809
+ ),
2810
+ microsoft: (props) => /* @__PURE__ */ import_react11.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", ...props }, /* @__PURE__ */ import_react11.default.createElement(
2811
+ "path",
2812
+ {
2813
+ fill: "currentColor",
2814
+ d: "M7.462 0H0v7.19h7.462V0zM16 0H8.538v7.19H16V0zM7.462 8.211H0V16h7.462V8.211zm8.538 0H8.538V16H16V8.211z"
2815
+ }
2816
+ )),
2817
+ github: (props) => /* @__PURE__ */ import_react11.default.createElement(
2818
+ "svg",
2819
+ {
2820
+ xmlns: "http://www.w3.org/2000/svg",
2821
+ viewBox: "0 0 438.549 438.549",
2822
+ ...props
2823
+ },
2824
+ /* @__PURE__ */ import_react11.default.createElement(
2825
+ "path",
2826
+ {
2827
+ fill: "currentColor",
2828
+ d: "M409.132 114.573c-19.608-33.596-46.205-60.194-79.798-79.8-33.598-19.607-70.277-29.408-110.063-29.408-39.781 0-76.472 9.804-110.063 29.408-33.596 19.605-60.192 46.204-79.8 79.8C9.803 148.168 0 184.854 0 224.63c0 47.78 13.94 90.745 41.827 128.906 27.884 38.164 63.906 64.572 108.063 79.227 5.14.954 8.945.283 11.419-1.996 2.475-2.282 3.711-5.14 3.711-8.562 0-.571-.049-5.708-.144-15.417a2549.81 2549.81 0 01-.144-25.406l-6.567 1.136c-4.187.767-9.469 1.092-15.846 1-6.374-.089-12.991-.757-19.842-1.999-6.854-1.231-13.229-4.086-19.13-8.559-5.898-4.473-10.085-10.328-12.56-17.556l-2.855-6.57c-1.903-4.374-4.899-9.233-8.992-14.559-4.093-5.331-8.232-8.945-12.419-10.848l-1.999-1.431c-1.332-.951-2.568-2.098-3.711-3.429-1.142-1.331-1.997-2.663-2.568-3.997-.572-1.335-.098-2.43 1.427-3.289 1.525-.859 4.281-1.276 8.28-1.276l5.708.853c3.807.763 8.516 3.042 14.133 6.851 5.614 3.806 10.229 8.754 13.846 14.842 4.38 7.806 9.657 13.754 15.846 17.847 6.184 4.093 12.419 6.136 18.699 6.136 6.28 0 11.704-.476 16.274-1.423 4.565-.952 8.848-2.383 12.847-4.285 1.713-12.758 6.377-22.559 13.988-29.41-10.848-1.14-20.601-2.857-29.264-5.14-8.658-2.286-17.605-5.996-26.835-11.14-9.235-5.137-16.896-11.516-22.985-19.126-6.09-7.614-11.088-17.61-14.987-29.979-3.901-12.374-5.852-26.648-5.852-42.826 0-23.035 7.52-42.637 22.557-58.817-7.044-17.318-6.379-36.732 1.997-58.24 5.52-1.715 13.706-.428 24.554 3.853 10.85 4.283 18.794 7.952 23.84 10.994 5.046 3.041 9.089 5.618 12.135 7.708 17.705-4.947 35.976-7.421 54.818-7.421s37.117 2.474 54.823 7.421l10.849-6.849c7.419-4.57 16.18-8.758 26.262-12.565 10.088-3.805 17.802-4.853 23.134-3.138 8.562 21.509 9.325 40.922 2.279 58.24 15.036 16.18 22.559 35.787 22.559 58.817 0 16.178-1.958 30.497-5.853 42.966-3.9 12.471-8.941 22.457-15.125 29.979-6.191 7.521-13.901 13.85-23.131 18.986-9.232 5.14-18.182 8.85-26.84 11.136-8.662 2.286-18.415 4.004-29.263 5.146 9.894 8.562 14.842 22.077 14.842 40.539v60.237c0 3.422 1.19 6.279 3.572 8.562 2.379 2.279 6.136 2.95 11.276 1.995 44.163-14.653 80.185-41.062 108.068-79.226 27.88-38.161 41.825-81.126 41.825-128.906-.01-39.771-9.818-76.454-29.414-110.049z"
2829
+ }
2830
+ )
2831
+ ),
2832
+ radix: (props) => /* @__PURE__ */ import_react11.default.createElement("svg", { viewBox: "0 0 25 25", fill: "none", ...props }, /* @__PURE__ */ import_react11.default.createElement(
2833
+ "path",
2834
+ {
2835
+ d: "M12 25C7.58173 25 4 21.4183 4 17C4 12.5817 7.58173 9 12 9V25Z",
2836
+ fill: "currentcolor"
2837
+ }
2838
+ ), /* @__PURE__ */ import_react11.default.createElement("path", { d: "M12 0H4V8H12V0Z", fill: "currentcolor" }), /* @__PURE__ */ import_react11.default.createElement(
2839
+ "path",
2840
+ {
2841
+ d: "M17 8C19.2091 8 21 6.20914 21 4C21 1.79086 19.2091 0 17 0C14.7909 0 13 1.79086 13 4C13 6.20914 14.7909 8 17 8Z",
2842
+ fill: "currentcolor"
2843
+ }
2844
+ )),
2845
+ aria: (props) => /* @__PURE__ */ import_react11.default.createElement("svg", { role: "img", viewBox: "0 0 24 24", fill: "currentColor", ...props }, /* @__PURE__ */ import_react11.default.createElement("path", { d: "M13.966 22.624l-1.69-4.281H8.122l3.892-9.144 5.662 13.425zM8.884 1.376H0v21.248zm15.116 0h-8.884L24 22.624Z" })),
2846
+ npm: (props) => /* @__PURE__ */ import_react11.default.createElement("svg", { viewBox: "0 0 24 24", ...props }, /* @__PURE__ */ import_react11.default.createElement(
2847
+ "path",
2848
+ {
2849
+ d: "M1.763 0C.786 0 0 .786 0 1.763v20.474C0 23.214.786 24 1.763 24h20.474c.977 0 1.763-.786 1.763-1.763V1.763C24 .786 23.214 0 22.237 0zM5.13 5.323l13.837.019-.009 13.836h-3.464l.01-10.382h-3.456L12.04 19.17H5.113z",
2850
+ fill: "currentColor"
2851
+ }
2852
+ )),
2853
+ yarn: (props) => /* @__PURE__ */ import_react11.default.createElement("svg", { viewBox: "0 0 24 24", ...props }, /* @__PURE__ */ import_react11.default.createElement(
2854
+ "path",
2855
+ {
2856
+ d: "M12 0C5.375 0 0 5.375 0 12s5.375 12 12 12 12-5.375 12-12S18.625 0 12 0zm.768 4.105c.183 0 .363.053.525.157.125.083.287.185.755 1.154.31-.088.468-.042.551-.019.204.056.366.19.463.375.477.917.542 2.553.334 3.605-.241 1.232-.755 2.029-1.131 2.576.324.329.778.899 1.117 1.825.278.774.31 1.478.273 2.015a5.51 5.51 0 0 0 .602-.329c.593-.366 1.487-.917 2.553-.931.714-.009 1.269.445 1.353 1.103a1.23 1.23 0 0 1-.945 1.362c-.649.158-.95.278-1.821.843-1.232.797-2.539 1.242-3.012 1.39a1.686 1.686 0 0 1-.704.343c-.737.181-3.266.315-3.466.315h-.046c-.783 0-1.214-.241-1.45-.491-.658.329-1.51.19-2.122-.134a1.078 1.078 0 0 1-.58-1.153 1.243 1.243 0 0 1-.153-.195c-.162-.25-.528-.936-.454-1.946.056-.723.556-1.367.88-1.71a5.522 5.522 0 0 1 .408-2.256c.306-.727.885-1.348 1.32-1.737-.32-.537-.644-1.367-.329-2.21.227-.602.412-.936.82-1.08h-.005c.199-.074.389-.153.486-.259a3.418 3.418 0 0 1 2.298-1.103c.037-.093.079-.185.125-.283.31-.658.639-1.029 1.024-1.168a.94.94 0 0 1 .328-.06zm.006.7c-.507.016-1.001 1.519-1.001 1.519s-1.27-.204-2.266.871c-.199.218-.468.334-.746.44-.079.028-.176.023-.417.672-.371.991.625 2.094.625 2.094s-1.186.839-1.626 1.881c-.486 1.144-.338 2.261-.338 2.261s-.843.732-.899 1.487c-.051.663.139 1.2.343 1.515.227.343.51.176.51.176s-.561.653-.037.931c.477.25 1.283.394 1.71-.037.31-.31.371-1.001.486-1.283.028-.065.12.111.209.199.097.093.264.195.264.195s-.755.324-.445 1.066c.102.246.468.403 1.066.398.222-.005 2.664-.139 3.313-.296.375-.088.505-.283.505-.283s1.566-.431 2.998-1.357c.917-.598 1.293-.76 2.034-.936.612-.148.57-1.098-.241-1.084-.839.009-1.575.44-2.196.825-1.163.718-1.742.672-1.742.672l-.018-.032c-.079-.13.371-1.293-.134-2.678-.547-1.515-1.413-1.881-1.344-1.997.297-.5 1.038-1.297 1.334-2.78.176-.899.13-2.377-.269-3.151-.074-.144-.732.241-.732.241s-.616-1.371-.788-1.483a.271.271 0 0 0-.157-.046z",
2857
+ fill: "currentColor"
2858
+ }
2859
+ )),
2860
+ pnpm: (props) => /* @__PURE__ */ import_react11.default.createElement("svg", { viewBox: "0 0 24 24", ...props }, /* @__PURE__ */ import_react11.default.createElement(
2861
+ "path",
2862
+ {
2863
+ d: "M0 0v7.5h7.5V0zm8.25 0v7.5h7.498V0zm8.25 0v7.5H24V0zM8.25 8.25v7.5h7.498v-7.5zm8.25 0v7.5H24v-7.5zM0 16.5V24h7.5v-7.5zm8.25 0V24h7.498v-7.5zm8.25 0V24H24v-7.5z",
2864
+ fill: "currentColor"
2865
+ }
2866
+ )),
2867
+ react: (props) => /* @__PURE__ */ import_react11.default.createElement("svg", { viewBox: "0 0 24 24", ...props }, /* @__PURE__ */ import_react11.default.createElement(
2868
+ "path",
2869
+ {
2870
+ d: "M14.23 12.004a2.236 2.236 0 0 1-2.235 2.236 2.236 2.236 0 0 1-2.236-2.236 2.236 2.236 0 0 1 2.235-2.236 2.236 2.236 0 0 1 2.236 2.236zm2.648-10.69c-1.346 0-3.107.96-4.888 2.622-1.78-1.653-3.542-2.602-4.887-2.602-.41 0-.783.093-1.106.278-1.375.793-1.683 3.264-.973 6.365C1.98 8.917 0 10.42 0 12.004c0 1.59 1.99 3.097 5.043 4.03-.704 3.113-.39 5.588.988 6.38.32.187.69.275 1.102.275 1.345 0 3.107-.96 4.888-2.624 1.78 1.654 3.542 2.603 4.887 2.603.41 0 .783-.09 1.106-.275 1.374-.792 1.683-3.263.973-6.365C22.02 15.096 24 13.59 24 12.004c0-1.59-1.99-3.097-5.043-4.032.704-3.11.39-5.587-.988-6.38-.318-.184-.688-.277-1.092-.278zm-.005 1.09v.006c.225 0 .406.044.558.127.666.382.955 1.835.73 3.704-.054.46-.142.945-.25 1.44-.96-.236-2.006-.417-3.107-.534-.66-.905-1.345-1.727-2.035-2.447 1.592-1.48 3.087-2.292 4.105-2.295zm-9.77.02c1.012 0 2.514.808 4.11 2.28-.686.72-1.37 1.537-2.02 2.442-1.107.117-2.154.298-3.113.538-.112-.49-.195-.964-.254-1.42-.23-1.868.054-3.32.714-3.707.19-.09.4-.127.563-.132zm4.882 3.05c.455.468.91.992 1.36 1.564-.44-.02-.89-.034-1.345-.034-.46 0-.915.01-1.36.034.44-.572.895-1.096 1.345-1.565zM12 8.1c.74 0 1.477.034 2.202.093.406.582.802 1.203 1.183 1.86.372.64.71 1.29 1.018 1.946-.308.655-.646 1.31-1.013 1.95-.38.66-.773 1.288-1.18 1.87-.728.063-1.466.098-2.21.098-.74 0-1.477-.035-2.202-.093-.406-.582-.802-1.204-1.183-1.86-.372-.64-.71-1.29-1.018-1.946.303-.657.646-1.313 1.013-1.954.38-.66.773-1.286 1.18-1.868.728-.064 1.466-.098 2.21-.098zm-3.635.254c-.24.377-.48.763-.704 1.16-.225.39-.435.782-.635 1.174-.265-.656-.49-1.31-.676-1.947.64-.15 1.315-.283 2.015-.386zm7.26 0c.695.103 1.365.23 2.006.387-.18.632-.405 1.282-.66 1.933-.2-.39-.41-.783-.64-1.174-.225-.392-.465-.774-.705-1.146zm3.063.675c.484.15.944.317 1.375.498 1.732.74 2.852 1.708 2.852 2.476-.005.768-1.125 1.74-2.857 2.475-.42.18-.88.342-1.355.493-.28-.958-.646-1.956-1.1-2.98.45-1.017.81-2.01 1.085-2.964zm-13.395.004c.278.96.645 1.957 1.1 2.98-.45 1.017-.812 2.01-1.086 2.964-.484-.15-.944-.318-1.37-.5-1.732-.737-2.852-1.706-2.852-2.474 0-.768 1.12-1.742 2.852-2.476.42-.18.88-.342 1.356-.494zm11.678 4.28c.265.657.49 1.312.676 1.948-.64.157-1.316.29-2.016.39.24-.375.48-.762.705-1.158.225-.39.435-.788.636-1.18zm-9.945.02c.2.392.41.783.64 1.175.23.39.465.772.705 1.143-.695-.102-1.365-.23-2.006-.386.18-.63.406-1.282.66-1.933zM17.92 16.32c.112.493.2.968.254 1.423.23 1.868-.054 3.32-.714 3.708-.147.09-.338.128-.563.128-1.012 0-2.514-.807-4.11-2.28.686-.72 1.37-1.536 2.02-2.44 1.107-.118 2.154-.3 3.113-.54zm-11.83.01c.96.234 2.006.415 3.107.532.66.905 1.345 1.727 2.035 2.446-1.595 1.483-3.092 2.295-4.11 2.295-.22-.005-.406-.05-.553-.132-.666-.38-.955-1.834-.73-3.703.054-.46.142-.944.25-1.438zm4.56.64c.44.02.89.034 1.345.034.46 0 .915-.01 1.36-.034-.44.572-.895 1.095-1.345 1.565-.455-.47-.91-.993-1.36-1.565z",
2871
+ fill: "currentColor"
2872
+ }
2873
+ )),
2874
+ tailwind: (props) => /* @__PURE__ */ import_react11.default.createElement("svg", { viewBox: "0 0 24 24", ...props }, /* @__PURE__ */ import_react11.default.createElement(
2875
+ "path",
2876
+ {
2877
+ d: "M12.001,4.8c-3.2,0-5.2,1.6-6,4.8c1.2-1.6,2.6-2.2,4.2-1.8c0.913,0.228,1.565,0.89,2.288,1.624 C13.666,10.618,15.027,12,18.001,12c3.2,0,5.2-1.6,6-4.8c-1.2,1.6-2.6,2.2-4.2,1.8c-0.913-0.228-1.565-0.89-2.288-1.624 C16.337,6.182,14.976,4.8,12.001,4.8z M6.001,12c-3.2,0-5.2,1.6-6,4.8c1.2-1.6,2.6-2.2,4.2-1.8c0.913,0.228,1.565,0.89,2.288,1.624 c1.177,1.194,2.538,2.576,5.512,2.576c3.2,0,5.2-1.6,6-4.8c-1.2,1.6-2.6,2.2-4.2,1.8c-0.913-0.228-1.565-0.89-2.288-1.624 C10.337,13.382,8.976,12,6.001,12z",
2878
+ fill: "currentColor"
2879
+ }
2880
+ )),
2881
+ google: (props) => /* @__PURE__ */ import_react11.default.createElement("svg", { role: "img", viewBox: "0 0 24 24", ...props }, /* @__PURE__ */ import_react11.default.createElement(
2882
+ "path",
2883
+ {
2884
+ fill: "currentColor",
2885
+ d: "M12.48 10.92v3.28h7.84c-.24 1.84-.853 3.187-1.787 4.133-1.147 1.147-2.933 2.4-6.053 2.4-4.827 0-8.6-3.893-8.6-8.72s3.773-8.72 8.6-8.72c2.6 0 4.507 1.027 5.907 2.347l2.307-2.307C18.747 1.44 16.133 0 12.48 0 5.867 0 .307 5.387.307 12s5.56 12 12.173 12c3.573 0 6.267-1.173 8.373-3.36 2.16-2.16 2.84-5.213 2.84-7.667 0-.76-.053-1.467-.173-2.053H12.48z"
2886
+ }
2887
+ )),
2888
+ apple: (props) => /* @__PURE__ */ import_react11.default.createElement("svg", { role: "img", viewBox: "0 0 24 24", ...props }, /* @__PURE__ */ import_react11.default.createElement(
2889
+ "path",
2890
+ {
2891
+ d: "M12.152 6.896c-.948 0-2.415-1.078-3.96-1.04-2.04.027-3.91 1.183-4.961 3.014-2.117 3.675-.546 9.103 1.519 12.09 1.013 1.454 2.208 3.09 3.792 3.039 1.52-.065 2.09-.987 3.935-.987 1.831 0 2.35.987 3.96.948 1.637-.026 2.676-1.48 3.676-2.948 1.156-1.688 1.636-3.325 1.662-3.415-.039-.013-3.182-1.221-3.22-4.857-.026-3.04 2.48-4.494 2.597-4.559-1.429-2.09-3.623-2.324-4.39-2.376-2-.156-3.675 1.09-4.61 1.09zM15.53 3.83c.843-1.012 1.4-2.427 1.245-3.83-1.207.052-2.662.805-3.532 1.818-.78.896-1.454 2.338-1.273 3.714 1.338.104 2.715-.688 3.559-1.701",
2892
+ fill: "currentColor"
2893
+ }
2894
+ )),
2895
+ paypal: (props) => /* @__PURE__ */ import_react11.default.createElement("svg", { role: "img", viewBox: "0 0 24 24", ...props }, /* @__PURE__ */ import_react11.default.createElement(
2896
+ "path",
2897
+ {
2898
+ d: "M7.076 21.337H2.47a.641.641 0 0 1-.633-.74L4.944.901C5.026.382 5.474 0 5.998 0h7.46c2.57 0 4.578.543 5.69 1.81 1.01 1.15 1.304 2.42 1.012 4.287-.023.143-.047.288-.077.437-.983 5.05-4.349 6.797-8.647 6.797h-2.19c-.524 0-.968.382-1.05.9l-1.12 7.106zm14.146-14.42a3.35 3.35 0 0 0-.607-.541c-.013.076-.026.175-.041.254-.93 4.778-4.005 7.201-9.138 7.201h-2.19a.563.563 0 0 0-.556.479l-1.187 7.527h-.506l-.24 1.516a.56.56 0 0 0 .554.647h3.882c.46 0 .85-.334.922-.788.06-.26.76-4.852.816-5.09a.932.932 0 0 1 .923-.788h.58c3.76 0 6.705-1.528 7.565-5.946.36-1.847.174-3.388-.777-4.471z",
2899
+ fill: "currentColor"
2900
+ }
2901
+ )),
2902
+ spinner: (props) => /* @__PURE__ */ import_react11.default.createElement(
2903
+ "svg",
2904
+ {
2905
+ xmlns: "http://www.w3.org/2000/svg",
2906
+ width: "24",
2907
+ height: "24",
2908
+ viewBox: "0 0 24 24",
2909
+ fill: "none",
2910
+ stroke: "currentColor",
2911
+ strokeWidth: "2",
2912
+ strokeLinecap: "round",
2913
+ strokeLinejoin: "round",
2914
+ ...props
2915
+ },
2916
+ /* @__PURE__ */ import_react11.default.createElement("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" })
2917
+ ),
2918
+ whatsapp: (props) => /* @__PURE__ */ import_react11.default.createElement(
2919
+ "svg",
2920
+ {
2921
+ xmlns: "http://www.w3.org/2000/svg",
2922
+ viewBox: "0 0 24 24",
2923
+ fill: "currentColor",
2924
+ ...props
2925
+ },
2926
+ /* @__PURE__ */ import_react11.default.createElement("path", { d: "M.057 24l1.687-6.163c-1.041-1.804-1.588-3.849-1.587-5.946.003-6.556 5.338-11.891 11.893-11.891 3.181.001 6.167 1.24 8.413 3.488 2.245 2.248 3.481 5.236 3.48 8.414-.003 6.557-5.338 11.892-11.893 11.892-1.99-.001-3.951-.5-5.688-1.448l-6.305 1.654zm6.597-3.807c1.676.995 3.276 1.591 5.392 1.592 5.448 0 9.886-4.434 9.889-9.885.002-5.462-4.415-9.89-9.881-9.892-5.452 0-9.887 4.434-9.889 9.884-.001 2.225.651 3.891 1.746 5.634l-.999 3.648 3.742-.981zm11.387-5.464c-.074-.124-.272-.198-.57-.347-.297-.149-1.758-.868-2.031-.967-.272-.099-.47-.149-.669.149-.198.297-.768.967-.941 1.165-.173.198-.347.223-.644.074-.297-.149-1.255-.462-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.297-.347.446-.521.151-.172.2-.296.3-.495.099-.198.05-.372-.025-.521-.075-.148-.669-1.611-.916-2.206-.242-.579-.487-.501-.669-.51l-.57-.01c-.198 0-.52.074-.792.372s-1.04 1.016-1.04 2.479 1.065 2.876 1.213 3.074c.149.198 2.095 3.2 5.076 4.487.709.306 1.263.489 1.694.626.712.226 1.36.194 1.872.118.571-.085 1.758-.719 2.006-1.413.248-.695.248-1.29.173-1.414z" })
2927
+ )
2928
+ };
2929
+
2930
+ // components/blocks/auth/AuthButtons.tsx
2931
+ var AuthButtons = (props) => {
2932
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
2933
+ return /* @__PURE__ */ import_react12.default.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-4" }, props.viaGoogle && /* @__PURE__ */ import_react12.default.createElement(
2934
+ Button,
2935
+ {
2936
+ disabled: props.isGoogleLoading,
2937
+ className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2",
2938
+ variant: "outline",
2939
+ onClick: props.handleGoogle
2940
+ },
2941
+ props.isGoogleLoading ? /* @__PURE__ */ import_react12.default.createElement(Loading, { size: "button" }) : /* @__PURE__ */ import_react12.default.createElement(Logos.google, { className: "hawa-icon" }),
2942
+ (_b = (_a = props.texts) == null ? void 0 : _a.continueWithGoogle) != null ? _b : "Continue With Google"
2943
+ ), props.viaGithub && /* @__PURE__ */ import_react12.default.createElement(
2944
+ Button,
2945
+ {
2946
+ disabled: props.isGithubLoading,
2947
+ className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2",
2948
+ variant: "outline",
2949
+ onClick: props.handleGithub
2950
+ },
2951
+ props.isGithubLoading ? /* @__PURE__ */ import_react12.default.createElement(Loading, { size: "button" }) : /* @__PURE__ */ import_react12.default.createElement(Logos.github, { className: "hawa-icon" }),
2952
+ (_d = (_c = props.texts) == null ? void 0 : _c.continueWithGithub) != null ? _d : "Continue With Github"
2953
+ ), props.viaTwitter && /* @__PURE__ */ import_react12.default.createElement(
2954
+ Button,
2955
+ {
2956
+ disabled: props.isTwitterLoading,
2957
+ className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2",
2958
+ variant: "outline",
2959
+ onClick: props.handleTwitter
2960
+ },
2961
+ props.isTwitterLoading ? /* @__PURE__ */ import_react12.default.createElement(Loading, { size: "button" }) : /* @__PURE__ */ import_react12.default.createElement(Logos.twitter, { className: "hawa-icon" }),
2962
+ (_f = (_e = props.texts) == null ? void 0 : _e.continueWithTwitter) != null ? _f : "Continue With Twitter"
2963
+ ), props.viaApple && /* @__PURE__ */ import_react12.default.createElement(
2964
+ Button,
2965
+ {
2966
+ disabled: props.isAppleLoading,
2967
+ className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2",
2968
+ variant: "outline",
2969
+ onClick: props.handleApple
2970
+ },
2971
+ props.isAppleLoading ? /* @__PURE__ */ import_react12.default.createElement(Loading, { size: "button" }) : /* @__PURE__ */ import_react12.default.createElement(Logos.apple, { className: "hawa-icon" }),
2972
+ (_h = (_g = props.texts) == null ? void 0 : _g.continueWithApple) != null ? _h : "Continue With Apple"
2973
+ ), props.viaMicrosoft && /* @__PURE__ */ import_react12.default.createElement(
2974
+ Button,
2975
+ {
2976
+ disabled: props.isMicrosoftLoading,
2977
+ className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2",
2978
+ variant: "outline",
2979
+ onClick: props.handleMicrosoft
2980
+ },
2981
+ props.isMicrosoftLoading ? /* @__PURE__ */ import_react12.default.createElement(Loading, { size: "button" }) : /* @__PURE__ */ import_react12.default.createElement(Logos.microsoft, { className: "hawa-icon" }),
2982
+ (_j = (_i = props.texts) == null ? void 0 : _i.continueWithMicrosoft) != null ? _j : "Continue With Microsoft"
2983
+ ), props.viaEmail && /* @__PURE__ */ import_react12.default.createElement(
2984
+ Button,
2985
+ {
2986
+ disabled: props.isEmailLoading,
2987
+ className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2",
2988
+ variant: "outline",
2989
+ onClick: props.handleEmail
2990
+ },
2991
+ props.isEmailLoading ? /* @__PURE__ */ import_react12.default.createElement(Loading, { size: "button" }) : /* @__PURE__ */ import_react12.default.createElement(Logos.mail, { className: "hawa-icon" }),
2992
+ (_l = (_k = props.texts) == null ? void 0 : _k.continueWithEmail) != null ? _l : "Continue With Email"
2993
+ ), props.viaPhone && /* @__PURE__ */ import_react12.default.createElement(
2994
+ Button,
2995
+ {
2996
+ disabled: props.isPhoneLoading,
2997
+ className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2",
2998
+ variant: "outline",
2999
+ onClick: props.handlePhone
3000
+ },
3001
+ props.isPhoneLoading ? /* @__PURE__ */ import_react12.default.createElement(Loading, { size: "button" }) : /* @__PURE__ */ import_react12.default.createElement(Logos.phone, { className: "hawa-icon" }),
3002
+ (_n = (_m = props.texts) == null ? void 0 : _m.continueWithPhone) != null ? _n : "Continue With Phone"
3003
+ ));
3004
+ };
3005
+
3006
+ // components/blocks/auth/LoginForm.tsx
3007
+ var LoginForm = ({
3008
+ loginType,
3009
+ texts,
3010
+ passwordLength = 8,
3011
+ ...props
3012
+ }) => {
3013
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;
3014
+ const [passwordVisible, setPasswordVisible] = (0, import_react13.useState)(false);
3015
+ const thirdPartyAuthTexts = {
3016
+ continueWithGoogle: texts == null ? void 0 : texts.continueWithGoogle,
3017
+ continueWithTwitter: texts == null ? void 0 : texts.continueWithTwitter,
3018
+ continueWithApple: texts == null ? void 0 : texts.continueWithApple,
3019
+ continueWithMicrosoft: texts == null ? void 0 : texts.continueWithMicrosoft,
3020
+ continueWithGithub: texts == null ? void 0 : texts.continueWithGithub,
3021
+ continueWithEmail: texts == null ? void 0 : texts.continueWithEmail,
3022
+ continueWithPhone: texts == null ? void 0 : texts.continueWithPhone
3023
+ };
3024
+ let formSchema;
3025
+ if (loginType === "email") {
3026
+ formSchema = z.object({
3027
+ email: z.string({ required_error: (_a = texts == null ? void 0 : texts.email) == null ? void 0 : _a.required }).min(1, { message: (_b = texts == null ? void 0 : texts.email) == null ? void 0 : _b.required }).email({ message: (_c = texts == null ? void 0 : texts.email) == null ? void 0 : _c.invalid }),
3028
+ password: z.string({ required_error: (_d = texts == null ? void 0 : texts.password) == null ? void 0 : _d.required }).min(1, { message: (_e = texts == null ? void 0 : texts.password) == null ? void 0 : _e.required }).min(passwordLength, { message: (_f = texts == null ? void 0 : texts.password) == null ? void 0 : _f.tooShort })
3029
+ });
3030
+ } else if (loginType === "username") {
3031
+ formSchema = z.object({
3032
+ username: z.string({ required_error: (_g = texts == null ? void 0 : texts.username) == null ? void 0 : _g.required }).min(2, { message: (_h = texts == null ? void 0 : texts.username) == null ? void 0 : _h.tooShort }).refine(
3033
+ (value) => {
3034
+ const isValid = /^[a-zA-Z][a-zA-Z0-9_-]{2,14}$/.test(value);
3035
+ return isValid;
3036
+ },
3037
+ { message: (_i = texts == null ? void 0 : texts.username) == null ? void 0 : _i.invalid }
3038
+ ),
3039
+ password: z.string({ required_error: (_j = texts == null ? void 0 : texts.password) == null ? void 0 : _j.required }).min(1, { message: (_k = texts == null ? void 0 : texts.password) == null ? void 0 : _k.required }).min(passwordLength, { message: (_l = texts == null ? void 0 : texts.password) == null ? void 0 : _l.tooShort })
3040
+ });
3041
+ } else if (loginType === "phone") {
3042
+ formSchema = z.object({
3043
+ phone: z.string({ required_error: (_m = texts == null ? void 0 : texts.phone) == null ? void 0 : _m.required }).refine(
3044
+ (value) => {
3045
+ let phoneNumber = (0, import_libphonenumber_js.parsePhoneNumber)(value);
3046
+ return phoneNumber.isValid();
3047
+ },
3048
+ { message: (_n = texts == null ? void 0 : texts.phone) == null ? void 0 : _n.invalid }
3049
+ )
3050
+ });
3051
+ } else if (loginType === "link") {
3052
+ formSchema = z.object({
3053
+ email: z.string({ required_error: (_o = texts == null ? void 0 : texts.email) == null ? void 0 : _o.required }).min(1, { message: (_p = texts == null ? void 0 : texts.email) == null ? void 0 : _p.required }).email({ message: (_q = texts == null ? void 0 : texts.email) == null ? void 0 : _q.invalid })
3054
+ });
3055
+ } else {
3056
+ formSchema = z.object({});
3057
+ }
3058
+ const { handleSubmit, control, formState } = (0, import_react_hook_form.useForm)({
3059
+ resolver: (0, import_zod.zodResolver)(formSchema)
3060
+ });
3061
+ const renderFields = () => {
3062
+ switch (loginType) {
3063
+ case "email":
3064
+ return /* @__PURE__ */ import_react13.default.createElement(import_react13.default.Fragment, null, /* @__PURE__ */ import_react13.default.createElement(
3065
+ import_react_hook_form.Controller,
3066
+ {
3067
+ control,
3068
+ name: "email",
3069
+ render: ({ field }) => {
3070
+ var _a2, _b2, _c2;
3071
+ return /* @__PURE__ */ import_react13.default.createElement(
3072
+ Input,
3073
+ {
3074
+ inputProps: {
3075
+ className: props.direction === "rtl" ? "hawa-text-right" : "hawa-text-left"
3076
+ },
3077
+ dir: "ltr",
3078
+ width: "full",
3079
+ autoComplete: "email",
3080
+ label: (_a2 = texts == null ? void 0 : texts.email) == null ? void 0 : _a2.label,
3081
+ helperText: (_b2 = formState.errors.email) == null ? void 0 : _b2.message,
3082
+ placeholder: ((_c2 = texts == null ? void 0 : texts.email) == null ? void 0 : _c2.placeholder) || "contact@sikka.io",
3083
+ ...field
3084
+ }
3085
+ );
3086
+ }
3087
+ }
3088
+ ), /* @__PURE__ */ import_react13.default.createElement("div", null, /* @__PURE__ */ import_react13.default.createElement(
3089
+ import_react_hook_form.Controller,
3090
+ {
3091
+ control,
3092
+ name: "password",
3093
+ render: ({ field }) => {
3094
+ var _a2, _b2, _c2;
3095
+ return /* @__PURE__ */ import_react13.default.createElement(
3096
+ Input,
3097
+ {
3098
+ width: "full",
3099
+ autoComplete: "current-password",
3100
+ type: passwordVisible ? "text" : "password",
3101
+ label: ((_a2 = texts == null ? void 0 : texts.password) == null ? void 0 : _a2.label) || "Password",
3102
+ endIcon: /* @__PURE__ */ import_react13.default.createElement(
3103
+ "div",
3104
+ {
3105
+ className: "hawa-cursor-pointer",
3106
+ onClick: () => setPasswordVisible(!passwordVisible)
3107
+ },
3108
+ passwordVisible ? /* @__PURE__ */ import_react13.default.createElement(EyeIcon, { className: "hawa-text-gray-500" }) : /* @__PURE__ */ import_react13.default.createElement(HiddenEyeIcon, { className: "hawa-text-gray-500" })
3109
+ ),
3110
+ placeholder: ((_b2 = texts == null ? void 0 : texts.password) == null ? void 0 : _b2.placeholder) || "Enter your password",
3111
+ helperText: (_c2 = formState.errors.password) == null ? void 0 : _c2.message,
3112
+ ...field
3113
+ }
3114
+ );
3115
+ }
3116
+ }
3117
+ ), !props.withoutResetPassword && /* @__PURE__ */ import_react13.default.createElement(
3118
+ "div",
3119
+ {
3120
+ onClick: props.onForgotPassword,
3121
+ className: "hawa-mb-3 hawa-mt-2 hawa-w-fit hawa-cursor-pointer hawa-select-none hawa-text-xs dark:hawa-text-gray-300"
3122
+ },
3123
+ (texts == null ? void 0 : texts.forgotPassword) || "Forgot Password?"
3124
+ )));
3125
+ case "username":
3126
+ return /* @__PURE__ */ import_react13.default.createElement(import_react13.default.Fragment, null, /* @__PURE__ */ import_react13.default.createElement(
3127
+ import_react_hook_form.Controller,
3128
+ {
3129
+ control,
3130
+ name: "username",
3131
+ render: ({ field }) => {
3132
+ var _a2, _b2, _c2;
3133
+ return /* @__PURE__ */ import_react13.default.createElement(
3134
+ Input,
3135
+ {
3136
+ width: "full",
3137
+ autoComplete: "username",
3138
+ label: ((_a2 = texts == null ? void 0 : texts.username) == null ? void 0 : _a2.label) || "Username",
3139
+ helperText: (_b2 = formState.errors.username) == null ? void 0 : _b2.message,
3140
+ placeholder: ((_c2 = texts == null ? void 0 : texts.username) == null ? void 0 : _c2.placeholder) || "sikka_sa",
3141
+ ...field
3142
+ }
3143
+ );
3144
+ }
3145
+ }
3146
+ ), /* @__PURE__ */ import_react13.default.createElement("div", null, /* @__PURE__ */ import_react13.default.createElement(
3147
+ import_react_hook_form.Controller,
3148
+ {
3149
+ control,
3150
+ name: "password",
3151
+ render: ({ field }) => {
3152
+ var _a2, _b2, _c2;
3153
+ return /* @__PURE__ */ import_react13.default.createElement(
3154
+ Input,
3155
+ {
3156
+ width: "full",
3157
+ autoComplete: "current-password",
3158
+ type: passwordVisible ? "text" : "password",
3159
+ label: (_a2 = texts == null ? void 0 : texts.password) == null ? void 0 : _a2.label,
3160
+ endIcon: /* @__PURE__ */ import_react13.default.createElement(
3161
+ "div",
3162
+ {
3163
+ className: "hawa-cursor-pointer",
3164
+ onClick: () => setPasswordVisible(!passwordVisible)
3165
+ },
3166
+ passwordVisible ? /* @__PURE__ */ import_react13.default.createElement(EyeIcon, { className: "hawa-text-gray-500" }) : /* @__PURE__ */ import_react13.default.createElement(HiddenEyeIcon, { className: "hawa-text-gray-500" })
3167
+ ),
3168
+ placeholder: ((_b2 = texts == null ? void 0 : texts.password) == null ? void 0 : _b2.placeholder) || "Enter your password",
3169
+ helperText: (_c2 = formState.errors.password) == null ? void 0 : _c2.message,
3170
+ ...field
3171
+ }
3172
+ );
3173
+ }
3174
+ }
3175
+ ), !props.withoutResetPassword && /* @__PURE__ */ import_react13.default.createElement(
3176
+ "div",
3177
+ {
3178
+ onClick: props.onForgotPassword,
3179
+ className: "hawa-mb-3 hawa-mt-2 hawa-w-fit hawa-cursor-pointer hawa-select-none hawa-text-xs dark:hawa-text-gray-300"
3180
+ },
3181
+ (texts == null ? void 0 : texts.forgotPassword) || "Forgot Password?"
3182
+ )));
3183
+ case "phone":
3184
+ return /* @__PURE__ */ import_react13.default.createElement(import_react13.default.Fragment, null, /* @__PURE__ */ import_react13.default.createElement(
3185
+ import_react_hook_form.Controller,
3186
+ {
3187
+ control,
3188
+ name: "phone",
3189
+ render: ({ field }) => {
3190
+ var _a2, _b2;
3191
+ return /* @__PURE__ */ import_react13.default.createElement(
3192
+ PhoneInput,
3193
+ {
3194
+ label: (_a2 = texts == null ? void 0 : texts.phone) == null ? void 0 : _a2.label,
3195
+ helperText: (_b2 = formState.errors.phone) == null ? void 0 : _b2.message,
3196
+ preferredCountry: { label: "+966" },
3197
+ handleChange: (e) => field.onChange((0, import_libphonenumber_js.parsePhoneNumber)(e).number)
3198
+ }
3199
+ );
3200
+ }
3201
+ }
3202
+ ));
3203
+ case "link":
3204
+ return /* @__PURE__ */ import_react13.default.createElement(import_react13.default.Fragment, null, /* @__PURE__ */ import_react13.default.createElement(
3205
+ import_react_hook_form.Controller,
3206
+ {
3207
+ control,
3208
+ name: "email",
3209
+ render: ({ field }) => {
3210
+ var _a2, _b2, _c2;
3211
+ return /* @__PURE__ */ import_react13.default.createElement(
3212
+ Input,
3213
+ {
3214
+ width: "full",
3215
+ autoComplete: "email",
3216
+ label: ((_a2 = texts == null ? void 0 : texts.email) == null ? void 0 : _a2.label) || "Email",
3217
+ helperText: (_b2 = formState.errors.email) == null ? void 0 : _b2.message,
3218
+ placeholder: ((_c2 = texts == null ? void 0 : texts.email) == null ? void 0 : _c2.placeholder) || "contact@sikka.io",
3219
+ ...field
3220
+ }
3221
+ );
3222
+ }
3223
+ }
3224
+ ));
3225
+ default:
3226
+ break;
3227
+ }
3228
+ };
3229
+ return /* @__PURE__ */ import_react13.default.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-4" }, /* @__PURE__ */ import_react13.default.createElement(Card, { dir: props.direction }, /* @__PURE__ */ import_react13.default.createElement(CardContent, { headless: true }, props.showError && /* @__PURE__ */ import_react13.default.createElement(
3230
+ Alert,
3231
+ {
3232
+ direction: props.direction,
3233
+ title: props.errorTitle,
3234
+ text: props.errorText,
3235
+ severity: "error"
3236
+ }
3237
+ ), /* @__PURE__ */ import_react13.default.createElement(
3238
+ "form",
3239
+ {
3240
+ noValidate: true,
3241
+ className: "hawa-flex hawa-flex-col hawa-gap-4",
3242
+ onSubmit: handleSubmit((e) => {
3243
+ if (props.onLogin) {
3244
+ return props.onLogin(e);
3245
+ } else {
3246
+ console.log("Form is submitted but onLogin prop is missing");
3247
+ }
3248
+ })
3249
+ },
3250
+ renderFields(),
3251
+ /* @__PURE__ */ import_react13.default.createElement(
3252
+ Button,
3253
+ {
3254
+ className: "hawa-mt-0 hawa-w-full",
3255
+ type: "submit",
3256
+ isLoading: props.isLoading,
3257
+ disabled: props.isLoading
3258
+ },
3259
+ (texts == null ? void 0 : texts.loginText) || "Login"
3260
+ ),
3261
+ props.additionalButtons,
3262
+ props.allowRegister && /* @__PURE__ */ import_react13.default.createElement("div", { className: "hawa-select-none hawa-p-3 hawa-text-center hawa-text-sm hawa-font-normal dark:hawa-text-gray-300" }, (texts == null ? void 0 : texts.newUserText) || "New user?", " ", /* @__PURE__ */ import_react13.default.createElement(
3263
+ "span",
3264
+ {
3265
+ onClick: props.onRouteToRegister,
3266
+ className: "clickable-link"
3267
+ },
3268
+ (texts == null ? void 0 : texts.createAccount) || "Create Account"
3269
+ ))
3270
+ )), props.viaGithub || props.viaGoogle || props.viaTwitter ? /* @__PURE__ */ import_react13.default.createElement(
3271
+ CardFooter,
3272
+ {
3273
+ className: cn(
3274
+ props.logosOnly ? "hawa-flex hawa-flex-row hawa-justify-center hawa-gap-2" : "hawa-grid hawa-grid-cols-1 hawa-gap-2"
3275
+ )
3276
+ },
3277
+ /* @__PURE__ */ import_react13.default.createElement(
3278
+ AuthButtons,
3279
+ {
3280
+ texts: thirdPartyAuthTexts,
3281
+ viaGoogle: props.viaGoogle,
3282
+ viaGithub: props.viaGithub,
3283
+ viaTwitter: props.viaTwitter,
3284
+ isGoogleLoading: props.isGoogleLoading,
3285
+ isGithubLoading: props.isGithubLoading,
3286
+ isTwitterLoading: props.isTwitterLoading,
3287
+ handleGoogle: props.onGoogleLogin,
3288
+ handleGithub: props.onGithubLogin,
3289
+ handleTwitter: props.onTwitterLogin
3290
+ }
3291
+ )
3292
+ ) : null));
3293
+ };
3294
+
3295
+ // components/blocks/auth/RegisterForm.tsx
3296
+ var import_react15 = __toESM(require("react"));
3297
+ var import_react_hook_form2 = require("react-hook-form");
3298
+ var import_zod2 = require("@hookform/resolvers/zod");
3299
+ var z2 = __toESM(require("zod"));
3300
+
3301
+ // components/elements/checkbox/Checkbox.tsx
3302
+ var React17 = __toESM(require("react"));
3303
+ var CheckboxPrimitive = __toESM(require("@radix-ui/react-checkbox"));
3304
+ var Checkbox = ({
3305
+ id,
3306
+ label,
3307
+ sublabel,
3308
+ helperText,
3309
+ disabled,
3310
+ size = "default",
3311
+ radius = "inherit",
3312
+ ...props
3313
+ }) => {
3314
+ let labelLineHeightStyles = {
3315
+ xs: sublabel || helperText ? 0.5 : 0.1,
3316
+ sm: 0.6,
3317
+ default: 0.7,
3318
+ md: 0.8,
3319
+ lg: 0.9,
3320
+ xl: 1
3321
+ };
3322
+ return /* @__PURE__ */ React17.createElement(
3323
+ "div",
3324
+ {
3325
+ className: cn(
3326
+ "hawa-flex hawa-gap-2",
3327
+ "hawa-items-top",
3328
+ sublabel || helperText ? "hawa-items-top" : "hawa-items-center"
3329
+ )
3330
+ },
3331
+ /* @__PURE__ */ React17.createElement(
3332
+ CheckboxElement,
3333
+ {
3334
+ ...props,
3335
+ size,
3336
+ radius,
3337
+ disabled,
3338
+ id
3339
+ }
3340
+ ),
3341
+ (label || helperText) && /* @__PURE__ */ React17.createElement("div", { className: "hawa-grid hawa-gap-1.5 hawa-leading-none" }, label && /* @__PURE__ */ React17.createElement(
3342
+ "label",
3343
+ {
3344
+ htmlFor: id,
3345
+ className: cn(
3346
+ "hawa-w-fit hawa-select-none hawa-pt-0.5 hawa-text-sm hawa-font-medium hawa-leading-none",
3347
+ disabled ? "hawa-cursor-not-allowed hawa-text-muted-foreground hawa-opacity-70 " : "hawa-cursor-pointer"
3348
+ ),
3349
+ style: {
3350
+ lineHeight: labelLineHeightStyles[size]
3351
+ }
3352
+ },
3353
+ label
3354
+ ), sublabel && /* @__PURE__ */ React17.createElement(
3355
+ "label",
3356
+ {
3357
+ htmlFor: id,
3358
+ className: cn(
3359
+ "hawa-w-fit hawa-select-none hawa-text-sm hawa-text-muted-foreground",
3360
+ disabled ? "hawa-cursor-not-allowed hawa-text-muted-foreground hawa-opacity-70" : "hawa-cursor-pointer"
3361
+ )
3362
+ },
3363
+ sublabel
3364
+ ), helperText && !disabled && /* @__PURE__ */ React17.createElement(
3365
+ "label",
3366
+ {
3367
+ htmlFor: id,
3368
+ className: cn(
3369
+ "hawa-w-fit hawa-select-none hawa-text-xs hawa-text-helper-color",
3370
+ disabled && "hawa-cursor-not-allowed hawa-opacity-70"
3371
+ )
3372
+ },
3373
+ helperText
3374
+ ))
3375
+ );
3376
+ };
3377
+ var CheckboxElement = React17.forwardRef(({ radius = "inherit", size = "default", className, ...props }, ref) => {
3378
+ let checkboxRadius = {
3379
+ none: "hawa-rounded-none",
3380
+ inherit: "hawa-rounded-sm",
3381
+ full: "hawa-rounded-full"
3382
+ };
3383
+ let checkboxSizes = {
3384
+ xs: "hawa-w-3 hawa-h-3",
3385
+ sm: "hawa-w-6 hawa-h-6",
3386
+ default: "hawa-icon",
3387
+ md: "hawa-w-8 hawa-h-8",
3388
+ lg: "hawa-w-10 hawa-h-10",
3389
+ xl: "hawa-w-12 hawa-h-12"
3390
+ };
3391
+ let checkboxIndicatorSizes = {
3392
+ xs: "0.5em",
3393
+ default: "0.60em",
3394
+ sm: "0.75em",
3395
+ md: "0.875em",
3396
+ lg: "1em",
3397
+ xl: "1.25em"
3398
+ };
3399
+ return /* @__PURE__ */ React17.createElement(
3400
+ CheckboxPrimitive.Root,
3401
+ {
3402
+ ref,
3403
+ className: cn(
3404
+ "hawa-peer hawa-shrink-0 hawa-border hawa-border-primary hawa-ring-offset-background focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-2 disabled:hawa-cursor-not-allowed disabled:hawa-opacity-50 data-[state=checked]:hawa-bg-primary data-[state=checked]:hawa-text-primary-foreground",
3405
+ checkboxSizes[size],
3406
+ checkboxRadius[radius],
3407
+ className
3408
+ ),
3409
+ ...props
3410
+ },
3411
+ /* @__PURE__ */ React17.createElement(
3412
+ CheckboxPrimitive.Indicator,
3413
+ {
3414
+ className: cn(
3415
+ "hawa-flex hawa-items-center hawa-justify-center hawa-text-current"
3416
+ )
3417
+ },
3418
+ /* @__PURE__ */ React17.createElement(
3419
+ "svg",
3420
+ {
3421
+ "aria-label": "Check Mark",
3422
+ stroke: "currentColor",
3423
+ fill: "currentColor",
3424
+ strokeWidth: "0",
3425
+ viewBox: "0 0 512 512",
3426
+ height: checkboxIndicatorSizes[size],
3427
+ width: checkboxIndicatorSizes[size]
3428
+ },
3429
+ /* @__PURE__ */ React17.createElement("path", { d: "M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z" })
3430
+ ),
3431
+ " "
3432
+ )
3433
+ );
3434
+ });
3435
+ CheckboxElement.displayName = CheckboxPrimitive.Root.displayName;
3436
+
3437
+ // components/elements/stopPropagationWrapper/StopPropagationWrapper.tsx
3438
+ var import_react14 = __toESM(require("react"));
3439
+ var StopPropagationWrapper = (props) => {
3440
+ const handleClick = (e) => {
3441
+ e.stopPropagation();
3442
+ };
3443
+ return /* @__PURE__ */ import_react14.default.createElement("div", { onClick: handleClick }, props.children);
3444
+ };
3445
+
3446
+ // components/blocks/auth/RegisterForm.tsx
3447
+ var RegisterForm = ({
3448
+ texts,
3449
+ registerFields = ["email"],
3450
+ ...props
3451
+ }) => {
3452
+ var _a, _b, _c, _d, _e, _f;
3453
+ const [passwordVisible, setPasswordVisible] = (0, import_react15.useState)(false);
3454
+ const thirdPartyAuthTexts = {
3455
+ continueWithGoogle: texts == null ? void 0 : texts.continueWithGoogle,
3456
+ continueWithTwitter: texts == null ? void 0 : texts.continueWithTwitter,
3457
+ continueWithApple: texts == null ? void 0 : texts.continueWithApple,
3458
+ continueWithMicrosoft: texts == null ? void 0 : texts.continueWithMicrosoft,
3459
+ continueWithGithub: texts == null ? void 0 : texts.continueWithGithub,
3460
+ continueWithEmail: texts == null ? void 0 : texts.continueWithEmail,
3461
+ continueWithPhone: texts == null ? void 0 : texts.continueWithPhone
3462
+ };
3463
+ const methods = (0, import_react_hook_form2.useForm)();
3464
+ let fieldSchemas = {};
3465
+ registerFields.forEach((field) => {
3466
+ var _a2, _b2, _c2, _d2, _e2, _f2;
3467
+ switch (field) {
3468
+ case "fullname":
3469
+ fieldSchemas["fullName"] = z2.string().optional();
3470
+ break;
3471
+ case "email":
3472
+ fieldSchemas["email"] = z2.string({ required_error: (_a2 = texts == null ? void 0 : texts.email) == null ? void 0 : _a2.required }).email({ message: (_b2 = texts == null ? void 0 : texts.email) == null ? void 0 : _b2.invalid }).min(1, { message: (_c2 = texts == null ? void 0 : texts.email) == null ? void 0 : _c2.required });
3473
+ break;
3474
+ case "username":
3475
+ fieldSchemas["username"] = z2.string({ required_error: (_d2 = texts == null ? void 0 : texts.username) == null ? void 0 : _d2.required }).min(1, { message: (_e2 = texts == null ? void 0 : texts.username) == null ? void 0 : _e2.required }).refine(
3476
+ (value) => {
3477
+ const isValid = /^[a-zA-Z][a-zA-Z0-9_-]{2,14}$/.test(value);
3478
+ return isValid;
3479
+ },
3480
+ { message: (_f2 = texts == null ? void 0 : texts.username) == null ? void 0 : _f2.invalid }
3481
+ );
3482
+ break;
3483
+ }
3484
+ });
3485
+ const formSchema = z2.object({
3486
+ ...fieldSchemas,
3487
+ password: z2.string({ required_error: (_a = texts == null ? void 0 : texts.password) == null ? void 0 : _a.required }).min(5, { message: (_b = texts == null ? void 0 : texts.password) == null ? void 0 : _b.tooShort }).refine((value) => value !== "", {
3488
+ message: (_c = texts == null ? void 0 : texts.password) == null ? void 0 : _c.required
3489
+ }),
3490
+ confirm_password: z2.string({ required_error: (_d = texts == null ? void 0 : texts.confirm) == null ? void 0 : _d.required }).refine((value) => value !== "", {
3491
+ message: (_e = texts == null ? void 0 : texts.password) == null ? void 0 : _e.required
3492
+ }),
3493
+ refCode: z2.string().optional(),
3494
+ reference: z2.string().optional(),
3495
+ terms_accepted: z2.boolean({ required_error: texts == null ? void 0 : texts.termsRequired }).refine((value) => value, { message: texts == null ? void 0 : texts.termsRequired }),
3496
+ newsletter_accepted: z2.boolean().optional()
3497
+ }).refine((data) => data.password === data.confirm_password, {
3498
+ message: (_f = texts == null ? void 0 : texts.confirm) == null ? void 0 : _f.dontMatch,
3499
+ path: ["confirm_password"]
3500
+ });
3501
+ const { handleSubmit, control, formState } = (0, import_react_hook_form2.useForm)({
3502
+ resolver: (0, import_zod2.zodResolver)(formSchema)
3503
+ });
3504
+ return /* @__PURE__ */ import_react15.default.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-4" }, /* @__PURE__ */ import_react15.default.createElement(Card, { dir: props.direction }, /* @__PURE__ */ import_react15.default.createElement(CardContent, { headless: true }, /* @__PURE__ */ import_react15.default.createElement("div", null, props.showError && /* @__PURE__ */ import_react15.default.createElement(
3505
+ Alert,
3506
+ {
3507
+ title: props.errorTitle,
3508
+ text: props.errorText,
3509
+ severity: "error"
3510
+ }
3511
+ ), /* @__PURE__ */ import_react15.default.createElement(import_react_hook_form2.FormProvider, { ...methods }, /* @__PURE__ */ import_react15.default.createElement(
3512
+ "form",
3513
+ {
3514
+ noValidate: true,
3515
+ onSubmit: handleSubmit((e) => {
3516
+ if (props.onRegister) {
3517
+ return props.onRegister(e);
3518
+ } else {
3519
+ console.log(
3520
+ "Form is submitted but onRegister prop is missing"
3521
+ );
3522
+ }
3523
+ }),
3524
+ className: "hawa-flex hawa-flex-col hawa-gap-4"
3525
+ },
3526
+ /* @__PURE__ */ import_react15.default.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-4" }, registerFields.map((fld, i) => {
3527
+ if (fld === "fullname") {
3528
+ return /* @__PURE__ */ import_react15.default.createElement(
3529
+ import_react_hook_form2.Controller,
3530
+ {
3531
+ key: i,
3532
+ control,
3533
+ name: "fullName",
3534
+ render: ({ field }) => {
3535
+ var _a2, _b2, _c2;
3536
+ return /* @__PURE__ */ import_react15.default.createElement(
3537
+ Input,
3538
+ {
3539
+ width: "full",
3540
+ label: (_a2 = texts == null ? void 0 : texts.fullName) == null ? void 0 : _a2.label,
3541
+ placeholder: (_b2 = texts == null ? void 0 : texts.fullName) == null ? void 0 : _b2.placeholder,
3542
+ helperText: (_c2 = formState.errors.fullName) == null ? void 0 : _c2.message,
3543
+ ...field
3544
+ }
3545
+ );
3546
+ }
3547
+ }
3548
+ );
3549
+ }
3550
+ if (fld === "email") {
3551
+ return /* @__PURE__ */ import_react15.default.createElement(
3552
+ import_react_hook_form2.Controller,
3553
+ {
3554
+ key: i,
3555
+ control,
3556
+ name: "email",
3557
+ render: ({ field }) => {
3558
+ var _a2, _b2, _c2;
3559
+ return /* @__PURE__ */ import_react15.default.createElement(
3560
+ Input,
3561
+ {
3562
+ dir: "ltr",
3563
+ inputProps: {
3564
+ className: props.direction === "rtl" ? "hawa-text-right" : "hawa-text-left"
3565
+ },
3566
+ width: "full",
3567
+ autoComplete: "email",
3568
+ label: (_a2 = texts == null ? void 0 : texts.email) == null ? void 0 : _a2.label,
3569
+ helperText: (_b2 = formState.errors.email) == null ? void 0 : _b2.message,
3570
+ placeholder: ((_c2 = texts == null ? void 0 : texts.email) == null ? void 0 : _c2.placeholder) || "Enter your email",
3571
+ ...field
3572
+ }
3573
+ );
3574
+ }
3575
+ }
3576
+ );
3577
+ }
3578
+ if (fld === "username") {
3579
+ return /* @__PURE__ */ import_react15.default.createElement(
3580
+ import_react_hook_form2.Controller,
3581
+ {
3582
+ key: i,
3583
+ control,
3584
+ name: "username",
3585
+ render: ({ field }) => {
3586
+ var _a2, _b2, _c2;
3587
+ return /* @__PURE__ */ import_react15.default.createElement(
3588
+ Input,
3589
+ {
3590
+ width: "full",
3591
+ autoComplete: "username",
3592
+ label: (_a2 = texts == null ? void 0 : texts.username) == null ? void 0 : _a2.label,
3593
+ helperText: (_b2 = formState.errors.username) == null ? void 0 : _b2.message,
3594
+ placeholder: (_c2 = texts == null ? void 0 : texts.username) == null ? void 0 : _c2.placeholder,
3595
+ ...field
3596
+ }
3597
+ );
3598
+ }
3599
+ }
3600
+ );
3601
+ }
3602
+ })),
3603
+ /* @__PURE__ */ import_react15.default.createElement(
3604
+ import_react_hook_form2.Controller,
3605
+ {
3606
+ control,
3607
+ name: "password",
3608
+ render: ({ field }) => {
3609
+ var _a2, _b2, _c2;
3610
+ return /* @__PURE__ */ import_react15.default.createElement(
3611
+ Input,
3612
+ {
3613
+ width: "full",
3614
+ type: passwordVisible ? "text" : "password",
3615
+ endIcon: /* @__PURE__ */ import_react15.default.createElement(
3616
+ "div",
3617
+ {
3618
+ className: "hawa-cursor-pointer",
3619
+ onClick: () => setPasswordVisible(!passwordVisible)
3620
+ },
3621
+ passwordVisible ? /* @__PURE__ */ import_react15.default.createElement(EyeIcon, { className: "hawa-text-gray-500" }) : /* @__PURE__ */ import_react15.default.createElement(HiddenEyeIcon, { className: "hawa-text-gray-500" }),
3622
+ " "
3623
+ ),
3624
+ autoComplete: "new-password",
3625
+ label: (_a2 = texts == null ? void 0 : texts.password) == null ? void 0 : _a2.label,
3626
+ placeholder: (_b2 = texts == null ? void 0 : texts.password) == null ? void 0 : _b2.placeholder,
3627
+ helperText: (_c2 = formState.errors.password) == null ? void 0 : _c2.message,
3628
+ ...field
3629
+ }
3630
+ );
3631
+ }
3632
+ }
3633
+ ),
3634
+ /* @__PURE__ */ import_react15.default.createElement(
3635
+ import_react_hook_form2.Controller,
3636
+ {
3637
+ control,
3638
+ name: "confirm_password",
3639
+ render: ({ field }) => {
3640
+ var _a2, _b2, _c2;
3641
+ return /* @__PURE__ */ import_react15.default.createElement(
3642
+ Input,
3643
+ {
3644
+ width: "full",
3645
+ type: "password",
3646
+ autoComplete: "new-password",
3647
+ label: (_a2 = texts == null ? void 0 : texts.confirm) == null ? void 0 : _a2.label,
3648
+ placeholder: (_b2 = texts == null ? void 0 : texts.confirm) == null ? void 0 : _b2.placeholder,
3649
+ helperText: (_c2 = formState.errors.confirm_password) == null ? void 0 : _c2.message,
3650
+ ...field
3651
+ }
3652
+ );
3653
+ }
3654
+ }
3655
+ ),
3656
+ props.additionalInputs,
3657
+ props.showRefCode && /* @__PURE__ */ import_react15.default.createElement(
3658
+ import_react_hook_form2.Controller,
3659
+ {
3660
+ control,
3661
+ name: "refCode",
3662
+ render: ({ field }) => {
3663
+ var _a2;
3664
+ return /* @__PURE__ */ import_react15.default.createElement(
3665
+ Input,
3666
+ {
3667
+ width: "full",
3668
+ label: texts == null ? void 0 : texts.refCode,
3669
+ placeholder: (texts == null ? void 0 : texts.refCodePlaceholder) || "Enter the referral code",
3670
+ helperText: (_a2 = formState.errors.refCode) == null ? void 0 : _a2.message,
3671
+ ...field
3672
+ }
3673
+ );
3674
+ }
3675
+ }
3676
+ ),
3677
+ props.showUserSource && /* @__PURE__ */ import_react15.default.createElement(
3678
+ import_react_hook_form2.Controller,
3679
+ {
3680
+ control,
3681
+ name: "reference",
3682
+ render: ({ field }) => {
3683
+ var _a2, _b2;
3684
+ return /* @__PURE__ */ import_react15.default.createElement(
3685
+ Select,
3686
+ {
3687
+ label: ((_a2 = texts == null ? void 0 : texts.userReference) == null ? void 0 : _a2.label) || "How did you learn about us?",
3688
+ placeholder: (_b2 = texts == null ? void 0 : texts.userReference) == null ? void 0 : _b2.placeholder,
3689
+ isCreatable: false,
3690
+ isMulti: false,
3691
+ isSearchable: false,
3692
+ isClearable: false,
3693
+ options: props.userReferenceOptions,
3694
+ onChange: (e) => {
3695
+ field.onChange(e.value);
3696
+ }
3697
+ }
3698
+ );
3699
+ }
3700
+ }
3701
+ ),
3702
+ /* @__PURE__ */ import_react15.default.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-3" }, props.showTermsOption && /* @__PURE__ */ import_react15.default.createElement(
3703
+ import_react_hook_form2.Controller,
3704
+ {
3705
+ control,
3706
+ name: "terms_accepted",
3707
+ render: ({ field }) => {
3708
+ var _a2, _b2;
3709
+ return /* @__PURE__ */ import_react15.default.createElement(
3710
+ Checkbox,
3711
+ {
3712
+ id: "terms_accepted",
3713
+ helperText: (_b2 = (_a2 = formState.errors.terms_accepted) == null ? void 0 : _a2.message) == null ? void 0 : _b2.toString(),
3714
+ onCheckedChange: (e) => field.onChange(e),
3715
+ label: /* @__PURE__ */ import_react15.default.createElement("div", { className: "hawa-flex hawa-flex-row hawa-gap-0.5" }, /* @__PURE__ */ import_react15.default.createElement("span", null, texts == null ? void 0 : texts.iAcceptText), " ", /* @__PURE__ */ import_react15.default.createElement(StopPropagationWrapper, null, /* @__PURE__ */ import_react15.default.createElement(
3716
+ "a",
3717
+ {
3718
+ onClick: props.onRouteToTOS,
3719
+ className: "clickable-link"
3720
+ },
3721
+ texts == null ? void 0 : texts.termsText
3722
+ )))
3723
+ }
3724
+ );
3725
+ }
3726
+ }
3727
+ ), props.showNewsletterOption && /* @__PURE__ */ import_react15.default.createElement(
3728
+ import_react_hook_form2.Controller,
3729
+ {
3730
+ control,
3731
+ name: "newsletter_accepted",
3732
+ render: ({ field }) => /* @__PURE__ */ import_react15.default.createElement(
3733
+ Checkbox,
3734
+ {
3735
+ id: "newsletter_accepted",
3736
+ label: texts == null ? void 0 : texts.subscribeToNewsletter,
3737
+ onCheckedChange: field.onChange
3738
+ }
3739
+ )
3740
+ }
3741
+ )),
3742
+ /* @__PURE__ */ import_react15.default.createElement(
3743
+ Button,
3744
+ {
3745
+ isLoading: props.isLoading,
3746
+ className: "hawa-mt-4 hawa-w-full"
3747
+ },
3748
+ texts == null ? void 0 : texts.registerText
3749
+ ),
3750
+ props.additionalButtons
3751
+ )), /* @__PURE__ */ import_react15.default.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-justify-center hawa-gap-1 hawa-p-3 hawa-text-center hawa-text-sm hawa-font-normal dark:hawa-text-white" }, /* @__PURE__ */ import_react15.default.createElement("span", null, texts == null ? void 0 : texts.existingUserText), /* @__PURE__ */ import_react15.default.createElement("span", { onClick: props.onRouteToLogin, className: "clickable-link" }, (texts == null ? void 0 : texts.loginText) || "Login")))), props.viaGithub || props.viaGoogle || props.viaTwitter ? /* @__PURE__ */ import_react15.default.createElement(
3752
+ CardFooter,
3753
+ {
3754
+ className: cn(
3755
+ props.logosOnly ? "hawa-flex hawa-flex-row hawa-justify-center hawa-gap-2" : "hawa-grid hawa-grid-cols-1 hawa-gap-2"
3756
+ )
3757
+ },
3758
+ /* @__PURE__ */ import_react15.default.createElement(
3759
+ AuthButtons,
3760
+ {
3761
+ texts: thirdPartyAuthTexts,
3762
+ viaGoogle: props.viaGoogle,
3763
+ viaGithub: props.viaGithub,
3764
+ viaTwitter: props.viaTwitter,
3765
+ isGoogleLoading: props.isGoogleLoading,
3766
+ isGithubLoading: props.isGithubLoading,
3767
+ isTwitterLoading: props.isTwitterLoading,
3768
+ handleGoogle: props.onGoogleRegister,
3769
+ handleGithub: props.onGithubRegister,
3770
+ handleTwitter: props.onTwitterRegister
3771
+ }
3772
+ )
3773
+ ) : null));
3774
+ };
3775
+
3776
+ // components/blocks/auth/AppLanding.tsx
3777
+ var import_react16 = __toESM(require("react"));
3778
+ var AppLanding = ({ texts, ...props }) => {
3779
+ const thirdPartyAuthTexts = {
3780
+ continueWithGoogle: texts == null ? void 0 : texts.continueWithGoogle,
3781
+ continueWithTwitter: texts == null ? void 0 : texts.continueWithTwitter,
3782
+ continueWithApple: texts == null ? void 0 : texts.continueWithApple,
3783
+ continueWithMicrosoft: texts == null ? void 0 : texts.continueWithMicrosoft,
3784
+ continueWithGithub: texts == null ? void 0 : texts.continueWithGithub,
3785
+ continueWithEmail: texts == null ? void 0 : texts.continueWithEmail,
3786
+ continueWithPhone: texts == null ? void 0 : texts.continueWithPhone
3787
+ };
3788
+ return /* @__PURE__ */ import_react16.default.createElement("div", { dir: props.direction }, /* @__PURE__ */ import_react16.default.createElement(Card, null, /* @__PURE__ */ import_react16.default.createElement(CardContent, { headless: true, className: "hawa-flex hawa-flex-col hawa-gap-6" }, /* @__PURE__ */ import_react16.default.createElement(
3789
+ AuthButtons,
3790
+ {
3791
+ texts: thirdPartyAuthTexts,
3792
+ viaApple: props.viaApple,
3793
+ viaGoogle: props.viaGoogle,
3794
+ viaEmail: props.viaEmail,
3795
+ viaGithub: props.viaGithub,
3796
+ viaMicrosoft: props.viaMicrosoft,
3797
+ viaPhone: props.viaPhone,
3798
+ viaTwitter: props.viaTwitter,
3799
+ handleApple: props.handleApple,
3800
+ handleGoogle: props.handleGoogle,
3801
+ handleTwitter: props.handleTwitter,
3802
+ handleMicrosoft: props.handleMicrosoft,
3803
+ handleGithub: props.handleGithub,
3804
+ handleEmail: props.handleEmail,
3805
+ handlePhone: props.handlePhone
3806
+ }
3807
+ ), props.allowRegister && /* @__PURE__ */ import_react16.default.createElement("div", { className: "hawa-p-3 hawa-text-center hawa-text-sm hawa-font-normal dark:hawa-text-gray-300" }, texts == null ? void 0 : texts.newUserText, " ", /* @__PURE__ */ import_react16.default.createElement(
3808
+ "span",
3809
+ {
3810
+ onClick: props.handleRouteToRegister,
3811
+ className: "clickable-link"
3812
+ },
3813
+ texts == null ? void 0 : texts.createAccount
3814
+ )))));
3815
+ };
3816
+
3817
+ // components/blocks/auth/CheckEmail.tsx
3818
+ var import_react17 = __toESM(require("react"));
3819
+ var CheckEmail = ({ texts, handleResend }) => {
3820
+ return /* @__PURE__ */ import_react17.default.createElement(Card, null, /* @__PURE__ */ import_react17.default.createElement(CardContent, { headless: true }, /* @__PURE__ */ import_react17.default.createElement("div", { className: "hawa-flex hawa-flex-col hawa-items-center hawa-justify-center hawa-text-center" }, /* @__PURE__ */ import_react17.default.createElement("div", { className: "hawa-flex hawa-h-16 hawa-w-16 hawa-flex-col hawa-items-center hawa-justify-center hawa-rounded-3xl hawa-bg-primary hawa-text-6xl hawa-font-bold hawa-text-primary-foreground" }, /* @__PURE__ */ import_react17.default.createElement(
3821
+ "svg",
3822
+ {
3823
+ stroke: "currentColor",
3824
+ fill: "none",
3825
+ strokeWidth: "2",
3826
+ viewBox: "0 0 24 24",
3827
+ strokeLinecap: "round",
3828
+ strokeLinejoin: "round",
3829
+ height: "0.5em",
3830
+ width: "0.5em",
3831
+ xmlns: "http://www.w3.org/2000/svg"
3832
+ },
3833
+ /* @__PURE__ */ import_react17.default.createElement("path", { d: "M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z" }),
3834
+ /* @__PURE__ */ import_react17.default.createElement("polyline", { points: "22,6 12,13 2,6" })
3835
+ )), /* @__PURE__ */ import_react17.default.createElement("div", { className: "hawa-m-2 hawa-text-xl hawa-font-bold" }, (texts == null ? void 0 : texts.checkEmail) || "Check your Email"), /* @__PURE__ */ import_react17.default.createElement("div", { className: "hawa-text-sm" }, (texts == null ? void 0 : texts.pleaseVerify) || "Thank you for signing up! To complete your registration, we've sent a verification email to the address you provided. Please check your inbox and follow the instructions in the email to activate your account."))), /* @__PURE__ */ import_react17.default.createElement(CardFooter, { className: "hawa-flex hawa-flex-col hawa-justify-center " }, /* @__PURE__ */ import_react17.default.createElement("span", { className: "clickable-link hawa-text-sm", onClick: handleResend }, (texts == null ? void 0 : texts.resendEmail) || "Resend Email")));
3836
+ };
3837
+
3838
+ // components/blocks/auth/NewPassword.tsx
3839
+ var import_react18 = __toESM(require("react"));
3840
+ var import_react_hook_form3 = require("react-hook-form");
3841
+ var import_zod3 = require("@hookform/resolvers/zod");
3842
+ var z3 = __toESM(require("zod"));
3843
+ var NewPasswordForm = ({ texts, ...props }) => {
3844
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i;
3845
+ const formSchema = z3.object({
3846
+ password: z3.string({ required_error: (_a = texts == null ? void 0 : texts.password) == null ? void 0 : _a.required }).min(1, { message: (_b = texts == null ? void 0 : texts.password) == null ? void 0 : _b.required }).min(8, { message: (_c = texts == null ? void 0 : texts.password) == null ? void 0 : _c.tooShort }),
3847
+ confirm_password: z3.string({ required_error: (_d = texts == null ? void 0 : texts.confirm) == null ? void 0 : _d.required }).refine((value) => value !== "", {
3848
+ message: (_e = texts == null ? void 0 : texts.password) == null ? void 0 : _e.required
3849
+ })
3850
+ }).refine((data) => data.password === data.confirm_password, {
3851
+ message: (_f = texts == null ? void 0 : texts.confirm) == null ? void 0 : _f.dontMatch,
3852
+ path: ["confirm_password"]
3853
+ });
3854
+ const { handleSubmit, control, formState } = (0, import_react_hook_form3.useForm)({
3855
+ resolver: (0, import_zod3.zodResolver)(formSchema)
3856
+ });
3857
+ const [matchError, setMatchError] = (0, import_react18.useState)(false);
3858
+ return /* @__PURE__ */ import_react18.default.createElement(Card, { dir: props.direction }, matchError && /* @__PURE__ */ import_react18.default.createElement(Alert, { text: (_g = texts == null ? void 0 : texts.confirm) == null ? void 0 : _g.dontMatch, severity: "error" }), props.passwordChanged ? /* @__PURE__ */ import_react18.default.createElement(CardContent, { headless: true }, /* @__PURE__ */ import_react18.default.createElement("div", { className: "hawa-text-center" }, texts == null ? void 0 : texts.passwordChanged)) : /* @__PURE__ */ import_react18.default.createElement(
3859
+ "form",
3860
+ {
3861
+ noValidate: true,
3862
+ onSubmit: handleSubmit((e) => {
3863
+ if (props.handleNewPassword) {
3864
+ return props.handleNewPassword(e);
3865
+ } else {
3866
+ console.log(
3867
+ "Form is submitted but handleSubmission prop is missing"
3868
+ );
3869
+ }
3870
+ })
3871
+ },
3872
+ !props.headless && /* @__PURE__ */ import_react18.default.createElement(CardHeader, null, /* @__PURE__ */ import_react18.default.createElement(CardTitle, null, "Create Password"), /* @__PURE__ */ import_react18.default.createElement(CardDescription, null, "Set a new password for your account")),
3873
+ /* @__PURE__ */ import_react18.default.createElement(
3874
+ CardContent,
3875
+ {
3876
+ headless: props.headless,
3877
+ className: "hawa-flex hawa-flex-col hawa-gap-4"
3878
+ },
3879
+ /* @__PURE__ */ import_react18.default.createElement(
3880
+ import_react_hook_form3.Controller,
3881
+ {
3882
+ control,
3883
+ name: "password",
3884
+ render: ({ field }) => {
3885
+ var _a2, _b2, _c2;
3886
+ return /* @__PURE__ */ import_react18.default.createElement(
3887
+ Input,
3888
+ {
3889
+ width: "full",
3890
+ type: "password",
3891
+ autoComplete: "new-password",
3892
+ label: (_a2 = texts == null ? void 0 : texts.password) == null ? void 0 : _a2.label,
3893
+ placeholder: (_b2 = texts == null ? void 0 : texts.password) == null ? void 0 : _b2.placeholder,
3894
+ helperText: (_c2 = formState.errors.password) == null ? void 0 : _c2.message,
3895
+ ...field
3896
+ }
3897
+ );
3898
+ }
3899
+ }
3900
+ ),
3901
+ /* @__PURE__ */ import_react18.default.createElement(
3902
+ import_react_hook_form3.Controller,
3903
+ {
3904
+ control,
3905
+ name: "confirm_password",
3906
+ render: ({ field }) => {
3907
+ var _a2, _b2, _c2;
3908
+ return /* @__PURE__ */ import_react18.default.createElement(
3909
+ Input,
3910
+ {
3911
+ width: "full",
3912
+ type: "password",
3913
+ autoComplete: "new-password",
3914
+ label: (_a2 = texts == null ? void 0 : texts.confirm) == null ? void 0 : _a2.label,
3915
+ placeholder: (_b2 = texts == null ? void 0 : texts.confirm) == null ? void 0 : _b2.placeholder,
3916
+ helperText: (_c2 = formState.errors.confirm_password) == null ? void 0 : _c2.message,
3917
+ ...field
3918
+ }
3919
+ );
3920
+ }
3921
+ }
3922
+ )
3923
+ ),
3924
+ /* @__PURE__ */ import_react18.default.createElement(CardFooter, { className: "hawa-flex hawa-flex-col" }, /* @__PURE__ */ import_react18.default.createElement(Button, { className: "hawa-w-full", type: "submit" }, texts == null ? void 0 : texts.updatePassword), props.allowRegister && /* @__PURE__ */ import_react18.default.createElement("div", { className: "hawa-mt-4 hawa-pb-0 hawa-text-center hawa-text-sm dark:hawa-text-gray-300" }, (_h = texts == null ? void 0 : texts.dontHaveAccount) != null ? _h : "Don't have an account? ", /* @__PURE__ */ import_react18.default.createElement(
3925
+ "span",
3926
+ {
3927
+ className: "clickable-link",
3928
+ onClick: props.handleRouteToRegister
3929
+ },
3930
+ (_i = texts == null ? void 0 : texts.registerText) != null ? _i : "Register"
3931
+ )))
3932
+ ));
3933
+ };
3934
+
3935
+ // components/blocks/auth/ResetPassword.tsx
3936
+ var import_react19 = __toESM(require("react"));
3937
+ var import_react_hook_form4 = require("react-hook-form");
3938
+ var import_zod4 = require("@hookform/resolvers/zod");
3939
+ var z4 = __toESM(require("zod"));
3940
+ var ResetPasswordForm = (props) => {
3941
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
3942
+ const formSchema = z4.object({
3943
+ email: z4.string({ required_error: (_b = (_a = props.texts) == null ? void 0 : _a.email) == null ? void 0 : _b.required }).email({ message: (_d = (_c = props.texts) == null ? void 0 : _c.email) == null ? void 0 : _d.invalid }).min(1, { message: (_f = (_e = props.texts) == null ? void 0 : _e.email) == null ? void 0 : _f.required })
3944
+ });
3945
+ const { handleSubmit, control, formState } = (0, import_react_hook_form4.useForm)({
3946
+ resolver: (0, import_zod4.zodResolver)(formSchema)
3947
+ });
3948
+ return /* @__PURE__ */ import_react19.default.createElement(Card, { dir: props.direction }, !props.sent ? /* @__PURE__ */ import_react19.default.createElement(import_react19.default.Fragment, null, !props.headless && /* @__PURE__ */ import_react19.default.createElement(CardHeader, null, /* @__PURE__ */ import_react19.default.createElement(CardTitle, null, " ", ((_g = props.texts) == null ? void 0 : _g.headTitle) || "Reset Password"), /* @__PURE__ */ import_react19.default.createElement(CardDescription, null, ((_h = props.texts) == null ? void 0 : _h.headDescription) || "Enter your email to reset your account password")), /* @__PURE__ */ import_react19.default.createElement(
3949
+ "form",
3950
+ {
3951
+ noValidate: true,
3952
+ onSubmit: handleSubmit((e) => {
3953
+ if (props.handleResetPassword) {
3954
+ return props.handleResetPassword(e);
3955
+ } else {
3956
+ console.log("handleResetPassword prop is missing");
3957
+ }
3958
+ })
3959
+ },
3960
+ /* @__PURE__ */ import_react19.default.createElement(CardContent, { headless: props.headless }, /* @__PURE__ */ import_react19.default.createElement(
3961
+ import_react_hook_form4.Controller,
3962
+ {
3963
+ control,
3964
+ name: "email",
3965
+ render: ({ field }) => {
3966
+ var _a2, _b2, _c2, _d2, _e2;
3967
+ return /* @__PURE__ */ import_react19.default.createElement(
3968
+ Input,
3969
+ {
3970
+ width: "full",
3971
+ label: (_b2 = (_a2 = props.texts) == null ? void 0 : _a2.email) == null ? void 0 : _b2.label,
3972
+ helperText: (_c2 = formState.errors.email) == null ? void 0 : _c2.message,
3973
+ placeholder: (_e2 = (_d2 = props.texts) == null ? void 0 : _d2.email) == null ? void 0 : _e2.placeholder,
3974
+ ...field
3975
+ }
3976
+ );
3977
+ }
3978
+ }
3979
+ )),
3980
+ /* @__PURE__ */ import_react19.default.createElement(CardFooter, { className: "hawa-flex hawa-flex-col" }, /* @__PURE__ */ import_react19.default.createElement(Button, { type: "submit", className: "hawa-w-full" }, (_i = props.texts) == null ? void 0 : _i.resetPassword), props.allowRegister && /* @__PURE__ */ import_react19.default.createElement("div", { className: "hawa-mt-4 hawa-pb-0 hawa-text-center hawa-text-sm dark:hawa-text-gray-300" }, (_k = (_j = props.texts) == null ? void 0 : _j.dontHaveAccount) != null ? _k : "Don't have an account? ", /* @__PURE__ */ import_react19.default.createElement(
3981
+ "span",
3982
+ {
3983
+ className: "clickable-link",
3984
+ onClick: props.handleRouteToRegister
3985
+ },
3986
+ (_m = (_l = props.texts) == null ? void 0 : _l.registerText) != null ? _m : "Register"
3987
+ )))
3988
+ )) : /* @__PURE__ */ import_react19.default.createElement(CardContent, { headless: true }, /* @__PURE__ */ import_react19.default.createElement("div", { className: "hawa-text-center" }, (_n = props.texts) == null ? void 0 : _n.emailSentText)));
3989
+ };
3990
+
3991
+ // components/blocks/auth/CodeConfirmation.tsx
3992
+ var import_react21 = __toESM(require("react"));
3993
+ var import_react_hook_form5 = require("react-hook-form");
3994
+ var import_zod5 = require("@hookform/resolvers/zod");
3995
+ var z5 = __toESM(require("zod"));
3996
+
3997
+ // components/elements/pinInput/PinInput.tsx
3998
+ var import_react20 = __toESM(require("react"));
3999
+ var PinInput = ({
4000
+ label,
4001
+ icon,
4002
+ digits,
4003
+ width = "normal",
4004
+ getPins,
4005
+ inputProps,
4006
+ ...props
4007
+ }) => {
4008
+ const [pin, setPin] = (0, import_react20.useState)(Array.from(Array(digits)));
4009
+ const handleKeyDown = (e, index) => {
4010
+ let backTo = 0;
4011
+ if (e.key === "Backspace") {
4012
+ e.target.value.length === 0 ? backTo = index - 1 : backTo = index;
4013
+ const previousInput = document.getElementById(`input-${backTo}`);
4014
+ previousInput == null ? void 0 : previousInput.focus();
4015
+ }
4016
+ };
4017
+ (0, import_react20.useEffect)(() => {
4018
+ let unfilled = pin.includes(void 0);
4019
+ if (!unfilled && getPins) {
4020
+ getPins(pin);
4021
+ }
4022
+ });
4023
+ const handleChange = (e, index) => {
4024
+ if (!/^\d*$/.test(e.target.value)) {
4025
+ const newPin = [...pin];
4026
+ newPin[index] = "";
4027
+ setPin(newPin);
4028
+ return;
4029
+ } else {
4030
+ const newPin = [...pin];
4031
+ newPin[index] = e.target.value;
4032
+ setPin(newPin);
4033
+ if (e.target.value.length === 1) {
4034
+ const nextInput = document.getElementById(`input-${index + 1}`);
4035
+ nextInput == null ? void 0 : nextInput.focus();
4036
+ } else if (e.target.value.length === 0) {
4037
+ const previousInput = document.getElementById(`input-${index - 1}`);
4038
+ previousInput == null ? void 0 : previousInput.focus();
4039
+ }
4040
+ }
4041
+ };
4042
+ return /* @__PURE__ */ import_react20.default.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, /* @__PURE__ */ import_react20.default.createElement(
4043
+ "div",
4044
+ {
4045
+ className: "hawa-flex hawa-w-full hawa-flex-row hawa-justify-center hawa-gap-2",
4046
+ dir: "ltr"
4047
+ },
4048
+ pin.map((value, index) => /* @__PURE__ */ import_react20.default.createElement(
4049
+ "input",
4050
+ {
4051
+ key: index,
4052
+ type: "text",
4053
+ maxLength: 1,
4054
+ value,
4055
+ id: `input-${index}`,
4056
+ pattern: "[0-9]*",
4057
+ className: cn(
4058
+ "hawa-h-10 hawa-rounded hawa-border hawa-bg-background hawa-text-center",
4059
+ width === "full" ? "hawa-w-full" : "hawa-w-10"
4060
+ ),
4061
+ onChange: (e) => handleChange(e, index),
4062
+ onKeyDown: (e) => handleKeyDown(e, index),
4063
+ onFocus: (e) => e.target.select(),
4064
+ ...inputProps
4065
+ }
4066
+ ))
4067
+ ), /* @__PURE__ */ import_react20.default.createElement(
4068
+ "p",
4069
+ {
4070
+ className: cn(
4071
+ "hawa-my-0 hawa-text-start hawa-text-xs hawa-text-helper-color hawa-transition-all",
4072
+ props.helperText ? "hawa-h-4 hawa-opacity-100" : "hawa-h-0 hawa-opacity-0"
4073
+ )
4074
+ },
4075
+ props.helperText
4076
+ ));
4077
+ };
4078
+
4079
+ // components/blocks/auth/CodeConfirmation.tsx
4080
+ var CodeConfirmation = (props) => {
4081
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
4082
+ const formSchema = z5.object({
4083
+ otp_code: z5.string({ required_error: (_a = props.texts) == null ? void 0 : _a.codeRequiredText }).min(6, { message: (_b = props.texts) == null ? void 0 : _b.codeTooShort })
4084
+ });
4085
+ const { handleSubmit, control, formState, setValue } = (0, import_react_hook_form5.useForm)({
4086
+ resolver: (0, import_zod5.zodResolver)(formSchema)
4087
+ });
4088
+ const [resendTimer, setResendTimer] = (0, import_react21.useState)(null);
4089
+ const [remainingTime, setRemainingTime] = (0, import_react21.useState)(0);
4090
+ const [showResendTimer, setShowResendTimer] = (0, import_react21.useState)(false);
4091
+ const startResendTimer = () => {
4092
+ if (resendTimer !== null) {
4093
+ clearInterval(resendTimer);
4094
+ setResendTimer(null);
4095
+ }
4096
+ const timerDuration = 60;
4097
+ setRemainingTime(timerDuration);
4098
+ setShowResendTimer(true);
4099
+ const newTimer = window.setInterval(() => {
4100
+ setRemainingTime((prevTime) => {
4101
+ if (prevTime > 0) {
4102
+ return prevTime - 1;
4103
+ } else {
4104
+ clearInterval(newTimer);
4105
+ setShowResendTimer(false);
4106
+ return 0;
4107
+ }
4108
+ });
4109
+ }, 1e3);
4110
+ setResendTimer(newTimer);
4111
+ };
4112
+ (0, import_react21.useEffect)(() => {
4113
+ return () => {
4114
+ if (resendTimer !== null) {
4115
+ clearInterval(resendTimer);
4116
+ }
4117
+ };
4118
+ }, []);
4119
+ return /* @__PURE__ */ import_react21.default.createElement(Card, null, /* @__PURE__ */ import_react21.default.createElement(CardContent, { headless: true }, props.showError && /* @__PURE__ */ import_react21.default.createElement(
4120
+ Alert,
4121
+ {
4122
+ title: props.errorTitle,
4123
+ text: props.errorText,
4124
+ severity: "error"
4125
+ }
4126
+ ), /* @__PURE__ */ import_react21.default.createElement("div", { className: "hawa-mb-4 dark:hawa-text-white" }, /* @__PURE__ */ import_react21.default.createElement("div", { className: "hawa-text-lg hawa-font-bold" }, ((_c = props.texts) == null ? void 0 : _c.checkYourPhone) || "Please check your phone"), /* @__PURE__ */ import_react21.default.createElement("div", { className: "hawa-text-muted-foreground" }, /* @__PURE__ */ import_react21.default.createElement("span", null, ((_d = props.texts) == null ? void 0 : _d.weSentCode) || "We've sent a code to "), /* @__PURE__ */ import_react21.default.createElement("span", null, props.phoneNumber))), /* @__PURE__ */ import_react21.default.createElement(
4127
+ "form",
4128
+ {
4129
+ noValidate: true,
4130
+ onSubmit: handleSubmit((e) => {
4131
+ if (props.handleConfirm) {
4132
+ return props.handleConfirm(e);
4133
+ } else {
4134
+ console.log(
4135
+ "Form is submitted but handleConfirm prop is missing"
4136
+ );
4137
+ }
4138
+ })
4139
+ },
4140
+ /* @__PURE__ */ import_react21.default.createElement(
4141
+ import_react_hook_form5.Controller,
4142
+ {
4143
+ control,
4144
+ name: "otp_code",
4145
+ render: ({ field }) => {
4146
+ var _a2;
4147
+ return /* @__PURE__ */ import_react21.default.createElement(
4148
+ PinInput,
4149
+ {
4150
+ width: "full",
4151
+ digits: 6,
4152
+ getPins: (e) => setValue("otp_code", e.join("")),
4153
+ helperText: (_a2 = formState.errors.otp_code) == null ? void 0 : _a2.message
4154
+ }
4155
+ );
4156
+ }
4157
+ }
4158
+ ),
4159
+ showResendTimer ? /* @__PURE__ */ import_react21.default.createElement("div", { className: " hawa-py-2 hawa-text-center hawa-text-xs hawa-text-muted-foreground" }, (_e = props.texts) == null ? void 0 : _e.resendCodeTimer, " ", /* @__PURE__ */ import_react21.default.createElement("strong", null, remainingTime), " ", (_f = props.texts) == null ? void 0 : _f.seconds) : /* @__PURE__ */ import_react21.default.createElement("div", { className: " hawa-py-2 hawa-text-center hawa-text-xs hawa-text-muted-foreground" }, /* @__PURE__ */ import_react21.default.createElement("span", null, (_h = (_g = props.texts) == null ? void 0 : _g.didntGetCode) != null ? _h : "Didn't get the code?"), " ", /* @__PURE__ */ import_react21.default.createElement(
4160
+ "span",
4161
+ {
4162
+ className: "clickable-link",
4163
+ onClick: () => {
4164
+ startResendTimer();
4165
+ props.handleResend();
4166
+ }
4167
+ },
4168
+ ((_i = props.texts) == null ? void 0 : _i.resendCode) || "Click to resend"
4169
+ )),
4170
+ /* @__PURE__ */ import_react21.default.createElement("div", { className: "hawa-mt-4 hawa-grid hawa-grid-cols-2 hawa-gap-2" }, /* @__PURE__ */ import_react21.default.createElement(Button, { variant: "secondary" }, ((_j = props.texts) == null ? void 0 : _j.cancel) || "Cancel"), /* @__PURE__ */ import_react21.default.createElement(Button, { isLoading: props.confirmLoading }, ((_k = props.texts) == null ? void 0 : _k.confirm) || "Confirm"))
4171
+ )));
4172
+ };
4173
+ // Annotate the CommonJS export names for ESM import in node:
4174
+ 0 && (module.exports = {
4175
+ AppLanding,
4176
+ CheckEmail,
4177
+ CodeConfirmation,
4178
+ LoginForm,
4179
+ NewPasswordForm,
4180
+ RegisterForm,
4181
+ ResetPasswordForm
4182
+ });