@arkyn/components 3.0.1-beta.41 → 3.0.1-beta.42
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/bundle.js +63 -63
- package/dist/bundle.umd.cjs +1 -1
- package/dist/components/phoneInput/index.js +2 -2
- package/package.json +1 -1
package/dist/bundle.js
CHANGED
@@ -394,23 +394,23 @@ function xc(e) {
|
|
394
394
|
showAsterisk: h = !1,
|
395
395
|
disabled: m = !1
|
396
396
|
} = e, { fieldErrors: g } = be(), y = g == null ? void 0 : g[t], [C, E] = F(_), [v, w] = F(""), [G, L] = F(null), [S, z] = F(_), [A, b] = F(!1);
|
397
|
-
async function T(
|
397
|
+
async function T(I) {
|
398
398
|
if (m) return;
|
399
|
-
b(!0), L(
|
399
|
+
b(!0), L(I), w("");
|
400
400
|
const Z = new FormData();
|
401
|
-
Z.append(r,
|
401
|
+
Z.append(r, I), await fetch(d, { method: a, body: Z }).then(async (x) => await x.json()).then((x) => {
|
402
402
|
x != null && x.error ? w(x.error) : E(x == null ? void 0 : x[o]), s && s(x == null ? void 0 : x[o]);
|
403
403
|
}).catch((x) => {
|
404
404
|
console.error(x), w("Erro ao enviar audio");
|
405
405
|
}).finally(() => b(!1));
|
406
406
|
}
|
407
|
-
function M(
|
407
|
+
function M(I) {
|
408
408
|
if (!m) {
|
409
|
-
if (
|
409
|
+
if (I.type.indexOf("audio") === -1) {
|
410
410
|
w("O arquivo selecionado não é um arquivo de áudio");
|
411
411
|
return;
|
412
412
|
}
|
413
|
-
z(URL.createObjectURL(
|
413
|
+
z(URL.createObjectURL(I)), T(I);
|
414
414
|
}
|
415
415
|
}
|
416
416
|
const O = y || v;
|
@@ -2599,7 +2599,7 @@ function Tc(e) {
|
|
2599
2599
|
size: S = "md",
|
2600
2600
|
id: z,
|
2601
2601
|
...A
|
2602
|
-
} = e, { fieldErrors: b } = be(), [T, M] = F(!1), [O, j] = F("0"), D = oe(null), B = z || Ie(),
|
2602
|
+
} = e, { fieldErrors: b } = be(), [T, M] = F(!1), [O, j] = F("0"), D = oe(null), B = z || Ie(), I = w || (b == null ? void 0 : b[t]), Z = !!I, x = n || g, te = { md: 20, lg: 20 }[S], J = L ? "right" : "left", ve = J === "left" && g, ce = J === "right" && g;
|
2603
2603
|
function re() {
|
2604
2604
|
x || !(D != null && D.current) || (M(!0), D.current.focus());
|
2605
2605
|
}
|
@@ -2675,7 +2675,7 @@ function Tc(e) {
|
|
2675
2675
|
]
|
2676
2676
|
}
|
2677
2677
|
),
|
2678
|
-
|
2678
|
+
I && /* @__PURE__ */ f(Fe, { children: I })
|
2679
2679
|
] });
|
2680
2680
|
}
|
2681
2681
|
function us() {
|
@@ -3030,18 +3030,18 @@ function Ic(e) {
|
|
3030
3030
|
onChange: h,
|
3031
3031
|
disabled: m = !1
|
3032
3032
|
} = e, { fieldErrors: g } = be(), y = g == null ? void 0 : g[t], [C, E] = F(n), [v, w] = F(""), [G, L] = F(null), [S, z] = F(n), [A, b] = F(!1);
|
3033
|
-
async function T(
|
3033
|
+
async function T(I) {
|
3034
3034
|
if (m) return;
|
3035
|
-
b(!0), L(
|
3035
|
+
b(!0), L(I), w("");
|
3036
3036
|
const Z = new FormData();
|
3037
|
-
Z.append(o,
|
3037
|
+
Z.append(o, I), await fetch(s, { method: i, body: Z }).then(async (x) => await x.json()).then((x) => {
|
3038
3038
|
x != null && x.error ? w(x.error) : E(x == null ? void 0 : x[l]), h && h(x == null ? void 0 : x[l]);
|
3039
3039
|
}).catch((x) => {
|
3040
3040
|
console.error(x), w("Erro ao enviar imagem");
|
3041
3041
|
}).finally(() => b(!1));
|
3042
3042
|
}
|
3043
|
-
function M(
|
3044
|
-
m || (z(URL.createObjectURL(
|
3043
|
+
function M(I) {
|
3044
|
+
m || (z(URL.createObjectURL(I)), T(I));
|
3045
3045
|
}
|
3046
3046
|
const O = y || v;
|
3047
3047
|
return /* @__PURE__ */ k(ye, { children: [
|
@@ -3098,7 +3098,7 @@ function ps(e) {
|
|
3098
3098
|
size: v = "md",
|
3099
3099
|
id: w,
|
3100
3100
|
...G
|
3101
|
-
} = e, { fieldErrors: L } = be(), [S, z] = F(!1), A = oe(null), b = w || Ie(), T = g || (L == null ? void 0 : L[t]), M = !!T, O = n || u, D = { md: 20, lg: 20 }[v], B = C ? "right" : "left",
|
3101
|
+
} = e, { fieldErrors: L } = be(), [S, z] = F(!1), A = oe(null), b = w || Ie(), T = g || (L == null ? void 0 : L[t]), M = !!T, O = n || u, D = { md: 20, lg: 20 }[v], B = C ? "right" : "left", I = B === "left" && u, Z = B === "right" && u;
|
3102
3102
|
function x() {
|
3103
3103
|
O || !(A != null && A.current) || (z(!0), A.current.focus());
|
3104
3104
|
}
|
@@ -3134,7 +3134,7 @@ function ps(e) {
|
|
3134
3134
|
/* @__PURE__ */ f(
|
3135
3135
|
K,
|
3136
3136
|
{
|
3137
|
-
show:
|
3137
|
+
show: I,
|
3138
3138
|
iconSize: D,
|
3139
3139
|
className: "spinner",
|
3140
3140
|
icon: Oe
|
@@ -3200,9 +3200,9 @@ function Rc(e) {
|
|
3200
3200
|
size: S = "md",
|
3201
3201
|
id: z,
|
3202
3202
|
...A
|
3203
|
-
} = e, { fieldErrors: b } = be(), [T, M] = F(!1), O = oe(null), j = z || Ie(), D = v || (b == null ? void 0 : b[t]), B = !!D,
|
3203
|
+
} = e, { fieldErrors: b } = be(), [T, M] = F(!1), O = oe(null), j = z || Ie(), D = v || (b == null ? void 0 : b[t]), B = !!D, I = n || m, x = { md: 20, lg: 20 }[S], ie = L ? "right" : "left", te = ie === "left" && m, J = ie === "right" && m;
|
3204
3204
|
function ve() {
|
3205
|
-
|
3205
|
+
I || !(O != null && O.current) || (M(!0), O.current.focus());
|
3206
3206
|
}
|
3207
3207
|
function ce(H) {
|
3208
3208
|
M(!0), C && C(H);
|
@@ -3210,7 +3210,7 @@ function Rc(e) {
|
|
3210
3210
|
function re(H) {
|
3211
3211
|
M(!1), E && E(H);
|
3212
3212
|
}
|
3213
|
-
const Me = `arkynMaskedInput ${_ ? "hasPrefix" : ""} ${h ? "hasSuffix" : ""} ${s} ${S} ${
|
3213
|
+
const Me = `arkynMaskedInput ${_ ? "hasPrefix" : ""} ${h ? "hasSuffix" : ""} ${s} ${S} ${I || y || m ? "opacity" : ""} ${B ? "errored" : ""} ${T ? "focused" : ""} ${d}`;
|
3214
3214
|
return /* @__PURE__ */ k(ye, { children: [
|
3215
3215
|
u && /* @__PURE__ */ f(me, { showAsterisk: G, htmlFor: j, children: u }),
|
3216
3216
|
/* @__PURE__ */ k(
|
@@ -3243,7 +3243,7 @@ function Rc(e) {
|
|
3243
3243
|
ref: O,
|
3244
3244
|
onFocus: ce,
|
3245
3245
|
onBlur: re,
|
3246
|
-
disabled:
|
3246
|
+
disabled: I,
|
3247
3247
|
readOnly: y,
|
3248
3248
|
id: j,
|
3249
3249
|
name: t,
|
@@ -3471,7 +3471,7 @@ function Lc(e) {
|
|
3471
3471
|
size: S = "md",
|
3472
3472
|
value: z,
|
3473
3473
|
variant: A = "solid"
|
3474
|
-
} = e, { fieldErrors: b } = be(), T = oe(null), M = d || Ie(), O = i || (b == null ? void 0 : b[t]), j = !!O, D = G || c || l,
|
3474
|
+
} = e, { fieldErrors: b } = be(), T = oe(null), M = d || Ie(), O = i || (b == null ? void 0 : b[t]), j = !!O, D = G || c || l, I = { md: 20, lg: 20 }[S], [Z, x] = F(""), [ie, te] = F(!1), [J, ve] = F(o), ce = z || J;
|
3475
3475
|
function re(H) {
|
3476
3476
|
return ce.includes(H);
|
3477
3477
|
}
|
@@ -3518,8 +3518,8 @@ function Lc(e) {
|
|
3518
3518
|
type: "hidden"
|
3519
3519
|
}
|
3520
3520
|
),
|
3521
|
-
/* @__PURE__ */ f(K, { iconSize:
|
3522
|
-
g && /* @__PURE__ */ f(g, { size:
|
3521
|
+
/* @__PURE__ */ f(K, { iconSize: I, icon: L, className: "prefix" }),
|
3522
|
+
g && /* @__PURE__ */ f(g, { size: I, strokeWidth: 2.5 }),
|
3523
3523
|
/* @__PURE__ */ k(xs, { size: S, children: [
|
3524
3524
|
ce.map((H) => /* @__PURE__ */ f(
|
3525
3525
|
Es,
|
@@ -3562,11 +3562,11 @@ function Lc(e) {
|
|
3562
3562
|
disabled: D,
|
3563
3563
|
isFocused: ie,
|
3564
3564
|
readOnly: l,
|
3565
|
-
iconSize:
|
3565
|
+
iconSize: I,
|
3566
3566
|
isLoading: c
|
3567
3567
|
}
|
3568
3568
|
),
|
3569
|
-
/* @__PURE__ */ f(Ss, { iconSize:
|
3569
|
+
/* @__PURE__ */ f(Ss, { iconSize: I, isLoading: c }),
|
3570
3570
|
/* @__PURE__ */ f(Fs, { handleBlur: X, isFocused: ie })
|
3571
3571
|
]
|
3572
3572
|
}
|
@@ -3784,9 +3784,9 @@ function jc(e) {
|
|
3784
3784
|
if (C.country) return C.country;
|
3785
3785
|
const $ = nt.find((X) => X.iso === t);
|
3786
3786
|
return $ || nt[30];
|
3787
|
-
}), { fieldErrors: M } = be(), O = oe(null), j = y || Ie(), D = s || (M == null ? void 0 : M[_]), B = !!D,
|
3787
|
+
}), { fieldErrors: M } = be(), O = oe(null), j = y || Ie(), D = s || (M == null ? void 0 : M[_]), B = !!D, I = a || o, Z = oe(null);
|
3788
3788
|
function x() {
|
3789
|
-
|
3789
|
+
I || E || L || (v(!0), Z.current && Z.current.focus());
|
3790
3790
|
}
|
3791
3791
|
function ie() {
|
3792
3792
|
S(!0), v(!0);
|
@@ -3816,7 +3816,7 @@ function jc(e) {
|
|
3816
3816
|
As,
|
3817
3817
|
{
|
3818
3818
|
id: j,
|
3819
|
-
disabled:
|
3819
|
+
disabled: I,
|
3820
3820
|
isError: B,
|
3821
3821
|
isLoading: o,
|
3822
3822
|
isFocused: E,
|
@@ -3837,7 +3837,7 @@ function jc(e) {
|
|
3837
3837
|
/* @__PURE__ */ k(
|
3838
3838
|
Ms,
|
3839
3839
|
{
|
3840
|
-
isOpen: L,
|
3840
|
+
isOpen: I ? !1 : L,
|
3841
3841
|
search: w,
|
3842
3842
|
placeholder: m,
|
3843
3843
|
onSearch: G,
|
@@ -3861,7 +3861,7 @@ function jc(e) {
|
|
3861
3861
|
/* @__PURE__ */ f(
|
3862
3862
|
Is,
|
3863
3863
|
{
|
3864
|
-
isOpen: L,
|
3864
|
+
isOpen: I ? !1 : L,
|
3865
3865
|
onClick: te
|
3866
3866
|
}
|
3867
3867
|
),
|
@@ -3874,7 +3874,7 @@ function jc(e) {
|
|
3874
3874
|
onChange: ($) => {
|
3875
3875
|
A($), h && h(ae($));
|
3876
3876
|
},
|
3877
|
-
disabled:
|
3877
|
+
disabled: I,
|
3878
3878
|
onBlur: ve,
|
3879
3879
|
onFocus: J,
|
3880
3880
|
size: c
|
@@ -5422,7 +5422,7 @@ var qo = (e, t, n) => {
|
|
5422
5422
|
if (o > s.children.length)
|
5423
5423
|
throw new Error('Cannot apply an "insert_node" operation at path ['.concat(r, "] because the destination is past the end of the node."));
|
5424
5424
|
if (s.children.splice(o, 0, a), t)
|
5425
|
-
for (var [i, c] of
|
5425
|
+
for (var [i, c] of R.points(t))
|
5426
5426
|
t[c] = U.transform(i, n);
|
5427
5427
|
break;
|
5428
5428
|
}
|
@@ -5435,7 +5435,7 @@ var qo = (e, t, n) => {
|
|
5435
5435
|
if (d.length === 0) break;
|
5436
5436
|
var _ = N.leaf(e, l), h = _.text.slice(0, u), m = _.text.slice(u);
|
5437
5437
|
if (_.text = h + d + m, t)
|
5438
|
-
for (var [g, y] of
|
5438
|
+
for (var [g, y] of R.points(t))
|
5439
5439
|
t[y] = U.transform(g, n);
|
5440
5440
|
break;
|
5441
5441
|
}
|
@@ -5450,7 +5450,7 @@ var qo = (e, t, n) => {
|
|
5450
5450
|
else
|
5451
5451
|
throw new Error('Cannot apply a "merge_node" operation at path ['.concat(C, "] to nodes of different interfaces: ").concat(Ee.stringify(E), " ").concat(Ee.stringify(w)));
|
5452
5452
|
if (G.children.splice(L, 1), t)
|
5453
|
-
for (var [S, z] of
|
5453
|
+
for (var [S, z] of R.points(t))
|
5454
5454
|
t[z] = U.transform(S, n);
|
5455
5455
|
break;
|
5456
5456
|
}
|
@@ -5465,8 +5465,8 @@ var qo = (e, t, n) => {
|
|
5465
5465
|
M.children.splice(O, 1);
|
5466
5466
|
var j = p.transform(A, n), D = N.get(e, p.parent(j)), B = j[j.length - 1];
|
5467
5467
|
if (D.children.splice(B, 0, T), t)
|
5468
|
-
for (var [
|
5469
|
-
t[Z] = U.transform(
|
5468
|
+
for (var [I, Z] of R.points(t))
|
5469
|
+
t[Z] = U.transform(I, n);
|
5470
5470
|
break;
|
5471
5471
|
}
|
5472
5472
|
case "remove_node": {
|
@@ -5474,7 +5474,7 @@ var qo = (e, t, n) => {
|
|
5474
5474
|
path: x
|
5475
5475
|
} = n, ie = x[x.length - 1], te = N.parent(e, x);
|
5476
5476
|
if (te.children.splice(ie, 1), t)
|
5477
|
-
for (var [J, ve] of
|
5477
|
+
for (var [J, ve] of R.points(t)) {
|
5478
5478
|
var ce = U.transform(J, n);
|
5479
5479
|
if (t != null && ce != null)
|
5480
5480
|
t[ve] = ce;
|
@@ -5502,7 +5502,7 @@ var qo = (e, t, n) => {
|
|
5502
5502
|
if (H.length === 0) break;
|
5503
5503
|
var le = N.leaf(e, Ze), vt = le.text.slice(0, Me), qt = le.text.slice(Me + H.length);
|
5504
5504
|
if (le.text = vt + qt, t)
|
5505
|
-
for (var [fe, De] of
|
5505
|
+
for (var [fe, De] of R.points(t))
|
5506
5506
|
t[De] = U.transform(fe, n);
|
5507
5507
|
break;
|
5508
5508
|
}
|
@@ -5533,7 +5533,7 @@ var qo = (e, t, n) => {
|
|
5533
5533
|
t = Ge;
|
5534
5534
|
else {
|
5535
5535
|
if (t == null) {
|
5536
|
-
if (!
|
5536
|
+
if (!R.isRange(Ge))
|
5537
5537
|
throw new Error('Cannot apply an incomplete "set_selection" operation properties '.concat(Ee.stringify(Ge), " when there is no current selection."));
|
5538
5538
|
t = ot({}, Ge);
|
5539
5539
|
}
|
@@ -5570,7 +5570,7 @@ var qo = (e, t, n) => {
|
|
5570
5570
|
});
|
5571
5571
|
}
|
5572
5572
|
if (Sa.children.splice(Ta + 1, 0, Xt), t)
|
5573
|
-
for (var [Ra, Ma] of
|
5573
|
+
for (var [Ra, Ma] of R.points(t))
|
5574
5574
|
t[Ma] = U.transform(Ra, n);
|
5575
5575
|
break;
|
5576
5576
|
}
|
@@ -5692,7 +5692,7 @@ function Jo(e) {
|
|
5692
5692
|
}
|
5693
5693
|
return e;
|
5694
5694
|
}
|
5695
|
-
var
|
5695
|
+
var R = {
|
5696
5696
|
edges(e) {
|
5697
5697
|
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, {
|
5698
5698
|
reverse: n = !1
|
@@ -5700,27 +5700,27 @@ var I = {
|
|
5700
5700
|
anchor: r,
|
5701
5701
|
focus: a
|
5702
5702
|
} = e;
|
5703
|
-
return
|
5703
|
+
return R.isBackward(e) === n ? [r, a] : [a, r];
|
5704
5704
|
},
|
5705
5705
|
end(e) {
|
5706
|
-
var [, t] =
|
5706
|
+
var [, t] = R.edges(e);
|
5707
5707
|
return t;
|
5708
5708
|
},
|
5709
5709
|
equals(e, t) {
|
5710
5710
|
return U.equals(e.anchor, t.anchor) && U.equals(e.focus, t.focus);
|
5711
5711
|
},
|
5712
5712
|
includes(e, t) {
|
5713
|
-
if (
|
5714
|
-
if (
|
5713
|
+
if (R.isRange(t)) {
|
5714
|
+
if (R.includes(e, t.anchor) || R.includes(e, t.focus))
|
5715
5715
|
return !0;
|
5716
|
-
var [n, r] =
|
5716
|
+
var [n, r] = R.edges(e), [a, s] = R.edges(t);
|
5717
5717
|
return U.isBefore(n, a) && U.isAfter(r, s);
|
5718
5718
|
}
|
5719
|
-
var [o, i] =
|
5719
|
+
var [o, i] = R.edges(e), c = !1, l = !1;
|
5720
5720
|
return U.isPoint(t) ? (c = U.compare(t, o) >= 0, l = U.compare(t, i) <= 0) : (c = p.compare(t, o.path) >= 0, l = p.compare(t, i.path) <= 0), c && l;
|
5721
5721
|
},
|
5722
5722
|
intersection(e, t) {
|
5723
|
-
var n = gt(e, Zo), [r, a] =
|
5723
|
+
var n = gt(e, Zo), [r, a] = R.edges(e), [s, o] = R.edges(t), i = U.isBefore(r, s) ? s : r, c = U.isBefore(a, o) ? a : o;
|
5724
5724
|
return U.isBefore(c, i) ? null : Jo({
|
5725
5725
|
anchor: i,
|
5726
5726
|
focus: c
|
@@ -5741,10 +5741,10 @@ var I = {
|
|
5741
5741
|
return U.equals(t, n);
|
5742
5742
|
},
|
5743
5743
|
isExpanded(e) {
|
5744
|
-
return !
|
5744
|
+
return !R.isCollapsed(e);
|
5745
5745
|
},
|
5746
5746
|
isForward(e) {
|
5747
|
-
return !
|
5747
|
+
return !R.isBackward(e);
|
5748
5748
|
},
|
5749
5749
|
isRange(e) {
|
5750
5750
|
return se(e) && U.isPoint(e.anchor) && U.isPoint(e.focus);
|
@@ -5753,7 +5753,7 @@ var I = {
|
|
5753
5753
|
yield [e.anchor, "anchor"], yield [e.focus, "focus"];
|
5754
5754
|
},
|
5755
5755
|
start(e) {
|
5756
|
-
var [t] =
|
5756
|
+
var [t] = R.edges(e);
|
5757
5757
|
return t;
|
5758
5758
|
},
|
5759
5759
|
transform(e, t) {
|
@@ -5765,9 +5765,9 @@ var I = {
|
|
5765
5765
|
affinity: a = "inward"
|
5766
5766
|
} = n, s, o;
|
5767
5767
|
if (a === "inward") {
|
5768
|
-
var i =
|
5769
|
-
|
5770
|
-
} else a === "outward" ?
|
5768
|
+
var i = R.isCollapsed(r);
|
5769
|
+
R.isForward(r) ? (s = "forward", o = i ? s : "backward") : (s = "backward", o = i ? s : "forward");
|
5770
|
+
} else a === "outward" ? R.isForward(r) ? (s = "backward", o = "forward") : (s = "forward", o = "backward") : (s = a, o = a);
|
5771
5771
|
var c = U.transform(r.anchor, t, {
|
5772
5772
|
affinity: s
|
5773
5773
|
}), l = U.transform(r.focus, t, {
|
@@ -5880,15 +5880,15 @@ var I = {
|
|
5880
5880
|
var n = Fn({
|
5881
5881
|
children: e.children
|
5882
5882
|
}, (r) => {
|
5883
|
-
var [a, s] =
|
5883
|
+
var [a, s] = R.edges(t), o = N.nodes(r, {
|
5884
5884
|
reverse: !0,
|
5885
5885
|
pass: (_) => {
|
5886
5886
|
var [, h] = _;
|
5887
|
-
return !
|
5887
|
+
return !R.includes(t, h);
|
5888
5888
|
}
|
5889
5889
|
});
|
5890
5890
|
for (var [, i] of o) {
|
5891
|
-
if (!
|
5891
|
+
if (!R.includes(t, i)) {
|
5892
5892
|
var c = N.parent(r, i), l = i[i.length - 1];
|
5893
5893
|
c.children.splice(l, 1);
|
5894
5894
|
}
|
@@ -6055,7 +6055,7 @@ var it = {
|
|
6055
6055
|
case "set_node":
|
6056
6056
|
return p.isPath(e.path) && se(e.properties) && se(e.newProperties);
|
6057
6057
|
case "set_selection":
|
6058
|
-
return e.properties === null &&
|
6058
|
+
return e.properties === null && R.isRange(e.newProperties) || e.newProperties === null && R.isRange(e.properties) || se(e.properties) && se(e.newProperties);
|
6059
6059
|
case "split_node":
|
6060
6060
|
return p.isPath(e.path) && typeof e.position == "number" && se(e.properties);
|
6061
6061
|
default:
|
@@ -6151,7 +6151,7 @@ var it = {
|
|
6151
6151
|
return t;
|
6152
6152
|
if (!se(e))
|
6153
6153
|
return !1;
|
6154
|
-
var n = typeof e.addMark == "function" && typeof e.apply == "function" && typeof e.deleteFragment == "function" && typeof e.insertBreak == "function" && typeof e.insertSoftBreak == "function" && typeof e.insertFragment == "function" && typeof e.insertNode == "function" && typeof e.insertText == "function" && typeof e.isElementReadOnly == "function" && typeof e.isInline == "function" && typeof e.isSelectable == "function" && typeof e.isVoid == "function" && typeof e.normalizeNode == "function" && typeof e.onChange == "function" && typeof e.removeMark == "function" && typeof e.getDirtyPaths == "function" && (e.marks === null || se(e.marks)) && (e.selection === null ||
|
6154
|
+
var n = typeof e.addMark == "function" && typeof e.apply == "function" && typeof e.deleteFragment == "function" && typeof e.insertBreak == "function" && typeof e.insertSoftBreak == "function" && typeof e.insertFragment == "function" && typeof e.insertNode == "function" && typeof e.insertText == "function" && typeof e.isElementReadOnly == "function" && typeof e.isInline == "function" && typeof e.isSelectable == "function" && typeof e.isVoid == "function" && typeof e.normalizeNode == "function" && typeof e.onChange == "function" && typeof e.removeMark == "function" && typeof e.getDirtyPaths == "function" && (e.marks === null || se(e.marks)) && (e.selection === null || R.isRange(e.selection)) && N.isNodeList(e.children) && it.isOperationList(e.operations);
|
6155
6155
|
return cr.set(e, n), n;
|
6156
6156
|
}, pe = {
|
6157
6157
|
above(e, t) {
|
@@ -6485,7 +6485,7 @@ var W = {
|
|
6485
6485
|
decorations(e, t) {
|
6486
6486
|
var n = [Te({}, e)];
|
6487
6487
|
for (var r of t) {
|
6488
|
-
var a = gt(r, ri), [s, o] =
|
6488
|
+
var a = gt(r, ri), [s, o] = R.edges(r), i = [], c = 0, l = s.offset, u = o.offset;
|
6489
6489
|
for (var d of n) {
|
6490
6490
|
var {
|
6491
6491
|
length: _
|
@@ -6541,16 +6541,16 @@ var si = {
|
|
6541
6541
|
} = n, {
|
6542
6542
|
at: a = ai(e)
|
6543
6543
|
} = n;
|
6544
|
-
if (p.isPath(a) && (a = pe.range(e, a)),
|
6545
|
-
if (
|
6544
|
+
if (p.isPath(a) && (a = pe.range(e, a)), R.isRange(a))
|
6545
|
+
if (R.isCollapsed(a))
|
6546
6546
|
a = a.anchor;
|
6547
6547
|
else {
|
6548
|
-
var s =
|
6548
|
+
var s = R.end(a);
|
6549
6549
|
if (!r && pe.void(e, {
|
6550
6550
|
at: s
|
6551
6551
|
}))
|
6552
6552
|
return;
|
6553
|
-
var o =
|
6553
|
+
var o = R.start(a), i = pe.pointRef(e, o), c = pe.pointRef(e, s);
|
6554
6554
|
mr.delete(e, {
|
6555
6555
|
at: a,
|
6556
6556
|
voids: r
|
package/dist/bundle.umd.cjs
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
(function(C,c){typeof exports=="object"&&typeof module<"u"?c(exports,require("react/jsx-runtime"),require("react"),require("lucide-react"),require("framer-motion"),require("@react-input/mask")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","lucide-react","framer-motion","@react-input/mask"],c):(C=typeof globalThis<"u"?globalThis:C||self,c(C["@arkyn/components"]={},C.jsxRuntime,C.b,C.lucideReact,C.framerMotion,C.mask))})(this,function(C,c,m,B,Le,Tn){"use strict";function va(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const te=va(m);function On(e){const{className:t,...n}=e,r=`arkynAlertTitle ${t}`;return c.jsx("div",{className:r.trim(),...n})}const Pn=m.createContext({});function ka(){return m.useContext(Pn)}function Ca(e){const{schema:t,children:n,className:r,...a}=e,i=!(u=>{let f=!1;const d=_=>{Array.isArray(_)?_.forEach(d):_&&typeof _=="object"&&"type"in _&&(_.type===On?f=!0:_.props&&typeof _.props=="object"&&_.props!==null&&"children"in _.props&&d(_.props.children))};return d(u),f})(n)?"nonExistsAlertTitle":"existsAlertTitle",l=`arkynAlertContainer ${t} ${i} ${r}`;return c.jsx(Pn.Provider,{value:e,children:c.jsx("div",{className:l.trim(),...a,children:n})})}function ba(e){const{className:t,...n}=e,r=`arkynAlertContent ${t}`;return c.jsx("div",{className:r.trim(),...n})}function xa(e){const{className:t,...n}=e,r=`arkynAlertDescription ${t}`;return c.jsx("div",{className:r.trim(),...n})}function Ea(e){const{className:t,...n}=e,{schema:r}=ka(),a=`arkynAlertIcon ${r} ${t}`;switch(r){case"success":return c.jsx(B.CheckCircle2,{className:a,...n});case"danger":return c.jsx(B.XCircle,{className:a,...n});case"warning":return c.jsx(B.AlertTriangle,{className:a,...n});case"info":return c.jsx(B.Info,{className:a,...n})}}function An(e){function t(){return!e||e<=0?0:e>=100?100:e}const[n,r]=m.useState(t());function a(s){return s<=0?r(0):s>=100?r(100):r(s)}return[n,a]}function In(e){const{onChange:t,value:n,disabled:r=!1,onDragging:a,className:s="",...o}=e,[i,l]=m.useState(!1),u=m.useRef(null),f=()=>l(!0),d=()=>l(!1),_=b=>{if(r||!i||!u.current)return;const w=u.current.getBoundingClientRect(),k=b.clientX-w.left,S=Math.min(Math.max(k/w.width*100,0),100);t(S)},p=b=>{if(r||!u.current)return;const w=u.current.getBoundingClientRect(),k=b.clientX-w.left,S=Math.min(Math.max(k/w.width*100,0),100);t(S)};m.useEffect(()=>(i?(a&&a(!0),document.addEventListener("mousemove",_),document.addEventListener("mouseup",d)):(a&&a(!1),document.removeEventListener("mousemove",_),document.removeEventListener("mouseup",d)),()=>{document.removeEventListener("mousemove",_),document.removeEventListener("mouseup",d)}),[i]);const v=`arkynSliderTrack ${i?"isDragging":"isNotDragging"} ${r?"isDisabled":"isEnabled"} ${s}`;return c.jsxs("div",{...o,className:v,onMouseDown:f,onClick:p,ref:u,children:[c.jsx("div",{className:"arkynSliderFill",style:{width:`${n}%`}}),c.jsx("div",{className:"arkynSliderThumb",style:{left:`${n}%`}})]})}function Mn(e){var j,O,G,A;const{onPlayAudio:t,onPauseAudio:n,disabled:r,...a}=e,[s,o]=An(0),[i,l]=m.useState(!1),[u,f]=m.useState(!1),d=m.useRef(null),_=(j=d.current)==null?void 0:j.currentTime,p=(O=d.current)==null?void 0:O.duration,g=b(_),h=b(p),v={totalTime:p,currentTime:_,formattedCurrentTime:g,formattedTotalTime:h};function b(x){if(!x)return"00:00";const P=Math.floor(x/60),D=Math.floor(x%60),F=String(P).padStart(2,"0"),H=String(D).padStart(2,"0");return`${F}:${H}`}function w(){const x=d.current;x&&(e.onPlayAudio&&e.onPlayAudio(v),x.play(),l(!0))}function k(){const x=d.current;x&&(e.onPauseAudio&&e.onPauseAudio(v),x.pause(),l(!1))}function S(){i?k():w()}function V(x){const P=d.current;if(!P)return;const D=P.duration,F=x/100*D;P.currentTime=F}return u||!i?(G=d.current)==null||G.pause():i&&((A=d.current)==null||A.play()),m.useEffect(()=>{const x=d.current;if(!x)return;const P=()=>{const D=x.duration,H=x.currentTime/D*100;o(H)};return x.addEventListener("timeupdate",P),()=>{x.removeEventListener("timeupdate",P)}},[]),c.jsxs("div",{className:"arkynAudioPlayer",children:[c.jsx("audio",{...a,ref:d,src:e.src,onEnded:k}),c.jsxs("button",{type:"button",disabled:r,onClick:S,children:[i&&c.jsx(B.Pause,{}),!i&&c.jsx(B.Play,{})]}),c.jsx("p",{children:g}),c.jsx(In,{value:s,onChange:V,onDragging:f,disabled:r}),c.jsx("p",{children:h})]})}const Dn=m.createContext({});function wa(e){const{children:t,fieldErrors:n,form:r}=e;return c.jsxs(Dn.Provider,{value:{fieldErrors:n},children:[!r&&t,r&&m.cloneElement(r,r.props,t)]})}function ye(){return m.useContext(Dn)}function ke(e){const{children:t,className:n,...r}=e,a=`arkynFieldError ${n}`;return t?c.jsx("strong",{className:a.trim(),...r,children:t}):c.jsx(c.Fragment,{})}function fe(e){const{showAsterisk:t=!1,className:n="",...r}=e,s=`arkynFieldLabel ${t?"asteriskTrue":"asteriskFalse"} ${n}`;return c.jsx("label",{className:s.trim(),...r})}function me(e){const{children:t,className:n,...r}=e,a=`arkynFieldWrapper ${n}`;return c.jsx("section",{className:a.trim(),...r,children:t})}function X(e){const{iconSize:t,icon:n,className:r,show:a=!0}=e;return a?n?typeof n=="string"?c.jsx("p",{className:r,children:n}):c.jsx("p",{className:r,children:c.jsx(n,{size:t,strokeWidth:2.5})}):c.jsx(c.Fragment,{}):c.jsx(c.Fragment,{})}function $e(e){const{isLoading:t=!1,scheme:n="primary",variant:r="solid",loadingText:a,size:s="md",leftIcon:o,rightIcon:i,disabled:l,className:u="",children:f,...d}=e,p={xs:12,sm:16,md:20,lg:24}[s],v=`arkynButton ${t?"loadingTrue":"loadingFalse"} ${r} ${n} ${s} ${a?"loadingTextTrue":"loadingTextFalse"} ${u}`;return c.jsxs("button",{className:v,disabled:l||t,...d,children:[c.jsxs("div",{className:"arkynButtonSpinner",children:[c.jsx(B.Loader2,{size:p,strokeWidth:2.5}),a&&a]}),c.jsxs("div",{className:"arkynButtonContent",children:[c.jsx(X,{iconSize:p,icon:o}),f,c.jsx(X,{iconSize:p,icon:i})]})]})}function dt(e){const{className:t,orientation:n="horizontal",...r}=e,a=`arkynDivider ${n} ${t}`;return c.jsx("div",{className:a.trim(),...r})}function _t(e){const{isLoading:t=!1,scheme:n="primary",variant:r="solid",size:a="md",icon:s,disabled:o,className:i="",...l}=e,u={xs:12,sm:16,md:20,lg:24},d=`arkynIconButton ${r} ${n} ${a} ${t?"loadingTrue":"loadingFalse"} ${i}`;return c.jsxs("button",{disabled:o||t,className:d.trim(),...l,children:[c.jsx("div",{className:"arkynIconButtonSpinner",children:c.jsx(B.Loader2,{size:u[a],strokeWidth:2.5})}),c.jsx("div",{className:"arkynIconButtonContent",children:c.jsx(s,{size:u[a],strokeWidth:2.5})})]})}function gt(e){const{text:t,size:n="lg",children:r,orientation:a="top",className:s="",...o}=e,i=m.useId(),l=m.useRef(null),[u,f]=m.useState(a);m.useEffect(()=>{const _=()=>{if(!l.current)return;const h=document.getElementById(i);h&&(f(a),requestAnimationFrame(()=>{const v=h.getBoundingClientRect(),b=window.innerWidth,w=window.innerHeight;let k=a;a==="left"&&v.left<0?k="right":a==="right"&&v.right>b?k="left":a==="top"&&v.top<0?k="bottom":a==="bottom"&&v.bottom>w&&(k="top"),k==="right"&&v.right>b?k="left":k==="left"&&v.left<0?k="right":k==="bottom"&&v.bottom>w?k="top":k==="top"&&v.top<0&&(k="bottom"),f(k)}))},p=l.current;if(!p)return;const g=()=>{setTimeout(_,1)};return p.addEventListener("mouseenter",g),window.addEventListener("resize",_),()=>{p.removeEventListener("mouseenter",g),window.removeEventListener("resize",_)}},[a,i]);const d=`arkynTooltip ${n} ${u} ${s}`;return c.jsxs("div",{className:d.trim(),...o,ref:l,children:[r,c.jsx("div",{className:"arkynTooltipText",id:i,dangerouslySetInnerHTML:{__html:t}})]})}function Sa(e){const{filePath:t,disabled:n,acceptAudio:r,handleSelectFile:a,isLoading:s,reSendAudio:o,changeAudioButtonText:i}=e;function l(){if(n)return;const u=document.createElement("input");u.type="file",u.accept=r,u.onchange=f=>{var _;const d=(_=f.target.files)==null?void 0:_[0];d&&a(d)},u.click()}return c.jsxs("div",{className:"arkynAudioUploadHasFileContentContainer",children:[c.jsx(Mn,{src:t}),c.jsx(dt,{}),c.jsxs("div",{className:"arkynAudioUploadButtonsContainer",children:[!!o&&c.jsx(gt,{orientation:"bottom",text:"Reenviar áudio",children:c.jsx(_t,{type:"button","aria-label":"resend image",variant:"outline",scheme:"danger",size:"sm",isLoading:s,onClick:o,icon:B.RefreshCw,disabled:n})}),c.jsx($e,{isLoading:s,onClick:l,variant:"outline",size:"sm",type:"button",disabled:n,children:i})]})]})}function Na(e){const{dropAudioText:t,isLoading:n,acceptAudio:r,handleSelectFile:a,selectAudioButtonText:s,disabled:o}=e;function i(u){if(o)return;u.preventDefault();const f=u.dataTransfer.files[0];f&&a(f)}function l(){if(o)return;const u=document.createElement("input");u.type="file",u.accept=r,u.onchange=f=>{var _;const d=(_=f.target.files)==null?void 0:_[0];d&&a(d)},u.click()}return c.jsxs("div",{onDrop:i,className:"arkynAudioUploadNoFileContent",children:[c.jsx($e,{isLoading:n,onClick:l,variant:"ghost",size:"sm",type:"button",disabled:o,children:s}),c.jsx("p",{children:t})]})}function Fa(e){const{name:t,label:n,fileName:r="file",method:a="POST",onChange:s,fileResponseName:o="url",selectAudioButtonText:i="Selecionar arquivo de áudio",dropAudioText:l="Ou arraste e solte um arquivo de áudio aqui",changeAudioButtonText:u="Trocar arquivo de áudio",acceptAudio:f="audio/*",action:d,defaultValue:_="",showAsterisk:p=!1,disabled:g=!1}=e,{fieldErrors:h}=ye(),v=h==null?void 0:h[t],[b,w]=m.useState(_),[k,S]=m.useState(""),[V,j]=m.useState(null),[O,G]=m.useState(_),[A,x]=m.useState(!1);async function P(M){if(g)return;x(!0),j(M),S("");const Q=new FormData;Q.append(r,M),await fetch(d,{method:a,body:Q}).then(async E=>await E.json()).then(E=>{E!=null&&E.error?S(E.error):w(E==null?void 0:E[o]),s&&s(E==null?void 0:E[o])}).catch(E=>{console.error(E),S("Erro ao enviar audio")}).finally(()=>x(!1))}function D(M){if(!g){if(M.type.indexOf("audio")===-1){S("O arquivo selecionado não é um arquivo de áudio");return}G(URL.createObjectURL(M)),P(M)}}const F=v||k,z=`arkynAudioUpload ${F?"hasError":"noHasError"} ${O?"hasAudio":"noHasAudio"}`;return c.jsxs(me,{children:[n&&c.jsx(fe,{showAsterisk:p,children:n}),c.jsxs("div",{className:z,children:[c.jsx("input",{type:"hidden",name:t,value:b||""}),!O&&c.jsx(Na,{disabled:g,isLoading:A,acceptAudio:f,dropAudioText:l,handleSelectFile:D,selectAudioButtonText:i}),O&&c.jsx(Sa,{filePath:O,acceptAudio:f,changeAudioButtonText:u,disabled:g,handleSelectFile:D,isLoading:A,reSendAudio:F&&V?()=>P(V):void 0})]}),F&&c.jsx(ke,{children:F})]})}function Ta(e){const{variant:t="ghost",scheme:n="primary",size:r="lg",leftIcon:a,rightIcon:s,className:o="",children:i,...l}=e,f={md:12,lg:14}[r],d=`arkynBadge ${t} ${n} ${r} ${o}`;return c.jsxs("div",{className:d.trim(),...l,children:[c.jsx(X,{iconSize:f,icon:a}),c.jsx("p",{children:i}),c.jsx(X,{iconSize:f,icon:s})]})}const Ln=m.createContext({});function Oa(){return m.useContext(Ln)}function Pa(e){return c.jsx(Ln.Provider,{value:e,children:e.children})}function Aa(e){const{children:t,disabled:n=!1,className:r="",onClick:a,value:s,...o}=e,{disabled:i,currentTab:l,changeCurrentTab:u}=Oa(),f=i||n,p=`arkynCardTabButton ${f?"isDisabled":""} ${l===s&&s?"isActive":""} ${r}`;function g(h){u(s),a&&a(h)}return c.jsx("button",{onClick:g,className:p.trim(),...o,disabled:f,type:"button",children:t})}function Ia(e){const{children:t,onChange:n,defaultValue:r,disabled:a=!1,className:s,...o}=e,[i,l]=m.useState(r||""),u=`arkynCardTabContainer ${s||""}`;function f(d){l(d),n&&n(d)}return c.jsx(Pa,{disabled:a,currentTab:i,changeCurrentTab:f,children:c.jsx("nav",{className:u.trim(),...o,children:t})})}function Ma(e){const{id:t,name:n,className:r="",size:a="md",errorMessage:s,defaultChecked:o=!1,label:i,checked:l=null,onCheck:u,value:f,...d}=e,{fieldErrors:_}=ye(),p=m.useRef(null),g=t||m.useId(),h=s||(_==null?void 0:_[n]),v=!!h,[b,w]=m.useState(o||!1),k=typeof l=="boolean"?l:b,j=`arkynCheckbox ${a} ${v?"errorTrue":"errorFalse"} ${k?"checkedTrue":"checkedFalse"} ${r}`;function O(){const G=b;w(!G),u&&u(G?"":f||"checked")}return c.jsxs(me,{children:[i&&c.jsx(fe,{children:i}),c.jsxs("button",{id:g,type:"button",className:j,onClick:O,...d,children:[c.jsx("input",{type:"hidden",name:n,ref:p,value:k?f||"checked":""}),c.jsx(B.Check,{})]}),h&&c.jsx(ke,{children:h})]})}function Da(){return()=>{}}function $n(){return m.useSyncExternalStore(Da,()=>!0,()=>!1)}function La(e){const{children:t,fallback:n=null}=e;return $n()?c.jsx(c.Fragment,{children:t()}):c.jsx(c.Fragment,{children:n})}const Gt=e=>e.replace(/[^0-9]/g,""),Re=[{name:"Afghanistan",code:"+93",prefix:null,iso:"AF",flag:"https://cdn.kcak11.com/CountryFlags/countries/af.svg",mask:"__-___-____"},{name:"Aland Islands",code:"+358",prefix:null,iso:"AX",flag:"https://cdn.kcak11.com/CountryFlags/countries/ax.svg",mask:"(___) ___-__-__"},{name:"Albania",code:"+355",prefix:null,iso:"AL",flag:"https://cdn.kcak11.com/CountryFlags/countries/al.svg",mask:"(___) ___-___"},{name:"Algeria",code:"+213",prefix:null,iso:"DZ",flag:"https://cdn.kcak11.com/CountryFlags/countries/dz.svg",mask:"__-___-____"},{name:"American Samoa",code:"+1",prefix:"684",iso:"AS",flag:"https://cdn.kcak11.com/CountryFlags/countries/as.svg",mask:"(684) ___-____"},{name:"Andorra",code:"+376",prefix:null,iso:"AD",flag:"https://cdn.kcak11.com/CountryFlags/countries/ad.svg",mask:"___-___"},{name:"Angola",code:"+244",prefix:null,iso:"AO",flag:"https://cdn.kcak11.com/CountryFlags/countries/ao.svg",mask:"(___) ___-___"},{name:"Anguilla",code:"+1",prefix:"264",iso:"AI",flag:"https://cdn.kcak11.com/CountryFlags/countries/ai.svg",mask:"(264) ___-____"},{name:"Antarctica",code:"+672",prefix:"1",iso:"AQ",flag:"https://cdn.kcak11.com/CountryFlags/countries/aq.svg",mask:"1__-___"},{name:"Antigua and Barbuda",code:"+1",prefix:"268",iso:"AG",flag:"https://cdn.kcak11.com/CountryFlags/countries/ag.svg",mask:"(268) ___-____"},{name:"Argentina",code:"+54",prefix:null,iso:"AR",flag:"https://cdn.kcak11.com/CountryFlags/countries/ar.svg",mask:"(___) ___-____"},{name:"Armenia",code:"+374",prefix:null,iso:"AM",flag:"https://cdn.kcak11.com/CountryFlags/countries/am.svg",mask:"__-___-___"},{name:"Aruba",code:"+297",prefix:null,iso:"AW",flag:"https://cdn.kcak11.com/CountryFlags/countries/aw.svg",mask:"___-____"},{name:"Ascension Island",code:"+247",prefix:null,iso:"AC",flag:"https://cdn.kcak11.com/CountryFlags/countries/sh.svg",mask:"____"},{name:"Australia",code:"+61",prefix:null,iso:"AU",flag:"https://cdn.kcak11.com/CountryFlags/countries/au.svg",mask:"_-____-____"},{name:"Austria",code:"+43",prefix:null,iso:"AT",flag:"https://cdn.kcak11.com/CountryFlags/countries/at.svg",mask:"(___) ___-____"},{name:"Azerbaijan",code:"+994",prefix:null,iso:"AZ",flag:"https://cdn.kcak11.com/CountryFlags/countries/az.svg",mask:"__-___-__-__"},{name:"Bahamas",code:"+1",prefix:"242",iso:"BS",flag:"https://cdn.kcak11.com/CountryFlags/countries/bs.svg",mask:"(242) ___-____"},{name:"Bahrain",code:"+973",prefix:null,iso:"BH",flag:"https://cdn.kcak11.com/CountryFlags/countries/bh.svg",mask:"____-____"},{name:"Bangladesh",code:"+880",prefix:"1",iso:"BD",flag:"https://cdn.kcak11.com/CountryFlags/countries/bd.svg",mask:"1___-______"},{name:"Barbados",code:"+1",prefix:"246",iso:"BB",flag:"https://cdn.kcak11.com/CountryFlags/countries/bb.svg",mask:"(246) ___-____"},{name:"Belarus",code:"+375",prefix:null,iso:"BY",flag:"https://cdn.kcak11.com/CountryFlags/countries/by.svg",mask:"(__) ___-__-__"},{name:"Belgium",code:"+32",prefix:null,iso:"BE",flag:"https://cdn.kcak11.com/CountryFlags/countries/be.svg",mask:"(___) ___-___"},{name:"Belize",code:"+501",prefix:null,iso:"BZ",flag:"https://cdn.kcak11.com/CountryFlags/countries/bz.svg",mask:"___-____"},{name:"Benin",code:"+229",prefix:null,iso:"BJ",flag:"https://cdn.kcak11.com/CountryFlags/countries/bj.svg",mask:"__-__-____"},{name:"Bermuda",code:"+1",prefix:"441",iso:"BM",flag:"https://cdn.kcak11.com/CountryFlags/countries/bm.svg",mask:"(441) ___-____"},{name:"Bhutan",code:"+975",prefix:null,iso:"BT",flag:"https://cdn.kcak11.com/CountryFlags/countries/bt.svg",mask:"_-___-___"},{name:"Bolivia",code:"+591",prefix:null,iso:"BO",flag:"https://cdn.kcak11.com/CountryFlags/countries/bo.svg",mask:"_-___-____"},{name:"Bosnia and Herzegovina",code:"+387",prefix:null,iso:"BA",flag:"https://cdn.kcak11.com/CountryFlags/countries/ba.svg",mask:"__-_____"},{name:"Botswana",code:"+267",prefix:null,iso:"BW",flag:"https://cdn.kcak11.com/CountryFlags/countries/bw.svg",mask:"__-___-___"},{name:"Brasil",code:"+55",prefix:null,iso:"BR",flag:"https://cdn.kcak11.com/CountryFlags/countries/br.svg",mask:"(__) _____-____"},{name:"British Indian Ocean Territory",code:"+246",prefix:null,iso:"IO",flag:"https://cdn.kcak11.com/CountryFlags/countries/io.svg",mask:"___-____"},{name:"Brunei Darussalam",code:"+673",prefix:null,iso:"BN",flag:"https://cdn.kcak11.com/CountryFlags/countries/bn.svg",mask:"___-____"},{name:"Bulgaria",code:"+359",prefix:null,iso:"BG",flag:"https://cdn.kcak11.com/CountryFlags/countries/bg.svg",mask:"(___) ___-___"},{name:"Burkina Faso",code:"+226",prefix:null,iso:"BF",flag:"https://cdn.kcak11.com/CountryFlags/countries/bf.svg",mask:"__-__-____"},{name:"Burundi",code:"+257",prefix:null,iso:"BI",flag:"https://cdn.kcak11.com/CountryFlags/countries/bi.svg",mask:"__-__-____"},{name:"Cambodia",code:"+855",prefix:null,iso:"KH",flag:"https://cdn.kcak11.com/CountryFlags/countries/kh.svg",mask:"__-___-___"},{name:"Cameroon",code:"+237",prefix:null,iso:"CM",flag:"https://cdn.kcak11.com/CountryFlags/countries/cm.svg",mask:"____-____"},{name:"Canada",code:"+1",prefix:null,iso:"CA",flag:"https://cdn.kcak11.com/CountryFlags/countries/ca.svg",mask:"(___) ___-____"},{name:"Cape Verde",code:"+238",prefix:null,iso:"CV",flag:"https://cdn.kcak11.com/CountryFlags/countries/cv.svg",mask:"(___) __-__"},{name:"Cayman Islands",code:"+1",prefix:"345",iso:"KY",flag:"https://cdn.kcak11.com/CountryFlags/countries/ky.svg",mask:"(345) ___-____"},{name:"Central African Republic",code:"+236",prefix:null,iso:"CF",flag:"https://cdn.kcak11.com/CountryFlags/countries/cf.svg",mask:"__-__-____"},{name:"Chad",code:"+235",prefix:null,iso:"TD",flag:"https://cdn.kcak11.com/CountryFlags/countries/td.svg",mask:"__-__-__-__"},{name:"Chile",code:"+56",prefix:null,iso:"CL",flag:"https://cdn.kcak11.com/CountryFlags/countries/cl.svg",mask:"_-____-____"},{name:"China",code:"+86",prefix:null,iso:"CN",flag:"https://cdn.kcak11.com/CountryFlags/countries/cn.svg",mask:"__-_____-_____"},{name:"Christmas Island",code:"+61",prefix:null,iso:"CX",flag:"https://cdn.kcak11.com/CountryFlags/countries/cx.svg",mask:"_-____-____"},{name:"Cocos (Keeling) Islands",code:"+61",prefix:null,iso:"CC",flag:"https://cdn.kcak11.com/CountryFlags/countries/cc.svg",mask:"_-____-____"},{name:"Colombia",code:"+57",prefix:null,iso:"CO",flag:"https://cdn.kcak11.com/CountryFlags/countries/co.svg",mask:"(___) ___-____"},{name:"Comoros",code:"+269",prefix:null,iso:"KM",flag:"https://cdn.kcak11.com/CountryFlags/countries/km.svg",mask:"__-_____"},{name:"Congo",code:"+242",prefix:null,iso:"CG",flag:"https://cdn.kcak11.com/CountryFlags/countries/cg.svg",mask:"__-_____"},{name:"Cook Islands",code:"+682",prefix:null,iso:"CK",flag:"https://cdn.kcak11.com/CountryFlags/countries/ck.svg",mask:"__-___"},{name:"Costa Rica",code:"+506",prefix:null,iso:"CR",flag:"https://cdn.kcak11.com/CountryFlags/countries/cr.svg",mask:"____-____"},{name:"Croatia",code:"+385",prefix:null,iso:"HR",flag:"https://cdn.kcak11.com/CountryFlags/countries/hr.svg",mask:"__-___-___"},{name:"Cuba",code:"+53",prefix:null,iso:"CU",flag:"https://cdn.kcak11.com/CountryFlags/countries/cu.svg",mask:"_-___-____"},{name:"Cyprus",code:"+357",prefix:null,iso:"CY",flag:"https://cdn.kcak11.com/CountryFlags/countries/cy.svg",mask:"__-___-___"},{name:"Czech Republic",code:"+420",prefix:null,iso:"CZ",flag:"https://cdn.kcak11.com/CountryFlags/countries/cz.svg",mask:"(___) ___-___"},{name:"Democratic Republic of the Congo",code:"+243",prefix:null,iso:"CD",flag:"https://cdn.kcak11.com/CountryFlags/countries/cd.svg",mask:"(___) ___-___"},{name:"Denmark",code:"+45",prefix:null,iso:"DK",flag:"https://cdn.kcak11.com/CountryFlags/countries/dk.svg",mask:"__-__-__-__"},{name:"Djibouti",code:"+253",prefix:null,iso:"DJ",flag:"https://cdn.kcak11.com/CountryFlags/countries/dj.svg",mask:"__-__-__-__"},{name:"Dominica",code:"+1",prefix:"767",iso:"DM",flag:"https://cdn.kcak11.com/CountryFlags/countries/dm.svg",mask:"(767) ___-____"},{name:"Dominican Republic",code:"+1",prefix:"849",iso:"DO",flag:"https://cdn.kcak11.com/CountryFlags/countries/do.svg",mask:"(894) ___-____"},{name:"Ecuador",code:"+593",prefix:null,iso:"EC",flag:"https://cdn.kcak11.com/CountryFlags/countries/ec.svg",mask:"__-___-____"},{name:"Egypt",code:"+20",prefix:null,iso:"EG",flag:"https://cdn.kcak11.com/CountryFlags/countries/eg.svg",mask:"(___) ___-____"},{name:"El Salvador",code:"+503",prefix:null,iso:"SV",flag:"https://cdn.kcak11.com/CountryFlags/countries/sv.svg",mask:"__-__-____"},{name:"Equatorial Guinea",code:"+240",prefix:null,iso:"GQ",flag:"https://cdn.kcak11.com/CountryFlags/countries/gq.svg",mask:"__-___-____"},{name:"Eritrea",code:"+291",prefix:null,iso:"ER",flag:"https://cdn.kcak11.com/CountryFlags/countries/er.svg",mask:"_-___-___"},{name:"Estonia",code:"+372",prefix:null,iso:"EE",flag:"https://cdn.kcak11.com/CountryFlags/countries/ee.svg",mask:"____-____"},{name:"Eswatini",code:"+268",prefix:null,iso:"SZ",flag:"https://cdn.kcak11.com/CountryFlags/countries/sz.svg",mask:"__-__-____"},{name:"Ethiopia",code:"+251",prefix:null,iso:"ET",flag:"https://cdn.kcak11.com/CountryFlags/countries/et.svg",mask:"__-___-____"},{name:"Falkland Islands (Malvinas)",code:"+500",prefix:null,iso:"FK",flag:"https://cdn.kcak11.com/CountryFlags/countries/fk.svg",mask:"_____"},{name:"Faroe Islands",code:"+298",prefix:null,iso:"FO",flag:"https://cdn.kcak11.com/CountryFlags/countries/fo.svg",mask:"__ __ __"},{name:"Fiji",code:"+679",prefix:null,iso:"FJ",flag:"https://cdn.kcak11.com/CountryFlags/countries/fj.svg",mask:"__-_____"},{name:"Finland",code:"+358",prefix:null,iso:"FI",flag:"https://cdn.kcak11.com/CountryFlags/countries/fi.svg",mask:"__ ___ ____"},{name:"France",code:"+33",prefix:null,iso:"FR",flag:"https://cdn.kcak11.com/CountryFlags/countries/fr.svg",mask:"_ __ __ __ __"},{name:"French Guiana",code:"+594",prefix:null,iso:"GF",flag:"https://cdn.kcak11.com/CountryFlags/countries/gf.svg",mask:"___ __ __ __"},{name:"French Polynesia",code:"+689",prefix:null,iso:"PF",flag:"https://cdn.kcak11.com/CountryFlags/countries/pf.svg",mask:"__ __ __ __"},{name:"Gabon",code:"+241",prefix:null,iso:"GA",flag:"https://cdn.kcak11.com/CountryFlags/countries/ga.svg",mask:"_ __ __ __"},{name:"Gambia",code:"+220",prefix:null,iso:"GM",flag:"https://cdn.kcak11.com/CountryFlags/countries/gm.svg",mask:"___ ____"},{name:"Georgia",code:"+995",prefix:null,iso:"GE",flag:"https://cdn.kcak11.com/CountryFlags/countries/ge.svg",mask:"(___) ___-___"},{name:"Germany",code:"+49",prefix:"3",iso:"DE",flag:"https://cdn.kcak11.com/CountryFlags/countries/de.svg",mask:"(3____) __-____"},{name:"Ghana",code:"+233",prefix:"03",iso:"GH",flag:"https://cdn.kcak11.com/CountryFlags/countries/gh.svg",mask:"03_ ___ ____"},{name:"Gibraltar",code:"+350",prefix:null,iso:"GI",flag:"https://cdn.kcak11.com/CountryFlags/countries/gi.svg",mask:"___-_____"},{name:"Greece",code:"+30",prefix:null,iso:"GR",flag:"https://cdn.kcak11.com/CountryFlags/countries/gr.svg",mask:"(___) ___-____"},{name:"Greenland",code:"+299",prefix:null,iso:"GL",flag:"https://cdn.kcak11.com/CountryFlags/countries/gl.svg",mask:"__-__-__"},{name:"Grenada",code:"+1",prefix:"473",iso:"GD",flag:"https://cdn.kcak11.com/CountryFlags/countries/gd.svg",mask:"(473) ___-____"},{name:"Guadeloupe",code:"+590",prefix:null,iso:"GP",flag:"https://cdn.kcak11.com/CountryFlags/countries/gp.svg",mask:"___ __ __ __"},{name:"Guam",code:"+1",prefix:"671",iso:"GU",flag:"https://cdn.kcak11.com/CountryFlags/countries/gu.svg",mask:"671 ___ ____"},{name:"Guatemala",code:"+502",prefix:null,iso:"GT",flag:"https://cdn.kcak11.com/CountryFlags/countries/gt.svg",mask:"_-___-____"},{name:"Guernsey",code:"+44",prefix:null,iso:"GG",flag:"https://cdn.kcak11.com/CountryFlags/countries/gg.svg",mask:"(____) ______"},{name:"Guinea",code:"+224",prefix:null,iso:"GN",flag:"https://cdn.kcak11.com/CountryFlags/countries/gn.svg",mask:"__-___-___"},{name:"Guinea-Bissau",code:"+245",prefix:null,iso:"GW",flag:"https://cdn.kcak11.com/CountryFlags/countries/gw.svg",mask:"_-______"},{name:"Guyana",code:"+592",prefix:null,iso:"GY",flag:"https://cdn.kcak11.com/CountryFlags/countries/gy.svg",mask:"___-____"},{name:"Haiti",code:"+509",prefix:null,iso:"HT",flag:"https://cdn.kcak11.com/CountryFlags/countries/ht.svg",mask:"__-__-____"},{name:"Holy See (Vatican City State)",code:"+39",prefix:"06698",iso:"VA",flag:"https://cdn.kcak11.com/CountryFlags/countries/va.svg",mask:"06 698_____"},{name:"Honduras",code:"+504",prefix:null,iso:"HN",flag:"https://cdn.kcak11.com/CountryFlags/countries/hn.svg",mask:"____-____"},{name:"Hong Kong",code:"+852",prefix:null,iso:"HK",flag:"https://cdn.kcak11.com/CountryFlags/countries/hk.svg",mask:"____-____"},{name:"Hungary",code:"+36",prefix:null,iso:"HU",flag:"https://cdn.kcak11.com/CountryFlags/countries/hu.svg",mask:"__ ___ ____"},{name:"Iceland",code:"+354",prefix:null,iso:"IS",flag:"https://cdn.kcak11.com/CountryFlags/countries/is.svg",mask:"___-____"},{name:"India",code:"+91",prefix:null,iso:"IN",flag:"https://cdn.kcak11.com/CountryFlags/countries/in.svg",mask:"(____) ___-___"},{name:"Indonesia",code:"+62",prefix:"8",iso:"ID",flag:"https://cdn.kcak11.com/CountryFlags/countries/id.svg",mask:"(8__) ___-__-___"},{name:"Iran",code:"+98",prefix:null,iso:"IR",flag:"https://cdn.kcak11.com/CountryFlags/countries/ir.svg",mask:"(___) ___-____"},{name:"Iraq",code:"+964",prefix:null,iso:"IQ",flag:"https://cdn.kcak11.com/CountryFlags/countries/iq.svg",mask:"(___) ___-____"},{name:"Ireland",code:"+353",prefix:null,iso:"IE",flag:"https://cdn.kcak11.com/CountryFlags/countries/ie.svg",mask:"(___) ___-___"},{name:"Isle of Man",code:"+44",prefix:null,iso:"IM",flag:"https://cdn.kcak11.com/CountryFlags/countries/im.svg",mask:"(____) ______"},{name:"Israel",code:"+972",prefix:"5",iso:"IL",flag:"https://cdn.kcak11.com/CountryFlags/countries/il.svg",mask:"__-___-____"},{name:"Italy",code:"+39",prefix:null,iso:"IT",flag:"https://cdn.kcak11.com/CountryFlags/countries/it.svg",mask:"(___) ____-___"},{name:"Ivory Coast / Cote d'Ivoire",code:"+225",prefix:null,iso:"CI",flag:"https://cdn.kcak11.com/CountryFlags/countries/ci.svg",mask:"__-___-___"},{name:"Jamaica",code:"+1",prefix:"876",iso:"JM",flag:"https://cdn.kcak11.com/CountryFlags/countries/jm.svg",mask:"(876) ___-____"},{name:"Japan",code:"+81",prefix:null,iso:"JP",flag:"https://cdn.kcak11.com/CountryFlags/countries/jp.svg",mask:"__-____-____"},{name:"Jersey",code:"+44",prefix:null,iso:"JE",flag:"https://cdn.kcak11.com/CountryFlags/countries/je.svg",mask:"(____) ____-______"},{name:"Jordan",code:"+962",prefix:null,iso:"JO",flag:"https://cdn.kcak11.com/CountryFlags/countries/jo.svg",mask:"_-____-____"},{name:"Kazakhstan",code:"+77",prefix:null,iso:"KZ",flag:"https://cdn.kcak11.com/CountryFlags/countries/kz.svg",mask:"(_____) _ __ __"},{name:"Kenya",code:"+254",prefix:null,iso:"KE",flag:"https://cdn.kcak11.com/CountryFlags/countries/ke.svg",mask:"___-______"},{name:"Kiribati",code:"+686",prefix:null,iso:"KI",flag:"https://cdn.kcak11.com/CountryFlags/countries/ki.svg",mask:"__-___"},{name:"Korea, Democratic People's Republic of Korea",code:"+850",prefix:null,iso:"KP",flag:"https://cdn.kcak11.com/CountryFlags/countries/kp.svg",mask:"____-_____________"},{name:"Korea, Republic of South Korea",code:"+82",prefix:null,iso:"KR",flag:"https://cdn.kcak11.com/CountryFlags/countries/kr.svg",mask:"__-___-____"},{name:"Kosovo",code:"+383",prefix:null,iso:"XK",flag:"https://cdn.kcak11.com/CountryFlags/countries/xk.svg",mask:"___-___-___"},{name:"Kuwait",code:"+965",prefix:null,iso:"KW",flag:"https://cdn.kcak11.com/CountryFlags/countries/kw.svg",mask:"____-____"},{name:"Kyrgyzstan",code:"+996",prefix:null,iso:"KG",flag:"https://cdn.kcak11.com/CountryFlags/countries/kg.svg",mask:"(___) ___-___"},{name:"Laos",code:"+856",prefix:"20",iso:"LA",flag:"https://cdn.kcak11.com/CountryFlags/countries/la.svg",mask:"(20__) ___-___"},{name:"Latvia",code:"+371",prefix:null,iso:"LV",flag:"https://cdn.kcak11.com/CountryFlags/countries/lv.svg",mask:"__-___-___"},{name:"Lebanon",code:"+961",prefix:null,iso:"LB",flag:"https://cdn.kcak11.com/CountryFlags/countries/lb.svg",mask:"__-___-___"},{name:"Lesotho",code:"+266",prefix:null,iso:"LS",flag:"https://cdn.kcak11.com/CountryFlags/countries/ls.svg",mask:"_-___-____"},{name:"Liberia",code:"+231",prefix:null,iso:"LR",flag:"https://cdn.kcak11.com/CountryFlags/countries/lr.svg",mask:"__-___-___"},{name:"Libya",code:"+218",prefix:"21",iso:"LY",flag:"https://cdn.kcak11.com/CountryFlags/countries/ly.svg",mask:"21-___-____"},{name:"Liechtenstein",code:"+423",prefix:null,iso:"LI",flag:"https://cdn.kcak11.com/CountryFlags/countries/li.svg",mask:"(___) ___-____"},{name:"Lithuania",code:"+370",prefix:null,iso:"LT",flag:"https://cdn.kcak11.com/CountryFlags/countries/lt.svg",mask:"(___) __-___"},{name:"Luxembourg",code:"+352",prefix:null,iso:"LU",flag:"https://cdn.kcak11.com/CountryFlags/countries/lu.svg",mask:"(___) ___-___"},{name:"Macau",code:"+853",prefix:null,iso:"MO",flag:"https://cdn.kcak11.com/CountryFlags/countries/mo.svg",mask:"____-____"},{name:"Madagascar",code:"+261",prefix:null,iso:"MG",flag:"https://cdn.kcak11.com/CountryFlags/countries/mg.svg",mask:"__-__-_____"},{name:"Malawi",code:"+265",prefix:null,iso:"MW",flag:"https://cdn.kcak11.com/CountryFlags/countries/mw.svg",mask:"_-____-____"},{name:"Malaysia",code:"+60",prefix:null,iso:"MY",flag:"https://cdn.kcak11.com/CountryFlags/countries/my.svg",mask:"__-___-____"},{name:"Maldives",code:"+960",prefix:null,iso:"MV",flag:"https://cdn.kcak11.com/CountryFlags/countries/mv.svg",mask:"___-____"},{name:"Mali",code:"+223",prefix:null,iso:"ML",flag:"https://cdn.kcak11.com/CountryFlags/countries/ml.svg",mask:"__-__-____"},{name:"Malta",code:"+356",prefix:null,iso:"MT",flag:"https://cdn.kcak11.com/CountryFlags/countries/mt.svg",mask:"____-____"},{name:"Marshall Islands",code:"+692",prefix:null,iso:"MH",flag:"https://cdn.kcak11.com/CountryFlags/countries/mh.svg",mask:"___-____"},{name:"Martinique",code:"+596",prefix:null,iso:"MQ",flag:"https://cdn.kcak11.com/CountryFlags/countries/mq.svg",mask:"(___) __-__-__"},{name:"Mauritania",code:"+222",prefix:null,iso:"MR",flag:"https://cdn.kcak11.com/CountryFlags/countries/mr.svg",mask:"__-__-____"},{name:"Mauritius",code:"+230",prefix:null,iso:"MU",flag:"https://cdn.kcak11.com/CountryFlags/countries/mu.svg",mask:"___-____"},{name:"Mayotte",code:"+262",prefix:null,iso:"YT",flag:"https://cdn.kcak11.com/CountryFlags/countries/yt.svg",mask:"_____-____"},{name:"Mexico",code:"+52",prefix:null,iso:"MX",flag:"https://cdn.kcak11.com/CountryFlags/countries/mx.svg",mask:"(___) ___-____"},{name:"Micronesia, Federated States of Micronesia",code:"+691",prefix:null,iso:"FM",flag:"https://cdn.kcak11.com/CountryFlags/countries/fm.svg",mask:"___-____"},{name:"Moldova",code:"+373",prefix:null,iso:"MD",flag:"https://cdn.kcak11.com/CountryFlags/countries/md.svg",mask:"____-____"},{name:"Monaco",code:"+377",prefix:null,iso:"MC",flag:"https://cdn.kcak11.com/CountryFlags/countries/mc.svg",mask:"(___) ___-___"},{name:"Mongolia",code:"+976",prefix:null,iso:"MN",flag:"https://cdn.kcak11.com/CountryFlags/countries/mn.svg",mask:"__-__-____"},{name:"Montenegro",code:"+382",prefix:null,iso:"ME",flag:"https://cdn.kcak11.com/CountryFlags/countries/me.svg",mask:"__-___-___"},{name:"Montserrat",code:"+1",prefix:"664",iso:"MS",flag:"https://cdn.kcak11.com/CountryFlags/countries/ms.svg",mask:"(664) ___-____"},{name:"Morocco",code:"+212",prefix:null,iso:"MA",flag:"https://cdn.kcak11.com/CountryFlags/countries/ma.svg",mask:"__-____-___"},{name:"Mozambique",code:"+258",prefix:null,iso:"MZ",flag:"https://cdn.kcak11.com/CountryFlags/countries/mz.svg",mask:"__-___-___"},{name:"Myanmar",code:"+95",prefix:null,iso:"MM",flag:"https://cdn.kcak11.com/CountryFlags/countries/mm.svg",mask:"__-___-___"},{name:"Namibia",code:"+264",prefix:null,iso:"NA",flag:"https://cdn.kcak11.com/CountryFlags/countries/na.svg",mask:"__-___-____"},{name:"Nauru",code:"+674",prefix:null,iso:"NR",flag:"https://cdn.kcak11.com/CountryFlags/countries/nr.svg",mask:"___-____"},{name:"Nepal",code:"+977",prefix:null,iso:"NP",flag:"https://cdn.kcak11.com/CountryFlags/countries/np.svg",mask:"__-___-___"},{name:"Netherlands",code:"+31",prefix:null,iso:"NL",flag:"https://cdn.kcak11.com/CountryFlags/countries/nl.svg",mask:"__-___-____"},{name:"New Caledonia",code:"+687",prefix:null,iso:"NC",flag:"https://cdn.kcak11.com/CountryFlags/countries/nc.svg",mask:"__-____"},{name:"New Zealand",code:"+64",prefix:null,iso:"NZ",flag:"https://cdn.kcak11.com/CountryFlags/countries/nz.svg",mask:"(___) ___-____"},{name:"Nicaragua",code:"+505",prefix:null,iso:"NI",flag:"https://cdn.kcak11.com/CountryFlags/countries/ni.svg",mask:"____-____"},{name:"Niger",code:"+227",prefix:null,iso:"NE",flag:"https://cdn.kcak11.com/CountryFlags/countries/ne.svg",mask:"__-__-____"},{name:"Nigeria",code:"+234",prefix:null,iso:"NG",flag:"https://cdn.kcak11.com/CountryFlags/countries/ng.svg",mask:"(___) ___-____"},{name:"Niue",code:"+683",prefix:null,iso:"NU",flag:"https://cdn.kcak11.com/CountryFlags/countries/nu.svg",mask:"____"},{name:"Norfolk Island",code:"+672",prefix:"3",iso:"NF",flag:"https://cdn.kcak11.com/CountryFlags/countries/nf.svg",mask:"3__-___"},{name:"North Macedonia",code:"+389",prefix:null,iso:"MK",flag:"https://cdn.kcak11.com/CountryFlags/countries/mk.svg",mask:"__-___-___"},{name:"Northern Mariana Islands",code:"+1",prefix:"670",iso:"MP",flag:"https://cdn.kcak11.com/CountryFlags/countries/mp.svg",mask:"(670) ___-____"},{name:"Norway",code:"+47",prefix:null,iso:"NO",flag:"https://cdn.kcak11.com/CountryFlags/countries/no.svg",mask:"(___) __-___"},{name:"Oman",code:"+968",prefix:null,iso:"OM",flag:"https://cdn.kcak11.com/CountryFlags/countries/om.svg",mask:"__-___-___"},{name:"Pakistan",code:"+92",prefix:null,iso:"PK",flag:"https://cdn.kcak11.com/CountryFlags/countries/pk.svg",mask:"(___) ___-____"},{name:"Palau",code:"+680",prefix:null,iso:"PW",flag:"https://cdn.kcak11.com/CountryFlags/countries/pw.svg",mask:"___-____"},{name:"Palestine",code:"+970",prefix:null,iso:"PS",flag:"https://cdn.kcak11.com/CountryFlags/countries/ps.svg",mask:"__-___-____"},{name:"Panama",code:"+507",prefix:null,iso:"PA",flag:"https://cdn.kcak11.com/CountryFlags/countries/pa.svg",mask:"___-____"},{name:"Papua New Guinea",code:"+675",prefix:null,iso:"PG",flag:"https://cdn.kcak11.com/CountryFlags/countries/pg.svg",mask:"(___) __-___"},{name:"Paraguay",code:"+595",prefix:null,iso:"PY",flag:"https://cdn.kcak11.com/CountryFlags/countries/py.svg",mask:"(___) ___-___"},{name:"Peru",code:"+51",prefix:null,iso:"PE",flag:"https://cdn.kcak11.com/CountryFlags/countries/pe.svg",mask:"(___) ___-___"},{name:"Philippines",code:"+63",prefix:null,iso:"PH",flag:"https://cdn.kcak11.com/CountryFlags/countries/ph.svg",mask:"(___) ___-____"},{name:"Pitcairn",code:"+870",prefix:null,iso:"PN",flag:"https://cdn.kcak11.com/CountryFlags/countries/pn.svg",mask:"___-___-___"},{name:"Poland",code:"+48",prefix:null,iso:"PL",flag:"https://cdn.kcak11.com/CountryFlags/countries/pl.svg",mask:"(___) ___-___"},{name:"Portugal",code:"+351",prefix:null,iso:"PT",flag:"https://cdn.kcak11.com/CountryFlags/countries/pt.svg",mask:"__-___-____"},{name:"Puerto Rico",code:"+1",prefix:null,iso:"PR",flag:"https://cdn.kcak11.com/CountryFlags/countries/pr.svg",mask:"(___) ___ ____"},{name:"Qatar",code:"+974",prefix:null,iso:"QA",flag:"https://cdn.kcak11.com/CountryFlags/countries/qa.svg",mask:"____-____"},{name:"Reunion",code:"+262",prefix:null,iso:"RE",flag:"https://cdn.kcak11.com/CountryFlags/countries/re.svg",mask:"_____-____"},{name:"Romania",code:"+40",prefix:null,iso:"RO",flag:"https://cdn.kcak11.com/CountryFlags/countries/ro.svg",mask:"__-___-____"},{name:"Russia",code:"+7",prefix:null,iso:"RU",flag:"https://cdn.kcak11.com/CountryFlags/countries/ru.svg",mask:"(___) ___-__-__"},{name:"Rwanda",code:"+250",prefix:null,iso:"RW",flag:"https://cdn.kcak11.com/CountryFlags/countries/rw.svg",mask:"(___) ___-___"},{name:"Saint Barthelemy",code:"+590",prefix:null,iso:"BL",flag:"https://cdn.kcak11.com/CountryFlags/countries/bl.svg",mask:"___-__-__-__"},{name:"Saint Helena, Ascension and Tristan Da Cunha",code:"+290",prefix:null,iso:"SH",flag:"https://cdn.kcak11.com/CountryFlags/countries/sh.svg",mask:"____"},{name:"Saint Kitts and Nevis",code:"+1",prefix:null,iso:"KN",flag:"https://cdn.kcak11.com/CountryFlags/countries/kn.svg",mask:"(869) ___-____"},{name:"Saint Lucia",code:"+1",prefix:"758",iso:"LC",flag:"https://cdn.kcak11.com/CountryFlags/countries/lc.svg",mask:"(758) ___-____"},{name:"Saint Martin",code:"+590",prefix:null,iso:"MF",flag:"https://cdn.kcak11.com/CountryFlags/countries/mf.svg",mask:"(___) ___-___"},{name:"Saint Pierre and Miquelon",code:"+508",prefix:null,iso:"PM",flag:"https://cdn.kcak11.com/CountryFlags/countries/pm.svg",mask:"__-____"},{name:"Saint Vincent and the Grenadines",code:"+1",prefix:"784",iso:"VC",flag:"https://cdn.kcak11.com/CountryFlags/countries/vc.svg",mask:"(784) ___-____"},{name:"Samoa",code:"+685",prefix:null,iso:"WS",flag:"https://cdn.kcak11.com/CountryFlags/countries/ws.svg",mask:"__-____"},{name:"San Marino",code:"+378",prefix:null,iso:"SM",flag:"https://cdn.kcak11.com/CountryFlags/countries/sm.svg",mask:"____-______"},{name:"Sao Tome and Principe",code:"+239",prefix:null,iso:"ST",flag:"https://cdn.kcak11.com/CountryFlags/countries/st.svg",mask:"__-_____"},{name:"Saudi Arabia",code:"+966",prefix:null,iso:"SA",flag:"https://cdn.kcak11.com/CountryFlags/countries/sa.svg",mask:"_-____-____"},{name:"Senegal",code:"+221",prefix:null,iso:"SN",flag:"https://cdn.kcak11.com/CountryFlags/countries/sn.svg",mask:"__-___-____"},{name:"Serbia",code:"+381",prefix:null,iso:"RS",flag:"https://cdn.kcak11.com/CountryFlags/countries/rs.svg",mask:"__-___-____"},{name:"Seychelles",code:"+248",prefix:null,iso:"SC",flag:"https://cdn.kcak11.com/CountryFlags/countries/sc.svg",mask:"_-___-___"},{name:"Sierra Leone",code:"+232",prefix:null,iso:"SL",flag:"https://cdn.kcak11.com/CountryFlags/countries/sl.svg",mask:"__-______"},{name:"Singapore",code:"+65",prefix:null,iso:"SG",flag:"https://cdn.kcak11.com/CountryFlags/countries/sg.svg",mask:"____-____"},{name:"Sint Maarten",code:"+1",prefix:"721",iso:"SX",flag:"https://cdn.kcak11.com/CountryFlags/countries/sx.svg",mask:"(721) ___-____"},{name:"Slovakia",code:"+421",prefix:null,iso:"SK",flag:"https://cdn.kcak11.com/CountryFlags/countries/sk.svg",mask:"(___) ___-___"},{name:"Slovenia",code:"+386",prefix:null,iso:"SI",flag:"https://cdn.kcak11.com/CountryFlags/countries/si.svg",mask:"__-___-___"},{name:"Solomon Islands",code:"+677",prefix:null,iso:"SB",flag:"https://cdn.kcak11.com/CountryFlags/countries/sb.svg",mask:"___-____"},{name:"Somalia",code:"+252",prefix:null,iso:"SO",flag:"https://cdn.kcak11.com/CountryFlags/countries/so.svg",mask:"__-___-___"},{name:"South Africa",code:"+27",prefix:null,iso:"ZA",flag:"https://cdn.kcak11.com/CountryFlags/countries/za.svg",mask:"__-___-____"},{name:"South Georgia and the South Sandwich Islands",code:"+500",prefix:null,iso:"GS",flag:"https://cdn.kcak11.com/CountryFlags/countries/gs.svg",mask:"_____"},{name:"South Sudan",code:"+211",prefix:null,iso:"SS",flag:"https://cdn.kcak11.com/CountryFlags/countries/ss.svg",mask:"__-___-____"},{name:"Spain",code:"+34",prefix:null,iso:"ES",flag:"https://cdn.kcak11.com/CountryFlags/countries/es.svg",mask:"(___) ___-___"},{name:"Sri Lanka",code:"+94",prefix:null,iso:"LK",flag:"https://cdn.kcak11.com/CountryFlags/countries/lk.svg",mask:"__-___-____"},{name:"Sudan",code:"+249",prefix:null,iso:"SD",flag:"https://cdn.kcak11.com/CountryFlags/countries/sd.svg",mask:"__-___-____"},{name:"Suriname",code:"+597",prefix:null,iso:"SR",flag:"https://cdn.kcak11.com/CountryFlags/countries/sr.svg",mask:"___-____"},{name:"Svalbard and Jan Mayen",code:"+47",prefix:null,iso:"SJ",flag:"https://cdn.kcak11.com/CountryFlags/countries/sj.svg",mask:"(___) __-___"},{name:"Sweden",code:"+46",prefix:null,iso:"SE",flag:"https://cdn.kcak11.com/CountryFlags/countries/se.svg",mask:"__-___-____"},{name:"Switzerland",code:"+41",prefix:null,iso:"CH",flag:"https://cdn.kcak11.com/CountryFlags/countries/ch.svg",mask:"__-___-____"},{name:"Syrian Arab Republic",code:"+963",prefix:null,iso:"SY",flag:"https://cdn.kcak11.com/CountryFlags/countries/sy.svg",mask:"__-____-___"},{name:"Taiwan",code:"+886",prefix:null,iso:"TW",flag:"https://cdn.kcak11.com/CountryFlags/countries/tw.svg",mask:"_-____-____"},{name:"Tajikistan",code:"+992",prefix:null,iso:"TJ",flag:"https://cdn.kcak11.com/CountryFlags/countries/tj.svg",mask:"__-___-____"},{name:"United Republic of Tanzania",code:"+255",prefix:null,iso:"TZ",flag:"https://cdn.kcak11.com/CountryFlags/countries/tz.svg",mask:"__-___-____"},{name:"Thailand",code:"+66",prefix:null,iso:"TH",flag:"https://cdn.kcak11.com/CountryFlags/countries/th.svg",mask:"__-___-____"},{name:"Timor-Leste",code:"+670",prefix:null,iso:"TL",flag:"https://cdn.kcak11.com/CountryFlags/countries/tl.svg",mask:"___-_____"},{name:"Togo",code:"+228",prefix:null,iso:"TG",flag:"https://cdn.kcak11.com/CountryFlags/countries/tg.svg",mask:"__-___-___"},{name:"Tokelau",code:"+690",prefix:null,iso:"TK",flag:"https://cdn.kcak11.com/CountryFlags/countries/tk.svg",mask:"____"},{name:"Tonga",code:"+676",prefix:null,iso:"TO",flag:"https://cdn.kcak11.com/CountryFlags/countries/to.svg",mask:"_____"},{name:"Trinidad and Tobago",code:"+1",prefix:"868",iso:"TT",flag:"https://cdn.kcak11.com/CountryFlags/countries/tt.svg",mask:"(868) ___-____"},{name:"Tunisia",code:"+216",prefix:null,iso:"TN",flag:"https://cdn.kcak11.com/CountryFlags/countries/tn.svg",mask:"__-___-___"},{name:"Turkey",code:"+90",prefix:null,iso:"TR",flag:"https://cdn.kcak11.com/CountryFlags/countries/tr.svg",mask:"(___) ___-____"},{name:"Turkmenistan",code:"+993",prefix:null,iso:"TM",flag:"https://cdn.kcak11.com/CountryFlags/countries/tm.svg",mask:"_-___-____"},{name:"Turks and Caicos Islands",code:"+1",prefix:"249",iso:"TC",flag:"https://cdn.kcak11.com/CountryFlags/countries/tc.svg",mask:"(249) ___-___"},{name:"Tuvalu",code:"+688",prefix:null,iso:"TV",flag:"https://cdn.kcak11.com/CountryFlags/countries/tv.svg",mask:"______"},{name:"Uganda",code:"+256",prefix:null,iso:"UG",flag:"https://cdn.kcak11.com/CountryFlags/countries/ug.svg",mask:"(___) ___-___"},{name:"Ukraine",code:"+380",prefix:null,iso:"UA",flag:"https://cdn.kcak11.com/CountryFlags/countries/ua.svg",mask:"(__) ___-__-__"},{name:"United Arab Emirates",code:"+971",prefix:null,iso:"AE",flag:"https://cdn.kcak11.com/CountryFlags/countries/ae.svg",mask:"_-___-____"},{name:"United Kingdom",code:"+44",prefix:null,iso:"GB",flag:"https://cdn.kcak11.com/CountryFlags/countries/gb.svg",mask:"__-____-____"},{name:"United States",code:"+1",prefix:"408",iso:"US",flag:"https://cdn.kcak11.com/CountryFlags/countries/us.svg",mask:"(408) ___-____"},{name:"Uruguay",code:"+598",prefix:null,iso:"UY",flag:"https://cdn.kcak11.com/CountryFlags/countries/uy.svg",mask:"_-___-__-__"},{name:"Uzbekistan",code:"+998",prefix:null,iso:"UZ",flag:"https://cdn.kcak11.com/CountryFlags/countries/uz.svg",mask:"__-___-____"},{name:"Vanuatu",code:"+678",prefix:null,iso:"VU",flag:"https://cdn.kcak11.com/CountryFlags/countries/vu.svg",mask:"__-_____"},{name:"Venezuela, Bolivarian Republic of Venezuela",code:"+58",prefix:null,iso:"VE",flag:"https://cdn.kcak11.com/CountryFlags/countries/ve.svg",mask:"(___) ___-____"},{name:"Vietnam",code:"+84",prefix:null,iso:"VN",flag:"https://cdn.kcak11.com/CountryFlags/countries/vn.svg",mask:"(___) ____-___"},{name:"Virgin Islands, British",code:"+1",prefix:"284",iso:"VG",flag:"https://cdn.kcak11.com/CountryFlags/countries/vg.svg",mask:"(284) ___-____"},{name:"Virgin Islands, U.S.",code:"+1",prefix:"340",iso:"VI",flag:"https://cdn.kcak11.com/CountryFlags/countries/vi.svg",mask:"(340) ___-____"},{name:"Wallis and Futuna",code:"+681",prefix:null,iso:"WF",flag:"https://cdn.kcak11.com/CountryFlags/countries/wf.svg",mask:"__-____"},{name:"Yemen",code:"+967",prefix:null,iso:"YE",flag:"https://cdn.kcak11.com/CountryFlags/countries/ye.svg",mask:"___-___-___"},{name:"Zambia",code:"+260",prefix:null,iso:"ZM",flag:"https://cdn.kcak11.com/CountryFlags/countries/zm.svg",mask:"__-___-____"},{name:"Zimbabwe",code:"+263",prefix:null,iso:"ZW",flag:"https://cdn.kcak11.com/CountryFlags/countries/zw.svg",mask:"_-______"}],Bn={USD:{countryLanguage:"en-US",countryCurrency:"USD"},EUR:{countryLanguage:"de-DE",countryCurrency:"EUR"},JPY:{countryLanguage:"ja-JP",countryCurrency:"JPY"},GBP:{countryLanguage:"en-GB",countryCurrency:"GBP"},AUD:{countryLanguage:"en-AU",countryCurrency:"AUD"},CAD:{countryLanguage:"en-CA",countryCurrency:"CAD"},CHF:{countryLanguage:"de-CH",countryCurrency:"CHF"},CNY:{countryLanguage:"zh-CN",countryCurrency:"CNY"},SEK:{countryLanguage:"sv-SE",countryCurrency:"SEK"},NZD:{countryLanguage:"en-NZ",countryCurrency:"NZD"},BRL:{countryLanguage:"pt-BR",countryCurrency:"BRL"},INR:{countryLanguage:"en-IN",countryCurrency:"INR"},RUB:{countryLanguage:"ru-RU",countryCurrency:"RUB"},ZAR:{countryLanguage:"en-ZA",countryCurrency:"ZAR"},MXN:{countryLanguage:"es-MX",countryCurrency:"MXN"},SGD:{countryLanguage:"en-SG",countryCurrency:"SGD"},HKD:{countryLanguage:"zh-HK",countryCurrency:"HKD"},NOK:{countryLanguage:"nb-NO",countryCurrency:"NOK"},KRW:{countryLanguage:"ko-KR",countryCurrency:"KRW"},TRY:{countryLanguage:"tr-TR",countryCurrency:"TRY"},IDR:{countryLanguage:"id-ID",countryCurrency:"IDR"},THB:{countryLanguage:"th-TH",countryCurrency:"THB"}},$a=e=>e.replace(new RegExp("(?:R\\$|\\p{Sc}|[$€¥£])","gu"),"").trim(),jn=(e,t,n={showPrefix:!0})=>{if(!Bn[t])throw new Error("Unsupported currency code");const{countryCurrency:r,countryLanguage:a}=Bn[t],s=new Intl.NumberFormat(a,{style:"currency",currency:r}).format(e);return n.showPrefix?s.replace(/\s/g," "):$a(s).replace(/\s/g," ")};Gt({NINE:"(99) 99999-9999"}.NINE).length;function Ba(e){let t=e;return typeof e=="string"?(t=+Gt(e),t%1!==0&&(t=t.toFixed(2))):t=Number.isInteger(e)?Number(e)*10**2:e.toFixed(2),+Gt(String(t))/10**2}function Ut(e,t){if(!e)return[0,jn(0,t)];const n=Ba(e),r=jn(n,t);return[n,r]}function ja(e){const{name:t,disabled:n,title:r,style:a,variant:s="solid",label:o,className:i="",value:l,defaultValue:u,max:f,locale:d,onChange:_,prefix:p,suffix:g,isLoading:h=!1,leftIcon:v,readOnly:b,onFocus:w,onBlur:k,errorMessage:S,showAsterisk:V,rightIcon:j,size:O="md",id:G,...A}=e,{fieldErrors:x}=ye(),[P,D]=m.useState(!1),[F,H]=m.useState("0"),L=m.useRef(null),z=G||m.useId(),M=S||(x==null?void 0:x[t]),Q=!!M,E=n||h,re={md:20,lg:20}[O],ee=j?"right":"left",be=ee==="left"&&h,le=ee==="right"&&h;function se(){E||!(L!=null&&L.current)||(D(!0),L.current.focus())}function oe(ge){D(!0),w&&w(ge)}function $(ge){D(!1),k&&k(ge)}const Z=ge=>{const[De,Ve]=Ut(ge,d);return!f||De<=f?(H(Ve),[De,Ve]):Ut(ge,d)},Ie=ge=>{ge.preventDefault();const[De,Ve]=Z(ge.target.value);_&&_(ge,String(De),String(Ve))};m.useEffect(()=>{const ge=l||+u||void 0,[,De]=Ut(ge,d);H(De)},[d,u,l]);const wn=`arkynCurrencyInput ${p?"hasPrefix":""} ${g?"hasSuffix":""} ${s} ${O} ${E||b||h?"opacity":""} ${Q?"errored":""} ${P?"focused":""} ${i}`;return c.jsxs(me,{children:[o&&c.jsx(fe,{showAsterisk:V,htmlFor:z,children:o}),c.jsxs("section",{title:r,style:a,onClick:se,className:wn,children:[c.jsx(X,{iconSize:re,icon:p,className:"prefix"}),c.jsx(X,{show:be,iconSize:re,className:"spinner",icon:B.Loader2}),c.jsx(X,{show:!h,icon:v,iconSize:re}),c.jsx("input",{value:F,disabled:E,readOnly:b,ref:L,onFocus:oe,onBlur:$,onChange:Ie,id:z,name:t,...A}),c.jsx(X,{show:!h,icon:j,iconSize:re}),c.jsx(X,{show:le,iconSize:re,className:"spinner",icon:B.Loader2}),c.jsx(X,{iconSize:re,icon:g,className:"suffix"})]}),M&&c.jsx(ke,{children:M})]})}function za(){return typeof window>"u"?0:window.innerWidth-document.documentElement.clientWidth}function Xe(e){m.useEffect(()=>{if(e){const t=document.body.style.overflow,n=document.body.style.paddingRight,r=za();if(r>0){const a=window.getComputedStyle(document.body),s=parseInt(a.paddingRight)||0;document.body.style.paddingRight=`${s+r}px`}return document.body.style.overflow="hidden",()=>{document.body.style.overflow=t,document.body.style.paddingRight=n}}},[e])}const zn=m.createContext({});function Ha(e){return c.jsx(zn.Provider,{value:{makeInvisible:e.makeInvisible},children:e.children})}function Ga(){return m.useContext(zn)}function Ua(e){const{isVisible:t,makeInvisible:n,orientation:r="left",children:a,className:s,...o}=e;Xe(t);const i=r==="left"?"-100%":"100%",u=`arkynDrawerContainer ${r} ${t?"visibleTrue":"visibleFalse"} ${s}`;return c.jsx(Ha,{makeInvisible:n,children:c.jsx(Le.AnimatePresence,{children:t&&c.jsxs("aside",{className:u.trim(),...o,children:[c.jsx(Le.motion.div,{className:"arkynDrawerContainerOverlay",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:n}),c.jsx(Le.motion.div,{className:"arkynDrawerContainerContent",transition:{ease:"easeOut",duration:.15},initial:{transform:`translateX(${i})`},animate:{transform:"translateX(0px)"},exit:{transform:`translateX(${i})`},children:a})]})})})}function Va(e){const{showCloseButton:t=!0,className:n,children:r,...a}=e,{makeInvisible:s}=Ga(),o=`arkynDrawerHeader ${n}`;return c.jsxs("header",{className:o.trim(),...a,children:[r,t&&c.jsx("button",{className:"arkynDrawerHeaderCloseButton",type:"button",onClick:s,"aria-label":"Close drawer",children:c.jsx(B.X,{size:24})})]})}function qa(e){const{disabled:t,file:n,isLoading:r,acceptFile:a,changeFileButtonText:s,handleSelectFile:o,reSendFile:i}=e;function l(){if(t)return;const f=document.createElement("input");f.type="file",f.accept=a,f.onchange=d=>{var p;const _=(p=d.target.files)==null?void 0:p[0];_&&o(_)},f.click()}function u(){return n.type.startsWith("image/")?c.jsx(B.FileImage,{}):n.type.startsWith("audio/")?c.jsx(B.FileAudio,{}):n.type.startsWith("application/zip")?c.jsx(B.FileArchive,{}):c.jsx(B.File,{})}return c.jsxs("div",{className:"arkynFileUploadHasFileContent",children:[c.jsxs("section",{className:"arkynFileUploadFileContainer",children:[c.jsx(u,{}),c.jsx("p",{children:n.name})]}),c.jsx(dt,{}),c.jsxs("div",{className:"arkynFileUploadButtonsContainer",children:[!!i&&c.jsx(gt,{orientation:"bottom",text:"Reenviar arquivo",children:c.jsx(_t,{type:"button","aria-label":"resend file",variant:"outline",scheme:"danger",size:"sm",isLoading:r,onClick:i,icon:B.RefreshCw,disabled:t})}),c.jsx($e,{isLoading:r,onClick:l,variant:"outline",size:"sm",type:"button",disabled:t,children:s})]})]})}function Wa(e){const{dropFileText:t,isLoading:n,acceptFile:r,handleSelectFile:a,selectFileButtonText:s,disabled:o}=e;function i(u){if(o)return;u.preventDefault();const f=u.dataTransfer.files[0];f&&a(f)}function l(){if(o)return;const u=document.createElement("input");u.type="file",u.accept=r,u.onchange=f=>{var _;const d=(_=f.target.files)==null?void 0:_[0];d&&a(d)},u.click()}return c.jsxs("div",{onDrop:i,className:"arkynFileUploadNoFileContent",children:[c.jsx($e,{isLoading:n,onClick:l,variant:"ghost",size:"sm",type:"button",disabled:o,children:s}),c.jsx("p",{children:t})]})}function Ra(e){const{name:t,label:n,showAsterisk:r=!1,action:a,fileName:s="file",method:o="POST",acceptFile:i="*",fileResponseName:l="url",changeFileButtonText:u="Alterar arquivo",selectFileButtonText:f="Selecionar arquivo",dropFileText:d="Ou arraste e solte o arquivo aqui",onChange:_,disabled:p=!1}=e,{fieldErrors:g}=ye(),h=g==null?void 0:g[t],[v,b]=m.useState(""),[w,k]=m.useState(""),[S,V]=m.useState(null),[j,O]=m.useState(!1);async function G(H){if(p)return;O(!0),V(H),k("");const L=new FormData;L.append(s,H),await fetch(a,{method:o,body:L}).then(async z=>await z.json()).then(z=>{z!=null&&z.error?k(z.error):b(z==null?void 0:z[l]),_&&_(z==null?void 0:z[l])}).catch(z=>{console.error(z),k("Erro ao enviar o arquivo")}).finally(()=>O(!1))}function A(H){p||G(H)}const x=h||w,F=`arkynFileUpload ${x?"hasError":"noHasError"} ${S?"hasFile":"noHasFile"}`;return c.jsxs(me,{children:[n&&c.jsx(fe,{showAsterisk:r,children:n}),c.jsxs("div",{className:F,children:[c.jsx("input",{type:"hidden",name:t,value:v||""}),!S&&c.jsx(Wa,{disabled:p,isLoading:j,acceptFile:i,dropFileText:d,handleSelectFile:A,selectFileButtonText:f}),S&&c.jsx(qa,{disabled:p,isLoading:j,acceptFile:i,file:S,handleSelectFile:A,changeFileButtonText:u,reSendFile:x&&S?()=>G(S):void 0})]}),x&&c.jsx(ke,{children:x})]})}function Xa(e){const{disabled:t,filePath:n,isLoading:r,acceptImage:a,changeImageButtonText:s,handleSelectFile:o,reSendImage:i}=e;function l(){if(t)return;const u=document.createElement("input");u.type="file",u.accept=a,u.onchange=f=>{var _;const d=(_=f.target.files)==null?void 0:_[0];d&&o(d)},u.click()}return c.jsxs("div",{className:"arkynImageUploadHasFileContent",style:{backgroundImage:`url("${n}")`},children:[i&&c.jsx(gt,{orientation:"bottom",text:"Reenviar imagem",children:c.jsx(_t,{type:"button","aria-label":"resend image",variant:"outline",scheme:"danger",size:"sm",isLoading:r,onClick:i,icon:B.RefreshCw,disabled:t})}),c.jsx($e,{isLoading:r,onClick:l,variant:"outline",size:"sm",type:"button",disabled:t,children:s})]})}function Ka(e){const{dropImageText:t,isLoading:n,acceptImage:r,handleSelectFile:a,selectImageButtonText:s,disabled:o}=e;function i(u){if(o)return;u.preventDefault();const f=u.dataTransfer.files[0];f&&a(f)}function l(){if(o)return;const u=document.createElement("input");u.type="file",u.accept=r,u.onchange=f=>{var _;const d=(_=f.target.files)==null?void 0:_[0];d&&a(d)},u.click()}return c.jsxs("div",{onDrop:i,className:"arkynImageUploadNoFileContent",children:[c.jsx($e,{isLoading:n,onClick:l,variant:"ghost",size:"sm",type:"button",disabled:o,children:s}),c.jsx("p",{children:t})]})}function Ya(e){const{name:t,defaultValue:n="",label:r,showAsterisk:a=!1,action:s,fileName:o="file",method:i="POST",acceptImage:l="image/*",fileResponseName:u="url",changeImageButtonText:f="Alterar imagem",selectImageButtonText:d="Selecionar imagem",dropImageText:_="Ou arraste e solte a imagem aqui",onChange:p,disabled:g=!1}=e,{fieldErrors:h}=ye(),v=h==null?void 0:h[t],[b,w]=m.useState(n),[k,S]=m.useState(""),[V,j]=m.useState(null),[O,G]=m.useState(n),[A,x]=m.useState(!1);async function P(M){if(g)return;x(!0),j(M),S("");const Q=new FormData;Q.append(o,M),await fetch(s,{method:i,body:Q}).then(async E=>await E.json()).then(E=>{E!=null&&E.error?S(E.error):w(E==null?void 0:E[u]),p&&p(E==null?void 0:E[u])}).catch(E=>{console.error(E),S("Erro ao enviar imagem")}).finally(()=>x(!1))}function D(M){g||(G(URL.createObjectURL(M)),P(M))}const F=v||k,z=`arkynImageUpload ${F?"hasError":"noHasError"} ${O?"hasImage":"noHasImage"}`;return c.jsxs(me,{children:[r&&c.jsx(fe,{showAsterisk:a,children:r}),c.jsxs("div",{className:z,children:[c.jsx("input",{type:"hidden",name:t,value:b||""}),!O&&c.jsx(Ka,{disabled:g,isLoading:A,acceptImage:l,dropImageText:_,handleSelectFile:D,selectImageButtonText:d}),O&&c.jsx(Xa,{disabled:g,isLoading:A,acceptImage:l,filePath:O,handleSelectFile:D,changeImageButtonText:f,reSendImage:F&&V?()=>P(V):void 0})]}),F&&c.jsx(ke,{children:F})]})}function Hn(e){const{name:t,disabled:n,title:r,style:a,variant:s="solid",label:o,className:i="",prefix:l,suffix:u,isLoading:f=!1,leftIcon:d,readOnly:_,onFocus:p,onBlur:g,errorMessage:h,showAsterisk:v,rightIcon:b,type:w="text",size:k="md",id:S,...V}=e,{fieldErrors:j}=ye(),[O,G]=m.useState(!1),A=m.useRef(null),x=S||m.useId(),P=h||(j==null?void 0:j[t]),D=!!P,F=n||f,L={md:20,lg:20}[k],z=b?"right":"left",M=z==="left"&&f,Q=z==="right"&&f;function E(){F||!(A!=null&&A.current)||(G(!0),A.current.focus())}function ce(Z){G(!0),p&&p(Z)}function re(Z){G(!1),g&&g(Z)}if(w==="hidden")return c.jsx("input",{style:{display:"none"},readOnly:!0,type:"text",ref:A,...V});const $=`arkynInput ${l?"hasPrefix":""} ${u?"hasSuffix":""} ${s} ${k} ${F||_||f?"opacity":""} ${D?"errored":""} ${O?"focused":""} ${i}`;return c.jsxs(me,{children:[o&&c.jsx(fe,{showAsterisk:v,htmlFor:x,children:o}),c.jsxs("section",{title:r,style:a,onClick:E,className:$,children:[c.jsx(X,{iconSize:L,icon:l,className:"prefix"}),c.jsx(X,{show:M,iconSize:L,className:"spinner",icon:B.Loader2}),c.jsx(X,{show:!f,icon:d,iconSize:L}),c.jsx("input",{disabled:F,readOnly:_,ref:A,onFocus:ce,onBlur:re,type:w,id:x,name:t,...V}),c.jsx(X,{show:!f,icon:b,iconSize:L}),c.jsx(X,{show:Q,iconSize:L,className:"spinner",icon:B.Loader2}),c.jsx(X,{iconSize:L,icon:u,className:"suffix"})]}),P&&c.jsx(ke,{children:P})]})}const Za=m.forwardRef((e,t)=>c.jsx("input",{ref:t,...e}));function Ja(e){const{name:t,disabled:n,title:r,style:a,variant:s="solid",separate:o,mask:i,showMask:l,replacement:u,label:f,className:d="",prefix:_,suffix:p,isLoading:g=!1,leftIcon:h,readOnly:v,onFocus:b,onBlur:w,errorMessage:k,defaultValue:S,showAsterisk:V,rightIcon:j,size:O="md",id:G,...A}=e,{fieldErrors:x}=ye(),[P,D]=m.useState(!1),F=m.useRef(null),H=G||m.useId(),L=k||(x==null?void 0:x[t]),z=!!L,M=n||g,E={md:20,lg:20}[O],ce=j?"right":"left",re=ce==="left"&&g,ee=ce==="right"&&g;function be(){M||!(F!=null&&F.current)||(D(!0),F.current.focus())}function le(U){D(!0),b&&b(U)}function se(U){D(!1),w&&w(U)}const Me=`arkynMaskedInput ${_?"hasPrefix":""} ${p?"hasSuffix":""} ${s} ${O} ${M||v||g?"opacity":""} ${z?"errored":""} ${P?"focused":""} ${d}`;return c.jsxs(me,{children:[f&&c.jsx(fe,{showAsterisk:V,htmlFor:H,children:f}),c.jsxs("section",{title:r,style:a,onClick:be,className:Me,children:[c.jsx(X,{iconSize:E,icon:_,className:"prefix"}),c.jsx(X,{show:re,iconSize:E,className:"spinner",icon:B.Loader2}),c.jsx(X,{show:!g,icon:h,iconSize:E}),c.jsx(Tn.InputMask,{component:Za,mask:i,replacement:u,separate:o,showMask:l,ref:F,onFocus:le,onBlur:se,disabled:M,readOnly:v,id:H,name:t,...A}),c.jsx(X,{show:!g,icon:j,iconSize:E}),c.jsx(X,{show:ee,iconSize:E,className:"spinner",icon:B.Loader2}),c.jsx(X,{iconSize:E,icon:p,className:"suffix"})]}),L&&c.jsx(ke,{children:L})]})}const Gn=m.createContext({});function Qa(e){return c.jsx(Gn.Provider,{value:{makeInvisible:e.makeInvisible},children:e.children})}function es(){return m.useContext(Gn)}function ts(e){const{isVisible:t,makeInvisible:n,children:r,className:a="",...s}=e;Xe(t);const i=`arkynModalContainer ${t?"visibleTrue":"visibleFalse"} ${a}`;return c.jsx(Qa,{makeInvisible:n,children:c.jsx(Le.AnimatePresence,{children:t&&c.jsxs("aside",{className:i.trim(),...s,children:[c.jsx(Le.motion.div,{className:"arkynModalContainerOverlay",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:n}),c.jsx(Le.motion.div,{className:"arkynModalContainerContent",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0,scale:.75},animate:{opacity:1,scale:1},exit:{opacity:0,scale:0},children:r})]})})})}function ns(e){const{alignment:t="right",className:n,...r}=e,a=`arkynModalFooter ${t} ${n}`;return c.jsx("footer",{className:a.trim(),...r})}function rs(e){const{showCloseButton:t=!0,className:n,children:r,...a}=e,{makeInvisible:s}=es(),o=`arkynModalHeader ${n}`;return c.jsxs("header",{className:o.trim(),...a,children:[r,t&&c.jsx("button",{type:"button",onClick:s,"aria-label":"Close modal button",className:"arkynModalHeaderCloseButton",children:c.jsx(B.X,{size:24})})]})}function as(e){const{iconSize:t,isLoading:n,disabled:r,readOnly:a,isFocused:s}=e,l=`arkynMultiSelectChevron ${r||a?"notAnimate":""} ${s?"focused":""}`;return n?c.jsx(c.Fragment,{}):c.jsx(B.ChevronDown,{className:l,size:t,strokeWidth:2.5})}function ss(e){const{children:t,handleContainerFocus:n,disabled:r,isError:a,isLoading:s,isFocused:o,className:i,readOnly:l,variant:u,size:f,id:d,prefixExists:_}=e,p=_?"hasPrefix":"",g=a?"errored":"",h=r||l||s?"opacity":"",v=o?"focused":"";return c.jsx("section",{id:d,className:`arkynMultiSelectContainer ${p} ${u} ${f} ${h} ${g} ${v} ${i}`,onClick:n,children:t})}function os(e){const{children:t,size:n}=e,r=`arkynMultiSelectContent ${n}`;return c.jsx("div",{className:r,children:t})}function is(e){const{label:t,value:n,disabled:r,handleChangeValue:a}=e;return c.jsxs("div",{className:"arkynMultiSelectMark",children:[t,c.jsx("button",{disabled:r,type:"button",onClick:s=>{s.stopPropagation(),a(n)},children:c.jsx(B.X,{})})]})}function cs(e){const{label:t,optionHasSelected:n,handleChangeValue:r,value:a,size:s}=e,o=n(a)?"active":"",i=`arkynMultiSelectOption ${s} ${o}`;return c.jsxs("div",{onClick:()=>r(a),className:i,children:[t," ",c.jsx(B.Check,{})]})}function ls(e){const{children:t,isFocused:n,isSearchable:r,search:a,onSearch:s}=e,o=m.useRef(null),[i,l]=m.useState("bottom");Xe(n),m.useEffect(()=>{if(!n)return;(()=>{if(!o.current)return;const d=o.current.parentElement;if(!d)return;const _=d.getBoundingClientRect(),p=window.innerHeight,g=300;p-_.bottom<g&&_.top>g?l("top"):l("bottom")})()},[n]);function u(f){r&&s(f.target.value)}return n?c.jsxs("div",{ref:o,className:`arkynMultiSelectOptionsContainer ${i}`,children:[r&&c.jsx(Hn,{type:"search",name:"search-select",variant:"underline",leftIcon:B.Search,value:a,onChange:u}),t]}):c.jsx(c.Fragment,{})}function us(e){const{isFocused:t,handleBlur:n}=e;return t?c.jsx("aside",{className:"arkynMultiSelectOverlay",onClick:n}):c.jsx(c.Fragment,{})}function fs(e){const{iconSize:t,isLoading:n}=e;return n?c.jsx(B.Loader2,{className:"arkynMultiSelectSpinner",size:t,strokeWidth:2.5}):c.jsx(c.Fragment,{})}function ds(e){const{name:t,options:n,className:r="",placeholder:a="Selecione...",closeOnSelect:s=!1,defaultValue:o=[],errorMessage:i,isLoading:l=!1,readOnly:u=!1,isSearchable:f=!1,id:d,label:_,optionMaxHeight:p,showAsterisk:g,leftIcon:h,onSearch:v,onChange:b,onBlur:w,notFoundText:k="Sem opções disponíveis",onFocus:S,disabled:V=!1,prefix:j,size:O="md",value:G,variant:A="solid"}=e,{fieldErrors:x}=ye(),P=m.useRef(null),D=d||m.useId(),F=i||(x==null?void 0:x[t]),H=!!F,L=V||l||u,M={md:20,lg:20}[O],[Q,E]=m.useState(""),[ce,re]=m.useState(!1),[ee,be]=m.useState(o),le=G||ee;function se(U){return le.includes(U)}function oe(U){const ue=n.find(zt=>zt.value===U);return(ue==null?void 0:ue.label)||""}function $(){L||!(P!=null&&P.current)||ce||(re(!0),P.current.focus(),S&&S())}function Z(){re(!1),w&&P.current&&P.current.blur()}function Ie(U){E(U),v&&v(U)}function Ze(U){se(U)?(be(ee.filter(ue=>ue!==U)),b&&b(ee.filter(ue=>ue!==U))):(be([...ee,U]),b&&b([...ee,U])),s&&Z()}const Me=n.filter(U=>!!(e.onSearch||!e.isSearchable||U.label.toLowerCase().includes(Q.toLowerCase())));return c.jsxs(me,{children:[_&&c.jsx(fe,{showAsterisk:g,children:_}),c.jsxs(ss,{handleContainerFocus:$,disabled:L,isError:H,isFocused:ce,isLoading:l,readOnly:u,size:O,variant:A,className:r,prefixExists:!!j,id:D,children:[c.jsx("input",{ref:P,name:t,value:JSON.stringify(le),type:"hidden"}),c.jsx(X,{iconSize:M,icon:j,className:"prefix"}),h&&c.jsx(h,{size:M,strokeWidth:2.5}),c.jsxs(os,{size:O,children:[le.map(U=>c.jsx(is,{label:oe(U),value:U,handleChangeValue:Ze,disabled:L},U)),le.length<=0&&c.jsx("p",{children:a})]}),c.jsxs(ls,{isFocused:ce,isSearchable:f,search:Q,onSearch:Ie,children:[Me.map(({label:U,value:ue})=>c.jsx(cs,{label:U,value:ue,size:O,handleChangeValue:Ze,optionHasSelected:se},ue)),Me.length<=0&&c.jsx("p",{children:k})]}),c.jsx(as,{disabled:L,isFocused:ce,readOnly:u,iconSize:M,isLoading:l}),c.jsx(fs,{iconSize:M,isLoading:l}),c.jsx(us,{handleBlur:Z,isFocused:ce})]}),F&&c.jsx(ke,{children:F})]})}function Vt(e){return e&&e.replace(/[^0-9]/g,"")}const qt={EIGHT:"(99) 9999-9999",NINE:"(99) 99999-9999"};function Un(e,t){let n="",r=0;for(let a=0;a<t.length;a++)if(t[a]==="9")if(r<e.length)n+=e[r],r++;else break;else if(r<e.length)n+=t[a];else break;return n}function Vn(e){return e.length>10?"NINE":"EIGHT"}const qn=Vt(qt.NINE).length;function Wn(e,t){if(t.code==="+55"){let a=Vt(e);const s=Vn(a);return a.length>qn?void 0:(a=Un(a,qt[s]),a)}let r=t.mask;if(t.prefix){const a=/\$+/g;r=r.replace(a,t.prefix)}for(let a=0,s=0;a<r.length&&s<e.length;a++)r[a]==="_"&&(r=r.substring(0,a)+e[s]+r.substring(a+1),s++);return r}function _s(e,t){const n=Re.find(r=>r.code===e&&r.prefix===t);return n||null}function gs(e){const t=Re.find(n=>n.code===e);return t||null}function ms(e){const t=e.split(" ")[0].split("-")[0],n=e.split(" ")[0].split("-")[1],r=e.split(" ")[1];if(!t||!r)return{country:null,formattedNumber:""};if(n){const i=_s(t,n);if(!i)return{country:null,formattedNumber:""};const l=Wn(r,i);return{country:i,formattedNumber:l}}const a=gs(t);if(!a)return{country:null,formattedNumber:""};const s=Wn(r,a);return{country:a,formattedNumber:s}}function hs(e){const{children:t,onFocus:n,disabled:r,isError:a,isLoading:s,isFocused:o,className:i="",readOnly:l,variant:u,size:f,id:d}=e,h=`arkynPhoneInputContainer ${u} ${f} ${r||l||s?"opacity":""} ${a?"errored":""} ${o?"focused":""} ${i}`;return c.jsx("section",{id:d,className:h.trim(),onClick:n,children:t})}function ps(e){const{isOpen:t,onClick:n}=e;return t?c.jsx("aside",{className:"arkynPhoneInputCountriesOverlay",onClick:n}):c.jsx(c.Fragment,{})}function ys(e){const{country:t,isActive:n,handleChangeValue:r,size:a}=e,o=`arkynPhoneInputCountryOption ${a} ${n?"active":""}`;return c.jsxs("div",{onClick:()=>r(t),className:o,children:[c.jsx("img",{src:t.flag,alt:t.name,className:"flag"}),t.name," ",c.jsx("span",{children:t.code}),c.jsx(B.Check,{className:"check"})]})}function vs(e){const{children:t,isOpen:n,onSearch:r,search:a,placeholder:s}=e,o=m.useRef(null),[i,l]=m.useState("bottom");function u(f){r(f.target.value)}return Xe(n),m.useEffect(()=>{if(!n)return;(()=>{if(!o.current)return;const d=o.current.parentElement;if(!d)return;const _=d.getBoundingClientRect(),p=window.innerHeight,g=300;p-_.bottom<g&&_.top>g?l("top"):l("bottom")})()},[n]),n?c.jsxs("div",{className:`arkynPhoneInputCountryOptionsContainer ${i}`,ref:o,children:[c.jsx("input",{type:"search",name:"search-select",className:"arkynPhoneInputCountryOptionsContainerSearchSelect",value:a,id:"input-search",placeholder:s,onChange:u}),t]}):c.jsx(c.Fragment,{})}function ks(e){const{currentCountry:t,onClick:n}=e;return c.jsxs("div",{className:"phoneInputSelectCountry",onClick:n,children:[c.jsx("img",{className:"flag",src:t.flag,alt:t.name}),c.jsx(B.ChevronDown,{className:"chevronDown",strokeWidth:2.5}),c.jsx(dt,{orientation:"vertical"})]})}const Cs=m.forwardRef((e,t)=>c.jsx("input",{ref:t,...e})),bs=m.forwardRef((e,t)=>{const{onFocus:n,onBlur:r,size:a,onChange:s,value:o,currentCountry:i,disabled:l}=e,[u,f]=m.useState(!1);m.useEffect(()=>{u?s(i.mask):f(!0)},[i]);const d=`phoneInputMask ${a}`;function _(p){let g=Vt(p.target.value);const h=Vn(g);g.length>qn||(g=Un(g,qt[h]),p.target.value=g,s(g))}return i.code==="+55"?c.jsx("input",{value:o,onChange:_,className:d,onFocus:n,onBlur:r,disabled:l,ref:t}):c.jsx(Tn.InputMask,{value:o,onChange:p=>s(p.target.value),className:d,component:Cs,onFocus:n,onBlur:r,disabled:l,mask:i.mask,showMask:!0,replacement:{_:/\d/},ref:t})});function xs(e){const{defaultCountry:t,label:n,className:r="",disabled:a=!1,errorMessage:s,isLoading:o=!1,readOnly:i=!1,size:l="md",defaultValue:u="",variant:f="solid",showAsterisk:d,name:_,onChange:p,searchCountryPlaceholder:g="Pesquisar país",notFoundCountryText:h="Nenhum país encontrado",id:v}=e,b=ms(u),[w,k]=m.useState(!1),[S,V]=m.useState(""),[j,O]=m.useState(!1),[G,A]=m.useState(b.formattedNumber||""),[x,P]=m.useState(()=>{if(b.country)return b.country;const $=Re.find(Z=>Z.iso===t);return $||Re[30]}),{fieldErrors:D}=ye(),F=m.useRef(null),H=v||m.useId(),L=s||(D==null?void 0:D[_]),z=!!L,M=a||o,Q=m.useRef(null);function E(){M||w||j||(k(!0),Q.current&&Q.current.focus())}function ce(){O(!0),k(!0)}function re(){O(!1),k(!1)}function ee(){k(!0)}function be(){k(!1)}function le($){return $.name.toLowerCase().includes(S.toLowerCase())}function se($){return x.prefix?$.replace(x.prefix,"").replaceAll(" ","").replaceAll("-","").replaceAll("(","").replaceAll(")","").trim():$.replaceAll(" ","").replaceAll("-","").replaceAll("(","").replaceAll(")","").trim()}function oe($){let Z=x.code;return x.prefix&&(Z+=`-${x.prefix}`),Z+=" ",Z+=se($||G),Z}return c.jsxs(me,{children:[n&&c.jsx(fe,{showAsterisk:d,children:n}),c.jsxs(hs,{id:H,disabled:M,isError:z,isLoading:o,isFocused:w,readOnly:i,size:l,variant:f,className:r,onFocus:E,children:[c.jsx(ks,{currentCountry:x,onClick:ce,size:l}),c.jsxs(vs,{isOpen:j,search:S,placeholder:g,onSearch:V,children:[Re.filter($=>le($)).map($=>c.jsx(ys,{country:$,handleChangeValue:()=>{P($),O(!1),A($.mask)},isActive:$.iso===x.iso,size:l},$.iso)),Re.filter($=>le($)).length===0&&c.jsx("p",{children:h})]}),c.jsx(ps,{isOpen:j,onClick:re}),c.jsx(bs,{ref:Q,currentCountry:x,value:G,onChange:$=>{A($),p&&p(oe($))},disabled:M,onBlur:be,onFocus:ee,size:l}),c.jsx("input",{ref:F,type:"hidden",name:_,value:oe()})]}),L&&c.jsx(ke,{children:L})]})}function Es(e){const{children:t,button:n,closeOnClick:r,className:a="",orientation:s="bottomLeft"}=e,[o,i]=m.useState(!1),u=`arkynPopover ${s} ${o?"visibleTrue":"visibleFalse"} ${a}`;function f(){o||i(!0)}return Xe(o),c.jsxs("div",{className:u,onClick:f,children:[n,c.jsx(Le.motion.div,{style:{visibility:o?"visible":"hidden"},transition:{ease:"easeOut",duration:0},initial:{opacity:0},animate:{opacity:o?1:0},exit:{opacity:0},onClick:()=>r&&i(!1),className:"arkynPopoverContent",children:t}),o&&c.jsx("div",{onClick:()=>i(!1),className:"arkynPopoverOverlay"})]})}const Rn=m.createContext({});function ws(e){const{children:t,size:n,isError:r,handleChange:a,value:s}=e;return c.jsx(Rn.Provider,{value:{handleChange:a,value:s,size:n,isError:r},children:t})}function Ss(){return m.useContext(Rn)}function Ns(e){const{value:t,size:n,disabled:r,children:a,className:s="",...o}=e,{handleChange:i,size:l,value:u,isError:f}=Ss(),v=`arkynRadioBox ${n||l} ${u===t?"checkedTrue":"checkedFalse"} ${f?"errorTrue":"errorFalse"} ${r?"disabledTrue":"disabledFalse"} ${s}`;return c.jsxs("label",{className:v.trim(),children:[c.jsx("button",{type:"button",disabled:r,onClick:()=>i(t),onFocus:()=>i(t),...o}),a]})}function Fs(e){const{defaultValue:t="",name:n,label:r,showAsterisk:a,errorMessage:s,value:o,onChange:i,size:l="md",className:u="",...f}=e,[d,_]=m.useState(t),{fieldErrors:p}=ye();function g(w){_(w),i&&i(w)}const h=s||(p==null?void 0:p[n]),v=!!h,b=`arkynRadioGroup ${l} ${u}`;return c.jsxs(me,{children:[r&&c.jsx(fe,{showAsterisk:a,children:r}),c.jsxs(ws,{isError:v,size:l,value:o||d,handleChange:g,children:[c.jsx("input",{style:{display:"none"},type:"text",readOnly:!0,name:n,value:o||d}),c.jsx("div",{className:b.trim(),...f})]}),h&&c.jsx(ke,{children:h})]})}function Ts(e){const{label:t,size:n="lg",defaultChecked:r=!1,checked:a=null,value:s,unCheckedValue:o="",name:i,className:l="",onCheck:u,id:f,...d}=e,_=m.useRef(null),p=f||m.useId(),[g,h]=m.useState(r),v=typeof a=="boolean"?a:g;function b(){h(!g),u&&u(v?o:s||"checked")}const k=`arkynSwitch ${v?"checkedTrue":"checkedFalse"} ${n} ${l}`;return c.jsxs(me,{children:[t&&c.jsx(fe,{children:t}),c.jsx("button",{type:"button",onClick:b,className:k,...d,children:c.jsx("input",{id:p,type:"hidden",name:i,ref:_,onClick:b,value:v?s||"checked":o})})]})}const Xn=m.createContext({});function Os(){return m.useContext(Xn)}function Ps(e){return c.jsx(Xn.Provider,{value:e,children:e.children})}function As(e){const{children:t,disabled:n=!1,className:r="",onClick:a,value:s,...o}=e,{disabled:i,currentTab:l,changeCurrentTab:u}=Os(),f=i||n,p=`arkynTabButton ${f?"isDisabled":""} ${l===s&&s?"isActive":""} ${r}`;function g(h){u(s),a&&a(h)}return c.jsx("button",{onClick:g,className:p.trim(),...o,disabled:f,type:"button",children:t})}function Is(e){const{children:t,onChange:n,defaultValue:r,disabled:a=!1,className:s,...o}=e,[i,l]=m.useState(r||""),u=`arkynTabContainer ${s||""}`;function f(d){l(d),n&&n(d)}return c.jsx(Ps,{disabled:a,currentTab:i,changeCurrentTab:f,children:c.jsx("nav",{className:u.trim(),...o,children:t})})}function Ms(e){const{emptyMessage:t="Nenhum dado adicionado.",className:n,children:r,...a}=e,s=`arkynTableBody ${n}`,o=m.Children.count(r)===0;return c.jsx("tbody",{className:s.trim(),...a,children:o?c.jsx("tr",{className:"arkynTableBodyEmptyLine",children:c.jsx("td",{colSpan:100,children:c.jsx("div",{children:t})})}):r})}function Ds(e){const{className:t,children:n,...r}=e,a=`arkynTableCaption ${t}`;return c.jsx("caption",{className:a.trim(),...r,children:c.jsx("div",{className:"arkynTableCaptionContent",children:n})})}function Ls(e){const{children:t,className:n,...r}=e,a=`arkynTableContainer ${n}`;return c.jsx("div",{className:a.trim(),...r,children:c.jsx("table",{children:t})})}function $s(e){const{className:t,children:n,...r}=e,a=`arkynTableFooter ${t}`;return c.jsxs("tfoot",{className:a.trim(),...r,children:[c.jsx("tr",{className:"spacingRow"}),c.jsx("tr",{children:c.jsx("th",{colSpan:100,children:c.jsx("div",{className:"arkynTableFooterContent",children:n})})})]})}function Bs(e){const{className:t,children:n,...r}=e,a=`arkynTableHeader ${t}`;return c.jsxs("thead",{className:a.trim(),...r,children:[c.jsx("tr",{children:n}),c.jsx("tr",{className:"spacingRow"})]})}function js(e){const{variant:t="solid",size:n="md",className:r,errorMessage:a,disabled:s=!1,readOnly:o=!1,label:i,showAsterisk:l,name:u,onFocus:f,onBlur:d,title:_,style:p,id:g,...h}=e,{fieldErrors:v}=ye(),[b,w]=m.useState(!1),k=m.useRef(null),S=g||m.useId(),V=a||(v==null?void 0:v[u]),x=`arkynTextarea ${t} ${n} ${s||o?"opacityTrue":"opacityFalse"} ${!!V?"errorTrue":"errorFalse"} ${b?"focusedTrue":"focusedFalse"} ${r}`;function P(){s||!(k!=null&&k.current)||(w(!0),k.current.focus())}function D(H){w(!0),f&&f(H)}function F(H){w(!1),d&&d(H)}return c.jsxs(me,{children:[i&&c.jsx(fe,{showAsterisk:l,children:i}),c.jsx("section",{title:_,style:p,onClick:P,className:x,children:c.jsx("textarea",{id:S,disabled:s,readOnly:o,ref:k,onFocus:D,onBlur:F,...h})}),V&&c.jsx(fe,{children:V})]})}const Kn=m.createContext({});function zs(e){const{children:t=!1}=e,[n,r]=m.useState([]);function a(l){return!!n.some(u=>u.key===l)}function s(l){var u;return(u=n.find(f=>f.key===l))==null?void 0:u.data}function o(l,u){const f=a(l);r(f?d=>[...d.filter(p=>p.key!==l),{key:l,data:u}]:[...n,{key:l,data:u}])}function i(l){r(n.filter(u=>u.key!==l))}return c.jsx(Kn.Provider,{value:{drawerIsOpen:a,drawerData:s,openDrawer:o,closeDrawer:i},children:t})}function Hs(e){const t=m.useContext(Kn);if(Object.entries(t).length===0)throw new Error("useDrawer must be used within a Provider");if(e){const{drawerData:n,drawerIsOpen:r,openDrawer:a,closeDrawer:s}=t,o=r(e),i=n(e);return{drawerIsOpen:o,drawerData:i,openDrawer:f=>a(e,f),closeDrawer:()=>s(e)}}else return t}const Yn=m.createContext({});function Gs(e){const{children:t=!1}=e,[n,r]=m.useState([]);function a(u){return!!n.some(f=>f.key===u)}function s(u){var f;return(f=n.find(d=>d.key===u))==null?void 0:f.data}function o(u,f){const d=a(u);r(d?_=>[..._.filter(g=>g.key!==u),{key:u,data:f}]:[...n,{key:u,data:f}])}function i(u){r(n.filter(f=>f.key!==u))}function l(){r([])}return c.jsx(Yn.Provider,{value:{modalIsOpen:a,modalData:s,openModal:o,closeModal:i,closeAll:l},children:t})}function Us(e){const t=m.useContext(Yn);if(Object.entries(t).length===0)throw new Error("useModal must be used within a Provider");if(e){const{modalData:n,modalIsOpen:r,openModal:a,closeModal:s}=t,o=r(e),i=n(e);return{modalIsOpen:o,modalData:i,openModal:f=>a(e,f),closeModal:()=>s(e)}}else return t}function Vs(e,t=""){const n=new URLSearchParams(e),r=t?`${t}:`:"",a=s=>{Object.entries(s).forEach(([o,i])=>{i===void 0?n.delete(`${r}${o}`):n.set(`${r}${o}`,String(i))})};return{getParam:s=>n.get(`${r}${s}`),getScopedSearch:s=>{a(s);let o=n.toString();return o&&(o="?"+o),o}}}let qs={data:""},Ws=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||qs,Rs=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,Xs=/\/\*[^]*?\*\/| +/g,Zn=/\n+/g,Fe=(e,t)=>{let n="",r="",a="";for(let s in e){let o=e[s];s[0]=="@"?s[1]=="i"?n=s+" "+o+";":r+=s[1]=="f"?Fe(o,s):s+"{"+Fe(o,s[1]=="k"?"":t)+"}":typeof o=="object"?r+=Fe(o,t?t.replace(/([^,])+/g,i=>s.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,l=>/&/.test(l)?l.replace(/&/g,i):i?i+" "+l:l)):s):o!=null&&(s=/^--/.test(s)?s:s.replace(/[A-Z]/g,"-$&").toLowerCase(),a+=Fe.p?Fe.p(s,o):s+":"+o+";")}return n+(t&&a?t+"{"+a+"}":a)+r},we={},Jn=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+Jn(e[n]);return t}return e},Ks=(e,t,n,r,a)=>{let s=Jn(e),o=we[s]||(we[s]=(l=>{let u=0,f=11;for(;u<l.length;)f=101*f+l.charCodeAt(u++)>>>0;return"go"+f})(s));if(!we[o]){let l=s!==e?e:(u=>{let f,d,_=[{}];for(;f=Rs.exec(u.replace(Xs,""));)f[4]?_.shift():f[3]?(d=f[3].replace(Zn," ").trim(),_.unshift(_[0][d]=_[0][d]||{})):_[0][f[1]]=f[2].replace(Zn," ").trim();return _[0]})(e);we[o]=Fe(a?{["@keyframes "+o]:l}:l,n?"":"."+o)}let i=n&&we.g?we.g:null;return n&&(we.g=we[o]),((l,u,f,d)=>{d?u.data=u.data.replace(d,l):u.data.indexOf(l)===-1&&(u.data=f?l+u.data:u.data+l)})(we[o],t,r,i),o},Ys=(e,t,n)=>e.reduce((r,a,s)=>{let o=t[s];if(o&&o.call){let i=o(n),l=i&&i.props&&i.props.className||/^go/.test(i)&&i;o=l?"."+l:i&&typeof i=="object"?i.props?"":Fe(i,""):i===!1?"":i}return r+a+(o??"")},"");function mt(e){let t=this||{},n=e.call?e(t.p):e;return Ks(n.unshift?n.raw?Ys(n,[].slice.call(arguments,1),t.p):n.reduce((r,a)=>Object.assign(r,a&&a.call?a(t.p):a),{}):n,Ws(t.target),t.g,t.o,t.k)}let Qn,Wt,Rt;mt.bind({g:1});let Se=mt.bind({k:1});function Zs(e,t,n,r){Fe.p=t,Qn=e,Wt=n,Rt=r}function Te(e,t){let n=this||{};return function(){let r=arguments;function a(s,o){let i=Object.assign({},s),l=i.className||a.className;n.p=Object.assign({theme:Wt&&Wt()},i),n.o=/ *go\d+/.test(l),i.className=mt.apply(n,r)+(l?" "+l:"");let u=e;return e[0]&&(u=i.as||e,delete i.as),Rt&&u[0]&&Rt(i),Qn(u,i)}return a}}var Js=e=>typeof e=="function",ht=(e,t)=>Js(e)?e(t):e,Qs=(()=>{let e=0;return()=>(++e).toString()})(),er=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),eo=20,Xt="default",tr=(e,t)=>{let{toastLimit:n}=e.settings;switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,n)};case 1:return{...e,toasts:e.toasts.map(o=>o.id===t.toast.id?{...o,...t.toast}:o)};case 2:let{toast:r}=t;return tr(e,{type:e.toasts.find(o=>o.id===r.id)?1:0,toast:r});case 3:let{toastId:a}=t;return{...e,toasts:e.toasts.map(o=>o.id===a||a===void 0?{...o,dismissed:!0,visible:!1}:o)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(o=>o.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let s=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(o=>({...o,pauseDuration:o.pauseDuration+s}))}}},pt=[],nr={toasts:[],pausedAt:void 0,settings:{toastLimit:eo}},xe={},rr=(e,t=Xt)=>{xe[t]=tr(xe[t]||nr,e),pt.forEach(([n,r])=>{n===t&&r(xe[t])})},ar=e=>Object.keys(xe).forEach(t=>rr(e,t)),to=e=>Object.keys(xe).find(t=>xe[t].toasts.some(n=>n.id===e)),yt=(e=Xt)=>t=>{rr(t,e)},no={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},ro=(e={},t=Xt)=>{let[n,r]=m.useState(xe[t]||nr),a=m.useRef(xe[t]);m.useEffect(()=>(a.current!==xe[t]&&r(xe[t]),pt.push([t,r]),()=>{let o=pt.findIndex(([i])=>i===t);o>-1&&pt.splice(o,1)}),[t]);let s=n.toasts.map(o=>{var i,l,u;return{...e,...e[o.type],...o,removeDelay:o.removeDelay||((i=e[o.type])==null?void 0:i.removeDelay)||(e==null?void 0:e.removeDelay),duration:o.duration||((l=e[o.type])==null?void 0:l.duration)||(e==null?void 0:e.duration)||no[o.type],style:{...e.style,...(u=e[o.type])==null?void 0:u.style,...o.style}}});return{...n,toasts:s}},ao=(e,t="blank",n)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...n,id:(n==null?void 0:n.id)||Qs()}),tt=e=>(t,n)=>{let r=ao(t,e,n);return yt(r.toasterId||to(r.id))({type:2,toast:r}),r.id},J=(e,t)=>tt("blank")(e,t);J.error=tt("error"),J.success=tt("success"),J.loading=tt("loading"),J.custom=tt("custom"),J.dismiss=(e,t)=>{let n={type:3,toastId:e};t?yt(t)(n):ar(n)},J.dismissAll=e=>J.dismiss(void 0,e),J.remove=(e,t)=>{let n={type:4,toastId:e};t?yt(t)(n):ar(n)},J.removeAll=e=>J.remove(void 0,e),J.promise=(e,t,n)=>{let r=J.loading(t.loading,{...n,...n==null?void 0:n.loading});return typeof e=="function"&&(e=e()),e.then(a=>{let s=t.success?ht(t.success,a):void 0;return s?J.success(s,{id:r,...n,...n==null?void 0:n.success}):J.dismiss(r),a}).catch(a=>{let s=t.error?ht(t.error,a):void 0;s?J.error(s,{id:r,...n,...n==null?void 0:n.error}):J.dismiss(r)}),e};var so=1e3,oo=(e,t="default")=>{let{toasts:n,pausedAt:r}=ro(e,t),a=m.useRef(new Map).current,s=m.useCallback((d,_=so)=>{if(a.has(d))return;let p=setTimeout(()=>{a.delete(d),o({type:4,toastId:d})},_);a.set(d,p)},[]);m.useEffect(()=>{if(r)return;let d=Date.now(),_=n.map(p=>{if(p.duration===1/0)return;let g=(p.duration||0)+p.pauseDuration-(d-p.createdAt);if(g<0){p.visible&&J.dismiss(p.id);return}return setTimeout(()=>J.dismiss(p.id,t),g)});return()=>{_.forEach(p=>p&&clearTimeout(p))}},[n,r,t]);let o=m.useCallback(yt(t),[t]),i=m.useCallback(()=>{o({type:5,time:Date.now()})},[o]),l=m.useCallback((d,_)=>{o({type:1,toast:{id:d,height:_}})},[o]),u=m.useCallback(()=>{r&&o({type:6,time:Date.now()})},[r,o]),f=m.useCallback((d,_)=>{let{reverseOrder:p=!1,gutter:g=8,defaultPosition:h}=_||{},v=n.filter(k=>(k.position||h)===(d.position||h)&&k.height),b=v.findIndex(k=>k.id===d.id),w=v.filter((k,S)=>S<b&&k.visible).length;return v.filter(k=>k.visible).slice(...p?[w+1]:[0,w]).reduce((k,S)=>k+(S.height||0)+g,0)},[n]);return m.useEffect(()=>{n.forEach(d=>{if(d.dismissed)s(d.id,d.removeDelay);else{let _=a.get(d.id);_&&(clearTimeout(_),a.delete(d.id))}})},[n,s]),{toasts:n,handlers:{updateHeight:l,startPause:i,endPause:u,calculateOffset:f}}},io=Se`
|
1
|
+
(function(C,c){typeof exports=="object"&&typeof module<"u"?c(exports,require("react/jsx-runtime"),require("react"),require("lucide-react"),require("framer-motion"),require("@react-input/mask")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","lucide-react","framer-motion","@react-input/mask"],c):(C=typeof globalThis<"u"?globalThis:C||self,c(C["@arkyn/components"]={},C.jsxRuntime,C.b,C.lucideReact,C.framerMotion,C.mask))})(this,function(C,c,m,B,Le,Tn){"use strict";function va(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const te=va(m);function On(e){const{className:t,...n}=e,r=`arkynAlertTitle ${t}`;return c.jsx("div",{className:r.trim(),...n})}const Pn=m.createContext({});function ka(){return m.useContext(Pn)}function Ca(e){const{schema:t,children:n,className:r,...a}=e,i=!(u=>{let f=!1;const d=_=>{Array.isArray(_)?_.forEach(d):_&&typeof _=="object"&&"type"in _&&(_.type===On?f=!0:_.props&&typeof _.props=="object"&&_.props!==null&&"children"in _.props&&d(_.props.children))};return d(u),f})(n)?"nonExistsAlertTitle":"existsAlertTitle",l=`arkynAlertContainer ${t} ${i} ${r}`;return c.jsx(Pn.Provider,{value:e,children:c.jsx("div",{className:l.trim(),...a,children:n})})}function ba(e){const{className:t,...n}=e,r=`arkynAlertContent ${t}`;return c.jsx("div",{className:r.trim(),...n})}function xa(e){const{className:t,...n}=e,r=`arkynAlertDescription ${t}`;return c.jsx("div",{className:r.trim(),...n})}function Ea(e){const{className:t,...n}=e,{schema:r}=ka(),a=`arkynAlertIcon ${r} ${t}`;switch(r){case"success":return c.jsx(B.CheckCircle2,{className:a,...n});case"danger":return c.jsx(B.XCircle,{className:a,...n});case"warning":return c.jsx(B.AlertTriangle,{className:a,...n});case"info":return c.jsx(B.Info,{className:a,...n})}}function An(e){function t(){return!e||e<=0?0:e>=100?100:e}const[n,r]=m.useState(t());function a(s){return s<=0?r(0):s>=100?r(100):r(s)}return[n,a]}function In(e){const{onChange:t,value:n,disabled:r=!1,onDragging:a,className:s="",...o}=e,[i,l]=m.useState(!1),u=m.useRef(null),f=()=>l(!0),d=()=>l(!1),_=b=>{if(r||!i||!u.current)return;const w=u.current.getBoundingClientRect(),k=b.clientX-w.left,S=Math.min(Math.max(k/w.width*100,0),100);t(S)},p=b=>{if(r||!u.current)return;const w=u.current.getBoundingClientRect(),k=b.clientX-w.left,S=Math.min(Math.max(k/w.width*100,0),100);t(S)};m.useEffect(()=>(i?(a&&a(!0),document.addEventListener("mousemove",_),document.addEventListener("mouseup",d)):(a&&a(!1),document.removeEventListener("mousemove",_),document.removeEventListener("mouseup",d)),()=>{document.removeEventListener("mousemove",_),document.removeEventListener("mouseup",d)}),[i]);const v=`arkynSliderTrack ${i?"isDragging":"isNotDragging"} ${r?"isDisabled":"isEnabled"} ${s}`;return c.jsxs("div",{...o,className:v,onMouseDown:f,onClick:p,ref:u,children:[c.jsx("div",{className:"arkynSliderFill",style:{width:`${n}%`}}),c.jsx("div",{className:"arkynSliderThumb",style:{left:`${n}%`}})]})}function Mn(e){var j,O,G,A;const{onPlayAudio:t,onPauseAudio:n,disabled:r,...a}=e,[s,o]=An(0),[i,l]=m.useState(!1),[u,f]=m.useState(!1),d=m.useRef(null),_=(j=d.current)==null?void 0:j.currentTime,p=(O=d.current)==null?void 0:O.duration,g=b(_),h=b(p),v={totalTime:p,currentTime:_,formattedCurrentTime:g,formattedTotalTime:h};function b(x){if(!x)return"00:00";const P=Math.floor(x/60),D=Math.floor(x%60),F=String(P).padStart(2,"0"),H=String(D).padStart(2,"0");return`${F}:${H}`}function w(){const x=d.current;x&&(e.onPlayAudio&&e.onPlayAudio(v),x.play(),l(!0))}function k(){const x=d.current;x&&(e.onPauseAudio&&e.onPauseAudio(v),x.pause(),l(!1))}function S(){i?k():w()}function V(x){const P=d.current;if(!P)return;const D=P.duration,F=x/100*D;P.currentTime=F}return u||!i?(G=d.current)==null||G.pause():i&&((A=d.current)==null||A.play()),m.useEffect(()=>{const x=d.current;if(!x)return;const P=()=>{const D=x.duration,H=x.currentTime/D*100;o(H)};return x.addEventListener("timeupdate",P),()=>{x.removeEventListener("timeupdate",P)}},[]),c.jsxs("div",{className:"arkynAudioPlayer",children:[c.jsx("audio",{...a,ref:d,src:e.src,onEnded:k}),c.jsxs("button",{type:"button",disabled:r,onClick:S,children:[i&&c.jsx(B.Pause,{}),!i&&c.jsx(B.Play,{})]}),c.jsx("p",{children:g}),c.jsx(In,{value:s,onChange:V,onDragging:f,disabled:r}),c.jsx("p",{children:h})]})}const Dn=m.createContext({});function wa(e){const{children:t,fieldErrors:n,form:r}=e;return c.jsxs(Dn.Provider,{value:{fieldErrors:n},children:[!r&&t,r&&m.cloneElement(r,r.props,t)]})}function ye(){return m.useContext(Dn)}function ke(e){const{children:t,className:n,...r}=e,a=`arkynFieldError ${n}`;return t?c.jsx("strong",{className:a.trim(),...r,children:t}):c.jsx(c.Fragment,{})}function fe(e){const{showAsterisk:t=!1,className:n="",...r}=e,s=`arkynFieldLabel ${t?"asteriskTrue":"asteriskFalse"} ${n}`;return c.jsx("label",{className:s.trim(),...r})}function me(e){const{children:t,className:n,...r}=e,a=`arkynFieldWrapper ${n}`;return c.jsx("section",{className:a.trim(),...r,children:t})}function X(e){const{iconSize:t,icon:n,className:r,show:a=!0}=e;return a?n?typeof n=="string"?c.jsx("p",{className:r,children:n}):c.jsx("p",{className:r,children:c.jsx(n,{size:t,strokeWidth:2.5})}):c.jsx(c.Fragment,{}):c.jsx(c.Fragment,{})}function $e(e){const{isLoading:t=!1,scheme:n="primary",variant:r="solid",loadingText:a,size:s="md",leftIcon:o,rightIcon:i,disabled:l,className:u="",children:f,...d}=e,p={xs:12,sm:16,md:20,lg:24}[s],v=`arkynButton ${t?"loadingTrue":"loadingFalse"} ${r} ${n} ${s} ${a?"loadingTextTrue":"loadingTextFalse"} ${u}`;return c.jsxs("button",{className:v,disabled:l||t,...d,children:[c.jsxs("div",{className:"arkynButtonSpinner",children:[c.jsx(B.Loader2,{size:p,strokeWidth:2.5}),a&&a]}),c.jsxs("div",{className:"arkynButtonContent",children:[c.jsx(X,{iconSize:p,icon:o}),f,c.jsx(X,{iconSize:p,icon:i})]})]})}function dt(e){const{className:t,orientation:n="horizontal",...r}=e,a=`arkynDivider ${n} ${t}`;return c.jsx("div",{className:a.trim(),...r})}function _t(e){const{isLoading:t=!1,scheme:n="primary",variant:r="solid",size:a="md",icon:s,disabled:o,className:i="",...l}=e,u={xs:12,sm:16,md:20,lg:24},d=`arkynIconButton ${r} ${n} ${a} ${t?"loadingTrue":"loadingFalse"} ${i}`;return c.jsxs("button",{disabled:o||t,className:d.trim(),...l,children:[c.jsx("div",{className:"arkynIconButtonSpinner",children:c.jsx(B.Loader2,{size:u[a],strokeWidth:2.5})}),c.jsx("div",{className:"arkynIconButtonContent",children:c.jsx(s,{size:u[a],strokeWidth:2.5})})]})}function gt(e){const{text:t,size:n="lg",children:r,orientation:a="top",className:s="",...o}=e,i=m.useId(),l=m.useRef(null),[u,f]=m.useState(a);m.useEffect(()=>{const _=()=>{if(!l.current)return;const h=document.getElementById(i);h&&(f(a),requestAnimationFrame(()=>{const v=h.getBoundingClientRect(),b=window.innerWidth,w=window.innerHeight;let k=a;a==="left"&&v.left<0?k="right":a==="right"&&v.right>b?k="left":a==="top"&&v.top<0?k="bottom":a==="bottom"&&v.bottom>w&&(k="top"),k==="right"&&v.right>b?k="left":k==="left"&&v.left<0?k="right":k==="bottom"&&v.bottom>w?k="top":k==="top"&&v.top<0&&(k="bottom"),f(k)}))},p=l.current;if(!p)return;const g=()=>{setTimeout(_,1)};return p.addEventListener("mouseenter",g),window.addEventListener("resize",_),()=>{p.removeEventListener("mouseenter",g),window.removeEventListener("resize",_)}},[a,i]);const d=`arkynTooltip ${n} ${u} ${s}`;return c.jsxs("div",{className:d.trim(),...o,ref:l,children:[r,c.jsx("div",{className:"arkynTooltipText",id:i,dangerouslySetInnerHTML:{__html:t}})]})}function Sa(e){const{filePath:t,disabled:n,acceptAudio:r,handleSelectFile:a,isLoading:s,reSendAudio:o,changeAudioButtonText:i}=e;function l(){if(n)return;const u=document.createElement("input");u.type="file",u.accept=r,u.onchange=f=>{var _;const d=(_=f.target.files)==null?void 0:_[0];d&&a(d)},u.click()}return c.jsxs("div",{className:"arkynAudioUploadHasFileContentContainer",children:[c.jsx(Mn,{src:t}),c.jsx(dt,{}),c.jsxs("div",{className:"arkynAudioUploadButtonsContainer",children:[!!o&&c.jsx(gt,{orientation:"bottom",text:"Reenviar áudio",children:c.jsx(_t,{type:"button","aria-label":"resend image",variant:"outline",scheme:"danger",size:"sm",isLoading:s,onClick:o,icon:B.RefreshCw,disabled:n})}),c.jsx($e,{isLoading:s,onClick:l,variant:"outline",size:"sm",type:"button",disabled:n,children:i})]})]})}function Na(e){const{dropAudioText:t,isLoading:n,acceptAudio:r,handleSelectFile:a,selectAudioButtonText:s,disabled:o}=e;function i(u){if(o)return;u.preventDefault();const f=u.dataTransfer.files[0];f&&a(f)}function l(){if(o)return;const u=document.createElement("input");u.type="file",u.accept=r,u.onchange=f=>{var _;const d=(_=f.target.files)==null?void 0:_[0];d&&a(d)},u.click()}return c.jsxs("div",{onDrop:i,className:"arkynAudioUploadNoFileContent",children:[c.jsx($e,{isLoading:n,onClick:l,variant:"ghost",size:"sm",type:"button",disabled:o,children:s}),c.jsx("p",{children:t})]})}function Fa(e){const{name:t,label:n,fileName:r="file",method:a="POST",onChange:s,fileResponseName:o="url",selectAudioButtonText:i="Selecionar arquivo de áudio",dropAudioText:l="Ou arraste e solte um arquivo de áudio aqui",changeAudioButtonText:u="Trocar arquivo de áudio",acceptAudio:f="audio/*",action:d,defaultValue:_="",showAsterisk:p=!1,disabled:g=!1}=e,{fieldErrors:h}=ye(),v=h==null?void 0:h[t],[b,w]=m.useState(_),[k,S]=m.useState(""),[V,j]=m.useState(null),[O,G]=m.useState(_),[A,x]=m.useState(!1);async function P(M){if(g)return;x(!0),j(M),S("");const Q=new FormData;Q.append(r,M),await fetch(d,{method:a,body:Q}).then(async E=>await E.json()).then(E=>{E!=null&&E.error?S(E.error):w(E==null?void 0:E[o]),s&&s(E==null?void 0:E[o])}).catch(E=>{console.error(E),S("Erro ao enviar audio")}).finally(()=>x(!1))}function D(M){if(!g){if(M.type.indexOf("audio")===-1){S("O arquivo selecionado não é um arquivo de áudio");return}G(URL.createObjectURL(M)),P(M)}}const F=v||k,z=`arkynAudioUpload ${F?"hasError":"noHasError"} ${O?"hasAudio":"noHasAudio"}`;return c.jsxs(me,{children:[n&&c.jsx(fe,{showAsterisk:p,children:n}),c.jsxs("div",{className:z,children:[c.jsx("input",{type:"hidden",name:t,value:b||""}),!O&&c.jsx(Na,{disabled:g,isLoading:A,acceptAudio:f,dropAudioText:l,handleSelectFile:D,selectAudioButtonText:i}),O&&c.jsx(Sa,{filePath:O,acceptAudio:f,changeAudioButtonText:u,disabled:g,handleSelectFile:D,isLoading:A,reSendAudio:F&&V?()=>P(V):void 0})]}),F&&c.jsx(ke,{children:F})]})}function Ta(e){const{variant:t="ghost",scheme:n="primary",size:r="lg",leftIcon:a,rightIcon:s,className:o="",children:i,...l}=e,f={md:12,lg:14}[r],d=`arkynBadge ${t} ${n} ${r} ${o}`;return c.jsxs("div",{className:d.trim(),...l,children:[c.jsx(X,{iconSize:f,icon:a}),c.jsx("p",{children:i}),c.jsx(X,{iconSize:f,icon:s})]})}const Ln=m.createContext({});function Oa(){return m.useContext(Ln)}function Pa(e){return c.jsx(Ln.Provider,{value:e,children:e.children})}function Aa(e){const{children:t,disabled:n=!1,className:r="",onClick:a,value:s,...o}=e,{disabled:i,currentTab:l,changeCurrentTab:u}=Oa(),f=i||n,p=`arkynCardTabButton ${f?"isDisabled":""} ${l===s&&s?"isActive":""} ${r}`;function g(h){u(s),a&&a(h)}return c.jsx("button",{onClick:g,className:p.trim(),...o,disabled:f,type:"button",children:t})}function Ia(e){const{children:t,onChange:n,defaultValue:r,disabled:a=!1,className:s,...o}=e,[i,l]=m.useState(r||""),u=`arkynCardTabContainer ${s||""}`;function f(d){l(d),n&&n(d)}return c.jsx(Pa,{disabled:a,currentTab:i,changeCurrentTab:f,children:c.jsx("nav",{className:u.trim(),...o,children:t})})}function Ma(e){const{id:t,name:n,className:r="",size:a="md",errorMessage:s,defaultChecked:o=!1,label:i,checked:l=null,onCheck:u,value:f,...d}=e,{fieldErrors:_}=ye(),p=m.useRef(null),g=t||m.useId(),h=s||(_==null?void 0:_[n]),v=!!h,[b,w]=m.useState(o||!1),k=typeof l=="boolean"?l:b,j=`arkynCheckbox ${a} ${v?"errorTrue":"errorFalse"} ${k?"checkedTrue":"checkedFalse"} ${r}`;function O(){const G=b;w(!G),u&&u(G?"":f||"checked")}return c.jsxs(me,{children:[i&&c.jsx(fe,{children:i}),c.jsxs("button",{id:g,type:"button",className:j,onClick:O,...d,children:[c.jsx("input",{type:"hidden",name:n,ref:p,value:k?f||"checked":""}),c.jsx(B.Check,{})]}),h&&c.jsx(ke,{children:h})]})}function Da(){return()=>{}}function $n(){return m.useSyncExternalStore(Da,()=>!0,()=>!1)}function La(e){const{children:t,fallback:n=null}=e;return $n()?c.jsx(c.Fragment,{children:t()}):c.jsx(c.Fragment,{children:n})}const Gt=e=>e.replace(/[^0-9]/g,""),Re=[{name:"Afghanistan",code:"+93",prefix:null,iso:"AF",flag:"https://cdn.kcak11.com/CountryFlags/countries/af.svg",mask:"__-___-____"},{name:"Aland Islands",code:"+358",prefix:null,iso:"AX",flag:"https://cdn.kcak11.com/CountryFlags/countries/ax.svg",mask:"(___) ___-__-__"},{name:"Albania",code:"+355",prefix:null,iso:"AL",flag:"https://cdn.kcak11.com/CountryFlags/countries/al.svg",mask:"(___) ___-___"},{name:"Algeria",code:"+213",prefix:null,iso:"DZ",flag:"https://cdn.kcak11.com/CountryFlags/countries/dz.svg",mask:"__-___-____"},{name:"American Samoa",code:"+1",prefix:"684",iso:"AS",flag:"https://cdn.kcak11.com/CountryFlags/countries/as.svg",mask:"(684) ___-____"},{name:"Andorra",code:"+376",prefix:null,iso:"AD",flag:"https://cdn.kcak11.com/CountryFlags/countries/ad.svg",mask:"___-___"},{name:"Angola",code:"+244",prefix:null,iso:"AO",flag:"https://cdn.kcak11.com/CountryFlags/countries/ao.svg",mask:"(___) ___-___"},{name:"Anguilla",code:"+1",prefix:"264",iso:"AI",flag:"https://cdn.kcak11.com/CountryFlags/countries/ai.svg",mask:"(264) ___-____"},{name:"Antarctica",code:"+672",prefix:"1",iso:"AQ",flag:"https://cdn.kcak11.com/CountryFlags/countries/aq.svg",mask:"1__-___"},{name:"Antigua and Barbuda",code:"+1",prefix:"268",iso:"AG",flag:"https://cdn.kcak11.com/CountryFlags/countries/ag.svg",mask:"(268) ___-____"},{name:"Argentina",code:"+54",prefix:null,iso:"AR",flag:"https://cdn.kcak11.com/CountryFlags/countries/ar.svg",mask:"(___) ___-____"},{name:"Armenia",code:"+374",prefix:null,iso:"AM",flag:"https://cdn.kcak11.com/CountryFlags/countries/am.svg",mask:"__-___-___"},{name:"Aruba",code:"+297",prefix:null,iso:"AW",flag:"https://cdn.kcak11.com/CountryFlags/countries/aw.svg",mask:"___-____"},{name:"Ascension Island",code:"+247",prefix:null,iso:"AC",flag:"https://cdn.kcak11.com/CountryFlags/countries/sh.svg",mask:"____"},{name:"Australia",code:"+61",prefix:null,iso:"AU",flag:"https://cdn.kcak11.com/CountryFlags/countries/au.svg",mask:"_-____-____"},{name:"Austria",code:"+43",prefix:null,iso:"AT",flag:"https://cdn.kcak11.com/CountryFlags/countries/at.svg",mask:"(___) ___-____"},{name:"Azerbaijan",code:"+994",prefix:null,iso:"AZ",flag:"https://cdn.kcak11.com/CountryFlags/countries/az.svg",mask:"__-___-__-__"},{name:"Bahamas",code:"+1",prefix:"242",iso:"BS",flag:"https://cdn.kcak11.com/CountryFlags/countries/bs.svg",mask:"(242) ___-____"},{name:"Bahrain",code:"+973",prefix:null,iso:"BH",flag:"https://cdn.kcak11.com/CountryFlags/countries/bh.svg",mask:"____-____"},{name:"Bangladesh",code:"+880",prefix:"1",iso:"BD",flag:"https://cdn.kcak11.com/CountryFlags/countries/bd.svg",mask:"1___-______"},{name:"Barbados",code:"+1",prefix:"246",iso:"BB",flag:"https://cdn.kcak11.com/CountryFlags/countries/bb.svg",mask:"(246) ___-____"},{name:"Belarus",code:"+375",prefix:null,iso:"BY",flag:"https://cdn.kcak11.com/CountryFlags/countries/by.svg",mask:"(__) ___-__-__"},{name:"Belgium",code:"+32",prefix:null,iso:"BE",flag:"https://cdn.kcak11.com/CountryFlags/countries/be.svg",mask:"(___) ___-___"},{name:"Belize",code:"+501",prefix:null,iso:"BZ",flag:"https://cdn.kcak11.com/CountryFlags/countries/bz.svg",mask:"___-____"},{name:"Benin",code:"+229",prefix:null,iso:"BJ",flag:"https://cdn.kcak11.com/CountryFlags/countries/bj.svg",mask:"__-__-____"},{name:"Bermuda",code:"+1",prefix:"441",iso:"BM",flag:"https://cdn.kcak11.com/CountryFlags/countries/bm.svg",mask:"(441) ___-____"},{name:"Bhutan",code:"+975",prefix:null,iso:"BT",flag:"https://cdn.kcak11.com/CountryFlags/countries/bt.svg",mask:"_-___-___"},{name:"Bolivia",code:"+591",prefix:null,iso:"BO",flag:"https://cdn.kcak11.com/CountryFlags/countries/bo.svg",mask:"_-___-____"},{name:"Bosnia and Herzegovina",code:"+387",prefix:null,iso:"BA",flag:"https://cdn.kcak11.com/CountryFlags/countries/ba.svg",mask:"__-_____"},{name:"Botswana",code:"+267",prefix:null,iso:"BW",flag:"https://cdn.kcak11.com/CountryFlags/countries/bw.svg",mask:"__-___-___"},{name:"Brasil",code:"+55",prefix:null,iso:"BR",flag:"https://cdn.kcak11.com/CountryFlags/countries/br.svg",mask:"(__) _____-____"},{name:"British Indian Ocean Territory",code:"+246",prefix:null,iso:"IO",flag:"https://cdn.kcak11.com/CountryFlags/countries/io.svg",mask:"___-____"},{name:"Brunei Darussalam",code:"+673",prefix:null,iso:"BN",flag:"https://cdn.kcak11.com/CountryFlags/countries/bn.svg",mask:"___-____"},{name:"Bulgaria",code:"+359",prefix:null,iso:"BG",flag:"https://cdn.kcak11.com/CountryFlags/countries/bg.svg",mask:"(___) ___-___"},{name:"Burkina Faso",code:"+226",prefix:null,iso:"BF",flag:"https://cdn.kcak11.com/CountryFlags/countries/bf.svg",mask:"__-__-____"},{name:"Burundi",code:"+257",prefix:null,iso:"BI",flag:"https://cdn.kcak11.com/CountryFlags/countries/bi.svg",mask:"__-__-____"},{name:"Cambodia",code:"+855",prefix:null,iso:"KH",flag:"https://cdn.kcak11.com/CountryFlags/countries/kh.svg",mask:"__-___-___"},{name:"Cameroon",code:"+237",prefix:null,iso:"CM",flag:"https://cdn.kcak11.com/CountryFlags/countries/cm.svg",mask:"____-____"},{name:"Canada",code:"+1",prefix:null,iso:"CA",flag:"https://cdn.kcak11.com/CountryFlags/countries/ca.svg",mask:"(___) ___-____"},{name:"Cape Verde",code:"+238",prefix:null,iso:"CV",flag:"https://cdn.kcak11.com/CountryFlags/countries/cv.svg",mask:"(___) __-__"},{name:"Cayman Islands",code:"+1",prefix:"345",iso:"KY",flag:"https://cdn.kcak11.com/CountryFlags/countries/ky.svg",mask:"(345) ___-____"},{name:"Central African Republic",code:"+236",prefix:null,iso:"CF",flag:"https://cdn.kcak11.com/CountryFlags/countries/cf.svg",mask:"__-__-____"},{name:"Chad",code:"+235",prefix:null,iso:"TD",flag:"https://cdn.kcak11.com/CountryFlags/countries/td.svg",mask:"__-__-__-__"},{name:"Chile",code:"+56",prefix:null,iso:"CL",flag:"https://cdn.kcak11.com/CountryFlags/countries/cl.svg",mask:"_-____-____"},{name:"China",code:"+86",prefix:null,iso:"CN",flag:"https://cdn.kcak11.com/CountryFlags/countries/cn.svg",mask:"__-_____-_____"},{name:"Christmas Island",code:"+61",prefix:null,iso:"CX",flag:"https://cdn.kcak11.com/CountryFlags/countries/cx.svg",mask:"_-____-____"},{name:"Cocos (Keeling) Islands",code:"+61",prefix:null,iso:"CC",flag:"https://cdn.kcak11.com/CountryFlags/countries/cc.svg",mask:"_-____-____"},{name:"Colombia",code:"+57",prefix:null,iso:"CO",flag:"https://cdn.kcak11.com/CountryFlags/countries/co.svg",mask:"(___) ___-____"},{name:"Comoros",code:"+269",prefix:null,iso:"KM",flag:"https://cdn.kcak11.com/CountryFlags/countries/km.svg",mask:"__-_____"},{name:"Congo",code:"+242",prefix:null,iso:"CG",flag:"https://cdn.kcak11.com/CountryFlags/countries/cg.svg",mask:"__-_____"},{name:"Cook Islands",code:"+682",prefix:null,iso:"CK",flag:"https://cdn.kcak11.com/CountryFlags/countries/ck.svg",mask:"__-___"},{name:"Costa Rica",code:"+506",prefix:null,iso:"CR",flag:"https://cdn.kcak11.com/CountryFlags/countries/cr.svg",mask:"____-____"},{name:"Croatia",code:"+385",prefix:null,iso:"HR",flag:"https://cdn.kcak11.com/CountryFlags/countries/hr.svg",mask:"__-___-___"},{name:"Cuba",code:"+53",prefix:null,iso:"CU",flag:"https://cdn.kcak11.com/CountryFlags/countries/cu.svg",mask:"_-___-____"},{name:"Cyprus",code:"+357",prefix:null,iso:"CY",flag:"https://cdn.kcak11.com/CountryFlags/countries/cy.svg",mask:"__-___-___"},{name:"Czech Republic",code:"+420",prefix:null,iso:"CZ",flag:"https://cdn.kcak11.com/CountryFlags/countries/cz.svg",mask:"(___) ___-___"},{name:"Democratic Republic of the Congo",code:"+243",prefix:null,iso:"CD",flag:"https://cdn.kcak11.com/CountryFlags/countries/cd.svg",mask:"(___) ___-___"},{name:"Denmark",code:"+45",prefix:null,iso:"DK",flag:"https://cdn.kcak11.com/CountryFlags/countries/dk.svg",mask:"__-__-__-__"},{name:"Djibouti",code:"+253",prefix:null,iso:"DJ",flag:"https://cdn.kcak11.com/CountryFlags/countries/dj.svg",mask:"__-__-__-__"},{name:"Dominica",code:"+1",prefix:"767",iso:"DM",flag:"https://cdn.kcak11.com/CountryFlags/countries/dm.svg",mask:"(767) ___-____"},{name:"Dominican Republic",code:"+1",prefix:"849",iso:"DO",flag:"https://cdn.kcak11.com/CountryFlags/countries/do.svg",mask:"(894) ___-____"},{name:"Ecuador",code:"+593",prefix:null,iso:"EC",flag:"https://cdn.kcak11.com/CountryFlags/countries/ec.svg",mask:"__-___-____"},{name:"Egypt",code:"+20",prefix:null,iso:"EG",flag:"https://cdn.kcak11.com/CountryFlags/countries/eg.svg",mask:"(___) ___-____"},{name:"El Salvador",code:"+503",prefix:null,iso:"SV",flag:"https://cdn.kcak11.com/CountryFlags/countries/sv.svg",mask:"__-__-____"},{name:"Equatorial Guinea",code:"+240",prefix:null,iso:"GQ",flag:"https://cdn.kcak11.com/CountryFlags/countries/gq.svg",mask:"__-___-____"},{name:"Eritrea",code:"+291",prefix:null,iso:"ER",flag:"https://cdn.kcak11.com/CountryFlags/countries/er.svg",mask:"_-___-___"},{name:"Estonia",code:"+372",prefix:null,iso:"EE",flag:"https://cdn.kcak11.com/CountryFlags/countries/ee.svg",mask:"____-____"},{name:"Eswatini",code:"+268",prefix:null,iso:"SZ",flag:"https://cdn.kcak11.com/CountryFlags/countries/sz.svg",mask:"__-__-____"},{name:"Ethiopia",code:"+251",prefix:null,iso:"ET",flag:"https://cdn.kcak11.com/CountryFlags/countries/et.svg",mask:"__-___-____"},{name:"Falkland Islands (Malvinas)",code:"+500",prefix:null,iso:"FK",flag:"https://cdn.kcak11.com/CountryFlags/countries/fk.svg",mask:"_____"},{name:"Faroe Islands",code:"+298",prefix:null,iso:"FO",flag:"https://cdn.kcak11.com/CountryFlags/countries/fo.svg",mask:"__ __ __"},{name:"Fiji",code:"+679",prefix:null,iso:"FJ",flag:"https://cdn.kcak11.com/CountryFlags/countries/fj.svg",mask:"__-_____"},{name:"Finland",code:"+358",prefix:null,iso:"FI",flag:"https://cdn.kcak11.com/CountryFlags/countries/fi.svg",mask:"__ ___ ____"},{name:"France",code:"+33",prefix:null,iso:"FR",flag:"https://cdn.kcak11.com/CountryFlags/countries/fr.svg",mask:"_ __ __ __ __"},{name:"French Guiana",code:"+594",prefix:null,iso:"GF",flag:"https://cdn.kcak11.com/CountryFlags/countries/gf.svg",mask:"___ __ __ __"},{name:"French Polynesia",code:"+689",prefix:null,iso:"PF",flag:"https://cdn.kcak11.com/CountryFlags/countries/pf.svg",mask:"__ __ __ __"},{name:"Gabon",code:"+241",prefix:null,iso:"GA",flag:"https://cdn.kcak11.com/CountryFlags/countries/ga.svg",mask:"_ __ __ __"},{name:"Gambia",code:"+220",prefix:null,iso:"GM",flag:"https://cdn.kcak11.com/CountryFlags/countries/gm.svg",mask:"___ ____"},{name:"Georgia",code:"+995",prefix:null,iso:"GE",flag:"https://cdn.kcak11.com/CountryFlags/countries/ge.svg",mask:"(___) ___-___"},{name:"Germany",code:"+49",prefix:"3",iso:"DE",flag:"https://cdn.kcak11.com/CountryFlags/countries/de.svg",mask:"(3____) __-____"},{name:"Ghana",code:"+233",prefix:"03",iso:"GH",flag:"https://cdn.kcak11.com/CountryFlags/countries/gh.svg",mask:"03_ ___ ____"},{name:"Gibraltar",code:"+350",prefix:null,iso:"GI",flag:"https://cdn.kcak11.com/CountryFlags/countries/gi.svg",mask:"___-_____"},{name:"Greece",code:"+30",prefix:null,iso:"GR",flag:"https://cdn.kcak11.com/CountryFlags/countries/gr.svg",mask:"(___) ___-____"},{name:"Greenland",code:"+299",prefix:null,iso:"GL",flag:"https://cdn.kcak11.com/CountryFlags/countries/gl.svg",mask:"__-__-__"},{name:"Grenada",code:"+1",prefix:"473",iso:"GD",flag:"https://cdn.kcak11.com/CountryFlags/countries/gd.svg",mask:"(473) ___-____"},{name:"Guadeloupe",code:"+590",prefix:null,iso:"GP",flag:"https://cdn.kcak11.com/CountryFlags/countries/gp.svg",mask:"___ __ __ __"},{name:"Guam",code:"+1",prefix:"671",iso:"GU",flag:"https://cdn.kcak11.com/CountryFlags/countries/gu.svg",mask:"671 ___ ____"},{name:"Guatemala",code:"+502",prefix:null,iso:"GT",flag:"https://cdn.kcak11.com/CountryFlags/countries/gt.svg",mask:"_-___-____"},{name:"Guernsey",code:"+44",prefix:null,iso:"GG",flag:"https://cdn.kcak11.com/CountryFlags/countries/gg.svg",mask:"(____) ______"},{name:"Guinea",code:"+224",prefix:null,iso:"GN",flag:"https://cdn.kcak11.com/CountryFlags/countries/gn.svg",mask:"__-___-___"},{name:"Guinea-Bissau",code:"+245",prefix:null,iso:"GW",flag:"https://cdn.kcak11.com/CountryFlags/countries/gw.svg",mask:"_-______"},{name:"Guyana",code:"+592",prefix:null,iso:"GY",flag:"https://cdn.kcak11.com/CountryFlags/countries/gy.svg",mask:"___-____"},{name:"Haiti",code:"+509",prefix:null,iso:"HT",flag:"https://cdn.kcak11.com/CountryFlags/countries/ht.svg",mask:"__-__-____"},{name:"Holy See (Vatican City State)",code:"+39",prefix:"06698",iso:"VA",flag:"https://cdn.kcak11.com/CountryFlags/countries/va.svg",mask:"06 698_____"},{name:"Honduras",code:"+504",prefix:null,iso:"HN",flag:"https://cdn.kcak11.com/CountryFlags/countries/hn.svg",mask:"____-____"},{name:"Hong Kong",code:"+852",prefix:null,iso:"HK",flag:"https://cdn.kcak11.com/CountryFlags/countries/hk.svg",mask:"____-____"},{name:"Hungary",code:"+36",prefix:null,iso:"HU",flag:"https://cdn.kcak11.com/CountryFlags/countries/hu.svg",mask:"__ ___ ____"},{name:"Iceland",code:"+354",prefix:null,iso:"IS",flag:"https://cdn.kcak11.com/CountryFlags/countries/is.svg",mask:"___-____"},{name:"India",code:"+91",prefix:null,iso:"IN",flag:"https://cdn.kcak11.com/CountryFlags/countries/in.svg",mask:"(____) ___-___"},{name:"Indonesia",code:"+62",prefix:"8",iso:"ID",flag:"https://cdn.kcak11.com/CountryFlags/countries/id.svg",mask:"(8__) ___-__-___"},{name:"Iran",code:"+98",prefix:null,iso:"IR",flag:"https://cdn.kcak11.com/CountryFlags/countries/ir.svg",mask:"(___) ___-____"},{name:"Iraq",code:"+964",prefix:null,iso:"IQ",flag:"https://cdn.kcak11.com/CountryFlags/countries/iq.svg",mask:"(___) ___-____"},{name:"Ireland",code:"+353",prefix:null,iso:"IE",flag:"https://cdn.kcak11.com/CountryFlags/countries/ie.svg",mask:"(___) ___-___"},{name:"Isle of Man",code:"+44",prefix:null,iso:"IM",flag:"https://cdn.kcak11.com/CountryFlags/countries/im.svg",mask:"(____) ______"},{name:"Israel",code:"+972",prefix:"5",iso:"IL",flag:"https://cdn.kcak11.com/CountryFlags/countries/il.svg",mask:"__-___-____"},{name:"Italy",code:"+39",prefix:null,iso:"IT",flag:"https://cdn.kcak11.com/CountryFlags/countries/it.svg",mask:"(___) ____-___"},{name:"Ivory Coast / Cote d'Ivoire",code:"+225",prefix:null,iso:"CI",flag:"https://cdn.kcak11.com/CountryFlags/countries/ci.svg",mask:"__-___-___"},{name:"Jamaica",code:"+1",prefix:"876",iso:"JM",flag:"https://cdn.kcak11.com/CountryFlags/countries/jm.svg",mask:"(876) ___-____"},{name:"Japan",code:"+81",prefix:null,iso:"JP",flag:"https://cdn.kcak11.com/CountryFlags/countries/jp.svg",mask:"__-____-____"},{name:"Jersey",code:"+44",prefix:null,iso:"JE",flag:"https://cdn.kcak11.com/CountryFlags/countries/je.svg",mask:"(____) ____-______"},{name:"Jordan",code:"+962",prefix:null,iso:"JO",flag:"https://cdn.kcak11.com/CountryFlags/countries/jo.svg",mask:"_-____-____"},{name:"Kazakhstan",code:"+77",prefix:null,iso:"KZ",flag:"https://cdn.kcak11.com/CountryFlags/countries/kz.svg",mask:"(_____) _ __ __"},{name:"Kenya",code:"+254",prefix:null,iso:"KE",flag:"https://cdn.kcak11.com/CountryFlags/countries/ke.svg",mask:"___-______"},{name:"Kiribati",code:"+686",prefix:null,iso:"KI",flag:"https://cdn.kcak11.com/CountryFlags/countries/ki.svg",mask:"__-___"},{name:"Korea, Democratic People's Republic of Korea",code:"+850",prefix:null,iso:"KP",flag:"https://cdn.kcak11.com/CountryFlags/countries/kp.svg",mask:"____-_____________"},{name:"Korea, Republic of South Korea",code:"+82",prefix:null,iso:"KR",flag:"https://cdn.kcak11.com/CountryFlags/countries/kr.svg",mask:"__-___-____"},{name:"Kosovo",code:"+383",prefix:null,iso:"XK",flag:"https://cdn.kcak11.com/CountryFlags/countries/xk.svg",mask:"___-___-___"},{name:"Kuwait",code:"+965",prefix:null,iso:"KW",flag:"https://cdn.kcak11.com/CountryFlags/countries/kw.svg",mask:"____-____"},{name:"Kyrgyzstan",code:"+996",prefix:null,iso:"KG",flag:"https://cdn.kcak11.com/CountryFlags/countries/kg.svg",mask:"(___) ___-___"},{name:"Laos",code:"+856",prefix:"20",iso:"LA",flag:"https://cdn.kcak11.com/CountryFlags/countries/la.svg",mask:"(20__) ___-___"},{name:"Latvia",code:"+371",prefix:null,iso:"LV",flag:"https://cdn.kcak11.com/CountryFlags/countries/lv.svg",mask:"__-___-___"},{name:"Lebanon",code:"+961",prefix:null,iso:"LB",flag:"https://cdn.kcak11.com/CountryFlags/countries/lb.svg",mask:"__-___-___"},{name:"Lesotho",code:"+266",prefix:null,iso:"LS",flag:"https://cdn.kcak11.com/CountryFlags/countries/ls.svg",mask:"_-___-____"},{name:"Liberia",code:"+231",prefix:null,iso:"LR",flag:"https://cdn.kcak11.com/CountryFlags/countries/lr.svg",mask:"__-___-___"},{name:"Libya",code:"+218",prefix:"21",iso:"LY",flag:"https://cdn.kcak11.com/CountryFlags/countries/ly.svg",mask:"21-___-____"},{name:"Liechtenstein",code:"+423",prefix:null,iso:"LI",flag:"https://cdn.kcak11.com/CountryFlags/countries/li.svg",mask:"(___) ___-____"},{name:"Lithuania",code:"+370",prefix:null,iso:"LT",flag:"https://cdn.kcak11.com/CountryFlags/countries/lt.svg",mask:"(___) __-___"},{name:"Luxembourg",code:"+352",prefix:null,iso:"LU",flag:"https://cdn.kcak11.com/CountryFlags/countries/lu.svg",mask:"(___) ___-___"},{name:"Macau",code:"+853",prefix:null,iso:"MO",flag:"https://cdn.kcak11.com/CountryFlags/countries/mo.svg",mask:"____-____"},{name:"Madagascar",code:"+261",prefix:null,iso:"MG",flag:"https://cdn.kcak11.com/CountryFlags/countries/mg.svg",mask:"__-__-_____"},{name:"Malawi",code:"+265",prefix:null,iso:"MW",flag:"https://cdn.kcak11.com/CountryFlags/countries/mw.svg",mask:"_-____-____"},{name:"Malaysia",code:"+60",prefix:null,iso:"MY",flag:"https://cdn.kcak11.com/CountryFlags/countries/my.svg",mask:"__-___-____"},{name:"Maldives",code:"+960",prefix:null,iso:"MV",flag:"https://cdn.kcak11.com/CountryFlags/countries/mv.svg",mask:"___-____"},{name:"Mali",code:"+223",prefix:null,iso:"ML",flag:"https://cdn.kcak11.com/CountryFlags/countries/ml.svg",mask:"__-__-____"},{name:"Malta",code:"+356",prefix:null,iso:"MT",flag:"https://cdn.kcak11.com/CountryFlags/countries/mt.svg",mask:"____-____"},{name:"Marshall Islands",code:"+692",prefix:null,iso:"MH",flag:"https://cdn.kcak11.com/CountryFlags/countries/mh.svg",mask:"___-____"},{name:"Martinique",code:"+596",prefix:null,iso:"MQ",flag:"https://cdn.kcak11.com/CountryFlags/countries/mq.svg",mask:"(___) __-__-__"},{name:"Mauritania",code:"+222",prefix:null,iso:"MR",flag:"https://cdn.kcak11.com/CountryFlags/countries/mr.svg",mask:"__-__-____"},{name:"Mauritius",code:"+230",prefix:null,iso:"MU",flag:"https://cdn.kcak11.com/CountryFlags/countries/mu.svg",mask:"___-____"},{name:"Mayotte",code:"+262",prefix:null,iso:"YT",flag:"https://cdn.kcak11.com/CountryFlags/countries/yt.svg",mask:"_____-____"},{name:"Mexico",code:"+52",prefix:null,iso:"MX",flag:"https://cdn.kcak11.com/CountryFlags/countries/mx.svg",mask:"(___) ___-____"},{name:"Micronesia, Federated States of Micronesia",code:"+691",prefix:null,iso:"FM",flag:"https://cdn.kcak11.com/CountryFlags/countries/fm.svg",mask:"___-____"},{name:"Moldova",code:"+373",prefix:null,iso:"MD",flag:"https://cdn.kcak11.com/CountryFlags/countries/md.svg",mask:"____-____"},{name:"Monaco",code:"+377",prefix:null,iso:"MC",flag:"https://cdn.kcak11.com/CountryFlags/countries/mc.svg",mask:"(___) ___-___"},{name:"Mongolia",code:"+976",prefix:null,iso:"MN",flag:"https://cdn.kcak11.com/CountryFlags/countries/mn.svg",mask:"__-__-____"},{name:"Montenegro",code:"+382",prefix:null,iso:"ME",flag:"https://cdn.kcak11.com/CountryFlags/countries/me.svg",mask:"__-___-___"},{name:"Montserrat",code:"+1",prefix:"664",iso:"MS",flag:"https://cdn.kcak11.com/CountryFlags/countries/ms.svg",mask:"(664) ___-____"},{name:"Morocco",code:"+212",prefix:null,iso:"MA",flag:"https://cdn.kcak11.com/CountryFlags/countries/ma.svg",mask:"__-____-___"},{name:"Mozambique",code:"+258",prefix:null,iso:"MZ",flag:"https://cdn.kcak11.com/CountryFlags/countries/mz.svg",mask:"__-___-___"},{name:"Myanmar",code:"+95",prefix:null,iso:"MM",flag:"https://cdn.kcak11.com/CountryFlags/countries/mm.svg",mask:"__-___-___"},{name:"Namibia",code:"+264",prefix:null,iso:"NA",flag:"https://cdn.kcak11.com/CountryFlags/countries/na.svg",mask:"__-___-____"},{name:"Nauru",code:"+674",prefix:null,iso:"NR",flag:"https://cdn.kcak11.com/CountryFlags/countries/nr.svg",mask:"___-____"},{name:"Nepal",code:"+977",prefix:null,iso:"NP",flag:"https://cdn.kcak11.com/CountryFlags/countries/np.svg",mask:"__-___-___"},{name:"Netherlands",code:"+31",prefix:null,iso:"NL",flag:"https://cdn.kcak11.com/CountryFlags/countries/nl.svg",mask:"__-___-____"},{name:"New Caledonia",code:"+687",prefix:null,iso:"NC",flag:"https://cdn.kcak11.com/CountryFlags/countries/nc.svg",mask:"__-____"},{name:"New Zealand",code:"+64",prefix:null,iso:"NZ",flag:"https://cdn.kcak11.com/CountryFlags/countries/nz.svg",mask:"(___) ___-____"},{name:"Nicaragua",code:"+505",prefix:null,iso:"NI",flag:"https://cdn.kcak11.com/CountryFlags/countries/ni.svg",mask:"____-____"},{name:"Niger",code:"+227",prefix:null,iso:"NE",flag:"https://cdn.kcak11.com/CountryFlags/countries/ne.svg",mask:"__-__-____"},{name:"Nigeria",code:"+234",prefix:null,iso:"NG",flag:"https://cdn.kcak11.com/CountryFlags/countries/ng.svg",mask:"(___) ___-____"},{name:"Niue",code:"+683",prefix:null,iso:"NU",flag:"https://cdn.kcak11.com/CountryFlags/countries/nu.svg",mask:"____"},{name:"Norfolk Island",code:"+672",prefix:"3",iso:"NF",flag:"https://cdn.kcak11.com/CountryFlags/countries/nf.svg",mask:"3__-___"},{name:"North Macedonia",code:"+389",prefix:null,iso:"MK",flag:"https://cdn.kcak11.com/CountryFlags/countries/mk.svg",mask:"__-___-___"},{name:"Northern Mariana Islands",code:"+1",prefix:"670",iso:"MP",flag:"https://cdn.kcak11.com/CountryFlags/countries/mp.svg",mask:"(670) ___-____"},{name:"Norway",code:"+47",prefix:null,iso:"NO",flag:"https://cdn.kcak11.com/CountryFlags/countries/no.svg",mask:"(___) __-___"},{name:"Oman",code:"+968",prefix:null,iso:"OM",flag:"https://cdn.kcak11.com/CountryFlags/countries/om.svg",mask:"__-___-___"},{name:"Pakistan",code:"+92",prefix:null,iso:"PK",flag:"https://cdn.kcak11.com/CountryFlags/countries/pk.svg",mask:"(___) ___-____"},{name:"Palau",code:"+680",prefix:null,iso:"PW",flag:"https://cdn.kcak11.com/CountryFlags/countries/pw.svg",mask:"___-____"},{name:"Palestine",code:"+970",prefix:null,iso:"PS",flag:"https://cdn.kcak11.com/CountryFlags/countries/ps.svg",mask:"__-___-____"},{name:"Panama",code:"+507",prefix:null,iso:"PA",flag:"https://cdn.kcak11.com/CountryFlags/countries/pa.svg",mask:"___-____"},{name:"Papua New Guinea",code:"+675",prefix:null,iso:"PG",flag:"https://cdn.kcak11.com/CountryFlags/countries/pg.svg",mask:"(___) __-___"},{name:"Paraguay",code:"+595",prefix:null,iso:"PY",flag:"https://cdn.kcak11.com/CountryFlags/countries/py.svg",mask:"(___) ___-___"},{name:"Peru",code:"+51",prefix:null,iso:"PE",flag:"https://cdn.kcak11.com/CountryFlags/countries/pe.svg",mask:"(___) ___-___"},{name:"Philippines",code:"+63",prefix:null,iso:"PH",flag:"https://cdn.kcak11.com/CountryFlags/countries/ph.svg",mask:"(___) ___-____"},{name:"Pitcairn",code:"+870",prefix:null,iso:"PN",flag:"https://cdn.kcak11.com/CountryFlags/countries/pn.svg",mask:"___-___-___"},{name:"Poland",code:"+48",prefix:null,iso:"PL",flag:"https://cdn.kcak11.com/CountryFlags/countries/pl.svg",mask:"(___) ___-___"},{name:"Portugal",code:"+351",prefix:null,iso:"PT",flag:"https://cdn.kcak11.com/CountryFlags/countries/pt.svg",mask:"__-___-____"},{name:"Puerto Rico",code:"+1",prefix:null,iso:"PR",flag:"https://cdn.kcak11.com/CountryFlags/countries/pr.svg",mask:"(___) ___ ____"},{name:"Qatar",code:"+974",prefix:null,iso:"QA",flag:"https://cdn.kcak11.com/CountryFlags/countries/qa.svg",mask:"____-____"},{name:"Reunion",code:"+262",prefix:null,iso:"RE",flag:"https://cdn.kcak11.com/CountryFlags/countries/re.svg",mask:"_____-____"},{name:"Romania",code:"+40",prefix:null,iso:"RO",flag:"https://cdn.kcak11.com/CountryFlags/countries/ro.svg",mask:"__-___-____"},{name:"Russia",code:"+7",prefix:null,iso:"RU",flag:"https://cdn.kcak11.com/CountryFlags/countries/ru.svg",mask:"(___) ___-__-__"},{name:"Rwanda",code:"+250",prefix:null,iso:"RW",flag:"https://cdn.kcak11.com/CountryFlags/countries/rw.svg",mask:"(___) ___-___"},{name:"Saint Barthelemy",code:"+590",prefix:null,iso:"BL",flag:"https://cdn.kcak11.com/CountryFlags/countries/bl.svg",mask:"___-__-__-__"},{name:"Saint Helena, Ascension and Tristan Da Cunha",code:"+290",prefix:null,iso:"SH",flag:"https://cdn.kcak11.com/CountryFlags/countries/sh.svg",mask:"____"},{name:"Saint Kitts and Nevis",code:"+1",prefix:null,iso:"KN",flag:"https://cdn.kcak11.com/CountryFlags/countries/kn.svg",mask:"(869) ___-____"},{name:"Saint Lucia",code:"+1",prefix:"758",iso:"LC",flag:"https://cdn.kcak11.com/CountryFlags/countries/lc.svg",mask:"(758) ___-____"},{name:"Saint Martin",code:"+590",prefix:null,iso:"MF",flag:"https://cdn.kcak11.com/CountryFlags/countries/mf.svg",mask:"(___) ___-___"},{name:"Saint Pierre and Miquelon",code:"+508",prefix:null,iso:"PM",flag:"https://cdn.kcak11.com/CountryFlags/countries/pm.svg",mask:"__-____"},{name:"Saint Vincent and the Grenadines",code:"+1",prefix:"784",iso:"VC",flag:"https://cdn.kcak11.com/CountryFlags/countries/vc.svg",mask:"(784) ___-____"},{name:"Samoa",code:"+685",prefix:null,iso:"WS",flag:"https://cdn.kcak11.com/CountryFlags/countries/ws.svg",mask:"__-____"},{name:"San Marino",code:"+378",prefix:null,iso:"SM",flag:"https://cdn.kcak11.com/CountryFlags/countries/sm.svg",mask:"____-______"},{name:"Sao Tome and Principe",code:"+239",prefix:null,iso:"ST",flag:"https://cdn.kcak11.com/CountryFlags/countries/st.svg",mask:"__-_____"},{name:"Saudi Arabia",code:"+966",prefix:null,iso:"SA",flag:"https://cdn.kcak11.com/CountryFlags/countries/sa.svg",mask:"_-____-____"},{name:"Senegal",code:"+221",prefix:null,iso:"SN",flag:"https://cdn.kcak11.com/CountryFlags/countries/sn.svg",mask:"__-___-____"},{name:"Serbia",code:"+381",prefix:null,iso:"RS",flag:"https://cdn.kcak11.com/CountryFlags/countries/rs.svg",mask:"__-___-____"},{name:"Seychelles",code:"+248",prefix:null,iso:"SC",flag:"https://cdn.kcak11.com/CountryFlags/countries/sc.svg",mask:"_-___-___"},{name:"Sierra Leone",code:"+232",prefix:null,iso:"SL",flag:"https://cdn.kcak11.com/CountryFlags/countries/sl.svg",mask:"__-______"},{name:"Singapore",code:"+65",prefix:null,iso:"SG",flag:"https://cdn.kcak11.com/CountryFlags/countries/sg.svg",mask:"____-____"},{name:"Sint Maarten",code:"+1",prefix:"721",iso:"SX",flag:"https://cdn.kcak11.com/CountryFlags/countries/sx.svg",mask:"(721) ___-____"},{name:"Slovakia",code:"+421",prefix:null,iso:"SK",flag:"https://cdn.kcak11.com/CountryFlags/countries/sk.svg",mask:"(___) ___-___"},{name:"Slovenia",code:"+386",prefix:null,iso:"SI",flag:"https://cdn.kcak11.com/CountryFlags/countries/si.svg",mask:"__-___-___"},{name:"Solomon Islands",code:"+677",prefix:null,iso:"SB",flag:"https://cdn.kcak11.com/CountryFlags/countries/sb.svg",mask:"___-____"},{name:"Somalia",code:"+252",prefix:null,iso:"SO",flag:"https://cdn.kcak11.com/CountryFlags/countries/so.svg",mask:"__-___-___"},{name:"South Africa",code:"+27",prefix:null,iso:"ZA",flag:"https://cdn.kcak11.com/CountryFlags/countries/za.svg",mask:"__-___-____"},{name:"South Georgia and the South Sandwich Islands",code:"+500",prefix:null,iso:"GS",flag:"https://cdn.kcak11.com/CountryFlags/countries/gs.svg",mask:"_____"},{name:"South Sudan",code:"+211",prefix:null,iso:"SS",flag:"https://cdn.kcak11.com/CountryFlags/countries/ss.svg",mask:"__-___-____"},{name:"Spain",code:"+34",prefix:null,iso:"ES",flag:"https://cdn.kcak11.com/CountryFlags/countries/es.svg",mask:"(___) ___-___"},{name:"Sri Lanka",code:"+94",prefix:null,iso:"LK",flag:"https://cdn.kcak11.com/CountryFlags/countries/lk.svg",mask:"__-___-____"},{name:"Sudan",code:"+249",prefix:null,iso:"SD",flag:"https://cdn.kcak11.com/CountryFlags/countries/sd.svg",mask:"__-___-____"},{name:"Suriname",code:"+597",prefix:null,iso:"SR",flag:"https://cdn.kcak11.com/CountryFlags/countries/sr.svg",mask:"___-____"},{name:"Svalbard and Jan Mayen",code:"+47",prefix:null,iso:"SJ",flag:"https://cdn.kcak11.com/CountryFlags/countries/sj.svg",mask:"(___) __-___"},{name:"Sweden",code:"+46",prefix:null,iso:"SE",flag:"https://cdn.kcak11.com/CountryFlags/countries/se.svg",mask:"__-___-____"},{name:"Switzerland",code:"+41",prefix:null,iso:"CH",flag:"https://cdn.kcak11.com/CountryFlags/countries/ch.svg",mask:"__-___-____"},{name:"Syrian Arab Republic",code:"+963",prefix:null,iso:"SY",flag:"https://cdn.kcak11.com/CountryFlags/countries/sy.svg",mask:"__-____-___"},{name:"Taiwan",code:"+886",prefix:null,iso:"TW",flag:"https://cdn.kcak11.com/CountryFlags/countries/tw.svg",mask:"_-____-____"},{name:"Tajikistan",code:"+992",prefix:null,iso:"TJ",flag:"https://cdn.kcak11.com/CountryFlags/countries/tj.svg",mask:"__-___-____"},{name:"United Republic of Tanzania",code:"+255",prefix:null,iso:"TZ",flag:"https://cdn.kcak11.com/CountryFlags/countries/tz.svg",mask:"__-___-____"},{name:"Thailand",code:"+66",prefix:null,iso:"TH",flag:"https://cdn.kcak11.com/CountryFlags/countries/th.svg",mask:"__-___-____"},{name:"Timor-Leste",code:"+670",prefix:null,iso:"TL",flag:"https://cdn.kcak11.com/CountryFlags/countries/tl.svg",mask:"___-_____"},{name:"Togo",code:"+228",prefix:null,iso:"TG",flag:"https://cdn.kcak11.com/CountryFlags/countries/tg.svg",mask:"__-___-___"},{name:"Tokelau",code:"+690",prefix:null,iso:"TK",flag:"https://cdn.kcak11.com/CountryFlags/countries/tk.svg",mask:"____"},{name:"Tonga",code:"+676",prefix:null,iso:"TO",flag:"https://cdn.kcak11.com/CountryFlags/countries/to.svg",mask:"_____"},{name:"Trinidad and Tobago",code:"+1",prefix:"868",iso:"TT",flag:"https://cdn.kcak11.com/CountryFlags/countries/tt.svg",mask:"(868) ___-____"},{name:"Tunisia",code:"+216",prefix:null,iso:"TN",flag:"https://cdn.kcak11.com/CountryFlags/countries/tn.svg",mask:"__-___-___"},{name:"Turkey",code:"+90",prefix:null,iso:"TR",flag:"https://cdn.kcak11.com/CountryFlags/countries/tr.svg",mask:"(___) ___-____"},{name:"Turkmenistan",code:"+993",prefix:null,iso:"TM",flag:"https://cdn.kcak11.com/CountryFlags/countries/tm.svg",mask:"_-___-____"},{name:"Turks and Caicos Islands",code:"+1",prefix:"249",iso:"TC",flag:"https://cdn.kcak11.com/CountryFlags/countries/tc.svg",mask:"(249) ___-___"},{name:"Tuvalu",code:"+688",prefix:null,iso:"TV",flag:"https://cdn.kcak11.com/CountryFlags/countries/tv.svg",mask:"______"},{name:"Uganda",code:"+256",prefix:null,iso:"UG",flag:"https://cdn.kcak11.com/CountryFlags/countries/ug.svg",mask:"(___) ___-___"},{name:"Ukraine",code:"+380",prefix:null,iso:"UA",flag:"https://cdn.kcak11.com/CountryFlags/countries/ua.svg",mask:"(__) ___-__-__"},{name:"United Arab Emirates",code:"+971",prefix:null,iso:"AE",flag:"https://cdn.kcak11.com/CountryFlags/countries/ae.svg",mask:"_-___-____"},{name:"United Kingdom",code:"+44",prefix:null,iso:"GB",flag:"https://cdn.kcak11.com/CountryFlags/countries/gb.svg",mask:"__-____-____"},{name:"United States",code:"+1",prefix:"408",iso:"US",flag:"https://cdn.kcak11.com/CountryFlags/countries/us.svg",mask:"(408) ___-____"},{name:"Uruguay",code:"+598",prefix:null,iso:"UY",flag:"https://cdn.kcak11.com/CountryFlags/countries/uy.svg",mask:"_-___-__-__"},{name:"Uzbekistan",code:"+998",prefix:null,iso:"UZ",flag:"https://cdn.kcak11.com/CountryFlags/countries/uz.svg",mask:"__-___-____"},{name:"Vanuatu",code:"+678",prefix:null,iso:"VU",flag:"https://cdn.kcak11.com/CountryFlags/countries/vu.svg",mask:"__-_____"},{name:"Venezuela, Bolivarian Republic of Venezuela",code:"+58",prefix:null,iso:"VE",flag:"https://cdn.kcak11.com/CountryFlags/countries/ve.svg",mask:"(___) ___-____"},{name:"Vietnam",code:"+84",prefix:null,iso:"VN",flag:"https://cdn.kcak11.com/CountryFlags/countries/vn.svg",mask:"(___) ____-___"},{name:"Virgin Islands, British",code:"+1",prefix:"284",iso:"VG",flag:"https://cdn.kcak11.com/CountryFlags/countries/vg.svg",mask:"(284) ___-____"},{name:"Virgin Islands, U.S.",code:"+1",prefix:"340",iso:"VI",flag:"https://cdn.kcak11.com/CountryFlags/countries/vi.svg",mask:"(340) ___-____"},{name:"Wallis and Futuna",code:"+681",prefix:null,iso:"WF",flag:"https://cdn.kcak11.com/CountryFlags/countries/wf.svg",mask:"__-____"},{name:"Yemen",code:"+967",prefix:null,iso:"YE",flag:"https://cdn.kcak11.com/CountryFlags/countries/ye.svg",mask:"___-___-___"},{name:"Zambia",code:"+260",prefix:null,iso:"ZM",flag:"https://cdn.kcak11.com/CountryFlags/countries/zm.svg",mask:"__-___-____"},{name:"Zimbabwe",code:"+263",prefix:null,iso:"ZW",flag:"https://cdn.kcak11.com/CountryFlags/countries/zw.svg",mask:"_-______"}],Bn={USD:{countryLanguage:"en-US",countryCurrency:"USD"},EUR:{countryLanguage:"de-DE",countryCurrency:"EUR"},JPY:{countryLanguage:"ja-JP",countryCurrency:"JPY"},GBP:{countryLanguage:"en-GB",countryCurrency:"GBP"},AUD:{countryLanguage:"en-AU",countryCurrency:"AUD"},CAD:{countryLanguage:"en-CA",countryCurrency:"CAD"},CHF:{countryLanguage:"de-CH",countryCurrency:"CHF"},CNY:{countryLanguage:"zh-CN",countryCurrency:"CNY"},SEK:{countryLanguage:"sv-SE",countryCurrency:"SEK"},NZD:{countryLanguage:"en-NZ",countryCurrency:"NZD"},BRL:{countryLanguage:"pt-BR",countryCurrency:"BRL"},INR:{countryLanguage:"en-IN",countryCurrency:"INR"},RUB:{countryLanguage:"ru-RU",countryCurrency:"RUB"},ZAR:{countryLanguage:"en-ZA",countryCurrency:"ZAR"},MXN:{countryLanguage:"es-MX",countryCurrency:"MXN"},SGD:{countryLanguage:"en-SG",countryCurrency:"SGD"},HKD:{countryLanguage:"zh-HK",countryCurrency:"HKD"},NOK:{countryLanguage:"nb-NO",countryCurrency:"NOK"},KRW:{countryLanguage:"ko-KR",countryCurrency:"KRW"},TRY:{countryLanguage:"tr-TR",countryCurrency:"TRY"},IDR:{countryLanguage:"id-ID",countryCurrency:"IDR"},THB:{countryLanguage:"th-TH",countryCurrency:"THB"}},$a=e=>e.replace(new RegExp("(?:R\\$|\\p{Sc}|[$€¥£])","gu"),"").trim(),jn=(e,t,n={showPrefix:!0})=>{if(!Bn[t])throw new Error("Unsupported currency code");const{countryCurrency:r,countryLanguage:a}=Bn[t],s=new Intl.NumberFormat(a,{style:"currency",currency:r}).format(e);return n.showPrefix?s.replace(/\s/g," "):$a(s).replace(/\s/g," ")};Gt({NINE:"(99) 99999-9999"}.NINE).length;function Ba(e){let t=e;return typeof e=="string"?(t=+Gt(e),t%1!==0&&(t=t.toFixed(2))):t=Number.isInteger(e)?Number(e)*10**2:e.toFixed(2),+Gt(String(t))/10**2}function Ut(e,t){if(!e)return[0,jn(0,t)];const n=Ba(e),r=jn(n,t);return[n,r]}function ja(e){const{name:t,disabled:n,title:r,style:a,variant:s="solid",label:o,className:i="",value:l,defaultValue:u,max:f,locale:d,onChange:_,prefix:p,suffix:g,isLoading:h=!1,leftIcon:v,readOnly:b,onFocus:w,onBlur:k,errorMessage:S,showAsterisk:V,rightIcon:j,size:O="md",id:G,...A}=e,{fieldErrors:x}=ye(),[P,D]=m.useState(!1),[F,H]=m.useState("0"),L=m.useRef(null),z=G||m.useId(),M=S||(x==null?void 0:x[t]),Q=!!M,E=n||h,re={md:20,lg:20}[O],ee=j?"right":"left",be=ee==="left"&&h,le=ee==="right"&&h;function se(){E||!(L!=null&&L.current)||(D(!0),L.current.focus())}function oe(ge){D(!0),w&&w(ge)}function $(ge){D(!1),k&&k(ge)}const Z=ge=>{const[De,Ve]=Ut(ge,d);return!f||De<=f?(H(Ve),[De,Ve]):Ut(ge,d)},Ie=ge=>{ge.preventDefault();const[De,Ve]=Z(ge.target.value);_&&_(ge,String(De),String(Ve))};m.useEffect(()=>{const ge=l||+u||void 0,[,De]=Ut(ge,d);H(De)},[d,u,l]);const wn=`arkynCurrencyInput ${p?"hasPrefix":""} ${g?"hasSuffix":""} ${s} ${O} ${E||b||h?"opacity":""} ${Q?"errored":""} ${P?"focused":""} ${i}`;return c.jsxs(me,{children:[o&&c.jsx(fe,{showAsterisk:V,htmlFor:z,children:o}),c.jsxs("section",{title:r,style:a,onClick:se,className:wn,children:[c.jsx(X,{iconSize:re,icon:p,className:"prefix"}),c.jsx(X,{show:be,iconSize:re,className:"spinner",icon:B.Loader2}),c.jsx(X,{show:!h,icon:v,iconSize:re}),c.jsx("input",{value:F,disabled:E,readOnly:b,ref:L,onFocus:oe,onBlur:$,onChange:Ie,id:z,name:t,...A}),c.jsx(X,{show:!h,icon:j,iconSize:re}),c.jsx(X,{show:le,iconSize:re,className:"spinner",icon:B.Loader2}),c.jsx(X,{iconSize:re,icon:g,className:"suffix"})]}),M&&c.jsx(ke,{children:M})]})}function za(){return typeof window>"u"?0:window.innerWidth-document.documentElement.clientWidth}function Xe(e){m.useEffect(()=>{if(e){const t=document.body.style.overflow,n=document.body.style.paddingRight,r=za();if(r>0){const a=window.getComputedStyle(document.body),s=parseInt(a.paddingRight)||0;document.body.style.paddingRight=`${s+r}px`}return document.body.style.overflow="hidden",()=>{document.body.style.overflow=t,document.body.style.paddingRight=n}}},[e])}const zn=m.createContext({});function Ha(e){return c.jsx(zn.Provider,{value:{makeInvisible:e.makeInvisible},children:e.children})}function Ga(){return m.useContext(zn)}function Ua(e){const{isVisible:t,makeInvisible:n,orientation:r="left",children:a,className:s,...o}=e;Xe(t);const i=r==="left"?"-100%":"100%",u=`arkynDrawerContainer ${r} ${t?"visibleTrue":"visibleFalse"} ${s}`;return c.jsx(Ha,{makeInvisible:n,children:c.jsx(Le.AnimatePresence,{children:t&&c.jsxs("aside",{className:u.trim(),...o,children:[c.jsx(Le.motion.div,{className:"arkynDrawerContainerOverlay",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:n}),c.jsx(Le.motion.div,{className:"arkynDrawerContainerContent",transition:{ease:"easeOut",duration:.15},initial:{transform:`translateX(${i})`},animate:{transform:"translateX(0px)"},exit:{transform:`translateX(${i})`},children:a})]})})})}function Va(e){const{showCloseButton:t=!0,className:n,children:r,...a}=e,{makeInvisible:s}=Ga(),o=`arkynDrawerHeader ${n}`;return c.jsxs("header",{className:o.trim(),...a,children:[r,t&&c.jsx("button",{className:"arkynDrawerHeaderCloseButton",type:"button",onClick:s,"aria-label":"Close drawer",children:c.jsx(B.X,{size:24})})]})}function qa(e){const{disabled:t,file:n,isLoading:r,acceptFile:a,changeFileButtonText:s,handleSelectFile:o,reSendFile:i}=e;function l(){if(t)return;const f=document.createElement("input");f.type="file",f.accept=a,f.onchange=d=>{var p;const _=(p=d.target.files)==null?void 0:p[0];_&&o(_)},f.click()}function u(){return n.type.startsWith("image/")?c.jsx(B.FileImage,{}):n.type.startsWith("audio/")?c.jsx(B.FileAudio,{}):n.type.startsWith("application/zip")?c.jsx(B.FileArchive,{}):c.jsx(B.File,{})}return c.jsxs("div",{className:"arkynFileUploadHasFileContent",children:[c.jsxs("section",{className:"arkynFileUploadFileContainer",children:[c.jsx(u,{}),c.jsx("p",{children:n.name})]}),c.jsx(dt,{}),c.jsxs("div",{className:"arkynFileUploadButtonsContainer",children:[!!i&&c.jsx(gt,{orientation:"bottom",text:"Reenviar arquivo",children:c.jsx(_t,{type:"button","aria-label":"resend file",variant:"outline",scheme:"danger",size:"sm",isLoading:r,onClick:i,icon:B.RefreshCw,disabled:t})}),c.jsx($e,{isLoading:r,onClick:l,variant:"outline",size:"sm",type:"button",disabled:t,children:s})]})]})}function Wa(e){const{dropFileText:t,isLoading:n,acceptFile:r,handleSelectFile:a,selectFileButtonText:s,disabled:o}=e;function i(u){if(o)return;u.preventDefault();const f=u.dataTransfer.files[0];f&&a(f)}function l(){if(o)return;const u=document.createElement("input");u.type="file",u.accept=r,u.onchange=f=>{var _;const d=(_=f.target.files)==null?void 0:_[0];d&&a(d)},u.click()}return c.jsxs("div",{onDrop:i,className:"arkynFileUploadNoFileContent",children:[c.jsx($e,{isLoading:n,onClick:l,variant:"ghost",size:"sm",type:"button",disabled:o,children:s}),c.jsx("p",{children:t})]})}function Ra(e){const{name:t,label:n,showAsterisk:r=!1,action:a,fileName:s="file",method:o="POST",acceptFile:i="*",fileResponseName:l="url",changeFileButtonText:u="Alterar arquivo",selectFileButtonText:f="Selecionar arquivo",dropFileText:d="Ou arraste e solte o arquivo aqui",onChange:_,disabled:p=!1}=e,{fieldErrors:g}=ye(),h=g==null?void 0:g[t],[v,b]=m.useState(""),[w,k]=m.useState(""),[S,V]=m.useState(null),[j,O]=m.useState(!1);async function G(H){if(p)return;O(!0),V(H),k("");const L=new FormData;L.append(s,H),await fetch(a,{method:o,body:L}).then(async z=>await z.json()).then(z=>{z!=null&&z.error?k(z.error):b(z==null?void 0:z[l]),_&&_(z==null?void 0:z[l])}).catch(z=>{console.error(z),k("Erro ao enviar o arquivo")}).finally(()=>O(!1))}function A(H){p||G(H)}const x=h||w,F=`arkynFileUpload ${x?"hasError":"noHasError"} ${S?"hasFile":"noHasFile"}`;return c.jsxs(me,{children:[n&&c.jsx(fe,{showAsterisk:r,children:n}),c.jsxs("div",{className:F,children:[c.jsx("input",{type:"hidden",name:t,value:v||""}),!S&&c.jsx(Wa,{disabled:p,isLoading:j,acceptFile:i,dropFileText:d,handleSelectFile:A,selectFileButtonText:f}),S&&c.jsx(qa,{disabled:p,isLoading:j,acceptFile:i,file:S,handleSelectFile:A,changeFileButtonText:u,reSendFile:x&&S?()=>G(S):void 0})]}),x&&c.jsx(ke,{children:x})]})}function Xa(e){const{disabled:t,filePath:n,isLoading:r,acceptImage:a,changeImageButtonText:s,handleSelectFile:o,reSendImage:i}=e;function l(){if(t)return;const u=document.createElement("input");u.type="file",u.accept=a,u.onchange=f=>{var _;const d=(_=f.target.files)==null?void 0:_[0];d&&o(d)},u.click()}return c.jsxs("div",{className:"arkynImageUploadHasFileContent",style:{backgroundImage:`url("${n}")`},children:[i&&c.jsx(gt,{orientation:"bottom",text:"Reenviar imagem",children:c.jsx(_t,{type:"button","aria-label":"resend image",variant:"outline",scheme:"danger",size:"sm",isLoading:r,onClick:i,icon:B.RefreshCw,disabled:t})}),c.jsx($e,{isLoading:r,onClick:l,variant:"outline",size:"sm",type:"button",disabled:t,children:s})]})}function Ka(e){const{dropImageText:t,isLoading:n,acceptImage:r,handleSelectFile:a,selectImageButtonText:s,disabled:o}=e;function i(u){if(o)return;u.preventDefault();const f=u.dataTransfer.files[0];f&&a(f)}function l(){if(o)return;const u=document.createElement("input");u.type="file",u.accept=r,u.onchange=f=>{var _;const d=(_=f.target.files)==null?void 0:_[0];d&&a(d)},u.click()}return c.jsxs("div",{onDrop:i,className:"arkynImageUploadNoFileContent",children:[c.jsx($e,{isLoading:n,onClick:l,variant:"ghost",size:"sm",type:"button",disabled:o,children:s}),c.jsx("p",{children:t})]})}function Ya(e){const{name:t,defaultValue:n="",label:r,showAsterisk:a=!1,action:s,fileName:o="file",method:i="POST",acceptImage:l="image/*",fileResponseName:u="url",changeImageButtonText:f="Alterar imagem",selectImageButtonText:d="Selecionar imagem",dropImageText:_="Ou arraste e solte a imagem aqui",onChange:p,disabled:g=!1}=e,{fieldErrors:h}=ye(),v=h==null?void 0:h[t],[b,w]=m.useState(n),[k,S]=m.useState(""),[V,j]=m.useState(null),[O,G]=m.useState(n),[A,x]=m.useState(!1);async function P(M){if(g)return;x(!0),j(M),S("");const Q=new FormData;Q.append(o,M),await fetch(s,{method:i,body:Q}).then(async E=>await E.json()).then(E=>{E!=null&&E.error?S(E.error):w(E==null?void 0:E[u]),p&&p(E==null?void 0:E[u])}).catch(E=>{console.error(E),S("Erro ao enviar imagem")}).finally(()=>x(!1))}function D(M){g||(G(URL.createObjectURL(M)),P(M))}const F=v||k,z=`arkynImageUpload ${F?"hasError":"noHasError"} ${O?"hasImage":"noHasImage"}`;return c.jsxs(me,{children:[r&&c.jsx(fe,{showAsterisk:a,children:r}),c.jsxs("div",{className:z,children:[c.jsx("input",{type:"hidden",name:t,value:b||""}),!O&&c.jsx(Ka,{disabled:g,isLoading:A,acceptImage:l,dropImageText:_,handleSelectFile:D,selectImageButtonText:d}),O&&c.jsx(Xa,{disabled:g,isLoading:A,acceptImage:l,filePath:O,handleSelectFile:D,changeImageButtonText:f,reSendImage:F&&V?()=>P(V):void 0})]}),F&&c.jsx(ke,{children:F})]})}function Hn(e){const{name:t,disabled:n,title:r,style:a,variant:s="solid",label:o,className:i="",prefix:l,suffix:u,isLoading:f=!1,leftIcon:d,readOnly:_,onFocus:p,onBlur:g,errorMessage:h,showAsterisk:v,rightIcon:b,type:w="text",size:k="md",id:S,...V}=e,{fieldErrors:j}=ye(),[O,G]=m.useState(!1),A=m.useRef(null),x=S||m.useId(),P=h||(j==null?void 0:j[t]),D=!!P,F=n||f,L={md:20,lg:20}[k],z=b?"right":"left",M=z==="left"&&f,Q=z==="right"&&f;function E(){F||!(A!=null&&A.current)||(G(!0),A.current.focus())}function ce(Z){G(!0),p&&p(Z)}function re(Z){G(!1),g&&g(Z)}if(w==="hidden")return c.jsx("input",{style:{display:"none"},readOnly:!0,type:"text",ref:A,...V});const $=`arkynInput ${l?"hasPrefix":""} ${u?"hasSuffix":""} ${s} ${k} ${F||_||f?"opacity":""} ${D?"errored":""} ${O?"focused":""} ${i}`;return c.jsxs(me,{children:[o&&c.jsx(fe,{showAsterisk:v,htmlFor:x,children:o}),c.jsxs("section",{title:r,style:a,onClick:E,className:$,children:[c.jsx(X,{iconSize:L,icon:l,className:"prefix"}),c.jsx(X,{show:M,iconSize:L,className:"spinner",icon:B.Loader2}),c.jsx(X,{show:!f,icon:d,iconSize:L}),c.jsx("input",{disabled:F,readOnly:_,ref:A,onFocus:ce,onBlur:re,type:w,id:x,name:t,...V}),c.jsx(X,{show:!f,icon:b,iconSize:L}),c.jsx(X,{show:Q,iconSize:L,className:"spinner",icon:B.Loader2}),c.jsx(X,{iconSize:L,icon:u,className:"suffix"})]}),P&&c.jsx(ke,{children:P})]})}const Za=m.forwardRef((e,t)=>c.jsx("input",{ref:t,...e}));function Ja(e){const{name:t,disabled:n,title:r,style:a,variant:s="solid",separate:o,mask:i,showMask:l,replacement:u,label:f,className:d="",prefix:_,suffix:p,isLoading:g=!1,leftIcon:h,readOnly:v,onFocus:b,onBlur:w,errorMessage:k,defaultValue:S,showAsterisk:V,rightIcon:j,size:O="md",id:G,...A}=e,{fieldErrors:x}=ye(),[P,D]=m.useState(!1),F=m.useRef(null),H=G||m.useId(),L=k||(x==null?void 0:x[t]),z=!!L,M=n||g,E={md:20,lg:20}[O],ce=j?"right":"left",re=ce==="left"&&g,ee=ce==="right"&&g;function be(){M||!(F!=null&&F.current)||(D(!0),F.current.focus())}function le(U){D(!0),b&&b(U)}function se(U){D(!1),w&&w(U)}const Me=`arkynMaskedInput ${_?"hasPrefix":""} ${p?"hasSuffix":""} ${s} ${O} ${M||v||g?"opacity":""} ${z?"errored":""} ${P?"focused":""} ${d}`;return c.jsxs(me,{children:[f&&c.jsx(fe,{showAsterisk:V,htmlFor:H,children:f}),c.jsxs("section",{title:r,style:a,onClick:be,className:Me,children:[c.jsx(X,{iconSize:E,icon:_,className:"prefix"}),c.jsx(X,{show:re,iconSize:E,className:"spinner",icon:B.Loader2}),c.jsx(X,{show:!g,icon:h,iconSize:E}),c.jsx(Tn.InputMask,{component:Za,mask:i,replacement:u,separate:o,showMask:l,ref:F,onFocus:le,onBlur:se,disabled:M,readOnly:v,id:H,name:t,...A}),c.jsx(X,{show:!g,icon:j,iconSize:E}),c.jsx(X,{show:ee,iconSize:E,className:"spinner",icon:B.Loader2}),c.jsx(X,{iconSize:E,icon:p,className:"suffix"})]}),L&&c.jsx(ke,{children:L})]})}const Gn=m.createContext({});function Qa(e){return c.jsx(Gn.Provider,{value:{makeInvisible:e.makeInvisible},children:e.children})}function es(){return m.useContext(Gn)}function ts(e){const{isVisible:t,makeInvisible:n,children:r,className:a="",...s}=e;Xe(t);const i=`arkynModalContainer ${t?"visibleTrue":"visibleFalse"} ${a}`;return c.jsx(Qa,{makeInvisible:n,children:c.jsx(Le.AnimatePresence,{children:t&&c.jsxs("aside",{className:i.trim(),...s,children:[c.jsx(Le.motion.div,{className:"arkynModalContainerOverlay",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:n}),c.jsx(Le.motion.div,{className:"arkynModalContainerContent",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0,scale:.75},animate:{opacity:1,scale:1},exit:{opacity:0,scale:0},children:r})]})})})}function ns(e){const{alignment:t="right",className:n,...r}=e,a=`arkynModalFooter ${t} ${n}`;return c.jsx("footer",{className:a.trim(),...r})}function rs(e){const{showCloseButton:t=!0,className:n,children:r,...a}=e,{makeInvisible:s}=es(),o=`arkynModalHeader ${n}`;return c.jsxs("header",{className:o.trim(),...a,children:[r,t&&c.jsx("button",{type:"button",onClick:s,"aria-label":"Close modal button",className:"arkynModalHeaderCloseButton",children:c.jsx(B.X,{size:24})})]})}function as(e){const{iconSize:t,isLoading:n,disabled:r,readOnly:a,isFocused:s}=e,l=`arkynMultiSelectChevron ${r||a?"notAnimate":""} ${s?"focused":""}`;return n?c.jsx(c.Fragment,{}):c.jsx(B.ChevronDown,{className:l,size:t,strokeWidth:2.5})}function ss(e){const{children:t,handleContainerFocus:n,disabled:r,isError:a,isLoading:s,isFocused:o,className:i,readOnly:l,variant:u,size:f,id:d,prefixExists:_}=e,p=_?"hasPrefix":"",g=a?"errored":"",h=r||l||s?"opacity":"",v=o?"focused":"";return c.jsx("section",{id:d,className:`arkynMultiSelectContainer ${p} ${u} ${f} ${h} ${g} ${v} ${i}`,onClick:n,children:t})}function os(e){const{children:t,size:n}=e,r=`arkynMultiSelectContent ${n}`;return c.jsx("div",{className:r,children:t})}function is(e){const{label:t,value:n,disabled:r,handleChangeValue:a}=e;return c.jsxs("div",{className:"arkynMultiSelectMark",children:[t,c.jsx("button",{disabled:r,type:"button",onClick:s=>{s.stopPropagation(),a(n)},children:c.jsx(B.X,{})})]})}function cs(e){const{label:t,optionHasSelected:n,handleChangeValue:r,value:a,size:s}=e,o=n(a)?"active":"",i=`arkynMultiSelectOption ${s} ${o}`;return c.jsxs("div",{onClick:()=>r(a),className:i,children:[t," ",c.jsx(B.Check,{})]})}function ls(e){const{children:t,isFocused:n,isSearchable:r,search:a,onSearch:s}=e,o=m.useRef(null),[i,l]=m.useState("bottom");Xe(n),m.useEffect(()=>{if(!n)return;(()=>{if(!o.current)return;const d=o.current.parentElement;if(!d)return;const _=d.getBoundingClientRect(),p=window.innerHeight,g=300;p-_.bottom<g&&_.top>g?l("top"):l("bottom")})()},[n]);function u(f){r&&s(f.target.value)}return n?c.jsxs("div",{ref:o,className:`arkynMultiSelectOptionsContainer ${i}`,children:[r&&c.jsx(Hn,{type:"search",name:"search-select",variant:"underline",leftIcon:B.Search,value:a,onChange:u}),t]}):c.jsx(c.Fragment,{})}function us(e){const{isFocused:t,handleBlur:n}=e;return t?c.jsx("aside",{className:"arkynMultiSelectOverlay",onClick:n}):c.jsx(c.Fragment,{})}function fs(e){const{iconSize:t,isLoading:n}=e;return n?c.jsx(B.Loader2,{className:"arkynMultiSelectSpinner",size:t,strokeWidth:2.5}):c.jsx(c.Fragment,{})}function ds(e){const{name:t,options:n,className:r="",placeholder:a="Selecione...",closeOnSelect:s=!1,defaultValue:o=[],errorMessage:i,isLoading:l=!1,readOnly:u=!1,isSearchable:f=!1,id:d,label:_,optionMaxHeight:p,showAsterisk:g,leftIcon:h,onSearch:v,onChange:b,onBlur:w,notFoundText:k="Sem opções disponíveis",onFocus:S,disabled:V=!1,prefix:j,size:O="md",value:G,variant:A="solid"}=e,{fieldErrors:x}=ye(),P=m.useRef(null),D=d||m.useId(),F=i||(x==null?void 0:x[t]),H=!!F,L=V||l||u,M={md:20,lg:20}[O],[Q,E]=m.useState(""),[ce,re]=m.useState(!1),[ee,be]=m.useState(o),le=G||ee;function se(U){return le.includes(U)}function oe(U){const ue=n.find(zt=>zt.value===U);return(ue==null?void 0:ue.label)||""}function $(){L||!(P!=null&&P.current)||ce||(re(!0),P.current.focus(),S&&S())}function Z(){re(!1),w&&P.current&&P.current.blur()}function Ie(U){E(U),v&&v(U)}function Ze(U){se(U)?(be(ee.filter(ue=>ue!==U)),b&&b(ee.filter(ue=>ue!==U))):(be([...ee,U]),b&&b([...ee,U])),s&&Z()}const Me=n.filter(U=>!!(e.onSearch||!e.isSearchable||U.label.toLowerCase().includes(Q.toLowerCase())));return c.jsxs(me,{children:[_&&c.jsx(fe,{showAsterisk:g,children:_}),c.jsxs(ss,{handleContainerFocus:$,disabled:L,isError:H,isFocused:ce,isLoading:l,readOnly:u,size:O,variant:A,className:r,prefixExists:!!j,id:D,children:[c.jsx("input",{ref:P,name:t,value:JSON.stringify(le),type:"hidden"}),c.jsx(X,{iconSize:M,icon:j,className:"prefix"}),h&&c.jsx(h,{size:M,strokeWidth:2.5}),c.jsxs(os,{size:O,children:[le.map(U=>c.jsx(is,{label:oe(U),value:U,handleChangeValue:Ze,disabled:L},U)),le.length<=0&&c.jsx("p",{children:a})]}),c.jsxs(ls,{isFocused:ce,isSearchable:f,search:Q,onSearch:Ie,children:[Me.map(({label:U,value:ue})=>c.jsx(cs,{label:U,value:ue,size:O,handleChangeValue:Ze,optionHasSelected:se},ue)),Me.length<=0&&c.jsx("p",{children:k})]}),c.jsx(as,{disabled:L,isFocused:ce,readOnly:u,iconSize:M,isLoading:l}),c.jsx(fs,{iconSize:M,isLoading:l}),c.jsx(us,{handleBlur:Z,isFocused:ce})]}),F&&c.jsx(ke,{children:F})]})}function Vt(e){return e&&e.replace(/[^0-9]/g,"")}const qt={EIGHT:"(99) 9999-9999",NINE:"(99) 99999-9999"};function Un(e,t){let n="",r=0;for(let a=0;a<t.length;a++)if(t[a]==="9")if(r<e.length)n+=e[r],r++;else break;else if(r<e.length)n+=t[a];else break;return n}function Vn(e){return e.length>10?"NINE":"EIGHT"}const qn=Vt(qt.NINE).length;function Wn(e,t){if(t.code==="+55"){let a=Vt(e);const s=Vn(a);return a.length>qn?void 0:(a=Un(a,qt[s]),a)}let r=t.mask;if(t.prefix){const a=/\$+/g;r=r.replace(a,t.prefix)}for(let a=0,s=0;a<r.length&&s<e.length;a++)r[a]==="_"&&(r=r.substring(0,a)+e[s]+r.substring(a+1),s++);return r}function _s(e,t){const n=Re.find(r=>r.code===e&&r.prefix===t);return n||null}function gs(e){const t=Re.find(n=>n.code===e);return t||null}function ms(e){const t=e.split(" ")[0].split("-")[0],n=e.split(" ")[0].split("-")[1],r=e.split(" ")[1];if(!t||!r)return{country:null,formattedNumber:""};if(n){const i=_s(t,n);if(!i)return{country:null,formattedNumber:""};const l=Wn(r,i);return{country:i,formattedNumber:l}}const a=gs(t);if(!a)return{country:null,formattedNumber:""};const s=Wn(r,a);return{country:a,formattedNumber:s}}function hs(e){const{children:t,onFocus:n,disabled:r,isError:a,isLoading:s,isFocused:o,className:i="",readOnly:l,variant:u,size:f,id:d}=e,h=`arkynPhoneInputContainer ${u} ${f} ${r||l||s?"opacity":""} ${a?"errored":""} ${o?"focused":""} ${i}`;return c.jsx("section",{id:d,className:h.trim(),onClick:n,children:t})}function ps(e){const{isOpen:t,onClick:n}=e;return t?c.jsx("aside",{className:"arkynPhoneInputCountriesOverlay",onClick:n}):c.jsx(c.Fragment,{})}function ys(e){const{country:t,isActive:n,handleChangeValue:r,size:a}=e,o=`arkynPhoneInputCountryOption ${a} ${n?"active":""}`;return c.jsxs("div",{onClick:()=>r(t),className:o,children:[c.jsx("img",{src:t.flag,alt:t.name,className:"flag"}),t.name," ",c.jsx("span",{children:t.code}),c.jsx(B.Check,{className:"check"})]})}function vs(e){const{children:t,isOpen:n,onSearch:r,search:a,placeholder:s}=e,o=m.useRef(null),[i,l]=m.useState("bottom");function u(f){r(f.target.value)}return Xe(n),m.useEffect(()=>{if(!n)return;(()=>{if(!o.current)return;const d=o.current.parentElement;if(!d)return;const _=d.getBoundingClientRect(),p=window.innerHeight,g=300;p-_.bottom<g&&_.top>g?l("top"):l("bottom")})()},[n]),n?c.jsxs("div",{className:`arkynPhoneInputCountryOptionsContainer ${i}`,ref:o,children:[c.jsx("input",{type:"search",name:"search-select",className:"arkynPhoneInputCountryOptionsContainerSearchSelect",value:a,id:"input-search",placeholder:s,onChange:u}),t]}):c.jsx(c.Fragment,{})}function ks(e){const{currentCountry:t,onClick:n}=e;return c.jsxs("div",{className:"phoneInputSelectCountry",onClick:n,children:[c.jsx("img",{className:"flag",src:t.flag,alt:t.name}),c.jsx(B.ChevronDown,{className:"chevronDown",strokeWidth:2.5}),c.jsx(dt,{orientation:"vertical"})]})}const Cs=m.forwardRef((e,t)=>c.jsx("input",{ref:t,...e})),bs=m.forwardRef((e,t)=>{const{onFocus:n,onBlur:r,size:a,onChange:s,value:o,currentCountry:i,disabled:l}=e,[u,f]=m.useState(!1);m.useEffect(()=>{u?s(i.mask):f(!0)},[i]);const d=`phoneInputMask ${a}`;function _(p){let g=Vt(p.target.value);const h=Vn(g);g.length>qn||(g=Un(g,qt[h]),p.target.value=g,s(g))}return i.code==="+55"?c.jsx("input",{value:o,onChange:_,className:d,onFocus:n,onBlur:r,disabled:l,ref:t}):c.jsx(Tn.InputMask,{value:o,onChange:p=>s(p.target.value),className:d,component:Cs,onFocus:n,onBlur:r,disabled:l,mask:i.mask,showMask:!0,replacement:{_:/\d/},ref:t})});function xs(e){const{defaultCountry:t,label:n,className:r="",disabled:a=!1,errorMessage:s,isLoading:o=!1,readOnly:i=!1,size:l="md",defaultValue:u="",variant:f="solid",showAsterisk:d,name:_,onChange:p,searchCountryPlaceholder:g="Pesquisar país",notFoundCountryText:h="Nenhum país encontrado",id:v}=e,b=ms(u),[w,k]=m.useState(!1),[S,V]=m.useState(""),[j,O]=m.useState(!1),[G,A]=m.useState(b.formattedNumber||""),[x,P]=m.useState(()=>{if(b.country)return b.country;const $=Re.find(Z=>Z.iso===t);return $||Re[30]}),{fieldErrors:D}=ye(),F=m.useRef(null),H=v||m.useId(),L=s||(D==null?void 0:D[_]),z=!!L,M=a||o,Q=m.useRef(null);function E(){M||w||j||(k(!0),Q.current&&Q.current.focus())}function ce(){O(!0),k(!0)}function re(){O(!1),k(!1)}function ee(){k(!0)}function be(){k(!1)}function le($){return $.name.toLowerCase().includes(S.toLowerCase())}function se($){return x.prefix?$.replace(x.prefix,"").replaceAll(" ","").replaceAll("-","").replaceAll("(","").replaceAll(")","").trim():$.replaceAll(" ","").replaceAll("-","").replaceAll("(","").replaceAll(")","").trim()}function oe($){let Z=x.code;return x.prefix&&(Z+=`-${x.prefix}`),Z+=" ",Z+=se($||G),Z}return c.jsxs(me,{children:[n&&c.jsx(fe,{showAsterisk:d,children:n}),c.jsxs(hs,{id:H,disabled:M,isError:z,isLoading:o,isFocused:w,readOnly:i,size:l,variant:f,className:r,onFocus:E,children:[c.jsx(ks,{currentCountry:x,onClick:ce,size:l}),c.jsxs(vs,{isOpen:M?!1:j,search:S,placeholder:g,onSearch:V,children:[Re.filter($=>le($)).map($=>c.jsx(ys,{country:$,handleChangeValue:()=>{P($),O(!1),A($.mask)},isActive:$.iso===x.iso,size:l},$.iso)),Re.filter($=>le($)).length===0&&c.jsx("p",{children:h})]}),c.jsx(ps,{isOpen:M?!1:j,onClick:re}),c.jsx(bs,{ref:Q,currentCountry:x,value:G,onChange:$=>{A($),p&&p(oe($))},disabled:M,onBlur:be,onFocus:ee,size:l}),c.jsx("input",{ref:F,type:"hidden",name:_,value:oe()})]}),L&&c.jsx(ke,{children:L})]})}function Es(e){const{children:t,button:n,closeOnClick:r,className:a="",orientation:s="bottomLeft"}=e,[o,i]=m.useState(!1),u=`arkynPopover ${s} ${o?"visibleTrue":"visibleFalse"} ${a}`;function f(){o||i(!0)}return Xe(o),c.jsxs("div",{className:u,onClick:f,children:[n,c.jsx(Le.motion.div,{style:{visibility:o?"visible":"hidden"},transition:{ease:"easeOut",duration:0},initial:{opacity:0},animate:{opacity:o?1:0},exit:{opacity:0},onClick:()=>r&&i(!1),className:"arkynPopoverContent",children:t}),o&&c.jsx("div",{onClick:()=>i(!1),className:"arkynPopoverOverlay"})]})}const Rn=m.createContext({});function ws(e){const{children:t,size:n,isError:r,handleChange:a,value:s}=e;return c.jsx(Rn.Provider,{value:{handleChange:a,value:s,size:n,isError:r},children:t})}function Ss(){return m.useContext(Rn)}function Ns(e){const{value:t,size:n,disabled:r,children:a,className:s="",...o}=e,{handleChange:i,size:l,value:u,isError:f}=Ss(),v=`arkynRadioBox ${n||l} ${u===t?"checkedTrue":"checkedFalse"} ${f?"errorTrue":"errorFalse"} ${r?"disabledTrue":"disabledFalse"} ${s}`;return c.jsxs("label",{className:v.trim(),children:[c.jsx("button",{type:"button",disabled:r,onClick:()=>i(t),onFocus:()=>i(t),...o}),a]})}function Fs(e){const{defaultValue:t="",name:n,label:r,showAsterisk:a,errorMessage:s,value:o,onChange:i,size:l="md",className:u="",...f}=e,[d,_]=m.useState(t),{fieldErrors:p}=ye();function g(w){_(w),i&&i(w)}const h=s||(p==null?void 0:p[n]),v=!!h,b=`arkynRadioGroup ${l} ${u}`;return c.jsxs(me,{children:[r&&c.jsx(fe,{showAsterisk:a,children:r}),c.jsxs(ws,{isError:v,size:l,value:o||d,handleChange:g,children:[c.jsx("input",{style:{display:"none"},type:"text",readOnly:!0,name:n,value:o||d}),c.jsx("div",{className:b.trim(),...f})]}),h&&c.jsx(ke,{children:h})]})}function Ts(e){const{label:t,size:n="lg",defaultChecked:r=!1,checked:a=null,value:s,unCheckedValue:o="",name:i,className:l="",onCheck:u,id:f,...d}=e,_=m.useRef(null),p=f||m.useId(),[g,h]=m.useState(r),v=typeof a=="boolean"?a:g;function b(){h(!g),u&&u(v?o:s||"checked")}const k=`arkynSwitch ${v?"checkedTrue":"checkedFalse"} ${n} ${l}`;return c.jsxs(me,{children:[t&&c.jsx(fe,{children:t}),c.jsx("button",{type:"button",onClick:b,className:k,...d,children:c.jsx("input",{id:p,type:"hidden",name:i,ref:_,onClick:b,value:v?s||"checked":o})})]})}const Xn=m.createContext({});function Os(){return m.useContext(Xn)}function Ps(e){return c.jsx(Xn.Provider,{value:e,children:e.children})}function As(e){const{children:t,disabled:n=!1,className:r="",onClick:a,value:s,...o}=e,{disabled:i,currentTab:l,changeCurrentTab:u}=Os(),f=i||n,p=`arkynTabButton ${f?"isDisabled":""} ${l===s&&s?"isActive":""} ${r}`;function g(h){u(s),a&&a(h)}return c.jsx("button",{onClick:g,className:p.trim(),...o,disabled:f,type:"button",children:t})}function Is(e){const{children:t,onChange:n,defaultValue:r,disabled:a=!1,className:s,...o}=e,[i,l]=m.useState(r||""),u=`arkynTabContainer ${s||""}`;function f(d){l(d),n&&n(d)}return c.jsx(Ps,{disabled:a,currentTab:i,changeCurrentTab:f,children:c.jsx("nav",{className:u.trim(),...o,children:t})})}function Ms(e){const{emptyMessage:t="Nenhum dado adicionado.",className:n,children:r,...a}=e,s=`arkynTableBody ${n}`,o=m.Children.count(r)===0;return c.jsx("tbody",{className:s.trim(),...a,children:o?c.jsx("tr",{className:"arkynTableBodyEmptyLine",children:c.jsx("td",{colSpan:100,children:c.jsx("div",{children:t})})}):r})}function Ds(e){const{className:t,children:n,...r}=e,a=`arkynTableCaption ${t}`;return c.jsx("caption",{className:a.trim(),...r,children:c.jsx("div",{className:"arkynTableCaptionContent",children:n})})}function Ls(e){const{children:t,className:n,...r}=e,a=`arkynTableContainer ${n}`;return c.jsx("div",{className:a.trim(),...r,children:c.jsx("table",{children:t})})}function $s(e){const{className:t,children:n,...r}=e,a=`arkynTableFooter ${t}`;return c.jsxs("tfoot",{className:a.trim(),...r,children:[c.jsx("tr",{className:"spacingRow"}),c.jsx("tr",{children:c.jsx("th",{colSpan:100,children:c.jsx("div",{className:"arkynTableFooterContent",children:n})})})]})}function Bs(e){const{className:t,children:n,...r}=e,a=`arkynTableHeader ${t}`;return c.jsxs("thead",{className:a.trim(),...r,children:[c.jsx("tr",{children:n}),c.jsx("tr",{className:"spacingRow"})]})}function js(e){const{variant:t="solid",size:n="md",className:r,errorMessage:a,disabled:s=!1,readOnly:o=!1,label:i,showAsterisk:l,name:u,onFocus:f,onBlur:d,title:_,style:p,id:g,...h}=e,{fieldErrors:v}=ye(),[b,w]=m.useState(!1),k=m.useRef(null),S=g||m.useId(),V=a||(v==null?void 0:v[u]),x=`arkynTextarea ${t} ${n} ${s||o?"opacityTrue":"opacityFalse"} ${!!V?"errorTrue":"errorFalse"} ${b?"focusedTrue":"focusedFalse"} ${r}`;function P(){s||!(k!=null&&k.current)||(w(!0),k.current.focus())}function D(H){w(!0),f&&f(H)}function F(H){w(!1),d&&d(H)}return c.jsxs(me,{children:[i&&c.jsx(fe,{showAsterisk:l,children:i}),c.jsx("section",{title:_,style:p,onClick:P,className:x,children:c.jsx("textarea",{id:S,disabled:s,readOnly:o,ref:k,onFocus:D,onBlur:F,...h})}),V&&c.jsx(fe,{children:V})]})}const Kn=m.createContext({});function zs(e){const{children:t=!1}=e,[n,r]=m.useState([]);function a(l){return!!n.some(u=>u.key===l)}function s(l){var u;return(u=n.find(f=>f.key===l))==null?void 0:u.data}function o(l,u){const f=a(l);r(f?d=>[...d.filter(p=>p.key!==l),{key:l,data:u}]:[...n,{key:l,data:u}])}function i(l){r(n.filter(u=>u.key!==l))}return c.jsx(Kn.Provider,{value:{drawerIsOpen:a,drawerData:s,openDrawer:o,closeDrawer:i},children:t})}function Hs(e){const t=m.useContext(Kn);if(Object.entries(t).length===0)throw new Error("useDrawer must be used within a Provider");if(e){const{drawerData:n,drawerIsOpen:r,openDrawer:a,closeDrawer:s}=t,o=r(e),i=n(e);return{drawerIsOpen:o,drawerData:i,openDrawer:f=>a(e,f),closeDrawer:()=>s(e)}}else return t}const Yn=m.createContext({});function Gs(e){const{children:t=!1}=e,[n,r]=m.useState([]);function a(u){return!!n.some(f=>f.key===u)}function s(u){var f;return(f=n.find(d=>d.key===u))==null?void 0:f.data}function o(u,f){const d=a(u);r(d?_=>[..._.filter(g=>g.key!==u),{key:u,data:f}]:[...n,{key:u,data:f}])}function i(u){r(n.filter(f=>f.key!==u))}function l(){r([])}return c.jsx(Yn.Provider,{value:{modalIsOpen:a,modalData:s,openModal:o,closeModal:i,closeAll:l},children:t})}function Us(e){const t=m.useContext(Yn);if(Object.entries(t).length===0)throw new Error("useModal must be used within a Provider");if(e){const{modalData:n,modalIsOpen:r,openModal:a,closeModal:s}=t,o=r(e),i=n(e);return{modalIsOpen:o,modalData:i,openModal:f=>a(e,f),closeModal:()=>s(e)}}else return t}function Vs(e,t=""){const n=new URLSearchParams(e),r=t?`${t}:`:"",a=s=>{Object.entries(s).forEach(([o,i])=>{i===void 0?n.delete(`${r}${o}`):n.set(`${r}${o}`,String(i))})};return{getParam:s=>n.get(`${r}${s}`),getScopedSearch:s=>{a(s);let o=n.toString();return o&&(o="?"+o),o}}}let qs={data:""},Ws=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||qs,Rs=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,Xs=/\/\*[^]*?\*\/| +/g,Zn=/\n+/g,Fe=(e,t)=>{let n="",r="",a="";for(let s in e){let o=e[s];s[0]=="@"?s[1]=="i"?n=s+" "+o+";":r+=s[1]=="f"?Fe(o,s):s+"{"+Fe(o,s[1]=="k"?"":t)+"}":typeof o=="object"?r+=Fe(o,t?t.replace(/([^,])+/g,i=>s.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,l=>/&/.test(l)?l.replace(/&/g,i):i?i+" "+l:l)):s):o!=null&&(s=/^--/.test(s)?s:s.replace(/[A-Z]/g,"-$&").toLowerCase(),a+=Fe.p?Fe.p(s,o):s+":"+o+";")}return n+(t&&a?t+"{"+a+"}":a)+r},we={},Jn=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+Jn(e[n]);return t}return e},Ks=(e,t,n,r,a)=>{let s=Jn(e),o=we[s]||(we[s]=(l=>{let u=0,f=11;for(;u<l.length;)f=101*f+l.charCodeAt(u++)>>>0;return"go"+f})(s));if(!we[o]){let l=s!==e?e:(u=>{let f,d,_=[{}];for(;f=Rs.exec(u.replace(Xs,""));)f[4]?_.shift():f[3]?(d=f[3].replace(Zn," ").trim(),_.unshift(_[0][d]=_[0][d]||{})):_[0][f[1]]=f[2].replace(Zn," ").trim();return _[0]})(e);we[o]=Fe(a?{["@keyframes "+o]:l}:l,n?"":"."+o)}let i=n&&we.g?we.g:null;return n&&(we.g=we[o]),((l,u,f,d)=>{d?u.data=u.data.replace(d,l):u.data.indexOf(l)===-1&&(u.data=f?l+u.data:u.data+l)})(we[o],t,r,i),o},Ys=(e,t,n)=>e.reduce((r,a,s)=>{let o=t[s];if(o&&o.call){let i=o(n),l=i&&i.props&&i.props.className||/^go/.test(i)&&i;o=l?"."+l:i&&typeof i=="object"?i.props?"":Fe(i,""):i===!1?"":i}return r+a+(o??"")},"");function mt(e){let t=this||{},n=e.call?e(t.p):e;return Ks(n.unshift?n.raw?Ys(n,[].slice.call(arguments,1),t.p):n.reduce((r,a)=>Object.assign(r,a&&a.call?a(t.p):a),{}):n,Ws(t.target),t.g,t.o,t.k)}let Qn,Wt,Rt;mt.bind({g:1});let Se=mt.bind({k:1});function Zs(e,t,n,r){Fe.p=t,Qn=e,Wt=n,Rt=r}function Te(e,t){let n=this||{};return function(){let r=arguments;function a(s,o){let i=Object.assign({},s),l=i.className||a.className;n.p=Object.assign({theme:Wt&&Wt()},i),n.o=/ *go\d+/.test(l),i.className=mt.apply(n,r)+(l?" "+l:"");let u=e;return e[0]&&(u=i.as||e,delete i.as),Rt&&u[0]&&Rt(i),Qn(u,i)}return a}}var Js=e=>typeof e=="function",ht=(e,t)=>Js(e)?e(t):e,Qs=(()=>{let e=0;return()=>(++e).toString()})(),er=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),eo=20,Xt="default",tr=(e,t)=>{let{toastLimit:n}=e.settings;switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,n)};case 1:return{...e,toasts:e.toasts.map(o=>o.id===t.toast.id?{...o,...t.toast}:o)};case 2:let{toast:r}=t;return tr(e,{type:e.toasts.find(o=>o.id===r.id)?1:0,toast:r});case 3:let{toastId:a}=t;return{...e,toasts:e.toasts.map(o=>o.id===a||a===void 0?{...o,dismissed:!0,visible:!1}:o)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(o=>o.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let s=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(o=>({...o,pauseDuration:o.pauseDuration+s}))}}},pt=[],nr={toasts:[],pausedAt:void 0,settings:{toastLimit:eo}},xe={},rr=(e,t=Xt)=>{xe[t]=tr(xe[t]||nr,e),pt.forEach(([n,r])=>{n===t&&r(xe[t])})},ar=e=>Object.keys(xe).forEach(t=>rr(e,t)),to=e=>Object.keys(xe).find(t=>xe[t].toasts.some(n=>n.id===e)),yt=(e=Xt)=>t=>{rr(t,e)},no={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},ro=(e={},t=Xt)=>{let[n,r]=m.useState(xe[t]||nr),a=m.useRef(xe[t]);m.useEffect(()=>(a.current!==xe[t]&&r(xe[t]),pt.push([t,r]),()=>{let o=pt.findIndex(([i])=>i===t);o>-1&&pt.splice(o,1)}),[t]);let s=n.toasts.map(o=>{var i,l,u;return{...e,...e[o.type],...o,removeDelay:o.removeDelay||((i=e[o.type])==null?void 0:i.removeDelay)||(e==null?void 0:e.removeDelay),duration:o.duration||((l=e[o.type])==null?void 0:l.duration)||(e==null?void 0:e.duration)||no[o.type],style:{...e.style,...(u=e[o.type])==null?void 0:u.style,...o.style}}});return{...n,toasts:s}},ao=(e,t="blank",n)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...n,id:(n==null?void 0:n.id)||Qs()}),tt=e=>(t,n)=>{let r=ao(t,e,n);return yt(r.toasterId||to(r.id))({type:2,toast:r}),r.id},J=(e,t)=>tt("blank")(e,t);J.error=tt("error"),J.success=tt("success"),J.loading=tt("loading"),J.custom=tt("custom"),J.dismiss=(e,t)=>{let n={type:3,toastId:e};t?yt(t)(n):ar(n)},J.dismissAll=e=>J.dismiss(void 0,e),J.remove=(e,t)=>{let n={type:4,toastId:e};t?yt(t)(n):ar(n)},J.removeAll=e=>J.remove(void 0,e),J.promise=(e,t,n)=>{let r=J.loading(t.loading,{...n,...n==null?void 0:n.loading});return typeof e=="function"&&(e=e()),e.then(a=>{let s=t.success?ht(t.success,a):void 0;return s?J.success(s,{id:r,...n,...n==null?void 0:n.success}):J.dismiss(r),a}).catch(a=>{let s=t.error?ht(t.error,a):void 0;s?J.error(s,{id:r,...n,...n==null?void 0:n.error}):J.dismiss(r)}),e};var so=1e3,oo=(e,t="default")=>{let{toasts:n,pausedAt:r}=ro(e,t),a=m.useRef(new Map).current,s=m.useCallback((d,_=so)=>{if(a.has(d))return;let p=setTimeout(()=>{a.delete(d),o({type:4,toastId:d})},_);a.set(d,p)},[]);m.useEffect(()=>{if(r)return;let d=Date.now(),_=n.map(p=>{if(p.duration===1/0)return;let g=(p.duration||0)+p.pauseDuration-(d-p.createdAt);if(g<0){p.visible&&J.dismiss(p.id);return}return setTimeout(()=>J.dismiss(p.id,t),g)});return()=>{_.forEach(p=>p&&clearTimeout(p))}},[n,r,t]);let o=m.useCallback(yt(t),[t]),i=m.useCallback(()=>{o({type:5,time:Date.now()})},[o]),l=m.useCallback((d,_)=>{o({type:1,toast:{id:d,height:_}})},[o]),u=m.useCallback(()=>{r&&o({type:6,time:Date.now()})},[r,o]),f=m.useCallback((d,_)=>{let{reverseOrder:p=!1,gutter:g=8,defaultPosition:h}=_||{},v=n.filter(k=>(k.position||h)===(d.position||h)&&k.height),b=v.findIndex(k=>k.id===d.id),w=v.filter((k,S)=>S<b&&k.visible).length;return v.filter(k=>k.visible).slice(...p?[w+1]:[0,w]).reduce((k,S)=>k+(S.height||0)+g,0)},[n]);return m.useEffect(()=>{n.forEach(d=>{if(d.dismissed)s(d.id,d.removeDelay);else{let _=a.get(d.id);_&&(clearTimeout(_),a.delete(d.id))}})},[n,s]),{toasts:n,handlers:{updateHeight:l,startPause:i,endPause:u,calculateOffset:f}}},io=Se`
|
2
2
|
from {
|
3
3
|
transform: scale(0) rotate(45deg);
|
4
4
|
opacity: 0;
|
@@ -190,14 +190,14 @@ function PhoneInput(props) {
|
|
190
190
|
returnValue += removeNumberMasks(props || value);
|
191
191
|
return returnValue;
|
192
192
|
}
|
193
|
-
return (_jsxs(FieldWrapper, { children: [label && _jsx(FieldLabel, { showAsterisk: showAsterisk, children: label }), _jsxs(PhoneInputContainer, { id: phoneInputId, disabled: isDisabled, isError: isError, isLoading: isLoading, isFocused: isFocused, readOnly: readOnly, size: size, variant: variant, className: className, onFocus: handleContainerFocus, children: [_jsx(PhoneInputCountrySelector, { currentCountry: currentCountry, onClick: handleOpenCountryOptions, size: size }), _jsxs(PhoneInputCountryOptionsContainer, { isOpen: showCountryOptions, search: search, placeholder: searchCountryPlaceholder, onSearch: setSearch, children: [countries
|
193
|
+
return (_jsxs(FieldWrapper, { children: [label && _jsx(FieldLabel, { showAsterisk: showAsterisk, children: label }), _jsxs(PhoneInputContainer, { id: phoneInputId, disabled: isDisabled, isError: isError, isLoading: isLoading, isFocused: isFocused, readOnly: readOnly, size: size, variant: variant, className: className, onFocus: handleContainerFocus, children: [_jsx(PhoneInputCountrySelector, { currentCountry: currentCountry, onClick: handleOpenCountryOptions, size: size }), _jsxs(PhoneInputCountryOptionsContainer, { isOpen: isDisabled ? false : showCountryOptions, search: search, placeholder: searchCountryPlaceholder, onSearch: setSearch, children: [countries
|
194
194
|
.filter((country) => filterCountryFunction(country))
|
195
195
|
.map((country) => (_jsx(PhoneInputCountryOption, { country: country, handleChangeValue: () => {
|
196
196
|
setCurrentCountry(country);
|
197
197
|
setShowCountryOptions(false);
|
198
198
|
setValue(country.mask);
|
199
199
|
}, isActive: country.iso === currentCountry.iso, size: size }, country.iso))), countries.filter((country) => filterCountryFunction(country))
|
200
|
-
.length === 0 && _jsx("p", { children: notFoundCountryText })] }), _jsx(PhoneInputCountriesOverlay, { isOpen: showCountryOptions, onClick: handleCloseCountryOptions }), _jsx(PhoneInputMask, { ref: inputPhoneMaskRef, currentCountry: currentCountry, value: value, onChange: (e) => {
|
200
|
+
.length === 0 && _jsx("p", { children: notFoundCountryText })] }), _jsx(PhoneInputCountriesOverlay, { isOpen: isDisabled ? false : showCountryOptions, onClick: handleCloseCountryOptions }), _jsx(PhoneInputMask, { ref: inputPhoneMaskRef, currentCountry: currentCountry, value: value, onChange: (e) => {
|
201
201
|
setValue(e);
|
202
202
|
onChange && onChange(inputValue(e));
|
203
203
|
}, disabled: isDisabled, onBlur: handleInputBlur, onFocus: handleInputFocus, size: size }), _jsx("input", { ref: phoneInputRef, type: "hidden", name: name, value: inputValue() })] }), errorMessage && _jsx(FieldError, { children: errorMessage })] }));
|