lawgic-dev-kit 0.22.16 → 0.22.18
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.
- package/dist/components/atoms/PasswordInput/PasswordInput.js +4 -4
- package/dist/components/atoms/SelectInput/SelectInput.js +4 -4
- package/dist/components/atoms/TextInput/TextInput.js +23 -23
- package/dist/components/atoms/UncontrolledSelector/UncontrolledSelector.js +6 -6
- package/dist/components/atoms/UncontrolledTextInput/UncontrolledTextInput.js +8 -8
- package/dist/components/molecules/MultiSelectDropdown/MultiSelectDropdown.js +10 -10
- package/dist/components/molecules/SingleSelectDropdown/SingleSelectDropdown.js +8 -8
- package/dist/lawgic-dev-kit.umd.js +7 -7
- package/package.json +1 -1
|
@@ -20,15 +20,15 @@ const V = ({
|
|
|
20
20
|
} = w({ name: e, control: c }), [s, h] = y(!1), { t: u } = N(), l = {
|
|
21
21
|
sm: {
|
|
22
22
|
container: "px-16 py-8",
|
|
23
|
-
text: "text-
|
|
24
|
-
label: "text-
|
|
23
|
+
text: "text-sm",
|
|
24
|
+
label: "text-sm",
|
|
25
25
|
error: "text-sm",
|
|
26
26
|
gap: "gap-8"
|
|
27
27
|
},
|
|
28
28
|
md: {
|
|
29
29
|
container: "p-16",
|
|
30
|
-
text: "text-
|
|
31
|
-
label: "text-
|
|
30
|
+
text: "text-14",
|
|
31
|
+
label: "text-14",
|
|
32
32
|
error: "text-sm",
|
|
33
33
|
gap: "gap-8"
|
|
34
34
|
}
|
|
@@ -57,16 +57,16 @@ const me = ({
|
|
|
57
57
|
const { t: o } = Q(), [s, j] = $(!1), [v, C] = $(""), [l, S] = $(i || null), w = z(null), O = z(null), r = {
|
|
58
58
|
sm: {
|
|
59
59
|
container: "px-16 py-8",
|
|
60
|
-
text: "text-
|
|
61
|
-
label: "text-
|
|
60
|
+
text: "text-sm",
|
|
61
|
+
label: "text-sm",
|
|
62
62
|
error: "text-sm",
|
|
63
63
|
gap: "gap-8",
|
|
64
64
|
icon: "w-12 h-12"
|
|
65
65
|
},
|
|
66
66
|
md: {
|
|
67
67
|
container: "p-16",
|
|
68
|
-
text: "text-
|
|
69
|
-
label: "text-
|
|
68
|
+
text: "text-14",
|
|
69
|
+
label: "text-14",
|
|
70
70
|
error: "text-sm",
|
|
71
71
|
gap: "gap-8",
|
|
72
72
|
icon: "w-16 h-16"
|
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
import { j as
|
|
1
|
+
import { j as o } from "../../../_virtual/jsx-runtime.js";
|
|
2
2
|
import { useController as w } from "react-hook-form";
|
|
3
3
|
import { useTheme as v } from "../../../hooks/useTheme.js";
|
|
4
4
|
import "react";
|
|
5
5
|
const S = ({
|
|
6
6
|
label: c,
|
|
7
|
-
control:
|
|
7
|
+
control: x,
|
|
8
8
|
name: e,
|
|
9
|
-
placeholder:
|
|
9
|
+
placeholder: d,
|
|
10
10
|
className: i = "",
|
|
11
11
|
disabled: t = !1,
|
|
12
12
|
leftSide: a,
|
|
13
13
|
rightSide: n,
|
|
14
14
|
translateKey: p = "",
|
|
15
15
|
size: g = "md",
|
|
16
|
-
...
|
|
16
|
+
...m
|
|
17
17
|
}) => {
|
|
18
18
|
const {
|
|
19
|
-
field: { value: u = "", onChange:
|
|
19
|
+
field: { value: u = "", onChange: b, ref: f, onBlur: h },
|
|
20
20
|
fieldState: { error: r }
|
|
21
|
-
} = w({ name: e, control:
|
|
21
|
+
} = w({ name: e, control: x }), { t: s } = v(), l = {
|
|
22
22
|
sm: {
|
|
23
23
|
container: "px-16 py-8",
|
|
24
|
-
text: "text-
|
|
25
|
-
label: "text-
|
|
24
|
+
text: "text-sm",
|
|
25
|
+
label: "text-sm",
|
|
26
26
|
error: "text-sm",
|
|
27
27
|
gap: "gap-8"
|
|
28
28
|
},
|
|
29
29
|
md: {
|
|
30
30
|
container: "p-16",
|
|
31
|
-
text: "text-
|
|
32
|
-
label: "text-
|
|
31
|
+
text: "text-14",
|
|
32
|
+
label: "text-14",
|
|
33
33
|
error: "text-sm",
|
|
34
34
|
gap: "gap-8"
|
|
35
35
|
}
|
|
36
|
-
}[g],
|
|
37
|
-
return /* @__PURE__ */
|
|
36
|
+
}[g], $ = s(e), y = s(p);
|
|
37
|
+
return /* @__PURE__ */ o.jsxs(
|
|
38
38
|
"label",
|
|
39
39
|
{
|
|
40
|
-
className: `flex flex-col group select-none ${
|
|
40
|
+
className: `flex flex-col group select-none ${l.gap} ${t && "cursor-not-allowed"} ${i}`,
|
|
41
41
|
htmlFor: e,
|
|
42
42
|
children: [
|
|
43
|
-
/* @__PURE__ */
|
|
43
|
+
/* @__PURE__ */ o.jsx(
|
|
44
44
|
"h6",
|
|
45
45
|
{
|
|
46
|
-
className: `text-gray-600 font-600 leading-none group ${r && "text-red-500!"} ${
|
|
46
|
+
className: `text-gray-600 font-600 leading-none group ${r && "text-red-500!"} ${l.label} ${t && "text-gray-300"}`,
|
|
47
47
|
children: c
|
|
48
48
|
}
|
|
49
49
|
),
|
|
50
|
-
/* @__PURE__ */
|
|
50
|
+
/* @__PURE__ */ o.jsxs(
|
|
51
51
|
"label",
|
|
52
52
|
{
|
|
53
53
|
htmlFor: e,
|
|
54
54
|
className: `
|
|
55
|
-
flex items-center justify-between gap-8 ${
|
|
55
|
+
flex items-center justify-between gap-8 ${l.container}
|
|
56
56
|
|
|
57
57
|
${r && "border-red-500!"}
|
|
58
58
|
|
|
@@ -70,26 +70,26 @@ const S = ({
|
|
|
70
70
|
`,
|
|
71
71
|
children: [
|
|
72
72
|
a && a,
|
|
73
|
-
/* @__PURE__ */
|
|
73
|
+
/* @__PURE__ */ o.jsx(
|
|
74
74
|
"input",
|
|
75
75
|
{
|
|
76
76
|
id: e,
|
|
77
77
|
name: e,
|
|
78
78
|
disabled: t,
|
|
79
|
-
placeholder:
|
|
79
|
+
placeholder: d,
|
|
80
80
|
value: u,
|
|
81
|
-
onChange: (j) =>
|
|
81
|
+
onChange: (j) => b(j.target.value),
|
|
82
82
|
onBlur: h,
|
|
83
83
|
ref: f,
|
|
84
|
-
className: `group bg-transparent w-full h-full font-600 placeholder:font-600 select-text ${
|
|
85
|
-
...
|
|
84
|
+
className: `group bg-transparent w-full h-full font-600 placeholder:font-600 select-text ${l.text} disabled:text-gray-300 disabled:placeholder:text-gray-300 placeholder:text-gray-400 disabled:cursor-not-allowed overflow-visible outline-hidden`,
|
|
85
|
+
...m
|
|
86
86
|
}
|
|
87
87
|
),
|
|
88
88
|
n && n
|
|
89
89
|
]
|
|
90
90
|
}
|
|
91
91
|
),
|
|
92
|
-
(r == null ? void 0 : r.message) && /* @__PURE__ */
|
|
92
|
+
(r == null ? void 0 : r.message) && /* @__PURE__ */ o.jsx("h4", { className: `font-500 text-red-500 leading-none ${l.error}`, children: s(r.message, { x: y || $ }) })
|
|
93
93
|
]
|
|
94
94
|
}
|
|
95
95
|
);
|
|
@@ -22,21 +22,21 @@ const me = ({
|
|
|
22
22
|
const [a, m] = N(!1), [l, p] = N(""), h = $(null), T = $(null), x = r.find((e) => e.value === s), n = {
|
|
23
23
|
sm: {
|
|
24
24
|
container: "px-16 py-8",
|
|
25
|
-
text: "text-
|
|
26
|
-
label: "text-
|
|
25
|
+
text: "text-sm",
|
|
26
|
+
label: "text-sm",
|
|
27
27
|
error: "text-sm",
|
|
28
28
|
gap: "gap-8",
|
|
29
29
|
icon: "w-12 h-12",
|
|
30
|
-
option: "text-
|
|
30
|
+
option: "text-sm"
|
|
31
31
|
},
|
|
32
32
|
md: {
|
|
33
33
|
container: "p-16",
|
|
34
|
-
text: "text-
|
|
35
|
-
label: "text-
|
|
34
|
+
text: "text-14",
|
|
35
|
+
label: "text-14",
|
|
36
36
|
error: "text-sm",
|
|
37
37
|
gap: "gap-8",
|
|
38
38
|
icon: "w-16 h-16",
|
|
39
|
-
option: "text-
|
|
39
|
+
option: "text-14"
|
|
40
40
|
}
|
|
41
41
|
}[R], v = g(() => r.map((e) => ({
|
|
42
42
|
...e,
|
|
@@ -8,10 +8,10 @@ const w = ({
|
|
|
8
8
|
name: t,
|
|
9
9
|
error: l,
|
|
10
10
|
placeholder: i,
|
|
11
|
-
className:
|
|
11
|
+
className: g = "",
|
|
12
12
|
disabled: e = !1,
|
|
13
13
|
disabledInput: s = !1,
|
|
14
|
-
size:
|
|
14
|
+
size: d = "md",
|
|
15
15
|
leftSide: a,
|
|
16
16
|
rightSide: c,
|
|
17
17
|
...b
|
|
@@ -19,23 +19,23 @@ const w = ({
|
|
|
19
19
|
const { t: x } = h(), r = {
|
|
20
20
|
sm: {
|
|
21
21
|
container: "px-16 py-8",
|
|
22
|
-
text: "text-
|
|
23
|
-
label: "text-
|
|
22
|
+
text: "text-sm",
|
|
23
|
+
label: "text-sm",
|
|
24
24
|
error: "text-sm",
|
|
25
25
|
gap: "gap-8"
|
|
26
26
|
},
|
|
27
27
|
md: {
|
|
28
28
|
container: "p-16",
|
|
29
|
-
text: "text-
|
|
30
|
-
label: "text-
|
|
29
|
+
text: "text-14",
|
|
30
|
+
label: "text-14",
|
|
31
31
|
error: "text-14",
|
|
32
32
|
gap: "gap-8"
|
|
33
33
|
}
|
|
34
|
-
}[
|
|
34
|
+
}[d];
|
|
35
35
|
return /* @__PURE__ */ o.jsxs(
|
|
36
36
|
"label",
|
|
37
37
|
{
|
|
38
|
-
className: `flex flex-col group select-none ${r.gap} ${e && "cursor-not-allowed"} ${
|
|
38
|
+
className: `flex flex-col group select-none ${r.gap} ${e && "cursor-not-allowed"} ${g}`,
|
|
39
39
|
htmlFor: t,
|
|
40
40
|
children: [
|
|
41
41
|
/* @__PURE__ */ o.jsx(
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { j as e } from "../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import E, { useState as
|
|
2
|
+
import E, { useState as b, useRef as v, useCallback as _ } from "react";
|
|
3
3
|
import { useFloating as q, useClick as H, useDismiss as Y, useInteractions as A, useTransitionStyles as G } from "../../../node_modules/@floating-ui/react/dist/floating-ui.react.js";
|
|
4
4
|
import "../../../node_modules/@fortawesome/react-fontawesome/index.es.js";
|
|
5
5
|
import "../../../_virtual/lodash.js";
|
|
@@ -25,25 +25,25 @@ const fe = ({
|
|
|
25
25
|
size: C = "md"
|
|
26
26
|
}) => {
|
|
27
27
|
var y;
|
|
28
|
-
const [l, h] =
|
|
28
|
+
const [l, h] = b(!1), [i, f] = b(""), $ = v(null), z = v(null), o = {
|
|
29
29
|
sm: {
|
|
30
30
|
container: "px-16 py-8",
|
|
31
|
-
text: "text-
|
|
32
|
-
label: "text-
|
|
31
|
+
text: "text-sm",
|
|
32
|
+
label: "text-sm",
|
|
33
33
|
icon: "w-12 h-12",
|
|
34
34
|
checkboxSize: 16,
|
|
35
35
|
gap: "gap-8",
|
|
36
|
-
searchText: "text-
|
|
36
|
+
searchText: "text-sm",
|
|
37
37
|
searchIcon: "size-12"
|
|
38
38
|
},
|
|
39
39
|
md: {
|
|
40
40
|
container: "p-16",
|
|
41
|
-
text: "text-
|
|
42
|
-
label: "text-
|
|
41
|
+
text: "text-14",
|
|
42
|
+
label: "text-14",
|
|
43
43
|
icon: "w-16 h-16",
|
|
44
44
|
checkboxSize: 20,
|
|
45
45
|
gap: "gap-8",
|
|
46
|
-
searchText: "text-
|
|
46
|
+
searchText: "text-14",
|
|
47
47
|
searchIcon: "size-16"
|
|
48
48
|
}
|
|
49
49
|
}[C], { x: S, y: L, strategy: M, refs: x, context: d } = q({
|
|
@@ -151,7 +151,7 @@ const fe = ({
|
|
|
151
151
|
)
|
|
152
152
|
] }) }),
|
|
153
153
|
/* @__PURE__ */ e.jsx("div", { className: "max-h-[450px] overflow-y-auto", children: g.length > 0 ? /* @__PURE__ */ e.jsx("div", { className: "py-4", children: g.map((t) => {
|
|
154
|
-
var a, c,
|
|
154
|
+
var a, c, j;
|
|
155
155
|
const s = n.includes(t.value);
|
|
156
156
|
return /* @__PURE__ */ e.jsxs(E.Fragment, { children: [
|
|
157
157
|
t.dividerBefore && /* @__PURE__ */ e.jsx("div", { className: "px-16 py-8", children: /* @__PURE__ */ e.jsx("hr", { className: "border-t border-gray-200" }) }),
|
|
@@ -175,7 +175,7 @@ const fe = ({
|
|
|
175
175
|
{
|
|
176
176
|
className: `flex items-center rounded-[8px] py-4 px-8 gap-[6px] overflow-hidden ${((a = t.colors) == null ? void 0 : a.bgColor) || ""} ${((c = t.colors) == null ? void 0 : c.textColor) || ""}`,
|
|
177
177
|
children: [
|
|
178
|
-
((
|
|
178
|
+
((j = t.colors) == null ? void 0 : j.dotColor) && /* @__PURE__ */ e.jsx(
|
|
179
179
|
"span",
|
|
180
180
|
{
|
|
181
181
|
className: "size-6 rounded-full flex-shrink-0",
|
|
@@ -29,22 +29,22 @@ const je = ({
|
|
|
29
29
|
const [n, i] = N(!1), [l, c] = N(""), R = w(null), B = w(null), s = {
|
|
30
30
|
sm: {
|
|
31
31
|
container: "px-16 py-8",
|
|
32
|
-
text: "text-
|
|
33
|
-
label: "text-
|
|
32
|
+
text: "text-sm",
|
|
33
|
+
label: "text-sm",
|
|
34
34
|
icon: "w-12 h-12",
|
|
35
35
|
checkboxSize: 16,
|
|
36
36
|
gap: "gap-8",
|
|
37
|
-
searchText: "text-
|
|
37
|
+
searchText: "text-sm",
|
|
38
38
|
searchIcon: "size-12"
|
|
39
39
|
},
|
|
40
40
|
md: {
|
|
41
41
|
container: "p-16",
|
|
42
|
-
text: "text-
|
|
43
|
-
label: "text-
|
|
42
|
+
text: "text-14",
|
|
43
|
+
label: "text-14",
|
|
44
44
|
icon: "w-16 h-16",
|
|
45
45
|
checkboxSize: 20,
|
|
46
46
|
gap: "gap-8",
|
|
47
|
-
searchText: "text-
|
|
47
|
+
searchText: "text-14",
|
|
48
48
|
searchIcon: "size-16"
|
|
49
49
|
}
|
|
50
50
|
}[L], { x: I, y: O, strategy: T, refs: d, context: x } = q({
|
|
@@ -155,7 +155,7 @@ const je = ({
|
|
|
155
155
|
)
|
|
156
156
|
] }) }),
|
|
157
157
|
/* @__PURE__ */ e.jsx("div", { className: "max-h-[450px] overflow-y-auto", children: h.length > 0 ? /* @__PURE__ */ e.jsx("div", { className: "py-4", children: h.map((t) => {
|
|
158
|
-
var
|
|
158
|
+
var v, b, k;
|
|
159
159
|
const p = a === t.value;
|
|
160
160
|
return /* @__PURE__ */ e.jsxs(Y.Fragment, { children: [
|
|
161
161
|
t.dividerBefore && /* @__PURE__ */ e.jsx("div", { className: "px-16 py-8", children: /* @__PURE__ */ e.jsx("hr", { className: "border-t border-gray-200" }) }),
|
|
@@ -177,7 +177,7 @@ const je = ({
|
|
|
177
177
|
/* @__PURE__ */ e.jsxs(
|
|
178
178
|
"div",
|
|
179
179
|
{
|
|
180
|
-
className: `flex items-center rounded-[8px] py-4 px-8 gap-[6px] overflow-hidden ${((
|
|
180
|
+
className: `flex items-center rounded-[8px] py-4 px-8 gap-[6px] overflow-hidden ${((v = t.colors) == null ? void 0 : v.bgColor) || ""} ${((b = t.colors) == null ? void 0 : b.textColor) || ""}`,
|
|
181
181
|
children: [
|
|
182
182
|
((k = t.colors) == null ? void 0 : k.dotColor) && /* @__PURE__ */ e.jsx(
|
|
183
183
|
"span",
|
|
@@ -667,7 +667,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
667
667
|
*/const zD={prefix:"fas",iconName:"circle",icon:[512,512,[128308,128309,128992,128993,128994,128995,128996,9679,9898,9899,11044,61708,61915],"f111","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512z"]},GD={prefix:"fas",iconName:"magnifying-glass",icon:[512,512,[128269,"search"],"f002","M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z"]},YD={prefix:"fas",iconName:"chevron-down",icon:[512,512,[],"f078","M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"]},HD={prefix:"fas",iconName:"plus",icon:[448,512,[10133,61543,"add"],"2b","M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 144L48 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l144 0 0 144c0 17.7 14.3 32 32 32s32-14.3 32-32l0-144 144 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-144 0 0-144z"]},qD={prefix:"fas",iconName:"chevron-left",icon:[320,512,[9001],"f053","M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z"]},wb={prefix:"fas",iconName:"check",icon:[448,512,[10003,10004],"f00c","M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"]};function Xa(){return typeof window<"u"}function ui(e){return Sb(e)?(e.nodeName||"").toLowerCase():"#document"}function zt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function kn(e){var t;return(t=(Sb(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Sb(e){return Xa()?e instanceof Node||e instanceof zt(e).Node:!1}function it(e){return Xa()?e instanceof Element||e instanceof zt(e).Element:!1}function Gt(e){return Xa()?e instanceof HTMLElement||e instanceof zt(e).HTMLElement:!1}function Ad(e){return!Xa()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof zt(e).ShadowRoot}function _o(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=on(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(s)}function KD(e){return["table","td","th"].includes(ui(e))}function Za(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Md(e){const t=Ja(),n=it(e)?on(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function XD(e){let t=Jn(e);for(;Gt(t)&&!Zn(t);){if(Md(t))return t;if(Za(t))return null;t=Jn(t)}return null}function Ja(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Zn(e){return["html","body","#document"].includes(ui(e))}function on(e){return zt(e).getComputedStyle(e)}function Qa(e){return it(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Jn(e){if(ui(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ad(e)&&e.host||kn(e);return Ad(t)?t.host:t}function Tb(e){const t=Jn(e);return Zn(t)?e.ownerDocument?e.ownerDocument.body:e.body:Gt(t)&&_o(t)?t:Tb(t)}function kr(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=Tb(e),o=s===((r=e.ownerDocument)==null?void 0:r.body),a=zt(s);if(o){const c=Od(a);return t.concat(a,a.visualViewport||[],_o(s)?s:[],c&&n?kr(c):[])}return t.concat(s,kr(s,[],n))}function Od(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Cb(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Ad(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Eb(e,t){return["mouse","pen"].includes(e)}function ZD(e){return"nativeEvent"in e}function JD(e){return e.matches("html,body")}function Pb(e){return(e==null?void 0:e.ownerDocument)||document}function $d(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function Io(e){return"composedPath"in e?e.composedPath()[0]:e.target}const QD="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function e6(e){return Gt(e)&&e.matches(QD)}const jr=Math.min,Yt=Math.max,el=Math.round,tl=Math.floor,jn=e=>({x:e,y:e}),t6={left:"right",right:"left",bottom:"top",top:"bottom"},n6={start:"end",end:"start"};function _d(e,t,n){return Yt(e,jr(t,n))}function fi(e,t){return typeof e=="function"?e(t):e}function Lr(e){return e.split("-")[0]}function di(e){return e.split("-")[1]}function Ab(e){return e==="x"?"y":"x"}function Id(e){return e==="y"?"height":"width"}function hs(e){return["top","bottom"].includes(Lr(e))?"y":"x"}function Dd(e){return Ab(hs(e))}function r6(e,t,n){n===void 0&&(n=!1);const r=di(e),s=Dd(e),o=Id(s);let a=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=nl(a)),[a,nl(a)]}function s6(e){const t=nl(e);return[Nd(e),t,Nd(t)]}function Nd(e){return e.replace(/start|end/g,t=>n6[t])}function i6(e,t,n){const r=["left","right"],s=["right","left"],o=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?s:r:t?r:s;case"left":case"right":return t?o:a;default:return[]}}function o6(e,t,n,r){const s=di(e);let o=i6(Lr(e),n==="start",r);return s&&(o=o.map(a=>a+"-"+s),t&&(o=o.concat(o.map(Nd)))),o}function nl(e){return e.replace(/left|right|bottom|top/g,t=>t6[t])}function a6(e){return{top:0,right:0,bottom:0,left:0,...e}}function Mb(e){return typeof e!="number"?a6(e):{top:e,right:e,bottom:e,left:e}}function rl(e){const{x:t,y:n,width:r,height:s}=e;return{width:r,height:s,top:n,left:t,right:t+r,bottom:n+s,x:t,y:n}}function Ob(e,t,n){let{reference:r,floating:s}=e;const o=hs(t),a=Dd(t),c=Id(a),u=Lr(t),d=o==="y",h=r.x+r.width/2-s.width/2,p=r.y+r.height/2-s.height/2,m=r[c]/2-s[c]/2;let x;switch(u){case"top":x={x:h,y:r.y-s.height};break;case"bottom":x={x:h,y:r.y+r.height};break;case"right":x={x:r.x+r.width,y:p};break;case"left":x={x:r.x-s.width,y:p};break;default:x={x:r.x,y:r.y}}switch(di(t)){case"start":x[a]-=m*(n&&d?-1:1);break;case"end":x[a]+=m*(n&&d?-1:1);break}return x}const l6=async(e,t,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:o=[],platform:a}=n,c=o.filter(Boolean),u=await(a.isRTL==null?void 0:a.isRTL(t));let d=await a.getElementRects({reference:e,floating:t,strategy:s}),{x:h,y:p}=Ob(d,r,u),m=r,x={},S=0;for(let b=0;b<c.length;b++){const{name:T,fn:v}=c[b],{x:A,y:C,data:I,reset:P}=await v({x:h,y:p,initialPlacement:r,placement:m,strategy:s,middlewareData:x,rects:d,platform:a,elements:{reference:e,floating:t}});h=A??h,p=C??p,x={...x,[T]:{...x[T],...I}},P&&S<=50&&(S++,typeof P=="object"&&(P.placement&&(m=P.placement),P.rects&&(d=P.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:s}):P.rects),{x:h,y:p}=Ob(d,m,u)),b=-1)}return{x:h,y:p,placement:m,strategy:s,middlewareData:x}};async function kd(e,t){var n;t===void 0&&(t={});const{x:r,y:s,platform:o,rects:a,elements:c,strategy:u}=e,{boundary:d="clippingAncestors",rootBoundary:h="viewport",elementContext:p="floating",altBoundary:m=!1,padding:x=0}=fi(t,e),S=Mb(x),T=c[m?p==="floating"?"reference":"floating":p],v=rl(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(T)))==null||n?T:T.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(c.floating)),boundary:d,rootBoundary:h,strategy:u})),A=p==="floating"?{x:r,y:s,width:a.floating.width,height:a.floating.height}:a.reference,C=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c.floating)),I=await(o.isElement==null?void 0:o.isElement(C))?await(o.getScale==null?void 0:o.getScale(C))||{x:1,y:1}:{x:1,y:1},P=rl(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:A,offsetParent:C,strategy:u}):A);return{top:(v.top-P.top+S.top)/I.y,bottom:(P.bottom-v.bottom+S.bottom)/I.y,left:(v.left-P.left+S.left)/I.x,right:(P.right-v.right+S.right)/I.x}}const c6=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:s,rects:o,platform:a,elements:c,middlewareData:u}=t,{element:d,padding:h=0}=fi(e,t)||{};if(d==null)return{};const p=Mb(h),m={x:n,y:r},x=Dd(s),S=Id(x),b=await a.getDimensions(d),T=x==="y",v=T?"top":"left",A=T?"bottom":"right",C=T?"clientHeight":"clientWidth",I=o.reference[S]+o.reference[x]-m[x]-o.floating[S],P=m[x]-o.reference[x],D=await(a.getOffsetParent==null?void 0:a.getOffsetParent(d));let R=D?D[C]:0;(!R||!await(a.isElement==null?void 0:a.isElement(D)))&&(R=c.floating[C]||o.floating[S]);const F=I/2-P/2,W=R/2-b[S]/2-1,Q=jr(p[v],W),ee=jr(p[A],W),ae=Q,ge=R-b[S]-ee,de=R/2-b[S]/2+F,le=_d(ae,de,ge),ue=!u.arrow&&di(s)!=null&&de!==le&&o.reference[S]/2-(de<ae?Q:ee)-b[S]/2<0,Y=ue?de<ae?de-ae:de-ge:0;return{[x]:m[x]+Y,data:{[x]:le,centerOffset:de-le-Y,...ue&&{alignmentOffset:Y}},reset:ue}}}),u6=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:s,middlewareData:o,rects:a,initialPlacement:c,platform:u,elements:d}=t,{mainAxis:h=!0,crossAxis:p=!0,fallbackPlacements:m,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:b=!0,...T}=fi(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const v=Lr(s),A=hs(c),C=Lr(c)===c,I=await(u.isRTL==null?void 0:u.isRTL(d.floating)),P=m||(C||!b?[nl(c)]:s6(c)),D=S!=="none";!m&&D&&P.push(...o6(c,b,S,I));const R=[c,...P],F=await kd(t,T),W=[];let Q=((r=o.flip)==null?void 0:r.overflows)||[];if(h&&W.push(F[v]),p){const de=r6(s,a,I);W.push(F[de[0]],F[de[1]])}if(Q=[...Q,{placement:s,overflows:W}],!W.every(de=>de<=0)){var ee,ae;const de=(((ee=o.flip)==null?void 0:ee.index)||0)+1,le=R[de];if(le)return{data:{index:de,overflows:Q},reset:{placement:le}};let ue=(ae=Q.filter(Y=>Y.overflows[0]<=0).sort((Y,z)=>Y.overflows[1]-z.overflows[1])[0])==null?void 0:ae.placement;if(!ue)switch(x){case"bestFit":{var ge;const Y=(ge=Q.filter(z=>{if(D){const K=hs(z.placement);return K===A||K==="y"}return!0}).map(z=>[z.placement,z.overflows.filter(K=>K>0).reduce((K,$)=>K+$,0)]).sort((z,K)=>z[1]-K[1])[0])==null?void 0:ge[0];Y&&(ue=Y);break}case"initialPlacement":ue=c;break}if(s!==ue)return{reset:{placement:ue}}}return{}}}};async function f6(e,t){const{placement:n,platform:r,elements:s}=e,o=await(r.isRTL==null?void 0:r.isRTL(s.floating)),a=Lr(n),c=di(n),u=hs(n)==="y",d=["left","top"].includes(a)?-1:1,h=o&&u?-1:1,p=fi(t,e);let{mainAxis:m,crossAxis:x,alignmentAxis:S}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return c&&typeof S=="number"&&(x=c==="end"?S*-1:S),u?{x:x*h,y:m*d}:{x:m*d,y:x*h}}const d6=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:s,y:o,placement:a,middlewareData:c}=t,u=await f6(t,e);return a===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:s+u.x,y:o+u.y,data:{...u,placement:a}}}}},h6=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:s}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:c={fn:T=>{let{x:v,y:A}=T;return{x:v,y:A}}},...u}=fi(e,t),d={x:n,y:r},h=await kd(t,u),p=hs(Lr(s)),m=Ab(p);let x=d[m],S=d[p];if(o){const T=m==="y"?"top":"left",v=m==="y"?"bottom":"right",A=x+h[T],C=x-h[v];x=_d(A,x,C)}if(a){const T=p==="y"?"top":"left",v=p==="y"?"bottom":"right",A=S+h[T],C=S-h[v];S=_d(A,S,C)}const b=c.fn({...t,[m]:x,[p]:S});return{...b,data:{x:b.x-n,y:b.y-r,enabled:{[m]:o,[p]:a}}}}}},p6=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:s,rects:o,platform:a,elements:c}=t,{apply:u=()=>{},...d}=fi(e,t),h=await kd(t,d),p=Lr(s),m=di(s),x=hs(s)==="y",{width:S,height:b}=o.floating;let T,v;p==="top"||p==="bottom"?(T=p,v=m===(await(a.isRTL==null?void 0:a.isRTL(c.floating))?"start":"end")?"left":"right"):(v=p,T=m==="end"?"top":"bottom");const A=b-h.top-h.bottom,C=S-h.left-h.right,I=jr(b-h[T],A),P=jr(S-h[v],C),D=!t.middlewareData.shift;let R=I,F=P;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(F=C),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(R=A),D&&!m){const Q=Yt(h.left,0),ee=Yt(h.right,0),ae=Yt(h.top,0),ge=Yt(h.bottom,0);x?F=S-2*(Q!==0||ee!==0?Q+ee:Yt(h.left,h.right)):R=b-2*(ae!==0||ge!==0?ae+ge:Yt(h.top,h.bottom))}await u({...t,availableWidth:F,availableHeight:R});const W=await a.getDimensions(c.floating);return S!==W.width||b!==W.height?{reset:{rects:!0}}:{}}}};function $b(e){const t=on(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=Gt(e),o=s?e.offsetWidth:n,a=s?e.offsetHeight:r,c=el(n)!==o||el(r)!==a;return c&&(n=o,r=a),{width:n,height:r,$:c}}function jd(e){return it(e)?e:e.contextElement}function hi(e){const t=jd(e);if(!Gt(t))return jn(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:o}=$b(t);let a=(o?el(n.width):n.width)/r,c=(o?el(n.height):n.height)/s;return(!a||!Number.isFinite(a))&&(a=1),(!c||!Number.isFinite(c))&&(c=1),{x:a,y:c}}const m6=jn(0);function _b(e){const t=zt(e);return!Ja()||!t.visualViewport?m6:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function g6(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==zt(e)?!1:t}function ps(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),o=jd(e);let a=jn(1);t&&(r?it(r)&&(a=hi(r)):a=hi(e));const c=g6(o,n,r)?_b(o):jn(0);let u=(s.left+c.x)/a.x,d=(s.top+c.y)/a.y,h=s.width/a.x,p=s.height/a.y;if(o){const m=zt(o),x=r&&it(r)?zt(r):r;let S=m,b=Od(S);for(;b&&r&&x!==S;){const T=hi(b),v=b.getBoundingClientRect(),A=on(b),C=v.left+(b.clientLeft+parseFloat(A.paddingLeft))*T.x,I=v.top+(b.clientTop+parseFloat(A.paddingTop))*T.y;u*=T.x,d*=T.y,h*=T.x,p*=T.y,u+=C,d+=I,S=zt(b),b=Od(S)}}return rl({width:h,height:p,x:u,y:d})}function Ld(e,t){const n=Qa(e).scrollLeft;return t?t.left+n:ps(kn(e)).left+n}function Ib(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=r.left+t.scrollLeft-(n?0:Ld(e,r)),o=r.top+t.scrollTop;return{x:s,y:o}}function y6(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const o=s==="fixed",a=kn(r),c=t?Za(t.floating):!1;if(r===a||c&&o)return n;let u={scrollLeft:0,scrollTop:0},d=jn(1);const h=jn(0),p=Gt(r);if((p||!p&&!o)&&((ui(r)!=="body"||_o(a))&&(u=Qa(r)),Gt(r))){const x=ps(r);d=hi(r),h.x=x.x+r.clientLeft,h.y=x.y+r.clientTop}const m=a&&!p&&!o?Ib(a,u,!0):jn(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-u.scrollLeft*d.x+h.x+m.x,y:n.y*d.y-u.scrollTop*d.y+h.y+m.y}}function x6(e){return Array.from(e.getClientRects())}function v6(e){const t=kn(e),n=Qa(e),r=e.ownerDocument.body,s=Yt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Yt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Ld(e);const c=-n.scrollTop;return on(r).direction==="rtl"&&(a+=Yt(t.clientWidth,r.clientWidth)-s),{width:s,height:o,x:a,y:c}}function b6(e,t){const n=zt(e),r=kn(e),s=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,c=0,u=0;if(s){o=s.width,a=s.height;const d=Ja();(!d||d&&t==="fixed")&&(c=s.offsetLeft,u=s.offsetTop)}return{width:o,height:a,x:c,y:u}}function w6(e,t){const n=ps(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,o=Gt(e)?hi(e):jn(1),a=e.clientWidth*o.x,c=e.clientHeight*o.y,u=s*o.x,d=r*o.y;return{width:a,height:c,x:u,y:d}}function Db(e,t,n){let r;if(t==="viewport")r=b6(e,n);else if(t==="document")r=v6(kn(e));else if(it(t))r=w6(t,n);else{const s=_b(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return rl(r)}function Nb(e,t){const n=Jn(e);return n===t||!it(n)||Zn(n)?!1:on(n).position==="fixed"||Nb(n,t)}function S6(e,t){const n=t.get(e);if(n)return n;let r=kr(e,[],!1).filter(c=>it(c)&&ui(c)!=="body"),s=null;const o=on(e).position==="fixed";let a=o?Jn(e):e;for(;it(a)&&!Zn(a);){const c=on(a),u=Md(a);!u&&c.position==="fixed"&&(s=null),(o?!u&&!s:!u&&c.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||_o(a)&&!u&&Nb(e,a))?r=r.filter(h=>h!==a):s=c,a=Jn(a)}return t.set(e,r),r}function T6(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const a=[...n==="clippingAncestors"?Za(t)?[]:S6(t,this._c):[].concat(n),r],c=a[0],u=a.reduce((d,h)=>{const p=Db(t,h,s);return d.top=Yt(p.top,d.top),d.right=jr(p.right,d.right),d.bottom=jr(p.bottom,d.bottom),d.left=Yt(p.left,d.left),d},Db(t,c,s));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function C6(e){const{width:t,height:n}=$b(e);return{width:t,height:n}}function E6(e,t,n){const r=Gt(t),s=kn(t),o=n==="fixed",a=ps(e,!0,o,t);let c={scrollLeft:0,scrollTop:0};const u=jn(0);if(r||!r&&!o)if((ui(t)!=="body"||_o(s))&&(c=Qa(t)),r){const m=ps(t,!0,o,t);u.x=m.x+t.clientLeft,u.y=m.y+t.clientTop}else s&&(u.x=Ld(s));const d=s&&!r&&!o?Ib(s,c):jn(0),h=a.left+c.scrollLeft-u.x-d.x,p=a.top+c.scrollTop-u.y-d.y;return{x:h,y:p,width:a.width,height:a.height}}function Rd(e){return on(e).position==="static"}function kb(e,t){if(!Gt(e)||on(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return kn(e)===n&&(n=n.ownerDocument.body),n}function jb(e,t){const n=zt(e);if(Za(e))return n;if(!Gt(e)){let s=Jn(e);for(;s&&!Zn(s);){if(it(s)&&!Rd(s))return s;s=Jn(s)}return n}let r=kb(e,t);for(;r&&KD(r)&&Rd(r);)r=kb(r,t);return r&&Zn(r)&&Rd(r)&&!Md(r)?n:r||XD(e)||n}const P6=async function(e){const t=this.getOffsetParent||jb,n=this.getDimensions,r=await n(e.floating);return{reference:E6(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function A6(e){return on(e).direction==="rtl"}const M6={convertOffsetParentRelativeRectToViewportRelativeRect:y6,getDocumentElement:kn,getClippingRect:T6,getOffsetParent:jb,getElementRects:P6,getClientRects:x6,getDimensions:C6,getScale:hi,isElement:it,isRTL:A6};function Lb(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function O6(e,t){let n=null,r;const s=kn(e);function o(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function a(c,u){c===void 0&&(c=!1),u===void 0&&(u=1),o();const d=e.getBoundingClientRect(),{left:h,top:p,width:m,height:x}=d;if(c||t(),!m||!x)return;const S=tl(p),b=tl(s.clientWidth-(h+m)),T=tl(s.clientHeight-(p+x)),v=tl(h),C={rootMargin:-S+"px "+-b+"px "+-T+"px "+-v+"px",threshold:Yt(0,jr(1,u))||1};let I=!0;function P(D){const R=D[0].intersectionRatio;if(R!==u){if(!I)return a();R?a(!1,R):r=setTimeout(()=>{a(!1,1e-7)},1e3)}R===1&&!Lb(d,e.getBoundingClientRect())&&a(),I=!1}try{n=new IntersectionObserver(P,{...C,root:s.ownerDocument})}catch{n=new IntersectionObserver(P,C)}n.observe(e)}return a(!0),o}function Qn(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,d=jd(e),h=s||o?[...d?kr(d):[],...kr(t)]:[];h.forEach(v=>{s&&v.addEventListener("scroll",n,{passive:!0}),o&&v.addEventListener("resize",n)});const p=d&&c?O6(d,n):null;let m=-1,x=null;a&&(x=new ResizeObserver(v=>{let[A]=v;A&&A.target===d&&x&&(x.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var C;(C=x)==null||C.observe(t)})),n()}),d&&!u&&x.observe(d),x.observe(t));let S,b=u?ps(e):null;u&&T();function T(){const v=ps(e);b&&!Lb(b,v)&&n(),b=v,S=requestAnimationFrame(T)}return n(),()=>{var v;h.forEach(A=>{s&&A.removeEventListener("scroll",n),o&&A.removeEventListener("resize",n)}),p==null||p(),(v=x)==null||v.disconnect(),x=null,u&&cancelAnimationFrame(S)}}const $6=d6,_6=h6,I6=u6,D6=p6,Rb=c6,N6=(e,t,n)=>{const r=new Map,s={platform:M6,...n},o={...s.platform,_c:r};return l6(e,t,{...s,platform:o})};var sl=typeof document<"u"?O.useLayoutEffect:O.useEffect;function il(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!il(e[r],t[r]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,s[r]))return!1;for(r=n;r--!==0;){const o=s[r];if(!(o==="_owner"&&e.$$typeof)&&!il(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Fb(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Vb(e,t){const n=Fb(e);return Math.round(t*n)/n}function Fd(e){const t=he.useRef(e);return sl(()=>{t.current=e}),t}function k6(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:o,floating:a}={},transform:c=!0,whileElementsMounted:u,open:d}=e,[h,p]=he.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,x]=he.useState(r);il(m,r)||x(r);const[S,b]=he.useState(null),[T,v]=he.useState(null),A=he.useCallback(z=>{z!==D.current&&(D.current=z,b(z))},[]),C=he.useCallback(z=>{z!==R.current&&(R.current=z,v(z))},[]),I=o||S,P=a||T,D=he.useRef(null),R=he.useRef(null),F=he.useRef(h),W=u!=null,Q=Fd(u),ee=Fd(s),ae=Fd(d),ge=he.useCallback(()=>{if(!D.current||!R.current)return;const z={placement:t,strategy:n,middleware:m};ee.current&&(z.platform=ee.current),N6(D.current,R.current,z).then(K=>{const $={...K,isPositioned:ae.current!==!1};de.current&&!il(F.current,$)&&(F.current=$,uT.flushSync(()=>{p($)}))})},[m,t,n,ee,ae]);sl(()=>{d===!1&&F.current.isPositioned&&(F.current.isPositioned=!1,p(z=>({...z,isPositioned:!1})))},[d]);const de=he.useRef(!1);sl(()=>(de.current=!0,()=>{de.current=!1}),[]),sl(()=>{if(I&&(D.current=I),P&&(R.current=P),I&&P){if(Q.current)return Q.current(I,P,ge);ge()}},[I,P,ge,Q,W]);const le=he.useMemo(()=>({reference:D,floating:R,setReference:A,setFloating:C}),[A,C]),ue=he.useMemo(()=>({reference:I,floating:P}),[I,P]),Y=he.useMemo(()=>{const z={position:n,left:0,top:0};if(!ue.floating)return z;const K=Vb(ue.floating,h.x),$=Vb(ue.floating,h.y);return c?{...z,transform:"translate("+K+"px, "+$+"px)",...Fb(ue.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:K,top:$}},[n,c,ue.floating,h.x,h.y]);return he.useMemo(()=>({...h,update:ge,refs:le,elements:ue,floatingStyles:Y}),[h,ge,le,ue,Y])}const j6=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:s}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Rb({element:r.current,padding:s}).fn(n):{}:r?Rb({element:r,padding:s}).fn(n):{}}}},er=(e,t)=>({...$6(e),options:[e,t]}),tr=(e,t)=>({..._6(e),options:[e,t]}),nr=(e,t)=>({...I6(e),options:[e,t]}),Rr=(e,t)=>({...D6(e),options:[e,t]}),ms=(e,t)=>({...j6(e),options:[e,t]}),Bb={...he},L6=Bb.useInsertionEffect||(e=>e());function pi(e){const t=he.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return L6(()=>{t.current=e}),he.useCallback(function(){for(var n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];return t.current==null?void 0:t.current(...r)},[])}var mi=typeof document<"u"?O.useLayoutEffect:O.useEffect;let Wb=!1,R6=0;const Ub=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+R6++;function F6(){const[e,t]=he.useState(()=>Wb?Ub():void 0);return mi(()=>{e==null&&t(Ub())},[]),he.useEffect(()=>{Wb=!0},[]),e}const V6=Bb.useId||F6;let Vd;process.env.NODE_ENV!=="production"&&(Vd=new Set);function B6(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const s="Floating UI: "+n.join(" ");if(!((e=Vd)!=null&&e.has(s))){var o;(o=Vd)==null||o.add(s),console.error(s)}}function W6(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(s=>s(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(s=>s!==n))||[])}}}const U6=he.createContext(null),z6=he.createContext(null),G6=()=>{var e;return((e=he.useContext(U6))==null?void 0:e.id)||null},zb=()=>he.useContext(z6);function Y6(e){return"data-floating-ui-"+e}function ol(e){const t=O.useRef(e);return mi(()=>{t.current=e}),t}function Bd(e,t){let n=e.filter(s=>{var o;return s.parentId===t&&((o=s.context)==null?void 0:o.open)}),r=n;for(;r.length;)r=e.filter(s=>{var o;return(o=r)==null?void 0:o.some(a=>{var c;return s.parentId===a.id&&((c=s.context)==null?void 0:c.open)})}),n=n.concat(r);return n}const H6="data-floating-ui-focusable";function Gb(e){return Gt(e.target)&&e.target.tagName==="BUTTON"}function Yb(e){return e6(e)}function rr(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:s,elements:{domReference:o}}=e,{enabled:a=!0,event:c="click",toggle:u=!0,ignoreMouse:d=!1,keyboardHandlers:h=!0,stickIfOpen:p=!0}=t,m=he.useRef(),x=he.useRef(!1),S=he.useMemo(()=>({onPointerDown(b){m.current=b.pointerType},onMouseDown(b){const T=m.current;b.button===0&&c!=="click"&&(Eb(T)&&d||(n&&u&&(!(s.current.openEvent&&p)||s.current.openEvent.type==="mousedown")?r(!1,b.nativeEvent,"click"):(b.preventDefault(),r(!0,b.nativeEvent,"click"))))},onClick(b){const T=m.current;if(c==="mousedown"&&m.current){m.current=void 0;return}Eb(T)&&d||(n&&u&&(!(s.current.openEvent&&p)||s.current.openEvent.type==="click")?r(!1,b.nativeEvent,"click"):r(!0,b.nativeEvent,"click"))},onKeyDown(b){m.current=void 0,!(b.defaultPrevented||!h||Gb(b))&&(b.key===" "&&!Yb(o)&&(b.preventDefault(),x.current=!0),b.key==="Enter"&&r(!(n&&u),b.nativeEvent,"click"))},onKeyUp(b){b.defaultPrevented||!h||Gb(b)||Yb(o)||b.key===" "&&x.current&&(x.current=!1,r(!(n&&u),b.nativeEvent,"click"))}}),[s,o,c,d,h,r,n,p,u]);return he.useMemo(()=>a?{reference:S}:{},[a,S])}const q6={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},K6={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Hb=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)!=null?n:!0}};function sr(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:s,dataRef:o}=e,{enabled:a=!0,escapeKey:c=!0,outsidePress:u=!0,outsidePressEvent:d="pointerdown",referencePress:h=!1,referencePressEvent:p="pointerdown",ancestorScroll:m=!1,bubbles:x,capture:S}=t,b=zb(),T=pi(typeof u=="function"?u:()=>!1),v=typeof u=="function"?T:u,A=he.useRef(!1),C=he.useRef(!1),{escapeKey:I,outsidePress:P}=Hb(x),{escapeKey:D,outsidePress:R}=Hb(S),F=he.useRef(!1),W=pi(le=>{var ue;if(!n||!a||!c||le.key!=="Escape"||F.current)return;const Y=(ue=o.current.floatingContext)==null?void 0:ue.nodeId,z=b?Bd(b.nodesRef.current,Y):[];if(!I&&(le.stopPropagation(),z.length>0)){let K=!0;if(z.forEach($=>{var k;if((k=$.context)!=null&&k.open&&!$.context.dataRef.current.__escapeKeyBubbles){K=!1;return}}),!K)return}r(!1,ZD(le)?le.nativeEvent:le,"escape-key")}),Q=pi(le=>{var ue;const Y=()=>{var z;W(le),(z=Io(le))==null||z.removeEventListener("keydown",Y)};(ue=Io(le))==null||ue.addEventListener("keydown",Y)}),ee=pi(le=>{var ue;const Y=A.current;A.current=!1;const z=C.current;if(C.current=!1,d==="click"&&z||Y||typeof v=="function"&&!v(le))return;const K=Io(le),$="["+Y6("inert")+"]",k=Pb(s.floating).querySelectorAll($);let X=it(K)?K:null;for(;X&&!Zn(X);){const J=Jn(X);if(Zn(J)||!it(J))break;X=J}if(k.length&&it(K)&&!JD(K)&&!Cb(K,s.floating)&&Array.from(k).every(J=>!Cb(X,J)))return;if(Gt(K)&&de){const J=Zn(K),oe=on(K),se=/auto|scroll/,fe=J||se.test(oe.overflowX),Ee=J||se.test(oe.overflowY),Ve=fe&&K.clientWidth>0&&K.scrollWidth>K.clientWidth,ie=Ee&&K.clientHeight>0&&K.scrollHeight>K.clientHeight,me=oe.direction==="rtl",De=ie&&(me?le.offsetX<=K.offsetWidth-K.clientWidth:le.offsetX>K.clientWidth),ft=Ve&&le.offsetY>K.clientHeight;if(De||ft)return}const U=(ue=o.current.floatingContext)==null?void 0:ue.nodeId,re=b&&Bd(b.nodesRef.current,U).some(J=>{var oe;return $d(le,(oe=J.context)==null?void 0:oe.elements.floating)});if($d(le,s.floating)||$d(le,s.domReference)||re)return;const B=b?Bd(b.nodesRef.current,U):[];if(B.length>0){let J=!0;if(B.forEach(oe=>{var se;if((se=oe.context)!=null&&se.open&&!oe.context.dataRef.current.__outsidePressBubbles){J=!1;return}}),!J)return}r(!1,le,"outside-press")}),ae=pi(le=>{var ue;const Y=()=>{var z;ee(le),(z=Io(le))==null||z.removeEventListener(d,Y)};(ue=Io(le))==null||ue.addEventListener(d,Y)});he.useEffect(()=>{if(!n||!a)return;o.current.__escapeKeyBubbles=I,o.current.__outsidePressBubbles=P;let le=-1;function ue(k){r(!1,k,"ancestor-scroll")}function Y(){window.clearTimeout(le),F.current=!0}function z(){le=window.setTimeout(()=>{F.current=!1},Ja()?5:0)}const K=Pb(s.floating);c&&(K.addEventListener("keydown",D?Q:W,D),K.addEventListener("compositionstart",Y),K.addEventListener("compositionend",z)),v&&K.addEventListener(d,R?ae:ee,R);let $=[];return m&&(it(s.domReference)&&($=kr(s.domReference)),it(s.floating)&&($=$.concat(kr(s.floating))),!it(s.reference)&&s.reference&&s.reference.contextElement&&($=$.concat(kr(s.reference.contextElement)))),$=$.filter(k=>{var X;return k!==((X=K.defaultView)==null?void 0:X.visualViewport)}),$.forEach(k=>{k.addEventListener("scroll",ue,{passive:!0})}),()=>{c&&(K.removeEventListener("keydown",D?Q:W,D),K.removeEventListener("compositionstart",Y),K.removeEventListener("compositionend",z)),v&&K.removeEventListener(d,R?ae:ee,R),$.forEach(k=>{k.removeEventListener("scroll",ue)}),window.clearTimeout(le)}},[o,s,c,v,d,n,r,m,a,I,P,W,D,Q,ee,R,ae]),he.useEffect(()=>{A.current=!1},[v,d]);const ge=he.useMemo(()=>({onKeyDown:W,...h&&{[q6[p]]:le=>{r(!1,le.nativeEvent,"reference-press")},...p!=="click"&&{onClick(le){r(!1,le.nativeEvent,"reference-press")}}}}),[W,r,h,p]),de=he.useMemo(()=>({onKeyDown:W,onMouseDown(){C.current=!0},onMouseUp(){C.current=!0},[K6[d]]:()=>{A.current=!0}}),[W,d]);return he.useMemo(()=>a?{reference:ge,floating:de}:{},[a,ge,de])}function X6(e){const{open:t=!1,onOpenChange:n,elements:r}=e,s=V6(),o=he.useRef({}),[a]=he.useState(()=>W6()),c=G6()!=null;if(process.env.NODE_ENV!=="production"){const x=r.reference;x&&!it(x)&&B6("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[u,d]=he.useState(r.reference),h=pi((x,S,b)=>{o.current.openEvent=x?S:void 0,a.emit("openchange",{open:x,event:S,reason:b,nested:c}),n==null||n(x,S,b)}),p=he.useMemo(()=>({setPositionReference:d}),[]),m=he.useMemo(()=>({reference:u||r.reference||null,floating:r.floating||null,domReference:r.reference}),[u,r.reference,r.floating]);return he.useMemo(()=>({dataRef:o,open:t,onOpenChange:h,elements:m,events:a,floatingId:s,refs:p}),[t,h,m,a,s,p])}function ir(e){e===void 0&&(e={});const{nodeId:t}=e,n=X6({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,s=r.elements,[o,a]=he.useState(null),[c,u]=he.useState(null),h=(s==null?void 0:s.domReference)||o,p=he.useRef(null),m=zb();mi(()=>{h&&(p.current=h)},[h]);const x=k6({...e,elements:{...s,...c&&{reference:c}}}),S=he.useCallback(C=>{const I=it(C)?{getBoundingClientRect:()=>C.getBoundingClientRect(),contextElement:C}:C;u(I),x.refs.setReference(I)},[x.refs]),b=he.useCallback(C=>{(it(C)||C===null)&&(p.current=C,a(C)),(it(x.refs.reference.current)||x.refs.reference.current===null||C!==null&&!it(C))&&x.refs.setReference(C)},[x.refs]),T=he.useMemo(()=>({...x.refs,setReference:b,setPositionReference:S,domReference:p}),[x.refs,b,S]),v=he.useMemo(()=>({...x.elements,domReference:h}),[x.elements,h]),A=he.useMemo(()=>({...x,...r,refs:T,elements:v,nodeId:t}),[x,T,v,t,r]);return mi(()=>{r.dataRef.current.floatingContext=A;const C=m==null?void 0:m.nodesRef.current.find(I=>I.id===t);C&&(C.context=A)}),he.useMemo(()=>({...x,context:A,refs:T,elements:v}),[x,T,v,A])}const qb="active",Kb="selected";function Wd(e,t,n){const r=new Map,s=n==="item";let o=e;if(s&&e){const{[qb]:a,[Kb]:c,...u}=e;o=u}return{...n==="floating"&&{tabIndex:-1,[H6]:""},...o,...t.map(a=>{const c=a?a[n]:null;return typeof c=="function"?e?c(e):null:c}).concat(e).reduce((a,c)=>(c&&Object.entries(c).forEach(u=>{let[d,h]=u;if(!(s&&[qb,Kb].includes(d)))if(d.indexOf("on")===0){if(r.has(d)||r.set(d,[]),typeof h=="function"){var p;(p=r.get(d))==null||p.push(h),a[d]=function(){for(var m,x=arguments.length,S=new Array(x),b=0;b<x;b++)S[b]=arguments[b];return(m=r.get(d))==null?void 0:m.map(T=>T(...S)).find(T=>T!==void 0)}}}else a[d]=h}),a),{})}}function or(e){e===void 0&&(e=[]);const t=e.map(c=>c==null?void 0:c.reference),n=e.map(c=>c==null?void 0:c.floating),r=e.map(c=>c==null?void 0:c.item),s=he.useCallback(c=>Wd(c,e,"reference"),t),o=he.useCallback(c=>Wd(c,e,"floating"),n),a=he.useCallback(c=>Wd(c,e,"item"),r);return he.useMemo(()=>({getReferenceProps:s,getFloatingProps:o,getItemProps:a}),[s,o,a])}const Xb=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function gi(e,t){return typeof e=="function"?e(t):e}function Z6(e,t){const[n,r]=he.useState(e);return e&&!n&&r(!0),he.useEffect(()=>{if(!e&&n){const s=setTimeout(()=>r(!1),t);return()=>clearTimeout(s)}},[e,n,t]),n}function J6(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:s=250}=t,a=(typeof s=="number"?s:s.close)||0,[c,u]=he.useState("unmounted"),d=Z6(n,a);return!d&&c==="close"&&u("unmounted"),mi(()=>{if(r){if(n){u("initial");const h=requestAnimationFrame(()=>{u("open")});return()=>{cancelAnimationFrame(h)}}u("close")}},[n,r]),{isMounted:d,status:c}}function ar(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:s,common:o,duration:a=250}=t,c=e.placement,u=c.split("-")[0],d=he.useMemo(()=>({side:u,placement:c}),[u,c]),h=typeof a=="number",p=(h?a:a.open)||0,m=(h?a:a.close)||0,[x,S]=he.useState(()=>({...gi(o,d),...gi(n,d)})),{isMounted:b,status:T}=J6(e,{duration:a}),v=ol(n),A=ol(r),C=ol(s),I=ol(o);return mi(()=>{const P=gi(v.current,d),D=gi(C.current,d),R=gi(I.current,d),F=gi(A.current,d)||Object.keys(P).reduce((W,Q)=>(W[Q]="",W),{});if(T==="initial"&&S(W=>({transitionProperty:W.transitionProperty,...R,...P})),T==="open"&&S({transitionProperty:Object.keys(F).map(Xb).join(","),transitionDuration:p+"ms",...R,...F}),T==="close"){const W=D||P;S({transitionProperty:Object.keys(W).map(Xb).join(","),transitionDuration:m+"ms",...R,...W})}},[m,C,v,A,I,p,T,d]),{isMounted:b,styles:x}}const gs=({open:e,onClose:t,component:n,children:r,placement:s="bottom",className:o="",strategy:a="absolute",styles:c={},offset:u=8,padding:d=8,handleClickAway:h=!0})=>{const[p,m]=O.useState(e);O.useEffect(()=>{m(e)},[e]);const x=()=>{m(!1),t==null||t()},{x:S,y:b,strategy:T,refs:v,context:A}=ir({strategy:a,open:p,onOpenChange:W=>{!W&&!e&&x()},middleware:[er(u),nr(),tr({padding:d})],whileElementsMounted:Qn,placement:s}),C=rr(A,{enabled:!1}),I=sr(A,{enabled:!1}),{getReferenceProps:P,getFloatingProps:D}=or([C,I]),{isMounted:R,styles:F}=ar(A,{duration:{open:200,close:150},initial:{opacity:0,transform:"translateY(-4px) scale(0.95)"}});return g.jsx(D2,{enabled:h,onClickAway:()=>{p&&x()},children:g.jsxs("div",{className:"relative",children:[g.jsx("div",{ref:v.setReference,...P(),className:"reference-element",children:r}),R&&g.jsx("div",{ref:v.setFloating,style:{position:T,top:b??0,left:S??0,...F,zIndex:999,...c},...D(),className:"floating-element w-max",children:g.jsx(yi,{className:`p-16! rounded-[16px]! shadow-floating ${o}`,children:typeof n=="function"?O.createElement(n):n})})]})})},Q6=({selectedPeriod:e,handlePeriodChange:t,colorVariants:n})=>{const r={initial:{backgroundColor:"#ffffff",color:"#57595f"},active:{backgroundColor:(n==null?void 0:n.hoverLight)||"#dee7fc",color:(n==null?void 0:n.text)||"#111827"},exit:{backgroundColor:"#ffffff",color:"#57595f"}};return g.jsxs("div",{className:"flex rounded-xl p-6 gap-2 border",style:{borderColor:(n==null?void 0:n.hoverLight)||"#dbeafe"},children:[g.jsx(st.button,{variants:r,initial:"initial",animate:e==="AM"?"active":"initial",exit:"exit",transition:{duration:.2},onClick:()=>t("AM"),disabled:e==="AM",className:"flex items-center justify-center font-500 px-10 py-2 rounded-lg",children:"AM"}),g.jsx(st.button,{variants:r,initial:"initial",animate:e==="PM"?"active":"initial",exit:"exit",transition:{duration:.2},onClick:()=>t("PM"),disabled:e==="PM",className:"flex items-center justify-center font-500 px-10 py-2 rounded-lg",children:"PM"})]})},eN=({setHourMenuOpen:e,hourMenuOpen:t,selectedHour:n})=>g.jsx("button",{onClick:()=>e(!t),className:"flex justify-center items-center w-72 h-full border py-8 px-14 rounded-xl border-blue-100 text-gray-600 font-500",children:`${String(n).padStart(2,"0")}:00`}),tN={primary:"#375ABC",primaryLight:"#8FA9F3",primaryDark:"#29438D",hover:"#4570EB",hoverLight:"#ECF1FD",text:"#375ABC",textLight:"#FFFFFF"},nN={primary:"#06B6D4",primaryLight:"#67E8F9",primaryDark:"#0891B2",hover:"#0891B2",hoverLight:"#CFFAFE",text:"#06B6D4",textLight:"#FFFFFF"},rN=e=>({blue:tN,aqua:nN})[e],Ud=({date:e,onDateChange:t,showTimeSelector:n=!0,minDate:r,maxDate:s,futureDates:o=!1,pastDates:a=!0,color:c="blue"})=>{const[u,d]=O.useState(e),[h,p]=O.useState(e),[m,x]=O.useState(e.getHours()%12||12),[S,b]=O.useState(e.getHours()>=12?"PM":"AM"),[T,v]=O.useState(0),{t:A}=Ue(),C=rN(c),[I,P]=O.useState(!1),[D,R]=O.useState(!1);O.useEffect(()=>{d(e),p(e),x(e.getHours()%12||12),b(e.getHours()>=12?"PM":"AM")},[e]);const F=()=>{v(-1),setTimeout(()=>{const z=A$(u);(!r||z>=r)&&d(z)},10)},W=()=>{v(1),setTimeout(()=>{d(ix(u,1))},10)},Q=z=>{if(s&&z>s||r&&z<r)return;const K=yx(xx(vx(z,0),0),S==="AM"?m%12:m%12+12);p(K),t(K)},ee=z=>{x(z);const K=yx(xx(vx(h,0),0),S==="AM"?z%12:z%12+12);p(K),t(K),P(!1)},ae=z=>{b(z)},ge=()=>{const z=new Date,K=20,$=5,[k,X]=O.useState(()=>Array.from({length:K+1},(J,oe)=>{const se=new Date(z.getFullYear(),z.getMonth()-oe,1);return{name:_n(se,"MMMM",{locale:Js}).replace(/^./,fe=>fe.toUpperCase()),index:se.getMonth(),year:se.getFullYear(),displayName:`${_n(se,"MMMM",{locale:Js}).replace(/^./,fe=>fe.toUpperCase())} ${se.getFullYear()}`}})),U=O.useRef(null),re=O.useRef(null);O.useEffect(()=>{U.current&&U.current.disconnect(),U.current=new IntersectionObserver(J=>{J[0].isIntersecting&&X(oe=>{const se=oe[oe.length-1],fe=new Date(se.year,se.index-1,1),Ee=Array.from({length:$},(Ve,ie)=>{const me=new Date(fe.getFullYear(),fe.getMonth()-ie,1);return{name:_n(me,"MMMM",{locale:Js}).replace(/^./,De=>De.toUpperCase()),index:me.getMonth(),year:me.getFullYear(),displayName:`${_n(me,"MMMM",{locale:Js}).replace(/^./,De=>De.toUpperCase())} ${me.getFullYear()}`}});return[...oe,...Ee]})}),re.current&&U.current.observe(re.current)},[k]);const B=(J,oe)=>{const se=new Date(u);se.setMonth(J),se.setFullYear(oe),(!r||se>=r)&&d(se),R(!1)};return g.jsx("div",{className:"flex flex-col p-8 max-h-200 overflow-y-auto bg-light gap-4",children:k.map((J,oe)=>{const se=oe===k.length-1;return g.jsx("button",{ref:se?re:null,onClick:()=>B(J.index,J.year),className:"text-start p-6 font-600 transition-all duration-100 rounded-lg",style:{backgroundColor:u.getMonth()===J.index&&u.getFullYear()===J.year?C.hoverLight:"transparent",color:u.getMonth()===J.index&&u.getFullYear()===J.year?C.text:"inherit"},onMouseEnter:fe=>{u.getMonth()===J.index&&u.getFullYear()===J.year||(fe.currentTarget.style.backgroundColor="#F3F4F6")},onMouseLeave:fe=>{u.getMonth()===J.index&&u.getFullYear()===J.year||(fe.currentTarget.style.backgroundColor="transparent")},children:J.displayName},`${J.name}-${J.year}-${oe}`)})})},de=()=>g.jsxs("div",{className:"flex justify-between items-center mb-8",children:[g.jsx(gs,{open:D,onClose:()=>R(!1),component:ge,placement:"bottom",className:"!p-0 overflow-hidden bg-light",strategy:"fixed",children:g.jsxs("button",{onClick:()=>R(!D),className:"transition-colors duration-150 flex gap-6 items-center !text-black",children:[g.jsx("h4",{className:"text-header-4",children:_n(u,"MMMM yyyy",{locale:Js}).replace(/^./,z=>z.toUpperCase())}),g.jsx(Pe,{icon:r0,className:"w-12 h-12"})]})}),g.jsxs("div",{className:"flex items-center gap-8",children:[g.jsx(sh,{variant:"transparent",color:c,icon:qD,onClick:F}),g.jsx(sh,{variant:"transparent",color:c,icon:g4,onClick:W})]})]}),le=()=>{const z=Ks(M4(u)),K=$4(E4(u)),$=A4({start:z,end:K}),k=new Date;return k.setHours(0,0,0,0),g.jsx("div",{className:"grid grid-cols-7 gap-2",children:$.map((X,U)=>{const re=lx(X,h),B=E$(X,u),J=P$(X),oe=X<k,se=X>k,fe=!B||oe&&!a||se&&!o||r&&X<r||s&&X>s;return g.jsx(st.div,{className:`
|
|
668
668
|
p-2 text-center w-[40px] h-[40px] rounded-full flex items-center justify-center font-600 select-none
|
|
669
669
|
${fe?"text-gray-400 pointer-events-none":"cursor-pointer"}
|
|
670
|
-
`,onClick:()=>!fe&&Q(X),initial:!1,animate:{backgroundColor:re?C.primaryLight:"transparent",color:re?C.textLight:J?C.text:fe?"#9CA3AF":"#000000"},transition:{duration:.2,ease:"easeInOut",backgroundColor:{duration:.2,ease:"easeOut"}},whileHover:!fe&&!re?{backgroundColor:C.hoverLight}:{},whileTap:fe?{}:{backgroundColor:re?C.primaryDark:C.hoverLight},children:_n(X,"d")},U)})})},ue=()=>{const z=Array.from({length:12},($,k)=>k+1),K=()=>g.jsx("div",{className:"bg-white rounded-lg shadow-lg w-80 max-h-[150px] overflow-y-auto p-4 flex flex-col gap-4",children:z.map($=>g.jsxs("button",{onClick:()=>ee($),className:"w-full text-center py-2 transition-all duration-100 rounded-lg",style:{backgroundColor:$===m?C.hoverLight:"transparent",color:$===m?C.text:"inherit",fontWeight:$===m?"500":"normal"},onMouseEnter:k=>{$!==m&&(k.currentTarget.style.backgroundColor="#F3F4F6")},onMouseLeave:k=>{$!==m&&(k.currentTarget.style.backgroundColor="transparent")},children:[String($).padStart(2,"0"),":00"]},$))});return g.jsxs("div",{className:"flex justify-between items-center mt-4 mb-4",children:[g.jsx("h4",{className:"text-body-m font-medium",children:A("time")}),g.jsxs("div",{className:"flex items-center gap-6",children:[g.jsx(gs,{open:I,onClose:()=>P(!1),component:K,placement:"bottom",className:"!p-0 overflow-hidden",strategy:"fixed",children:g.jsx(eN,{setHourMenuOpen:P,hourMenuOpen:I,selectedHour:m})}),g.jsx(Q6,{selectedPeriod:S,handlePeriodChange:ae,colorVariants:C})]})]})},Y={slideNextEnter:{x:300,opacity:0},slidePrevEnter:{x:-300,opacity:0},center:{x:0,opacity:1,transition:{x:{type:"spring",stiffness:300,damping:30},opacity:{duration:.2}}},slideNextExit:{x:-300,opacity:0,transition:{x:{type:"spring",stiffness:300,damping:30},opacity:{duration:.2}}},slidePrevExit:{x:300,opacity:0,transition:{x:{type:"spring",stiffness:300,damping:30},opacity:{duration:.2}}}};return g.jsxs("div",{className:"rounded-3xl max-w-[300px] mx-auto bg-white p-24 relative overflow-hidden",children:[de(),g.jsx(qn,{initial:!1,mode:"popLayout",children:g.jsx(st.div,{variants:Y,initial:T===1?"slideNextEnter":T===-1?"slidePrevEnter":!1,animate:"center",exit:T===1?"slideNextExit":"slidePrevExit",className:"w-full",children:le()},_n(u,"yyyy-MM"))}),n&&ue()]})},al=({label:e,onChange:t,value:n,name:r,error:s,placeholder:o,className:a="",disabled:c=!1,disabledInput:u=!1,size:d="md",leftSide:h,rightSide:p,...m})=>{const{t:x}=Ue(),b={sm:{container:"px-16 py-8",text:"text-
|
|
670
|
+
`,onClick:()=>!fe&&Q(X),initial:!1,animate:{backgroundColor:re?C.primaryLight:"transparent",color:re?C.textLight:J?C.text:fe?"#9CA3AF":"#000000"},transition:{duration:.2,ease:"easeInOut",backgroundColor:{duration:.2,ease:"easeOut"}},whileHover:!fe&&!re?{backgroundColor:C.hoverLight}:{},whileTap:fe?{}:{backgroundColor:re?C.primaryDark:C.hoverLight},children:_n(X,"d")},U)})})},ue=()=>{const z=Array.from({length:12},($,k)=>k+1),K=()=>g.jsx("div",{className:"bg-white rounded-lg shadow-lg w-80 max-h-[150px] overflow-y-auto p-4 flex flex-col gap-4",children:z.map($=>g.jsxs("button",{onClick:()=>ee($),className:"w-full text-center py-2 transition-all duration-100 rounded-lg",style:{backgroundColor:$===m?C.hoverLight:"transparent",color:$===m?C.text:"inherit",fontWeight:$===m?"500":"normal"},onMouseEnter:k=>{$!==m&&(k.currentTarget.style.backgroundColor="#F3F4F6")},onMouseLeave:k=>{$!==m&&(k.currentTarget.style.backgroundColor="transparent")},children:[String($).padStart(2,"0"),":00"]},$))});return g.jsxs("div",{className:"flex justify-between items-center mt-4 mb-4",children:[g.jsx("h4",{className:"text-body-m font-medium",children:A("time")}),g.jsxs("div",{className:"flex items-center gap-6",children:[g.jsx(gs,{open:I,onClose:()=>P(!1),component:K,placement:"bottom",className:"!p-0 overflow-hidden",strategy:"fixed",children:g.jsx(eN,{setHourMenuOpen:P,hourMenuOpen:I,selectedHour:m})}),g.jsx(Q6,{selectedPeriod:S,handlePeriodChange:ae,colorVariants:C})]})]})},Y={slideNextEnter:{x:300,opacity:0},slidePrevEnter:{x:-300,opacity:0},center:{x:0,opacity:1,transition:{x:{type:"spring",stiffness:300,damping:30},opacity:{duration:.2}}},slideNextExit:{x:-300,opacity:0,transition:{x:{type:"spring",stiffness:300,damping:30},opacity:{duration:.2}}},slidePrevExit:{x:300,opacity:0,transition:{x:{type:"spring",stiffness:300,damping:30},opacity:{duration:.2}}}};return g.jsxs("div",{className:"rounded-3xl max-w-[300px] mx-auto bg-white p-24 relative overflow-hidden",children:[de(),g.jsx(qn,{initial:!1,mode:"popLayout",children:g.jsx(st.div,{variants:Y,initial:T===1?"slideNextEnter":T===-1?"slidePrevEnter":!1,animate:"center",exit:T===1?"slideNextExit":"slidePrevExit",className:"w-full",children:le()},_n(u,"yyyy-MM"))}),n&&ue()]})},al=({label:e,onChange:t,value:n,name:r,error:s,placeholder:o,className:a="",disabled:c=!1,disabledInput:u=!1,size:d="md",leftSide:h,rightSide:p,...m})=>{const{t:x}=Ue(),b={sm:{container:"px-16 py-8",text:"text-sm",label:"text-sm",error:"text-sm",gap:"gap-8"},md:{container:"p-16",text:"text-14",label:"text-14",error:"text-14",gap:"gap-8"}}[d];return g.jsxs("label",{className:`flex flex-col group select-none ${b.gap} ${c&&"cursor-not-allowed"} ${a}`,htmlFor:r,children:[g.jsx("h6",{className:`text-gray-600 font-600 leading-none group ${s&&"!text-red-500"} ${b.label} ${c&&"text-gray-300"}`,children:e}),g.jsxs("label",{htmlFor:r,className:`
|
|
671
671
|
flex items-center justify-between gap-8 bg-light
|
|
672
672
|
${b.container} ${s&&"!border-red-500"} rounded-full border
|
|
673
673
|
${n&&!c?"border-blue-200":"border-blue-100"}
|
|
@@ -711,12 +711,12 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
711
711
|
`,...re,children:[A&&A,g.jsx("input",{ref:R,id:e,name:e,disabled:p,placeholder:d,value:n,onClick:()=>{S&&!P&&!p&&D(!0)},onChange:B=>k(B.target.value),onKeyDown:B=>{o&&o(B),B.key==="Enter"&&(B.preventDefault(),K.length>0&&$(K[0])),B.key==="Escape"&&D(!1)},className:`group bg-transparent w-full h-full font-600 placeholder:font-600 text-body-m disabled:text-gray-300 disabled:placeholder:text-gray-300 placeholder:text-gray-400 disabled:cursor-not-allowed overflow-visible outline-none ${p&&"pointer-events-none !select-none !caret-transparent"}`}),C&&!b?C:b&&g.jsx(Pe,{icon:NE,className:`text-xl text-gray-500 cursor-pointer ${P&&"rotate-180"} transition-transform duration-150 ease-in-out`,onClick:X})]}),T&&g.jsx(ys,{variant:"filled",size:"lg",onClick:c,className:"h-[55px]!",children:x})]}),t&&g.jsx("h4",{className:"font-500 text-label text-red-500 leading-none",children:I(t,{x:I(e)})}),Y&&g.jsx("div",{ref:ee.setFloating,style:{position:Q,top:W??0,left:F??0,...z,width:ee.reference.current instanceof Element?ee.reference.current.clientWidth:void 0,zIndex:50},className:"bg-white border border-blue-400 rounded-3xl shadow-lg overflow-hidden",...ue(),children:g.jsx("div",{className:"max-h-[250px] overflow-y-auto",children:K.length>0?g.jsx("ul",{className:"py-4",children:K.map((B,J)=>g.jsx("li",{className:`flex items-center px-16 py-10 transition-all duration-200 hover:bg-blue-50 cursor-pointer ${n===B.label?"bg-blue-100/30 text-blue-500 font-medium":""}`,onClick:oe=>{oe.stopPropagation(),$(B)},children:g.jsx("span",{children:I(B.label)})},`${B.label}-${J}`))}):n&&(n==null?void 0:n.length)>0?g.jsxs("div",{className:"px-16 py-16 text-center text-gray-500",children:[g.jsx("svg",{className:"mx-auto h-24 w-24 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9.172 16.172a4 4 0 015.656 0M9 10h.01M15 10h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),g.jsxs("p",{className:"mt-8 text-body-s",children:['No se encontraron resultados para "',n,'"']})]}):null})})]})},Yd=({label:e,onClick:t,onRemove:n,readOnly:r})=>g.jsxs("div",{className:"flex justify-between items-center gap-10 bg-[#DEE6F7] rounded-[4px] p-8 text-14",onClick:t,children:[g.jsx("span",{className:"text-blue-500 font-semibold text-nowrap text-ellipsis overflow-hidden",children:e}),!r&&n&&g.jsx("button",{onClick:s=>{n(),s.stopPropagation()},className:"flex items-center text-blue-300 hover:text-red-500",children:g.jsx(Pe,{icon:i0})})]}),MN=({values:e,onPillRemove:t})=>{const[n,r]=O.useState(!1),s=e.slice(0,3),o=e.slice(3);return g.jsxs("div",{className:"flex justify-between items-start gap-20",children:[g.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[s.map(a=>g.jsx(Yd,{label:a.label,onRemove:()=>t(a.value)},a.value)),g.jsx(qn,{children:n&&o.map(a=>g.jsx(st.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.2},children:g.jsx(Yd,{label:a.label,onRemove:()=>t(a.value)})},a.value))})]}),o.length>0&&g.jsx("button",{type:"button",onClick:()=>r(!n),className:"flex items-center gap-8 w-fit text-blue-500 font-semibold text-14 transition hover:text-blue-700 text-nowrap shrink-0",children:n?g.jsxs(g.Fragment,{children:[g.jsx("p",{children:"Ocultar"})," ",g.jsx(Pe,{icon:l5})]}):g.jsxs(g.Fragment,{children:[g.jsxs("p",{children:["Ver ",o.length," más"]})," ",g.jsx(Pe,{icon:h5})]})})]})},ON=({open:e,onClose:t,children:n,side:r="right",className:s="",backdropClassName:o="",width:a="650px",zIndex:c=9999,usePortal:u=!0})=>{O.useEffect(()=>{const m=x=>{x.key==="Escape"&&e&&t()};return e&&(document.addEventListener("keydown",m),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",m),document.body.style.overflow="unset"}},[e,t]);const d={initial:{x:r==="right"?"100%":"-100%"},animate:{x:0,transition:{type:"spring",stiffness:300,damping:30,opacity:{duration:.2}}},exit:{x:r==="right"?"100%":"-100%",transition:{type:"spring",stiffness:300,damping:30,opacity:{duration:.15}}}},h={initial:{opacity:0},animate:{opacity:1,transition:{duration:.2}},exit:{opacity:0,transition:{duration:.15}}},p=g.jsx(qn,{children:e&&g.jsxs("div",{className:"fixed inset-0 flex",style:{zIndex:c},children:[g.jsx(st.div,{variants:h,initial:"initial",animate:"animate",exit:"exit",className:`absolute inset-0 bg-black/50 backdrop-blur-[0.60px] ${o}`,onClick:m=>{m.preventDefault(),m.stopPropagation(),t()}}),g.jsx("div",{className:`relative flex w-full pointer-events-none ${r==="left"?"justify-start":"justify-end"}`,children:g.jsx(st.div,{variants:d,initial:"initial",animate:"animate",exit:"exit",className:`
|
|
712
712
|
relative bg-white shadow-2xl h-full overflow-hidden flex flex-col pointer-events-auto
|
|
713
713
|
${s}
|
|
714
|
-
`,style:{width:typeof a=="number"?`${a}px`:a},onClick:m=>{m.preventDefault(),m.stopPropagation()},children:n})})]})});return u&&typeof document<"u"&&document.body?Ep.createPortal(p,document.body):p},$N=({filters:e})=>{const[t,n]=O.useState(!1),r=()=>n(!1),s=()=>n(!0);return g.jsx(gs,{open:t,onClose:r,placement:"bottom-start",className:"w-[326px] shadow-md! px-0! text-base! py-12!",component:g.jsxs("div",{className:"relative flex flex-col gap-[10px]",children:[g.jsx("h4",{className:"px-24 text-lg font-semibold text-blue-900",children:"Filtros"}),g.jsx("div",{className:"flex flex-col",children:e.map((o,a)=>g.jsxs("div",{className:"group flex gap-[8px] items-center px-[24px] py-[8px] hover:bg-blue-100 cursor-pointer transition ease-in-out",onClick:o.onClick,children:[g.jsx(Pe,{icon:o.icon,className:"text-[14px] text-gray-600 group-hover:text-blue-500"}),g.jsx("p",{className:"text-[12px] text-gray-500 font-semibold group-hover:text-gray-800",children:o.label})]},a))})]}),children:g.jsx(Pe,{icon:LE,onClick:s,className:"transition text-[16px] ease-in-out duration-150 hover:text-gray-600 cursor-pointer"})})},_N=({label:e,options:t,selectedValues:n,onUpdate:r,placeholder:s="Seleccionar opciones",allowSearch:o=!0,className:a="",disabled:c=!1,size:u="md"})=>{var ue;const[d,h]=O.useState(!1),[p,m]=O.useState(""),x=O.useRef(null),S=O.useRef(null),T={sm:{container:"px-16 py-8",text:"text-
|
|
714
|
+
`,style:{width:typeof a=="number"?`${a}px`:a},onClick:m=>{m.preventDefault(),m.stopPropagation()},children:n})})]})});return u&&typeof document<"u"&&document.body?Ep.createPortal(p,document.body):p},$N=({filters:e})=>{const[t,n]=O.useState(!1),r=()=>n(!1),s=()=>n(!0);return g.jsx(gs,{open:t,onClose:r,placement:"bottom-start",className:"w-[326px] shadow-md! px-0! text-base! py-12!",component:g.jsxs("div",{className:"relative flex flex-col gap-[10px]",children:[g.jsx("h4",{className:"px-24 text-lg font-semibold text-blue-900",children:"Filtros"}),g.jsx("div",{className:"flex flex-col",children:e.map((o,a)=>g.jsxs("div",{className:"group flex gap-[8px] items-center px-[24px] py-[8px] hover:bg-blue-100 cursor-pointer transition ease-in-out",onClick:o.onClick,children:[g.jsx(Pe,{icon:o.icon,className:"text-[14px] text-gray-600 group-hover:text-blue-500"}),g.jsx("p",{className:"text-[12px] text-gray-500 font-semibold group-hover:text-gray-800",children:o.label})]},a))})]}),children:g.jsx(Pe,{icon:LE,onClick:s,className:"transition text-[16px] ease-in-out duration-150 hover:text-gray-600 cursor-pointer"})})},_N=({label:e,options:t,selectedValues:n,onUpdate:r,placeholder:s="Seleccionar opciones",allowSearch:o=!0,className:a="",disabled:c=!1,size:u="md"})=>{var ue;const[d,h]=O.useState(!1),[p,m]=O.useState(""),x=O.useRef(null),S=O.useRef(null),T={sm:{container:"px-16 py-8",text:"text-sm",label:"text-sm",icon:"w-12 h-12",checkboxSize:16,gap:"gap-8",searchText:"text-sm",searchIcon:"size-12"},md:{container:"p-16",text:"text-14",label:"text-14",icon:"w-16 h-16",checkboxSize:20,gap:"gap-8",searchText:"text-14",searchIcon:"size-16"}}[u],{x:v,y:A,strategy:C,refs:I,context:P}=ir({open:d&&!c,onOpenChange:Y=>!c&&h(Y),middleware:[er(8),nr(),tr({padding:8}),Rr({apply({availableHeight:Y,elements:z}){Object.assign(z.floating.style,{maxHeight:`${Math.min(Y-10,500)}px`})},padding:8}),ms({element:S})],placement:"bottom-start",whileElementsMounted:Qn}),D=rr(P,{enabled:!c}),R=sr(P),{getReferenceProps:F,getFloatingProps:W}=or([D,R]),{isMounted:Q,styles:ee}=ar(P,{duration:{open:200,close:150},initial:{opacity:0,transform:"translateY(-4px)"}}),ae=O.useCallback((Y,z)=>{if(c)return;let K;z?K=n.includes(Y)?n:[...n,Y]:K=n.filter($=>$!==Y),r(K)},[n,r,c]),ge=t.filter(Y=>Y.label.toLowerCase().includes(p.toLowerCase())),de=()=>{if(n.length===0)return s;const Y=t.filter(z=>n.includes(z.value)).map(z=>z.label);return Y.length===1?Y[0]:`${Y.length} seleccionados`},le=F({onClick:()=>!c&&h(!d)});return g.jsxs("div",{className:`flex flex-col select-none ${T.gap} ${c?"cursor-not-allowed":""} ${a}`,children:[e&&g.jsx("h6",{className:`text-gray-600 font-600 leading-none ${T.label} ${c?"text-gray-300":""}`,children:e}),g.jsxs("div",{ref:I.setReference,className:`
|
|
715
715
|
flex items-center justify-between rounded-full border transition-all duration-200
|
|
716
716
|
${T.container}
|
|
717
717
|
${c?"bg-gray-50 border-gray-200 cursor-not-allowed":"bg-blue-50 cursor-pointer"}
|
|
718
718
|
${!c&&(d?"border-blue-500":"border-blue-100 hover:border-blue-300")}
|
|
719
|
-
`,...le,children:[g.jsx("span",{className:`flex-grow text-left truncate font-600 ${T.text} ${c?"text-gray-300":"text-gray-500"}`,children:de()}),g.jsx("svg",{className:`${T.icon} transition-transform ${d?"rotate-180":""} ${c?"text-gray-300":"text-gray-500"}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M19 9l-7 7-7-7"})})]}),Q&&!c&&g.jsxs("div",{ref:I.setFloating,style:{position:C,top:A??0,left:v??0,...ee,width:(ue=I.reference.current)==null?void 0:ue.clientWidth,zIndex:50},className:"bg-white border border-blue-400 rounded-3xl shadow-lg overflow-hidden",...W(),children:[o&&g.jsx("div",{className:"sticky top-0 bg-white p-8 border-b border-gray-100 z-20",children:g.jsxs("div",{className:"relative",children:[g.jsx("div",{className:"absolute inset-y-0 left-0 pl-12 flex items-center pointer-events-none",children:g.jsx("svg",{className:`${T.searchIcon} text-gray-400`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}),g.jsx("input",{ref:x,type:"text",className:`w-full py-6 pl-36 pr-12 rounded-full focus:outline-none bg-gray-50 ${T.searchText}`,placeholder:"Buscar...",value:p,onChange:Y=>m(Y.target.value),onClick:Y=>Y.stopPropagation(),autoFocus:!0}),p&&g.jsx("button",{className:"absolute inset-y-0 right-0 pr-12 flex items-center",onClick:Y=>{Y.stopPropagation(),m("")},children:g.jsx("svg",{className:"h-16 w-16 text-gray-400 hover:text-gray-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})})]})}),g.jsx("div",{className:"max-h-[450px] overflow-y-auto",children:ge.length>0?g.jsx("div",{className:"py-4",children:ge.map(Y=>{var K,$,k;const z=n.includes(Y.value);return g.jsxs(O.Fragment,{children:[Y.dividerBefore&&g.jsx("div",{className:"px-16 py-8",children:g.jsx("hr",{className:"border-t border-gray-200"})}),g.jsxs("div",{className:"flex items-center px-16 py-10 transition-all duration-200 hover:bg-blue-50 cursor-pointer gap-12",onClick:()=>ae(Y.value,!z),children:[g.jsx(Kd,{active:z,size:T.checkboxSize,variant:"square",className:"flex-shrink-0"}),g.jsxs("div",{className:`flex items-center rounded-[8px] py-4 px-8 gap-[6px] overflow-hidden ${((K=Y.colors)==null?void 0:K.bgColor)||""} ${(($=Y.colors)==null?void 0:$.textColor)||""}`,children:[((k=Y.colors)==null?void 0:k.dotColor)&&g.jsx("span",{className:"size-6 rounded-full flex-shrink-0",style:{background:Y.colors.dotColor}}),g.jsx("span",{className:`${T.text} font-semibold truncate`,children:Y.label})]})]})]},Y.value)})}):g.jsxs("div",{className:"px-16 py-16 text-center text-gray-500",children:[g.jsx("svg",{className:"mx-auto h-24 w-24 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9.172 16.172a4 4 0 015.656 0M9 10h.01M15 10h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),g.jsxs("p",{className:"mt-8 text-body-s",children:["No se encontraron resultados para “",p,"”"]})]})})]})]})},IN=({label:e,options:t,selectedValue:n=null,onUpdate:r,placeholder:s="Seleccionar opción",allowSearch:o=!0,className:a="",disabled:c=!1,size:u="md",showRadio:d=!1})=>{var Y,z,K,$;const[h,p]=O.useState(!1),[m,x]=O.useState(""),S=O.useRef(null),b=O.useRef(null),v={sm:{container:"px-16 py-8",text:"text-
|
|
719
|
+
`,...le,children:[g.jsx("span",{className:`flex-grow text-left truncate font-600 ${T.text} ${c?"text-gray-300":"text-gray-500"}`,children:de()}),g.jsx("svg",{className:`${T.icon} transition-transform ${d?"rotate-180":""} ${c?"text-gray-300":"text-gray-500"}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M19 9l-7 7-7-7"})})]}),Q&&!c&&g.jsxs("div",{ref:I.setFloating,style:{position:C,top:A??0,left:v??0,...ee,width:(ue=I.reference.current)==null?void 0:ue.clientWidth,zIndex:50},className:"bg-white border border-blue-400 rounded-3xl shadow-lg overflow-hidden",...W(),children:[o&&g.jsx("div",{className:"sticky top-0 bg-white p-8 border-b border-gray-100 z-20",children:g.jsxs("div",{className:"relative",children:[g.jsx("div",{className:"absolute inset-y-0 left-0 pl-12 flex items-center pointer-events-none",children:g.jsx("svg",{className:`${T.searchIcon} text-gray-400`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}),g.jsx("input",{ref:x,type:"text",className:`w-full py-6 pl-36 pr-12 rounded-full focus:outline-none bg-gray-50 ${T.searchText}`,placeholder:"Buscar...",value:p,onChange:Y=>m(Y.target.value),onClick:Y=>Y.stopPropagation(),autoFocus:!0}),p&&g.jsx("button",{className:"absolute inset-y-0 right-0 pr-12 flex items-center",onClick:Y=>{Y.stopPropagation(),m("")},children:g.jsx("svg",{className:"h-16 w-16 text-gray-400 hover:text-gray-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})})]})}),g.jsx("div",{className:"max-h-[450px] overflow-y-auto",children:ge.length>0?g.jsx("div",{className:"py-4",children:ge.map(Y=>{var K,$,k;const z=n.includes(Y.value);return g.jsxs(O.Fragment,{children:[Y.dividerBefore&&g.jsx("div",{className:"px-16 py-8",children:g.jsx("hr",{className:"border-t border-gray-200"})}),g.jsxs("div",{className:"flex items-center px-16 py-10 transition-all duration-200 hover:bg-blue-50 cursor-pointer gap-12",onClick:()=>ae(Y.value,!z),children:[g.jsx(Kd,{active:z,size:T.checkboxSize,variant:"square",className:"flex-shrink-0"}),g.jsxs("div",{className:`flex items-center rounded-[8px] py-4 px-8 gap-[6px] overflow-hidden ${((K=Y.colors)==null?void 0:K.bgColor)||""} ${(($=Y.colors)==null?void 0:$.textColor)||""}`,children:[((k=Y.colors)==null?void 0:k.dotColor)&&g.jsx("span",{className:"size-6 rounded-full flex-shrink-0",style:{background:Y.colors.dotColor}}),g.jsx("span",{className:`${T.text} font-semibold truncate`,children:Y.label})]})]})]},Y.value)})}):g.jsxs("div",{className:"px-16 py-16 text-center text-gray-500",children:[g.jsx("svg",{className:"mx-auto h-24 w-24 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9.172 16.172a4 4 0 015.656 0M9 10h.01M15 10h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),g.jsxs("p",{className:"mt-8 text-body-s",children:["No se encontraron resultados para “",p,"”"]})]})})]})]})},IN=({label:e,options:t,selectedValue:n=null,onUpdate:r,placeholder:s="Seleccionar opción",allowSearch:o=!0,className:a="",disabled:c=!1,size:u="md",showRadio:d=!1})=>{var Y,z,K,$;const[h,p]=O.useState(!1),[m,x]=O.useState(""),S=O.useRef(null),b=O.useRef(null),v={sm:{container:"px-16 py-8",text:"text-sm",label:"text-sm",icon:"w-12 h-12",checkboxSize:16,gap:"gap-8",searchText:"text-sm",searchIcon:"size-12"},md:{container:"p-16",text:"text-14",label:"text-14",icon:"w-16 h-16",checkboxSize:20,gap:"gap-8",searchText:"text-14",searchIcon:"size-16"}}[u],{x:A,y:C,strategy:I,refs:P,context:D}=ir({open:h&&!c,onOpenChange:k=>!c&&p(k),middleware:[er(8),nr(),tr({padding:8}),Rr({apply({availableHeight:k,elements:X}){Object.assign(X.floating.style,{maxHeight:`${Math.min(k-10,500)}px`})},padding:8}),ms({element:b})],placement:"bottom-start",whileElementsMounted:Qn}),R=rr(D,{enabled:!c}),F=sr(D),{getReferenceProps:W,getFloatingProps:Q}=or([R,F]),{isMounted:ee,styles:ae}=ar(D,{duration:{open:200,close:150},initial:{opacity:0,transform:"translateY(-4px)"}}),ge=t.find(k=>k.value===n),de=k=>{c||(r(n===k?null:k),p(!1),x(""))},le=t.filter(k=>k.label.toLowerCase().includes(m.toLowerCase())),ue=W({onClick:()=>!c&&p(!h)});return g.jsxs("div",{className:`flex flex-col select-none ${v.gap} ${c?"cursor-not-allowed":""} ${a}`,children:[e&&g.jsx("h6",{className:`text-gray-600 font-600 leading-none ${v.label} ${c?"text-gray-300":""}`,children:e}),g.jsxs("div",{ref:P.setReference,className:`
|
|
720
720
|
flex items-center justify-between rounded-full border transition-all duration-200
|
|
721
721
|
${v.container}
|
|
722
722
|
${c?"bg-gray-50 border-gray-200 cursor-not-allowed":"bg-blue-50 cursor-pointer"}
|
|
@@ -736,7 +736,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
736
736
|
`,style:{width:`${r}px`,height:`${r}px`,minWidth:`${r}px`,minHeight:`${r}px`},onClick:d,...c,children:u&&g.jsx(Pe,{icon:wb,className:"text-white",style:{fontSize:`${r*.6}px`}})})},BN=({bgColor:e="bg-green-100",textColor:t="text-green-700",label:n="Completed",labelClassName:r="",className:s="",size:o="sm",showDot:a=!1,style:c={}})=>g.jsxs("div",{className:`flex items-center justify-center rounded-[6px] ${o==="md"?"py-8 px-12":"py-4 px-8"} text-center text-nowrap h-fit w-fit ${a?"gap-[6px]":""} ${e} ${t} ${s}`,style:c,children:[a&&g.jsx(Pe,{icon:zD,className:"text-[6px]"}),g.jsx("div",{className:`font-semibold ${o==="md"?"text-[16px] leading-[22px]":"text-[12px] leading-[16px]"} ${r}`,children:n})]});var Xd,h2;function WN(){if(h2)return Xd;h2=1;function e(v){this._maxSize=v,this.clear()}e.prototype.clear=function(){this._size=0,this._values=Object.create(null)},e.prototype.get=function(v){return this._values[v]},e.prototype.set=function(v,A){return this._size>=this._maxSize&&this.clear(),v in this._values||this._size++,this._values[v]=A};var t=/[^.^\]^[]+|(?=\[\]|\.\.)/g,n=/^\d+$/,r=/^\d/,s=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,o=/^\s*(['"]?)(.*?)(\1)\s*$/,a=512,c=new e(a),u=new e(a),d=new e(a);Xd={Cache:e,split:p,normalizePath:h,setter:function(v){var A=h(v);return u.get(v)||u.set(v,function(I,P){for(var D=0,R=A.length,F=I;D<R-1;){var W=A[D];if(W==="__proto__"||W==="constructor"||W==="prototype")return I;F=F[A[D++]]}F[A[D]]=P})},getter:function(v,A){var C=h(v);return d.get(v)||d.set(v,function(P){for(var D=0,R=C.length;D<R;)if(P!=null||!A)P=P[C[D++]];else return;return P})},join:function(v){return v.reduce(function(A,C){return A+(x(C)||n.test(C)?"["+C+"]":(A?".":"")+C)},"")},forEach:function(v,A,C){m(Array.isArray(v)?v:p(v),A,C)}};function h(v){return c.get(v)||c.set(v,p(v).map(function(A){return A.replace(o,"$2")}))}function p(v){return v.match(t)||[""]}function m(v,A,C){var I=v.length,P,D,R,F;for(D=0;D<I;D++)P=v[D],P&&(T(P)&&(P='"'+P+'"'),F=x(P),R=!F&&/^\d+$/.test(P),A.call(C,P,F,R,D,v))}function x(v){return typeof v=="string"&&v&&["'",'"'].indexOf(v.charAt(0))!==-1}function S(v){return v.match(r)&&!v.match(n)}function b(v){return s.test(v)}function T(v){return!x(v)&&(S(v)||b(v))}return Xd}var xs=WN(),Zd,p2;function UN(){if(p2)return Zd;p2=1;const e=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,t=h=>h.match(e)||[],n=h=>h[0].toUpperCase()+h.slice(1),r=(h,p)=>t(h).join(p).toLowerCase(),s=h=>t(h).reduce((p,m)=>`${p}${p?m[0].toUpperCase()+m.slice(1).toLowerCase():m.toLowerCase()}`,"");return Zd={words:t,upperFirst:n,camelCase:s,pascalCase:h=>n(s(h)),snakeCase:h=>r(h,"_"),kebabCase:h=>r(h,"-"),sentenceCase:h=>n(r(h," ")),titleCase:h=>t(h).map(n).join(" ")},Zd}var Jd=UN(),ul={exports:{}},m2;function zN(){if(m2)return ul.exports;m2=1,ul.exports=function(s){return e(t(s),s)},ul.exports.array=e;function e(s,o){var a=s.length,c=new Array(a),u={},d=a,h=n(o),p=r(s);for(o.forEach(function(x){if(!p.has(x[0])||!p.has(x[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});d--;)u[d]||m(s[d],d,new Set);return c;function m(x,S,b){if(b.has(x)){var T;try{T=", node was:"+JSON.stringify(x)}catch{T=""}throw new Error("Cyclic dependency"+T)}if(!p.has(x))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(x));if(!u[S]){u[S]=!0;var v=h.get(x)||new Set;if(v=Array.from(v),S=v.length){b.add(x);do{var A=v[--S];m(A,p.get(A),b)}while(S);b.delete(x)}c[--a]=x}}}function t(s){for(var o=new Set,a=0,c=s.length;a<c;a++){var u=s[a];o.add(u[0]),o.add(u[1])}return Array.from(o)}function n(s){for(var o=new Map,a=0,c=s.length;a<c;a++){var u=s[a];o.has(u[0])||o.set(u[0],new Set),o.has(u[1])||o.set(u[1],new Set),o.get(u[0]).add(u[1])}return o}function r(s){for(var o=new Map,a=0,c=s.length;a<c;a++)o.set(s[a],a);return o}return ul.exports}var GN=zN();const YN=Ap(GN),HN=Object.prototype.toString,qN=Error.prototype.toString,KN=RegExp.prototype.toString,XN=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",ZN=/^Symbol\((.*)\)(.*)$/;function JN(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function g2(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const n=typeof e;if(n==="number")return JN(e);if(n==="string")return t?`"${e}"`:e;if(n==="function")return"[Function "+(e.name||"anonymous")+"]";if(n==="symbol")return XN.call(e).replace(ZN,"Symbol($1)");const r=HN.call(e).slice(8,-1);return r==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):r==="Error"||e instanceof Error?"["+qN.call(e)+"]":r==="RegExp"?KN.call(e):null}function Fr(e,t){let n=g2(e,t);return n!==null?n:JSON.stringify(e,function(r,s){let o=g2(this[r],t);return o!==null?o:s},2)}function y2(e){return e==null?[]:[].concat(e)}let x2,v2,b2,QN=/\$\{\s*(\w+)\s*\}/g;x2=Symbol.toStringTag;class w2{constructor(t,n,r,s){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[x2]="Error",this.name="ValidationError",this.value=n,this.path=r,this.type=s,this.errors=[],this.inner=[],y2(t).forEach(o=>{if(jt.isError(o)){this.errors.push(...o.errors);const a=o.inner.length?o.inner:[o];this.inner.push(...a)}else this.errors.push(o)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}v2=Symbol.hasInstance,b2=Symbol.toStringTag;class jt extends Error{static formatError(t,n){const r=n.label||n.path||"this";return n=Object.assign({},n,{path:r,originalPath:n.path}),typeof t=="string"?t.replace(QN,(s,o)=>Fr(n[o])):typeof t=="function"?t(n):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,n,r,s,o){const a=new w2(t,n,r,s);if(o)return a;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[b2]="Error",this.name=a.name,this.message=a.message,this.type=a.type,this.value=a.value,this.path=a.path,this.errors=a.errors,this.inner=a.inner,Error.captureStackTrace&&Error.captureStackTrace(this,jt)}static[v2](t){return w2[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let Rn={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:n,originalValue:r})=>{const s=r!=null&&r!==n?` (cast from the value \`${Fr(r,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${Fr(n,!0)}\``+s:`${e} must match the configured type. The validated value was: \`${Fr(n,!0)}\``+s}},Lt={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},ek={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},Qd={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},tk={isValue:"${path} field must be ${value}"},fl={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"};Object.assign(Object.create(null),{mixed:Rn,string:Lt,number:ek,date:Qd,object:fl,array:{min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},boolean:tk,tuple:{notType:e=>{const{path:t,value:n,spec:r}=e,s=r.types.length;if(Array.isArray(n)){if(n.length<s)return`${t} tuple value has too few items, expected a length of ${s} but got ${n.length} for value: \`${Fr(n,!0)}\``;if(n.length>s)return`${t} tuple value has too many items, expected a length of ${s} but got ${n.length} for value: \`${Fr(n,!0)}\``}return jt.formatError(Rn.notType,e)}}});const eh=e=>e&&e.__isYupSchema__;class dl{static fromOptions(t,n){if(!n.then&&!n.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:r,then:s,otherwise:o}=n,a=typeof r=="function"?r:(...c)=>c.every(u=>u===r);return new dl(t,(c,u)=>{var d;let h=a(...c)?s:o;return(d=h==null?void 0:h(u))!=null?d:u})}constructor(t,n){this.fn=void 0,this.refs=t,this.refs=t,this.fn=n}resolve(t,n){let r=this.refs.map(o=>o.getValue(n==null?void 0:n.value,n==null?void 0:n.parent,n==null?void 0:n.context)),s=this.fn(r,t,n);if(s===void 0||s===t)return t;if(!eh(s))throw new TypeError("conditions must return a schema object");return s.resolve(n)}}const hl={context:"$",value:"."};class vs{constructor(t,n={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===hl.context,this.isValue=this.key[0]===hl.value,this.isSibling=!this.isContext&&!this.isValue;let r=this.isContext?hl.context:this.isValue?hl.value:"";this.path=this.key.slice(r.length),this.getter=this.path&&xs.getter(this.path,!0),this.map=n.map}getValue(t,n,r){let s=this.isContext?r:this.isValue?t:n;return this.getter&&(s=this.getter(s||{})),this.map&&(s=this.map(s)),s}cast(t,n){return this.getValue(t,n==null?void 0:n.parent,n==null?void 0:n.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}vs.prototype.__isYupRef=!0;const bs=e=>e==null;function xi(e){function t({value:n,path:r="",options:s,originalValue:o,schema:a},c,u){const{name:d,test:h,params:p,message:m,skipAbsent:x}=e;let{parent:S,context:b,abortEarly:T=a.spec.abortEarly,disableStackTrace:v=a.spec.disableStackTrace}=s;function A(ee){return vs.isRef(ee)?ee.getValue(n,S,b):ee}function C(ee={}){const ae=Object.assign({value:n,originalValue:o,label:a.spec.label,path:ee.path||r,spec:a.spec,disableStackTrace:ee.disableStackTrace||v},p,ee.params);for(const de of Object.keys(ae))ae[de]=A(ae[de]);const ge=new jt(jt.formatError(ee.message||m,ae),n,ae.path,ee.type||d,ae.disableStackTrace);return ge.params=ae,ge}const I=T?c:u;let P={path:r,parent:S,type:d,from:s.from,createError:C,resolve:A,options:s,originalValue:o,schema:a};const D=ee=>{jt.isError(ee)?I(ee):ee?u(null):I(C())},R=ee=>{jt.isError(ee)?I(ee):c(ee)};if(x&&bs(n))return D(!0);let W;try{var Q;if(W=h.call(P,n,P),typeof((Q=W)==null?void 0:Q.then)=="function"){if(s.sync)throw new Error(`Validation test of type: "${P.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(W).then(D,R)}}catch(ee){R(ee);return}D(W)}return t.OPTIONS=e,t}function nk(e,t,n,r=n){let s,o,a;return t?(xs.forEach(t,(c,u,d)=>{let h=u?c.slice(1,c.length-1):c;e=e.resolve({context:r,parent:s,value:n});let p=e.type==="tuple",m=d?parseInt(h,10):0;if(e.innerType||p){if(p&&!d)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${a}" must contain an index to the tuple element, e.g. "${a}[0]"`);if(n&&m>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${c}, in the path: ${t}. because there is no value at that index. `);s=n,n=n&&n[m],e=p?e.spec.types[m]:e.innerType}if(!d){if(!e.fields||!e.fields[h])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${a} which is a type: "${e.type}")`);s=n,n=n&&n[h],e=e.fields[h]}o=h,a=u?"["+c+"]":"."+c}),{schema:e,parent:s,parentPath:o}):{parent:s,parentPath:t,schema:e}}class pl extends Set{describe(){const t=[];for(const n of this.values())t.push(vs.isRef(n)?n.describe():n);return t}resolveAll(t){let n=[];for(const r of this.values())n.push(t(r));return n}clone(){return new pl(this.values())}merge(t,n){const r=this.clone();return t.forEach(s=>r.add(s)),n.forEach(s=>r.delete(s)),r}}function vi(e,t=new Map){if(eh(e)||!e||typeof e!="object")return e;if(t.has(e))return t.get(e);let n;if(e instanceof Date)n=new Date(e.getTime()),t.set(e,n);else if(e instanceof RegExp)n=new RegExp(e),t.set(e,n);else if(Array.isArray(e)){n=new Array(e.length),t.set(e,n);for(let r=0;r<e.length;r++)n[r]=vi(e[r],t)}else if(e instanceof Map){n=new Map,t.set(e,n);for(const[r,s]of e.entries())n.set(r,vi(s,t))}else if(e instanceof Set){n=new Set,t.set(e,n);for(const r of e)n.add(vi(r,t))}else if(e instanceof Object){n={},t.set(e,n);for(const[r,s]of Object.entries(e))n[r]=vi(s,t)}else throw Error(`Unable to clone ${e}`);return n}class Fn{constructor(t){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new pl,this._blacklist=new pl,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(Rn.notType)}),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},t==null?void 0:t.spec),this.withMutation(n=>{n.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const n=Object.create(Object.getPrototypeOf(this));return n.type=this.type,n._typeCheck=this._typeCheck,n._whitelist=this._whitelist.clone(),n._blacklist=this._blacklist.clone(),n.internalTests=Object.assign({},this.internalTests),n.exclusiveTests=Object.assign({},this.exclusiveTests),n.deps=[...this.deps],n.conditions=[...this.conditions],n.tests=[...this.tests],n.transforms=[...this.transforms],n.spec=vi(Object.assign({},this.spec,t)),n}label(t){let n=this.clone();return n.spec.label=t,n}meta(...t){if(t.length===0)return this.spec.meta;let n=this.clone();return n.spec.meta=Object.assign(n.spec.meta||{},t[0]),n}withMutation(t){let n=this._mutate;this._mutate=!0;let r=t(this);return this._mutate=n,r}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let n=this,r=t.clone();const s=Object.assign({},n.spec,r.spec);return r.spec=s,r.internalTests=Object.assign({},n.internalTests,r.internalTests),r._whitelist=n._whitelist.merge(t._whitelist,t._blacklist),r._blacklist=n._blacklist.merge(t._blacklist,t._whitelist),r.tests=n.tests,r.exclusiveTests=n.exclusiveTests,r.withMutation(o=>{t.tests.forEach(a=>{o.test(a.OPTIONS)})}),r.transforms=[...n.transforms,...r.transforms],r}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let n=this;if(n.conditions.length){let r=n.conditions;n=n.clone(),n.conditions=[],n=r.reduce((s,o)=>o.resolve(s,t),n),n=n.resolve(t)}return n}resolveOptions(t){var n,r,s,o;return Object.assign({},t,{from:t.from||[],strict:(n=t.strict)!=null?n:this.spec.strict,abortEarly:(r=t.abortEarly)!=null?r:this.spec.abortEarly,recursive:(s=t.recursive)!=null?s:this.spec.recursive,disableStackTrace:(o=t.disableStackTrace)!=null?o:this.spec.disableStackTrace})}cast(t,n={}){let r=this.resolve(Object.assign({value:t},n)),s=n.assert==="ignore-optionality",o=r._cast(t,n);if(n.assert!==!1&&!r.isType(o)){if(s&&bs(o))return o;let a=Fr(t),c=Fr(o);throw new TypeError(`The value of ${n.path||"field"} could not be cast to a value that satisfies the schema type: "${r.type}".
|
|
737
737
|
|
|
738
738
|
attempted value: ${a}
|
|
739
|
-
`+(c!==a?`result of cast: ${c}`:""))}return o}_cast(t,n){let r=t===void 0?t:this.transforms.reduce((s,o)=>o.call(this,s,t,this),t);return r===void 0&&(r=this.getDefault(n)),r}_validate(t,n={},r,s){let{path:o,originalValue:a=t,strict:c=this.spec.strict}=n,u=t;c||(u=this._cast(u,Object.assign({assert:!1},n)));let d=[];for(let h of Object.values(this.internalTests))h&&d.push(h);this.runTests({path:o,value:u,originalValue:a,options:n,tests:d},r,h=>{if(h.length)return s(h,u);this.runTests({path:o,value:u,originalValue:a,options:n,tests:this.tests},r,s)})}runTests(t,n,r){let s=!1,{tests:o,value:a,originalValue:c,path:u,options:d}=t,h=b=>{s||(s=!0,n(b,a))},p=b=>{s||(s=!0,r(b,a))},m=o.length,x=[];if(!m)return p([]);let S={value:a,originalValue:c,path:u,options:d,schema:this};for(let b=0;b<o.length;b++){const T=o[b];T(S,h,function(A){A&&(Array.isArray(A)?x.push(...A):x.push(A)),--m<=0&&p(x)})}}asNestedTest({key:t,index:n,parent:r,parentPath:s,originalParent:o,options:a}){const c=t??n;if(c==null)throw TypeError("Must include `key` or `index` for nested validations");const u=typeof c=="number";let d=r[c];const h=Object.assign({},a,{strict:!0,parent:r,value:d,originalValue:o[c],key:void 0,[u?"index":"key"]:c,path:u||c.includes(".")?`${s||""}[${u?c:`"${c}"`}]`:(s?`${s}.`:"")+t});return(p,m,x)=>this.resolve(h)._validate(d,h,m,x)}validate(t,n){var r;let s=this.resolve(Object.assign({},n,{value:t})),o=(r=n==null?void 0:n.disableStackTrace)!=null?r:s.spec.disableStackTrace;return new Promise((a,c)=>s._validate(t,n,(u,d)=>{jt.isError(u)&&(u.value=d),c(u)},(u,d)=>{u.length?c(new jt(u,d,void 0,void 0,o)):a(d)}))}validateSync(t,n){var r;let s=this.resolve(Object.assign({},n,{value:t})),o,a=(r=n==null?void 0:n.disableStackTrace)!=null?r:s.spec.disableStackTrace;return s._validate(t,Object.assign({},n,{sync:!0}),(c,u)=>{throw jt.isError(c)&&(c.value=u),c},(c,u)=>{if(c.length)throw new jt(c,t,void 0,void 0,a);o=u}),o}isValid(t,n){return this.validate(t,n).then(()=>!0,r=>{if(jt.isError(r))return!1;throw r})}isValidSync(t,n){try{return this.validateSync(t,n),!0}catch(r){if(jt.isError(r))return!1;throw r}}_getDefault(t){let n=this.spec.default;return n==null?n:typeof n=="function"?n.call(this,t):vi(n)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,n){const r=this.clone({nullable:t});return r.internalTests.nullable=xi({message:n,name:"nullable",test(s){return s===null?this.schema.spec.nullable:!0}}),r}optionality(t,n){const r=this.clone({optional:t});return r.internalTests.optionality=xi({message:n,name:"optionality",test(s){return s===void 0?this.schema.spec.optional:!0}}),r}optional(){return this.optionality(!0)}defined(t=Rn.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=Rn.notNull){return this.nullability(!1,t)}required(t=Rn.required){return this.clone().withMutation(n=>n.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let n=this.clone();return n.transforms.push(t),n}test(...t){let n;if(t.length===1?typeof t[0]=="function"?n={test:t[0]}:n=t[0]:t.length===2?n={name:t[0],test:t[1]}:n={name:t[0],message:t[1],test:t[2]},n.message===void 0&&(n.message=Rn.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let r=this.clone(),s=xi(n),o=n.exclusive||n.name&&r.exclusiveTests[n.name]===!0;if(n.exclusive&&!n.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return n.name&&(r.exclusiveTests[n.name]=!!n.exclusive),r.tests=r.tests.filter(a=>!(a.OPTIONS.name===n.name&&(o||a.OPTIONS.test===s.OPTIONS.test))),r.tests.push(s),r}when(t,n){!Array.isArray(t)&&typeof t!="string"&&(n=t,t=".");let r=this.clone(),s=y2(t).map(o=>new vs(o));return s.forEach(o=>{o.isSibling&&r.deps.push(o.key)}),r.conditions.push(typeof n=="function"?new dl(s,n):dl.fromOptions(s,n)),r}typeError(t){let n=this.clone();return n.internalTests.typeError=xi({message:t,name:"typeError",skipAbsent:!0,test(r){return this.schema._typeCheck(r)?!0:this.createError({params:{type:this.schema.type}})}}),n}oneOf(t,n=Rn.oneOf){let r=this.clone();return t.forEach(s=>{r._whitelist.add(s),r._blacklist.delete(s)}),r.internalTests.whiteList=xi({message:n,name:"oneOf",skipAbsent:!0,test(s){let o=this.schema._whitelist,a=o.resolveAll(this.resolve);return a.includes(s)?!0:this.createError({params:{values:Array.from(o).join(", "),resolved:a}})}}),r}notOneOf(t,n=Rn.notOneOf){let r=this.clone();return t.forEach(s=>{r._blacklist.add(s),r._whitelist.delete(s)}),r.internalTests.blacklist=xi({message:n,name:"notOneOf",test(s){let o=this.schema._blacklist,a=o.resolveAll(this.resolve);return a.includes(s)?this.createError({params:{values:Array.from(o).join(", "),resolved:a}}):!0}}),r}strip(t=!0){let n=this.clone();return n.spec.strip=t,n}describe(t){const n=(t?this.resolve(t):this).clone(),{label:r,meta:s,optional:o,nullable:a}=n.spec;return{meta:s,label:r,optional:o,nullable:a,default:n.getDefault(t),type:n.type,oneOf:n._whitelist.describe(),notOneOf:n._blacklist.describe(),tests:n.tests.map(u=>({name:u.OPTIONS.name,params:u.OPTIONS.params})).filter((u,d,h)=>h.findIndex(p=>p.name===u.name)===d)}}}Fn.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])Fn.prototype[`${e}At`]=function(t,n,r={}){const{parent:s,parentPath:o,schema:a}=nk(this,t,n,r.context);return a[e](s&&s[o],Object.assign({},r,{parent:s,path:t}))};for(const e of["equals","is"])Fn.prototype[e]=Fn.prototype.oneOf;for(const e of["not","nope"])Fn.prototype[e]=Fn.prototype.notOneOf;const rk=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function sk(e){const t=th(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(t.z===void 0&&t.plusMinus===void 0)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let n=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(n=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(n=0-n)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+n,t.second,t.millisecond)}function th(e){var t,n;const r=rk.exec(e);return r?{year:lr(r[1]),month:lr(r[2],1)-1,day:lr(r[3],1),hour:lr(r[4]),minute:lr(r[5]),second:lr(r[6]),millisecond:r[7]?lr(r[7].substring(0,3)):0,precision:(t=(n=r[7])==null?void 0:n.length)!=null?t:void 0,z:r[8]||void 0,plusMinus:r[9]||void 0,hourOffset:lr(r[10]),minuteOffset:lr(r[11])}:null}function lr(e,t=0){return Number(e)||t}let ik=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,ok=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,ak=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,lk="^\\d{4}-\\d{2}-\\d{2}",ck="\\d{2}:\\d{2}:\\d{2}",uk="(([+-]\\d{2}(:?\\d{2})?)|Z)",fk=new RegExp(`${lk}T${ck}(\\.\\d+)?${uk}$`),dk=e=>bs(e)||e===e.trim(),hk={}.toString();function Vr(){return new S2}class S2 extends Fn{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(!r.spec.coerce||r.isType(t)||Array.isArray(t))return t;const s=t!=null&&t.toString?t.toString():t;return s===hk?t:s})})}required(t){return super.required(t).withMutation(n=>n.test({message:t||Rn.required,name:"required",skipAbsent:!0,test:r=>!!r.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(n=>n.OPTIONS.name!=="required"),t))}length(t,n=Lt.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(r){return r.length===this.resolve(t)}})}min(t,n=Lt.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(r){return r.length>=this.resolve(t)}})}max(t,n=Lt.max){return this.test({name:"max",exclusive:!0,message:n,params:{max:t},skipAbsent:!0,test(r){return r.length<=this.resolve(t)}})}matches(t,n){let r=!1,s,o;return n&&(typeof n=="object"?{excludeEmptyString:r=!1,message:s,name:o}=n:s=n),this.test({name:o||"matches",message:s||Lt.matches,params:{regex:t},skipAbsent:!0,test:a=>a===""&&r||a.search(t)!==-1})}email(t=Lt.email){return this.matches(ik,{name:"email",message:t,excludeEmptyString:!0})}url(t=Lt.url){return this.matches(ok,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=Lt.uuid){return this.matches(ak,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let n="",r,s;return t&&(typeof t=="object"?{message:n="",allowOffset:r=!1,precision:s=void 0}=t:n=t),this.matches(fk,{name:"datetime",message:n||Lt.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:n||Lt.datetime_offset,params:{allowOffset:r},skipAbsent:!0,test:o=>{if(!o||r)return!0;const a=th(o);return a?!!a.z:!1}}).test({name:"datetime_precision",message:n||Lt.datetime_precision,params:{precision:s},skipAbsent:!0,test:o=>{if(!o||s==null)return!0;const a=th(o);return a?a.precision===s:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=Lt.trim){return this.transform(n=>n!=null?n.trim():n).test({message:t,name:"trim",test:dk})}lowercase(t=Lt.lowercase){return this.transform(n=>bs(n)?n:n.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>bs(n)||n===n.toLowerCase()})}uppercase(t=Lt.uppercase){return this.transform(n=>bs(n)?n:n.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>bs(n)||n===n.toUpperCase()})}}Vr.prototype=S2.prototype;let pk=new Date(""),mk=e=>Object.prototype.toString.call(e)==="[object Date]";class nh extends Fn{constructor(){super({type:"date",check(t){return mk(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,n,r)=>!r.spec.coerce||r.isType(t)||t===null?t:(t=sk(t),isNaN(t)?nh.INVALID_DATE:new Date(t)))})}prepareParam(t,n){let r;if(vs.isRef(t))r=t;else{let s=this.cast(t);if(!this._typeCheck(s))throw new TypeError(`\`${n}\` must be a Date or a value that can be \`cast()\` to a Date`);r=s}return r}min(t,n=Qd.min){let r=this.prepareParam(t,"min");return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(s){return s>=this.resolve(r)}})}max(t,n=Qd.max){let r=this.prepareParam(t,"max");return this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(s){return s<=this.resolve(r)}})}}nh.INVALID_DATE=pk;function gk(e,t=[]){let n=[],r=new Set,s=new Set(t.map(([a,c])=>`${a}-${c}`));function o(a,c){let u=xs.split(a)[0];r.add(u),s.has(`${c}-${u}`)||n.push([c,u])}for(const a of Object.keys(e)){let c=e[a];r.add(a),vs.isRef(c)&&c.isSibling?o(c.path,a):eh(c)&&"deps"in c&&c.deps.forEach(u=>o(u,a))}return YN.array(Array.from(r),n).reverse()}function T2(e,t){let n=1/0;return e.some((r,s)=>{var o;if((o=t.path)!=null&&o.includes(r))return n=s,!0}),n}function C2(e){return(t,n)=>T2(e,t)-T2(e,n)}const yk=(e,t,n)=>{if(typeof e!="string")return e;let r=e;try{r=JSON.parse(e)}catch{}return n.isType(r)?r:e};function ml(e){if("fields"in e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=ml(r);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=ml(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(ml)}):"optional"in e?e.optional():e}const xk=(e,t)=>{const n=[...xs.normalizePath(t)];if(n.length===1)return n[0]in e;let r=n.pop(),s=xs.getter(xs.join(n),!0)(e);return!!(s&&r in s)};let E2=e=>Object.prototype.toString.call(e)==="[object Object]";function P2(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(r=>n.indexOf(r)===-1)}const vk=C2([]);function rh(e){return new A2(e)}class A2 extends Fn{constructor(t){super({type:"object",check(n){return E2(n)||typeof n=="function"}}),this.fields=Object.create(null),this._sortErrors=vk,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,n={}){var r;let s=super._cast(t,n);if(s===void 0)return this.getDefault(n);if(!this._typeCheck(s))return s;let o=this.fields,a=(r=n.stripUnknown)!=null?r:this.spec.noUnknown,c=[].concat(this._nodes,Object.keys(s).filter(p=>!this._nodes.includes(p))),u={},d=Object.assign({},n,{parent:u,__validating:n.__validating||!1}),h=!1;for(const p of c){let m=o[p],x=p in s;if(m){let S,b=s[p];d.path=(n.path?`${n.path}.`:"")+p,m=m.resolve({value:b,context:n.context,parent:u});let T=m instanceof Fn?m.spec:void 0,v=T==null?void 0:T.strict;if(T!=null&&T.strip){h=h||p in s;continue}S=!n.__validating||!v?m.cast(s[p],d):s[p],S!==void 0&&(u[p]=S)}else x&&!a&&(u[p]=s[p]);(x!==p in u||u[p]!==s[p])&&(h=!0)}return h?u:s}_validate(t,n={},r,s){let{from:o=[],originalValue:a=t,recursive:c=this.spec.recursive}=n;n.from=[{schema:this,value:a},...o],n.__validating=!0,n.originalValue=a,super._validate(t,n,r,(u,d)=>{if(!c||!E2(d)){s(u,d);return}a=a||d;let h=[];for(let p of this._nodes){let m=this.fields[p];!m||vs.isRef(m)||h.push(m.asNestedTest({options:n,key:p,parent:d,parentPath:n.path,originalParent:a}))}this.runTests({tests:h,value:d,originalValue:a,options:n},r,p=>{s(p.sort(this._sortErrors).concat(u),d)})})}clone(t){const n=super.clone(t);return n.fields=Object.assign({},this.fields),n._nodes=this._nodes,n._excludedEdges=this._excludedEdges,n._sortErrors=this._sortErrors,n}concat(t){let n=super.concat(t),r=n.fields;for(let[s,o]of Object.entries(this.fields)){const a=r[s];r[s]=a===void 0?o:a}return n.withMutation(s=>s.setFields(r,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let n={};return this._nodes.forEach(r=>{var s;const o=this.fields[r];let a=t;(s=a)!=null&&s.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[r]})),n[r]=o&&"getDefault"in o?o.getDefault(a):void 0}),n}setFields(t,n){let r=this.clone();return r.fields=t,r._nodes=gk(t,n),r._sortErrors=C2(Object.keys(t)),n&&(r._excludedEdges=n),r}shape(t,n=[]){return this.clone().withMutation(r=>{let s=r._excludedEdges;return n.length&&(Array.isArray(n[0])||(n=[n]),s=[...r._excludedEdges,...n]),r.setFields(Object.assign(r.fields,t),s)})}partial(){const t={};for(const[n,r]of Object.entries(this.fields))t[n]="optional"in r&&r.optional instanceof Function?r.optional():r;return this.setFields(t)}deepPartial(){return ml(this)}pick(t){const n={};for(const r of t)this.fields[r]&&(n[r]=this.fields[r]);return this.setFields(n,this._excludedEdges.filter(([r,s])=>t.includes(r)&&t.includes(s)))}omit(t){const n=[];for(const r of Object.keys(this.fields))t.includes(r)||n.push(r);return this.pick(n)}from(t,n,r){let s=xs.getter(t,!0);return this.transform(o=>{if(!o)return o;let a=o;return xk(o,t)&&(a=Object.assign({},o),r||delete a[t],a[n]=s(o)),a})}json(){return this.transform(yk)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||fl.exact,test(n){if(n==null)return!0;const r=P2(this.schema,n);return r.length===0||this.createError({params:{properties:r.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,n=fl.noUnknown){typeof t!="boolean"&&(n=t,t=!0);let r=this.test({name:"noUnknown",exclusive:!0,message:n,test(s){if(s==null)return!0;const o=P2(this.schema,s);return!t||o.length===0||this.createError({params:{unknown:o.join(", ")}})}});return r.spec.noUnknown=t,r}unknown(t=!0,n=fl.noUnknown){return this.noUnknown(!t,n)}transformKeys(t){return this.transform(n=>{if(!n)return n;const r={};for(const s of Object.keys(n))r[t(s)]=n[s];return r})}camelCase(){return this.transformKeys(Jd.camelCase)}snakeCase(){return this.transformKeys(Jd.snakeCase)}constantCase(){return this.transformKeys(t=>Jd.snakeCase(t).toUpperCase())}describe(t){const n=(t?this.resolve(t):this).clone(),r=super.describe(t);r.fields={};for(const[o,a]of Object.entries(n.fields)){var s;let c=t;(s=c)!=null&&s.value&&(c=Object.assign({},c,{parent:c.value,value:c.value[o]})),r.fields[o]=a.describe(c)}return r}}rh.prototype=A2.prototype,rh().shape({labelES:Vr().required(),label:Vr().required(),code:Vr().required(),codeISO2:Vr().required(),phone:Vr().required()});const M2=[{labelES:"Afganistán",label:"Afghanistan",codeISO2:"AF",code:"AFG",phone:"93"},{labelES:"Albania",label:"Albania",codeISO2:"AL",code:"ALB",phone:"355"},{labelES:"Alemania",label:"Germany",codeISO2:"DE",code:"DEU",phone:"49"},{labelES:"Andorra",label:"Andorra",codeISO2:"AD",code:"AND",phone:"376"},{labelES:"Angola",label:"Angola",codeISO2:"AO",code:"AGO",phone:"244"},{labelES:"Anguila",label:"Anguilla",codeISO2:"AI",code:"AIA",phone:"1 264"},{labelES:"Antártida",label:"Antarctica",codeISO2:"AQ",code:"ATA",phone:"672"},{labelES:"Antigua y Barbuda",label:"Antigua and Barbuda",codeISO2:"AG",code:"ATG",phone:"1 268"},{labelES:"Arabia Saudita",label:"Saudi Arabia",codeISO2:"SA",code:"SAU",phone:"966"},{labelES:"Argelia",label:"Algeria",codeISO2:"DZ",code:"DZA",phone:"213"},{labelES:"Argentina",label:"Argentina",codeISO2:"AR",code:"ARG",phone:"54"},{labelES:"Armenia",label:"Armenia",codeISO2:"AM",code:"ARM",phone:"374"},{labelES:"Aruba",label:"Aruba",codeISO2:"AW",code:"ABW",phone:"297"},{labelES:"Australia",label:"Australia",codeISO2:"AU",code:"AUS",phone:"61"},{labelES:"Austria",label:"Austria",codeISO2:"AT",code:"AUT",phone:"43"},{labelES:"Azerbaiyán",label:"Azerbaijan",codeISO2:"AZ",code:"AZE",phone:"994"},{labelES:"Bélgica",label:"Belgium",codeISO2:"BE",code:"BEL",phone:"32"},{labelES:"Bahamas",label:"Bahamas",codeISO2:"BS",code:"BHS",phone:"1 242"},{labelES:"Bahrein",label:"Bahrain",codeISO2:"BH",code:"BHR",phone:"973"},{labelES:"Bangladesh",label:"Bangladesh",codeISO2:"BD",code:"BGD",phone:"880"},{labelES:"Barbados",label:"Barbados",codeISO2:"BB",code:"BRB",phone:"1 246"},{labelES:"Belice",label:"Belize",codeISO2:"BZ",code:"BLZ",phone:"501"},{labelES:"Benín",label:"Benin",codeISO2:"BJ",code:"BEN",phone:"229"},{labelES:"Bhután",label:"Bhutan",codeISO2:"BT",code:"BTN",phone:"975"},{labelES:"Bielorrusia",label:"Belarus",codeISO2:"BY",code:"BLR",phone:"375"},{labelES:"Birmania",label:"Myanmar",codeISO2:"MM",code:"MMR",phone:"95"},{labelES:"Bolivia",label:"Bolivia",codeISO2:"BO",code:"BOL",phone:"591"},{labelES:"Bosnia y Herzegovina",label:"Bosnia and Herzegovina",codeISO2:"BA",code:"BIH",phone:"387"},{labelES:"Botsuana",label:"Botswana",codeISO2:"BW",code:"BWA",phone:"267"},{labelES:"Brasil",label:"Brazil",codeISO2:"BR",code:"BRA",phone:"55"},{labelES:"Brunéi",label:"Brunei",codeISO2:"BN",code:"BRN",phone:"673"},{labelES:"Bulgaria",label:"Bulgaria",codeISO2:"BG",code:"BGR",phone:"359"},{labelES:"Burkina Faso",label:"Burkina Faso",codeISO2:"BF",code:"BFA",phone:"226"},{labelES:"Burundi",label:"Burundi",codeISO2:"BI",code:"BDI",phone:"257"},{labelES:"Cabo Verde",label:"Cape Verde",codeISO2:"CV",code:"CPV",phone:"238"},{labelES:"Camboya",label:"Cambodia",codeISO2:"KH",code:"KHM",phone:"855"},{labelES:"Camerún",label:"Cameroon",codeISO2:"CM",code:"CMR",phone:"237"},{labelES:"Canadá",label:"Canada",codeISO2:"CA",code:"CAN",phone:"1"},{labelES:"Chad",label:"Chad",codeISO2:"TD",code:"TCD",phone:"235"},{labelES:"Chile",label:"Chile",codeISO2:"CL",code:"CHL",phone:"56"},{labelES:"China",label:"China",codeISO2:"CN",code:"CHN",phone:"86"},{labelES:"Chipre",label:"Cyprus",codeISO2:"CY",code:"CYP",phone:"357"},{labelES:"Ciudad del Vaticano",label:"Vatican City State",codeISO2:"VA",code:"VAT",phone:"39"},{labelES:"Colombia",label:"Colombia",codeISO2:"CO",code:"COL",phone:"57"},{labelES:"Comoras",label:"Comoros",codeISO2:"KM",code:"COM",phone:"269"},{labelES:"República del Congo",label:"Republic of the Congo",codeISO2:"CG",code:"COG",phone:"242"},{labelES:"República Democrática del Congo",label:"Democratic Republic of the Congo",codeISO2:"CD",code:"COD",phone:"243"},{labelES:"Corea del Norte",label:"North Korea",codeISO2:"KP",code:"PRK",phone:"850"},{labelES:"Corea del Sur",label:"South Korea",codeISO2:"KR",code:"KOR",phone:"82"},{labelES:"Costa de Marfil",label:"Ivory Coast",codeISO2:"CI",code:"CIV",phone:"225"},{labelES:"Costa Rica",label:"Costa Rica",codeISO2:"CR",code:"CRI",phone:"506"},{labelES:"Croacia",label:"Croatia",codeISO2:"HR",code:"HRV",phone:"385"},{labelES:"Cuba",label:"Cuba",codeISO2:"CU",code:"CUB",phone:"53"},{labelES:"Curazao",label:"Curaçao",codeISO2:"CW",code:"CWU",phone:"5999"},{labelES:"Dinamarca",label:"Denmark",codeISO2:"DK",code:"DNK",phone:"45"},{labelES:"Dominica",label:"Dominica",codeISO2:"DM",code:"DMA",phone:"1 767"},{labelES:"Ecuador",label:"Ecuador",codeISO2:"EC",code:"ECU",phone:"593"},{labelES:"Egipto",label:"Egypt",codeISO2:"EG",code:"EGY",phone:"20"},{labelES:"El Salvador",label:"El Salvador",codeISO2:"SV",code:"SLV",phone:"503"},{labelES:"Emiratos Árabes Unidos",label:"United Arab Emirates",codeISO2:"AE",code:"ARE",phone:"971"},{labelES:"Eritrea",label:"Eritrea",codeISO2:"ER",code:"ERI",phone:"291"},{labelES:"Eslovaquia",label:"Slovakia",codeISO2:"SK",code:"SVK",phone:"421"},{labelES:"Eslovenia",label:"Slovenia",codeISO2:"SI",code:"SVN",phone:"386"},{labelES:"España",label:"Spain",codeISO2:"ES",code:"ESP",phone:"34"},{labelES:"Estados Unidos de América",label:"United States of America",codeISO2:"US",code:"USA",phone:"1"},{labelES:"Estonia",label:"Estonia",codeISO2:"EE",code:"EST",phone:"372"},{labelES:"Etiopía",label:"Ethiopia",codeISO2:"ET",code:"ETH",phone:"251"},{labelES:"Filipinas",label:"Philippines",codeISO2:"PH",code:"PHL",phone:"63"},{labelES:"Finlandia",label:"Finland",codeISO2:"FI",code:"FIN",phone:"358"},{labelES:"Fiyi",label:"Fiji",codeISO2:"FJ",code:"FJI",phone:"679"},{labelES:"Francia",label:"France",codeISO2:"FR",code:"FRA",phone:"33"},{labelES:"Gabón",label:"Gabon",codeISO2:"GA",code:"GAB",phone:"241"},{labelES:"Gambia",label:"Gambia",codeISO2:"GM",code:"GMB",phone:"220"},{labelES:"Georgia",label:"Georgia",codeISO2:"GE",code:"GEO",phone:"995"},{labelES:"Ghana",label:"Ghana",codeISO2:"GH",code:"GHA",phone:"233"},{labelES:"Gibraltar",label:"Gibraltar",codeISO2:"GI",code:"GIB",phone:"350"},{labelES:"Granada",label:"Grenada",codeISO2:"GD",code:"GRD",phone:"1 473"},{labelES:"Grecia",label:"Greece",codeISO2:"GR",code:"GRC",phone:"30"},{labelES:"Groenlandia",label:"Greenland",codeISO2:"GL",code:"GRL",phone:"299"},{labelES:"Guadalupe",label:"Guadeloupe",codeISO2:"GP",code:"GLP",phone:"590"},{labelES:"Guam",label:"Guam",codeISO2:"GU",code:"GUM",phone:"1 671"},{labelES:"Guatemala",label:"Guatemala",codeISO2:"GT",code:"GTM",phone:"502"},{labelES:"Guayana Francesa",label:"French Guiana",codeISO2:"GF",code:"GUF",phone:"594"},{labelES:"Guernsey",label:"Guernsey",codeISO2:"GG",code:"GGY",phone:"44"},{labelES:"Guinea",label:"Guinea",codeISO2:"GN",code:"GIN",phone:"224"},{labelES:"Guinea Ecuatorial",label:"Equatorial Guinea",codeISO2:"GQ",code:"GNQ",phone:"240"},{labelES:"Guinea-Bissau",label:"Guinea-Bissau",codeISO2:"GW",code:"GNB",phone:"245"},{labelES:"Guyana",label:"Guyana",codeISO2:"GY",code:"GUY",phone:"592"},{labelES:"Haití",label:"Haiti",codeISO2:"HT",code:"HTI",phone:"509"},{labelES:"Honduras",label:"Honduras",codeISO2:"HN",code:"HND",phone:"504"},{labelES:"Hong kong",label:"Hong Kong",codeISO2:"HK",code:"HKG",phone:"852"},{labelES:"Hungría",label:"Hungary",codeISO2:"HU",code:"HUN",phone:"36"},{labelES:"India",label:"India",codeISO2:"IN",code:"IND",phone:"91"},{labelES:"Indonesia",label:"Indonesia",codeISO2:"ID",code:"IDN",phone:"62"},{labelES:"Irán",label:"Iran",codeISO2:"IR",code:"IRN",phone:"98"},{labelES:"Irak",label:"Iraq",codeISO2:"IQ",code:"IRQ",phone:"964"},{labelES:"Irlanda",label:"Ireland",codeISO2:"IE",code:"IRL",phone:"353"},{labelES:"Isla Bouvet",label:"Bouvet Island",codeISO2:"BV",code:"BVT",phone:""},{labelES:"Isla de Man",label:"Isle of Man",codeISO2:"IM",code:"IMN",phone:"44"},{labelES:"Isla de Navidad",label:"Christmas Island",codeISO2:"CX",code:"CXR",phone:"61"},{labelES:"Isla Norfolk",label:"Norfolk Island",codeISO2:"NF",code:"NFK",phone:"672"},{labelES:"Islandia",label:"Iceland",codeISO2:"IS",code:"ISL",phone:"354"},{labelES:"Islas Bermudas",label:"Bermuda Islands",codeISO2:"BM",code:"BMU",phone:"1 441"},{labelES:"Islas Caimán",label:"Cayman Islands",codeISO2:"KY",code:"CYM",phone:"1 345"},{labelES:"Islas Cocos (Keeling)",label:"Cocos (Keeling) Islands",codeISO2:"CC",code:"CCK",phone:"61"},{labelES:"Islas Cook",label:"Cook Islands",codeISO2:"CK",code:"COK",phone:"682"},{labelES:"Islas de Åland",label:"Åland Islands",codeISO2:"AX",code:"ALA",phone:"358"},{labelES:"Islas Feroe",label:"Faroe Islands",codeISO2:"FO",code:"FRO",phone:"298"},{labelES:"Islas Georgias del Sur y Sandwich del Sur",label:"South Georgia and the South Sandwich Islands",codeISO2:"GS",code:"SGS",phone:"500"},{labelES:"Islas Heard y McDonald",label:"Heard Island and McDonald Islands",codeISO2:"HM",code:"HMD",phone:""},{labelES:"Islas Maldivas",label:"Maldives",codeISO2:"MV",code:"MDV",phone:"960"},{labelES:"Islas Malvinas",label:"Falkland Islands (Malvinas)",codeISO2:"FK",code:"FLK",phone:"500"},{labelES:"Islas Marianas del Norte",label:"Northern Mariana Islands",codeISO2:"MP",code:"MNP",phone:"1 670"},{labelES:"Islas Marshall",label:"Marshall Islands",codeISO2:"MH",code:"MHL",phone:"692"},{labelES:"Islas Pitcairn",label:"Pitcairn Islands",codeISO2:"PN",code:"PCN",phone:"870"},{labelES:"Islas Salomón",label:"Solomon Islands",codeISO2:"SB",code:"SLB",phone:"677"},{labelES:"Islas Turcas y Caicos",label:"Turks and Caicos Islands",codeISO2:"TC",code:"TCA",phone:"1 649"},{labelES:"Islas Ultramarinas Menores de Estados Unidos",label:"United States Minor Outlying Islands",codeISO2:"UM",code:"UMI",phone:"246"},{labelES:"Islas Vírgenes Británicas",label:"Virgin Islands",codeISO2:"VG",code:"VGB",phone:"1 284"},{labelES:"Islas Vírgenes de los Estados Unidos",label:"United States Virgin Islands",codeISO2:"VI",code:"VIR",phone:"1 340"},{labelES:"Israel",label:"Israel",codeISO2:"IL",code:"ISR",phone:"972"},{labelES:"Italia",label:"Italy",codeISO2:"IT",code:"ITA",phone:"39"},{labelES:"Jamaica",label:"Jamaica",codeISO2:"JM",code:"JAM",phone:"1 876"},{labelES:"Japón",label:"Japan",codeISO2:"JP",code:"JPN",phone:"81"},{labelES:"Jersey",label:"Jersey",codeISO2:"JE",code:"JEY",phone:"44"},{labelES:"Jordania",label:"Jordan",codeISO2:"JO",code:"JOR",phone:"962"},{labelES:"Kazajistán",label:"Kazakhstan",codeISO2:"KZ",code:"KAZ",phone:"7"},{labelES:"Kenia",label:"Kenya",codeISO2:"KE",code:"KEN",phone:"254"},{labelES:"Kirguistán",label:"Kyrgyzstan",codeISO2:"KG",code:"KGZ",phone:"996"},{labelES:"Kiribati",label:"Kiribati",codeISO2:"KI",code:"KIR",phone:"686"},{labelES:"Kuwait",label:"Kuwait",codeISO2:"KW",code:"KWT",phone:"965"},{labelES:"Líbano",label:"Lebanon",codeISO2:"LB",code:"LBN",phone:"961"},{labelES:"Laos",label:"Laos",codeISO2:"LA",code:"LAO",phone:"856"},{labelES:"Lesoto",label:"Lesotho",codeISO2:"LS",code:"LSO",phone:"266"},{labelES:"Letonia",label:"Latvia",codeISO2:"LV",code:"LVA",phone:"371"},{labelES:"Liberia",label:"Liberia",codeISO2:"LR",code:"LBR",phone:"231"},{labelES:"Libia",label:"Libya",codeISO2:"LY",code:"LBY",phone:"218"},{labelES:"Liechtenstein",label:"Liechtenstein",codeISO2:"LI",code:"LIE",phone:"423"},{labelES:"Lituania",label:"Lithuania",codeISO2:"LT",code:"LTU",phone:"370"},{labelES:"Luxemburgo",label:"Luxembourg",codeISO2:"LU",code:"LUX",phone:"352"},{labelES:"México",label:"Mexico",codeISO2:"MX",code:"MEX",phone:"52"},{labelES:"Mónaco",label:"Monaco",codeISO2:"MC",code:"MCO",phone:"377"},{labelES:"Macao",label:"Macao",codeISO2:"MO",code:"MAC",phone:"853"},{labelES:"Macedônia",label:"Macedonia",codeISO2:"MK",code:"MKD",phone:"389"},{labelES:"Madagascar",label:"Madagascar",codeISO2:"MG",code:"MDG",phone:"261"},{labelES:"Malasia",label:"Malaysia",codeISO2:"MY",code:"MYS",phone:"60"},{labelES:"Malawi",label:"Malawi",codeISO2:"MW",code:"MWI",phone:"265"},{labelES:"Mali",label:"Mali",codeISO2:"ML",code:"MLI",phone:"223"},{labelES:"Malta",label:"Malta",codeISO2:"MT",code:"MLT",phone:"356"},{labelES:"Marruecos",label:"Morocco",codeISO2:"MA",code:"MAR",phone:"212"},{labelES:"Martinica",label:"Martinique",codeISO2:"MQ",code:"MTQ",phone:"596"},{labelES:"Mauricio",label:"Mauritius",codeISO2:"MU",code:"MUS",phone:"230"},{labelES:"Mauritania",label:"Mauritania",codeISO2:"MR",code:"MRT",phone:"222"},{labelES:"Mayotte",label:"Mayotte",codeISO2:"YT",code:"MYT",phone:"262"},{labelES:"Micronesia",label:"Estados Federados de",codeISO2:"FM",code:"FSM",phone:"691"},{labelES:"Moldavia",label:"Moldova",codeISO2:"MD",code:"MDA",phone:"373"},{labelES:"Mongolia",label:"Mongolia",codeISO2:"MN",code:"MNG",phone:"976"},{labelES:"Montenegro",label:"Montenegro",codeISO2:"ME",code:"MNE",phone:"382"},{labelES:"Montserrat",label:"Montserrat",codeISO2:"MS",code:"MSR",phone:"1 664"},{labelES:"Mozambique",label:"Mozambique",codeISO2:"MZ",code:"MOZ",phone:"258"},{labelES:"Namibia",label:"Namibia",codeISO2:"NA",code:"NAM",phone:"264"},{labelES:"Nauru",label:"Nauru",codeISO2:"NR",code:"NRU",phone:"674"},{labelES:"Nepal",label:"Nepal",codeISO2:"NP",code:"NPL",phone:"977"},{labelES:"Nicaragua",label:"Nicaragua",codeISO2:"NI",code:"NIC",phone:"505"},{labelES:"Niger",label:"Niger",codeISO2:"NE",code:"NER",phone:"227"},{labelES:"Nigeria",label:"Nigeria",codeISO2:"NG",code:"NGA",phone:"234"},{labelES:"Niue",label:"Niue",codeISO2:"NU",code:"NIU",phone:"683"},{labelES:"Noruega",label:"Norway",codeISO2:"NO",code:"NOR",phone:"47"},{labelES:"Nueva Caledonia",label:"New Caledonia",codeISO2:"NC",code:"NCL",phone:"687"},{labelES:"Nueva Zelanda",label:"New Zealand",codeISO2:"NZ",code:"NZL",phone:"64"},{labelES:"Omán",label:"Oman",codeISO2:"OM",code:"OMN",phone:"968"},{labelES:"Países Bajos",label:"Netherlands",codeISO2:"NL",code:"NLD",phone:"31"},{labelES:"Pakistán",label:"Pakistan",codeISO2:"PK",code:"PAK",phone:"92"},{labelES:"Palau",label:"Palau",codeISO2:"PW",code:"PLW",phone:"680"},{labelES:"Palestina",label:"Palestine",codeISO2:"PS",code:"PSE",phone:"970"},{labelES:"Panamá",label:"Panama",codeISO2:"PA",code:"PAN",phone:"507"},{labelES:"Papúa Nueva Guinea",label:"Papua New Guinea",codeISO2:"PG",code:"PNG",phone:"675"},{labelES:"Paraguay",label:"Paraguay",codeISO2:"PY",code:"PRY",phone:"595"},{labelES:"Perú",label:"Peru",codeISO2:"PE",code:"PER",phone:"51"},{labelES:"Polinesia Francesa",label:"French Polynesia",codeISO2:"PF",code:"PYF",phone:"689"},{labelES:"Polonia",label:"Poland",codeISO2:"PL",code:"POL",phone:"48"},{labelES:"Portugal",label:"Portugal",codeISO2:"PT",code:"PRT",phone:"351"},{labelES:"Puerto Rico",label:"Puerto Rico",codeISO2:"PR",code:"PRI",phone:"1"},{labelES:"Qatar",label:"Qatar",codeISO2:"QA",code:"QAT",phone:"974"},{labelES:"Reino Unido",label:"United Kingdom",codeISO2:"GB",code:"GBR",phone:"44"},{labelES:"República Centroafricana",label:"Central African Republic",codeISO2:"CF",code:"CAF",phone:"236"},{labelES:"República Checa",label:"Czech Republic",codeISO2:"CZ",code:"CZE",phone:"420"},{labelES:"República Dominicana",label:"Dominican Republic",codeISO2:"DO",code:"DOM",phone:"1 809"},{labelES:"República de Sudán del Sur",label:"South Sudan",codeISO2:"SS",code:"SSD",phone:"211"},{labelES:"Reunión",label:"Réunion",codeISO2:"RE",code:"REU",phone:"262"},{labelES:"Ruanda",label:"Rwanda",codeISO2:"RW",code:"RWA",phone:"250"},{labelES:"Rumanía",label:"Romania",codeISO2:"RO",code:"ROU",phone:"40"},{labelES:"Rusia",label:"Russia",codeISO2:"RU",code:"RUS",phone:"7"},{labelES:"Sahara Occidental",label:"Western Sahara",codeISO2:"EH",code:"ESH",phone:"212"},{labelES:"Samoa",label:"Samoa",codeISO2:"WS",code:"WSM",phone:"685"},{labelES:"Samoa Americana",label:"American Samoa",codeISO2:"AS",code:"ASM",phone:"1 684"},{labelES:"San Bartolomé",label:"Saint Barthélemy",codeISO2:"BL",code:"BLM",phone:"590"},{labelES:"San Cristóbal y Nieves",label:"Saint Kitts and Nevis",codeISO2:"KN",code:"KNA",phone:"1 869"},{labelES:"San Marino",label:"San Marino",codeISO2:"SM",code:"SMR",phone:"378"},{labelES:"San Martín (Francia)",label:"Saint Martin (French part)",codeISO2:"MF",code:"MAF",phone:"1 599"},{labelES:"San Pedro y Miquelón",label:"Saint Pierre and Miquelon",codeISO2:"PM",code:"SPM",phone:"508"},{labelES:"San Vicente y las Granadinas",label:"Saint Vincent and the Grenadines",codeISO2:"VC",code:"VCT",phone:"1 784"},{labelES:"Santa Elena",label:"Ascensión y Tristán de Acuña",codeISO2:"SH",code:"SHN",phone:"290"},{labelES:"Santa Lucía",label:"Saint Lucia",codeISO2:"LC",code:"LCA",phone:"1 758"},{labelES:"Santo Tomé y Príncipe",label:"Sao Tome and Principe",codeISO2:"ST",code:"STP",phone:"239"},{labelES:"Senegal",label:"Senegal",codeISO2:"SN",code:"SEN",phone:"221"},{labelES:"Serbia",label:"Serbia",codeISO2:"RS",code:"SRB",phone:"381"},{labelES:"Seychelles",label:"Seychelles",codeISO2:"SC",code:"SYC",phone:"248"},{labelES:"Sierra Leona",label:"Sierra Leone",codeISO2:"SL",code:"SLE",phone:"232"},{labelES:"Singapur",label:"Singapore",codeISO2:"SG",code:"SGP",phone:"65"},{labelES:"Sint Maarten",label:"Sint Maarten",codeISO2:"SX",code:"SMX",phone:"1 721"},{labelES:"Siria",label:"Syria",codeISO2:"SY",code:"SYR",phone:"963"},{labelES:"Somalia",label:"Somalia",codeISO2:"SO",code:"SOM",phone:"252"},{labelES:"Sri lanka",label:"Sri Lanka",codeISO2:"LK",code:"LKA",phone:"94"},{labelES:"Sudáfrica",label:"South Africa",codeISO2:"ZA",code:"ZAF",phone:"27"},{labelES:"Sudán",label:"Sudan",codeISO2:"SD",code:"SDN",phone:"249"},{labelES:"Suecia",label:"Sweden",codeISO2:"SE",code:"SWE",phone:"46"},{labelES:"Suiza",label:"Switzerland",codeISO2:"CH",code:"CHE",phone:"41"},{labelES:"Surinám",label:"Suriname",codeISO2:"SR",code:"SUR",phone:"597"},{labelES:"Svalbard y Jan Mayen",label:"Svalbard and Jan Mayen",codeISO2:"SJ",code:"SJM",phone:"47"},{labelES:"Swazilandia",label:"Swaziland",codeISO2:"SZ",code:"SWZ",phone:"268"},{labelES:"Tayikistán",label:"Tajikistan",codeISO2:"TJ",code:"TJK",phone:"992"},{labelES:"Tailandia",label:"Thailand",codeISO2:"TH",code:"THA",phone:"66"},{labelES:"Taiwán",label:"Taiwan",codeISO2:"TW",code:"TWN",phone:"886"},{labelES:"Tanzania",label:"Tanzania",codeISO2:"TZ",code:"TZA",phone:"255"},{labelES:"Territorio Británico del Océano Índico",label:"British Indian Ocean Territory",codeISO2:"IO",code:"IOT",phone:"246"},{labelES:"Territorios Australes y Antárticas Franceses",label:"French Southern Territories",codeISO2:"TF",code:"ATF",phone:""},{labelES:"Timor Oriental",label:"East Timor",codeISO2:"TL",code:"TLS",phone:"670"},{labelES:"Togo",label:"Togo",codeISO2:"TG",code:"TGO",phone:"228"},{labelES:"Tokelau",label:"Tokelau",codeISO2:"TK",code:"TKL",phone:"690"},{labelES:"Tonga",label:"Tonga",codeISO2:"TO",code:"TON",phone:"676"},{labelES:"Trinidad y Tobago",label:"Trinidad and Tobago",codeISO2:"TT",code:"TTO",phone:"1 868"},{labelES:"Tunez",label:"Tunisia",codeISO2:"TN",code:"TUN",phone:"216"},{labelES:"Turkmenistán",label:"Turkmenistan",codeISO2:"TM",code:"TKM",phone:"993"},{labelES:"Turquía",label:"Turkey",codeISO2:"TR",code:"TUR",phone:"90"},{labelES:"Tuvalu",label:"Tuvalu",codeISO2:"TV",code:"TUV",phone:"688"},{labelES:"Ucrania",label:"Ukraine",codeISO2:"UA",code:"UKR",phone:"380"},{labelES:"Uganda",label:"Uganda",codeISO2:"UG",code:"UGA",phone:"256"},{labelES:"Uruguay",label:"Uruguay",codeISO2:"UY",code:"URY",phone:"598"},{labelES:"Uzbekistán",label:"Uzbekistan",codeISO2:"UZ",code:"UZB",phone:"998"},{labelES:"Vanuatu",label:"Vanuatu",codeISO2:"VU",code:"VUT",phone:"678"},{labelES:"Venezuela",label:"Venezuela",codeISO2:"VE",code:"VEN",phone:"58"},{labelES:"Vietnam",label:"Vietnam",codeISO2:"VN",code:"VNM",phone:"84"},{labelES:"Wallis y Futuna",label:"Wallis and Futuna",codeISO2:"WF",code:"WLF",phone:"681"},{labelES:"Yemen",label:"Yemen",codeISO2:"YE",code:"YEM",phone:"967"},{labelES:"Yibuti",label:"Djibouti",codeISO2:"DJ",code:"DJI",phone:"253"},{labelES:"Zambia",label:"Zambia",codeISO2:"ZM",code:"ZMB",phone:"260"},{labelES:"Zimbabue",label:"Zimbabwe",codeISO2:"ZW",code:"ZWE",phone:"263"}],bk=({countries:e=M2,name:t,control:n,label:r="select_a_country",placeholder:s="type_to_search",language:o="en",className:a="",translateKey:c})=>{var Ee,Ve,ie;const{t:u}=Ue(),{field:d,fieldState:h}=vr.useController({name:t,control:n,rules:{validate:{}},defaultValue:null}),[p,m]=O.useState(!1),[x,S]=O.useState(""),[b,T]=O.useState(d.value||null),v=O.useRef(null),A=O.useRef(null),C=O.useRef(null),{x:I,y:P,strategy:D,refs:R,context:F,placement:W,middlewareData:Q}=ir({open:p,onOpenChange:m,middleware:[er(8),nr(),tr({padding:8}),Rr({apply({availableHeight:me,elements:De}){Object.assign(De.floating.style,{maxHeight:`${Math.min(me-10,300)}px`})},padding:8}),ms({element:A})],placement:"bottom-start",whileElementsMounted:Qn}),ee=rr(F),ae=sr(F),{getReferenceProps:ge,getFloatingProps:de}=or([ee,ae]),{isMounted:le,styles:ue}=ar(F,{duration:{open:200,close:150},initial:{opacity:0,transform:"translateY(-4px)"}}),z=(Array.isArray(e)?e:[]).filter(me=>{if(!x.trim())return!0;const De=o==="es"&&me.labelES?me.labelES.toLowerCase():me.label.toLowerCase(),ft=me.code?me.code.toLowerCase():"";return De.includes(x.toLowerCase())||ft.includes(x.toLowerCase())}),K=me=>{T(me),m(!1),S(""),d.onChange(me)},$=()=>{m(!p),!p&&v.current&&setTimeout(()=>{var me;(me=v.current)==null||me.focus()},100)},k=()=>{setTimeout(()=>{p||d.onBlur()},200)};O.useEffect(()=>{T(d.value)},[d.value]),O.useEffect(()=>{const me=De=>{C.current&&!C.current.contains(De.target)&&d.onBlur()};return document.addEventListener("mousedown",me),()=>{document.removeEventListener("mousedown",me)}},[d]);const X=me=>{var De;return me?me.codeISO2?me.codeISO2.toLowerCase():((De=me.code)==null?void 0:De.toLowerCase())||"":""},U=(Ee=Q.arrow)==null?void 0:Ee.x,re=(Ve=Q.arrow)==null?void 0:Ve.y,B={top:"bottom",right:"left",bottom:"top",left:"right"}[W.split("-")[0]],J=ge({onClick:$,onBlur:k}),oe=u(r),se=u(s),fe=(ie=h.error)==null?void 0:ie.message;return g.jsxs("div",{ref:C,className:`w-full relative flex flex-col gap-8 ${a}`,children:[g.jsx("label",{className:`text-gray-600 font-600 group ${fe&&"!text-red-500"} text-label`,children:oe}),g.jsxs("div",{ref:R.setReference,className:`flex items-center justify-between bg-light rounded-full p-16 cursor-pointer border transition-all duration-200 hover:border-blue-400 ${fe&&"border-red-500 hover:border-red-600"} ${le?"border-blue-400":"border-blue-100"}`,...J,tabIndex:0,children:[b!=null&&b.code?g.jsxs("div",{className:"flex items-center w-full gap-10",children:[X(b)&&g.jsx("img",{loading:"lazy",width:"24",height:"16",className:"mr-2",src:`https://flagcdn.com/w20/${X(b)}.png`,srcSet:`https://flagcdn.com/w40/${X(b)}.png 2x`,alt:b.label,onError:me=>{me.currentTarget.style.display="none"}}),g.jsxs("span",{className:"flex-grow font-600 text-body-m",children:[o==="es"&&b.labelES?b.labelES:b.label,b.code?` (${b.code})`:u("select_country")]})]}):g.jsx("span",{className:"text-gray-400 font-600 text-body-m",children:se}),g.jsx("svg",{className:`w-16 h-16 transition-transform ${p?"transform rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M19 9l-7 7-7-7"})})]}),fe&&g.jsx("p",{className:"mt-1 text-sm text-red-600",children:u(fe,{x:u(c||"")||u(t)})}),le&&g.jsxs("div",{ref:R.setFloating,style:{position:D,top:P??0,left:I??0,...ue},className:"z-10 w-full bg-white border border-blue-400 rounded-3xl shadow-lg overflow-auto",...de(),children:[g.jsx("div",{ref:A,className:"absolute w-4 h-4 bg-white rotate-45 border-blue-400",style:{left:U!=null?`${U}px`:"",top:re!=null?`${re}px`:"",right:"",bottom:"",[B]:"-2px",borderRight:B==="left"?"1px solid":"none",borderBottom:B==="top"?"1px solid":"none",borderLeft:B==="right"?"1px solid":"none",borderTop:B==="bottom"?"1px solid":"none"}}),g.jsx("div",{className:"sticky top-0 bg-white p-2 z-20",children:g.jsx("input",{ref:v,type:"text",className:"w-full p-16 text-body-s",placeholder:u("search")+"...",value:x,onChange:me=>S(me.target.value),onClick:me=>me.stopPropagation(),onBlur:me=>{me.stopPropagation()},autoFocus:!0})}),g.jsx("div",{children:z.length>0?g.jsx("ul",{className:"flex flex-col",children:z.map((me,De)=>{var ws;const ft=me.codeISO2?me.codeISO2.toLowerCase():((ws=me.code)==null?void 0:ws.toLowerCase())||"";return g.jsxs("li",{className:"flex items-center gap-10 px-16 py-8 transition-all duration-200 hover:bg-blue-100/50 cursor-pointer",onClick:dt=>{dt.stopPropagation(),K(me)},children:[ft&&g.jsx("img",{loading:"lazy",width:"24",height:"16",className:"mr-2",src:`https://flagcdn.com/w20/${ft}.png`,srcSet:`https://flagcdn.com/w40/${ft}.png 2x`,alt:me.label,onError:dt=>{dt.currentTarget.style.display="none"}}),g.jsxs("span",{children:[o==="es"&&me.labelES?me.labelES:me.label,me.code?` (${me.code})`:"Country not found"]})]},`${me.code}-${De}`)})}):g.jsx("div",{className:"px-16 py-8 text-gray-500 text-body-s",children:u("no_countries_found")})})]})]})},wk=({country:e})=>{const t=n=>{var r;return n?n.codeISO2?n.codeISO2.toLowerCase():((r=n.code)==null?void 0:r.toLowerCase())||"":""};return g.jsxs("div",{className:"flex items-center gap-8",children:[g.jsx("img",{loading:"lazy",width:"24",height:"16",className:"mr-2",src:`https://flagcdn.com/w20/${t(e)}.png`,srcSet:`https://flagcdn.com/w40/${t(e)}.png 2x`,alt:e.label,onError:n=>{n.currentTarget.style.display="none"}}),g.jsx("p",{className:"text-body-s text-gray-600",children:e.label})]})},Sk=({countries:e,name:t,control:n,label:r="select_a_country",placeholder:s="type_to_search",language:o="en",className:a=""})=>{const{t:c}=Ue();return g.jsx(vr.Controller,{name:t,control:n,render:({field:{onChange:u,value:d},fieldState:{error:h}})=>g.jsx(Tk,{countries:e,value:d,onChange:u,label:c(r),placeholder:c(s),language:o,error:h==null?void 0:h.message,className:a})})},Tk=({countries:e,value:t,onChange:n,label:r="select_a_country",placeholder:s="type_to_search",language:o="en",error:a,className:c=""})=>{var U,re;const{t:u}=Ue(),[d,h]=O.useState(!1),[p,m]=O.useState(""),[x,S]=O.useState(t||null),b=O.useRef(null),T=O.useRef(null),{x:v,y:A,strategy:C,refs:I,context:P,placement:D,middlewareData:R}=ir({open:d,onOpenChange:h,middleware:[er(8),nr(),tr({padding:8}),Rr({apply({availableHeight:B,elements:J}){Object.assign(J.floating.style,{maxHeight:`${Math.min(B-10,300)}px`})},padding:8}),ms({element:T})],placement:"bottom-start",whileElementsMounted:Qn}),F=rr(P),W=sr(P),{getReferenceProps:Q,getFloatingProps:ee}=or([F,W]),{isMounted:ae,styles:ge}=ar(P,{duration:{open:200,close:150},initial:{opacity:0,transform:"translateY(-4px)"}}),le=(Array.isArray(e)?e:[]).filter(B=>{if(!p.trim())return!0;const J=o==="es"&&B.labelES?B.labelES.toLowerCase():B.label.toLowerCase(),oe=B.code?B.code.toLowerCase():"";return J.includes(p.toLowerCase())||oe.includes(p.toLowerCase())}),ue=B=>{S(B),h(!1),m(""),n(B)},Y=()=>{h(!d),!d&&b.current&&setTimeout(()=>{var B;(B=b.current)==null||B.focus()},100)};O.useEffect(()=>{S(t)},[t]);const z=B=>{var J;return B?B.codeISO2?B.codeISO2.toLowerCase():((J=B.code)==null?void 0:J.toLowerCase())||"":""},K=(U=R.arrow)==null?void 0:U.x,$=(re=R.arrow)==null?void 0:re.y,k={top:"bottom",right:"left",bottom:"top",left:"right"}[D.split("-")[0]],X=Q({onClick:Y});return g.jsxs("div",{className:`w-full relative flex flex-col gap-8 ${c}`,children:[g.jsx("label",{className:`text-gray-600 font-600 group ${a&&"!text-red-500"} text-label`,children:r}),g.jsxs("div",{ref:I.setReference,className:`flex items-center justify-between bg-light rounded-full p-16 cursor-pointer border transition-all duration-200 hover:border-blue-400 ${a&&"border-red-500 hover:border-red-600"} ${ae?"border-blue-400":"border-blue-100"}`,...X,children:[x!=null&&x.code?g.jsxs("div",{className:"flex items-center w-full",children:[z(x)&&g.jsx("img",{loading:"lazy",width:"24",height:"16",className:"mr-2",src:`https://flagcdn.com/w20/${z(x)}.png`,srcSet:`https://flagcdn.com/w40/${z(x)}.png 2x`,alt:x.label,onError:B=>{B.currentTarget.style.display="none"}}),g.jsxs("span",{className:"flex-grow",children:[o==="es"&&x.labelES?x.labelES:x.label,x.code?` (${x.code})`:u("select_country")]})]}):g.jsx("span",{className:"text-gray-500",children:s}),g.jsx("svg",{className:`w-16 h-16 transition-transform ${d?"transform rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M19 9l-7 7-7-7"})})]}),a&&g.jsx("p",{className:"mt-1 text-sm text-red-600",children:a}),ae&&g.jsxs("div",{ref:I.setFloating,style:{position:C,top:A??0,left:v??0,...ge},className:"z-10 w-full bg-white border border-blue-400 rounded-3xl shadow-lg overflow-auto",...ee(),children:[g.jsx("div",{ref:T,className:"absolute w-4 h-4 bg-white rotate-45 border-blue-400",style:{left:K!=null?`${K}px`:"",top:$!=null?`${$}px`:"",right:"",bottom:"",[k]:"-2px",borderRight:k==="left"?"1px solid":"none",borderBottom:k==="top"?"1px solid":"none",borderLeft:k==="right"?"1px solid":"none",borderTop:k==="bottom"?"1px solid":"none"}}),g.jsx("div",{className:"sticky top-0 bg-white p-2 z-20",children:g.jsx("input",{ref:b,type:"text",className:"w-full p-16",placeholder:u("search")+"...",value:p,onChange:B=>m(B.target.value),onClick:B=>B.stopPropagation(),autoFocus:!0})}),g.jsx("div",{children:le.length>0?g.jsx("ul",{className:"flex flex-col",children:le.map((B,J)=>{var se;const oe=B.codeISO2?B.codeISO2.toLowerCase():((se=B.code)==null?void 0:se.toLowerCase())||"";return g.jsxs("li",{className:"flex items-center gap-10 px-16 py-8 transition-all duration-200 hover:bg-blue-100/50 cursor-pointer",onClick:fe=>{fe.stopPropagation(),ue(B)},children:[oe&&g.jsx("img",{loading:"lazy",width:"24",height:"16",className:"mr-2",src:`https://flagcdn.com/w20/${oe}.png`,srcSet:`https://flagcdn.com/w40/${oe}.png 2x`,alt:B.label,onError:fe=>{fe.currentTarget.style.display="none"}}),g.jsxs("span",{children:[o==="es"&&B.labelES?B.labelES:B.label,B.code?` (${B.code})`:"Country not found"]})]},`${B.code}-${J}`)})}):g.jsx("div",{className:"px-3 py-2 text-gray-500",children:"No countries found"})})]})]})},sh=({variant:e="filled",color:t,size:n="base",shadow:r="none",icon:s,iconProps:o={},children:a,className:c,...u})=>{const{defaultColorScheme:d}=Ue(),h=t||d;return g.jsx("button",{...u,className:`${EN(e,h,n,r)} ${c}`,children:s?g.jsx(Pe,{...o,className:Do(n),icon:s}):a})};function Ck(e){return e!==null&&typeof e=="object"&&"name"in e&&"size"in e&&"type"in e&&typeof e.name=="string"&&typeof e.size=="number"&&typeof e.type=="string"}const Ek=({src:e,alt:t,isEditable:n=!1,onChange:r,className:s="",name:o,control:a,user:c})=>{const[u,d]=O.useState(e||null),[h,p]=O.useState(!!e),m=O.useRef(null),x=vr.useController({name:o,control:a}),S=!!a;O.useEffect(()=>{if(S){const A=x==null?void 0:x.field.value;if(Ck(A)){const C=URL.createObjectURL(A);return d(C),p(!0),()=>URL.revokeObjectURL(C)}else typeof A=="string"&&A&&A!==e?(d(A),p(!0)):e?(d(e),p(!0)):(d(null),p(!1))}},[x==null?void 0:x.field.value,e]);const b=()=>{var A;n&&((A=m.current)==null||A.click())},T=A=>{var I;const C=(I=A.target.files)==null?void 0:I[0];if(C){const P=URL.createObjectURL(C);d(P),p(!0),S&&(x==null||x.field.onChange(C)),r&&r(C)}},v=A=>{A.stopPropagation(),d(null),p(!1),m.current&&(m.current.value=""),S&&(x==null||x.field.onChange(null)),r&&r(null)};return g.jsxs("div",{className:"relative flex items-center gap-10",children:[n&&h&&g.jsx("button",{type:"button",onClick:v,className:"bg-red-500 text-white rounded-full w-20 h-20 flex items-center justify-center hover:bg-red-600 focus:outline-none","aria-label":"Eliminar imagen",children:g.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[g.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),g.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}),g.jsxs("div",{className:`relative flex items-center justify-center h-40 w-40 ${n?"cursor-pointer hover:opacity-80":""} ${s}`,onClick:b,children:[u?g.jsx("img",{src:u,alt:t,className:"w-full h-full object-cover rounded-full"}):g.jsx(u2,{size:60,user:c}),n&&g.jsxs(g.Fragment,{children:[g.jsx("input",{type:"file",ref:A=>{m.current=A,x&&x.field.ref(A)},onChange:T,onBlur:x==null?void 0:x.field.onBlur,accept:"image/*",className:"hidden"}),!h&&g.jsx("div",{className:"absolute bottom-0 right-0 bg-blue-100 rounded-full h-20 w-20 flex items-center justify-center",children:g.jsx(Pe,{icon:HD,className:"text-blue-500"})})]})]})]})},Pk=rh({name:Vr(),base64:Vr()}),Ak=({imageUrl:e,title:t,subtitle:n})=>g.jsxs("section",{className:"gap-10 flex flex-col items-center justify-center",children:[g.jsx("img",{src:e,alt:t,width:100,height:100}),g.jsx("h1",{className:"font-bold text-2xl align-middle",children:t}),g.jsx("p",{className:"text-lg align-middle font-semibold text-gray-500",children:n})]}),Mk=e=>{switch(e){case"small":return{containerStyles:"p-12",titleStyles:"text-sm",descriptionStyles:"text-xs",iconStyles:"p-4 text-xs"};case"normal":return{containerStyles:"p-16",titleStyles:"text-14",descriptionStyles:"text-sm",iconStyles:"p-6 text-md"};default:return{containerStyles:"p-16",titleStyles:"text-14",descriptionStyles:"text-sm",iconStyles:"p-6 text-md"}}},Ok=e=>{switch(e){case"success":return"bg-green-100 text-green-500";case"warning":return"bg-yellow-100 text-yellow-500";case"error":return"bg-red-100 text-red-500";case"informative":return"bg-blue-100 text-blue-500";default:return"bg-blue-100 text-blue-500"}},$k=e=>{switch(e){case"success":return t0;case"warning":return Ui;case"error":return s0;case"informative":return n0;default:return"info"}},_k=({description:e,title:t,showIcon:n=!0,type:r="informative",size:s="normal"})=>{const o=Mk(s),a=$k(r),c=Ok(r);return g.jsx("div",{className:`w-full rounded-xl bg-white border border-blue-100 ${o.containerStyles}`,children:g.jsxs("div",{className:"space-y-8",children:[g.jsxs("div",{className:"flex items-center gap-12",children:[n&&g.jsx(Pe,{icon:a,className:`rounded-full ${o.iconStyles} ${c}`}),g.jsx("h5",{className:`font-semibold text-blue-900 self-center ${o.titleStyles}`,children:t})]}),e&&g.jsx("p",{className:`text-gray-500 leading-[16px] ${o.descriptionStyles}`,children:e})]})})},Ik=[{rotate:"0deg",delay:"0s"},{rotate:"90deg",delay:"0.3s"},{rotate:"270deg",delay:"0.9s"},{rotate:"180deg",delay:"0.6s"}],Dk=({variant:e="circle",size:t=16,color:n="#1DA696",...r})=>{const{className:s="",...o}=r;if(e==="cube"){const d=t/Math.SQRT2;return g.jsx("div",{...o,className:`relative flex items-center justify-center overflow-hidden ${s}`,style:{width:t,height:t},children:g.jsx("div",{className:"relative rotate-45",style:{width:d,height:d},children:Ik.map((h,p)=>g.jsx("div",{className:"float-left w-1/2 h-1/2 relative",style:{transform:`scale(1.1) rotate(${h.rotate})`},children:g.jsx("span",{className:"absolute inset-0 origin-bottom-right animate-sk-fold-cube",style:{backgroundColor:n,animationDelay:h.delay}})},p))})})}const a=Math.max(1,Math.round(t*.125)),c=(t-a)/2,u=2*Math.PI*c;return g.jsx("div",{...o,className:`relative flex items-center justify-center ${s}`,children:g.jsx("svg",{height:t,width:t,className:"animate-spin",children:g.jsx("circle",{stroke:n,fill:"transparent",strokeWidth:a,strokeDasharray:`${u} ${u}`,strokeDashoffset:u/4,r:c,cx:t/2,cy:t/2})})})},Nk=({label:e,control:t,name:n,placeholder:r,className:s="",disabled:o=!1,size:a="md",leftSide:c})=>{const{field:{value:u="",onChange:d,ref:h,onBlur:p},fieldState:{error:m}}=vr.useController({name:n,control:t}),[x,S]=O.useState(!1),{t:b}=Ue(),v={sm:{container:"px-16 py-8",text:"text-14",label:"text-14",error:"text-sm",gap:"gap-8"},md:{container:"p-16",text:"text-body-m",label:"text-body-m",error:"text-sm",gap:"gap-8"}}[a];return g.jsxs("label",{className:`flex flex-col group select-none ${v.gap} ${o&&"cursor-not-allowed"} ${s}`,htmlFor:n,children:[g.jsx("h6",{className:`text-gray-600 font-600 leading-none group ${m&&"!text-red-500"} ${v.label} ${o&&"text-gray-300"}`,children:e}),g.jsxs("label",{htmlFor:n,className:`
|
|
739
|
+
`+(c!==a?`result of cast: ${c}`:""))}return o}_cast(t,n){let r=t===void 0?t:this.transforms.reduce((s,o)=>o.call(this,s,t,this),t);return r===void 0&&(r=this.getDefault(n)),r}_validate(t,n={},r,s){let{path:o,originalValue:a=t,strict:c=this.spec.strict}=n,u=t;c||(u=this._cast(u,Object.assign({assert:!1},n)));let d=[];for(let h of Object.values(this.internalTests))h&&d.push(h);this.runTests({path:o,value:u,originalValue:a,options:n,tests:d},r,h=>{if(h.length)return s(h,u);this.runTests({path:o,value:u,originalValue:a,options:n,tests:this.tests},r,s)})}runTests(t,n,r){let s=!1,{tests:o,value:a,originalValue:c,path:u,options:d}=t,h=b=>{s||(s=!0,n(b,a))},p=b=>{s||(s=!0,r(b,a))},m=o.length,x=[];if(!m)return p([]);let S={value:a,originalValue:c,path:u,options:d,schema:this};for(let b=0;b<o.length;b++){const T=o[b];T(S,h,function(A){A&&(Array.isArray(A)?x.push(...A):x.push(A)),--m<=0&&p(x)})}}asNestedTest({key:t,index:n,parent:r,parentPath:s,originalParent:o,options:a}){const c=t??n;if(c==null)throw TypeError("Must include `key` or `index` for nested validations");const u=typeof c=="number";let d=r[c];const h=Object.assign({},a,{strict:!0,parent:r,value:d,originalValue:o[c],key:void 0,[u?"index":"key"]:c,path:u||c.includes(".")?`${s||""}[${u?c:`"${c}"`}]`:(s?`${s}.`:"")+t});return(p,m,x)=>this.resolve(h)._validate(d,h,m,x)}validate(t,n){var r;let s=this.resolve(Object.assign({},n,{value:t})),o=(r=n==null?void 0:n.disableStackTrace)!=null?r:s.spec.disableStackTrace;return new Promise((a,c)=>s._validate(t,n,(u,d)=>{jt.isError(u)&&(u.value=d),c(u)},(u,d)=>{u.length?c(new jt(u,d,void 0,void 0,o)):a(d)}))}validateSync(t,n){var r;let s=this.resolve(Object.assign({},n,{value:t})),o,a=(r=n==null?void 0:n.disableStackTrace)!=null?r:s.spec.disableStackTrace;return s._validate(t,Object.assign({},n,{sync:!0}),(c,u)=>{throw jt.isError(c)&&(c.value=u),c},(c,u)=>{if(c.length)throw new jt(c,t,void 0,void 0,a);o=u}),o}isValid(t,n){return this.validate(t,n).then(()=>!0,r=>{if(jt.isError(r))return!1;throw r})}isValidSync(t,n){try{return this.validateSync(t,n),!0}catch(r){if(jt.isError(r))return!1;throw r}}_getDefault(t){let n=this.spec.default;return n==null?n:typeof n=="function"?n.call(this,t):vi(n)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,n){const r=this.clone({nullable:t});return r.internalTests.nullable=xi({message:n,name:"nullable",test(s){return s===null?this.schema.spec.nullable:!0}}),r}optionality(t,n){const r=this.clone({optional:t});return r.internalTests.optionality=xi({message:n,name:"optionality",test(s){return s===void 0?this.schema.spec.optional:!0}}),r}optional(){return this.optionality(!0)}defined(t=Rn.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=Rn.notNull){return this.nullability(!1,t)}required(t=Rn.required){return this.clone().withMutation(n=>n.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let n=this.clone();return n.transforms.push(t),n}test(...t){let n;if(t.length===1?typeof t[0]=="function"?n={test:t[0]}:n=t[0]:t.length===2?n={name:t[0],test:t[1]}:n={name:t[0],message:t[1],test:t[2]},n.message===void 0&&(n.message=Rn.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let r=this.clone(),s=xi(n),o=n.exclusive||n.name&&r.exclusiveTests[n.name]===!0;if(n.exclusive&&!n.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return n.name&&(r.exclusiveTests[n.name]=!!n.exclusive),r.tests=r.tests.filter(a=>!(a.OPTIONS.name===n.name&&(o||a.OPTIONS.test===s.OPTIONS.test))),r.tests.push(s),r}when(t,n){!Array.isArray(t)&&typeof t!="string"&&(n=t,t=".");let r=this.clone(),s=y2(t).map(o=>new vs(o));return s.forEach(o=>{o.isSibling&&r.deps.push(o.key)}),r.conditions.push(typeof n=="function"?new dl(s,n):dl.fromOptions(s,n)),r}typeError(t){let n=this.clone();return n.internalTests.typeError=xi({message:t,name:"typeError",skipAbsent:!0,test(r){return this.schema._typeCheck(r)?!0:this.createError({params:{type:this.schema.type}})}}),n}oneOf(t,n=Rn.oneOf){let r=this.clone();return t.forEach(s=>{r._whitelist.add(s),r._blacklist.delete(s)}),r.internalTests.whiteList=xi({message:n,name:"oneOf",skipAbsent:!0,test(s){let o=this.schema._whitelist,a=o.resolveAll(this.resolve);return a.includes(s)?!0:this.createError({params:{values:Array.from(o).join(", "),resolved:a}})}}),r}notOneOf(t,n=Rn.notOneOf){let r=this.clone();return t.forEach(s=>{r._blacklist.add(s),r._whitelist.delete(s)}),r.internalTests.blacklist=xi({message:n,name:"notOneOf",test(s){let o=this.schema._blacklist,a=o.resolveAll(this.resolve);return a.includes(s)?this.createError({params:{values:Array.from(o).join(", "),resolved:a}}):!0}}),r}strip(t=!0){let n=this.clone();return n.spec.strip=t,n}describe(t){const n=(t?this.resolve(t):this).clone(),{label:r,meta:s,optional:o,nullable:a}=n.spec;return{meta:s,label:r,optional:o,nullable:a,default:n.getDefault(t),type:n.type,oneOf:n._whitelist.describe(),notOneOf:n._blacklist.describe(),tests:n.tests.map(u=>({name:u.OPTIONS.name,params:u.OPTIONS.params})).filter((u,d,h)=>h.findIndex(p=>p.name===u.name)===d)}}}Fn.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])Fn.prototype[`${e}At`]=function(t,n,r={}){const{parent:s,parentPath:o,schema:a}=nk(this,t,n,r.context);return a[e](s&&s[o],Object.assign({},r,{parent:s,path:t}))};for(const e of["equals","is"])Fn.prototype[e]=Fn.prototype.oneOf;for(const e of["not","nope"])Fn.prototype[e]=Fn.prototype.notOneOf;const rk=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function sk(e){const t=th(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(t.z===void 0&&t.plusMinus===void 0)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let n=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(n=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(n=0-n)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+n,t.second,t.millisecond)}function th(e){var t,n;const r=rk.exec(e);return r?{year:lr(r[1]),month:lr(r[2],1)-1,day:lr(r[3],1),hour:lr(r[4]),minute:lr(r[5]),second:lr(r[6]),millisecond:r[7]?lr(r[7].substring(0,3)):0,precision:(t=(n=r[7])==null?void 0:n.length)!=null?t:void 0,z:r[8]||void 0,plusMinus:r[9]||void 0,hourOffset:lr(r[10]),minuteOffset:lr(r[11])}:null}function lr(e,t=0){return Number(e)||t}let ik=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,ok=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,ak=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,lk="^\\d{4}-\\d{2}-\\d{2}",ck="\\d{2}:\\d{2}:\\d{2}",uk="(([+-]\\d{2}(:?\\d{2})?)|Z)",fk=new RegExp(`${lk}T${ck}(\\.\\d+)?${uk}$`),dk=e=>bs(e)||e===e.trim(),hk={}.toString();function Vr(){return new S2}class S2 extends Fn{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(!r.spec.coerce||r.isType(t)||Array.isArray(t))return t;const s=t!=null&&t.toString?t.toString():t;return s===hk?t:s})})}required(t){return super.required(t).withMutation(n=>n.test({message:t||Rn.required,name:"required",skipAbsent:!0,test:r=>!!r.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(n=>n.OPTIONS.name!=="required"),t))}length(t,n=Lt.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(r){return r.length===this.resolve(t)}})}min(t,n=Lt.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(r){return r.length>=this.resolve(t)}})}max(t,n=Lt.max){return this.test({name:"max",exclusive:!0,message:n,params:{max:t},skipAbsent:!0,test(r){return r.length<=this.resolve(t)}})}matches(t,n){let r=!1,s,o;return n&&(typeof n=="object"?{excludeEmptyString:r=!1,message:s,name:o}=n:s=n),this.test({name:o||"matches",message:s||Lt.matches,params:{regex:t},skipAbsent:!0,test:a=>a===""&&r||a.search(t)!==-1})}email(t=Lt.email){return this.matches(ik,{name:"email",message:t,excludeEmptyString:!0})}url(t=Lt.url){return this.matches(ok,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=Lt.uuid){return this.matches(ak,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let n="",r,s;return t&&(typeof t=="object"?{message:n="",allowOffset:r=!1,precision:s=void 0}=t:n=t),this.matches(fk,{name:"datetime",message:n||Lt.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:n||Lt.datetime_offset,params:{allowOffset:r},skipAbsent:!0,test:o=>{if(!o||r)return!0;const a=th(o);return a?!!a.z:!1}}).test({name:"datetime_precision",message:n||Lt.datetime_precision,params:{precision:s},skipAbsent:!0,test:o=>{if(!o||s==null)return!0;const a=th(o);return a?a.precision===s:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=Lt.trim){return this.transform(n=>n!=null?n.trim():n).test({message:t,name:"trim",test:dk})}lowercase(t=Lt.lowercase){return this.transform(n=>bs(n)?n:n.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>bs(n)||n===n.toLowerCase()})}uppercase(t=Lt.uppercase){return this.transform(n=>bs(n)?n:n.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>bs(n)||n===n.toUpperCase()})}}Vr.prototype=S2.prototype;let pk=new Date(""),mk=e=>Object.prototype.toString.call(e)==="[object Date]";class nh extends Fn{constructor(){super({type:"date",check(t){return mk(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,n,r)=>!r.spec.coerce||r.isType(t)||t===null?t:(t=sk(t),isNaN(t)?nh.INVALID_DATE:new Date(t)))})}prepareParam(t,n){let r;if(vs.isRef(t))r=t;else{let s=this.cast(t);if(!this._typeCheck(s))throw new TypeError(`\`${n}\` must be a Date or a value that can be \`cast()\` to a Date`);r=s}return r}min(t,n=Qd.min){let r=this.prepareParam(t,"min");return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(s){return s>=this.resolve(r)}})}max(t,n=Qd.max){let r=this.prepareParam(t,"max");return this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(s){return s<=this.resolve(r)}})}}nh.INVALID_DATE=pk;function gk(e,t=[]){let n=[],r=new Set,s=new Set(t.map(([a,c])=>`${a}-${c}`));function o(a,c){let u=xs.split(a)[0];r.add(u),s.has(`${c}-${u}`)||n.push([c,u])}for(const a of Object.keys(e)){let c=e[a];r.add(a),vs.isRef(c)&&c.isSibling?o(c.path,a):eh(c)&&"deps"in c&&c.deps.forEach(u=>o(u,a))}return YN.array(Array.from(r),n).reverse()}function T2(e,t){let n=1/0;return e.some((r,s)=>{var o;if((o=t.path)!=null&&o.includes(r))return n=s,!0}),n}function C2(e){return(t,n)=>T2(e,t)-T2(e,n)}const yk=(e,t,n)=>{if(typeof e!="string")return e;let r=e;try{r=JSON.parse(e)}catch{}return n.isType(r)?r:e};function ml(e){if("fields"in e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=ml(r);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=ml(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(ml)}):"optional"in e?e.optional():e}const xk=(e,t)=>{const n=[...xs.normalizePath(t)];if(n.length===1)return n[0]in e;let r=n.pop(),s=xs.getter(xs.join(n),!0)(e);return!!(s&&r in s)};let E2=e=>Object.prototype.toString.call(e)==="[object Object]";function P2(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(r=>n.indexOf(r)===-1)}const vk=C2([]);function rh(e){return new A2(e)}class A2 extends Fn{constructor(t){super({type:"object",check(n){return E2(n)||typeof n=="function"}}),this.fields=Object.create(null),this._sortErrors=vk,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,n={}){var r;let s=super._cast(t,n);if(s===void 0)return this.getDefault(n);if(!this._typeCheck(s))return s;let o=this.fields,a=(r=n.stripUnknown)!=null?r:this.spec.noUnknown,c=[].concat(this._nodes,Object.keys(s).filter(p=>!this._nodes.includes(p))),u={},d=Object.assign({},n,{parent:u,__validating:n.__validating||!1}),h=!1;for(const p of c){let m=o[p],x=p in s;if(m){let S,b=s[p];d.path=(n.path?`${n.path}.`:"")+p,m=m.resolve({value:b,context:n.context,parent:u});let T=m instanceof Fn?m.spec:void 0,v=T==null?void 0:T.strict;if(T!=null&&T.strip){h=h||p in s;continue}S=!n.__validating||!v?m.cast(s[p],d):s[p],S!==void 0&&(u[p]=S)}else x&&!a&&(u[p]=s[p]);(x!==p in u||u[p]!==s[p])&&(h=!0)}return h?u:s}_validate(t,n={},r,s){let{from:o=[],originalValue:a=t,recursive:c=this.spec.recursive}=n;n.from=[{schema:this,value:a},...o],n.__validating=!0,n.originalValue=a,super._validate(t,n,r,(u,d)=>{if(!c||!E2(d)){s(u,d);return}a=a||d;let h=[];for(let p of this._nodes){let m=this.fields[p];!m||vs.isRef(m)||h.push(m.asNestedTest({options:n,key:p,parent:d,parentPath:n.path,originalParent:a}))}this.runTests({tests:h,value:d,originalValue:a,options:n},r,p=>{s(p.sort(this._sortErrors).concat(u),d)})})}clone(t){const n=super.clone(t);return n.fields=Object.assign({},this.fields),n._nodes=this._nodes,n._excludedEdges=this._excludedEdges,n._sortErrors=this._sortErrors,n}concat(t){let n=super.concat(t),r=n.fields;for(let[s,o]of Object.entries(this.fields)){const a=r[s];r[s]=a===void 0?o:a}return n.withMutation(s=>s.setFields(r,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let n={};return this._nodes.forEach(r=>{var s;const o=this.fields[r];let a=t;(s=a)!=null&&s.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[r]})),n[r]=o&&"getDefault"in o?o.getDefault(a):void 0}),n}setFields(t,n){let r=this.clone();return r.fields=t,r._nodes=gk(t,n),r._sortErrors=C2(Object.keys(t)),n&&(r._excludedEdges=n),r}shape(t,n=[]){return this.clone().withMutation(r=>{let s=r._excludedEdges;return n.length&&(Array.isArray(n[0])||(n=[n]),s=[...r._excludedEdges,...n]),r.setFields(Object.assign(r.fields,t),s)})}partial(){const t={};for(const[n,r]of Object.entries(this.fields))t[n]="optional"in r&&r.optional instanceof Function?r.optional():r;return this.setFields(t)}deepPartial(){return ml(this)}pick(t){const n={};for(const r of t)this.fields[r]&&(n[r]=this.fields[r]);return this.setFields(n,this._excludedEdges.filter(([r,s])=>t.includes(r)&&t.includes(s)))}omit(t){const n=[];for(const r of Object.keys(this.fields))t.includes(r)||n.push(r);return this.pick(n)}from(t,n,r){let s=xs.getter(t,!0);return this.transform(o=>{if(!o)return o;let a=o;return xk(o,t)&&(a=Object.assign({},o),r||delete a[t],a[n]=s(o)),a})}json(){return this.transform(yk)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||fl.exact,test(n){if(n==null)return!0;const r=P2(this.schema,n);return r.length===0||this.createError({params:{properties:r.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,n=fl.noUnknown){typeof t!="boolean"&&(n=t,t=!0);let r=this.test({name:"noUnknown",exclusive:!0,message:n,test(s){if(s==null)return!0;const o=P2(this.schema,s);return!t||o.length===0||this.createError({params:{unknown:o.join(", ")}})}});return r.spec.noUnknown=t,r}unknown(t=!0,n=fl.noUnknown){return this.noUnknown(!t,n)}transformKeys(t){return this.transform(n=>{if(!n)return n;const r={};for(const s of Object.keys(n))r[t(s)]=n[s];return r})}camelCase(){return this.transformKeys(Jd.camelCase)}snakeCase(){return this.transformKeys(Jd.snakeCase)}constantCase(){return this.transformKeys(t=>Jd.snakeCase(t).toUpperCase())}describe(t){const n=(t?this.resolve(t):this).clone(),r=super.describe(t);r.fields={};for(const[o,a]of Object.entries(n.fields)){var s;let c=t;(s=c)!=null&&s.value&&(c=Object.assign({},c,{parent:c.value,value:c.value[o]})),r.fields[o]=a.describe(c)}return r}}rh.prototype=A2.prototype,rh().shape({labelES:Vr().required(),label:Vr().required(),code:Vr().required(),codeISO2:Vr().required(),phone:Vr().required()});const M2=[{labelES:"Afganistán",label:"Afghanistan",codeISO2:"AF",code:"AFG",phone:"93"},{labelES:"Albania",label:"Albania",codeISO2:"AL",code:"ALB",phone:"355"},{labelES:"Alemania",label:"Germany",codeISO2:"DE",code:"DEU",phone:"49"},{labelES:"Andorra",label:"Andorra",codeISO2:"AD",code:"AND",phone:"376"},{labelES:"Angola",label:"Angola",codeISO2:"AO",code:"AGO",phone:"244"},{labelES:"Anguila",label:"Anguilla",codeISO2:"AI",code:"AIA",phone:"1 264"},{labelES:"Antártida",label:"Antarctica",codeISO2:"AQ",code:"ATA",phone:"672"},{labelES:"Antigua y Barbuda",label:"Antigua and Barbuda",codeISO2:"AG",code:"ATG",phone:"1 268"},{labelES:"Arabia Saudita",label:"Saudi Arabia",codeISO2:"SA",code:"SAU",phone:"966"},{labelES:"Argelia",label:"Algeria",codeISO2:"DZ",code:"DZA",phone:"213"},{labelES:"Argentina",label:"Argentina",codeISO2:"AR",code:"ARG",phone:"54"},{labelES:"Armenia",label:"Armenia",codeISO2:"AM",code:"ARM",phone:"374"},{labelES:"Aruba",label:"Aruba",codeISO2:"AW",code:"ABW",phone:"297"},{labelES:"Australia",label:"Australia",codeISO2:"AU",code:"AUS",phone:"61"},{labelES:"Austria",label:"Austria",codeISO2:"AT",code:"AUT",phone:"43"},{labelES:"Azerbaiyán",label:"Azerbaijan",codeISO2:"AZ",code:"AZE",phone:"994"},{labelES:"Bélgica",label:"Belgium",codeISO2:"BE",code:"BEL",phone:"32"},{labelES:"Bahamas",label:"Bahamas",codeISO2:"BS",code:"BHS",phone:"1 242"},{labelES:"Bahrein",label:"Bahrain",codeISO2:"BH",code:"BHR",phone:"973"},{labelES:"Bangladesh",label:"Bangladesh",codeISO2:"BD",code:"BGD",phone:"880"},{labelES:"Barbados",label:"Barbados",codeISO2:"BB",code:"BRB",phone:"1 246"},{labelES:"Belice",label:"Belize",codeISO2:"BZ",code:"BLZ",phone:"501"},{labelES:"Benín",label:"Benin",codeISO2:"BJ",code:"BEN",phone:"229"},{labelES:"Bhután",label:"Bhutan",codeISO2:"BT",code:"BTN",phone:"975"},{labelES:"Bielorrusia",label:"Belarus",codeISO2:"BY",code:"BLR",phone:"375"},{labelES:"Birmania",label:"Myanmar",codeISO2:"MM",code:"MMR",phone:"95"},{labelES:"Bolivia",label:"Bolivia",codeISO2:"BO",code:"BOL",phone:"591"},{labelES:"Bosnia y Herzegovina",label:"Bosnia and Herzegovina",codeISO2:"BA",code:"BIH",phone:"387"},{labelES:"Botsuana",label:"Botswana",codeISO2:"BW",code:"BWA",phone:"267"},{labelES:"Brasil",label:"Brazil",codeISO2:"BR",code:"BRA",phone:"55"},{labelES:"Brunéi",label:"Brunei",codeISO2:"BN",code:"BRN",phone:"673"},{labelES:"Bulgaria",label:"Bulgaria",codeISO2:"BG",code:"BGR",phone:"359"},{labelES:"Burkina Faso",label:"Burkina Faso",codeISO2:"BF",code:"BFA",phone:"226"},{labelES:"Burundi",label:"Burundi",codeISO2:"BI",code:"BDI",phone:"257"},{labelES:"Cabo Verde",label:"Cape Verde",codeISO2:"CV",code:"CPV",phone:"238"},{labelES:"Camboya",label:"Cambodia",codeISO2:"KH",code:"KHM",phone:"855"},{labelES:"Camerún",label:"Cameroon",codeISO2:"CM",code:"CMR",phone:"237"},{labelES:"Canadá",label:"Canada",codeISO2:"CA",code:"CAN",phone:"1"},{labelES:"Chad",label:"Chad",codeISO2:"TD",code:"TCD",phone:"235"},{labelES:"Chile",label:"Chile",codeISO2:"CL",code:"CHL",phone:"56"},{labelES:"China",label:"China",codeISO2:"CN",code:"CHN",phone:"86"},{labelES:"Chipre",label:"Cyprus",codeISO2:"CY",code:"CYP",phone:"357"},{labelES:"Ciudad del Vaticano",label:"Vatican City State",codeISO2:"VA",code:"VAT",phone:"39"},{labelES:"Colombia",label:"Colombia",codeISO2:"CO",code:"COL",phone:"57"},{labelES:"Comoras",label:"Comoros",codeISO2:"KM",code:"COM",phone:"269"},{labelES:"República del Congo",label:"Republic of the Congo",codeISO2:"CG",code:"COG",phone:"242"},{labelES:"República Democrática del Congo",label:"Democratic Republic of the Congo",codeISO2:"CD",code:"COD",phone:"243"},{labelES:"Corea del Norte",label:"North Korea",codeISO2:"KP",code:"PRK",phone:"850"},{labelES:"Corea del Sur",label:"South Korea",codeISO2:"KR",code:"KOR",phone:"82"},{labelES:"Costa de Marfil",label:"Ivory Coast",codeISO2:"CI",code:"CIV",phone:"225"},{labelES:"Costa Rica",label:"Costa Rica",codeISO2:"CR",code:"CRI",phone:"506"},{labelES:"Croacia",label:"Croatia",codeISO2:"HR",code:"HRV",phone:"385"},{labelES:"Cuba",label:"Cuba",codeISO2:"CU",code:"CUB",phone:"53"},{labelES:"Curazao",label:"Curaçao",codeISO2:"CW",code:"CWU",phone:"5999"},{labelES:"Dinamarca",label:"Denmark",codeISO2:"DK",code:"DNK",phone:"45"},{labelES:"Dominica",label:"Dominica",codeISO2:"DM",code:"DMA",phone:"1 767"},{labelES:"Ecuador",label:"Ecuador",codeISO2:"EC",code:"ECU",phone:"593"},{labelES:"Egipto",label:"Egypt",codeISO2:"EG",code:"EGY",phone:"20"},{labelES:"El Salvador",label:"El Salvador",codeISO2:"SV",code:"SLV",phone:"503"},{labelES:"Emiratos Árabes Unidos",label:"United Arab Emirates",codeISO2:"AE",code:"ARE",phone:"971"},{labelES:"Eritrea",label:"Eritrea",codeISO2:"ER",code:"ERI",phone:"291"},{labelES:"Eslovaquia",label:"Slovakia",codeISO2:"SK",code:"SVK",phone:"421"},{labelES:"Eslovenia",label:"Slovenia",codeISO2:"SI",code:"SVN",phone:"386"},{labelES:"España",label:"Spain",codeISO2:"ES",code:"ESP",phone:"34"},{labelES:"Estados Unidos de América",label:"United States of America",codeISO2:"US",code:"USA",phone:"1"},{labelES:"Estonia",label:"Estonia",codeISO2:"EE",code:"EST",phone:"372"},{labelES:"Etiopía",label:"Ethiopia",codeISO2:"ET",code:"ETH",phone:"251"},{labelES:"Filipinas",label:"Philippines",codeISO2:"PH",code:"PHL",phone:"63"},{labelES:"Finlandia",label:"Finland",codeISO2:"FI",code:"FIN",phone:"358"},{labelES:"Fiyi",label:"Fiji",codeISO2:"FJ",code:"FJI",phone:"679"},{labelES:"Francia",label:"France",codeISO2:"FR",code:"FRA",phone:"33"},{labelES:"Gabón",label:"Gabon",codeISO2:"GA",code:"GAB",phone:"241"},{labelES:"Gambia",label:"Gambia",codeISO2:"GM",code:"GMB",phone:"220"},{labelES:"Georgia",label:"Georgia",codeISO2:"GE",code:"GEO",phone:"995"},{labelES:"Ghana",label:"Ghana",codeISO2:"GH",code:"GHA",phone:"233"},{labelES:"Gibraltar",label:"Gibraltar",codeISO2:"GI",code:"GIB",phone:"350"},{labelES:"Granada",label:"Grenada",codeISO2:"GD",code:"GRD",phone:"1 473"},{labelES:"Grecia",label:"Greece",codeISO2:"GR",code:"GRC",phone:"30"},{labelES:"Groenlandia",label:"Greenland",codeISO2:"GL",code:"GRL",phone:"299"},{labelES:"Guadalupe",label:"Guadeloupe",codeISO2:"GP",code:"GLP",phone:"590"},{labelES:"Guam",label:"Guam",codeISO2:"GU",code:"GUM",phone:"1 671"},{labelES:"Guatemala",label:"Guatemala",codeISO2:"GT",code:"GTM",phone:"502"},{labelES:"Guayana Francesa",label:"French Guiana",codeISO2:"GF",code:"GUF",phone:"594"},{labelES:"Guernsey",label:"Guernsey",codeISO2:"GG",code:"GGY",phone:"44"},{labelES:"Guinea",label:"Guinea",codeISO2:"GN",code:"GIN",phone:"224"},{labelES:"Guinea Ecuatorial",label:"Equatorial Guinea",codeISO2:"GQ",code:"GNQ",phone:"240"},{labelES:"Guinea-Bissau",label:"Guinea-Bissau",codeISO2:"GW",code:"GNB",phone:"245"},{labelES:"Guyana",label:"Guyana",codeISO2:"GY",code:"GUY",phone:"592"},{labelES:"Haití",label:"Haiti",codeISO2:"HT",code:"HTI",phone:"509"},{labelES:"Honduras",label:"Honduras",codeISO2:"HN",code:"HND",phone:"504"},{labelES:"Hong kong",label:"Hong Kong",codeISO2:"HK",code:"HKG",phone:"852"},{labelES:"Hungría",label:"Hungary",codeISO2:"HU",code:"HUN",phone:"36"},{labelES:"India",label:"India",codeISO2:"IN",code:"IND",phone:"91"},{labelES:"Indonesia",label:"Indonesia",codeISO2:"ID",code:"IDN",phone:"62"},{labelES:"Irán",label:"Iran",codeISO2:"IR",code:"IRN",phone:"98"},{labelES:"Irak",label:"Iraq",codeISO2:"IQ",code:"IRQ",phone:"964"},{labelES:"Irlanda",label:"Ireland",codeISO2:"IE",code:"IRL",phone:"353"},{labelES:"Isla Bouvet",label:"Bouvet Island",codeISO2:"BV",code:"BVT",phone:""},{labelES:"Isla de Man",label:"Isle of Man",codeISO2:"IM",code:"IMN",phone:"44"},{labelES:"Isla de Navidad",label:"Christmas Island",codeISO2:"CX",code:"CXR",phone:"61"},{labelES:"Isla Norfolk",label:"Norfolk Island",codeISO2:"NF",code:"NFK",phone:"672"},{labelES:"Islandia",label:"Iceland",codeISO2:"IS",code:"ISL",phone:"354"},{labelES:"Islas Bermudas",label:"Bermuda Islands",codeISO2:"BM",code:"BMU",phone:"1 441"},{labelES:"Islas Caimán",label:"Cayman Islands",codeISO2:"KY",code:"CYM",phone:"1 345"},{labelES:"Islas Cocos (Keeling)",label:"Cocos (Keeling) Islands",codeISO2:"CC",code:"CCK",phone:"61"},{labelES:"Islas Cook",label:"Cook Islands",codeISO2:"CK",code:"COK",phone:"682"},{labelES:"Islas de Åland",label:"Åland Islands",codeISO2:"AX",code:"ALA",phone:"358"},{labelES:"Islas Feroe",label:"Faroe Islands",codeISO2:"FO",code:"FRO",phone:"298"},{labelES:"Islas Georgias del Sur y Sandwich del Sur",label:"South Georgia and the South Sandwich Islands",codeISO2:"GS",code:"SGS",phone:"500"},{labelES:"Islas Heard y McDonald",label:"Heard Island and McDonald Islands",codeISO2:"HM",code:"HMD",phone:""},{labelES:"Islas Maldivas",label:"Maldives",codeISO2:"MV",code:"MDV",phone:"960"},{labelES:"Islas Malvinas",label:"Falkland Islands (Malvinas)",codeISO2:"FK",code:"FLK",phone:"500"},{labelES:"Islas Marianas del Norte",label:"Northern Mariana Islands",codeISO2:"MP",code:"MNP",phone:"1 670"},{labelES:"Islas Marshall",label:"Marshall Islands",codeISO2:"MH",code:"MHL",phone:"692"},{labelES:"Islas Pitcairn",label:"Pitcairn Islands",codeISO2:"PN",code:"PCN",phone:"870"},{labelES:"Islas Salomón",label:"Solomon Islands",codeISO2:"SB",code:"SLB",phone:"677"},{labelES:"Islas Turcas y Caicos",label:"Turks and Caicos Islands",codeISO2:"TC",code:"TCA",phone:"1 649"},{labelES:"Islas Ultramarinas Menores de Estados Unidos",label:"United States Minor Outlying Islands",codeISO2:"UM",code:"UMI",phone:"246"},{labelES:"Islas Vírgenes Británicas",label:"Virgin Islands",codeISO2:"VG",code:"VGB",phone:"1 284"},{labelES:"Islas Vírgenes de los Estados Unidos",label:"United States Virgin Islands",codeISO2:"VI",code:"VIR",phone:"1 340"},{labelES:"Israel",label:"Israel",codeISO2:"IL",code:"ISR",phone:"972"},{labelES:"Italia",label:"Italy",codeISO2:"IT",code:"ITA",phone:"39"},{labelES:"Jamaica",label:"Jamaica",codeISO2:"JM",code:"JAM",phone:"1 876"},{labelES:"Japón",label:"Japan",codeISO2:"JP",code:"JPN",phone:"81"},{labelES:"Jersey",label:"Jersey",codeISO2:"JE",code:"JEY",phone:"44"},{labelES:"Jordania",label:"Jordan",codeISO2:"JO",code:"JOR",phone:"962"},{labelES:"Kazajistán",label:"Kazakhstan",codeISO2:"KZ",code:"KAZ",phone:"7"},{labelES:"Kenia",label:"Kenya",codeISO2:"KE",code:"KEN",phone:"254"},{labelES:"Kirguistán",label:"Kyrgyzstan",codeISO2:"KG",code:"KGZ",phone:"996"},{labelES:"Kiribati",label:"Kiribati",codeISO2:"KI",code:"KIR",phone:"686"},{labelES:"Kuwait",label:"Kuwait",codeISO2:"KW",code:"KWT",phone:"965"},{labelES:"Líbano",label:"Lebanon",codeISO2:"LB",code:"LBN",phone:"961"},{labelES:"Laos",label:"Laos",codeISO2:"LA",code:"LAO",phone:"856"},{labelES:"Lesoto",label:"Lesotho",codeISO2:"LS",code:"LSO",phone:"266"},{labelES:"Letonia",label:"Latvia",codeISO2:"LV",code:"LVA",phone:"371"},{labelES:"Liberia",label:"Liberia",codeISO2:"LR",code:"LBR",phone:"231"},{labelES:"Libia",label:"Libya",codeISO2:"LY",code:"LBY",phone:"218"},{labelES:"Liechtenstein",label:"Liechtenstein",codeISO2:"LI",code:"LIE",phone:"423"},{labelES:"Lituania",label:"Lithuania",codeISO2:"LT",code:"LTU",phone:"370"},{labelES:"Luxemburgo",label:"Luxembourg",codeISO2:"LU",code:"LUX",phone:"352"},{labelES:"México",label:"Mexico",codeISO2:"MX",code:"MEX",phone:"52"},{labelES:"Mónaco",label:"Monaco",codeISO2:"MC",code:"MCO",phone:"377"},{labelES:"Macao",label:"Macao",codeISO2:"MO",code:"MAC",phone:"853"},{labelES:"Macedônia",label:"Macedonia",codeISO2:"MK",code:"MKD",phone:"389"},{labelES:"Madagascar",label:"Madagascar",codeISO2:"MG",code:"MDG",phone:"261"},{labelES:"Malasia",label:"Malaysia",codeISO2:"MY",code:"MYS",phone:"60"},{labelES:"Malawi",label:"Malawi",codeISO2:"MW",code:"MWI",phone:"265"},{labelES:"Mali",label:"Mali",codeISO2:"ML",code:"MLI",phone:"223"},{labelES:"Malta",label:"Malta",codeISO2:"MT",code:"MLT",phone:"356"},{labelES:"Marruecos",label:"Morocco",codeISO2:"MA",code:"MAR",phone:"212"},{labelES:"Martinica",label:"Martinique",codeISO2:"MQ",code:"MTQ",phone:"596"},{labelES:"Mauricio",label:"Mauritius",codeISO2:"MU",code:"MUS",phone:"230"},{labelES:"Mauritania",label:"Mauritania",codeISO2:"MR",code:"MRT",phone:"222"},{labelES:"Mayotte",label:"Mayotte",codeISO2:"YT",code:"MYT",phone:"262"},{labelES:"Micronesia",label:"Estados Federados de",codeISO2:"FM",code:"FSM",phone:"691"},{labelES:"Moldavia",label:"Moldova",codeISO2:"MD",code:"MDA",phone:"373"},{labelES:"Mongolia",label:"Mongolia",codeISO2:"MN",code:"MNG",phone:"976"},{labelES:"Montenegro",label:"Montenegro",codeISO2:"ME",code:"MNE",phone:"382"},{labelES:"Montserrat",label:"Montserrat",codeISO2:"MS",code:"MSR",phone:"1 664"},{labelES:"Mozambique",label:"Mozambique",codeISO2:"MZ",code:"MOZ",phone:"258"},{labelES:"Namibia",label:"Namibia",codeISO2:"NA",code:"NAM",phone:"264"},{labelES:"Nauru",label:"Nauru",codeISO2:"NR",code:"NRU",phone:"674"},{labelES:"Nepal",label:"Nepal",codeISO2:"NP",code:"NPL",phone:"977"},{labelES:"Nicaragua",label:"Nicaragua",codeISO2:"NI",code:"NIC",phone:"505"},{labelES:"Niger",label:"Niger",codeISO2:"NE",code:"NER",phone:"227"},{labelES:"Nigeria",label:"Nigeria",codeISO2:"NG",code:"NGA",phone:"234"},{labelES:"Niue",label:"Niue",codeISO2:"NU",code:"NIU",phone:"683"},{labelES:"Noruega",label:"Norway",codeISO2:"NO",code:"NOR",phone:"47"},{labelES:"Nueva Caledonia",label:"New Caledonia",codeISO2:"NC",code:"NCL",phone:"687"},{labelES:"Nueva Zelanda",label:"New Zealand",codeISO2:"NZ",code:"NZL",phone:"64"},{labelES:"Omán",label:"Oman",codeISO2:"OM",code:"OMN",phone:"968"},{labelES:"Países Bajos",label:"Netherlands",codeISO2:"NL",code:"NLD",phone:"31"},{labelES:"Pakistán",label:"Pakistan",codeISO2:"PK",code:"PAK",phone:"92"},{labelES:"Palau",label:"Palau",codeISO2:"PW",code:"PLW",phone:"680"},{labelES:"Palestina",label:"Palestine",codeISO2:"PS",code:"PSE",phone:"970"},{labelES:"Panamá",label:"Panama",codeISO2:"PA",code:"PAN",phone:"507"},{labelES:"Papúa Nueva Guinea",label:"Papua New Guinea",codeISO2:"PG",code:"PNG",phone:"675"},{labelES:"Paraguay",label:"Paraguay",codeISO2:"PY",code:"PRY",phone:"595"},{labelES:"Perú",label:"Peru",codeISO2:"PE",code:"PER",phone:"51"},{labelES:"Polinesia Francesa",label:"French Polynesia",codeISO2:"PF",code:"PYF",phone:"689"},{labelES:"Polonia",label:"Poland",codeISO2:"PL",code:"POL",phone:"48"},{labelES:"Portugal",label:"Portugal",codeISO2:"PT",code:"PRT",phone:"351"},{labelES:"Puerto Rico",label:"Puerto Rico",codeISO2:"PR",code:"PRI",phone:"1"},{labelES:"Qatar",label:"Qatar",codeISO2:"QA",code:"QAT",phone:"974"},{labelES:"Reino Unido",label:"United Kingdom",codeISO2:"GB",code:"GBR",phone:"44"},{labelES:"República Centroafricana",label:"Central African Republic",codeISO2:"CF",code:"CAF",phone:"236"},{labelES:"República Checa",label:"Czech Republic",codeISO2:"CZ",code:"CZE",phone:"420"},{labelES:"República Dominicana",label:"Dominican Republic",codeISO2:"DO",code:"DOM",phone:"1 809"},{labelES:"República de Sudán del Sur",label:"South Sudan",codeISO2:"SS",code:"SSD",phone:"211"},{labelES:"Reunión",label:"Réunion",codeISO2:"RE",code:"REU",phone:"262"},{labelES:"Ruanda",label:"Rwanda",codeISO2:"RW",code:"RWA",phone:"250"},{labelES:"Rumanía",label:"Romania",codeISO2:"RO",code:"ROU",phone:"40"},{labelES:"Rusia",label:"Russia",codeISO2:"RU",code:"RUS",phone:"7"},{labelES:"Sahara Occidental",label:"Western Sahara",codeISO2:"EH",code:"ESH",phone:"212"},{labelES:"Samoa",label:"Samoa",codeISO2:"WS",code:"WSM",phone:"685"},{labelES:"Samoa Americana",label:"American Samoa",codeISO2:"AS",code:"ASM",phone:"1 684"},{labelES:"San Bartolomé",label:"Saint Barthélemy",codeISO2:"BL",code:"BLM",phone:"590"},{labelES:"San Cristóbal y Nieves",label:"Saint Kitts and Nevis",codeISO2:"KN",code:"KNA",phone:"1 869"},{labelES:"San Marino",label:"San Marino",codeISO2:"SM",code:"SMR",phone:"378"},{labelES:"San Martín (Francia)",label:"Saint Martin (French part)",codeISO2:"MF",code:"MAF",phone:"1 599"},{labelES:"San Pedro y Miquelón",label:"Saint Pierre and Miquelon",codeISO2:"PM",code:"SPM",phone:"508"},{labelES:"San Vicente y las Granadinas",label:"Saint Vincent and the Grenadines",codeISO2:"VC",code:"VCT",phone:"1 784"},{labelES:"Santa Elena",label:"Ascensión y Tristán de Acuña",codeISO2:"SH",code:"SHN",phone:"290"},{labelES:"Santa Lucía",label:"Saint Lucia",codeISO2:"LC",code:"LCA",phone:"1 758"},{labelES:"Santo Tomé y Príncipe",label:"Sao Tome and Principe",codeISO2:"ST",code:"STP",phone:"239"},{labelES:"Senegal",label:"Senegal",codeISO2:"SN",code:"SEN",phone:"221"},{labelES:"Serbia",label:"Serbia",codeISO2:"RS",code:"SRB",phone:"381"},{labelES:"Seychelles",label:"Seychelles",codeISO2:"SC",code:"SYC",phone:"248"},{labelES:"Sierra Leona",label:"Sierra Leone",codeISO2:"SL",code:"SLE",phone:"232"},{labelES:"Singapur",label:"Singapore",codeISO2:"SG",code:"SGP",phone:"65"},{labelES:"Sint Maarten",label:"Sint Maarten",codeISO2:"SX",code:"SMX",phone:"1 721"},{labelES:"Siria",label:"Syria",codeISO2:"SY",code:"SYR",phone:"963"},{labelES:"Somalia",label:"Somalia",codeISO2:"SO",code:"SOM",phone:"252"},{labelES:"Sri lanka",label:"Sri Lanka",codeISO2:"LK",code:"LKA",phone:"94"},{labelES:"Sudáfrica",label:"South Africa",codeISO2:"ZA",code:"ZAF",phone:"27"},{labelES:"Sudán",label:"Sudan",codeISO2:"SD",code:"SDN",phone:"249"},{labelES:"Suecia",label:"Sweden",codeISO2:"SE",code:"SWE",phone:"46"},{labelES:"Suiza",label:"Switzerland",codeISO2:"CH",code:"CHE",phone:"41"},{labelES:"Surinám",label:"Suriname",codeISO2:"SR",code:"SUR",phone:"597"},{labelES:"Svalbard y Jan Mayen",label:"Svalbard and Jan Mayen",codeISO2:"SJ",code:"SJM",phone:"47"},{labelES:"Swazilandia",label:"Swaziland",codeISO2:"SZ",code:"SWZ",phone:"268"},{labelES:"Tayikistán",label:"Tajikistan",codeISO2:"TJ",code:"TJK",phone:"992"},{labelES:"Tailandia",label:"Thailand",codeISO2:"TH",code:"THA",phone:"66"},{labelES:"Taiwán",label:"Taiwan",codeISO2:"TW",code:"TWN",phone:"886"},{labelES:"Tanzania",label:"Tanzania",codeISO2:"TZ",code:"TZA",phone:"255"},{labelES:"Territorio Británico del Océano Índico",label:"British Indian Ocean Territory",codeISO2:"IO",code:"IOT",phone:"246"},{labelES:"Territorios Australes y Antárticas Franceses",label:"French Southern Territories",codeISO2:"TF",code:"ATF",phone:""},{labelES:"Timor Oriental",label:"East Timor",codeISO2:"TL",code:"TLS",phone:"670"},{labelES:"Togo",label:"Togo",codeISO2:"TG",code:"TGO",phone:"228"},{labelES:"Tokelau",label:"Tokelau",codeISO2:"TK",code:"TKL",phone:"690"},{labelES:"Tonga",label:"Tonga",codeISO2:"TO",code:"TON",phone:"676"},{labelES:"Trinidad y Tobago",label:"Trinidad and Tobago",codeISO2:"TT",code:"TTO",phone:"1 868"},{labelES:"Tunez",label:"Tunisia",codeISO2:"TN",code:"TUN",phone:"216"},{labelES:"Turkmenistán",label:"Turkmenistan",codeISO2:"TM",code:"TKM",phone:"993"},{labelES:"Turquía",label:"Turkey",codeISO2:"TR",code:"TUR",phone:"90"},{labelES:"Tuvalu",label:"Tuvalu",codeISO2:"TV",code:"TUV",phone:"688"},{labelES:"Ucrania",label:"Ukraine",codeISO2:"UA",code:"UKR",phone:"380"},{labelES:"Uganda",label:"Uganda",codeISO2:"UG",code:"UGA",phone:"256"},{labelES:"Uruguay",label:"Uruguay",codeISO2:"UY",code:"URY",phone:"598"},{labelES:"Uzbekistán",label:"Uzbekistan",codeISO2:"UZ",code:"UZB",phone:"998"},{labelES:"Vanuatu",label:"Vanuatu",codeISO2:"VU",code:"VUT",phone:"678"},{labelES:"Venezuela",label:"Venezuela",codeISO2:"VE",code:"VEN",phone:"58"},{labelES:"Vietnam",label:"Vietnam",codeISO2:"VN",code:"VNM",phone:"84"},{labelES:"Wallis y Futuna",label:"Wallis and Futuna",codeISO2:"WF",code:"WLF",phone:"681"},{labelES:"Yemen",label:"Yemen",codeISO2:"YE",code:"YEM",phone:"967"},{labelES:"Yibuti",label:"Djibouti",codeISO2:"DJ",code:"DJI",phone:"253"},{labelES:"Zambia",label:"Zambia",codeISO2:"ZM",code:"ZMB",phone:"260"},{labelES:"Zimbabue",label:"Zimbabwe",codeISO2:"ZW",code:"ZWE",phone:"263"}],bk=({countries:e=M2,name:t,control:n,label:r="select_a_country",placeholder:s="type_to_search",language:o="en",className:a="",translateKey:c})=>{var Ee,Ve,ie;const{t:u}=Ue(),{field:d,fieldState:h}=vr.useController({name:t,control:n,rules:{validate:{}},defaultValue:null}),[p,m]=O.useState(!1),[x,S]=O.useState(""),[b,T]=O.useState(d.value||null),v=O.useRef(null),A=O.useRef(null),C=O.useRef(null),{x:I,y:P,strategy:D,refs:R,context:F,placement:W,middlewareData:Q}=ir({open:p,onOpenChange:m,middleware:[er(8),nr(),tr({padding:8}),Rr({apply({availableHeight:me,elements:De}){Object.assign(De.floating.style,{maxHeight:`${Math.min(me-10,300)}px`})},padding:8}),ms({element:A})],placement:"bottom-start",whileElementsMounted:Qn}),ee=rr(F),ae=sr(F),{getReferenceProps:ge,getFloatingProps:de}=or([ee,ae]),{isMounted:le,styles:ue}=ar(F,{duration:{open:200,close:150},initial:{opacity:0,transform:"translateY(-4px)"}}),z=(Array.isArray(e)?e:[]).filter(me=>{if(!x.trim())return!0;const De=o==="es"&&me.labelES?me.labelES.toLowerCase():me.label.toLowerCase(),ft=me.code?me.code.toLowerCase():"";return De.includes(x.toLowerCase())||ft.includes(x.toLowerCase())}),K=me=>{T(me),m(!1),S(""),d.onChange(me)},$=()=>{m(!p),!p&&v.current&&setTimeout(()=>{var me;(me=v.current)==null||me.focus()},100)},k=()=>{setTimeout(()=>{p||d.onBlur()},200)};O.useEffect(()=>{T(d.value)},[d.value]),O.useEffect(()=>{const me=De=>{C.current&&!C.current.contains(De.target)&&d.onBlur()};return document.addEventListener("mousedown",me),()=>{document.removeEventListener("mousedown",me)}},[d]);const X=me=>{var De;return me?me.codeISO2?me.codeISO2.toLowerCase():((De=me.code)==null?void 0:De.toLowerCase())||"":""},U=(Ee=Q.arrow)==null?void 0:Ee.x,re=(Ve=Q.arrow)==null?void 0:Ve.y,B={top:"bottom",right:"left",bottom:"top",left:"right"}[W.split("-")[0]],J=ge({onClick:$,onBlur:k}),oe=u(r),se=u(s),fe=(ie=h.error)==null?void 0:ie.message;return g.jsxs("div",{ref:C,className:`w-full relative flex flex-col gap-8 ${a}`,children:[g.jsx("label",{className:`text-gray-600 font-600 group ${fe&&"!text-red-500"} text-label`,children:oe}),g.jsxs("div",{ref:R.setReference,className:`flex items-center justify-between bg-light rounded-full p-16 cursor-pointer border transition-all duration-200 hover:border-blue-400 ${fe&&"border-red-500 hover:border-red-600"} ${le?"border-blue-400":"border-blue-100"}`,...J,tabIndex:0,children:[b!=null&&b.code?g.jsxs("div",{className:"flex items-center w-full gap-10",children:[X(b)&&g.jsx("img",{loading:"lazy",width:"24",height:"16",className:"mr-2",src:`https://flagcdn.com/w20/${X(b)}.png`,srcSet:`https://flagcdn.com/w40/${X(b)}.png 2x`,alt:b.label,onError:me=>{me.currentTarget.style.display="none"}}),g.jsxs("span",{className:"flex-grow font-600 text-body-m",children:[o==="es"&&b.labelES?b.labelES:b.label,b.code?` (${b.code})`:u("select_country")]})]}):g.jsx("span",{className:"text-gray-400 font-600 text-body-m",children:se}),g.jsx("svg",{className:`w-16 h-16 transition-transform ${p?"transform rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M19 9l-7 7-7-7"})})]}),fe&&g.jsx("p",{className:"mt-1 text-sm text-red-600",children:u(fe,{x:u(c||"")||u(t)})}),le&&g.jsxs("div",{ref:R.setFloating,style:{position:D,top:P??0,left:I??0,...ue},className:"z-10 w-full bg-white border border-blue-400 rounded-3xl shadow-lg overflow-auto",...de(),children:[g.jsx("div",{ref:A,className:"absolute w-4 h-4 bg-white rotate-45 border-blue-400",style:{left:U!=null?`${U}px`:"",top:re!=null?`${re}px`:"",right:"",bottom:"",[B]:"-2px",borderRight:B==="left"?"1px solid":"none",borderBottom:B==="top"?"1px solid":"none",borderLeft:B==="right"?"1px solid":"none",borderTop:B==="bottom"?"1px solid":"none"}}),g.jsx("div",{className:"sticky top-0 bg-white p-2 z-20",children:g.jsx("input",{ref:v,type:"text",className:"w-full p-16 text-body-s",placeholder:u("search")+"...",value:x,onChange:me=>S(me.target.value),onClick:me=>me.stopPropagation(),onBlur:me=>{me.stopPropagation()},autoFocus:!0})}),g.jsx("div",{children:z.length>0?g.jsx("ul",{className:"flex flex-col",children:z.map((me,De)=>{var ws;const ft=me.codeISO2?me.codeISO2.toLowerCase():((ws=me.code)==null?void 0:ws.toLowerCase())||"";return g.jsxs("li",{className:"flex items-center gap-10 px-16 py-8 transition-all duration-200 hover:bg-blue-100/50 cursor-pointer",onClick:dt=>{dt.stopPropagation(),K(me)},children:[ft&&g.jsx("img",{loading:"lazy",width:"24",height:"16",className:"mr-2",src:`https://flagcdn.com/w20/${ft}.png`,srcSet:`https://flagcdn.com/w40/${ft}.png 2x`,alt:me.label,onError:dt=>{dt.currentTarget.style.display="none"}}),g.jsxs("span",{children:[o==="es"&&me.labelES?me.labelES:me.label,me.code?` (${me.code})`:"Country not found"]})]},`${me.code}-${De}`)})}):g.jsx("div",{className:"px-16 py-8 text-gray-500 text-body-s",children:u("no_countries_found")})})]})]})},wk=({country:e})=>{const t=n=>{var r;return n?n.codeISO2?n.codeISO2.toLowerCase():((r=n.code)==null?void 0:r.toLowerCase())||"":""};return g.jsxs("div",{className:"flex items-center gap-8",children:[g.jsx("img",{loading:"lazy",width:"24",height:"16",className:"mr-2",src:`https://flagcdn.com/w20/${t(e)}.png`,srcSet:`https://flagcdn.com/w40/${t(e)}.png 2x`,alt:e.label,onError:n=>{n.currentTarget.style.display="none"}}),g.jsx("p",{className:"text-body-s text-gray-600",children:e.label})]})},Sk=({countries:e,name:t,control:n,label:r="select_a_country",placeholder:s="type_to_search",language:o="en",className:a=""})=>{const{t:c}=Ue();return g.jsx(vr.Controller,{name:t,control:n,render:({field:{onChange:u,value:d},fieldState:{error:h}})=>g.jsx(Tk,{countries:e,value:d,onChange:u,label:c(r),placeholder:c(s),language:o,error:h==null?void 0:h.message,className:a})})},Tk=({countries:e,value:t,onChange:n,label:r="select_a_country",placeholder:s="type_to_search",language:o="en",error:a,className:c=""})=>{var U,re;const{t:u}=Ue(),[d,h]=O.useState(!1),[p,m]=O.useState(""),[x,S]=O.useState(t||null),b=O.useRef(null),T=O.useRef(null),{x:v,y:A,strategy:C,refs:I,context:P,placement:D,middlewareData:R}=ir({open:d,onOpenChange:h,middleware:[er(8),nr(),tr({padding:8}),Rr({apply({availableHeight:B,elements:J}){Object.assign(J.floating.style,{maxHeight:`${Math.min(B-10,300)}px`})},padding:8}),ms({element:T})],placement:"bottom-start",whileElementsMounted:Qn}),F=rr(P),W=sr(P),{getReferenceProps:Q,getFloatingProps:ee}=or([F,W]),{isMounted:ae,styles:ge}=ar(P,{duration:{open:200,close:150},initial:{opacity:0,transform:"translateY(-4px)"}}),le=(Array.isArray(e)?e:[]).filter(B=>{if(!p.trim())return!0;const J=o==="es"&&B.labelES?B.labelES.toLowerCase():B.label.toLowerCase(),oe=B.code?B.code.toLowerCase():"";return J.includes(p.toLowerCase())||oe.includes(p.toLowerCase())}),ue=B=>{S(B),h(!1),m(""),n(B)},Y=()=>{h(!d),!d&&b.current&&setTimeout(()=>{var B;(B=b.current)==null||B.focus()},100)};O.useEffect(()=>{S(t)},[t]);const z=B=>{var J;return B?B.codeISO2?B.codeISO2.toLowerCase():((J=B.code)==null?void 0:J.toLowerCase())||"":""},K=(U=R.arrow)==null?void 0:U.x,$=(re=R.arrow)==null?void 0:re.y,k={top:"bottom",right:"left",bottom:"top",left:"right"}[D.split("-")[0]],X=Q({onClick:Y});return g.jsxs("div",{className:`w-full relative flex flex-col gap-8 ${c}`,children:[g.jsx("label",{className:`text-gray-600 font-600 group ${a&&"!text-red-500"} text-label`,children:r}),g.jsxs("div",{ref:I.setReference,className:`flex items-center justify-between bg-light rounded-full p-16 cursor-pointer border transition-all duration-200 hover:border-blue-400 ${a&&"border-red-500 hover:border-red-600"} ${ae?"border-blue-400":"border-blue-100"}`,...X,children:[x!=null&&x.code?g.jsxs("div",{className:"flex items-center w-full",children:[z(x)&&g.jsx("img",{loading:"lazy",width:"24",height:"16",className:"mr-2",src:`https://flagcdn.com/w20/${z(x)}.png`,srcSet:`https://flagcdn.com/w40/${z(x)}.png 2x`,alt:x.label,onError:B=>{B.currentTarget.style.display="none"}}),g.jsxs("span",{className:"flex-grow",children:[o==="es"&&x.labelES?x.labelES:x.label,x.code?` (${x.code})`:u("select_country")]})]}):g.jsx("span",{className:"text-gray-500",children:s}),g.jsx("svg",{className:`w-16 h-16 transition-transform ${d?"transform rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M19 9l-7 7-7-7"})})]}),a&&g.jsx("p",{className:"mt-1 text-sm text-red-600",children:a}),ae&&g.jsxs("div",{ref:I.setFloating,style:{position:C,top:A??0,left:v??0,...ge},className:"z-10 w-full bg-white border border-blue-400 rounded-3xl shadow-lg overflow-auto",...ee(),children:[g.jsx("div",{ref:T,className:"absolute w-4 h-4 bg-white rotate-45 border-blue-400",style:{left:K!=null?`${K}px`:"",top:$!=null?`${$}px`:"",right:"",bottom:"",[k]:"-2px",borderRight:k==="left"?"1px solid":"none",borderBottom:k==="top"?"1px solid":"none",borderLeft:k==="right"?"1px solid":"none",borderTop:k==="bottom"?"1px solid":"none"}}),g.jsx("div",{className:"sticky top-0 bg-white p-2 z-20",children:g.jsx("input",{ref:b,type:"text",className:"w-full p-16",placeholder:u("search")+"...",value:p,onChange:B=>m(B.target.value),onClick:B=>B.stopPropagation(),autoFocus:!0})}),g.jsx("div",{children:le.length>0?g.jsx("ul",{className:"flex flex-col",children:le.map((B,J)=>{var se;const oe=B.codeISO2?B.codeISO2.toLowerCase():((se=B.code)==null?void 0:se.toLowerCase())||"";return g.jsxs("li",{className:"flex items-center gap-10 px-16 py-8 transition-all duration-200 hover:bg-blue-100/50 cursor-pointer",onClick:fe=>{fe.stopPropagation(),ue(B)},children:[oe&&g.jsx("img",{loading:"lazy",width:"24",height:"16",className:"mr-2",src:`https://flagcdn.com/w20/${oe}.png`,srcSet:`https://flagcdn.com/w40/${oe}.png 2x`,alt:B.label,onError:fe=>{fe.currentTarget.style.display="none"}}),g.jsxs("span",{children:[o==="es"&&B.labelES?B.labelES:B.label,B.code?` (${B.code})`:"Country not found"]})]},`${B.code}-${J}`)})}):g.jsx("div",{className:"px-3 py-2 text-gray-500",children:"No countries found"})})]})]})},sh=({variant:e="filled",color:t,size:n="base",shadow:r="none",icon:s,iconProps:o={},children:a,className:c,...u})=>{const{defaultColorScheme:d}=Ue(),h=t||d;return g.jsx("button",{...u,className:`${EN(e,h,n,r)} ${c}`,children:s?g.jsx(Pe,{...o,className:Do(n),icon:s}):a})};function Ck(e){return e!==null&&typeof e=="object"&&"name"in e&&"size"in e&&"type"in e&&typeof e.name=="string"&&typeof e.size=="number"&&typeof e.type=="string"}const Ek=({src:e,alt:t,isEditable:n=!1,onChange:r,className:s="",name:o,control:a,user:c})=>{const[u,d]=O.useState(e||null),[h,p]=O.useState(!!e),m=O.useRef(null),x=vr.useController({name:o,control:a}),S=!!a;O.useEffect(()=>{if(S){const A=x==null?void 0:x.field.value;if(Ck(A)){const C=URL.createObjectURL(A);return d(C),p(!0),()=>URL.revokeObjectURL(C)}else typeof A=="string"&&A&&A!==e?(d(A),p(!0)):e?(d(e),p(!0)):(d(null),p(!1))}},[x==null?void 0:x.field.value,e]);const b=()=>{var A;n&&((A=m.current)==null||A.click())},T=A=>{var I;const C=(I=A.target.files)==null?void 0:I[0];if(C){const P=URL.createObjectURL(C);d(P),p(!0),S&&(x==null||x.field.onChange(C)),r&&r(C)}},v=A=>{A.stopPropagation(),d(null),p(!1),m.current&&(m.current.value=""),S&&(x==null||x.field.onChange(null)),r&&r(null)};return g.jsxs("div",{className:"relative flex items-center gap-10",children:[n&&h&&g.jsx("button",{type:"button",onClick:v,className:"bg-red-500 text-white rounded-full w-20 h-20 flex items-center justify-center hover:bg-red-600 focus:outline-none","aria-label":"Eliminar imagen",children:g.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[g.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),g.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}),g.jsxs("div",{className:`relative flex items-center justify-center h-40 w-40 ${n?"cursor-pointer hover:opacity-80":""} ${s}`,onClick:b,children:[u?g.jsx("img",{src:u,alt:t,className:"w-full h-full object-cover rounded-full"}):g.jsx(u2,{size:60,user:c}),n&&g.jsxs(g.Fragment,{children:[g.jsx("input",{type:"file",ref:A=>{m.current=A,x&&x.field.ref(A)},onChange:T,onBlur:x==null?void 0:x.field.onBlur,accept:"image/*",className:"hidden"}),!h&&g.jsx("div",{className:"absolute bottom-0 right-0 bg-blue-100 rounded-full h-20 w-20 flex items-center justify-center",children:g.jsx(Pe,{icon:HD,className:"text-blue-500"})})]})]})]})},Pk=rh({name:Vr(),base64:Vr()}),Ak=({imageUrl:e,title:t,subtitle:n})=>g.jsxs("section",{className:"gap-10 flex flex-col items-center justify-center",children:[g.jsx("img",{src:e,alt:t,width:100,height:100}),g.jsx("h1",{className:"font-bold text-2xl align-middle",children:t}),g.jsx("p",{className:"text-lg align-middle font-semibold text-gray-500",children:n})]}),Mk=e=>{switch(e){case"small":return{containerStyles:"p-12",titleStyles:"text-sm",descriptionStyles:"text-xs",iconStyles:"p-4 text-xs"};case"normal":return{containerStyles:"p-16",titleStyles:"text-14",descriptionStyles:"text-sm",iconStyles:"p-6 text-md"};default:return{containerStyles:"p-16",titleStyles:"text-14",descriptionStyles:"text-sm",iconStyles:"p-6 text-md"}}},Ok=e=>{switch(e){case"success":return"bg-green-100 text-green-500";case"warning":return"bg-yellow-100 text-yellow-500";case"error":return"bg-red-100 text-red-500";case"informative":return"bg-blue-100 text-blue-500";default:return"bg-blue-100 text-blue-500"}},$k=e=>{switch(e){case"success":return t0;case"warning":return Ui;case"error":return s0;case"informative":return n0;default:return"info"}},_k=({description:e,title:t,showIcon:n=!0,type:r="informative",size:s="normal"})=>{const o=Mk(s),a=$k(r),c=Ok(r);return g.jsx("div",{className:`w-full rounded-xl bg-white border border-blue-100 ${o.containerStyles}`,children:g.jsxs("div",{className:"space-y-8",children:[g.jsxs("div",{className:"flex items-center gap-12",children:[n&&g.jsx(Pe,{icon:a,className:`rounded-full ${o.iconStyles} ${c}`}),g.jsx("h5",{className:`font-semibold text-blue-900 self-center ${o.titleStyles}`,children:t})]}),e&&g.jsx("p",{className:`text-gray-500 leading-[16px] ${o.descriptionStyles}`,children:e})]})})},Ik=[{rotate:"0deg",delay:"0s"},{rotate:"90deg",delay:"0.3s"},{rotate:"270deg",delay:"0.9s"},{rotate:"180deg",delay:"0.6s"}],Dk=({variant:e="circle",size:t=16,color:n="#1DA696",...r})=>{const{className:s="",...o}=r;if(e==="cube"){const d=t/Math.SQRT2;return g.jsx("div",{...o,className:`relative flex items-center justify-center overflow-hidden ${s}`,style:{width:t,height:t},children:g.jsx("div",{className:"relative rotate-45",style:{width:d,height:d},children:Ik.map((h,p)=>g.jsx("div",{className:"float-left w-1/2 h-1/2 relative",style:{transform:`scale(1.1) rotate(${h.rotate})`},children:g.jsx("span",{className:"absolute inset-0 origin-bottom-right animate-sk-fold-cube",style:{backgroundColor:n,animationDelay:h.delay}})},p))})})}const a=Math.max(1,Math.round(t*.125)),c=(t-a)/2,u=2*Math.PI*c;return g.jsx("div",{...o,className:`relative flex items-center justify-center ${s}`,children:g.jsx("svg",{height:t,width:t,className:"animate-spin",children:g.jsx("circle",{stroke:n,fill:"transparent",strokeWidth:a,strokeDasharray:`${u} ${u}`,strokeDashoffset:u/4,r:c,cx:t/2,cy:t/2})})})},Nk=({label:e,control:t,name:n,placeholder:r,className:s="",disabled:o=!1,size:a="md",leftSide:c})=>{const{field:{value:u="",onChange:d,ref:h,onBlur:p},fieldState:{error:m}}=vr.useController({name:n,control:t}),[x,S]=O.useState(!1),{t:b}=Ue(),v={sm:{container:"px-16 py-8",text:"text-sm",label:"text-sm",error:"text-sm",gap:"gap-8"},md:{container:"p-16",text:"text-14",label:"text-14",error:"text-sm",gap:"gap-8"}}[a];return g.jsxs("label",{className:`flex flex-col group select-none ${v.gap} ${o&&"cursor-not-allowed"} ${s}`,htmlFor:n,children:[g.jsx("h6",{className:`text-gray-600 font-600 leading-none group ${m&&"!text-red-500"} ${v.label} ${o&&"text-gray-300"}`,children:e}),g.jsxs("label",{htmlFor:n,className:`
|
|
740
740
|
flex items-center justify-between gap-8 ${v.container}
|
|
741
741
|
|
|
742
742
|
${m&&"!border-red-500"}
|
|
@@ -752,7 +752,7 @@ attempted value: ${a}
|
|
|
752
752
|
group-focus-within:border-blue-500 transition-colors duration-200 ease-in-out
|
|
753
753
|
|
|
754
754
|
group-disabled:bg-gray-500
|
|
755
|
-
`,children:[c&&c,g.jsx("input",{id:n,type:x?"text":"password",autoComplete:"off","aria-autocomplete":"none",name:n,disabled:o,placeholder:r,value:u,onChange:A=>d(A.target.value),onBlur:p,ref:h,className:`group bg-transparent w-full h-full font-600 placeholder:font-600 select-text ${v.text} disabled:text-gray-300 disabled:placeholder:text-gray-300 placeholder:text-gray-400 disabled:cursor-not-allowed overflow-visible outline-none`}),g.jsx(Pe,{icon:x?u5:a5,className:"min-h-16 max-h-16 text-gray-400 hover:text-gray-500 transition-colors duration-150 cursor-pointer ease-in-out",onClick:()=>S(!x)})]}),(m==null?void 0:m.message)&&g.jsx("h4",{className:`font-500 text-red-500 leading-none ${v.error}`,children:b(m.message,{x:b(n)})})]})},kk=({name:e,control:t,label:n="phone_number",placeholder:r="enter_phone_number",language:s="en",className:o="",translateKey:a,countries:c=M2})=>{var Ts,vl,Br,bl;const{t:u}=Ue(),{field:d,fieldState:h}=vr.useController({name:e,control:t,rules:{validate:{}}}),p=((Ts=d.value)==null?void 0:Ts.split(" "))||[],m=p[0]||null,x=p[1]||"",S=c.find(ve=>m===ve.phone),[b,T]=O.useState(!1),[v,A]=O.useState(""),[C,I]=O.useState(S||null),[P,D]=O.useState(x),[R,F]=O.useState(!1),W=O.useRef(null),Q=O.useRef(null),ee=O.useRef(null),ae=O.useRef(null),{x:ge,y:de,strategy:le,refs:ue,context:Y,placement:z,middlewareData:K}=ir({open:b,onOpenChange:T,middleware:[er(8),nr(),tr({padding:8}),Rr({apply({availableHeight:ve,elements:Ze}){Object.assign(Ze.floating.style,{maxHeight:`${Math.min(ve-10,300)}px`})},padding:8}),ms({element:Q})],placement:"bottom-start",whileElementsMounted:Qn}),$=rr(Y),k=sr(Y),{getReferenceProps:X,getFloatingProps:U}=or([$,k]),{isMounted:re,styles:B}=ar(Y,{duration:{open:200,close:150},initial:{opacity:0,transform:"translateY(-4px)"}}),oe=(Array.isArray(c)?c:[]).filter(ve=>{if(!v.trim())return!0;const Ze=s==="es"&&ve.labelES?ve.labelES.toLowerCase():ve.label.toLowerCase(),Pt=ve.code?ve.code.toLowerCase():"",xn=ve.phone?ve.phone.toLowerCase():"";return Ze.includes(v.toLowerCase())||Pt.includes(v.toLowerCase())||xn.includes(v.toLowerCase())}),se=ve=>{I(ve),T(!1),A("");const Ze=`${ve.phone} ${P}`;d.onChange(Ze),setTimeout(()=>{var Pt;(Pt=ee.current)==null||Pt.focus()},100)},fe=ve=>{const Ze=ve.target.value;if(D(Ze),C){const Pt=`${C.phone} ${Ze}`;d.onChange(Pt)}},Ee=()=>{T(!b),!b&&W.current&&setTimeout(()=>{var ve;(ve=W.current)==null||ve.focus()},100)},Ve=()=>{setTimeout(()=>{b||d.onBlur()},200)},ie=()=>{F(!0)},me=()=>{F(!1)};O.useEffect(()=>{if(d.value){const ve=d.value.split(" "),Ze=ve[0]||"",Pt=ve[1]||"",xn=c.find(cr=>cr.phone===Ze);xn&&I(xn),D(Pt)}},[d.value,c]),O.useEffect(()=>{const ve=Ze=>{ae.current&&!ae.current.contains(Ze.target)&&d.onBlur()};return document.addEventListener("mousedown",ve),()=>{document.removeEventListener("mousedown",ve)}},[d]);const De=ve=>{var Ze;return ve?ve.codeISO2?ve.codeISO2.toLowerCase():((Ze=ve.code)==null?void 0:Ze.toLowerCase())||"":""},ft=(vl=K.arrow)==null?void 0:vl.x,ws=(Br=K.arrow)==null?void 0:Br.y,dt={top:"bottom",right:"left",bottom:"top",left:"right"}[z.split("-")[0]],yl=X({onClick:Ee,onBlur:Ve}),xl=()=>h.error?"border-red-500":R||b?"border-blue-400":"border-blue-100",Ss=u(n),qt=u(r),yn=(bl=h.error)==null?void 0:bl.message;return g.jsxs("div",{className:`w-full relative flex flex-col gap-8 ${o}`,children:[g.jsx("label",{className:`text-gray-600 font-600 group ${yn&&"!text-red-500"} text-label`,children:Ss}),g.jsxs("div",{ref:ae,className:"flex items-center w-full",onMouseEnter:ie,onMouseLeave:me,children:[g.jsxs("div",{ref:ue.setReference,className:`flex items-center justify-between text-lg max-w-120 font-600 bg-light rounded-l-full p-16 cursor-pointer border border-r-0 transition-all duration-200 ${yn?"border-red-500":xl()}`,style:{minWidth:"140px"},...yl,tabIndex:0,children:[C!=null&&C.code?g.jsxs("div",{className:"flex items-center truncate",children:[De(C)&&g.jsx("img",{loading:"lazy",width:"24",height:"16",className:"mr-2",src:`https://flagcdn.com/w20/${De(C)}.png`,srcSet:`https://flagcdn.com/w40/${De(C)}.png 2x`,alt:C.label,onError:ve=>{ve.currentTarget.style.display="none"}}),g.jsxs("span",{children:["+",C.phone]})]}):g.jsx("span",{className:"text-gray-400 font-600 text-body-m truncate",children:u("select_country")}),g.jsx(Pe,{icon:r0,className:"w-14 h-14 min-w-14 min-h-14"})]}),g.jsx("input",{ref:ee,type:"tel",className:`placeholder:text-gray-400 flex-grow bg-light rounded-r-full font-600 text-body-m p-16 border transition-all duration-200 ${yn?"border-red-500":xl()}`,placeholder:qt,value:P,onChange:fe,onBlur:Ve})]}),yn&&g.jsx("p",{className:"mt-1 text-sm text-red-600",children:u(yn,{x:u(a||"")||e})}),re&&g.jsxs("div",{ref:ue.setFloating,style:{position:le,top:de??0,left:ge??0,...B},className:"z-10 w-fit bg-white border border-blue-400 rounded-3xl shadow-lg overflow-auto max-w-120",...U(),children:[g.jsx("div",{ref:Q,className:"absolute w-4 h-4 bg-white rotate-45 border-blue-400",style:{left:ft!=null?`${ft}px`:"",top:ws!=null?`${ws}px`:"",right:"",bottom:"",[dt]:"-2px",borderRight:dt==="left"?"1px solid":"none",borderBottom:dt==="top"?"1px solid":"none",borderLeft:dt==="right"?"1px solid":"none",borderTop:dt==="bottom"?"1px solid":"none"}}),g.jsx("div",{className:"sticky top-0 bg-white p-2 z-20 w-fit",children:g.jsx("input",{ref:W,type:"text",className:"w-fit p-16",placeholder:u("search")+"...",value:v,onChange:ve=>A(ve.target.value),onClick:ve=>ve.stopPropagation(),onBlur:ve=>{ve.stopPropagation()},autoFocus:!0})}),g.jsx("div",{children:oe.length>0?g.jsx("ul",{className:"flex flex-col",children:oe.map((ve,Ze)=>{var xn;const Pt=ve.codeISO2?ve.codeISO2.toLowerCase():((xn=ve.code)==null?void 0:xn.toLowerCase())||"";return g.jsxs("li",{className:"flex items-center justify-between gap-10 px-16 py-8 transition-all duration-200 hover:bg-blue-100/50 cursor-pointer",onClick:cr=>{cr.stopPropagation(),se(ve)},children:[Pt&&g.jsx("img",{loading:"lazy",width:"24",height:"16",className:"mr-2",src:`https://flagcdn.com/w20/${Pt}.png`,srcSet:`https://flagcdn.com/w40/${Pt}.png 2x`,alt:ve.label,onError:cr=>{cr.currentTarget.style.display="none"}}),g.jsxs("span",{className:"text-gray-500",children:["+",ve.phone]})]},`${ve.code}-${Ze}`)})}):g.jsx("div",{className:"px-16 py-8 text-gray-500 text-body-s",children:u("no_countries_found")})})]})]})},jk={bgColor:"bg-blue-100",fillColor:"bg-blue-500"},Lk={bgColor:"bg-aqua-100",fillColor:"bg-aqua-500"},Rk=e=>{switch(e){case"aqua":return Lk;case"blue":default:return jk}},Fk=({progress:e,showPercentage:t=!1,color:n,className:r="",...s})=>{const{defaultColorScheme:o}=Ue(),a=n||o,{bgColor:c,fillColor:u}=Rk(a),d=Math.min(Math.max(e,0),100);return g.jsxs("div",{className:`flex items-center gap-12 ${r}`,...s,children:[g.jsx("div",{className:`w-full h-8 ${c} rounded-full`,children:g.jsx("div",{className:`h-full ${u} rounded-full transition-all duration-300 ease-in-out`,style:{width:`${d}%`}})}),t&&g.jsxs("span",{className:"text-sm text-gray-400 font-500",children:[d,"%"]})]})},Vk=()=>{const[e,t]=O.useState(!1),n=O.useRef(null),r=()=>{t(!0),setTimeout(()=>{var o;return(o=n.current)==null?void 0:o.focus()},100)},s=()=>{t(!1)};return g.jsx("div",{className:"relative flex items-center",children:g.jsxs("div",{className:`flex items-center justify-center bg-white shadow-md rounded-full transition-all duration-300 ease-in-out ${e?"w-[200px] h-[40px]":"size-[40px]"}`,children:[g.jsx("button",{onClick:r,className:"size-[40px] flex items-center justify-center rounded-full hover:bg-gray-100 transition-all",children:g.jsx(Pe,{icon:GD})}),g.jsx("input",{ref:n,type:"text",className:`w-full outline-none bg-transparent transition-all ${e?"w-full pr-[10px]":"w-0"}`,placeholder:"Buscar...",onBlur:s,style:{border:"none",outline:"none"}})]})})},Bk="w-fit transition-colors ease-in-out duration-200 flex items-center justify-center gap-12 px-24 py-7 text-base rounded-full font-600 bg-transparent",Wk={true:"bg-blue-100 text-blue-500 hover:bg-blue-100/80 active:bg-blue-100/50 !bg-blue-100",false:"text-gray-800 hover:bg-blue-100/40 hover:text-blue-500 active:bg-blue-100/20 active:text-blue-500"},Uk={true:"bg-aqua-100 text-aqua-500 hover:bg-aqua-100/80 active:bg-aqua-100/50 !bg-aqua-100",false:"text-gray-800 hover:bg-aqua-100/40 hover:text-aqua-500 active:bg-aqua-100/20 active:text-aqua-500"},zk=(e=!1,t="blue")=>{const n=String(e);let r;switch(t){case"aqua":r=Uk[n];break;case"blue":default:r=Wk[n];break}return Ln(Bk,r)},Gk=({label:e,href:t,onClick:n,active:r=!1,disabled:s=!1,className:o,icon:a,color:c})=>{const{defaultColorScheme:u}=Ue(),d=c||u,h=m=>{if(s){m.preventDefault();return}n==null||n(m)},p=`${zk(r,d)} ${s?"!text-gray-300 cursor-not-allowed !bg-transparent":""}`;return t?g.jsxs("a",{href:t,className:`${p} ${o||""}`,onClick:h,"aria-disabled":s,children:[a&&g.jsx(Pe,{icon:a,className:Do()}),e]}):g.jsxs("button",{className:`${p} ${o||""}`,onClick:h,disabled:s,children:[a&&g.jsx(Pe,{icon:a,className:Do()}),e]})},Yk="w-fit transition-colors group ease-in-out duration-200 flex flex-col items-center justify-center gap-12 text-base font-600",Hk={true:"text-blue-500 hover:text-blue-500",false:"text-gray-800 hover:text-blue-500"},qk={true:"text-aqua-500 hover:text-aqua-500",false:"text-gray-800 hover:text-aqua-500"},Kk="flex h-32 w-32 items-center justify-center transition-colors ease-in-out duration-200 rounded-full",Xk={true:"text-blue-500 bg-blue-100 rounded-full",false:"text-gray-800 hover:text-blue-500 active:text-blue-500 group-hover:bg-blue-100 group-hover:text-blue-500"},Zk={true:"text-aqua-500 bg-aqua-100 rounded-full",false:"text-gray-800 hover:text-aqua-500 active:text-aqua-500 group-hover:bg-aqua-100 group-hover:text-aqua-500"},O2=(e=!1,t="blue")=>{const n=String(e);let r;switch(t){case"blue":r=Xk[n];break;case"aqua":default:r=Zk[n];break}return Ln(Kk,r)},Jk=(e=!1,t="blue")=>{const n=String(e);let r;switch(t){case"aqua":r=qk[n];break;case"blue":default:r=Hk[n];break}return Ln(Yk,r)},Qk=({label:e,href:t,onClick:n,active:r=!1,disabled:s=!1,className:o,icon:a,color:c})=>{const{defaultColorScheme:u}=Ue(),d=c||u,h=m=>{if(s){m.preventDefault();return}n==null||n(m)},p=`${Jk(r,d)} ${s?"!text-gray-300 cursor-not-allowed !bg-transparent":""}`;return t?g.jsxs("a",{href:t,className:`${p} ${o||""}`,onClick:h,"aria-disabled":s,children:[a&&g.jsx("div",{className:O2(r,d),children:g.jsx(Pe,{icon:a,className:"size-16 max-h-16 max-w-16"})}),e]}):g.jsxs("button",{className:`${p} ${o||""}`,onClick:h,disabled:s,children:[a&&g.jsx("div",{className:O2(r,d),children:g.jsx(Pe,{icon:a,className:"size-16 max-h-16 max-w-16"})}),e]})},ej=e=>{const{display:t,...n}=e;return t==="desktop"?g.jsx(Gk,{...n}):t==="mobile"?g.jsx(Qk,{...n}):null},tj=({options:e,name:t,control:n,label:r="",placeholder:s="Type to search...",className:o="",input:a=!0,dropdownStyle:c={},innerClassName:u="",showChevron:d=!0,size:h="md"})=>{const{field:{value:p,onChange:m},fieldState:{error:x}}=vr.useController({name:t,control:n});return g.jsx(nj,{options:e,value:p,onChange:m,label:r,placeholder:s,error:x==null?void 0:x.message,className:o,input:a,dropdownStyle:c,innerClassName:u,showChevron:d,size:h})},nj=({options:e,value:t,onChange:n,label:r="Select an option",placeholder:s="Type to search...",error:o,input:a=!0,className:c="",dropdownStyle:u={},innerClassName:d="",showChevron:h=!0,size:p="md"})=>{var X;const{t:m}=Ue(),[x,S]=O.useState(!1),[b,T]=O.useState(""),[v,A]=O.useState(t||null),C=O.useRef(null),I=O.useRef(null),D={sm:{container:"px-16 py-8",text:"text-14",label:"text-14",error:"text-sm",gap:"gap-8",icon:"w-12 h-12"},md:{container:"p-16",text:"text-body-m",label:"text-body-m",error:"text-sm",gap:"gap-8",icon:"w-16 h-16"}}[p],{x:R,y:F,strategy:W,refs:Q,context:ee}=ir({open:x,onOpenChange:S,middleware:[er(8),nr(),tr({padding:8}),Rr({apply({availableHeight:U,elements:re}){Object.assign(re.floating.style,{maxHeight:`${Math.min(U-10,300)}px`})},padding:8}),ms({element:I})],placement:"bottom-start",whileElementsMounted:Qn}),ae=rr(ee),ge=sr(ee),{getReferenceProps:de,getFloatingProps:le}=or([ae,ge]),{isMounted:ue,styles:Y}=ar(ee,{duration:{open:200,close:150},initial:{opacity:0,transform:"translateY(-4px)"}}),z=(()=>{const U=Array.isArray(e)?e:[];if(!b.trim())return U;const re=b.toLowerCase();return U.filter(B=>B.label.toLowerCase().includes(re)||B.key.toLowerCase().includes(re))})(),K=U=>{A(U),S(!1),T(""),n(U)},$=()=>{S(!x),!x&&C.current&&setTimeout(()=>{var U;return(U=C.current)==null?void 0:U.focus()},100)};O.useEffect(()=>{A(t)},[t]);const k=de({onClick:$});return g.jsxs("div",{className:`relative flex flex-col ${D.gap} ${c}`,children:[r&&g.jsx("h6",{className:`text-gray-600 font-600 leading-none ${o?"!text-red-500":""} ${D.label}`,children:r}),g.jsxs("div",{ref:Q.setReference,className:`${d} flex items-center justify-between bg-light rounded-full border transition-all duration-200
|
|
755
|
+
`,children:[c&&c,g.jsx("input",{id:n,type:x?"text":"password",autoComplete:"off","aria-autocomplete":"none",name:n,disabled:o,placeholder:r,value:u,onChange:A=>d(A.target.value),onBlur:p,ref:h,className:`group bg-transparent w-full h-full font-600 placeholder:font-600 select-text ${v.text} disabled:text-gray-300 disabled:placeholder:text-gray-300 placeholder:text-gray-400 disabled:cursor-not-allowed overflow-visible outline-none`}),g.jsx(Pe,{icon:x?u5:a5,className:"min-h-16 max-h-16 text-gray-400 hover:text-gray-500 transition-colors duration-150 cursor-pointer ease-in-out",onClick:()=>S(!x)})]}),(m==null?void 0:m.message)&&g.jsx("h4",{className:`font-500 text-red-500 leading-none ${v.error}`,children:b(m.message,{x:b(n)})})]})},kk=({name:e,control:t,label:n="phone_number",placeholder:r="enter_phone_number",language:s="en",className:o="",translateKey:a,countries:c=M2})=>{var Ts,vl,Br,bl;const{t:u}=Ue(),{field:d,fieldState:h}=vr.useController({name:e,control:t,rules:{validate:{}}}),p=((Ts=d.value)==null?void 0:Ts.split(" "))||[],m=p[0]||null,x=p[1]||"",S=c.find(ve=>m===ve.phone),[b,T]=O.useState(!1),[v,A]=O.useState(""),[C,I]=O.useState(S||null),[P,D]=O.useState(x),[R,F]=O.useState(!1),W=O.useRef(null),Q=O.useRef(null),ee=O.useRef(null),ae=O.useRef(null),{x:ge,y:de,strategy:le,refs:ue,context:Y,placement:z,middlewareData:K}=ir({open:b,onOpenChange:T,middleware:[er(8),nr(),tr({padding:8}),Rr({apply({availableHeight:ve,elements:Ze}){Object.assign(Ze.floating.style,{maxHeight:`${Math.min(ve-10,300)}px`})},padding:8}),ms({element:Q})],placement:"bottom-start",whileElementsMounted:Qn}),$=rr(Y),k=sr(Y),{getReferenceProps:X,getFloatingProps:U}=or([$,k]),{isMounted:re,styles:B}=ar(Y,{duration:{open:200,close:150},initial:{opacity:0,transform:"translateY(-4px)"}}),oe=(Array.isArray(c)?c:[]).filter(ve=>{if(!v.trim())return!0;const Ze=s==="es"&&ve.labelES?ve.labelES.toLowerCase():ve.label.toLowerCase(),Pt=ve.code?ve.code.toLowerCase():"",xn=ve.phone?ve.phone.toLowerCase():"";return Ze.includes(v.toLowerCase())||Pt.includes(v.toLowerCase())||xn.includes(v.toLowerCase())}),se=ve=>{I(ve),T(!1),A("");const Ze=`${ve.phone} ${P}`;d.onChange(Ze),setTimeout(()=>{var Pt;(Pt=ee.current)==null||Pt.focus()},100)},fe=ve=>{const Ze=ve.target.value;if(D(Ze),C){const Pt=`${C.phone} ${Ze}`;d.onChange(Pt)}},Ee=()=>{T(!b),!b&&W.current&&setTimeout(()=>{var ve;(ve=W.current)==null||ve.focus()},100)},Ve=()=>{setTimeout(()=>{b||d.onBlur()},200)},ie=()=>{F(!0)},me=()=>{F(!1)};O.useEffect(()=>{if(d.value){const ve=d.value.split(" "),Ze=ve[0]||"",Pt=ve[1]||"",xn=c.find(cr=>cr.phone===Ze);xn&&I(xn),D(Pt)}},[d.value,c]),O.useEffect(()=>{const ve=Ze=>{ae.current&&!ae.current.contains(Ze.target)&&d.onBlur()};return document.addEventListener("mousedown",ve),()=>{document.removeEventListener("mousedown",ve)}},[d]);const De=ve=>{var Ze;return ve?ve.codeISO2?ve.codeISO2.toLowerCase():((Ze=ve.code)==null?void 0:Ze.toLowerCase())||"":""},ft=(vl=K.arrow)==null?void 0:vl.x,ws=(Br=K.arrow)==null?void 0:Br.y,dt={top:"bottom",right:"left",bottom:"top",left:"right"}[z.split("-")[0]],yl=X({onClick:Ee,onBlur:Ve}),xl=()=>h.error?"border-red-500":R||b?"border-blue-400":"border-blue-100",Ss=u(n),qt=u(r),yn=(bl=h.error)==null?void 0:bl.message;return g.jsxs("div",{className:`w-full relative flex flex-col gap-8 ${o}`,children:[g.jsx("label",{className:`text-gray-600 font-600 group ${yn&&"!text-red-500"} text-label`,children:Ss}),g.jsxs("div",{ref:ae,className:"flex items-center w-full",onMouseEnter:ie,onMouseLeave:me,children:[g.jsxs("div",{ref:ue.setReference,className:`flex items-center justify-between text-lg max-w-120 font-600 bg-light rounded-l-full p-16 cursor-pointer border border-r-0 transition-all duration-200 ${yn?"border-red-500":xl()}`,style:{minWidth:"140px"},...yl,tabIndex:0,children:[C!=null&&C.code?g.jsxs("div",{className:"flex items-center truncate",children:[De(C)&&g.jsx("img",{loading:"lazy",width:"24",height:"16",className:"mr-2",src:`https://flagcdn.com/w20/${De(C)}.png`,srcSet:`https://flagcdn.com/w40/${De(C)}.png 2x`,alt:C.label,onError:ve=>{ve.currentTarget.style.display="none"}}),g.jsxs("span",{children:["+",C.phone]})]}):g.jsx("span",{className:"text-gray-400 font-600 text-body-m truncate",children:u("select_country")}),g.jsx(Pe,{icon:r0,className:"w-14 h-14 min-w-14 min-h-14"})]}),g.jsx("input",{ref:ee,type:"tel",className:`placeholder:text-gray-400 flex-grow bg-light rounded-r-full font-600 text-body-m p-16 border transition-all duration-200 ${yn?"border-red-500":xl()}`,placeholder:qt,value:P,onChange:fe,onBlur:Ve})]}),yn&&g.jsx("p",{className:"mt-1 text-sm text-red-600",children:u(yn,{x:u(a||"")||e})}),re&&g.jsxs("div",{ref:ue.setFloating,style:{position:le,top:de??0,left:ge??0,...B},className:"z-10 w-fit bg-white border border-blue-400 rounded-3xl shadow-lg overflow-auto max-w-120",...U(),children:[g.jsx("div",{ref:Q,className:"absolute w-4 h-4 bg-white rotate-45 border-blue-400",style:{left:ft!=null?`${ft}px`:"",top:ws!=null?`${ws}px`:"",right:"",bottom:"",[dt]:"-2px",borderRight:dt==="left"?"1px solid":"none",borderBottom:dt==="top"?"1px solid":"none",borderLeft:dt==="right"?"1px solid":"none",borderTop:dt==="bottom"?"1px solid":"none"}}),g.jsx("div",{className:"sticky top-0 bg-white p-2 z-20 w-fit",children:g.jsx("input",{ref:W,type:"text",className:"w-fit p-16",placeholder:u("search")+"...",value:v,onChange:ve=>A(ve.target.value),onClick:ve=>ve.stopPropagation(),onBlur:ve=>{ve.stopPropagation()},autoFocus:!0})}),g.jsx("div",{children:oe.length>0?g.jsx("ul",{className:"flex flex-col",children:oe.map((ve,Ze)=>{var xn;const Pt=ve.codeISO2?ve.codeISO2.toLowerCase():((xn=ve.code)==null?void 0:xn.toLowerCase())||"";return g.jsxs("li",{className:"flex items-center justify-between gap-10 px-16 py-8 transition-all duration-200 hover:bg-blue-100/50 cursor-pointer",onClick:cr=>{cr.stopPropagation(),se(ve)},children:[Pt&&g.jsx("img",{loading:"lazy",width:"24",height:"16",className:"mr-2",src:`https://flagcdn.com/w20/${Pt}.png`,srcSet:`https://flagcdn.com/w40/${Pt}.png 2x`,alt:ve.label,onError:cr=>{cr.currentTarget.style.display="none"}}),g.jsxs("span",{className:"text-gray-500",children:["+",ve.phone]})]},`${ve.code}-${Ze}`)})}):g.jsx("div",{className:"px-16 py-8 text-gray-500 text-body-s",children:u("no_countries_found")})})]})]})},jk={bgColor:"bg-blue-100",fillColor:"bg-blue-500"},Lk={bgColor:"bg-aqua-100",fillColor:"bg-aqua-500"},Rk=e=>{switch(e){case"aqua":return Lk;case"blue":default:return jk}},Fk=({progress:e,showPercentage:t=!1,color:n,className:r="",...s})=>{const{defaultColorScheme:o}=Ue(),a=n||o,{bgColor:c,fillColor:u}=Rk(a),d=Math.min(Math.max(e,0),100);return g.jsxs("div",{className:`flex items-center gap-12 ${r}`,...s,children:[g.jsx("div",{className:`w-full h-8 ${c} rounded-full`,children:g.jsx("div",{className:`h-full ${u} rounded-full transition-all duration-300 ease-in-out`,style:{width:`${d}%`}})}),t&&g.jsxs("span",{className:"text-sm text-gray-400 font-500",children:[d,"%"]})]})},Vk=()=>{const[e,t]=O.useState(!1),n=O.useRef(null),r=()=>{t(!0),setTimeout(()=>{var o;return(o=n.current)==null?void 0:o.focus()},100)},s=()=>{t(!1)};return g.jsx("div",{className:"relative flex items-center",children:g.jsxs("div",{className:`flex items-center justify-center bg-white shadow-md rounded-full transition-all duration-300 ease-in-out ${e?"w-[200px] h-[40px]":"size-[40px]"}`,children:[g.jsx("button",{onClick:r,className:"size-[40px] flex items-center justify-center rounded-full hover:bg-gray-100 transition-all",children:g.jsx(Pe,{icon:GD})}),g.jsx("input",{ref:n,type:"text",className:`w-full outline-none bg-transparent transition-all ${e?"w-full pr-[10px]":"w-0"}`,placeholder:"Buscar...",onBlur:s,style:{border:"none",outline:"none"}})]})})},Bk="w-fit transition-colors ease-in-out duration-200 flex items-center justify-center gap-12 px-24 py-7 text-base rounded-full font-600 bg-transparent",Wk={true:"bg-blue-100 text-blue-500 hover:bg-blue-100/80 active:bg-blue-100/50 !bg-blue-100",false:"text-gray-800 hover:bg-blue-100/40 hover:text-blue-500 active:bg-blue-100/20 active:text-blue-500"},Uk={true:"bg-aqua-100 text-aqua-500 hover:bg-aqua-100/80 active:bg-aqua-100/50 !bg-aqua-100",false:"text-gray-800 hover:bg-aqua-100/40 hover:text-aqua-500 active:bg-aqua-100/20 active:text-aqua-500"},zk=(e=!1,t="blue")=>{const n=String(e);let r;switch(t){case"aqua":r=Uk[n];break;case"blue":default:r=Wk[n];break}return Ln(Bk,r)},Gk=({label:e,href:t,onClick:n,active:r=!1,disabled:s=!1,className:o,icon:a,color:c})=>{const{defaultColorScheme:u}=Ue(),d=c||u,h=m=>{if(s){m.preventDefault();return}n==null||n(m)},p=`${zk(r,d)} ${s?"!text-gray-300 cursor-not-allowed !bg-transparent":""}`;return t?g.jsxs("a",{href:t,className:`${p} ${o||""}`,onClick:h,"aria-disabled":s,children:[a&&g.jsx(Pe,{icon:a,className:Do()}),e]}):g.jsxs("button",{className:`${p} ${o||""}`,onClick:h,disabled:s,children:[a&&g.jsx(Pe,{icon:a,className:Do()}),e]})},Yk="w-fit transition-colors group ease-in-out duration-200 flex flex-col items-center justify-center gap-12 text-base font-600",Hk={true:"text-blue-500 hover:text-blue-500",false:"text-gray-800 hover:text-blue-500"},qk={true:"text-aqua-500 hover:text-aqua-500",false:"text-gray-800 hover:text-aqua-500"},Kk="flex h-32 w-32 items-center justify-center transition-colors ease-in-out duration-200 rounded-full",Xk={true:"text-blue-500 bg-blue-100 rounded-full",false:"text-gray-800 hover:text-blue-500 active:text-blue-500 group-hover:bg-blue-100 group-hover:text-blue-500"},Zk={true:"text-aqua-500 bg-aqua-100 rounded-full",false:"text-gray-800 hover:text-aqua-500 active:text-aqua-500 group-hover:bg-aqua-100 group-hover:text-aqua-500"},O2=(e=!1,t="blue")=>{const n=String(e);let r;switch(t){case"blue":r=Xk[n];break;case"aqua":default:r=Zk[n];break}return Ln(Kk,r)},Jk=(e=!1,t="blue")=>{const n=String(e);let r;switch(t){case"aqua":r=qk[n];break;case"blue":default:r=Hk[n];break}return Ln(Yk,r)},Qk=({label:e,href:t,onClick:n,active:r=!1,disabled:s=!1,className:o,icon:a,color:c})=>{const{defaultColorScheme:u}=Ue(),d=c||u,h=m=>{if(s){m.preventDefault();return}n==null||n(m)},p=`${Jk(r,d)} ${s?"!text-gray-300 cursor-not-allowed !bg-transparent":""}`;return t?g.jsxs("a",{href:t,className:`${p} ${o||""}`,onClick:h,"aria-disabled":s,children:[a&&g.jsx("div",{className:O2(r,d),children:g.jsx(Pe,{icon:a,className:"size-16 max-h-16 max-w-16"})}),e]}):g.jsxs("button",{className:`${p} ${o||""}`,onClick:h,disabled:s,children:[a&&g.jsx("div",{className:O2(r,d),children:g.jsx(Pe,{icon:a,className:"size-16 max-h-16 max-w-16"})}),e]})},ej=e=>{const{display:t,...n}=e;return t==="desktop"?g.jsx(Gk,{...n}):t==="mobile"?g.jsx(Qk,{...n}):null},tj=({options:e,name:t,control:n,label:r="",placeholder:s="Type to search...",className:o="",input:a=!0,dropdownStyle:c={},innerClassName:u="",showChevron:d=!0,size:h="md"})=>{const{field:{value:p,onChange:m},fieldState:{error:x}}=vr.useController({name:t,control:n});return g.jsx(nj,{options:e,value:p,onChange:m,label:r,placeholder:s,error:x==null?void 0:x.message,className:o,input:a,dropdownStyle:c,innerClassName:u,showChevron:d,size:h})},nj=({options:e,value:t,onChange:n,label:r="Select an option",placeholder:s="Type to search...",error:o,input:a=!0,className:c="",dropdownStyle:u={},innerClassName:d="",showChevron:h=!0,size:p="md"})=>{var X;const{t:m}=Ue(),[x,S]=O.useState(!1),[b,T]=O.useState(""),[v,A]=O.useState(t||null),C=O.useRef(null),I=O.useRef(null),D={sm:{container:"px-16 py-8",text:"text-sm",label:"text-sm",error:"text-sm",gap:"gap-8",icon:"w-12 h-12"},md:{container:"p-16",text:"text-14",label:"text-14",error:"text-sm",gap:"gap-8",icon:"w-16 h-16"}}[p],{x:R,y:F,strategy:W,refs:Q,context:ee}=ir({open:x,onOpenChange:S,middleware:[er(8),nr(),tr({padding:8}),Rr({apply({availableHeight:U,elements:re}){Object.assign(re.floating.style,{maxHeight:`${Math.min(U-10,300)}px`})},padding:8}),ms({element:I})],placement:"bottom-start",whileElementsMounted:Qn}),ae=rr(ee),ge=sr(ee),{getReferenceProps:de,getFloatingProps:le}=or([ae,ge]),{isMounted:ue,styles:Y}=ar(ee,{duration:{open:200,close:150},initial:{opacity:0,transform:"translateY(-4px)"}}),z=(()=>{const U=Array.isArray(e)?e:[];if(!b.trim())return U;const re=b.toLowerCase();return U.filter(B=>B.label.toLowerCase().includes(re)||B.key.toLowerCase().includes(re))})(),K=U=>{A(U),S(!1),T(""),n(U)},$=()=>{S(!x),!x&&C.current&&setTimeout(()=>{var U;return(U=C.current)==null?void 0:U.focus()},100)};O.useEffect(()=>{A(t)},[t]);const k=de({onClick:$});return g.jsxs("div",{className:`relative flex flex-col ${D.gap} ${c}`,children:[r&&g.jsx("h6",{className:`text-gray-600 font-600 leading-none ${o?"!text-red-500":""} ${D.label}`,children:r}),g.jsxs("div",{ref:Q.setReference,className:`${d} flex items-center justify-between bg-light rounded-full border transition-all duration-200
|
|
756
756
|
${D.container} cursor-pointer hover:border-blue-400
|
|
757
757
|
${o?"border-red-500 hover:border-red-600":""}
|
|
758
758
|
${x?"border-blue-400":"border-blue-100"}`,...k,children:[g.jsx("div",{className:"flex items-center w-full overflow-hidden",children:g.jsx("span",{className:`flex-grow font-600 truncate ${D.text} ${v?"":"text-gray-400"}`,children:m(v?v.label:s)})}),h&&g.jsx("svg",{className:`${D.icon} transition-transform ${x?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M19 9l-7 7-7-7"})})]}),o&&g.jsx("p",{className:`font-500 text-red-500 leading-none ${D.error}`,children:o}),ue&&g.jsxs("div",{ref:Q.setFloating,style:{position:W,top:F??0,left:R??0,...Y,width:(X=Q.reference.current)==null?void 0:X.clientWidth,zIndex:50,...u},className:"bg-white border border-blue-400 rounded-3xl shadow-lg overflow-hidden",...le(),children:[a&&g.jsx("div",{className:"sticky top-0 bg-white p-8 border-b border-gray-100 z-20",children:g.jsxs("div",{className:"relative",children:[g.jsx("div",{className:"absolute inset-y-0 left-0 pl-12 flex items-center pointer-events-none",children:g.jsx("svg",{className:"h-16 w-16 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}),g.jsx("input",{ref:C,type:"text",className:"w-full py-8 pl-40 pr-12 rounded-full focus:outline-none text-body-s",placeholder:m("search_options"),value:b,onChange:U=>T(U.target.value),onClick:U=>U.stopPropagation(),autoFocus:!0})]})}),g.jsx("div",{className:"max-h-[250px] overflow-y-auto",children:z.length>0?g.jsx("ul",{className:"py-4",children:z.map((U,re)=>g.jsx("li",{className:`flex items-center px-16 py-10 transition-all duration-200 hover:bg-blue-50 cursor-pointer
|
|
@@ -770,7 +770,7 @@ attempted value: ${a}
|
|
|
770
770
|
${!e&&"text-gray-500"}
|
|
771
771
|
opacity-0 capitalize
|
|
772
772
|
${s&&"translate-x-0 opacity-100 !w-full !h-auto ml-8"}
|
|
773
|
-
${e&&d}`,children:n})]})},aj="flex w-full h-full gap-12 px-10 py-6 items-center justify-center",lj={default:"flex-row rounded-full text-blue-500",underline:"flex-col border-b-[1.3px] px-24 pb-16 text-gray-700"},cj={true:"text-blue-500 border-b-blue-500",false:"text-gray-700 border-b-gray-700"},uj=(e="underline",t=!1)=>Ln(aj,lj[e],cj[String(t)]),$2=({label:e,icon:t,isSelected:n,onClick:r,variant:s="default",direction:o="row",labelClassName:a=""})=>g.jsxs("button",{className:`${uj(s,n)} w-full cursor-pointer transition-all duration-200 ${o==="row"&&"flex-row!"}`,onClick:r,children:[t&&g.jsx(Pe,{icon:t,className:`${n?"text-blue-500":"text-gray-500"} w-20 h-20`}),g.jsx("span",{className:Ln("text-lg font-500",a),children:e})]}),fj="transition-colors ease-in-out duration-200 flex items-center justify-center text-body-m rounded-full w-fit font-600 leading-normal disabled:cursor-not-allowed disabled:text-gray-300",dj={blue:"text-blue-500 hover:text-blue-600 active:text-blue-700",aqua:"text-aqua-500 hover:text-aqua-600 active:text-aqua-700",red:"text-red-500 hover:text-red-600 active:text-red-700",gray:"text-gray-500 hover:text-gray-600 active:text-gray-700"},hj=(e="blue")=>Ln(fj,dj[e]),_2=({color:e,children:t,className:n,...r})=>{const{defaultColorScheme:s}=Ue(),o=e||s;return g.jsx("button",{type:"button",className:hj(o)+" "+n,...r,children:t})},pj=({label:e,control:t,name:n,placeholder:r,className:s="",disabled:o=!1,leftSide:a,rightSide:c,translateKey:u="",size:d="md",...h})=>{const{field:{value:p="",onChange:m,ref:x,onBlur:S},fieldState:{error:b}}=vr.useController({name:n,control:t}),{t:T}=Ue(),A={sm:{container:"px-16 py-8",text:"text-
|
|
773
|
+
${e&&d}`,children:n})]})},aj="flex w-full h-full gap-12 px-10 py-6 items-center justify-center",lj={default:"flex-row rounded-full text-blue-500",underline:"flex-col border-b-[1.3px] px-24 pb-16 text-gray-700"},cj={true:"text-blue-500 border-b-blue-500",false:"text-gray-700 border-b-gray-700"},uj=(e="underline",t=!1)=>Ln(aj,lj[e],cj[String(t)]),$2=({label:e,icon:t,isSelected:n,onClick:r,variant:s="default",direction:o="row",labelClassName:a=""})=>g.jsxs("button",{className:`${uj(s,n)} w-full cursor-pointer transition-all duration-200 ${o==="row"&&"flex-row!"}`,onClick:r,children:[t&&g.jsx(Pe,{icon:t,className:`${n?"text-blue-500":"text-gray-500"} w-20 h-20`}),g.jsx("span",{className:Ln("text-lg font-500",a),children:e})]}),fj="transition-colors ease-in-out duration-200 flex items-center justify-center text-body-m rounded-full w-fit font-600 leading-normal disabled:cursor-not-allowed disabled:text-gray-300",dj={blue:"text-blue-500 hover:text-blue-600 active:text-blue-700",aqua:"text-aqua-500 hover:text-aqua-600 active:text-aqua-700",red:"text-red-500 hover:text-red-600 active:text-red-700",gray:"text-gray-500 hover:text-gray-600 active:text-gray-700"},hj=(e="blue")=>Ln(fj,dj[e]),_2=({color:e,children:t,className:n,...r})=>{const{defaultColorScheme:s}=Ue(),o=e||s;return g.jsx("button",{type:"button",className:hj(o)+" "+n,...r,children:t})},pj=({label:e,control:t,name:n,placeholder:r,className:s="",disabled:o=!1,leftSide:a,rightSide:c,translateKey:u="",size:d="md",...h})=>{const{field:{value:p="",onChange:m,ref:x,onBlur:S},fieldState:{error:b}}=vr.useController({name:n,control:t}),{t:T}=Ue(),A={sm:{container:"px-16 py-8",text:"text-sm",label:"text-sm",error:"text-sm",gap:"gap-8"},md:{container:"p-16",text:"text-14",label:"text-14",error:"text-sm",gap:"gap-8"}}[d],C=T(n),I=T(u);return g.jsxs("label",{className:`flex flex-col group select-none ${A.gap} ${o&&"cursor-not-allowed"} ${s}`,htmlFor:n,children:[g.jsx("h6",{className:`text-gray-600 font-600 leading-none group ${b&&"text-red-500!"} ${A.label} ${o&&"text-gray-300"}`,children:e}),g.jsxs("label",{htmlFor:n,className:`
|
|
774
774
|
flex items-center justify-between gap-8 ${A.container}
|
|
775
775
|
|
|
776
776
|
${b&&"border-red-500!"}
|
|
@@ -786,7 +786,7 @@ attempted value: ${a}
|
|
|
786
786
|
group-focus-within:border-blue-500 transition-colors duration-200 ease-in-out
|
|
787
787
|
|
|
788
788
|
group-disabled:bg-gray-500
|
|
789
|
-
`,children:[a&&a,g.jsx("input",{id:n,name:n,disabled:o,placeholder:r,value:p,onChange:P=>m(P.target.value),onBlur:S,ref:x,className:`group bg-transparent w-full h-full font-600 placeholder:font-600 select-text ${A.text} disabled:text-gray-300 disabled:placeholder:text-gray-300 placeholder:text-gray-400 disabled:cursor-not-allowed overflow-visible outline-hidden`,...h}),c&&c]}),(b==null?void 0:b.message)&&g.jsx("h4",{className:`font-500 text-red-500 leading-none ${A.error}`,children:T(b.message,{x:I||C})})]})},mj=({label:e,value:t,className:n})=>g.jsxs("div",{className:`flex flex-col gap-4 ${n||""}`,children:[g.jsx("p",{className:"text-lg font-600 text-gray-800",children:e}),g.jsx("p",{className:"text-base font-400 text-gray-600",children:t})]}),I2=({options:e,onChange:t,value:n,disabled:r,error:s,label:o="",placeholder:a="",allowSearch:c=!1,className:u="",innerClassName:d="",dropdownStyle:h={},showChevron:p=!0,size:m="md"})=>{const[x,S]=O.useState(!1),[b,T]=O.useState(""),v=O.useRef(null),A=O.useRef(null),C=e.find(U=>U.value===n),P={sm:{container:"px-16 py-8",text:"text-
|
|
789
|
+
`,children:[a&&a,g.jsx("input",{id:n,name:n,disabled:o,placeholder:r,value:p,onChange:P=>m(P.target.value),onBlur:S,ref:x,className:`group bg-transparent w-full h-full font-600 placeholder:font-600 select-text ${A.text} disabled:text-gray-300 disabled:placeholder:text-gray-300 placeholder:text-gray-400 disabled:cursor-not-allowed overflow-visible outline-hidden`,...h}),c&&c]}),(b==null?void 0:b.message)&&g.jsx("h4",{className:`font-500 text-red-500 leading-none ${A.error}`,children:T(b.message,{x:I||C})})]})},mj=({label:e,value:t,className:n})=>g.jsxs("div",{className:`flex flex-col gap-4 ${n||""}`,children:[g.jsx("p",{className:"text-lg font-600 text-gray-800",children:e}),g.jsx("p",{className:"text-base font-400 text-gray-600",children:t})]}),I2=({options:e,onChange:t,value:n,disabled:r,error:s,label:o="",placeholder:a="",allowSearch:c=!1,className:u="",innerClassName:d="",dropdownStyle:h={},showChevron:p=!0,size:m="md"})=>{const[x,S]=O.useState(!1),[b,T]=O.useState(""),v=O.useRef(null),A=O.useRef(null),C=e.find(U=>U.value===n),P={sm:{container:"px-16 py-8",text:"text-sm",label:"text-sm",error:"text-sm",gap:"gap-8",icon:"w-12 h-12",option:"text-sm"},md:{container:"p-16",text:"text-14",label:"text-14",error:"text-sm",gap:"gap-8",icon:"w-16 h-16",option:"text-14"}}[m],D=O.useMemo(()=>e.map(U=>({...U,searchableLabel:typeof U.label=="string"?U.label:O.isValidElement(U.label)?gl(U.label):String(U.label),searchableValue:String(U.value)})),[e]),R=O.useMemo(()=>{const U={keys:[{name:"searchableLabel",weight:2},{name:"searchableValue",weight:1}],threshold:.2,distance:150,includeScore:!0,includeMatches:!0,ignoreLocation:!0,minMatchCharLength:1,shouldSort:!0,findAllMatches:!0};return new cT(D,U)},[D]),{x:F,y:W,strategy:Q,refs:ee,context:ae}=ir({open:x,onOpenChange:S,middleware:[er(8),nr(),tr({padding:8}),Rr({apply({availableHeight:U,elements:re}){Object.assign(re.floating.style,{maxHeight:`${Math.min(U-10,300)}px`})},padding:8}),ms({element:A})],placement:"bottom-start",whileElementsMounted:Qn}),ge=rr(ae),de=sr(ae),{getReferenceProps:le,getFloatingProps:ue}=or([ge,de]),{isMounted:Y,styles:z}=ar(ae,{duration:{open:200,close:150},initial:{opacity:0,transform:"translateY(-4px)"}}),K=O.useMemo(()=>b.trim()?R.search(b).map(re=>({...re.item,score:re.score,matches:re.matches})):e,[b,R,e]),$=U=>{t(U.value),S(!1),T("")},X=le({onClick:()=>{r||(S(!x),!x&&v.current&&c&&setTimeout(()=>{var U;return(U=v.current)==null?void 0:U.focus()},100))}});return g.jsxs("div",{className:`relative flex flex-col ${P.gap} ${u}`,children:[o&&g.jsx("h6",{className:`text-gray-600 font-600 leading-none group ${s?"!text-red-500":""} ${P.label} ${r?"text-gray-300":""}`,children:o}),g.jsxs("div",{ref:ee.setReference,className:`${d} flex items-center justify-between bg-light rounded-full
|
|
790
790
|
${P.container} cursor-pointer border transition-all duration-200
|
|
791
791
|
${r?"opacity-60 cursor-not-allowed":"hover:border-blue-400"}
|
|
792
792
|
${s?"border-red-500 hover:border-red-600":""}
|