@zydon/common 1.0.70 → 1.0.72
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/hook-form/DatePicker/index.d.ts.map +1 -1
- package/dist/components/hook-form/DateRangePicker/index.d.ts.map +1 -1
- package/dist/components/hook-form/DateTimePicker/index.d.ts.map +1 -1
- package/dist/components/hook-form/TimePicker/index.d.ts.map +1 -1
- package/dist/{features-67ce04df.js → features-76041f0c.js} +1 -1
- package/dist/{index-f75a6dd7.js → index-b0be88fb.js} +66 -57
- package/dist/index.js +1 -1
- package/dist/index.umd.cjs +1 -1
- package/package.json +1 -100
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/hook-form/DatePicker/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/hook-form/DatePicker/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAqCzC,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/hook-form/DateRangePicker/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAE/C,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/hook-form/DateRangePicker/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAE/C,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAuDnD,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/hook-form/DateTimePicker/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAE9C,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/hook-form/DateTimePicker/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAE9C,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA2CjD,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/hook-form/TimePicker/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/hook-form/TimePicker/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAmCzC,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as D, n as L, r as En, c as jn, i as K, a as jt, s as Xs, b as It, d as xt, e as In, g as Ot, h as it, p as ot, j as On, k as Zs, w as Nt, l as z, m as B, t as Vt, o as Js, q as rt, u as St, v as Qs, x as ti, y as ei, z as ni, A as Nn, B as ne, C as Un, D as Gn, E as yt, P as si, F as ii, L as oi, S as ri, G as Kt, H as zt, I as ke, J as se, K as ai, M as $n, N as li, O as ci, Q as Kn, R as zn, T as ui, U as hi, V as fi, W as di, X as pi, Y as mi, Z as gi, _ as yi, $ as vi, a0 as xi } from "./index-
|
|
1
|
+
import { f as D, n as L, r as En, c as jn, i as K, a as jt, s as Xs, b as It, d as xt, e as In, g as Ot, h as it, p as ot, j as On, k as Zs, w as Nt, l as z, m as B, t as Vt, o as Js, q as rt, u as St, v as Qs, x as ti, y as ei, z as ni, A as Nn, B as ne, C as Un, D as Gn, E as yt, P as si, F as ii, L as oi, S as ri, G as Kt, H as zt, I as ke, J as se, K as ai, M as $n, N as li, O as ci, Q as Kn, R as zn, T as ui, U as hi, V as fi, W as di, X as pi, Y as mi, Z as gi, _ as yi, $ as vi, a0 as xi } from "./index-b0be88fb.js";
|
|
2
2
|
import Hn, { useContext as ie, useId as Pi, useEffect as Ti } from "react";
|
|
3
3
|
import "@mui/material";
|
|
4
4
|
import "@emotion/react";
|
|
@@ -5612,7 +5612,7 @@ const gD = (t, e, n) => {
|
|
|
5612
5612
|
...r,
|
|
5613
5613
|
children: n
|
|
5614
5614
|
}
|
|
5615
|
-
), hD = () => import("./features-
|
|
5615
|
+
), hD = () => import("./features-76041f0c.js").then((t) => t.default), ED = ({ children: t }) => /* @__PURE__ */ R.jsx(tI, { strict: !0, features: hD, children: /* @__PURE__ */ R.jsxs(wn.div, { style: { height: "100%" }, children: [
|
|
5616
5616
|
" ",
|
|
5617
5617
|
t,
|
|
5618
5618
|
" "
|
|
@@ -85015,19 +85015,20 @@ const bse = ({
|
|
|
85015
85015
|
)
|
|
85016
85016
|
}
|
|
85017
85017
|
);
|
|
85018
|
-
}, Sse = ({ name: t,
|
|
85019
|
-
const { control:
|
|
85018
|
+
}, Sse = ({ name: t, rules: e, ...n }) => {
|
|
85019
|
+
const { control: r } = Zt();
|
|
85020
85020
|
return /* @__PURE__ */ R.jsx(
|
|
85021
85021
|
en,
|
|
85022
85022
|
{
|
|
85023
85023
|
name: t,
|
|
85024
|
-
control:
|
|
85025
|
-
|
|
85026
|
-
|
|
85024
|
+
control: r,
|
|
85025
|
+
rules: e,
|
|
85026
|
+
render: ({ field: { ref: a, ...i }, fieldState: { error: o } }) => {
|
|
85027
|
+
var s;
|
|
85027
85028
|
return /* @__PURE__ */ R.jsx(
|
|
85028
85029
|
LN,
|
|
85029
85030
|
{
|
|
85030
|
-
inputRef:
|
|
85031
|
+
inputRef: a,
|
|
85031
85032
|
format: "dd/MM/yyyy",
|
|
85032
85033
|
localeText: {
|
|
85033
85034
|
previousMonth: "Mês anterior",
|
|
@@ -85035,16 +85036,16 @@ const bse = ({
|
|
|
85035
85036
|
fieldDayPlaceholder: () => "dd",
|
|
85036
85037
|
fieldMonthPlaceholder: () => "mm",
|
|
85037
85038
|
fieldYearPlaceholder: () => "aaaa",
|
|
85038
|
-
...
|
|
85039
|
+
...n.localeText
|
|
85039
85040
|
},
|
|
85040
|
-
...
|
|
85041
|
-
...
|
|
85042
|
-
value:
|
|
85041
|
+
...i,
|
|
85042
|
+
...n,
|
|
85043
|
+
value: i.value ? new Date(i.value) : null,
|
|
85043
85044
|
slotProps: {
|
|
85044
85045
|
textField: {
|
|
85045
|
-
...(
|
|
85046
|
-
error: !!
|
|
85047
|
-
helperText:
|
|
85046
|
+
...(s = n.slotProps) == null ? void 0 : s.textField,
|
|
85047
|
+
error: !!o,
|
|
85048
|
+
helperText: o == null ? void 0 : o.message,
|
|
85048
85049
|
autoComplete: "off",
|
|
85049
85050
|
spellCheck: "false",
|
|
85050
85051
|
fullWidth: !0
|
|
@@ -85058,15 +85059,17 @@ const bse = ({
|
|
|
85058
85059
|
}, yse = ({
|
|
85059
85060
|
name: t,
|
|
85060
85061
|
label: e,
|
|
85061
|
-
|
|
85062
|
+
rules: n,
|
|
85063
|
+
...r
|
|
85062
85064
|
}) => {
|
|
85063
|
-
const { control:
|
|
85065
|
+
const { control: a, setError: i } = Zt();
|
|
85064
85066
|
return /* @__PURE__ */ R.jsx(
|
|
85065
85067
|
en,
|
|
85066
85068
|
{
|
|
85067
85069
|
name: t,
|
|
85068
|
-
control:
|
|
85069
|
-
|
|
85070
|
+
control: a,
|
|
85071
|
+
rules: n,
|
|
85072
|
+
render: ({ field: { value: o, onChange: s }, fieldState: { error: l } }) => /* @__PURE__ */ R.jsx(
|
|
85070
85073
|
PN,
|
|
85071
85074
|
{
|
|
85072
85075
|
format: "dd/MM/yyyy",
|
|
@@ -85076,27 +85079,27 @@ const bse = ({
|
|
|
85076
85079
|
fieldDayPlaceholder: () => "dd",
|
|
85077
85080
|
fieldMonthPlaceholder: () => "mm",
|
|
85078
85081
|
fieldYearPlaceholder: () => "aaaa",
|
|
85079
|
-
...
|
|
85082
|
+
...r.localeText
|
|
85080
85083
|
},
|
|
85081
|
-
value: [(
|
|
85082
|
-
onChange: (
|
|
85083
|
-
onError: (
|
|
85084
|
-
|
|
85085
|
-
message:
|
|
85084
|
+
value: [(o == null ? void 0 : o.startDate) || null, (o == null ? void 0 : o.endDate) || null],
|
|
85085
|
+
onChange: (c) => s({ startDate: c[0], endDate: c[1] }),
|
|
85086
|
+
onError: (c) => {
|
|
85087
|
+
i(t, {
|
|
85088
|
+
message: c[0] || c[1] || void 0
|
|
85086
85089
|
});
|
|
85087
85090
|
},
|
|
85088
|
-
...
|
|
85091
|
+
...r,
|
|
85089
85092
|
slotProps: {
|
|
85090
|
-
textField: ({ position:
|
|
85091
|
-
var
|
|
85093
|
+
textField: ({ position: c }) => {
|
|
85094
|
+
var u;
|
|
85092
85095
|
return {
|
|
85093
|
-
...(
|
|
85094
|
-
error: !!
|
|
85095
|
-
helperText:
|
|
85096
|
+
...(u = r.slotProps) == null ? void 0 : u.textField,
|
|
85097
|
+
error: !!l,
|
|
85098
|
+
helperText: l == null ? void 0 : l.message,
|
|
85096
85099
|
autoComplete: "off",
|
|
85097
85100
|
spellCheck: "false",
|
|
85098
85101
|
fullWidth: !0,
|
|
85099
|
-
label:
|
|
85102
|
+
label: c === "start" ? `${e} (Dt. Início)` : `${e} (Dt. Fim)`
|
|
85100
85103
|
};
|
|
85101
85104
|
}
|
|
85102
85105
|
},
|
|
@@ -85107,20 +85110,25 @@ const bse = ({
|
|
|
85107
85110
|
)
|
|
85108
85111
|
}
|
|
85109
85112
|
);
|
|
85110
|
-
}, Tse = ({
|
|
85111
|
-
|
|
85113
|
+
}, Tse = ({
|
|
85114
|
+
name: t,
|
|
85115
|
+
rules: e,
|
|
85116
|
+
...n
|
|
85117
|
+
}) => {
|
|
85118
|
+
const { control: r } = Zt();
|
|
85112
85119
|
return /* @__PURE__ */ R.jsx(
|
|
85113
85120
|
en,
|
|
85114
85121
|
{
|
|
85115
85122
|
name: t,
|
|
85116
|
-
control:
|
|
85117
|
-
|
|
85118
|
-
|
|
85123
|
+
control: r,
|
|
85124
|
+
rules: e,
|
|
85125
|
+
render: ({ field: { ref: a, ...i }, fieldState: { error: o } }) => {
|
|
85126
|
+
var s;
|
|
85119
85127
|
return /* @__PURE__ */ R.jsx(
|
|
85120
85128
|
kN,
|
|
85121
85129
|
{
|
|
85122
85130
|
format: "dd/MM/yyyy HH:mm",
|
|
85123
|
-
inputRef:
|
|
85131
|
+
inputRef: a,
|
|
85124
85132
|
localeText: {
|
|
85125
85133
|
previousMonth: "Mês anterior",
|
|
85126
85134
|
nextMonth: "Próximo mês",
|
|
@@ -85129,16 +85137,16 @@ const bse = ({
|
|
|
85129
85137
|
fieldYearPlaceholder: () => "aaaa",
|
|
85130
85138
|
fieldHoursPlaceholder: () => "hh",
|
|
85131
85139
|
fieldMinutesPlaceholder: () => "mm",
|
|
85132
|
-
...
|
|
85140
|
+
...n.localeText
|
|
85133
85141
|
},
|
|
85134
|
-
...
|
|
85135
|
-
...
|
|
85136
|
-
value:
|
|
85142
|
+
...i,
|
|
85143
|
+
...n,
|
|
85144
|
+
value: i.value ? new Date(i.value) : null,
|
|
85137
85145
|
slotProps: {
|
|
85138
85146
|
textField: {
|
|
85139
|
-
...(
|
|
85140
|
-
error: !!
|
|
85141
|
-
helperText:
|
|
85147
|
+
...(s = n.slotProps) == null ? void 0 : s.textField,
|
|
85148
|
+
error: !!o,
|
|
85149
|
+
helperText: o == null ? void 0 : o.message,
|
|
85142
85150
|
autoComplete: "off",
|
|
85143
85151
|
spellCheck: "false",
|
|
85144
85152
|
fullWidth: !0
|
|
@@ -85350,34 +85358,35 @@ const bse = ({
|
|
|
85350
85358
|
] })
|
|
85351
85359
|
}
|
|
85352
85360
|
);
|
|
85353
|
-
}, xse = ({ name: t,
|
|
85354
|
-
const { control:
|
|
85361
|
+
}, xse = ({ name: t, rules: e, ...n }) => {
|
|
85362
|
+
const { control: r } = Zt();
|
|
85355
85363
|
return /* @__PURE__ */ R.jsx(
|
|
85356
85364
|
en,
|
|
85357
85365
|
{
|
|
85358
85366
|
name: t,
|
|
85359
|
-
control:
|
|
85360
|
-
|
|
85361
|
-
|
|
85367
|
+
control: r,
|
|
85368
|
+
rules: e,
|
|
85369
|
+
render: ({ field: { ref: a, ...i }, fieldState: { error: o } }) => {
|
|
85370
|
+
var s;
|
|
85362
85371
|
return /* @__PURE__ */ R.jsx(
|
|
85363
85372
|
FN,
|
|
85364
85373
|
{
|
|
85365
85374
|
ampm: !1,
|
|
85366
85375
|
format: "HH:mm",
|
|
85367
|
-
inputRef:
|
|
85376
|
+
inputRef: a,
|
|
85368
85377
|
localeText: {
|
|
85369
85378
|
fieldHoursPlaceholder: () => "hh",
|
|
85370
85379
|
fieldMinutesPlaceholder: () => "mm",
|
|
85371
|
-
...
|
|
85380
|
+
...n.localeText
|
|
85372
85381
|
},
|
|
85373
|
-
...
|
|
85374
|
-
...
|
|
85375
|
-
value:
|
|
85382
|
+
...i,
|
|
85383
|
+
...n,
|
|
85384
|
+
value: i.value ? new Date(i.value) : null,
|
|
85376
85385
|
slotProps: {
|
|
85377
85386
|
textField: {
|
|
85378
|
-
...(
|
|
85379
|
-
error: !!
|
|
85380
|
-
helperText:
|
|
85387
|
+
...(s = n.slotProps) == null ? void 0 : s.textField,
|
|
85388
|
+
error: !!o,
|
|
85389
|
+
helperText: o == null ? void 0 : o.message,
|
|
85381
85390
|
autoComplete: "off",
|
|
85382
85391
|
spellCheck: "false",
|
|
85383
85392
|
fullWidth: !0
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a1 as d, ap as u, aq as v, as as c, at as C, a2 as k, a3 as S, a4 as P, a5 as T, a6 as g, a7 as F, au as A, av as D, aw as I, a8 as M, aN as f, a9 as h, aa as x, ax as B, aP as E, ay as N, ab as w, az as y, aQ as R, ac as U, ad as L, ae as G, af as H, ag as q, aA as z, b9 as V, ah as W, ai as j, aS as K, aT as O, aR as Z, ar as J, aG as Q, aH as X, aI as Y, aB as _, aj as $, aC as aa, ak as sa, al as ea, ba as oa, bb as ra, am as ta, aD as ia, aU as na, an as ba, aO as la, ao as pa, aE as ma, bc as da, aJ as ua, aK as va, aL as ca, aM as Ca, aF as ka, bd as Sa, bt as Pa, be as Ta, bq as ga, br as Fa, bs as Aa, bx as Da, bu as Ia, bv as Ma, bg as fa, bh as ha, bi as xa, bj as Ba, bk as Ea, bl as Na, bm as wa, bn as ya, bf as Ra, bo as Ua, bp as La, bw as Ga, b6 as Ha, b7 as qa, b8 as za, a$ as Va, b2 as Wa, aW as ja, aY as Ka, b1 as Oa, aV as Za, b0 as Ja, a_ as Qa, aZ as Xa, b4 as Ya, b5 as _a, b3 as $a, aX as as } from "./index-
|
|
1
|
+
import { a1 as d, ap as u, aq as v, as as c, at as C, a2 as k, a3 as S, a4 as P, a5 as T, a6 as g, a7 as F, au as A, av as D, aw as I, a8 as M, aN as f, a9 as h, aa as x, ax as B, aP as E, ay as N, ab as w, az as y, aQ as R, ac as U, ad as L, ae as G, af as H, ag as q, aA as z, b9 as V, ah as W, ai as j, aS as K, aT as O, aR as Z, ar as J, aG as Q, aH as X, aI as Y, aB as _, aj as $, aC as aa, ak as sa, al as ea, ba as oa, bb as ra, am as ta, aD as ia, aU as na, an as ba, aO as la, ao as pa, aE as ma, bc as da, aJ as ua, aK as va, aL as ca, aM as Ca, aF as ka, bd as Sa, bt as Pa, be as Ta, bq as ga, br as Fa, bs as Aa, bx as Da, bu as Ia, bv as Ma, bg as fa, bh as ha, bi as xa, bj as Ba, bk as Ea, bl as Na, bm as wa, bn as ya, bf as Ra, bo as Ua, bp as La, bw as Ga, b6 as Ha, b7 as qa, b8 as za, a$ as Va, b2 as Wa, aW as ja, aY as Ka, b1 as Oa, aV as Za, b0 as Ja, a_ as Qa, aZ as Xa, b4 as Ya, b5 as _a, b3 as $a, aX as as } from "./index-b0be88fb.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import "@mui/material";
|
|
4
4
|
import "@emotion/react";
|
package/dist/index.umd.cjs
CHANGED
|
@@ -287,7 +287,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),I=U,M=X),$===void 0&&(
|
|
|
287
287
|
border-left: 0;
|
|
288
288
|
border-right: 0;
|
|
289
289
|
}
|
|
290
|
-
`,ple=1,fle=3,_le=function(t){Hse(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.imageRef=O.createRef(),n.videoRef=O.createRef(),n.containerRef=null,n.styleRef=null,n.containerRect=null,n.mediaSize={width:0,height:0,naturalWidth:0,naturalHeight:0},n.dragStartPosition={x:0,y:0},n.dragStartCrop={x:0,y:0},n.gestureZoomStart=0,n.gestureRotationStart=0,n.isTouching=!1,n.lastPinchDistance=0,n.lastPinchRotation=0,n.rafDragTimeout=null,n.rafPinchTimeout=null,n.wheelTimer=null,n.currentDoc=typeof document<"u"?document:null,n.currentWindow=typeof window<"u"?window:null,n.resizeObserver=null,n.state={cropSize:null,hasWheelJustStarted:!1},n.initResizeObserver=function(){if(!(typeof window.ResizeObserver>"u"||!n.containerRef)){var r=!0;n.resizeObserver=new window.ResizeObserver(function(i){if(r){r=!1;return}n.computeSizes()}),n.resizeObserver.observe(n.containerRef)}},n.preventZoomSafari=function(r){return r.preventDefault()},n.cleanEvents=function(){n.currentDoc&&(n.currentDoc.removeEventListener("mousemove",n.onMouseMove),n.currentDoc.removeEventListener("mouseup",n.onDragStopped),n.currentDoc.removeEventListener("touchmove",n.onTouchMove),n.currentDoc.removeEventListener("touchend",n.onDragStopped),n.currentDoc.removeEventListener("gesturemove",n.onGestureMove),n.currentDoc.removeEventListener("gestureend",n.onGestureEnd))},n.clearScrollEvent=function(){n.containerRef&&n.containerRef.removeEventListener("wheel",n.onWheel),n.wheelTimer&&clearTimeout(n.wheelTimer)},n.onMediaLoad=function(){var r=n.computeSizes();r&&(n.emitCropData(),n.setInitialCrop(r)),n.props.onMediaLoaded&&n.props.onMediaLoaded(n.mediaSize)},n.setInitialCrop=function(r){if(n.props.initialCroppedAreaPercentages){var i=sle(n.props.initialCroppedAreaPercentages,n.mediaSize,n.props.rotation,r,n.props.minZoom,n.props.maxZoom),a=i.crop,o=i.zoom;n.props.onCropChange(a),n.props.onZoomChange&&n.props.onZoomChange(o)}else if(n.props.initialCroppedAreaPixels){var s=cle(n.props.initialCroppedAreaPixels,n.mediaSize,n.props.rotation,r,n.props.minZoom,n.props.maxZoom),a=s.crop,o=s.zoom;n.props.onCropChange(a),n.props.onZoomChange&&n.props.onZoomChange(o)}},n.computeSizes=function(){var r,i,a,o,s,l,c=n.imageRef.current||n.videoRef.current;if(c&&n.containerRef){n.containerRect=n.containerRef.getBoundingClientRect();var u=n.containerRect.width/n.containerRect.height,d=((r=n.imageRef.current)===null||r===void 0?void 0:r.naturalWidth)||((i=n.videoRef.current)===null||i===void 0?void 0:i.videoWidth)||0,p=((a=n.imageRef.current)===null||a===void 0?void 0:a.naturalHeight)||((o=n.videoRef.current)===null||o===void 0?void 0:o.videoHeight)||0,f=c.offsetWidth<d||c.offsetHeight<p,m=d/p,_=void 0;if(f){var g=n.getObjectFit();switch(g){default:case"contain":_=u>m?{width:n.containerRect.height*m,height:n.containerRect.height}:{width:n.containerRect.width,height:n.containerRect.width/m};break;case"horizontal-cover":_={width:n.containerRect.width,height:n.containerRect.width/m};break;case"vertical-cover":_={width:n.containerRect.height*m,height:n.containerRect.height};break}}else _={width:c.offsetWidth,height:c.offsetHeight};n.mediaSize=Xt(Xt({},_),{naturalWidth:d,naturalHeight:p}),n.props.setMediaSize&&n.props.setMediaSize(n.mediaSize);var h=n.props.cropSize?n.props.cropSize:nle(n.mediaSize.width,n.mediaSize.height,n.containerRect.width,n.containerRect.height,n.props.aspect,n.props.rotation);return(((s=n.state.cropSize)===null||s===void 0?void 0:s.height)!==h.height||((l=n.state.cropSize)===null||l===void 0?void 0:l.width)!==h.width)&&n.props.onCropSizeChange&&n.props.onCropSizeChange(h),n.setState({cropSize:h},n.recomputeCropPosition),n.props.setCropSize&&n.props.setCropSize(h),h}},n.onMouseDown=function(r){n.currentDoc&&(r.preventDefault(),n.currentDoc.addEventListener("mousemove",n.onMouseMove),n.currentDoc.addEventListener("mouseup",n.onDragStopped),n.onDragStart(e.getMousePoint(r)))},n.onMouseMove=function(r){return n.onDrag(e.getMousePoint(r))},n.onTouchStart=function(r){n.currentDoc&&(n.isTouching=!0,!(n.props.onTouchRequest&&!n.props.onTouchRequest(r))&&(n.currentDoc.addEventListener("touchmove",n.onTouchMove,{passive:!1}),n.currentDoc.addEventListener("touchend",n.onDragStopped),r.touches.length===2?n.onPinchStart(r):r.touches.length===1&&n.onDragStart(e.getTouchPoint(r.touches[0]))))},n.onTouchMove=function(r){r.preventDefault(),r.touches.length===2?n.onPinchMove(r):r.touches.length===1&&n.onDrag(e.getTouchPoint(r.touches[0]))},n.onGestureStart=function(r){n.currentDoc&&(r.preventDefault(),n.currentDoc.addEventListener("gesturechange",n.onGestureMove),n.currentDoc.addEventListener("gestureend",n.onGestureEnd),n.gestureZoomStart=n.props.zoom,n.gestureRotationStart=n.props.rotation)},n.onGestureMove=function(r){if(r.preventDefault(),!n.isTouching){var i=e.getMousePoint(r),a=n.gestureZoomStart-1+r.scale;if(n.setNewZoom(a,i,{shouldUpdatePosition:!0}),n.props.onRotationChange){var o=n.gestureRotationStart+r.rotation;n.props.onRotationChange(o)}}},n.onGestureEnd=function(r){n.cleanEvents()},n.onDragStart=function(r){var i,a,o=r.x,s=r.y;n.dragStartPosition={x:o,y:s},n.dragStartCrop=Xt({},n.props.crop),(a=(i=n.props).onInteractionStart)===null||a===void 0||a.call(i)},n.onDrag=function(r){var i=r.x,a=r.y;n.currentWindow&&(n.rafDragTimeout&&n.currentWindow.cancelAnimationFrame(n.rafDragTimeout),n.rafDragTimeout=n.currentWindow.requestAnimationFrame(function(){if(n.state.cropSize&&!(i===void 0||a===void 0)){var o=i-n.dragStartPosition.x,s=a-n.dragStartPosition.y,l={x:n.dragStartCrop.x+o,y:n.dragStartCrop.y+s},c=n.props.restrictPosition?mc(l,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):l;n.props.onCropChange(c)}}))},n.onDragStopped=function(){var r,i;n.isTouching=!1,n.cleanEvents(),n.emitCropData(),(i=(r=n.props).onInteractionEnd)===null||i===void 0||i.call(r)},n.onWheel=function(r){if(n.currentWindow&&!(n.props.onWheelRequest&&!n.props.onWheelRequest(r))){r.preventDefault();var i=e.getMousePoint(r),a=tle(r).pixelY,o=n.props.zoom-a*n.props.zoomSpeed/200;n.setNewZoom(o,i,{shouldUpdatePosition:!0}),n.state.hasWheelJustStarted||n.setState({hasWheelJustStarted:!0},function(){var s,l;return(l=(s=n.props).onInteractionStart)===null||l===void 0?void 0:l.call(s)}),n.wheelTimer&&clearTimeout(n.wheelTimer),n.wheelTimer=n.currentWindow.setTimeout(function(){return n.setState({hasWheelJustStarted:!1},function(){var s,l;return(l=(s=n.props).onInteractionEnd)===null||l===void 0?void 0:l.call(s)})},250)}},n.getPointOnContainer=function(r){var i=r.x,a=r.y;if(!n.containerRect)throw new Error("The Cropper is not mounted");return{x:n.containerRect.width/2-(i-n.containerRect.left),y:n.containerRect.height/2-(a-n.containerRect.top)}},n.getPointOnMedia=function(r){var i=r.x,a=r.y,o=n.props,s=o.crop,l=o.zoom;return{x:(i+s.x)/l,y:(a+s.y)/l}},n.setNewZoom=function(r,i,a){var o=a===void 0?{}:a,s=o.shouldUpdatePosition,l=s===void 0?!0:s;if(!(!n.state.cropSize||!n.props.onZoomChange)){var c=gc(r,n.props.minZoom,n.props.maxZoom);if(l){var u=n.getPointOnContainer(i),d=n.getPointOnMedia(u),p={x:d.x*c-u.x,y:d.y*c-u.y},f=n.props.restrictPosition?mc(p,n.mediaSize,n.state.cropSize,c,n.props.rotation):p;n.props.onCropChange(f)}n.props.onZoomChange(c)}},n.getCropData=function(){if(!n.state.cropSize)return null;var r=n.props.restrictPosition?mc(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop;return ile(r,n.mediaSize,n.state.cropSize,n.getAspect(),n.props.zoom,n.props.rotation,n.props.restrictPosition)},n.emitCropData=function(){var r=n.getCropData();if(r){var i=r.croppedAreaPercentages,a=r.croppedAreaPixels;n.props.onCropComplete&&n.props.onCropComplete(i,a),n.props.onCropAreaChange&&n.props.onCropAreaChange(i,a)}},n.emitCropAreaChange=function(){var r=n.getCropData();if(r){var i=r.croppedAreaPercentages,a=r.croppedAreaPixels;n.props.onCropAreaChange&&n.props.onCropAreaChange(i,a)}},n.recomputeCropPosition=function(){if(n.state.cropSize){var r=n.props.restrictPosition?mc(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop;n.props.onCropChange(r),n.emitCropData()}},n}return e.prototype.componentDidMount=function(){!this.currentDoc||!this.currentWindow||(this.containerRef&&(this.containerRef.ownerDocument&&(this.currentDoc=this.containerRef.ownerDocument),this.currentDoc.defaultView&&(this.currentWindow=this.currentDoc.defaultView),this.initResizeObserver(),typeof window.ResizeObserver>"u"&&this.currentWindow.addEventListener("resize",this.computeSizes),this.props.zoomWithScroll&&this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}),this.containerRef.addEventListener("gesturestart",this.onGestureStart)),this.props.disableAutomaticStylesInjection||(this.styleRef=this.currentDoc.createElement("style"),this.styleRef.setAttribute("type","text/css"),this.props.nonce&&this.styleRef.setAttribute("nonce",this.props.nonce),this.styleRef.innerHTML=dle,this.currentDoc.head.appendChild(this.styleRef)),this.imageRef.current&&this.imageRef.current.complete&&this.onMediaLoad(),this.props.setImageRef&&this.props.setImageRef(this.imageRef),this.props.setVideoRef&&this.props.setVideoRef(this.videoRef))},e.prototype.componentWillUnmount=function(){var n,r;!this.currentDoc||!this.currentWindow||(typeof window.ResizeObserver>"u"&&this.currentWindow.removeEventListener("resize",this.computeSizes),(n=this.resizeObserver)===null||n===void 0||n.disconnect(),this.containerRef&&this.containerRef.removeEventListener("gesturestart",this.preventZoomSafari),this.styleRef&&((r=this.styleRef.parentNode)===null||r===void 0||r.removeChild(this.styleRef)),this.cleanEvents(),this.props.zoomWithScroll&&this.clearScrollEvent())},e.prototype.componentDidUpdate=function(n){var r,i,a,o,s,l,c,u,d;n.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):n.aspect!==this.props.aspect?this.computeSizes():n.zoom!==this.props.zoom?this.recomputeCropPosition():((r=n.cropSize)===null||r===void 0?void 0:r.height)!==((i=this.props.cropSize)===null||i===void 0?void 0:i.height)||((a=n.cropSize)===null||a===void 0?void 0:a.width)!==((o=this.props.cropSize)===null||o===void 0?void 0:o.width)?this.computeSizes():(((s=n.crop)===null||s===void 0?void 0:s.x)!==((l=this.props.crop)===null||l===void 0?void 0:l.x)||((c=n.crop)===null||c===void 0?void 0:c.y)!==((u=this.props.crop)===null||u===void 0?void 0:u.y))&&this.emitCropAreaChange(),n.zoomWithScroll!==this.props.zoomWithScroll&&this.containerRef&&(this.props.zoomWithScroll?this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}):this.clearScrollEvent()),n.video!==this.props.video&&((d=this.videoRef.current)===null||d===void 0||d.load())},e.prototype.getAspect=function(){var n=this.props,r=n.cropSize,i=n.aspect;return r?r.width/r.height:i},e.prototype.getObjectFit=function(){var n,r,i,a;if(this.props.objectFit==="cover"){var o=this.imageRef.current||this.videoRef.current;if(o&&this.containerRef){this.containerRect=this.containerRef.getBoundingClientRect();var s=this.containerRect.width/this.containerRect.height,l=((n=this.imageRef.current)===null||n===void 0?void 0:n.naturalWidth)||((r=this.videoRef.current)===null||r===void 0?void 0:r.videoWidth)||0,c=((i=this.imageRef.current)===null||i===void 0?void 0:i.naturalHeight)||((a=this.videoRef.current)===null||a===void 0?void 0:a.videoHeight)||0,u=l/c;return u<s?"horizontal-cover":"vertical-cover"}return"horizontal-cover"}return this.props.objectFit},e.prototype.onPinchStart=function(n){var r=e.getTouchPoint(n.touches[0]),i=e.getTouchPoint(n.touches[1]);this.lastPinchDistance=FA(r,i),this.lastPinchRotation=BA(r,i),this.onDragStart(UA(r,i))},e.prototype.onPinchMove=function(n){var r=this;if(!(!this.currentDoc||!this.currentWindow)){var i=e.getTouchPoint(n.touches[0]),a=e.getTouchPoint(n.touches[1]),o=UA(i,a);this.onDrag(o),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame(function(){var s=FA(i,a),l=r.props.zoom*(s/r.lastPinchDistance);r.setNewZoom(l,o,{shouldUpdatePosition:!1}),r.lastPinchDistance=s;var c=BA(i,a),u=r.props.rotation+(c-r.lastPinchRotation);r.props.onRotationChange&&r.props.onRotationChange(u),r.lastPinchRotation=c})}},e.prototype.render=function(){var n=this,r=this.props,i=r.image,a=r.video,o=r.mediaProps,s=r.transform,l=r.crop,c=l.x,u=l.y,d=r.rotation,p=r.zoom,f=r.cropShape,m=r.showGrid,_=r.style,g=_.containerStyle,h=_.cropAreaStyle,E=_.mediaStyle,v=r.classes,b=v.containerClassName,S=v.cropAreaClassName,T=v.mediaClassName,y=this.getObjectFit();return O.createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(x){return n.containerRef=x},"data-testid":"container",style:g,className:hc("reactEasyCrop_Container",b)},i?O.createElement("img",Xt({alt:"",className:hc("reactEasyCrop_Image",y==="contain"&&"reactEasyCrop_Contain",y==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",y==="vertical-cover"&&"reactEasyCrop_Cover_Vertical",T)},o,{src:i,ref:this.imageRef,style:Xt(Xt({},E),{transform:s||"translate(".concat(c,"px, ").concat(u,"px) rotate(").concat(d,"deg) scale(").concat(p,")")}),onLoad:this.onMediaLoad})):a&&O.createElement("video",Xt({autoPlay:!0,loop:!0,muted:!0,className:hc("reactEasyCrop_Video",y==="contain"&&"reactEasyCrop_Contain",y==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",y==="vertical-cover"&&"reactEasyCrop_Cover_Vertical",T)},o,{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:Xt(Xt({},E),{transform:s||"translate(".concat(c,"px, ").concat(u,"px) rotate(").concat(d,"deg) scale(").concat(p,")")}),controls:!1}),(Array.isArray(a)?a:[{src:a}]).map(function(C){return O.createElement("source",Xt({key:C.src},C))})),this.state.cropSize&&O.createElement("div",{style:Xt(Xt({},h),{width:this.state.cropSize.width,height:this.state.cropSize.height}),"data-testid":"cropper",className:hc("reactEasyCrop_CropArea",f==="round"&&"reactEasyCrop_CropAreaRound",m&&"reactEasyCrop_CropAreaGrid",S)}))},e.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:fle,minZoom:ple,cropShape:"rect",objectFit:"contain",showGrid:!0,style:{},classes:{},mediaProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0},e.getMousePoint=function(n){return{x:Number(n.clientX),y:Number(n.clientY)}},e.getTouchPoint=function(n){return{x:Number(n.clientX),y:Number(n.clientY)}},e}(O.Component);const GA=({crop:t,zoom:e,onCropChange:n,onZoomChange:r,onCropComplete:i,image:{width:a,height:o,aspect:s,imgSrc:l=""}})=>N.jsx(Q.Stack,{position:"relative",alignItems:"center",justifyContent:"center",style:{position:"relative",width:a*1.1,height:o*1.1,margin:"auto"},children:N.jsx(_le,{image:l,crop:t,zoom:e,minZoom:1,maxZoom:5,cropSize:{width:a,height:o},aspect:s,onCropChange:n,onZoomChange:r,onCropComplete:i,objectFit:"horizontal-cover"})}),mle=qt(Q.Box)(({theme:t,ownerState:e})=>{const n=t.palette.mode==="light",r=e.variant==="filled",i=e.variant==="outlined",a=e.variant==="soft",o={...e.color==="default"&&{...i&&{backgroundColor:"transparent",color:t.palette.text.primary,border:`1px solid ${Ee(t.palette.grey[500],.32)}`},...a&&{color:n?t.palette.text.primary:t.palette.common.white,backgroundColor:Ee(t.palette.grey[500],.16)}}},s={...e.color!=="default"&&{...r&&{color:t.palette[e.color].contrastText,backgroundColor:t.palette[e.color].main},...i&&{backgroundColor:"transparent",color:t.palette[e.color].main,border:`1px solid ${t.palette[e.color].main}`},...a&&{color:t.palette[e.color][n?"dark":"light"],backgroundColor:Ee(t.palette[e.color].main,.16)}}};return{height:24,minWidth:22,lineHeight:0,borderRadius:6,cursor:"default",alignItems:"center",whiteSpace:"nowrap",display:"inline-flex",justifyContent:"center",textTransform:"capitalize",padding:t.spacing(0,1),color:t.palette.grey[800],fontSize:t.typography.pxToRem(12),fontFamily:t.typography.fontFamily,backgroundColor:t.palette.grey[300],fontWeight:t.typography.fontWeightBold,...s,...o}}),$A=O.forwardRef(({children:t,color:e="default",variant:n="soft",startIcon:r,endIcon:i,sx:a,...o},s)=>{const l=Gr(),c={width:16,height:16,"& svg, img":{width:1,height:1,objectFit:"cover"}};return N.jsxs(mle,{ref:s,component:"span",ownerState:{color:e,variant:n},sx:{...r&&{pl:.75},...i&&{pr:.75},...a},theme:l,...o,children:[r&&N.jsxs(Q.Box,{sx:{mr:.75,...c},children:[" ",r," "]}),t,i&&N.jsxs(Q.Box,{sx:{ml:.75,...c},children:[" ",i," "]})]})});$A.displayName="Label";function wr(t){return typeof t=="string"||t instanceof String}function qA(t){var e;return typeof t=="object"&&t!=null&&(t==null||(e=t.constructor)==null?void 0:e.name)==="Object"}function YA(t,e){return Array.isArray(e)?YA(t,(n,r)=>e.includes(r)):Object.entries(t).reduce((n,r)=>{let[i,a]=r;return e(a,i)&&(n[i]=a),n},{})}const Le={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function gle(t){switch(t){case Le.LEFT:return Le.FORCE_LEFT;case Le.RIGHT:return Le.FORCE_RIGHT;default:return t}}function ch(t){return t.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function Ec(t,e){if(e===t)return!0;const n=Array.isArray(e),r=Array.isArray(t);let i;if(n&&r){if(e.length!=t.length)return!1;for(i=0;i<e.length;i++)if(!Ec(e[i],t[i]))return!1;return!0}if(n!=r)return!1;if(e&&t&&typeof e=="object"&&typeof t=="object"){const a=e instanceof Date,o=t instanceof Date;if(a&&o)return e.getTime()==t.getTime();if(a!=o)return!1;const s=e instanceof RegExp,l=t instanceof RegExp;if(s&&l)return e.toString()==t.toString();if(s!=l)return!1;const c=Object.keys(e);for(i=0;i<c.length;i++)if(!Object.prototype.hasOwnProperty.call(t,c[i]))return!1;for(i=0;i<c.length;i++)if(!Ec(t[c[i]],e[c[i]]))return!1;return!0}else if(e&&t&&typeof e=="function"&&typeof t=="function")return e.toString()===t.toString();return!1}class hle{constructor(e){for(Object.assign(this,e);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?Le.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?Le.RIGHT:Le.LEFT}}function Ge(t,e){return new Ge.InputMask(t,e)}function VA(t){if(t==null)throw new Error("mask property should be defined");return t instanceof RegExp?Ge.MaskedRegExp:wr(t)?Ge.MaskedPattern:t===Date?Ge.MaskedDate:t===Number?Ge.MaskedNumber:Array.isArray(t)||t===Array?Ge.MaskedDynamic:Ge.Masked&&t.prototype instanceof Ge.Masked?t:Ge.Masked&&t instanceof Ge.Masked?t.constructor:t instanceof Function?Ge.MaskedFunction:(console.warn("Mask not found for mask",t),Ge.Masked)}function bc(t){if(!t)throw new Error("Options in not defined");if(Ge.Masked){if(t.prototype instanceof Ge.Masked)return{mask:t};const{mask:e=void 0,...n}=t instanceof Ge.Masked?{mask:t}:qA(t)&&t.mask instanceof Ge.Masked?t:{};if(e){const r=e.mask;return{...YA(e,(i,a)=>!a.startsWith("_")),mask:e.constructor,_mask:r,...n}}}return qA(t)?{...t}:{mask:t}}function li(t){if(Ge.Masked&&t instanceof Ge.Masked)return t;const e=bc(t),n=VA(e.mask);if(!n)throw new Error("Masked class is not found for provided mask, appropriate module needs to be imported manually before creating mask.");return e.mask===n&&delete e.mask,e._mask&&(e.mask=e._mask,delete e._mask),new n(e)}Ge.createMask=li;class uh{get selectionStart(){let e;try{e=this._unsafeSelectionStart}catch{}return e??this.value.length}get selectionEnd(){let e;try{e=this._unsafeSelectionEnd}catch{}return e??this.value.length}select(e,n){if(!(e==null||n==null||e===this.selectionStart&&n===this.selectionEnd))try{this._unsafeSelect(e,n)}catch{}}get isActive(){return!1}}Ge.MaskElement=uh;class ci extends uh{constructor(e){super(),this.input=e,this._handlers={}}get rootElement(){var e,n,r;return(e=(n=(r=this.input).getRootNode)==null?void 0:n.call(r))!=null?e:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(e){Object.keys(e).forEach(n=>this._toggleEventHandler(ci.EVENTS_MAP[n],e[n]))}unbindEvents(){Object.keys(this._handlers).forEach(e=>this._toggleEventHandler(e))}_toggleEventHandler(e,n){this._handlers[e]&&(this.input.removeEventListener(e,this._handlers[e]),delete this._handlers[e]),n&&(this.input.addEventListener(e,n),this._handlers[e]=n)}}ci.EVENTS_MAP={selectionChange:"keydown",input:"input",drop:"drop",click:"click",focus:"focus",commit:"blur"},Ge.HTMLMaskElement=ci;class Ele extends ci{constructor(e){super(e),this.input=e,this._handlers={}}get _unsafeSelectionStart(){return this.input.selectionStart!=null?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(e,n){this.input.setSelectionRange(e,n)}get value(){return this.input.value}set value(e){this.input.value=e}}Ge.HTMLMaskElement=ci;class HA extends ci{get _unsafeSelectionStart(){const e=this.rootElement,n=e.getSelection&&e.getSelection(),r=n&&n.anchorOffset,i=n&&n.focusOffset;return i==null||r==null||r<i?r:i}get _unsafeSelectionEnd(){const e=this.rootElement,n=e.getSelection&&e.getSelection(),r=n&&n.anchorOffset,i=n&&n.focusOffset;return i==null||r==null||r>i?r:i}_unsafeSelect(e,n){if(!this.rootElement.createRange)return;const r=this.rootElement.createRange();r.setStart(this.input.firstChild||this.input,e),r.setEnd(this.input.lastChild||this.input,n);const i=this.rootElement,a=i.getSelection&&i.getSelection();a&&(a.removeAllRanges(),a.addRange(r))}get value(){return this.input.textContent||""}set value(e){this.input.textContent=e}}Ge.HTMLContenteditableMaskElement=HA;class ble{constructor(e,n){this.el=e instanceof uh?e:e.isContentEditable&&e.tagName!=="INPUT"&&e.tagName!=="TEXTAREA"?new HA(e):new Ele(e),this.masked=li(n),this._listeners={},this._value="",this._unmaskedValue="",this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}maskEquals(e){var n;return e==null||((n=this.masked)==null?void 0:n.maskEquals(e))}get mask(){return this.masked.mask}set mask(e){if(this.maskEquals(e))return;if(!(e instanceof Ge.Masked)&&this.masked.constructor===VA(e)){this.masked.updateOptions({mask:e});return}const n=e instanceof Ge.Masked?e:li({mask:e});n.unmaskedValue=this.masked.unmaskedValue,this.masked=n}get value(){return this._value}set value(e){this.value!==e&&(this.masked.value=e,this.updateControl(),this.alignCursor())}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(e){this.unmaskedValue!==e&&(this.masked.unmaskedValue=e,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(e){this.masked.typedValueEquals(e)||(this.masked.typedValue=e,this.updateControl(),this.alignCursor())}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(e,n){const r=this._listeners[e];r&&r.forEach(i=>i(n))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(e){!this.el||!this.el.isActive||(this.el.select(e,e),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value}updateControl(){const e=this.masked.unmaskedValue,n=this.masked.value,r=this.displayValue,i=this.unmaskedValue!==e||this.value!==n;this._unmaskedValue=e,this._value=n,this.el.value!==r&&(this.el.value=r),i&&this._fireChangeEvents()}updateOptions(e){const{mask:n,...r}=e,i=!this.maskEquals(n),a=!Ec(this.masked,r);i&&(this.mask=n),a&&this.masked.updateOptions(r),(i||a)&&this.updateControl()}updateCursor(e){e!=null&&(this.cursorPos=e,this._delayUpdateCursor(e))}_delayUpdateCursor(e){this._abortUpdateCursor(),this._changingCursorPos=e,this._cursorChanging=setTimeout(()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())},10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,Le.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(e,n){return this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(n),this}off(e,n){if(!this._listeners[e])return this;if(!n)return delete this._listeners[e],this;const r=this._listeners[e].indexOf(n);return r>=0&&this._listeners[e].splice(r,1),this}_onInput(e){if(this._inputEvent=e,this._abortUpdateCursor(),!this._selection)return this.updateValue();const n=new hle({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),r=this.masked.rawInputValue,i=this.masked.splice(n.startChangePos,n.removed.length,n.inserted,n.removeDirection,{input:!0,raw:!0}).offset,a=r===this.masked.rawInputValue?n.removeDirection:Le.NONE;let o=this.masked.nearestInputPos(n.startChangePos+i,a);a!==Le.NONE&&(o=this.masked.nearestInputPos(o,Le.NONE)),this.updateControl(),this.updateCursor(o),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(e){e.preventDefault(),e.stopPropagation()}_onFocus(e){this.alignCursorFriendly()}_onClick(e){this.alignCursorFriendly()}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}}Ge.InputMask=ble;class gt{static normalize(e){return Array.isArray(e)?e:[e,new gt]}constructor(e){Object.assign(this,{inserted:"",rawInserted:"",skip:!1,tailShift:0},e)}aggregate(e){return this.rawInserted+=e.rawInserted,this.skip=this.skip||e.skip,this.inserted+=e.inserted,this.tailShift+=e.tailShift,this}get offset(){return this.tailShift+this.inserted.length}}Ge.ChangeDetails=gt;class cr{constructor(e,n,r){e===void 0&&(e=""),n===void 0&&(n=0),this.value=e,this.from=n,this.stop=r}toString(){return this.value}extend(e){this.value+=String(e)}appendTo(e){return e.append(this.toString(),{tail:!0}).aggregate(e._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(e){Object.assign(this,e)}unshift(e){if(!this.value.length||e!=null&&this.from>=e)return"";const n=this.value[0];return this.value=this.value.slice(1),n}shift(){if(!this.value.length)return"";const e=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),e}}class hn{constructor(e){this._value="",this._update({...hn.DEFAULTS,...e}),this._initialized=!0}updateOptions(e){Object.keys(e).length&&this.withValueRefresh(this._update.bind(this,e))}_update(e){Object.assign(this,e)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value}reset(){this._value=""}get value(){return this._value}set value(e){this.resolve(e,{input:!0})}resolve(e,n){n===void 0&&(n={input:!0}),this.reset(),this.append(e,n,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(e){this.resolve(e,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(e){this.format?this.value=this.format(e,this):this.unmaskedValue=String(e)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(e){this.resolve(e,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(e,n){return e}totalInputPositions(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),Math.min(this.displayValue.length,n-e)}extractInput(e,n,r){return e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),this.displayValue.slice(e,n)}extractTail(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),new cr(this.extractInput(e,n),e)}appendTail(e){return wr(e)&&(e=new cr(String(e))),e.appendTo(this)}_appendCharRaw(e,n){return e?(this._value+=e,new gt({inserted:e,rawInserted:e})):new gt}_appendChar(e,n,r){n===void 0&&(n={});const i=this.state;let a;if([e,a]=this.doPrepareChar(e,n),a=a.aggregate(this._appendCharRaw(e,n)),a.inserted){let o,s=this.doValidate(n)!==!1;if(s&&r!=null){const l=this.state;this.overwrite===!0&&(o=r.state,r.unshift(this.displayValue.length-a.tailShift));let c=this.appendTail(r);s=c.rawInserted===r.toString(),!(s&&c.inserted)&&this.overwrite==="shift"&&(this.state=l,o=r.state,r.shift(),c=this.appendTail(r),s=c.rawInserted===r.toString()),s&&c.inserted&&(this.state=l)}s||(a=new gt,this.state=i,r&&o&&(r.state=o))}return a}_appendPlaceholder(){return new gt}_appendEager(){return new gt}append(e,n,r){if(!wr(e))throw new Error("value should be string");const i=wr(r)?new cr(String(r)):r;n!=null&&n.tail&&(n._beforeTailState=this.state);let a;[e,a]=this.doPrepare(e,n);for(let o=0;o<e.length;++o){const s=this._appendChar(e[o],n,i);if(!s.rawInserted&&!this.doSkipInvalid(e[o],n,i))break;a.aggregate(s)}return(this.eager===!0||this.eager==="append")&&n!=null&&n.input&&e&&a.aggregate(this._appendEager()),i!=null&&(a.tailShift+=this.appendTail(i).tailShift),a}remove(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),this._value=this.displayValue.slice(0,e)+this.displayValue.slice(n),new gt}withValueRefresh(e){if(this._refreshing||!this._initialized)return e();this._refreshing=!0;const n=this.rawInputValue,r=this.value,i=e();return this.rawInputValue=n,this.value&&this.value!==r&&r.indexOf(this.value)===0&&this.append(r.slice(this.displayValue.length),{},""),delete this._refreshing,i}runIsolated(e){if(this._isolated||!this._initialized)return e(this);this._isolated=!0;const n=this.state,r=e(this);return this.state=n,delete this._isolated,r}doSkipInvalid(e,n,r){return!!this.skipInvalid}doPrepare(e,n){return n===void 0&&(n={}),gt.normalize(this.prepare?this.prepare(e,this,n):e)}doPrepareChar(e,n){return n===void 0&&(n={}),gt.normalize(this.prepareChar?this.prepareChar(e,this,n):e)}doValidate(e){return(!this.validate||this.validate(this.value,this,e))&&(!this.parent||this.parent.doValidate(e))}doCommit(){this.commit&&this.commit(this.value,this)}splice(e,n,r,i,a){i===void 0&&(i=Le.NONE),a===void 0&&(a={input:!0});const o=e+n,s=this.extractTail(o),l=this.eager===!0||this.eager==="remove";let c;l&&(i=gle(i),c=this.extractInput(0,o,{raw:!0}));let u=e;const d=new gt;if(i!==Le.NONE&&(u=this.nearestInputPos(e,n>1&&e!==0&&!l?Le.NONE:i),d.tailShift=u-e),d.aggregate(this.remove(u)),l&&i!==Le.NONE&&c===this.rawInputValue)if(i===Le.FORCE_LEFT){let p;for(;c===this.rawInputValue&&(p=this.displayValue.length);)d.aggregate(new gt({tailShift:-1})).aggregate(this.remove(p-1))}else i===Le.FORCE_RIGHT&&s.unshift();return d.aggregate(this.append(r,a,s))}maskEquals(e){return this.mask===e}typedValueEquals(e){const n=this.typedValue;return e===n||hn.EMPTY_VALUES.includes(e)&&hn.EMPTY_VALUES.includes(n)||(this.format?this.format(e,this)===this.format(this.typedValue,this):!1)}}hn.DEFAULTS={skipInvalid:!0},hn.EMPTY_VALUES=[void 0,null,""],Ge.Masked=hn;class ui{constructor(e,n){e===void 0&&(e=[]),n===void 0&&(n=0),this.chunks=e,this.from=n}toString(){return this.chunks.map(String).join("")}extend(e){if(!String(e))return;e=wr(e)?new cr(String(e)):e;const n=this.chunks[this.chunks.length-1],r=n&&(n.stop===e.stop||e.stop==null)&&e.from===n.from+n.toString().length;if(e instanceof cr)r?n.extend(e.toString()):this.chunks.push(e);else if(e instanceof ui){if(e.stop==null){let i;for(;e.chunks.length&&e.chunks[0].stop==null;)i=e.chunks.shift(),i.from+=e.from,this.extend(i)}e.toString()&&(e.stop=e.blockIndex,this.chunks.push(e))}}appendTo(e){if(!(e instanceof Ge.MaskedPattern))return new cr(this.toString()).appendTo(e);const n=new gt;for(let r=0;r<this.chunks.length&&!n.skip;++r){const i=this.chunks[r],a=e._mapPosToBlock(e.displayValue.length),o=i.stop;let s;if(o!=null&&(!a||a.index<=o)){if(i instanceof ui||e._stops.indexOf(o)>=0){const l=e._appendPlaceholder(o);n.aggregate(l)}s=i instanceof ui&&e._blocks[o]}if(s){const l=s.appendTail(i);l.skip=!1,n.aggregate(l),e._value+=l.inserted;const c=i.toString().slice(l.rawInserted.length);c&&n.aggregate(e.append(c,{tail:!0}))}else n.aggregate(e.append(i.toString(),{tail:!0}))}return n}get state(){return{chunks:this.chunks.map(e=>e.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(e){const{chunks:n,...r}=e;Object.assign(this,r),this.chunks=n.map(i=>{const a="chunks"in i?new ui:new cr;return a.state=i,a})}unshift(e){if(!this.chunks.length||e!=null&&this.from>=e)return"";const n=e!=null?e-this.from:e;let r=0;for(;r<this.chunks.length;){const i=this.chunks[r],a=i.unshift(n);if(i.toString()){if(!a)break;++r}else this.chunks.splice(r,1);if(a)return a}return""}shift(){if(!this.chunks.length)return"";let e=this.chunks.length-1;for(;0<=e;){const n=this.chunks[e],r=n.shift();if(n.toString()){if(!r)break;--e}else this.chunks.splice(e,1);if(r)return r}return""}}class vle{constructor(e,n){this.masked=e,this._log=[];const{offset:r,index:i}=e._mapPosToBlock(n)||(n<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=r,this.index=i,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(e){Object.assign(this,e)}pushState(){this._log.push(this.state)}popState(){const e=this._log.pop();return e&&(this.state=e),e}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(e){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=((n=this.block)==null?void 0:n.displayValue.length)||0){var n;if(e())return this.ok=!0}return this.ok=!1}_pushRight(e){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(e())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,Le.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,Le.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,Le.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,Le.FORCE_RIGHT),this.offset!==this.block.value.length))return!0})}pushRightBeforeInput(){return this._pushRight(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,Le.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,Le.NONE),!0})}}class zA{constructor(e){Object.assign(this,e),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(e,n){return e===void 0&&(e=0),n===void 0&&(n=this._value.length),this._value=this._value.slice(0,e)+this._value.slice(n),this._value||(this._isRawInput=!1),new gt}nearestInputPos(e,n){n===void 0&&(n=Le.NONE);const r=0,i=this._value.length;switch(n){case Le.LEFT:case Le.FORCE_LEFT:return r;case Le.NONE:case Le.RIGHT:case Le.FORCE_RIGHT:default:return i}}totalInputPositions(e,n){return e===void 0&&(e=0),n===void 0&&(n=this._value.length),this._isRawInput?n-e:0}extractInput(e,n,r){return e===void 0&&(e=0),n===void 0&&(n=this._value.length),r===void 0&&(r={}),r.raw&&this._isRawInput&&this._value.slice(e,n)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(e,n){n===void 0&&(n={});const r=new gt;if(this.isFilled)return r;const i=this.eager===!0||this.eager==="append",o=this.char===e&&(this.isUnmasking||n.input||n.raw)&&(!n.raw||!i)&&!n.tail;return o&&(r.rawInserted=this.char),this._value=r.inserted=this.char,this._isRawInput=o&&(n.raw||n.input),r}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const e=new gt;return this.isFilled||(this._value=e.inserted=this.char),e}extractTail(){return new cr("")}appendTail(e){return wr(e)&&(e=new cr(String(e))),e.appendTo(this)}append(e,n,r){const i=this._appendChar(e[0],n);return r!=null&&(i.tailShift+=this.appendTail(r).tailShift),i}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value,this._isRawInput=!!e._rawInputValue}}class vc{constructor(e){const{parent:n,isOptional:r,placeholderChar:i,displayChar:a,lazy:o,eager:s,...l}=e;this.masked=li(l),Object.assign(this,{parent:n,isOptional:r,placeholderChar:i,displayChar:a,lazy:o,eager:s})}reset(){this.isFilled=!1,this.masked.reset()}remove(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.value.length),e===0&&n>=1?(this.isFilled=!1,this.masked.remove(e,n)):new gt}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return!!this.masked.value||this.isOptional}_appendChar(e,n){if(n===void 0&&(n={}),this.isFilled)return new gt;const r=this.masked.state,i=this.masked._appendChar(e,this.currentMaskFlags(n));return i.inserted&&this.doValidate(n)===!1&&(i.inserted=i.rawInserted="",this.masked.state=r),!i.inserted&&!this.isOptional&&!this.lazy&&!n.input&&(i.inserted=this.placeholderChar),i.skip=!i.inserted&&!this.isOptional,this.isFilled=!!i.inserted,i}append(e,n,r){return this.masked.append(e,this.currentMaskFlags(n),r)}_appendPlaceholder(){const e=new gt;return this.isFilled||this.isOptional||(this.isFilled=!0,e.inserted=this.placeholderChar),e}_appendEager(){return new gt}extractTail(e,n){return this.masked.extractTail(e,n)}appendTail(e){return this.masked.appendTail(e)}extractInput(e,n,r){return e===void 0&&(e=0),n===void 0&&(n=this.value.length),this.masked.extractInput(e,n,r)}nearestInputPos(e,n){n===void 0&&(n=Le.NONE);const r=0,i=this.value.length,a=Math.min(Math.max(e,r),i);switch(n){case Le.LEFT:case Le.FORCE_LEFT:return this.isComplete?a:r;case Le.RIGHT:case Le.FORCE_RIGHT:return this.isComplete?a:i;case Le.NONE:default:return a}}totalInputPositions(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.value.length),this.value.slice(e,n).length}doValidate(e){return this.masked.doValidate(this.currentMaskFlags(e))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(e)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(e){this.masked.state=e.masked,this.isFilled=e.isFilled}currentMaskFlags(e){var n;return{...e,_beforeTailState:(e==null||(n=e._beforeTailState)==null?void 0:n.masked)||(e==null?void 0:e._beforeTailState)}}}vc.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};class Sle extends hn{updateOptions(e){super.updateOptions(e)}_update(e){const n=e.mask;n&&(e.validate=r=>r.search(n)>=0),super._update(e)}}Ge.MaskedRegExp=Sle;class En extends hn{constructor(e){super({...En.DEFAULTS,...e,definitions:Object.assign({},vc.DEFAULT_DEFINITIONS,e==null?void 0:e.definitions)})}updateOptions(e){super.updateOptions(e)}_update(e){e.definitions=Object.assign({},this.definitions,e.definitions),super._update(e),this._rebuildMask()}_rebuildMask(){const e=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const n=this.mask;if(!n||!e)return;let r=!1,i=!1;for(let a=0;a<n.length;++a){if(this.blocks){const c=n.slice(a),u=Object.keys(this.blocks).filter(p=>c.indexOf(p)===0);u.sort((p,f)=>f.length-p.length);const d=u[0];if(d){const{expose:p,...f}=bc(this.blocks[d]),m=li({lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,...f,parent:this});m&&(this._blocks.push(m),p&&(this.exposeBlock=m),this._maskedBlocks[d]||(this._maskedBlocks[d]=[]),this._maskedBlocks[d].push(this._blocks.length-1)),a+=d.length-1;continue}}let o=n[a],s=o in e;if(o===En.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(o==="{"||o==="}"){r=!r;continue}if(o==="["||o==="]"){i=!i;continue}if(o===En.ESCAPE_CHAR){if(++a,o=n[a],!o)break;s=!1}const l=s?new vc({isOptional:i,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...bc(e[o]),parent:this}):new zA({char:o,eager:this.eager,isUnmasking:r});this._blocks.push(l)}}get state(){return{...super.state,_blocks:this._blocks.map(e=>e.state)}}set state(e){const{_blocks:n,...r}=e;this._blocks.forEach((i,a)=>i.state=n[a]),super.state=r}reset(){super.reset(),this._blocks.forEach(e=>e.reset())}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every(e=>e.isComplete)}get isFilled(){return this._blocks.every(e=>e.isFilled)}get isFixed(){return this._blocks.every(e=>e.isFixed)}get isOptional(){return this._blocks.every(e=>e.isOptional)}doCommit(){this._blocks.forEach(e=>e.doCommit()),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce((e,n)=>e+=n.unmaskedValue,"")}set unmaskedValue(e){if(this.exposeBlock){const n=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=e,this.appendTail(n),this.doCommit()}else super.unmaskedValue=e}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((e,n)=>e+=n.value,"")}set value(e){if(this.exposeBlock){const n=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=e,this.appendTail(n),this.doCommit()}else super.value=e}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(e){if(this.exposeBlock){const n=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=e,this.appendTail(n),this.doCommit()}else super.typedValue=e}get displayValue(){return this._blocks.reduce((e,n)=>e+=n.displayValue,"")}appendTail(e){return super.appendTail(e).aggregate(this._appendPlaceholder())}_appendEager(){var e;const n=new gt;let r=(e=this._mapPosToBlock(this.displayValue.length))==null?void 0:e.index;if(r==null)return n;this._blocks[r].isFilled&&++r;for(let i=r;i<this._blocks.length;++i){const a=this._blocks[i]._appendEager();if(!a.inserted)break;n.aggregate(a)}return n}_appendCharRaw(e,n){n===void 0&&(n={});const r=this._mapPosToBlock(this.displayValue.length),i=new gt;if(!r)return i;for(let o=r.index;;++o){var a;const s=this._blocks[o];if(!s)break;const l=s._appendChar(e,{...n,_beforeTailState:(a=n._beforeTailState)==null||(a=a._blocks)==null?void 0:a[o]}),c=l.skip;if(i.aggregate(l),c||l.rawInserted)break}return i}extractTail(e,n){e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length);const r=new ui;return e===n||this._forEachBlocksInRange(e,n,(i,a,o,s)=>{const l=i.extractTail(o,s);l.stop=this._findStopBefore(a),l.from=this._blockStartPos(a),l instanceof ui&&(l.blockIndex=a),r.extend(l)}),r}extractInput(e,n,r){if(e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),r===void 0&&(r={}),e===n)return"";let i="";return this._forEachBlocksInRange(e,n,(a,o,s,l)=>{i+=a.extractInput(s,l,r)}),i}_findStopBefore(e){let n;for(let r=0;r<this._stops.length;++r){const i=this._stops[r];if(i<=e)n=i;else break}return n}_appendPlaceholder(e){const n=new gt;if(this.lazy&&e==null)return n;const r=this._mapPosToBlock(this.displayValue.length);if(!r)return n;const i=r.index,a=e??this._blocks.length;return this._blocks.slice(i,a).forEach(o=>{if(!o.lazy||e!=null){var s;const l=o._appendPlaceholder((s=o._blocks)==null?void 0:s.length);this._value+=l.inserted,n.aggregate(l)}}),n}_mapPosToBlock(e){let n="";for(let r=0;r<this._blocks.length;++r){const i=this._blocks[r],a=n.length;if(n+=i.displayValue,e<=n.length)return{index:r,offset:e-a}}}_blockStartPos(e){return this._blocks.slice(0,e).reduce((n,r)=>n+=r.displayValue.length,0)}_forEachBlocksInRange(e,n,r){n===void 0&&(n=this.displayValue.length);const i=this._mapPosToBlock(e);if(i){const a=this._mapPosToBlock(n),o=a&&i.index===a.index,s=i.offset,l=a&&o?a.offset:this._blocks[i.index].displayValue.length;if(r(this._blocks[i.index],i.index,s,l),a&&!o){for(let c=i.index+1;c<a.index;++c)r(this._blocks[c],c,0,this._blocks[c].displayValue.length);r(this._blocks[a.index],a.index,0,a.offset)}}}remove(e,n){e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length);const r=super.remove(e,n);return this._forEachBlocksInRange(e,n,(i,a,o,s)=>{r.aggregate(i.remove(o,s))}),r}nearestInputPos(e,n){if(n===void 0&&(n=Le.NONE),!this._blocks.length)return 0;const r=new vle(this,e);if(n===Le.NONE)return r.pushRightBeforeInput()||(r.popState(),r.pushLeftBeforeInput())?r.pos:this.displayValue.length;if(n===Le.LEFT||n===Le.FORCE_LEFT){if(n===Le.LEFT){if(r.pushRightBeforeFilled(),r.ok&&r.pos===e)return e;r.popState()}if(r.pushLeftBeforeInput(),r.pushLeftBeforeRequired(),r.pushLeftBeforeFilled(),n===Le.LEFT){if(r.pushRightBeforeInput(),r.pushRightBeforeRequired(),r.ok&&r.pos<=e||(r.popState(),r.ok&&r.pos<=e))return r.pos;r.popState()}return r.ok?r.pos:n===Le.FORCE_LEFT?0:(r.popState(),r.ok||(r.popState(),r.ok)?r.pos:0)}return n===Le.RIGHT||n===Le.FORCE_RIGHT?(r.pushRightBeforeInput(),r.pushRightBeforeRequired(),r.pushRightBeforeFilled()?r.pos:n===Le.FORCE_RIGHT?this.displayValue.length:(r.popState(),r.ok||(r.popState(),r.ok)?r.pos:this.nearestInputPos(e,Le.LEFT))):e}totalInputPositions(e,n){e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length);let r=0;return this._forEachBlocksInRange(e,n,(i,a,o,s)=>{r+=i.totalInputPositions(o,s)}),r}maskedBlock(e){return this.maskedBlocks(e)[0]}maskedBlocks(e){const n=this._maskedBlocks[e];return n?n.map(r=>this._blocks[r]):[]}}En.DEFAULTS={lazy:!0,placeholderChar:"_"},En.STOP_CHAR="`",En.ESCAPE_CHAR="\\",En.InputDefinition=vc,En.FixedDefinition=zA,Ge.MaskedPattern=En;class Sc extends En{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){const{to:n=this.to||0,from:r=this.from||0,maxLength:i=this.maxLength||0,autofix:a=this.autofix,...o}=e;this.to=n,this.from=r,this.maxLength=Math.max(String(n).length,i),this.autofix=a;const s=String(this.from).padStart(this.maxLength,"0"),l=String(this.to).padStart(this.maxLength,"0");let c=0;for(;c<l.length&&l[c]===s[c];)++c;o.mask=l.slice(0,c).replace(/0/g,"\\0")+"0".repeat(this.maxLength-c),super._update(o)}get isComplete(){return super.isComplete&&!!this.value}boundaries(e){let n="",r="";const[,i,a]=e.match(/^(\D*)(\d*)(\D*)/)||[];return a&&(n="0".repeat(i.length)+a,r="9".repeat(i.length)+a),n=n.padEnd(this.maxLength,"0"),r=r.padEnd(this.maxLength,"9"),[n,r]}doPrepareChar(e,n){n===void 0&&(n={});let r;if([e,r]=super.doPrepareChar(e.replace(/\D/g,""),n),!this.autofix||!e)return[e,r];const i=String(this.from).padStart(this.maxLength,"0"),a=String(this.to).padStart(this.maxLength,"0"),o=this.value+e;if(o.length>this.maxLength)return["",r];const[s,l]=this.boundaries(o);return Number(l)<this.from?[i[o.length-1],r]:Number(s)>this.to?this.autofix==="pad"&&o.length<this.maxLength?["",r.aggregate(this.append(i[o.length-1]+e,n))]:[a[o.length-1],r]:[e,r]}doValidate(e){const n=this.value;if(n.search(/[^0]/)===-1&&n.length<=this._matchFrom)return!0;const[i,a]=this.boundaries(n);return this.from<=Number(a)&&Number(i)<=this.to&&super.doValidate(e)}}Ge.MaskedRange=Sc;class di extends En{constructor(e){const{mask:n,pattern:r,...i}={...di.DEFAULTS,...e};super({...i,mask:wr(n)?n:r})}updateOptions(e){super.updateOptions(e)}_update(e){const{mask:n,pattern:r,blocks:i,...a}={...di.DEFAULTS,...e},o=Object.assign({},di.GET_DEFAULT_BLOCKS());e.min&&(o.Y.from=e.min.getFullYear()),e.max&&(o.Y.to=e.max.getFullYear()),e.min&&e.max&&o.Y.from===o.Y.to&&(o.m.from=e.min.getMonth()+1,o.m.to=e.max.getMonth()+1,o.m.from===o.m.to&&(o.d.from=e.min.getDate(),o.d.to=e.max.getDate())),Object.assign(o,this.blocks,i),Object.keys(o).forEach(s=>{const l=o[s];!("autofix"in l)&&"autofix"in e&&(l.autofix=e.autofix)}),super._update({...a,mask:wr(n)?n:r,blocks:o})}doValidate(e){const n=this.date;return super.doValidate(e)&&(!this.isComplete||this.isDateExist(this.value)&&n!=null&&(this.min==null||this.min<=n)&&(this.max==null||n<=this.max))}isDateExist(e){return this.format(this.parse(e,this),this).indexOf(e)>=0}get date(){return this.typedValue}set date(e){this.typedValue=e}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(e){super.typedValue=e}maskEquals(e){return e===Date||super.maskEquals(e)}}di.GET_DEFAULT_BLOCKS=()=>({d:{mask:Sc,from:1,to:31,maxLength:2},m:{mask:Sc,from:1,to:12,maxLength:2},Y:{mask:Sc,from:1900,to:9999}}),di.DEFAULTS={mask:Date,pattern:"d{.}`m{.}`Y",format:(t,e)=>{if(!t)return"";const n=String(t.getDate()).padStart(2,"0"),r=String(t.getMonth()+1).padStart(2,"0"),i=t.getFullYear();return[n,r,i].join(".")},parse:(t,e)=>{const[n,r,i]=t.split(".").map(Number);return new Date(i,r-1,n)}},Ge.MaskedDate=di;class Ko extends hn{constructor(e){super({...Ko.DEFAULTS,...e}),this.currentMask=void 0}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),"mask"in e&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(e.mask)?e.mask.map(n=>{const{expose:r,...i}=bc(n),a=li({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...i});return r&&(this.exposeMask=a),a}):[])}_appendCharRaw(e,n){n===void 0&&(n={});const r=this._applyDispatch(e,n);return this.currentMask&&r.aggregate(this.currentMask._appendChar(e,this.currentMaskFlags(n))),r}_applyDispatch(e,n,r){e===void 0&&(e=""),n===void 0&&(n={}),r===void 0&&(r="");const i=n.tail&&n._beforeTailState!=null?n._beforeTailState._value:this.value,a=this.rawInputValue,o=n.tail&&n._beforeTailState!=null?n._beforeTailState._rawInputValue:a,s=a.slice(o.length),l=this.currentMask,c=new gt,u=l==null?void 0:l.state;if(this.currentMask=this.doDispatch(e,{...n},r),this.currentMask)if(this.currentMask!==l){if(this.currentMask.reset(),o){const d=this.currentMask.append(o,{raw:!0});c.tailShift=d.inserted.length-i.length}s&&(c.tailShift+=this.currentMask.append(s,{raw:!0,tail:!0}).tailShift)}else u&&(this.currentMask.state=u);return c}_appendPlaceholder(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendPlaceholder()),e}_appendEager(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendEager()),e}appendTail(e){const n=new gt;return e&&n.aggregate(this._applyDispatch("",{},e)),n.aggregate(this.currentMask?this.currentMask.appendTail(e):super.appendTail(e))}currentMaskFlags(e){var n,r;return{...e,_beforeTailState:((n=e._beforeTailState)==null?void 0:n.currentMaskRef)===this.currentMask&&((r=e._beforeTailState)==null?void 0:r.currentMask)||e._beforeTailState}}doDispatch(e,n,r){return n===void 0&&(n={}),r===void 0&&(r=""),this.dispatch(e,this,n,r)}doValidate(e){return super.doValidate(e)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(e)))}doPrepare(e,n){n===void 0&&(n={});let[r,i]=super.doPrepare(e,n);if(this.currentMask){let a;[r,a]=super.doPrepare(r,this.currentMaskFlags(n)),i=i.aggregate(a)}return[r,i]}doPrepareChar(e,n){n===void 0&&(n={});let[r,i]=super.doPrepareChar(e,n);if(this.currentMask){let a;[r,a]=super.doPrepareChar(r,this.currentMaskFlags(n)),i=i.aggregate(a)}return[r,i]}reset(){var e;(e=this.currentMask)==null||e.reset(),this.compiledMasks.forEach(n=>n.reset())}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(e){this.exposeMask?(this.exposeMask.value=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=e}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(e){this.exposeMask?(this.exposeMask.unmaskedValue=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=e}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(e){if(this.exposeMask){this.exposeMask.typedValue=e,this.currentMask=this.exposeMask,this._applyDispatch();return}let n=String(e);this.currentMask&&(this.currentMask.typedValue=e,n=this.currentMask.unmaskedValue),this.unmaskedValue=n}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var e;return!!((e=this.currentMask)!=null&&e.isComplete)}get isFilled(){var e;return!!((e=this.currentMask)!=null&&e.isFilled)}remove(e,n){const r=new gt;return this.currentMask&&r.aggregate(this.currentMask.remove(e,n)).aggregate(this._applyDispatch()),r}get state(){var e;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(n=>n.state),currentMaskRef:this.currentMask,currentMask:(e=this.currentMask)==null?void 0:e.state}}set state(e){const{compiledMasks:n,currentMaskRef:r,currentMask:i,...a}=e;n&&this.compiledMasks.forEach((o,s)=>o.state=n[s]),r!=null&&(this.currentMask=r,this.currentMask.state=i),super.state=a}extractInput(e,n,r){return this.currentMask?this.currentMask.extractInput(e,n,r):""}extractTail(e,n){return this.currentMask?this.currentMask.extractTail(e,n):super.extractTail(e,n)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(e,n){return this.currentMask?this.currentMask.nearestInputPos(e,n):super.nearestInputPos(e,n)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(e){this._overwrite=e}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(e){this._eager=e}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(e){this._skipInvalid=e}maskEquals(e){return Array.isArray(e)?this.compiledMasks.every((n,r)=>{if(!e[r])return;const{mask:i,...a}=e[r];return Ec(n,a)&&n.maskEquals(i)}):super.maskEquals(e)}typedValueEquals(e){var n;return!!((n=this.currentMask)!=null&&n.typedValueEquals(e))}}Ko.DEFAULTS=void 0,Ko.DEFAULTS={dispatch:(t,e,n,r)=>{if(!e.compiledMasks.length)return;const i=e.rawInputValue,a=e.compiledMasks.map((o,s)=>{const l=e.currentMask===o,c=l?o.displayValue.length:o.nearestInputPos(o.displayValue.length,Le.FORCE_LEFT);return o.rawInputValue!==i?(o.reset(),o.append(i,{raw:!0})):l||o.remove(c),o.append(t,e.currentMaskFlags(n)),o.appendTail(r),{index:s,weight:o.rawInputValue.length,totalInputPositions:o.totalInputPositions(0,Math.max(c,o.nearestInputPos(o.displayValue.length,Le.FORCE_LEFT)))}});return a.sort((o,s)=>s.weight-o.weight||s.totalInputPositions-o.totalInputPositions),e.compiledMasks[a[0].index]}},Ge.MaskedDynamic=Ko;class yle extends En{constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){const{enum:n,...r}=e;if(n){const i=n.map(s=>s.length),a=Math.min(...i),o=Math.max(...i)-a;r.mask="*".repeat(a),o&&(r.mask+="["+"*".repeat(o)+"]"),this.enum=n}super._update(r)}doValidate(e){return this.enum.some(n=>n.indexOf(this.unmaskedValue)===0)&&super.doValidate(e)}}Ge.MaskedEnum=yle;class Tle extends hn{updateOptions(e){super.updateOptions(e)}_update(e){super._update({...e,validate:e.mask})}}Ge.MaskedFunction=Tle;class Tn extends hn{constructor(e){super({...Tn.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),this._updateRegExps()}_updateRegExps(){const e="^"+(this.allowNegative?"[+|\\-]?":""),n="\\d*",r=(this.scale?"("+ch(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(e+n+r),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(ch).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(ch(this.thousandsSeparator),"g")}_removeThousandsSeparators(e){return e.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(e){const n=e.split(this.radix);return n[0]=n[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),n.join(this.radix)}doPrepareChar(e,n){n===void 0&&(n={});const[r,i]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(n.input&&n.raw||!n.input&&!n.raw)?e.replace(this._mapToRadixRegExp,this.radix):e),n);return e&&!r&&(i.skip=!0),r&&!this.allowPositive&&!this.value&&r!=="-"&&i.aggregate(this._appendChar("-")),[r,i]}_separatorsCount(e,n){n===void 0&&(n=!1);let r=0;for(let i=0;i<e;++i)this._value.indexOf(this.thousandsSeparator,i)===i&&(++r,n&&(e+=this.thousandsSeparator.length));return r}_separatorsCountFromSlice(e){return e===void 0&&(e=this._value),this._separatorsCount(this._removeThousandsSeparators(e).length,!0)}extractInput(e,n,r){return e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),[e,n]=this._adjustRangeWithSeparators(e,n),this._removeThousandsSeparators(super.extractInput(e,n,r))}_appendCharRaw(e,n){if(n===void 0&&(n={}),!this.thousandsSeparator)return super._appendCharRaw(e,n);const r=n.tail&&n._beforeTailState?n._beforeTailState._value:this._value,i=this._separatorsCountFromSlice(r);this._value=this._removeThousandsSeparators(this.value);const a=super._appendCharRaw(e,n);this._value=this._insertThousandsSeparators(this._value);const o=n.tail&&n._beforeTailState?n._beforeTailState._value:this._value,s=this._separatorsCountFromSlice(o);return a.tailShift+=(s-i)*this.thousandsSeparator.length,a.skip=!a.rawInserted&&e===this.thousandsSeparator,a}_findSeparatorAround(e){if(this.thousandsSeparator){const n=e-this.thousandsSeparator.length+1,r=this.value.indexOf(this.thousandsSeparator,n);if(r<=e)return r}return-1}_adjustRangeWithSeparators(e,n){const r=this._findSeparatorAround(e);r>=0&&(e=r);const i=this._findSeparatorAround(n);return i>=0&&(n=i+this.thousandsSeparator.length),[e,n]}remove(e,n){e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),[e,n]=this._adjustRangeWithSeparators(e,n);const r=this.value.slice(0,e),i=this.value.slice(n),a=this._separatorsCount(r.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(r+i));const o=this._separatorsCountFromSlice(r);return new gt({tailShift:(o-a)*this.thousandsSeparator.length})}nearestInputPos(e,n){if(!this.thousandsSeparator)return e;switch(n){case Le.NONE:case Le.LEFT:case Le.FORCE_LEFT:{const r=this._findSeparatorAround(e-1);if(r>=0){const i=r+this.thousandsSeparator.length;if(e<i||this.value.length<=i||n===Le.FORCE_LEFT)return r}break}case Le.RIGHT:case Le.FORCE_RIGHT:{const r=this._findSeparatorAround(e);if(r>=0)return r+this.thousandsSeparator.length}}return e}doValidate(e){let n=!!this._removeThousandsSeparators(this.value).match(this._numberRegExp);if(n){const r=this.number;n=n&&!isNaN(r)&&(this.min==null||this.min>=0||this.min<=this.number)&&(this.max==null||this.max<=0||this.number<=this.max)}return n&&super.doValidate(e)}doCommit(){if(this.value){const e=this.number;let n=e;this.min!=null&&(n=Math.max(n,this.min)),this.max!=null&&(n=Math.min(n,this.max)),n!==e&&(this.unmaskedValue=this.format(n,this));let r=this.value;this.normalizeZeros&&(r=this._normalizeZeros(r)),this.padFractionalZeros&&this.scale>0&&(r=this._padFractionalZeros(r)),this._value=r}super.doCommit()}_normalizeZeros(e){const n=this._removeThousandsSeparators(e).split(this.radix);return n[0]=n[0].replace(/^(\D*)(0*)(\d*)/,(r,i,a,o)=>i+o),e.length&&!/\d$/.test(n[0])&&(n[0]=n[0]+"0"),n.length>1&&(n[1]=n[1].replace(/0*$/,""),n[1].length||(n.length=1)),this._insertThousandsSeparators(n.join(this.radix))}_padFractionalZeros(e){if(!e)return e;const n=e.split(this.radix);return n.length<2&&n.push(""),n[1]=n[1].padEnd(this.scale,"0"),n.join(this.radix)}doSkipInvalid(e,n,r){n===void 0&&(n={});const i=this.scale===0&&e!==this.thousandsSeparator&&(e===this.radix||e===Tn.UNMASKED_RADIX||this.mapToRadix.includes(e));return super.doSkipInvalid(e,n,r)&&!i}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,Tn.UNMASKED_RADIX)}set unmaskedValue(e){super.unmaskedValue=e}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(e){this.rawInputValue=this.format(e,this).replace(Tn.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(e){this.typedValue=e}get allowNegative(){return this.min!=null&&this.min<0||this.max!=null&&this.max<0}get allowPositive(){return this.min!=null&&this.min>0||this.max!=null&&this.max>0}typedValueEquals(e){return(super.typedValueEquals(e)||Tn.EMPTY_VALUES.includes(e)&&Tn.EMPTY_VALUES.includes(this.typedValue))&&!(e===0&&this.value==="")}}Tn.UNMASKED_RADIX=".",Tn.EMPTY_VALUES=[...hn.EMPTY_VALUES,0],Tn.DEFAULTS={mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[Tn.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:t=>t.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})},Ge.MaskedNumber=Tn;const dh={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function WA(t,e,n){e===void 0&&(e=dh.MASKED),n===void 0&&(n=dh.MASKED);const r=li(t);return i=>r.runIsolated(a=>(a[e]=i,a[n]))}function Cle(t,e,n,r){return WA(e,n,r)(t)}Ge.PIPE_TYPE=dh,Ge.createPipe=WA,Ge.pipe=Cle;try{globalThis.IMask=Ge}catch{}const jA={mask:ee.oneOfType([ee.array,ee.func,ee.string,ee.instanceOf(RegExp),ee.oneOf([Date,Number,Ge.Masked]),ee.instanceOf(Ge.Masked)]),value:ee.any,unmask:ee.oneOfType([ee.bool,ee.oneOf(["typed"])]),prepare:ee.func,prepareChar:ee.func,validate:ee.func,commit:ee.func,overwrite:ee.oneOfType([ee.bool,ee.oneOf(["shift"])]),eager:ee.oneOfType([ee.bool,ee.oneOf(["append","remove"])]),skipInvalid:ee.bool,onAccept:ee.func,onComplete:ee.func,placeholderChar:ee.string,displayChar:ee.string,lazy:ee.bool,definitions:ee.object,blocks:ee.object,enum:ee.arrayOf(ee.string),maxLength:ee.number,from:ee.number,to:ee.number,pattern:ee.string,format:ee.func,parse:ee.func,autofix:ee.oneOfType([ee.bool,ee.oneOf(["pad"])]),radix:ee.string,thousandsSeparator:ee.string,mapToRadix:ee.arrayOf(ee.string),scale:ee.number,normalizeZeros:ee.bool,padFractionalZeros:ee.bool,min:ee.oneOfType([ee.number,ee.instanceOf(Date)]),max:ee.oneOfType([ee.number,ee.instanceOf(Date)]),dispatch:ee.func,inputRef:ee.oneOfType([ee.func,ee.shape({current:ee.object})])},KA=Object.keys(jA).filter(t=>t!=="value"),Ole=["value","unmask","onAccept","onComplete","inputRef"],Rle=KA.filter(t=>Ole.indexOf(t)<0);function Nle(t){var e;const n=(e=class extends O.Component{constructor(a){super(a),this._inputRef=this._inputRef.bind(this)}componentDidMount(){this.props.mask&&this.initMask()}componentDidUpdate(){const a=this.props,o=this._extractMaskOptionsFromProps(a);if(o.mask)this.maskRef?(this.maskRef.updateOptions(o),"value"in a&&a.value!==void 0&&(this.maskValue=a.value)):this.initMask(o);else if(this.destroyMask(),"value"in a&&a.value!==void 0){var s;(s=this.element)!=null&&s.isContentEditable&&this.element.tagName!=="INPUT"&&this.element.tagName!=="TEXTAREA"?this.element.textContent=a.value:this.element.value=a.value}}componentWillUnmount(){this.destroyMask()}_inputRef(a){this.element=a,this.props.inputRef&&(Object.prototype.hasOwnProperty.call(this.props.inputRef,"current")?this.props.inputRef.current=a:this.props.inputRef(a))}initMask(a){a===void 0&&(a=this._extractMaskOptionsFromProps(this.props)),this.maskRef=Ge(this.element,a).on("accept",this._onAccept.bind(this)).on("complete",this._onComplete.bind(this)),"value"in this.props&&this.props.value!==void 0&&(this.maskValue=this.props.value)}destroyMask(){this.maskRef&&(this.maskRef.destroy(),delete this.maskRef)}_extractMaskOptionsFromProps(a){const{...o}=a;return Object.keys(o).filter(s=>Rle.indexOf(s)<0).forEach(s=>{delete o[s]}),o}_extractNonMaskProps(a){const{...o}=a;return KA.forEach(s=>{delete o[s]}),"defaultValue"in o||(o.defaultValue=a.mask?"":o.value),delete o.value,o}get maskValue(){return this.maskRef?this.props.unmask==="typed"?this.maskRef.typedValue:this.props.unmask?this.maskRef.unmaskedValue:this.maskRef.value:""}set maskValue(a){this.maskRef&&(a=a==null&&this.props.unmask!=="typed"?"":a,this.props.unmask==="typed"?this.maskRef.typedValue=a:this.props.unmask?this.maskRef.unmaskedValue=a:this.maskRef.value=a)}_onAccept(a){this.props.onAccept&&this.maskRef&&this.props.onAccept(this.maskValue,this.maskRef,a)}_onComplete(a){this.props.onComplete&&this.maskRef&&this.props.onComplete(this.maskValue,this.maskRef,a)}render(){return O.createElement(t,{...this._extractNonMaskProps(this.props),inputRef:this._inputRef})}},e.displayName=void 0,e.propTypes=void 0,e),r=t.displayName||t.name||"Component";return n.displayName="IMask("+r+")",n.propTypes=jA,O.forwardRef((i,a)=>O.createElement(n,{...i,ref:a}))}const Ale=Nle(t=>{let{inputRef:e,...n}=t;return O.createElement("input",{...n,ref:e})}),xle=(t,e)=>O.createElement(Ale,{...t,ref:e});O.forwardRef(xle);function Ile(t,e){let{onAccept:n,onComplete:r}=e===void 0?{}:e;const i=O.useRef(null),a=O.useRef(null),[o,s]=O.useState(!1),[l,c]=O.useState({}),[u,d]=O.useState(""),[p,f]=O.useState(""),[m,_]=O.useState(),g=O.useCallback(()=>{var v;o&&((v=a.current)==null||v.destroy(),a.current=null)},[]),h=O.useCallback(v=>{const b=a.current;b&&(c({value:b.value,unmaskedValue:b.unmaskedValue,typedValue:b.typedValue}),_(b.typedValue),f(b.unmaskedValue),d(b.value),n==null||n(b.value,b,v))},[n]),E=O.useCallback(()=>a.current&&(r==null?void 0:r(a.current.value,a.current)),[r]);return O.useEffect(()=>{const v=i.current;if(!v||!(t!=null&&t.mask))return g();const b=a.current;b?b==null||b.updateOptions(t):v&&t!=null&&t.mask&&(a.current=Ge(v,t),h()),s(!!a.current)},[t,g,h]),O.useEffect(()=>{if(!a.current)return;const v=a.current;return v.on("accept",h),v.on("complete",E),()=>{v.off("accept",h),v.off("complete",E)}},[h,E]),O.useEffect(()=>{const{value:v,...b}=l,S=a.current;S&&o&&(v!==u&&(S.value=u),c(b))},[u]),O.useEffect(()=>{const{unmaskedValue:v,...b}=l,S=a.current;S&&o&&(v!==p&&(S.unmaskedValue=p),c(b))},[p]),O.useEffect(()=>{const{typedValue:v,...b}=l,S=a.current;S&&o&&(v!==m&&(S.typedValue=m),c(b))},[m]),O.useEffect(()=>g,[g]),{ref:i,maskRef:a,value:u,setValue:d,unmaskedValue:p,setUnmaskedValue:f,typedValue:m,setTypedValue:_}}const ph=O.forwardRef(({name:t,value:e,mask:n,onChange:r,...i},a)=>{const{ref:o,unmaskedValue:s,value:l,maskRef:c}=Ile({mask:n});return O.useEffect(()=>{c.current.value=e||""},[c,e]),O.useEffect(()=>{r({target:{name:t,value:s||e||""}})},[t,s,e]),N.jsx(Q.TextField,{inputRef:a,inputProps:{ref:o},name:t,value:l,onChange:()=>r({target:{name:t,value:s}}),...i})});ph.displayName="MaskedInput";function wle(t){let e;switch(t){case"top-left":e={style:{ml:-.75},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}};break;case"top-center":e={style:{},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}};break;case"top-right":e={style:{ml:.75},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}};break;case"bottom-left":e={style:{ml:-.75},anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"left"}};break;case"bottom-center":e={style:{},anchorOrigin:{vertical:"top",horizontal:"center"},transformOrigin:{vertical:"bottom",horizontal:"center"}};break;case"bottom-right":e={style:{ml:.75},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"right"}};break;case"left-top":e={style:{mt:-.75},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"}};break;case"left-center":e={anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"}};break;case"left-bottom":e={style:{mt:.75},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"left"}};break;case"right-top":e={style:{mt:-.75},anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"right"}};break;case"right-center":e={anchorOrigin:{vertical:"center",horizontal:"left"},transformOrigin:{vertical:"center",horizontal:"right"}};break;case"right-bottom":e={style:{mt:.75},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"right"}};break;default:e={style:{ml:.75},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}}}return e}const Dle=qt("span")(({arrow:t,theme:e})=>{const i=`solid 1px ${Ee(e.palette.grey[500],.12)}`,a={borderRadius:"0 0 3px 0",top:-6,borderBottom:i,borderRight:i},o={borderRadius:"3px 0 0 0",bottom:-6,borderTop:i,borderLeft:i},s={borderRadius:"0 3px 0 0",left:-6,borderTop:i,borderRight:i},l={borderRadius:"0 0 0 3px",right:-6,borderBottom:i,borderLeft:i};return{display:"none",[e.breakpoints.up("sm")]:{zIndex:1,width:12,height:12,content:'""',display:"block",position:"absolute",transform:"rotate(-135deg)",background:e.palette.background.paper},...t==="top-left"&&{...a,left:20},...t==="top-center"&&{...a,left:0,right:0,margin:"auto"},...t==="top-right"&&{...a,right:20},...t==="bottom-left"&&{...o,left:20},...t==="bottom-center"&&{...o,left:0,right:0,margin:"auto"},...t==="bottom-right"&&{...o,right:20},...t==="left-top"&&{...s,top:20},...t==="left-center"&&{...s,top:0,bottom:0,margin:"auto"},...t==="left-bottom"&&{...s,bottom:20},...t==="right-top"&&{...l,top:20},...t==="right-center"&&{...l,top:0,bottom:0,margin:"auto"},...t==="right-bottom"&&{...l,bottom:20}}}),Mle=({open:t,children:e,arrow:n="top-right",disabledArrow:r,sx:i,...a})=>{const{style:o,anchorOrigin:s,transformOrigin:l}=wle(n);return N.jsxs(Q.Popover,{open:!!t,anchorEl:t,anchorOrigin:s,transformOrigin:l,PaperProps:{sx:{p:1,width:"auto",overflow:"inherit",...o,"& .MuiMenuItem-root":{px:1,typography:"body2",borderRadius:.75,"& svg":{mr:2,width:20,height:20,flexShrink:0}},...i}},...a,children:[!r&&N.jsx(Dle,{arrow:n}),e]})},Lle=Q.styled(Q.Stack)(({theme:t})=>({flexDirection:"row",alignItems:"center",justifyContent:"space-between",borderBottom:`1px solid ${t.palette.grey[300]}`,button:{marginRight:24}})),Ple=Q.styled(Q.DialogContent)({padding:"24px !important"}),kle=Q.styled(Q.DialogActions)(({theme:t})=>({borderTop:`1px solid ${t.palette.grey[300]}`,backgroundColor:t.palette.grey[50]})),Fle=({actions:t,actionsProps:e,children:n,dialogContentProps:r,dialogTitle:i,dialogTitleProps:a,onClose:o,...s})=>N.jsxs(Q.Dialog,{scroll:"body",...s,onClose:o,children:[N.jsxs(Lle,{children:[i&&N.jsx(Q.DialogTitle,{variant:"subtitle1",...a,children:i}),N.jsx(Q.IconButton,{onClick:o,children:N.jsx(Lt,{icon:"ic:round-close"})})]}),N.jsx(Ple,{...r,children:n}),t&&N.jsx(kle,{sx:{borderTop:"1px solid",borderColor:"grey.300",backgroundColor:"grey.50"},...e,children:t})]}),Ble=({children:t,container:e})=>Jo.createPortal(t,document.getElementById(e)||document.body),Ule=({onSearch:t,onChange:e,trigger:n="click",iconPosition:r="end",...i})=>{const a=O.useRef(null),o=N.jsx(Q.InputAdornment,{position:r,children:N.jsx(Q.IconButton,{color:"inherit",onClick:()=>{var s;t((s=a.current)==null?void 0:s.value)},children:N.jsx(Lt,{icon:"eva:search-fill",sx:{width:20,height:20}})})});return N.jsx(Q.TextField,{inputRef:a,InputProps:{onKeyDown:s=>{var l;s.key==="Enter"&&t((l=a.current)==null?void 0:l.value)},...r==="start"?{startAdornment:o}:{endAdornment:o}},onChange:s=>{if(n==="change"){t(s.target.value);return}s.target.value===""&&t(""),e&&e(s)},...i})},Gle=Q.styled(Q.StepConnector)(({theme:t})=>({top:10,left:"calc(-50% + 20px)",right:"calc(50% + 20px)","& .MuiStepConnector-line":{borderTopWidth:2,borderColor:t.palette.divider},"&.Mui-active, &.Mui-completed":{"& .MuiStepConnector-line":{borderColor:t.palette.primary.main}}})),$le=({active:t,completed:e})=>N.jsx(Q.Stack,{alignItems:"center",justifyContent:"center",sx:{width:24,height:24,color:"text.disabled",...t&&{color:"primary.main"}},children:e?N.jsx(Lt,{icon:"eva:checkmark-fill",sx:{color:"primary.main"}}):N.jsx(Q.Box,{sx:{width:8,height:8,borderRadius:"50%",backgroundColor:"currentColor"}})}),qle=({steps:t,activeStep:e,showLabels:n=!0,sx:r,...i})=>N.jsx(Q.Stepper,{alternativeLabel:!0,activeStep:e,connector:N.jsx(Gle,{}),sx:r,...i,children:t.map(a=>N.jsx(Q.Step,{children:N.jsx(Q.StepLabel,{StepIconComponent:$le,sx:{"& .MuiStepLabel-label":{typography:"subtitle2"}},children:n&&a})},a))}),Yle=({children:t,value:e,index:n})=>N.jsx(Q.Box,{role:"tabpanel",id:`simple-tabpanel-${n}`,"aria-labelledby":`simple-tab-${n}`,sx:{mt:3,...e.toString()!==n.toString()&&{position:"absolute",width:"100%",height:0,overflow:"hidden",visibility:"hidden"}},children:t}),Vle=({name:t,helperText:e,rules:n,...r})=>{const{control:i}=rt.useFormContext();return N.jsx(rt.Controller,{name:t,control:i,rules:n,render:({field:a,fieldState:{error:o}})=>N.jsx(Pd,{...a,...r,onChange:s=>a.onChange(s),error:!!o,helperText:(o==null?void 0:o.message)||e})})},Hle=({name:t,helperText:e,...n})=>{const{control:r}=rt.useFormContext();return N.jsx(rt.Controller,{name:t,control:r,render:({field:i,fieldState:{error:a}})=>N.jsxs("div",{children:[N.jsx(Q.FormControlLabel,{control:N.jsx(Q.Checkbox,{...i,checked:i.value}),...n}),(!!a||e)&&N.jsx(Q.FormHelperText,{error:!!a,children:a?a==null?void 0:a.message:e})]})})},zle=({row:t,name:e,label:n,options:r,spacing:i,helperText:a,...o})=>{const{control:s}=rt.useFormContext(),l=(c,u)=>c.includes(u)?c.filter(d=>d!==u):[...c,u];return N.jsx(rt.Controller,{name:e,control:s,render:({field:c,fieldState:{error:u}})=>N.jsxs(Q.FormControl,{component:"fieldset",children:[n&&N.jsx(Q.FormLabel,{component:"legend",sx:{typography:"body2"},children:n}),N.jsx(Q.FormGroup,{sx:{...t&&{flexDirection:"row"},"& .MuiFormControlLabel-root":{"&:not(:last-of-type)":{mb:i||0},...t&&{mr:0,"&:not(:last-of-type)":{mr:i||2}}}},children:r.map(d=>N.jsx(Q.FormControlLabel,{control:N.jsx(Q.Checkbox,{checked:c.value.includes(d.value),onChange:()=>c.onChange(l(c.value,d.value))}),label:d.label,...o},d.value))}),(!!u||a)&&N.jsx(Q.FormHelperText,{error:!!u,sx:{mx:0},children:u?u==null?void 0:u.message:a})]})})},Wle=typeof window<"u"?O.useLayoutEffect:O.useEffect;function QA(t,e,n,r){const i=O.useRef(e);Wle(()=>{i.current=e},[e]),O.useEffect(()=>{const a=(n==null?void 0:n.current)||window;if(!(a&&a.addEventListener))return;const o=s=>i.current(s);return a.addEventListener(t,o,r),()=>{a.removeEventListener(t,o)}},[t,n,r])}const jle=({keyName:t,inputs:e=[],rules:n,...r})=>{const i=O.useRef(null),{control:a,setValue:o,formState:{errors:s}}=rt.useFormContext(),l=d=>{const p=d.clipboardData.getData("text").split("");e.map((f,m)=>o(f,p[m])),d.preventDefault()},c=(d,p)=>{const{maxLength:f,value:m,name:_}=d.target,g=_.replace(t,""),h=Number(g),E=document.querySelector(`input[name=${t}${h+1}]`);m.length>f&&(d.target.value=m[0]),m.length>=f&&h<6&&E!==null&&E.focus(),p(d)};QA("paste",l,i);const u=e.some(d=>s[d]);return N.jsxs(Q.Stack,{children:[N.jsx(Q.Stack,{direction:"row",spacing:2,justifyContent:"center",ref:i,children:e.map((d,p)=>N.jsx(rt.Controller,{name:`${t}${p+1}`,control:a,rules:n,render:({field:f,fieldState:{error:m}})=>N.jsx(Q.TextField,{...r,...f,autoComplete:"none",error:!!m,autoFocus:p===0,placeholder:"-",onChange:_=>{c(_,f.onChange)},onFocus:_=>_.currentTarget.select(),InputProps:{sx:{width:{xs:36,sm:56},height:{xs:36,sm:56},"& input":{p:0,textAlign:"center"}}},inputProps:{maxLength:1,type:"number"}})},d))}),u&&N.jsx(Q.FormHelperText,{error:!0,sx:{px:2},children:"Código é obrigatório"})]})},Kle=({name:t,rules:e,helperText:n,...r})=>{const{control:i}=rt.useFormContext();return N.jsx(rt.Controller,{name:t,control:i,rules:e,render:({field:{ref:a,onChange:o,...s},fieldState:{error:l}})=>N.jsx(hC,{...s,onChangeColor:o,inputRef:a,fullWidth:!0,error:!!l,helperText:(l==null?void 0:l.message)||n,...r})})},Qle=({name:t,...e})=>{const{control:n}=rt.useFormContext();return N.jsx(rt.Controller,{name:t,control:n,render:({field:{ref:r,...i},fieldState:{error:a}})=>{var o;return N.jsx(Ma.DatePicker,{inputRef:r,format:"dd/MM/yyyy",localeText:{previousMonth:"Mês anterior",nextMonth:"Próximo mês",fieldDayPlaceholder:()=>"dd",fieldMonthPlaceholder:()=>"mm",fieldYearPlaceholder:()=>"aaaa",...e.localeText},...i,...e,value:i.value?new Date(i.value):null,slotProps:{textField:{...(o=e.slotProps)==null?void 0:o.textField,error:!!a,helperText:a==null?void 0:a.message,autoComplete:"off",spellCheck:"false",fullWidth:!0}}})}})},Xle=({name:t,label:e,...n})=>{const{control:r,setError:i}=rt.useFormContext();return N.jsx(rt.Controller,{name:t,control:r,render:({field:{value:a,onChange:o},fieldState:{error:s}})=>N.jsx(Ma.DateRangePicker,{format:"dd/MM/yyyy",localeText:{previousMonth:"Mês anterior",nextMonth:"Próximo mês",fieldDayPlaceholder:()=>"dd",fieldMonthPlaceholder:()=>"mm",fieldYearPlaceholder:()=>"aaaa",...n.localeText},value:[(a==null?void 0:a.startDate)||null,(a==null?void 0:a.endDate)||null],onChange:l=>o({startDate:l[0],endDate:l[1]}),onError:l=>{i(t,{message:l[0]||l[1]||void 0})},...n,slotProps:{textField:({position:l})=>{var c;return{...(c=n.slotProps)==null?void 0:c.textField,error:!!s,helperText:s==null?void 0:s.message,autoComplete:"off",spellCheck:"false",fullWidth:!0,label:l==="start"?`${e} (Dt. Início)`:`${e} (Dt. Fim)`}}},sx:{width:1}})})},Zle=({name:t,...e})=>{const{control:n}=rt.useFormContext();return N.jsx(rt.Controller,{name:t,control:n,render:({field:{ref:r,...i},fieldState:{error:a}})=>{var o;return N.jsx(Ma.DateTimePicker,{format:"dd/MM/yyyy HH:mm",inputRef:r,localeText:{previousMonth:"Mês anterior",nextMonth:"Próximo mês",fieldDayPlaceholder:()=>"dd",fieldMonthPlaceholder:()=>"mm",fieldYearPlaceholder:()=>"aaaa",fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",...e.localeText},...i,...e,value:i.value?new Date(i.value):null,slotProps:{textField:{...(o=e.slotProps)==null?void 0:o.textField,error:!!a,helperText:a==null?void 0:a.message,autoComplete:"off",spellCheck:"false",fullWidth:!0}}})}})},Jle=({name:t,helperText:e,rules:n,...r})=>{const{control:i}=rt.useFormContext();return N.jsx(rt.Controller,{name:t,control:i,rules:n,render:({field:{name:a,onBlur:o,onChange:s,value:l},fieldState:{error:c}})=>N.jsx(TA,{id:`quill${a}`,onBlur:o,onChange:(u,d,p,f)=>s(f.getLength()===1?"":u),value:l,error:!!c,helperText:(c==null?void 0:c.message)||e,...r})})},XA=({name:t,helperText:e,rules:n,...r})=>{const{control:i}=rt.useFormContext();return N.jsx(rt.Controller,{name:t,control:i,rules:n,render:({field:{ref:a,...o},fieldState:{error:s}})=>N.jsx(Q.TextField,{...o,inputRef:a,fullWidth:!0,error:!!s,helperText:(s==null?void 0:s.message)||e,...r})})},ece=({id:t,children:e,onSubmit:n,methods:r})=>N.jsx(rt.FormProvider,{...r,children:N.jsx(Q.Stack,{component:"form",id:t,onSubmit:n,flex:1,width:1,noValidate:!0,children:e})}),tce=({name:t,helperText:e,rules:n,...r})=>{const{control:i}=rt.useFormContext();return N.jsx(rt.Controller,{name:t,control:i,rules:n,render:({field:{name:a,onChange:o,value:s,ref:l},fieldState:{error:c}})=>N.jsx(ph,{ref:l,...r,name:a,value:s,error:!!c,helperText:(c==null?void 0:c.message)||e,onChange:({target:{value:u}})=>o(u)})})},nce=t=>{const[e,n]=O.useState(!1);return N.jsx(XA,{...t,type:e?"text":"password",InputProps:{endAdornment:N.jsx(Q.InputAdornment,{position:"end",children:N.jsx(Q.IconButton,{onClick:()=>n(!e),edge:"end","aria-label":"Mostrar/Ocultar senha",children:N.jsx(Lt,{icon:e?"eva:eye-off-fill":"eva:eye-fill"})})})}})},rce=({name:t,rules:e,row:n,label:r,options:i,spacing:a,helperText:o,...s})=>{const{control:l}=rt.useFormContext(),c=r?`${t}-${r}`:"";return N.jsx(rt.Controller,{name:t,control:l,rules:e,render:({field:u,fieldState:{error:d}})=>N.jsxs(Q.FormControl,{component:"fieldset",children:[r&&N.jsx(Q.FormLabel,{component:"legend",id:c,sx:{typography:"body2"},children:r}),N.jsx(Q.RadioGroup,{...u,"aria-labelledby":c,row:n,...s,children:i.map(p=>N.jsx(Q.FormControlLabel,{value:p.value,control:N.jsx(Q.Radio,{}),label:p.label,sx:{"&:not(:last-of-type)":{mb:a||0},...n&&{mr:0,"&:not(:last-of-type)":{mr:a||2}}}},p.value))}),(!!d||o)&&N.jsx(Q.FormHelperText,{error:!!d,sx:{mx:0},children:d?d==null?void 0:d.message:o})]})})},ice=({name:t,helperText:e,...n})=>{const{control:r}=rt.useFormContext();return N.jsx(rt.Controller,{name:t,control:r,render:({field:i,fieldState:{error:a}})=>N.jsxs("div",{children:[N.jsx(Q.FormControlLabel,{control:N.jsx(Q.Switch,{...i,checked:i.value}),...n}),(!!a||e)&&N.jsx(Q.FormHelperText,{error:!!a,children:a?a==null?void 0:a.message:e})]})})},ace=({name:t,...e})=>{const{control:n}=rt.useFormContext();return N.jsx(rt.Controller,{name:t,control:n,render:({field:{ref:r,...i},fieldState:{error:a}})=>{var o;return N.jsx(Ma.TimePicker,{ampm:!1,format:"HH:mm",inputRef:r,localeText:{fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",...e.localeText},...i,...e,value:i.value?new Date(i.value):null,slotProps:{textField:{...(o=e.slotProps)==null?void 0:o.textField,error:!!a,helperText:a==null?void 0:a.message,autoComplete:"off",spellCheck:"false",fullWidth:!0}}})}})},oce=t=>new Promise((e,n)=>{const r=new Image;r.addEventListener("load",()=>e(r)),r.addEventListener("error",i=>n(i)),r.setAttribute("crossOrigin","anonymous"),r.src=t});function ZA(t){return t*Math.PI/180}function sce(t,e,n){const r=ZA(n);return{width:Math.abs(Math.cos(r)*t)+Math.abs(Math.sin(r)*e),height:Math.abs(Math.sin(r)*t)+Math.abs(Math.cos(r)*e)}}async function lce(t,e,n=0,r={horizontal:!1,vertical:!1}){const i=await oce(t),a=document.createElement("canvas"),o=a.getContext("2d");if(!o)return null;const s=ZA(n),{width:l,height:c}=sce(i.width,i.height,n);a.width=l,a.height=c,o.translate(l/2,c/2),o.rotate(s),o.scale(r.horizontal?-1:1,r.vertical?-1:1),o.translate(-i.width/2,-i.height/2),o.drawImage(i,0,0);const u=o.getImageData(e.x,e.y,e.width,e.height);return a.width=e.width,a.height=e.height,o.putImageData(u,0,0),new Promise((d,p)=>{a.toBlob(f=>{d(f)},"image/png")})}function xa(t,e,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{c(r.next(u))}catch(d){o(d)}}function l(u){try{c(r.throw(u))}catch(d){o(d)}}function c(u){u.done?a(u.value):i(u.value).then(s,l)}c((r=r.apply(t,e||[])).next())})}function Ia(t,e){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(c){return function(u){return l([c,u])}}function l(c){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(n=0)),n;)try{if(r=1,i&&(a=c[0]&2?i.return:c[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,c[1])).done)return a;switch(i=0,a&&(c=[c[0]&2,a.value]),c[0]){case 0:case 1:a=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]<a[3])){n.label=c[1];break}if(c[0]===6&&n.label<a[1]){n.label=a[1],a=c;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(c);break}a[2]&&n.ops.pop(),n.trys.pop();continue}c=e.call(t,n)}catch(u){c=[6,u],i=0}finally{r=a=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function JA(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,a=[],o;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function ex(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,a;r<i;r++)(a||!(r in e))&&(a||(a=Array.prototype.slice.call(e,0,r)),a[r]=e[r]);return t.concat(a||Array.prototype.slice.call(e))}typeof SuppressedError=="function"&&SuppressedError;var cce=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function Qo(t,e){var n=uce(t);if(typeof n.path!="string"){var r=t.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof e=="string"?e:typeof r=="string"&&r.length>0?r:t.name,writable:!1,configurable:!1,enumerable:!0})}return n}function uce(t){var e=t.name,n=e&&e.lastIndexOf(".")!==-1;if(n&&!t.type){var r=e.split(".").pop().toLowerCase(),i=cce.get(r);i&&Object.defineProperty(t,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return t}var dce=[".DS_Store","Thumbs.db"];function pce(t){return xa(this,void 0,void 0,function(){return Ia(this,function(e){return yc(t)&&fce(t.dataTransfer)?[2,hce(t.dataTransfer,t.type)]:_ce(t)?[2,mce(t)]:Array.isArray(t)&&t.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,gce(t)]:[2,[]]})})}function fce(t){return yc(t)}function _ce(t){return yc(t)&&yc(t.target)}function yc(t){return typeof t=="object"&&t!==null}function mce(t){return fh(t.target.files).map(function(e){return Qo(e)})}function gce(t){return xa(this,void 0,void 0,function(){var e;return Ia(this,function(n){switch(n.label){case 0:return[4,Promise.all(t.map(function(r){return r.getFile()}))];case 1:return e=n.sent(),[2,e.map(function(r){return Qo(r)})]}})})}function hce(t,e){return xa(this,void 0,void 0,function(){var n,r;return Ia(this,function(i){switch(i.label){case 0:return t.items?(n=fh(t.items).filter(function(a){return a.kind==="file"}),e!=="drop"?[2,n]:[4,Promise.all(n.map(Ece))]):[3,2];case 1:return r=i.sent(),[2,tx(nx(r))];case 2:return[2,tx(fh(t.files).map(function(a){return Qo(a)}))]}})})}function tx(t){return t.filter(function(e){return dce.indexOf(e.name)===-1})}function fh(t){if(t===null)return[];for(var e=[],n=0;n<t.length;n++){var r=t[n];e.push(r)}return e}function Ece(t){if(typeof t.webkitGetAsEntry!="function")return rx(t);var e=t.webkitGetAsEntry();return e&&e.isDirectory?ix(e):rx(t)}function nx(t){return t.reduce(function(e,n){return ex(ex([],JA(e),!1),JA(Array.isArray(n)?nx(n):[n]),!1)},[])}function rx(t){var e=t.getAsFile();if(!e)return Promise.reject("".concat(t," is not a File"));var n=Qo(e);return Promise.resolve(n)}function bce(t){return xa(this,void 0,void 0,function(){return Ia(this,function(e){return[2,t.isDirectory?ix(t):vce(t)]})})}function ix(t){var e=t.createReader();return new Promise(function(n,r){var i=[];function a(){var o=this;e.readEntries(function(s){return xa(o,void 0,void 0,function(){var l,c,u;return Ia(this,function(d){switch(d.label){case 0:if(s.length)return[3,5];d.label=1;case 1:return d.trys.push([1,3,,4]),[4,Promise.all(i)];case 2:return l=d.sent(),n(l),[3,4];case 3:return c=d.sent(),r(c),[3,4];case 4:return[3,6];case 5:u=Promise.all(s.map(bce)),i.push(u),a(),d.label=6;case 6:return[2]}})})},function(s){r(s)})}a()})}function vce(t){return xa(this,void 0,void 0,function(){return Ia(this,function(e){return[2,new Promise(function(n,r){t.file(function(i){var a=Qo(i,t.fullPath);n(a)},function(i){r(i)})})]})})}var Sce=function(t,e){if(t&&e){var n=Array.isArray(e)?e:e.split(","),r=t.name||"",i=(t.type||"").toLowerCase(),a=i.replace(/\/.*$/,"");return n.some(function(o){var s=o.trim().toLowerCase();return s.charAt(0)==="."?r.toLowerCase().endsWith(s):s.endsWith("/*")?a===s.replace(/\/.*$/,""):i===s})}return!0};function ax(t){return Cce(t)||Tce(t)||cx(t)||yce()}function yce(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
290
|
+
`,ple=1,fle=3,_le=function(t){Hse(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.imageRef=O.createRef(),n.videoRef=O.createRef(),n.containerRef=null,n.styleRef=null,n.containerRect=null,n.mediaSize={width:0,height:0,naturalWidth:0,naturalHeight:0},n.dragStartPosition={x:0,y:0},n.dragStartCrop={x:0,y:0},n.gestureZoomStart=0,n.gestureRotationStart=0,n.isTouching=!1,n.lastPinchDistance=0,n.lastPinchRotation=0,n.rafDragTimeout=null,n.rafPinchTimeout=null,n.wheelTimer=null,n.currentDoc=typeof document<"u"?document:null,n.currentWindow=typeof window<"u"?window:null,n.resizeObserver=null,n.state={cropSize:null,hasWheelJustStarted:!1},n.initResizeObserver=function(){if(!(typeof window.ResizeObserver>"u"||!n.containerRef)){var r=!0;n.resizeObserver=new window.ResizeObserver(function(i){if(r){r=!1;return}n.computeSizes()}),n.resizeObserver.observe(n.containerRef)}},n.preventZoomSafari=function(r){return r.preventDefault()},n.cleanEvents=function(){n.currentDoc&&(n.currentDoc.removeEventListener("mousemove",n.onMouseMove),n.currentDoc.removeEventListener("mouseup",n.onDragStopped),n.currentDoc.removeEventListener("touchmove",n.onTouchMove),n.currentDoc.removeEventListener("touchend",n.onDragStopped),n.currentDoc.removeEventListener("gesturemove",n.onGestureMove),n.currentDoc.removeEventListener("gestureend",n.onGestureEnd))},n.clearScrollEvent=function(){n.containerRef&&n.containerRef.removeEventListener("wheel",n.onWheel),n.wheelTimer&&clearTimeout(n.wheelTimer)},n.onMediaLoad=function(){var r=n.computeSizes();r&&(n.emitCropData(),n.setInitialCrop(r)),n.props.onMediaLoaded&&n.props.onMediaLoaded(n.mediaSize)},n.setInitialCrop=function(r){if(n.props.initialCroppedAreaPercentages){var i=sle(n.props.initialCroppedAreaPercentages,n.mediaSize,n.props.rotation,r,n.props.minZoom,n.props.maxZoom),a=i.crop,o=i.zoom;n.props.onCropChange(a),n.props.onZoomChange&&n.props.onZoomChange(o)}else if(n.props.initialCroppedAreaPixels){var s=cle(n.props.initialCroppedAreaPixels,n.mediaSize,n.props.rotation,r,n.props.minZoom,n.props.maxZoom),a=s.crop,o=s.zoom;n.props.onCropChange(a),n.props.onZoomChange&&n.props.onZoomChange(o)}},n.computeSizes=function(){var r,i,a,o,s,l,c=n.imageRef.current||n.videoRef.current;if(c&&n.containerRef){n.containerRect=n.containerRef.getBoundingClientRect();var u=n.containerRect.width/n.containerRect.height,d=((r=n.imageRef.current)===null||r===void 0?void 0:r.naturalWidth)||((i=n.videoRef.current)===null||i===void 0?void 0:i.videoWidth)||0,p=((a=n.imageRef.current)===null||a===void 0?void 0:a.naturalHeight)||((o=n.videoRef.current)===null||o===void 0?void 0:o.videoHeight)||0,f=c.offsetWidth<d||c.offsetHeight<p,m=d/p,_=void 0;if(f){var g=n.getObjectFit();switch(g){default:case"contain":_=u>m?{width:n.containerRect.height*m,height:n.containerRect.height}:{width:n.containerRect.width,height:n.containerRect.width/m};break;case"horizontal-cover":_={width:n.containerRect.width,height:n.containerRect.width/m};break;case"vertical-cover":_={width:n.containerRect.height*m,height:n.containerRect.height};break}}else _={width:c.offsetWidth,height:c.offsetHeight};n.mediaSize=Xt(Xt({},_),{naturalWidth:d,naturalHeight:p}),n.props.setMediaSize&&n.props.setMediaSize(n.mediaSize);var h=n.props.cropSize?n.props.cropSize:nle(n.mediaSize.width,n.mediaSize.height,n.containerRect.width,n.containerRect.height,n.props.aspect,n.props.rotation);return(((s=n.state.cropSize)===null||s===void 0?void 0:s.height)!==h.height||((l=n.state.cropSize)===null||l===void 0?void 0:l.width)!==h.width)&&n.props.onCropSizeChange&&n.props.onCropSizeChange(h),n.setState({cropSize:h},n.recomputeCropPosition),n.props.setCropSize&&n.props.setCropSize(h),h}},n.onMouseDown=function(r){n.currentDoc&&(r.preventDefault(),n.currentDoc.addEventListener("mousemove",n.onMouseMove),n.currentDoc.addEventListener("mouseup",n.onDragStopped),n.onDragStart(e.getMousePoint(r)))},n.onMouseMove=function(r){return n.onDrag(e.getMousePoint(r))},n.onTouchStart=function(r){n.currentDoc&&(n.isTouching=!0,!(n.props.onTouchRequest&&!n.props.onTouchRequest(r))&&(n.currentDoc.addEventListener("touchmove",n.onTouchMove,{passive:!1}),n.currentDoc.addEventListener("touchend",n.onDragStopped),r.touches.length===2?n.onPinchStart(r):r.touches.length===1&&n.onDragStart(e.getTouchPoint(r.touches[0]))))},n.onTouchMove=function(r){r.preventDefault(),r.touches.length===2?n.onPinchMove(r):r.touches.length===1&&n.onDrag(e.getTouchPoint(r.touches[0]))},n.onGestureStart=function(r){n.currentDoc&&(r.preventDefault(),n.currentDoc.addEventListener("gesturechange",n.onGestureMove),n.currentDoc.addEventListener("gestureend",n.onGestureEnd),n.gestureZoomStart=n.props.zoom,n.gestureRotationStart=n.props.rotation)},n.onGestureMove=function(r){if(r.preventDefault(),!n.isTouching){var i=e.getMousePoint(r),a=n.gestureZoomStart-1+r.scale;if(n.setNewZoom(a,i,{shouldUpdatePosition:!0}),n.props.onRotationChange){var o=n.gestureRotationStart+r.rotation;n.props.onRotationChange(o)}}},n.onGestureEnd=function(r){n.cleanEvents()},n.onDragStart=function(r){var i,a,o=r.x,s=r.y;n.dragStartPosition={x:o,y:s},n.dragStartCrop=Xt({},n.props.crop),(a=(i=n.props).onInteractionStart)===null||a===void 0||a.call(i)},n.onDrag=function(r){var i=r.x,a=r.y;n.currentWindow&&(n.rafDragTimeout&&n.currentWindow.cancelAnimationFrame(n.rafDragTimeout),n.rafDragTimeout=n.currentWindow.requestAnimationFrame(function(){if(n.state.cropSize&&!(i===void 0||a===void 0)){var o=i-n.dragStartPosition.x,s=a-n.dragStartPosition.y,l={x:n.dragStartCrop.x+o,y:n.dragStartCrop.y+s},c=n.props.restrictPosition?mc(l,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):l;n.props.onCropChange(c)}}))},n.onDragStopped=function(){var r,i;n.isTouching=!1,n.cleanEvents(),n.emitCropData(),(i=(r=n.props).onInteractionEnd)===null||i===void 0||i.call(r)},n.onWheel=function(r){if(n.currentWindow&&!(n.props.onWheelRequest&&!n.props.onWheelRequest(r))){r.preventDefault();var i=e.getMousePoint(r),a=tle(r).pixelY,o=n.props.zoom-a*n.props.zoomSpeed/200;n.setNewZoom(o,i,{shouldUpdatePosition:!0}),n.state.hasWheelJustStarted||n.setState({hasWheelJustStarted:!0},function(){var s,l;return(l=(s=n.props).onInteractionStart)===null||l===void 0?void 0:l.call(s)}),n.wheelTimer&&clearTimeout(n.wheelTimer),n.wheelTimer=n.currentWindow.setTimeout(function(){return n.setState({hasWheelJustStarted:!1},function(){var s,l;return(l=(s=n.props).onInteractionEnd)===null||l===void 0?void 0:l.call(s)})},250)}},n.getPointOnContainer=function(r){var i=r.x,a=r.y;if(!n.containerRect)throw new Error("The Cropper is not mounted");return{x:n.containerRect.width/2-(i-n.containerRect.left),y:n.containerRect.height/2-(a-n.containerRect.top)}},n.getPointOnMedia=function(r){var i=r.x,a=r.y,o=n.props,s=o.crop,l=o.zoom;return{x:(i+s.x)/l,y:(a+s.y)/l}},n.setNewZoom=function(r,i,a){var o=a===void 0?{}:a,s=o.shouldUpdatePosition,l=s===void 0?!0:s;if(!(!n.state.cropSize||!n.props.onZoomChange)){var c=gc(r,n.props.minZoom,n.props.maxZoom);if(l){var u=n.getPointOnContainer(i),d=n.getPointOnMedia(u),p={x:d.x*c-u.x,y:d.y*c-u.y},f=n.props.restrictPosition?mc(p,n.mediaSize,n.state.cropSize,c,n.props.rotation):p;n.props.onCropChange(f)}n.props.onZoomChange(c)}},n.getCropData=function(){if(!n.state.cropSize)return null;var r=n.props.restrictPosition?mc(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop;return ile(r,n.mediaSize,n.state.cropSize,n.getAspect(),n.props.zoom,n.props.rotation,n.props.restrictPosition)},n.emitCropData=function(){var r=n.getCropData();if(r){var i=r.croppedAreaPercentages,a=r.croppedAreaPixels;n.props.onCropComplete&&n.props.onCropComplete(i,a),n.props.onCropAreaChange&&n.props.onCropAreaChange(i,a)}},n.emitCropAreaChange=function(){var r=n.getCropData();if(r){var i=r.croppedAreaPercentages,a=r.croppedAreaPixels;n.props.onCropAreaChange&&n.props.onCropAreaChange(i,a)}},n.recomputeCropPosition=function(){if(n.state.cropSize){var r=n.props.restrictPosition?mc(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop;n.props.onCropChange(r),n.emitCropData()}},n}return e.prototype.componentDidMount=function(){!this.currentDoc||!this.currentWindow||(this.containerRef&&(this.containerRef.ownerDocument&&(this.currentDoc=this.containerRef.ownerDocument),this.currentDoc.defaultView&&(this.currentWindow=this.currentDoc.defaultView),this.initResizeObserver(),typeof window.ResizeObserver>"u"&&this.currentWindow.addEventListener("resize",this.computeSizes),this.props.zoomWithScroll&&this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}),this.containerRef.addEventListener("gesturestart",this.onGestureStart)),this.props.disableAutomaticStylesInjection||(this.styleRef=this.currentDoc.createElement("style"),this.styleRef.setAttribute("type","text/css"),this.props.nonce&&this.styleRef.setAttribute("nonce",this.props.nonce),this.styleRef.innerHTML=dle,this.currentDoc.head.appendChild(this.styleRef)),this.imageRef.current&&this.imageRef.current.complete&&this.onMediaLoad(),this.props.setImageRef&&this.props.setImageRef(this.imageRef),this.props.setVideoRef&&this.props.setVideoRef(this.videoRef))},e.prototype.componentWillUnmount=function(){var n,r;!this.currentDoc||!this.currentWindow||(typeof window.ResizeObserver>"u"&&this.currentWindow.removeEventListener("resize",this.computeSizes),(n=this.resizeObserver)===null||n===void 0||n.disconnect(),this.containerRef&&this.containerRef.removeEventListener("gesturestart",this.preventZoomSafari),this.styleRef&&((r=this.styleRef.parentNode)===null||r===void 0||r.removeChild(this.styleRef)),this.cleanEvents(),this.props.zoomWithScroll&&this.clearScrollEvent())},e.prototype.componentDidUpdate=function(n){var r,i,a,o,s,l,c,u,d;n.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):n.aspect!==this.props.aspect?this.computeSizes():n.zoom!==this.props.zoom?this.recomputeCropPosition():((r=n.cropSize)===null||r===void 0?void 0:r.height)!==((i=this.props.cropSize)===null||i===void 0?void 0:i.height)||((a=n.cropSize)===null||a===void 0?void 0:a.width)!==((o=this.props.cropSize)===null||o===void 0?void 0:o.width)?this.computeSizes():(((s=n.crop)===null||s===void 0?void 0:s.x)!==((l=this.props.crop)===null||l===void 0?void 0:l.x)||((c=n.crop)===null||c===void 0?void 0:c.y)!==((u=this.props.crop)===null||u===void 0?void 0:u.y))&&this.emitCropAreaChange(),n.zoomWithScroll!==this.props.zoomWithScroll&&this.containerRef&&(this.props.zoomWithScroll?this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}):this.clearScrollEvent()),n.video!==this.props.video&&((d=this.videoRef.current)===null||d===void 0||d.load())},e.prototype.getAspect=function(){var n=this.props,r=n.cropSize,i=n.aspect;return r?r.width/r.height:i},e.prototype.getObjectFit=function(){var n,r,i,a;if(this.props.objectFit==="cover"){var o=this.imageRef.current||this.videoRef.current;if(o&&this.containerRef){this.containerRect=this.containerRef.getBoundingClientRect();var s=this.containerRect.width/this.containerRect.height,l=((n=this.imageRef.current)===null||n===void 0?void 0:n.naturalWidth)||((r=this.videoRef.current)===null||r===void 0?void 0:r.videoWidth)||0,c=((i=this.imageRef.current)===null||i===void 0?void 0:i.naturalHeight)||((a=this.videoRef.current)===null||a===void 0?void 0:a.videoHeight)||0,u=l/c;return u<s?"horizontal-cover":"vertical-cover"}return"horizontal-cover"}return this.props.objectFit},e.prototype.onPinchStart=function(n){var r=e.getTouchPoint(n.touches[0]),i=e.getTouchPoint(n.touches[1]);this.lastPinchDistance=FA(r,i),this.lastPinchRotation=BA(r,i),this.onDragStart(UA(r,i))},e.prototype.onPinchMove=function(n){var r=this;if(!(!this.currentDoc||!this.currentWindow)){var i=e.getTouchPoint(n.touches[0]),a=e.getTouchPoint(n.touches[1]),o=UA(i,a);this.onDrag(o),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame(function(){var s=FA(i,a),l=r.props.zoom*(s/r.lastPinchDistance);r.setNewZoom(l,o,{shouldUpdatePosition:!1}),r.lastPinchDistance=s;var c=BA(i,a),u=r.props.rotation+(c-r.lastPinchRotation);r.props.onRotationChange&&r.props.onRotationChange(u),r.lastPinchRotation=c})}},e.prototype.render=function(){var n=this,r=this.props,i=r.image,a=r.video,o=r.mediaProps,s=r.transform,l=r.crop,c=l.x,u=l.y,d=r.rotation,p=r.zoom,f=r.cropShape,m=r.showGrid,_=r.style,g=_.containerStyle,h=_.cropAreaStyle,E=_.mediaStyle,v=r.classes,b=v.containerClassName,S=v.cropAreaClassName,T=v.mediaClassName,y=this.getObjectFit();return O.createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(x){return n.containerRef=x},"data-testid":"container",style:g,className:hc("reactEasyCrop_Container",b)},i?O.createElement("img",Xt({alt:"",className:hc("reactEasyCrop_Image",y==="contain"&&"reactEasyCrop_Contain",y==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",y==="vertical-cover"&&"reactEasyCrop_Cover_Vertical",T)},o,{src:i,ref:this.imageRef,style:Xt(Xt({},E),{transform:s||"translate(".concat(c,"px, ").concat(u,"px) rotate(").concat(d,"deg) scale(").concat(p,")")}),onLoad:this.onMediaLoad})):a&&O.createElement("video",Xt({autoPlay:!0,loop:!0,muted:!0,className:hc("reactEasyCrop_Video",y==="contain"&&"reactEasyCrop_Contain",y==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",y==="vertical-cover"&&"reactEasyCrop_Cover_Vertical",T)},o,{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:Xt(Xt({},E),{transform:s||"translate(".concat(c,"px, ").concat(u,"px) rotate(").concat(d,"deg) scale(").concat(p,")")}),controls:!1}),(Array.isArray(a)?a:[{src:a}]).map(function(C){return O.createElement("source",Xt({key:C.src},C))})),this.state.cropSize&&O.createElement("div",{style:Xt(Xt({},h),{width:this.state.cropSize.width,height:this.state.cropSize.height}),"data-testid":"cropper",className:hc("reactEasyCrop_CropArea",f==="round"&&"reactEasyCrop_CropAreaRound",m&&"reactEasyCrop_CropAreaGrid",S)}))},e.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:fle,minZoom:ple,cropShape:"rect",objectFit:"contain",showGrid:!0,style:{},classes:{},mediaProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0},e.getMousePoint=function(n){return{x:Number(n.clientX),y:Number(n.clientY)}},e.getTouchPoint=function(n){return{x:Number(n.clientX),y:Number(n.clientY)}},e}(O.Component);const GA=({crop:t,zoom:e,onCropChange:n,onZoomChange:r,onCropComplete:i,image:{width:a,height:o,aspect:s,imgSrc:l=""}})=>N.jsx(Q.Stack,{position:"relative",alignItems:"center",justifyContent:"center",style:{position:"relative",width:a*1.1,height:o*1.1,margin:"auto"},children:N.jsx(_le,{image:l,crop:t,zoom:e,minZoom:1,maxZoom:5,cropSize:{width:a,height:o},aspect:s,onCropChange:n,onZoomChange:r,onCropComplete:i,objectFit:"horizontal-cover"})}),mle=qt(Q.Box)(({theme:t,ownerState:e})=>{const n=t.palette.mode==="light",r=e.variant==="filled",i=e.variant==="outlined",a=e.variant==="soft",o={...e.color==="default"&&{...i&&{backgroundColor:"transparent",color:t.palette.text.primary,border:`1px solid ${Ee(t.palette.grey[500],.32)}`},...a&&{color:n?t.palette.text.primary:t.palette.common.white,backgroundColor:Ee(t.palette.grey[500],.16)}}},s={...e.color!=="default"&&{...r&&{color:t.palette[e.color].contrastText,backgroundColor:t.palette[e.color].main},...i&&{backgroundColor:"transparent",color:t.palette[e.color].main,border:`1px solid ${t.palette[e.color].main}`},...a&&{color:t.palette[e.color][n?"dark":"light"],backgroundColor:Ee(t.palette[e.color].main,.16)}}};return{height:24,minWidth:22,lineHeight:0,borderRadius:6,cursor:"default",alignItems:"center",whiteSpace:"nowrap",display:"inline-flex",justifyContent:"center",textTransform:"capitalize",padding:t.spacing(0,1),color:t.palette.grey[800],fontSize:t.typography.pxToRem(12),fontFamily:t.typography.fontFamily,backgroundColor:t.palette.grey[300],fontWeight:t.typography.fontWeightBold,...s,...o}}),$A=O.forwardRef(({children:t,color:e="default",variant:n="soft",startIcon:r,endIcon:i,sx:a,...o},s)=>{const l=Gr(),c={width:16,height:16,"& svg, img":{width:1,height:1,objectFit:"cover"}};return N.jsxs(mle,{ref:s,component:"span",ownerState:{color:e,variant:n},sx:{...r&&{pl:.75},...i&&{pr:.75},...a},theme:l,...o,children:[r&&N.jsxs(Q.Box,{sx:{mr:.75,...c},children:[" ",r," "]}),t,i&&N.jsxs(Q.Box,{sx:{ml:.75,...c},children:[" ",i," "]})]})});$A.displayName="Label";function wr(t){return typeof t=="string"||t instanceof String}function qA(t){var e;return typeof t=="object"&&t!=null&&(t==null||(e=t.constructor)==null?void 0:e.name)==="Object"}function YA(t,e){return Array.isArray(e)?YA(t,(n,r)=>e.includes(r)):Object.entries(t).reduce((n,r)=>{let[i,a]=r;return e(a,i)&&(n[i]=a),n},{})}const Le={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function gle(t){switch(t){case Le.LEFT:return Le.FORCE_LEFT;case Le.RIGHT:return Le.FORCE_RIGHT;default:return t}}function ch(t){return t.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function Ec(t,e){if(e===t)return!0;const n=Array.isArray(e),r=Array.isArray(t);let i;if(n&&r){if(e.length!=t.length)return!1;for(i=0;i<e.length;i++)if(!Ec(e[i],t[i]))return!1;return!0}if(n!=r)return!1;if(e&&t&&typeof e=="object"&&typeof t=="object"){const a=e instanceof Date,o=t instanceof Date;if(a&&o)return e.getTime()==t.getTime();if(a!=o)return!1;const s=e instanceof RegExp,l=t instanceof RegExp;if(s&&l)return e.toString()==t.toString();if(s!=l)return!1;const c=Object.keys(e);for(i=0;i<c.length;i++)if(!Object.prototype.hasOwnProperty.call(t,c[i]))return!1;for(i=0;i<c.length;i++)if(!Ec(t[c[i]],e[c[i]]))return!1;return!0}else if(e&&t&&typeof e=="function"&&typeof t=="function")return e.toString()===t.toString();return!1}class hle{constructor(e){for(Object.assign(this,e);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?Le.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?Le.RIGHT:Le.LEFT}}function Ge(t,e){return new Ge.InputMask(t,e)}function VA(t){if(t==null)throw new Error("mask property should be defined");return t instanceof RegExp?Ge.MaskedRegExp:wr(t)?Ge.MaskedPattern:t===Date?Ge.MaskedDate:t===Number?Ge.MaskedNumber:Array.isArray(t)||t===Array?Ge.MaskedDynamic:Ge.Masked&&t.prototype instanceof Ge.Masked?t:Ge.Masked&&t instanceof Ge.Masked?t.constructor:t instanceof Function?Ge.MaskedFunction:(console.warn("Mask not found for mask",t),Ge.Masked)}function bc(t){if(!t)throw new Error("Options in not defined");if(Ge.Masked){if(t.prototype instanceof Ge.Masked)return{mask:t};const{mask:e=void 0,...n}=t instanceof Ge.Masked?{mask:t}:qA(t)&&t.mask instanceof Ge.Masked?t:{};if(e){const r=e.mask;return{...YA(e,(i,a)=>!a.startsWith("_")),mask:e.constructor,_mask:r,...n}}}return qA(t)?{...t}:{mask:t}}function li(t){if(Ge.Masked&&t instanceof Ge.Masked)return t;const e=bc(t),n=VA(e.mask);if(!n)throw new Error("Masked class is not found for provided mask, appropriate module needs to be imported manually before creating mask.");return e.mask===n&&delete e.mask,e._mask&&(e.mask=e._mask,delete e._mask),new n(e)}Ge.createMask=li;class uh{get selectionStart(){let e;try{e=this._unsafeSelectionStart}catch{}return e??this.value.length}get selectionEnd(){let e;try{e=this._unsafeSelectionEnd}catch{}return e??this.value.length}select(e,n){if(!(e==null||n==null||e===this.selectionStart&&n===this.selectionEnd))try{this._unsafeSelect(e,n)}catch{}}get isActive(){return!1}}Ge.MaskElement=uh;class ci extends uh{constructor(e){super(),this.input=e,this._handlers={}}get rootElement(){var e,n,r;return(e=(n=(r=this.input).getRootNode)==null?void 0:n.call(r))!=null?e:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(e){Object.keys(e).forEach(n=>this._toggleEventHandler(ci.EVENTS_MAP[n],e[n]))}unbindEvents(){Object.keys(this._handlers).forEach(e=>this._toggleEventHandler(e))}_toggleEventHandler(e,n){this._handlers[e]&&(this.input.removeEventListener(e,this._handlers[e]),delete this._handlers[e]),n&&(this.input.addEventListener(e,n),this._handlers[e]=n)}}ci.EVENTS_MAP={selectionChange:"keydown",input:"input",drop:"drop",click:"click",focus:"focus",commit:"blur"},Ge.HTMLMaskElement=ci;class Ele extends ci{constructor(e){super(e),this.input=e,this._handlers={}}get _unsafeSelectionStart(){return this.input.selectionStart!=null?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(e,n){this.input.setSelectionRange(e,n)}get value(){return this.input.value}set value(e){this.input.value=e}}Ge.HTMLMaskElement=ci;class HA extends ci{get _unsafeSelectionStart(){const e=this.rootElement,n=e.getSelection&&e.getSelection(),r=n&&n.anchorOffset,i=n&&n.focusOffset;return i==null||r==null||r<i?r:i}get _unsafeSelectionEnd(){const e=this.rootElement,n=e.getSelection&&e.getSelection(),r=n&&n.anchorOffset,i=n&&n.focusOffset;return i==null||r==null||r>i?r:i}_unsafeSelect(e,n){if(!this.rootElement.createRange)return;const r=this.rootElement.createRange();r.setStart(this.input.firstChild||this.input,e),r.setEnd(this.input.lastChild||this.input,n);const i=this.rootElement,a=i.getSelection&&i.getSelection();a&&(a.removeAllRanges(),a.addRange(r))}get value(){return this.input.textContent||""}set value(e){this.input.textContent=e}}Ge.HTMLContenteditableMaskElement=HA;class ble{constructor(e,n){this.el=e instanceof uh?e:e.isContentEditable&&e.tagName!=="INPUT"&&e.tagName!=="TEXTAREA"?new HA(e):new Ele(e),this.masked=li(n),this._listeners={},this._value="",this._unmaskedValue="",this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}maskEquals(e){var n;return e==null||((n=this.masked)==null?void 0:n.maskEquals(e))}get mask(){return this.masked.mask}set mask(e){if(this.maskEquals(e))return;if(!(e instanceof Ge.Masked)&&this.masked.constructor===VA(e)){this.masked.updateOptions({mask:e});return}const n=e instanceof Ge.Masked?e:li({mask:e});n.unmaskedValue=this.masked.unmaskedValue,this.masked=n}get value(){return this._value}set value(e){this.value!==e&&(this.masked.value=e,this.updateControl(),this.alignCursor())}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(e){this.unmaskedValue!==e&&(this.masked.unmaskedValue=e,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(e){this.masked.typedValueEquals(e)||(this.masked.typedValue=e,this.updateControl(),this.alignCursor())}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(e,n){const r=this._listeners[e];r&&r.forEach(i=>i(n))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(e){!this.el||!this.el.isActive||(this.el.select(e,e),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value}updateControl(){const e=this.masked.unmaskedValue,n=this.masked.value,r=this.displayValue,i=this.unmaskedValue!==e||this.value!==n;this._unmaskedValue=e,this._value=n,this.el.value!==r&&(this.el.value=r),i&&this._fireChangeEvents()}updateOptions(e){const{mask:n,...r}=e,i=!this.maskEquals(n),a=!Ec(this.masked,r);i&&(this.mask=n),a&&this.masked.updateOptions(r),(i||a)&&this.updateControl()}updateCursor(e){e!=null&&(this.cursorPos=e,this._delayUpdateCursor(e))}_delayUpdateCursor(e){this._abortUpdateCursor(),this._changingCursorPos=e,this._cursorChanging=setTimeout(()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())},10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,Le.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(e,n){return this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(n),this}off(e,n){if(!this._listeners[e])return this;if(!n)return delete this._listeners[e],this;const r=this._listeners[e].indexOf(n);return r>=0&&this._listeners[e].splice(r,1),this}_onInput(e){if(this._inputEvent=e,this._abortUpdateCursor(),!this._selection)return this.updateValue();const n=new hle({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),r=this.masked.rawInputValue,i=this.masked.splice(n.startChangePos,n.removed.length,n.inserted,n.removeDirection,{input:!0,raw:!0}).offset,a=r===this.masked.rawInputValue?n.removeDirection:Le.NONE;let o=this.masked.nearestInputPos(n.startChangePos+i,a);a!==Le.NONE&&(o=this.masked.nearestInputPos(o,Le.NONE)),this.updateControl(),this.updateCursor(o),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(e){e.preventDefault(),e.stopPropagation()}_onFocus(e){this.alignCursorFriendly()}_onClick(e){this.alignCursorFriendly()}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}}Ge.InputMask=ble;class gt{static normalize(e){return Array.isArray(e)?e:[e,new gt]}constructor(e){Object.assign(this,{inserted:"",rawInserted:"",skip:!1,tailShift:0},e)}aggregate(e){return this.rawInserted+=e.rawInserted,this.skip=this.skip||e.skip,this.inserted+=e.inserted,this.tailShift+=e.tailShift,this}get offset(){return this.tailShift+this.inserted.length}}Ge.ChangeDetails=gt;class cr{constructor(e,n,r){e===void 0&&(e=""),n===void 0&&(n=0),this.value=e,this.from=n,this.stop=r}toString(){return this.value}extend(e){this.value+=String(e)}appendTo(e){return e.append(this.toString(),{tail:!0}).aggregate(e._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(e){Object.assign(this,e)}unshift(e){if(!this.value.length||e!=null&&this.from>=e)return"";const n=this.value[0];return this.value=this.value.slice(1),n}shift(){if(!this.value.length)return"";const e=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),e}}class hn{constructor(e){this._value="",this._update({...hn.DEFAULTS,...e}),this._initialized=!0}updateOptions(e){Object.keys(e).length&&this.withValueRefresh(this._update.bind(this,e))}_update(e){Object.assign(this,e)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value}reset(){this._value=""}get value(){return this._value}set value(e){this.resolve(e,{input:!0})}resolve(e,n){n===void 0&&(n={input:!0}),this.reset(),this.append(e,n,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(e){this.resolve(e,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(e){this.format?this.value=this.format(e,this):this.unmaskedValue=String(e)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(e){this.resolve(e,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(e,n){return e}totalInputPositions(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),Math.min(this.displayValue.length,n-e)}extractInput(e,n,r){return e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),this.displayValue.slice(e,n)}extractTail(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),new cr(this.extractInput(e,n),e)}appendTail(e){return wr(e)&&(e=new cr(String(e))),e.appendTo(this)}_appendCharRaw(e,n){return e?(this._value+=e,new gt({inserted:e,rawInserted:e})):new gt}_appendChar(e,n,r){n===void 0&&(n={});const i=this.state;let a;if([e,a]=this.doPrepareChar(e,n),a=a.aggregate(this._appendCharRaw(e,n)),a.inserted){let o,s=this.doValidate(n)!==!1;if(s&&r!=null){const l=this.state;this.overwrite===!0&&(o=r.state,r.unshift(this.displayValue.length-a.tailShift));let c=this.appendTail(r);s=c.rawInserted===r.toString(),!(s&&c.inserted)&&this.overwrite==="shift"&&(this.state=l,o=r.state,r.shift(),c=this.appendTail(r),s=c.rawInserted===r.toString()),s&&c.inserted&&(this.state=l)}s||(a=new gt,this.state=i,r&&o&&(r.state=o))}return a}_appendPlaceholder(){return new gt}_appendEager(){return new gt}append(e,n,r){if(!wr(e))throw new Error("value should be string");const i=wr(r)?new cr(String(r)):r;n!=null&&n.tail&&(n._beforeTailState=this.state);let a;[e,a]=this.doPrepare(e,n);for(let o=0;o<e.length;++o){const s=this._appendChar(e[o],n,i);if(!s.rawInserted&&!this.doSkipInvalid(e[o],n,i))break;a.aggregate(s)}return(this.eager===!0||this.eager==="append")&&n!=null&&n.input&&e&&a.aggregate(this._appendEager()),i!=null&&(a.tailShift+=this.appendTail(i).tailShift),a}remove(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),this._value=this.displayValue.slice(0,e)+this.displayValue.slice(n),new gt}withValueRefresh(e){if(this._refreshing||!this._initialized)return e();this._refreshing=!0;const n=this.rawInputValue,r=this.value,i=e();return this.rawInputValue=n,this.value&&this.value!==r&&r.indexOf(this.value)===0&&this.append(r.slice(this.displayValue.length),{},""),delete this._refreshing,i}runIsolated(e){if(this._isolated||!this._initialized)return e(this);this._isolated=!0;const n=this.state,r=e(this);return this.state=n,delete this._isolated,r}doSkipInvalid(e,n,r){return!!this.skipInvalid}doPrepare(e,n){return n===void 0&&(n={}),gt.normalize(this.prepare?this.prepare(e,this,n):e)}doPrepareChar(e,n){return n===void 0&&(n={}),gt.normalize(this.prepareChar?this.prepareChar(e,this,n):e)}doValidate(e){return(!this.validate||this.validate(this.value,this,e))&&(!this.parent||this.parent.doValidate(e))}doCommit(){this.commit&&this.commit(this.value,this)}splice(e,n,r,i,a){i===void 0&&(i=Le.NONE),a===void 0&&(a={input:!0});const o=e+n,s=this.extractTail(o),l=this.eager===!0||this.eager==="remove";let c;l&&(i=gle(i),c=this.extractInput(0,o,{raw:!0}));let u=e;const d=new gt;if(i!==Le.NONE&&(u=this.nearestInputPos(e,n>1&&e!==0&&!l?Le.NONE:i),d.tailShift=u-e),d.aggregate(this.remove(u)),l&&i!==Le.NONE&&c===this.rawInputValue)if(i===Le.FORCE_LEFT){let p;for(;c===this.rawInputValue&&(p=this.displayValue.length);)d.aggregate(new gt({tailShift:-1})).aggregate(this.remove(p-1))}else i===Le.FORCE_RIGHT&&s.unshift();return d.aggregate(this.append(r,a,s))}maskEquals(e){return this.mask===e}typedValueEquals(e){const n=this.typedValue;return e===n||hn.EMPTY_VALUES.includes(e)&&hn.EMPTY_VALUES.includes(n)||(this.format?this.format(e,this)===this.format(this.typedValue,this):!1)}}hn.DEFAULTS={skipInvalid:!0},hn.EMPTY_VALUES=[void 0,null,""],Ge.Masked=hn;class ui{constructor(e,n){e===void 0&&(e=[]),n===void 0&&(n=0),this.chunks=e,this.from=n}toString(){return this.chunks.map(String).join("")}extend(e){if(!String(e))return;e=wr(e)?new cr(String(e)):e;const n=this.chunks[this.chunks.length-1],r=n&&(n.stop===e.stop||e.stop==null)&&e.from===n.from+n.toString().length;if(e instanceof cr)r?n.extend(e.toString()):this.chunks.push(e);else if(e instanceof ui){if(e.stop==null){let i;for(;e.chunks.length&&e.chunks[0].stop==null;)i=e.chunks.shift(),i.from+=e.from,this.extend(i)}e.toString()&&(e.stop=e.blockIndex,this.chunks.push(e))}}appendTo(e){if(!(e instanceof Ge.MaskedPattern))return new cr(this.toString()).appendTo(e);const n=new gt;for(let r=0;r<this.chunks.length&&!n.skip;++r){const i=this.chunks[r],a=e._mapPosToBlock(e.displayValue.length),o=i.stop;let s;if(o!=null&&(!a||a.index<=o)){if(i instanceof ui||e._stops.indexOf(o)>=0){const l=e._appendPlaceholder(o);n.aggregate(l)}s=i instanceof ui&&e._blocks[o]}if(s){const l=s.appendTail(i);l.skip=!1,n.aggregate(l),e._value+=l.inserted;const c=i.toString().slice(l.rawInserted.length);c&&n.aggregate(e.append(c,{tail:!0}))}else n.aggregate(e.append(i.toString(),{tail:!0}))}return n}get state(){return{chunks:this.chunks.map(e=>e.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(e){const{chunks:n,...r}=e;Object.assign(this,r),this.chunks=n.map(i=>{const a="chunks"in i?new ui:new cr;return a.state=i,a})}unshift(e){if(!this.chunks.length||e!=null&&this.from>=e)return"";const n=e!=null?e-this.from:e;let r=0;for(;r<this.chunks.length;){const i=this.chunks[r],a=i.unshift(n);if(i.toString()){if(!a)break;++r}else this.chunks.splice(r,1);if(a)return a}return""}shift(){if(!this.chunks.length)return"";let e=this.chunks.length-1;for(;0<=e;){const n=this.chunks[e],r=n.shift();if(n.toString()){if(!r)break;--e}else this.chunks.splice(e,1);if(r)return r}return""}}class vle{constructor(e,n){this.masked=e,this._log=[];const{offset:r,index:i}=e._mapPosToBlock(n)||(n<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=r,this.index=i,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(e){Object.assign(this,e)}pushState(){this._log.push(this.state)}popState(){const e=this._log.pop();return e&&(this.state=e),e}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(e){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=((n=this.block)==null?void 0:n.displayValue.length)||0){var n;if(e())return this.ok=!0}return this.ok=!1}_pushRight(e){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(e())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,Le.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,Le.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,Le.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,Le.FORCE_RIGHT),this.offset!==this.block.value.length))return!0})}pushRightBeforeInput(){return this._pushRight(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,Le.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,Le.NONE),!0})}}class zA{constructor(e){Object.assign(this,e),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(e,n){return e===void 0&&(e=0),n===void 0&&(n=this._value.length),this._value=this._value.slice(0,e)+this._value.slice(n),this._value||(this._isRawInput=!1),new gt}nearestInputPos(e,n){n===void 0&&(n=Le.NONE);const r=0,i=this._value.length;switch(n){case Le.LEFT:case Le.FORCE_LEFT:return r;case Le.NONE:case Le.RIGHT:case Le.FORCE_RIGHT:default:return i}}totalInputPositions(e,n){return e===void 0&&(e=0),n===void 0&&(n=this._value.length),this._isRawInput?n-e:0}extractInput(e,n,r){return e===void 0&&(e=0),n===void 0&&(n=this._value.length),r===void 0&&(r={}),r.raw&&this._isRawInput&&this._value.slice(e,n)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(e,n){n===void 0&&(n={});const r=new gt;if(this.isFilled)return r;const i=this.eager===!0||this.eager==="append",o=this.char===e&&(this.isUnmasking||n.input||n.raw)&&(!n.raw||!i)&&!n.tail;return o&&(r.rawInserted=this.char),this._value=r.inserted=this.char,this._isRawInput=o&&(n.raw||n.input),r}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const e=new gt;return this.isFilled||(this._value=e.inserted=this.char),e}extractTail(){return new cr("")}appendTail(e){return wr(e)&&(e=new cr(String(e))),e.appendTo(this)}append(e,n,r){const i=this._appendChar(e[0],n);return r!=null&&(i.tailShift+=this.appendTail(r).tailShift),i}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value,this._isRawInput=!!e._rawInputValue}}class vc{constructor(e){const{parent:n,isOptional:r,placeholderChar:i,displayChar:a,lazy:o,eager:s,...l}=e;this.masked=li(l),Object.assign(this,{parent:n,isOptional:r,placeholderChar:i,displayChar:a,lazy:o,eager:s})}reset(){this.isFilled=!1,this.masked.reset()}remove(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.value.length),e===0&&n>=1?(this.isFilled=!1,this.masked.remove(e,n)):new gt}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return!!this.masked.value||this.isOptional}_appendChar(e,n){if(n===void 0&&(n={}),this.isFilled)return new gt;const r=this.masked.state,i=this.masked._appendChar(e,this.currentMaskFlags(n));return i.inserted&&this.doValidate(n)===!1&&(i.inserted=i.rawInserted="",this.masked.state=r),!i.inserted&&!this.isOptional&&!this.lazy&&!n.input&&(i.inserted=this.placeholderChar),i.skip=!i.inserted&&!this.isOptional,this.isFilled=!!i.inserted,i}append(e,n,r){return this.masked.append(e,this.currentMaskFlags(n),r)}_appendPlaceholder(){const e=new gt;return this.isFilled||this.isOptional||(this.isFilled=!0,e.inserted=this.placeholderChar),e}_appendEager(){return new gt}extractTail(e,n){return this.masked.extractTail(e,n)}appendTail(e){return this.masked.appendTail(e)}extractInput(e,n,r){return e===void 0&&(e=0),n===void 0&&(n=this.value.length),this.masked.extractInput(e,n,r)}nearestInputPos(e,n){n===void 0&&(n=Le.NONE);const r=0,i=this.value.length,a=Math.min(Math.max(e,r),i);switch(n){case Le.LEFT:case Le.FORCE_LEFT:return this.isComplete?a:r;case Le.RIGHT:case Le.FORCE_RIGHT:return this.isComplete?a:i;case Le.NONE:default:return a}}totalInputPositions(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.value.length),this.value.slice(e,n).length}doValidate(e){return this.masked.doValidate(this.currentMaskFlags(e))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(e)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(e){this.masked.state=e.masked,this.isFilled=e.isFilled}currentMaskFlags(e){var n;return{...e,_beforeTailState:(e==null||(n=e._beforeTailState)==null?void 0:n.masked)||(e==null?void 0:e._beforeTailState)}}}vc.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};class Sle extends hn{updateOptions(e){super.updateOptions(e)}_update(e){const n=e.mask;n&&(e.validate=r=>r.search(n)>=0),super._update(e)}}Ge.MaskedRegExp=Sle;class En extends hn{constructor(e){super({...En.DEFAULTS,...e,definitions:Object.assign({},vc.DEFAULT_DEFINITIONS,e==null?void 0:e.definitions)})}updateOptions(e){super.updateOptions(e)}_update(e){e.definitions=Object.assign({},this.definitions,e.definitions),super._update(e),this._rebuildMask()}_rebuildMask(){const e=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const n=this.mask;if(!n||!e)return;let r=!1,i=!1;for(let a=0;a<n.length;++a){if(this.blocks){const c=n.slice(a),u=Object.keys(this.blocks).filter(p=>c.indexOf(p)===0);u.sort((p,f)=>f.length-p.length);const d=u[0];if(d){const{expose:p,...f}=bc(this.blocks[d]),m=li({lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,...f,parent:this});m&&(this._blocks.push(m),p&&(this.exposeBlock=m),this._maskedBlocks[d]||(this._maskedBlocks[d]=[]),this._maskedBlocks[d].push(this._blocks.length-1)),a+=d.length-1;continue}}let o=n[a],s=o in e;if(o===En.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(o==="{"||o==="}"){r=!r;continue}if(o==="["||o==="]"){i=!i;continue}if(o===En.ESCAPE_CHAR){if(++a,o=n[a],!o)break;s=!1}const l=s?new vc({isOptional:i,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...bc(e[o]),parent:this}):new zA({char:o,eager:this.eager,isUnmasking:r});this._blocks.push(l)}}get state(){return{...super.state,_blocks:this._blocks.map(e=>e.state)}}set state(e){const{_blocks:n,...r}=e;this._blocks.forEach((i,a)=>i.state=n[a]),super.state=r}reset(){super.reset(),this._blocks.forEach(e=>e.reset())}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every(e=>e.isComplete)}get isFilled(){return this._blocks.every(e=>e.isFilled)}get isFixed(){return this._blocks.every(e=>e.isFixed)}get isOptional(){return this._blocks.every(e=>e.isOptional)}doCommit(){this._blocks.forEach(e=>e.doCommit()),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce((e,n)=>e+=n.unmaskedValue,"")}set unmaskedValue(e){if(this.exposeBlock){const n=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=e,this.appendTail(n),this.doCommit()}else super.unmaskedValue=e}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((e,n)=>e+=n.value,"")}set value(e){if(this.exposeBlock){const n=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=e,this.appendTail(n),this.doCommit()}else super.value=e}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(e){if(this.exposeBlock){const n=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=e,this.appendTail(n),this.doCommit()}else super.typedValue=e}get displayValue(){return this._blocks.reduce((e,n)=>e+=n.displayValue,"")}appendTail(e){return super.appendTail(e).aggregate(this._appendPlaceholder())}_appendEager(){var e;const n=new gt;let r=(e=this._mapPosToBlock(this.displayValue.length))==null?void 0:e.index;if(r==null)return n;this._blocks[r].isFilled&&++r;for(let i=r;i<this._blocks.length;++i){const a=this._blocks[i]._appendEager();if(!a.inserted)break;n.aggregate(a)}return n}_appendCharRaw(e,n){n===void 0&&(n={});const r=this._mapPosToBlock(this.displayValue.length),i=new gt;if(!r)return i;for(let o=r.index;;++o){var a;const s=this._blocks[o];if(!s)break;const l=s._appendChar(e,{...n,_beforeTailState:(a=n._beforeTailState)==null||(a=a._blocks)==null?void 0:a[o]}),c=l.skip;if(i.aggregate(l),c||l.rawInserted)break}return i}extractTail(e,n){e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length);const r=new ui;return e===n||this._forEachBlocksInRange(e,n,(i,a,o,s)=>{const l=i.extractTail(o,s);l.stop=this._findStopBefore(a),l.from=this._blockStartPos(a),l instanceof ui&&(l.blockIndex=a),r.extend(l)}),r}extractInput(e,n,r){if(e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),r===void 0&&(r={}),e===n)return"";let i="";return this._forEachBlocksInRange(e,n,(a,o,s,l)=>{i+=a.extractInput(s,l,r)}),i}_findStopBefore(e){let n;for(let r=0;r<this._stops.length;++r){const i=this._stops[r];if(i<=e)n=i;else break}return n}_appendPlaceholder(e){const n=new gt;if(this.lazy&&e==null)return n;const r=this._mapPosToBlock(this.displayValue.length);if(!r)return n;const i=r.index,a=e??this._blocks.length;return this._blocks.slice(i,a).forEach(o=>{if(!o.lazy||e!=null){var s;const l=o._appendPlaceholder((s=o._blocks)==null?void 0:s.length);this._value+=l.inserted,n.aggregate(l)}}),n}_mapPosToBlock(e){let n="";for(let r=0;r<this._blocks.length;++r){const i=this._blocks[r],a=n.length;if(n+=i.displayValue,e<=n.length)return{index:r,offset:e-a}}}_blockStartPos(e){return this._blocks.slice(0,e).reduce((n,r)=>n+=r.displayValue.length,0)}_forEachBlocksInRange(e,n,r){n===void 0&&(n=this.displayValue.length);const i=this._mapPosToBlock(e);if(i){const a=this._mapPosToBlock(n),o=a&&i.index===a.index,s=i.offset,l=a&&o?a.offset:this._blocks[i.index].displayValue.length;if(r(this._blocks[i.index],i.index,s,l),a&&!o){for(let c=i.index+1;c<a.index;++c)r(this._blocks[c],c,0,this._blocks[c].displayValue.length);r(this._blocks[a.index],a.index,0,a.offset)}}}remove(e,n){e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length);const r=super.remove(e,n);return this._forEachBlocksInRange(e,n,(i,a,o,s)=>{r.aggregate(i.remove(o,s))}),r}nearestInputPos(e,n){if(n===void 0&&(n=Le.NONE),!this._blocks.length)return 0;const r=new vle(this,e);if(n===Le.NONE)return r.pushRightBeforeInput()||(r.popState(),r.pushLeftBeforeInput())?r.pos:this.displayValue.length;if(n===Le.LEFT||n===Le.FORCE_LEFT){if(n===Le.LEFT){if(r.pushRightBeforeFilled(),r.ok&&r.pos===e)return e;r.popState()}if(r.pushLeftBeforeInput(),r.pushLeftBeforeRequired(),r.pushLeftBeforeFilled(),n===Le.LEFT){if(r.pushRightBeforeInput(),r.pushRightBeforeRequired(),r.ok&&r.pos<=e||(r.popState(),r.ok&&r.pos<=e))return r.pos;r.popState()}return r.ok?r.pos:n===Le.FORCE_LEFT?0:(r.popState(),r.ok||(r.popState(),r.ok)?r.pos:0)}return n===Le.RIGHT||n===Le.FORCE_RIGHT?(r.pushRightBeforeInput(),r.pushRightBeforeRequired(),r.pushRightBeforeFilled()?r.pos:n===Le.FORCE_RIGHT?this.displayValue.length:(r.popState(),r.ok||(r.popState(),r.ok)?r.pos:this.nearestInputPos(e,Le.LEFT))):e}totalInputPositions(e,n){e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length);let r=0;return this._forEachBlocksInRange(e,n,(i,a,o,s)=>{r+=i.totalInputPositions(o,s)}),r}maskedBlock(e){return this.maskedBlocks(e)[0]}maskedBlocks(e){const n=this._maskedBlocks[e];return n?n.map(r=>this._blocks[r]):[]}}En.DEFAULTS={lazy:!0,placeholderChar:"_"},En.STOP_CHAR="`",En.ESCAPE_CHAR="\\",En.InputDefinition=vc,En.FixedDefinition=zA,Ge.MaskedPattern=En;class Sc extends En{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){const{to:n=this.to||0,from:r=this.from||0,maxLength:i=this.maxLength||0,autofix:a=this.autofix,...o}=e;this.to=n,this.from=r,this.maxLength=Math.max(String(n).length,i),this.autofix=a;const s=String(this.from).padStart(this.maxLength,"0"),l=String(this.to).padStart(this.maxLength,"0");let c=0;for(;c<l.length&&l[c]===s[c];)++c;o.mask=l.slice(0,c).replace(/0/g,"\\0")+"0".repeat(this.maxLength-c),super._update(o)}get isComplete(){return super.isComplete&&!!this.value}boundaries(e){let n="",r="";const[,i,a]=e.match(/^(\D*)(\d*)(\D*)/)||[];return a&&(n="0".repeat(i.length)+a,r="9".repeat(i.length)+a),n=n.padEnd(this.maxLength,"0"),r=r.padEnd(this.maxLength,"9"),[n,r]}doPrepareChar(e,n){n===void 0&&(n={});let r;if([e,r]=super.doPrepareChar(e.replace(/\D/g,""),n),!this.autofix||!e)return[e,r];const i=String(this.from).padStart(this.maxLength,"0"),a=String(this.to).padStart(this.maxLength,"0"),o=this.value+e;if(o.length>this.maxLength)return["",r];const[s,l]=this.boundaries(o);return Number(l)<this.from?[i[o.length-1],r]:Number(s)>this.to?this.autofix==="pad"&&o.length<this.maxLength?["",r.aggregate(this.append(i[o.length-1]+e,n))]:[a[o.length-1],r]:[e,r]}doValidate(e){const n=this.value;if(n.search(/[^0]/)===-1&&n.length<=this._matchFrom)return!0;const[i,a]=this.boundaries(n);return this.from<=Number(a)&&Number(i)<=this.to&&super.doValidate(e)}}Ge.MaskedRange=Sc;class di extends En{constructor(e){const{mask:n,pattern:r,...i}={...di.DEFAULTS,...e};super({...i,mask:wr(n)?n:r})}updateOptions(e){super.updateOptions(e)}_update(e){const{mask:n,pattern:r,blocks:i,...a}={...di.DEFAULTS,...e},o=Object.assign({},di.GET_DEFAULT_BLOCKS());e.min&&(o.Y.from=e.min.getFullYear()),e.max&&(o.Y.to=e.max.getFullYear()),e.min&&e.max&&o.Y.from===o.Y.to&&(o.m.from=e.min.getMonth()+1,o.m.to=e.max.getMonth()+1,o.m.from===o.m.to&&(o.d.from=e.min.getDate(),o.d.to=e.max.getDate())),Object.assign(o,this.blocks,i),Object.keys(o).forEach(s=>{const l=o[s];!("autofix"in l)&&"autofix"in e&&(l.autofix=e.autofix)}),super._update({...a,mask:wr(n)?n:r,blocks:o})}doValidate(e){const n=this.date;return super.doValidate(e)&&(!this.isComplete||this.isDateExist(this.value)&&n!=null&&(this.min==null||this.min<=n)&&(this.max==null||n<=this.max))}isDateExist(e){return this.format(this.parse(e,this),this).indexOf(e)>=0}get date(){return this.typedValue}set date(e){this.typedValue=e}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(e){super.typedValue=e}maskEquals(e){return e===Date||super.maskEquals(e)}}di.GET_DEFAULT_BLOCKS=()=>({d:{mask:Sc,from:1,to:31,maxLength:2},m:{mask:Sc,from:1,to:12,maxLength:2},Y:{mask:Sc,from:1900,to:9999}}),di.DEFAULTS={mask:Date,pattern:"d{.}`m{.}`Y",format:(t,e)=>{if(!t)return"";const n=String(t.getDate()).padStart(2,"0"),r=String(t.getMonth()+1).padStart(2,"0"),i=t.getFullYear();return[n,r,i].join(".")},parse:(t,e)=>{const[n,r,i]=t.split(".").map(Number);return new Date(i,r-1,n)}},Ge.MaskedDate=di;class Ko extends hn{constructor(e){super({...Ko.DEFAULTS,...e}),this.currentMask=void 0}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),"mask"in e&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(e.mask)?e.mask.map(n=>{const{expose:r,...i}=bc(n),a=li({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...i});return r&&(this.exposeMask=a),a}):[])}_appendCharRaw(e,n){n===void 0&&(n={});const r=this._applyDispatch(e,n);return this.currentMask&&r.aggregate(this.currentMask._appendChar(e,this.currentMaskFlags(n))),r}_applyDispatch(e,n,r){e===void 0&&(e=""),n===void 0&&(n={}),r===void 0&&(r="");const i=n.tail&&n._beforeTailState!=null?n._beforeTailState._value:this.value,a=this.rawInputValue,o=n.tail&&n._beforeTailState!=null?n._beforeTailState._rawInputValue:a,s=a.slice(o.length),l=this.currentMask,c=new gt,u=l==null?void 0:l.state;if(this.currentMask=this.doDispatch(e,{...n},r),this.currentMask)if(this.currentMask!==l){if(this.currentMask.reset(),o){const d=this.currentMask.append(o,{raw:!0});c.tailShift=d.inserted.length-i.length}s&&(c.tailShift+=this.currentMask.append(s,{raw:!0,tail:!0}).tailShift)}else u&&(this.currentMask.state=u);return c}_appendPlaceholder(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendPlaceholder()),e}_appendEager(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendEager()),e}appendTail(e){const n=new gt;return e&&n.aggregate(this._applyDispatch("",{},e)),n.aggregate(this.currentMask?this.currentMask.appendTail(e):super.appendTail(e))}currentMaskFlags(e){var n,r;return{...e,_beforeTailState:((n=e._beforeTailState)==null?void 0:n.currentMaskRef)===this.currentMask&&((r=e._beforeTailState)==null?void 0:r.currentMask)||e._beforeTailState}}doDispatch(e,n,r){return n===void 0&&(n={}),r===void 0&&(r=""),this.dispatch(e,this,n,r)}doValidate(e){return super.doValidate(e)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(e)))}doPrepare(e,n){n===void 0&&(n={});let[r,i]=super.doPrepare(e,n);if(this.currentMask){let a;[r,a]=super.doPrepare(r,this.currentMaskFlags(n)),i=i.aggregate(a)}return[r,i]}doPrepareChar(e,n){n===void 0&&(n={});let[r,i]=super.doPrepareChar(e,n);if(this.currentMask){let a;[r,a]=super.doPrepareChar(r,this.currentMaskFlags(n)),i=i.aggregate(a)}return[r,i]}reset(){var e;(e=this.currentMask)==null||e.reset(),this.compiledMasks.forEach(n=>n.reset())}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(e){this.exposeMask?(this.exposeMask.value=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=e}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(e){this.exposeMask?(this.exposeMask.unmaskedValue=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=e}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(e){if(this.exposeMask){this.exposeMask.typedValue=e,this.currentMask=this.exposeMask,this._applyDispatch();return}let n=String(e);this.currentMask&&(this.currentMask.typedValue=e,n=this.currentMask.unmaskedValue),this.unmaskedValue=n}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var e;return!!((e=this.currentMask)!=null&&e.isComplete)}get isFilled(){var e;return!!((e=this.currentMask)!=null&&e.isFilled)}remove(e,n){const r=new gt;return this.currentMask&&r.aggregate(this.currentMask.remove(e,n)).aggregate(this._applyDispatch()),r}get state(){var e;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(n=>n.state),currentMaskRef:this.currentMask,currentMask:(e=this.currentMask)==null?void 0:e.state}}set state(e){const{compiledMasks:n,currentMaskRef:r,currentMask:i,...a}=e;n&&this.compiledMasks.forEach((o,s)=>o.state=n[s]),r!=null&&(this.currentMask=r,this.currentMask.state=i),super.state=a}extractInput(e,n,r){return this.currentMask?this.currentMask.extractInput(e,n,r):""}extractTail(e,n){return this.currentMask?this.currentMask.extractTail(e,n):super.extractTail(e,n)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(e,n){return this.currentMask?this.currentMask.nearestInputPos(e,n):super.nearestInputPos(e,n)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(e){this._overwrite=e}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(e){this._eager=e}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(e){this._skipInvalid=e}maskEquals(e){return Array.isArray(e)?this.compiledMasks.every((n,r)=>{if(!e[r])return;const{mask:i,...a}=e[r];return Ec(n,a)&&n.maskEquals(i)}):super.maskEquals(e)}typedValueEquals(e){var n;return!!((n=this.currentMask)!=null&&n.typedValueEquals(e))}}Ko.DEFAULTS=void 0,Ko.DEFAULTS={dispatch:(t,e,n,r)=>{if(!e.compiledMasks.length)return;const i=e.rawInputValue,a=e.compiledMasks.map((o,s)=>{const l=e.currentMask===o,c=l?o.displayValue.length:o.nearestInputPos(o.displayValue.length,Le.FORCE_LEFT);return o.rawInputValue!==i?(o.reset(),o.append(i,{raw:!0})):l||o.remove(c),o.append(t,e.currentMaskFlags(n)),o.appendTail(r),{index:s,weight:o.rawInputValue.length,totalInputPositions:o.totalInputPositions(0,Math.max(c,o.nearestInputPos(o.displayValue.length,Le.FORCE_LEFT)))}});return a.sort((o,s)=>s.weight-o.weight||s.totalInputPositions-o.totalInputPositions),e.compiledMasks[a[0].index]}},Ge.MaskedDynamic=Ko;class yle extends En{constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){const{enum:n,...r}=e;if(n){const i=n.map(s=>s.length),a=Math.min(...i),o=Math.max(...i)-a;r.mask="*".repeat(a),o&&(r.mask+="["+"*".repeat(o)+"]"),this.enum=n}super._update(r)}doValidate(e){return this.enum.some(n=>n.indexOf(this.unmaskedValue)===0)&&super.doValidate(e)}}Ge.MaskedEnum=yle;class Tle extends hn{updateOptions(e){super.updateOptions(e)}_update(e){super._update({...e,validate:e.mask})}}Ge.MaskedFunction=Tle;class Tn extends hn{constructor(e){super({...Tn.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),this._updateRegExps()}_updateRegExps(){const e="^"+(this.allowNegative?"[+|\\-]?":""),n="\\d*",r=(this.scale?"("+ch(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(e+n+r),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(ch).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(ch(this.thousandsSeparator),"g")}_removeThousandsSeparators(e){return e.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(e){const n=e.split(this.radix);return n[0]=n[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),n.join(this.radix)}doPrepareChar(e,n){n===void 0&&(n={});const[r,i]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(n.input&&n.raw||!n.input&&!n.raw)?e.replace(this._mapToRadixRegExp,this.radix):e),n);return e&&!r&&(i.skip=!0),r&&!this.allowPositive&&!this.value&&r!=="-"&&i.aggregate(this._appendChar("-")),[r,i]}_separatorsCount(e,n){n===void 0&&(n=!1);let r=0;for(let i=0;i<e;++i)this._value.indexOf(this.thousandsSeparator,i)===i&&(++r,n&&(e+=this.thousandsSeparator.length));return r}_separatorsCountFromSlice(e){return e===void 0&&(e=this._value),this._separatorsCount(this._removeThousandsSeparators(e).length,!0)}extractInput(e,n,r){return e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),[e,n]=this._adjustRangeWithSeparators(e,n),this._removeThousandsSeparators(super.extractInput(e,n,r))}_appendCharRaw(e,n){if(n===void 0&&(n={}),!this.thousandsSeparator)return super._appendCharRaw(e,n);const r=n.tail&&n._beforeTailState?n._beforeTailState._value:this._value,i=this._separatorsCountFromSlice(r);this._value=this._removeThousandsSeparators(this.value);const a=super._appendCharRaw(e,n);this._value=this._insertThousandsSeparators(this._value);const o=n.tail&&n._beforeTailState?n._beforeTailState._value:this._value,s=this._separatorsCountFromSlice(o);return a.tailShift+=(s-i)*this.thousandsSeparator.length,a.skip=!a.rawInserted&&e===this.thousandsSeparator,a}_findSeparatorAround(e){if(this.thousandsSeparator){const n=e-this.thousandsSeparator.length+1,r=this.value.indexOf(this.thousandsSeparator,n);if(r<=e)return r}return-1}_adjustRangeWithSeparators(e,n){const r=this._findSeparatorAround(e);r>=0&&(e=r);const i=this._findSeparatorAround(n);return i>=0&&(n=i+this.thousandsSeparator.length),[e,n]}remove(e,n){e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),[e,n]=this._adjustRangeWithSeparators(e,n);const r=this.value.slice(0,e),i=this.value.slice(n),a=this._separatorsCount(r.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(r+i));const o=this._separatorsCountFromSlice(r);return new gt({tailShift:(o-a)*this.thousandsSeparator.length})}nearestInputPos(e,n){if(!this.thousandsSeparator)return e;switch(n){case Le.NONE:case Le.LEFT:case Le.FORCE_LEFT:{const r=this._findSeparatorAround(e-1);if(r>=0){const i=r+this.thousandsSeparator.length;if(e<i||this.value.length<=i||n===Le.FORCE_LEFT)return r}break}case Le.RIGHT:case Le.FORCE_RIGHT:{const r=this._findSeparatorAround(e);if(r>=0)return r+this.thousandsSeparator.length}}return e}doValidate(e){let n=!!this._removeThousandsSeparators(this.value).match(this._numberRegExp);if(n){const r=this.number;n=n&&!isNaN(r)&&(this.min==null||this.min>=0||this.min<=this.number)&&(this.max==null||this.max<=0||this.number<=this.max)}return n&&super.doValidate(e)}doCommit(){if(this.value){const e=this.number;let n=e;this.min!=null&&(n=Math.max(n,this.min)),this.max!=null&&(n=Math.min(n,this.max)),n!==e&&(this.unmaskedValue=this.format(n,this));let r=this.value;this.normalizeZeros&&(r=this._normalizeZeros(r)),this.padFractionalZeros&&this.scale>0&&(r=this._padFractionalZeros(r)),this._value=r}super.doCommit()}_normalizeZeros(e){const n=this._removeThousandsSeparators(e).split(this.radix);return n[0]=n[0].replace(/^(\D*)(0*)(\d*)/,(r,i,a,o)=>i+o),e.length&&!/\d$/.test(n[0])&&(n[0]=n[0]+"0"),n.length>1&&(n[1]=n[1].replace(/0*$/,""),n[1].length||(n.length=1)),this._insertThousandsSeparators(n.join(this.radix))}_padFractionalZeros(e){if(!e)return e;const n=e.split(this.radix);return n.length<2&&n.push(""),n[1]=n[1].padEnd(this.scale,"0"),n.join(this.radix)}doSkipInvalid(e,n,r){n===void 0&&(n={});const i=this.scale===0&&e!==this.thousandsSeparator&&(e===this.radix||e===Tn.UNMASKED_RADIX||this.mapToRadix.includes(e));return super.doSkipInvalid(e,n,r)&&!i}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,Tn.UNMASKED_RADIX)}set unmaskedValue(e){super.unmaskedValue=e}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(e){this.rawInputValue=this.format(e,this).replace(Tn.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(e){this.typedValue=e}get allowNegative(){return this.min!=null&&this.min<0||this.max!=null&&this.max<0}get allowPositive(){return this.min!=null&&this.min>0||this.max!=null&&this.max>0}typedValueEquals(e){return(super.typedValueEquals(e)||Tn.EMPTY_VALUES.includes(e)&&Tn.EMPTY_VALUES.includes(this.typedValue))&&!(e===0&&this.value==="")}}Tn.UNMASKED_RADIX=".",Tn.EMPTY_VALUES=[...hn.EMPTY_VALUES,0],Tn.DEFAULTS={mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[Tn.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:t=>t.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})},Ge.MaskedNumber=Tn;const dh={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function WA(t,e,n){e===void 0&&(e=dh.MASKED),n===void 0&&(n=dh.MASKED);const r=li(t);return i=>r.runIsolated(a=>(a[e]=i,a[n]))}function Cle(t,e,n,r){return WA(e,n,r)(t)}Ge.PIPE_TYPE=dh,Ge.createPipe=WA,Ge.pipe=Cle;try{globalThis.IMask=Ge}catch{}const jA={mask:ee.oneOfType([ee.array,ee.func,ee.string,ee.instanceOf(RegExp),ee.oneOf([Date,Number,Ge.Masked]),ee.instanceOf(Ge.Masked)]),value:ee.any,unmask:ee.oneOfType([ee.bool,ee.oneOf(["typed"])]),prepare:ee.func,prepareChar:ee.func,validate:ee.func,commit:ee.func,overwrite:ee.oneOfType([ee.bool,ee.oneOf(["shift"])]),eager:ee.oneOfType([ee.bool,ee.oneOf(["append","remove"])]),skipInvalid:ee.bool,onAccept:ee.func,onComplete:ee.func,placeholderChar:ee.string,displayChar:ee.string,lazy:ee.bool,definitions:ee.object,blocks:ee.object,enum:ee.arrayOf(ee.string),maxLength:ee.number,from:ee.number,to:ee.number,pattern:ee.string,format:ee.func,parse:ee.func,autofix:ee.oneOfType([ee.bool,ee.oneOf(["pad"])]),radix:ee.string,thousandsSeparator:ee.string,mapToRadix:ee.arrayOf(ee.string),scale:ee.number,normalizeZeros:ee.bool,padFractionalZeros:ee.bool,min:ee.oneOfType([ee.number,ee.instanceOf(Date)]),max:ee.oneOfType([ee.number,ee.instanceOf(Date)]),dispatch:ee.func,inputRef:ee.oneOfType([ee.func,ee.shape({current:ee.object})])},KA=Object.keys(jA).filter(t=>t!=="value"),Ole=["value","unmask","onAccept","onComplete","inputRef"],Rle=KA.filter(t=>Ole.indexOf(t)<0);function Nle(t){var e;const n=(e=class extends O.Component{constructor(a){super(a),this._inputRef=this._inputRef.bind(this)}componentDidMount(){this.props.mask&&this.initMask()}componentDidUpdate(){const a=this.props,o=this._extractMaskOptionsFromProps(a);if(o.mask)this.maskRef?(this.maskRef.updateOptions(o),"value"in a&&a.value!==void 0&&(this.maskValue=a.value)):this.initMask(o);else if(this.destroyMask(),"value"in a&&a.value!==void 0){var s;(s=this.element)!=null&&s.isContentEditable&&this.element.tagName!=="INPUT"&&this.element.tagName!=="TEXTAREA"?this.element.textContent=a.value:this.element.value=a.value}}componentWillUnmount(){this.destroyMask()}_inputRef(a){this.element=a,this.props.inputRef&&(Object.prototype.hasOwnProperty.call(this.props.inputRef,"current")?this.props.inputRef.current=a:this.props.inputRef(a))}initMask(a){a===void 0&&(a=this._extractMaskOptionsFromProps(this.props)),this.maskRef=Ge(this.element,a).on("accept",this._onAccept.bind(this)).on("complete",this._onComplete.bind(this)),"value"in this.props&&this.props.value!==void 0&&(this.maskValue=this.props.value)}destroyMask(){this.maskRef&&(this.maskRef.destroy(),delete this.maskRef)}_extractMaskOptionsFromProps(a){const{...o}=a;return Object.keys(o).filter(s=>Rle.indexOf(s)<0).forEach(s=>{delete o[s]}),o}_extractNonMaskProps(a){const{...o}=a;return KA.forEach(s=>{delete o[s]}),"defaultValue"in o||(o.defaultValue=a.mask?"":o.value),delete o.value,o}get maskValue(){return this.maskRef?this.props.unmask==="typed"?this.maskRef.typedValue:this.props.unmask?this.maskRef.unmaskedValue:this.maskRef.value:""}set maskValue(a){this.maskRef&&(a=a==null&&this.props.unmask!=="typed"?"":a,this.props.unmask==="typed"?this.maskRef.typedValue=a:this.props.unmask?this.maskRef.unmaskedValue=a:this.maskRef.value=a)}_onAccept(a){this.props.onAccept&&this.maskRef&&this.props.onAccept(this.maskValue,this.maskRef,a)}_onComplete(a){this.props.onComplete&&this.maskRef&&this.props.onComplete(this.maskValue,this.maskRef,a)}render(){return O.createElement(t,{...this._extractNonMaskProps(this.props),inputRef:this._inputRef})}},e.displayName=void 0,e.propTypes=void 0,e),r=t.displayName||t.name||"Component";return n.displayName="IMask("+r+")",n.propTypes=jA,O.forwardRef((i,a)=>O.createElement(n,{...i,ref:a}))}const Ale=Nle(t=>{let{inputRef:e,...n}=t;return O.createElement("input",{...n,ref:e})}),xle=(t,e)=>O.createElement(Ale,{...t,ref:e});O.forwardRef(xle);function Ile(t,e){let{onAccept:n,onComplete:r}=e===void 0?{}:e;const i=O.useRef(null),a=O.useRef(null),[o,s]=O.useState(!1),[l,c]=O.useState({}),[u,d]=O.useState(""),[p,f]=O.useState(""),[m,_]=O.useState(),g=O.useCallback(()=>{var v;o&&((v=a.current)==null||v.destroy(),a.current=null)},[]),h=O.useCallback(v=>{const b=a.current;b&&(c({value:b.value,unmaskedValue:b.unmaskedValue,typedValue:b.typedValue}),_(b.typedValue),f(b.unmaskedValue),d(b.value),n==null||n(b.value,b,v))},[n]),E=O.useCallback(()=>a.current&&(r==null?void 0:r(a.current.value,a.current)),[r]);return O.useEffect(()=>{const v=i.current;if(!v||!(t!=null&&t.mask))return g();const b=a.current;b?b==null||b.updateOptions(t):v&&t!=null&&t.mask&&(a.current=Ge(v,t),h()),s(!!a.current)},[t,g,h]),O.useEffect(()=>{if(!a.current)return;const v=a.current;return v.on("accept",h),v.on("complete",E),()=>{v.off("accept",h),v.off("complete",E)}},[h,E]),O.useEffect(()=>{const{value:v,...b}=l,S=a.current;S&&o&&(v!==u&&(S.value=u),c(b))},[u]),O.useEffect(()=>{const{unmaskedValue:v,...b}=l,S=a.current;S&&o&&(v!==p&&(S.unmaskedValue=p),c(b))},[p]),O.useEffect(()=>{const{typedValue:v,...b}=l,S=a.current;S&&o&&(v!==m&&(S.typedValue=m),c(b))},[m]),O.useEffect(()=>g,[g]),{ref:i,maskRef:a,value:u,setValue:d,unmaskedValue:p,setUnmaskedValue:f,typedValue:m,setTypedValue:_}}const ph=O.forwardRef(({name:t,value:e,mask:n,onChange:r,...i},a)=>{const{ref:o,unmaskedValue:s,value:l,maskRef:c}=Ile({mask:n});return O.useEffect(()=>{c.current.value=e||""},[c,e]),O.useEffect(()=>{r({target:{name:t,value:s||e||""}})},[t,s,e]),N.jsx(Q.TextField,{inputRef:a,inputProps:{ref:o},name:t,value:l,onChange:()=>r({target:{name:t,value:s}}),...i})});ph.displayName="MaskedInput";function wle(t){let e;switch(t){case"top-left":e={style:{ml:-.75},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}};break;case"top-center":e={style:{},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}};break;case"top-right":e={style:{ml:.75},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}};break;case"bottom-left":e={style:{ml:-.75},anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"left"}};break;case"bottom-center":e={style:{},anchorOrigin:{vertical:"top",horizontal:"center"},transformOrigin:{vertical:"bottom",horizontal:"center"}};break;case"bottom-right":e={style:{ml:.75},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"right"}};break;case"left-top":e={style:{mt:-.75},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"}};break;case"left-center":e={anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"}};break;case"left-bottom":e={style:{mt:.75},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"left"}};break;case"right-top":e={style:{mt:-.75},anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"right"}};break;case"right-center":e={anchorOrigin:{vertical:"center",horizontal:"left"},transformOrigin:{vertical:"center",horizontal:"right"}};break;case"right-bottom":e={style:{mt:.75},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"right"}};break;default:e={style:{ml:.75},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}}}return e}const Dle=qt("span")(({arrow:t,theme:e})=>{const i=`solid 1px ${Ee(e.palette.grey[500],.12)}`,a={borderRadius:"0 0 3px 0",top:-6,borderBottom:i,borderRight:i},o={borderRadius:"3px 0 0 0",bottom:-6,borderTop:i,borderLeft:i},s={borderRadius:"0 3px 0 0",left:-6,borderTop:i,borderRight:i},l={borderRadius:"0 0 0 3px",right:-6,borderBottom:i,borderLeft:i};return{display:"none",[e.breakpoints.up("sm")]:{zIndex:1,width:12,height:12,content:'""',display:"block",position:"absolute",transform:"rotate(-135deg)",background:e.palette.background.paper},...t==="top-left"&&{...a,left:20},...t==="top-center"&&{...a,left:0,right:0,margin:"auto"},...t==="top-right"&&{...a,right:20},...t==="bottom-left"&&{...o,left:20},...t==="bottom-center"&&{...o,left:0,right:0,margin:"auto"},...t==="bottom-right"&&{...o,right:20},...t==="left-top"&&{...s,top:20},...t==="left-center"&&{...s,top:0,bottom:0,margin:"auto"},...t==="left-bottom"&&{...s,bottom:20},...t==="right-top"&&{...l,top:20},...t==="right-center"&&{...l,top:0,bottom:0,margin:"auto"},...t==="right-bottom"&&{...l,bottom:20}}}),Mle=({open:t,children:e,arrow:n="top-right",disabledArrow:r,sx:i,...a})=>{const{style:o,anchorOrigin:s,transformOrigin:l}=wle(n);return N.jsxs(Q.Popover,{open:!!t,anchorEl:t,anchorOrigin:s,transformOrigin:l,PaperProps:{sx:{p:1,width:"auto",overflow:"inherit",...o,"& .MuiMenuItem-root":{px:1,typography:"body2",borderRadius:.75,"& svg":{mr:2,width:20,height:20,flexShrink:0}},...i}},...a,children:[!r&&N.jsx(Dle,{arrow:n}),e]})},Lle=Q.styled(Q.Stack)(({theme:t})=>({flexDirection:"row",alignItems:"center",justifyContent:"space-between",borderBottom:`1px solid ${t.palette.grey[300]}`,button:{marginRight:24}})),Ple=Q.styled(Q.DialogContent)({padding:"24px !important"}),kle=Q.styled(Q.DialogActions)(({theme:t})=>({borderTop:`1px solid ${t.palette.grey[300]}`,backgroundColor:t.palette.grey[50]})),Fle=({actions:t,actionsProps:e,children:n,dialogContentProps:r,dialogTitle:i,dialogTitleProps:a,onClose:o,...s})=>N.jsxs(Q.Dialog,{scroll:"body",...s,onClose:o,children:[N.jsxs(Lle,{children:[i&&N.jsx(Q.DialogTitle,{variant:"subtitle1",...a,children:i}),N.jsx(Q.IconButton,{onClick:o,children:N.jsx(Lt,{icon:"ic:round-close"})})]}),N.jsx(Ple,{...r,children:n}),t&&N.jsx(kle,{sx:{borderTop:"1px solid",borderColor:"grey.300",backgroundColor:"grey.50"},...e,children:t})]}),Ble=({children:t,container:e})=>Jo.createPortal(t,document.getElementById(e)||document.body),Ule=({onSearch:t,onChange:e,trigger:n="click",iconPosition:r="end",...i})=>{const a=O.useRef(null),o=N.jsx(Q.InputAdornment,{position:r,children:N.jsx(Q.IconButton,{color:"inherit",onClick:()=>{var s;t((s=a.current)==null?void 0:s.value)},children:N.jsx(Lt,{icon:"eva:search-fill",sx:{width:20,height:20}})})});return N.jsx(Q.TextField,{inputRef:a,InputProps:{onKeyDown:s=>{var l;s.key==="Enter"&&t((l=a.current)==null?void 0:l.value)},...r==="start"?{startAdornment:o}:{endAdornment:o}},onChange:s=>{if(n==="change"){t(s.target.value);return}s.target.value===""&&t(""),e&&e(s)},...i})},Gle=Q.styled(Q.StepConnector)(({theme:t})=>({top:10,left:"calc(-50% + 20px)",right:"calc(50% + 20px)","& .MuiStepConnector-line":{borderTopWidth:2,borderColor:t.palette.divider},"&.Mui-active, &.Mui-completed":{"& .MuiStepConnector-line":{borderColor:t.palette.primary.main}}})),$le=({active:t,completed:e})=>N.jsx(Q.Stack,{alignItems:"center",justifyContent:"center",sx:{width:24,height:24,color:"text.disabled",...t&&{color:"primary.main"}},children:e?N.jsx(Lt,{icon:"eva:checkmark-fill",sx:{color:"primary.main"}}):N.jsx(Q.Box,{sx:{width:8,height:8,borderRadius:"50%",backgroundColor:"currentColor"}})}),qle=({steps:t,activeStep:e,showLabels:n=!0,sx:r,...i})=>N.jsx(Q.Stepper,{alternativeLabel:!0,activeStep:e,connector:N.jsx(Gle,{}),sx:r,...i,children:t.map(a=>N.jsx(Q.Step,{children:N.jsx(Q.StepLabel,{StepIconComponent:$le,sx:{"& .MuiStepLabel-label":{typography:"subtitle2"}},children:n&&a})},a))}),Yle=({children:t,value:e,index:n})=>N.jsx(Q.Box,{role:"tabpanel",id:`simple-tabpanel-${n}`,"aria-labelledby":`simple-tab-${n}`,sx:{mt:3,...e.toString()!==n.toString()&&{position:"absolute",width:"100%",height:0,overflow:"hidden",visibility:"hidden"}},children:t}),Vle=({name:t,helperText:e,rules:n,...r})=>{const{control:i}=rt.useFormContext();return N.jsx(rt.Controller,{name:t,control:i,rules:n,render:({field:a,fieldState:{error:o}})=>N.jsx(Pd,{...a,...r,onChange:s=>a.onChange(s),error:!!o,helperText:(o==null?void 0:o.message)||e})})},Hle=({name:t,helperText:e,...n})=>{const{control:r}=rt.useFormContext();return N.jsx(rt.Controller,{name:t,control:r,render:({field:i,fieldState:{error:a}})=>N.jsxs("div",{children:[N.jsx(Q.FormControlLabel,{control:N.jsx(Q.Checkbox,{...i,checked:i.value}),...n}),(!!a||e)&&N.jsx(Q.FormHelperText,{error:!!a,children:a?a==null?void 0:a.message:e})]})})},zle=({row:t,name:e,label:n,options:r,spacing:i,helperText:a,...o})=>{const{control:s}=rt.useFormContext(),l=(c,u)=>c.includes(u)?c.filter(d=>d!==u):[...c,u];return N.jsx(rt.Controller,{name:e,control:s,render:({field:c,fieldState:{error:u}})=>N.jsxs(Q.FormControl,{component:"fieldset",children:[n&&N.jsx(Q.FormLabel,{component:"legend",sx:{typography:"body2"},children:n}),N.jsx(Q.FormGroup,{sx:{...t&&{flexDirection:"row"},"& .MuiFormControlLabel-root":{"&:not(:last-of-type)":{mb:i||0},...t&&{mr:0,"&:not(:last-of-type)":{mr:i||2}}}},children:r.map(d=>N.jsx(Q.FormControlLabel,{control:N.jsx(Q.Checkbox,{checked:c.value.includes(d.value),onChange:()=>c.onChange(l(c.value,d.value))}),label:d.label,...o},d.value))}),(!!u||a)&&N.jsx(Q.FormHelperText,{error:!!u,sx:{mx:0},children:u?u==null?void 0:u.message:a})]})})},Wle=typeof window<"u"?O.useLayoutEffect:O.useEffect;function QA(t,e,n,r){const i=O.useRef(e);Wle(()=>{i.current=e},[e]),O.useEffect(()=>{const a=(n==null?void 0:n.current)||window;if(!(a&&a.addEventListener))return;const o=s=>i.current(s);return a.addEventListener(t,o,r),()=>{a.removeEventListener(t,o)}},[t,n,r])}const jle=({keyName:t,inputs:e=[],rules:n,...r})=>{const i=O.useRef(null),{control:a,setValue:o,formState:{errors:s}}=rt.useFormContext(),l=d=>{const p=d.clipboardData.getData("text").split("");e.map((f,m)=>o(f,p[m])),d.preventDefault()},c=(d,p)=>{const{maxLength:f,value:m,name:_}=d.target,g=_.replace(t,""),h=Number(g),E=document.querySelector(`input[name=${t}${h+1}]`);m.length>f&&(d.target.value=m[0]),m.length>=f&&h<6&&E!==null&&E.focus(),p(d)};QA("paste",l,i);const u=e.some(d=>s[d]);return N.jsxs(Q.Stack,{children:[N.jsx(Q.Stack,{direction:"row",spacing:2,justifyContent:"center",ref:i,children:e.map((d,p)=>N.jsx(rt.Controller,{name:`${t}${p+1}`,control:a,rules:n,render:({field:f,fieldState:{error:m}})=>N.jsx(Q.TextField,{...r,...f,autoComplete:"none",error:!!m,autoFocus:p===0,placeholder:"-",onChange:_=>{c(_,f.onChange)},onFocus:_=>_.currentTarget.select(),InputProps:{sx:{width:{xs:36,sm:56},height:{xs:36,sm:56},"& input":{p:0,textAlign:"center"}}},inputProps:{maxLength:1,type:"number"}})},d))}),u&&N.jsx(Q.FormHelperText,{error:!0,sx:{px:2},children:"Código é obrigatório"})]})},Kle=({name:t,rules:e,helperText:n,...r})=>{const{control:i}=rt.useFormContext();return N.jsx(rt.Controller,{name:t,control:i,rules:e,render:({field:{ref:a,onChange:o,...s},fieldState:{error:l}})=>N.jsx(hC,{...s,onChangeColor:o,inputRef:a,fullWidth:!0,error:!!l,helperText:(l==null?void 0:l.message)||n,...r})})},Qle=({name:t,rules:e,...n})=>{const{control:r}=rt.useFormContext();return N.jsx(rt.Controller,{name:t,control:r,rules:e,render:({field:{ref:i,...a},fieldState:{error:o}})=>{var s;return N.jsx(Ma.DatePicker,{inputRef:i,format:"dd/MM/yyyy",localeText:{previousMonth:"Mês anterior",nextMonth:"Próximo mês",fieldDayPlaceholder:()=>"dd",fieldMonthPlaceholder:()=>"mm",fieldYearPlaceholder:()=>"aaaa",...n.localeText},...a,...n,value:a.value?new Date(a.value):null,slotProps:{textField:{...(s=n.slotProps)==null?void 0:s.textField,error:!!o,helperText:o==null?void 0:o.message,autoComplete:"off",spellCheck:"false",fullWidth:!0}}})}})},Xle=({name:t,label:e,rules:n,...r})=>{const{control:i,setError:a}=rt.useFormContext();return N.jsx(rt.Controller,{name:t,control:i,rules:n,render:({field:{value:o,onChange:s},fieldState:{error:l}})=>N.jsx(Ma.DateRangePicker,{format:"dd/MM/yyyy",localeText:{previousMonth:"Mês anterior",nextMonth:"Próximo mês",fieldDayPlaceholder:()=>"dd",fieldMonthPlaceholder:()=>"mm",fieldYearPlaceholder:()=>"aaaa",...r.localeText},value:[(o==null?void 0:o.startDate)||null,(o==null?void 0:o.endDate)||null],onChange:c=>s({startDate:c[0],endDate:c[1]}),onError:c=>{a(t,{message:c[0]||c[1]||void 0})},...r,slotProps:{textField:({position:c})=>{var u;return{...(u=r.slotProps)==null?void 0:u.textField,error:!!l,helperText:l==null?void 0:l.message,autoComplete:"off",spellCheck:"false",fullWidth:!0,label:c==="start"?`${e} (Dt. Início)`:`${e} (Dt. Fim)`}}},sx:{width:1}})})},Zle=({name:t,rules:e,...n})=>{const{control:r}=rt.useFormContext();return N.jsx(rt.Controller,{name:t,control:r,rules:e,render:({field:{ref:i,...a},fieldState:{error:o}})=>{var s;return N.jsx(Ma.DateTimePicker,{format:"dd/MM/yyyy HH:mm",inputRef:i,localeText:{previousMonth:"Mês anterior",nextMonth:"Próximo mês",fieldDayPlaceholder:()=>"dd",fieldMonthPlaceholder:()=>"mm",fieldYearPlaceholder:()=>"aaaa",fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",...n.localeText},...a,...n,value:a.value?new Date(a.value):null,slotProps:{textField:{...(s=n.slotProps)==null?void 0:s.textField,error:!!o,helperText:o==null?void 0:o.message,autoComplete:"off",spellCheck:"false",fullWidth:!0}}})}})},Jle=({name:t,helperText:e,rules:n,...r})=>{const{control:i}=rt.useFormContext();return N.jsx(rt.Controller,{name:t,control:i,rules:n,render:({field:{name:a,onBlur:o,onChange:s,value:l},fieldState:{error:c}})=>N.jsx(TA,{id:`quill${a}`,onBlur:o,onChange:(u,d,p,f)=>s(f.getLength()===1?"":u),value:l,error:!!c,helperText:(c==null?void 0:c.message)||e,...r})})},XA=({name:t,helperText:e,rules:n,...r})=>{const{control:i}=rt.useFormContext();return N.jsx(rt.Controller,{name:t,control:i,rules:n,render:({field:{ref:a,...o},fieldState:{error:s}})=>N.jsx(Q.TextField,{...o,inputRef:a,fullWidth:!0,error:!!s,helperText:(s==null?void 0:s.message)||e,...r})})},ece=({id:t,children:e,onSubmit:n,methods:r})=>N.jsx(rt.FormProvider,{...r,children:N.jsx(Q.Stack,{component:"form",id:t,onSubmit:n,flex:1,width:1,noValidate:!0,children:e})}),tce=({name:t,helperText:e,rules:n,...r})=>{const{control:i}=rt.useFormContext();return N.jsx(rt.Controller,{name:t,control:i,rules:n,render:({field:{name:a,onChange:o,value:s,ref:l},fieldState:{error:c}})=>N.jsx(ph,{ref:l,...r,name:a,value:s,error:!!c,helperText:(c==null?void 0:c.message)||e,onChange:({target:{value:u}})=>o(u)})})},nce=t=>{const[e,n]=O.useState(!1);return N.jsx(XA,{...t,type:e?"text":"password",InputProps:{endAdornment:N.jsx(Q.InputAdornment,{position:"end",children:N.jsx(Q.IconButton,{onClick:()=>n(!e),edge:"end","aria-label":"Mostrar/Ocultar senha",children:N.jsx(Lt,{icon:e?"eva:eye-off-fill":"eva:eye-fill"})})})}})},rce=({name:t,rules:e,row:n,label:r,options:i,spacing:a,helperText:o,...s})=>{const{control:l}=rt.useFormContext(),c=r?`${t}-${r}`:"";return N.jsx(rt.Controller,{name:t,control:l,rules:e,render:({field:u,fieldState:{error:d}})=>N.jsxs(Q.FormControl,{component:"fieldset",children:[r&&N.jsx(Q.FormLabel,{component:"legend",id:c,sx:{typography:"body2"},children:r}),N.jsx(Q.RadioGroup,{...u,"aria-labelledby":c,row:n,...s,children:i.map(p=>N.jsx(Q.FormControlLabel,{value:p.value,control:N.jsx(Q.Radio,{}),label:p.label,sx:{"&:not(:last-of-type)":{mb:a||0},...n&&{mr:0,"&:not(:last-of-type)":{mr:a||2}}}},p.value))}),(!!d||o)&&N.jsx(Q.FormHelperText,{error:!!d,sx:{mx:0},children:d?d==null?void 0:d.message:o})]})})},ice=({name:t,helperText:e,...n})=>{const{control:r}=rt.useFormContext();return N.jsx(rt.Controller,{name:t,control:r,render:({field:i,fieldState:{error:a}})=>N.jsxs("div",{children:[N.jsx(Q.FormControlLabel,{control:N.jsx(Q.Switch,{...i,checked:i.value}),...n}),(!!a||e)&&N.jsx(Q.FormHelperText,{error:!!a,children:a?a==null?void 0:a.message:e})]})})},ace=({name:t,rules:e,...n})=>{const{control:r}=rt.useFormContext();return N.jsx(rt.Controller,{name:t,control:r,rules:e,render:({field:{ref:i,...a},fieldState:{error:o}})=>{var s;return N.jsx(Ma.TimePicker,{ampm:!1,format:"HH:mm",inputRef:i,localeText:{fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",...n.localeText},...a,...n,value:a.value?new Date(a.value):null,slotProps:{textField:{...(s=n.slotProps)==null?void 0:s.textField,error:!!o,helperText:o==null?void 0:o.message,autoComplete:"off",spellCheck:"false",fullWidth:!0}}})}})},oce=t=>new Promise((e,n)=>{const r=new Image;r.addEventListener("load",()=>e(r)),r.addEventListener("error",i=>n(i)),r.setAttribute("crossOrigin","anonymous"),r.src=t});function ZA(t){return t*Math.PI/180}function sce(t,e,n){const r=ZA(n);return{width:Math.abs(Math.cos(r)*t)+Math.abs(Math.sin(r)*e),height:Math.abs(Math.sin(r)*t)+Math.abs(Math.cos(r)*e)}}async function lce(t,e,n=0,r={horizontal:!1,vertical:!1}){const i=await oce(t),a=document.createElement("canvas"),o=a.getContext("2d");if(!o)return null;const s=ZA(n),{width:l,height:c}=sce(i.width,i.height,n);a.width=l,a.height=c,o.translate(l/2,c/2),o.rotate(s),o.scale(r.horizontal?-1:1,r.vertical?-1:1),o.translate(-i.width/2,-i.height/2),o.drawImage(i,0,0);const u=o.getImageData(e.x,e.y,e.width,e.height);return a.width=e.width,a.height=e.height,o.putImageData(u,0,0),new Promise((d,p)=>{a.toBlob(f=>{d(f)},"image/png")})}function xa(t,e,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{c(r.next(u))}catch(d){o(d)}}function l(u){try{c(r.throw(u))}catch(d){o(d)}}function c(u){u.done?a(u.value):i(u.value).then(s,l)}c((r=r.apply(t,e||[])).next())})}function Ia(t,e){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(c){return function(u){return l([c,u])}}function l(c){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(n=0)),n;)try{if(r=1,i&&(a=c[0]&2?i.return:c[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,c[1])).done)return a;switch(i=0,a&&(c=[c[0]&2,a.value]),c[0]){case 0:case 1:a=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]<a[3])){n.label=c[1];break}if(c[0]===6&&n.label<a[1]){n.label=a[1],a=c;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(c);break}a[2]&&n.ops.pop(),n.trys.pop();continue}c=e.call(t,n)}catch(u){c=[6,u],i=0}finally{r=a=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function JA(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,a=[],o;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function ex(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,a;r<i;r++)(a||!(r in e))&&(a||(a=Array.prototype.slice.call(e,0,r)),a[r]=e[r]);return t.concat(a||Array.prototype.slice.call(e))}typeof SuppressedError=="function"&&SuppressedError;var cce=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function Qo(t,e){var n=uce(t);if(typeof n.path!="string"){var r=t.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof e=="string"?e:typeof r=="string"&&r.length>0?r:t.name,writable:!1,configurable:!1,enumerable:!0})}return n}function uce(t){var e=t.name,n=e&&e.lastIndexOf(".")!==-1;if(n&&!t.type){var r=e.split(".").pop().toLowerCase(),i=cce.get(r);i&&Object.defineProperty(t,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return t}var dce=[".DS_Store","Thumbs.db"];function pce(t){return xa(this,void 0,void 0,function(){return Ia(this,function(e){return yc(t)&&fce(t.dataTransfer)?[2,hce(t.dataTransfer,t.type)]:_ce(t)?[2,mce(t)]:Array.isArray(t)&&t.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,gce(t)]:[2,[]]})})}function fce(t){return yc(t)}function _ce(t){return yc(t)&&yc(t.target)}function yc(t){return typeof t=="object"&&t!==null}function mce(t){return fh(t.target.files).map(function(e){return Qo(e)})}function gce(t){return xa(this,void 0,void 0,function(){var e;return Ia(this,function(n){switch(n.label){case 0:return[4,Promise.all(t.map(function(r){return r.getFile()}))];case 1:return e=n.sent(),[2,e.map(function(r){return Qo(r)})]}})})}function hce(t,e){return xa(this,void 0,void 0,function(){var n,r;return Ia(this,function(i){switch(i.label){case 0:return t.items?(n=fh(t.items).filter(function(a){return a.kind==="file"}),e!=="drop"?[2,n]:[4,Promise.all(n.map(Ece))]):[3,2];case 1:return r=i.sent(),[2,tx(nx(r))];case 2:return[2,tx(fh(t.files).map(function(a){return Qo(a)}))]}})})}function tx(t){return t.filter(function(e){return dce.indexOf(e.name)===-1})}function fh(t){if(t===null)return[];for(var e=[],n=0;n<t.length;n++){var r=t[n];e.push(r)}return e}function Ece(t){if(typeof t.webkitGetAsEntry!="function")return rx(t);var e=t.webkitGetAsEntry();return e&&e.isDirectory?ix(e):rx(t)}function nx(t){return t.reduce(function(e,n){return ex(ex([],JA(e),!1),JA(Array.isArray(n)?nx(n):[n]),!1)},[])}function rx(t){var e=t.getAsFile();if(!e)return Promise.reject("".concat(t," is not a File"));var n=Qo(e);return Promise.resolve(n)}function bce(t){return xa(this,void 0,void 0,function(){return Ia(this,function(e){return[2,t.isDirectory?ix(t):vce(t)]})})}function ix(t){var e=t.createReader();return new Promise(function(n,r){var i=[];function a(){var o=this;e.readEntries(function(s){return xa(o,void 0,void 0,function(){var l,c,u;return Ia(this,function(d){switch(d.label){case 0:if(s.length)return[3,5];d.label=1;case 1:return d.trys.push([1,3,,4]),[4,Promise.all(i)];case 2:return l=d.sent(),n(l),[3,4];case 3:return c=d.sent(),r(c),[3,4];case 4:return[3,6];case 5:u=Promise.all(s.map(bce)),i.push(u),a(),d.label=6;case 6:return[2]}})})},function(s){r(s)})}a()})}function vce(t){return xa(this,void 0,void 0,function(){return Ia(this,function(e){return[2,new Promise(function(n,r){t.file(function(i){var a=Qo(i,t.fullPath);n(a)},function(i){r(i)})})]})})}var Sce=function(t,e){if(t&&e){var n=Array.isArray(e)?e:e.split(","),r=t.name||"",i=(t.type||"").toLowerCase(),a=i.replace(/\/.*$/,"");return n.some(function(o){var s=o.trim().toLowerCase();return s.charAt(0)==="."?r.toLowerCase().endsWith(s):s.endsWith("/*")?a===s.replace(/\/.*$/,""):i===s})}return!0};function ax(t){return Cce(t)||Tce(t)||cx(t)||yce()}function yce(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
291
291
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Tce(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Cce(t){if(Array.isArray(t))return _h(t)}function ox(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function sx(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ox(Object(n),!0).forEach(function(r){lx(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ox(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function lx(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Xo(t,e){return Nce(t)||Rce(t,e)||cx(t,e)||Oce()}function Oce(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
292
292
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cx(t,e){if(t){if(typeof t=="string")return _h(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _h(t,e)}}function _h(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Rce(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,a=!1,o,s;try{for(n=n.call(t);!(i=(o=n.next()).done)&&(r.push(o.value),!(e&&r.length===e));i=!0);}catch(l){a=!0,s=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(a)throw s}}return r}}function Nce(t){if(Array.isArray(t))return t}var Ace="file-invalid-type",xce="file-too-large",Ice="file-too-small",wce="too-many-files",Dce=function(e){e=Array.isArray(e)&&e.length===1?e[0]:e;var n=Array.isArray(e)?"one of ".concat(e.join(", ")):e;return{code:Ace,message:"File type must be ".concat(n)}},ux=function(e){return{code:xce,message:"File is larger than ".concat(e," ").concat(e===1?"byte":"bytes")}},dx=function(e){return{code:Ice,message:"File is smaller than ".concat(e," ").concat(e===1?"byte":"bytes")}},Mce={code:wce,message:"Too many files"};function px(t,e){var n=t.type==="application/x-moz-file"||Sce(t,e);return[n,n?null:Dce(e)]}function fx(t,e,n){if(pi(t.size))if(pi(e)&&pi(n)){if(t.size>n)return[!1,ux(n)];if(t.size<e)return[!1,dx(e)]}else{if(pi(e)&&t.size<e)return[!1,dx(e)];if(pi(n)&&t.size>n)return[!1,ux(n)]}return[!0,null]}function pi(t){return t!=null}function Lce(t){var e=t.files,n=t.accept,r=t.minSize,i=t.maxSize,a=t.multiple,o=t.maxFiles,s=t.validator;return!a&&e.length>1||a&&o>=1&&e.length>o?!1:e.every(function(l){var c=px(l,n),u=Xo(c,1),d=u[0],p=fx(l,r,i),f=Xo(p,1),m=f[0],_=s?s(l):null;return d&&m&&!_})}function Tc(t){return typeof t.isPropagationStopped=="function"?t.isPropagationStopped():typeof t.cancelBubble<"u"?t.cancelBubble:!1}function Cc(t){return t.dataTransfer?Array.prototype.some.call(t.dataTransfer.types,function(e){return e==="Files"||e==="application/x-moz-file"}):!!t.target&&!!t.target.files}function _x(t){t.preventDefault()}function Pce(t){return t.indexOf("MSIE")!==-1||t.indexOf("Trident/")!==-1}function kce(t){return t.indexOf("Edge/")!==-1}function Fce(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return Pce(t)||kce(t)}function zn(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(r){for(var i=arguments.length,a=new Array(i>1?i-1:0),o=1;o<i;o++)a[o-1]=arguments[o];return e.some(function(s){return!Tc(r)&&s&&s.apply(void 0,[r].concat(a)),Tc(r)})}}function Bce(){return"showOpenFilePicker"in window}function Uce(t){if(pi(t)){var e=Object.entries(t).filter(function(n){var r=Xo(n,2),i=r[0],a=r[1],o=!0;return mx(i)||(console.warn('Skipped "'.concat(i,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),o=!1),(!Array.isArray(a)||!a.every(gx))&&(console.warn('Skipped "'.concat(i,'" because an invalid file extension was provided.')),o=!1),o}).reduce(function(n,r){var i=Xo(r,2),a=i[0],o=i[1];return sx(sx({},n),{},lx({},a,o))},{});return[{description:"Files",accept:e}]}return t}function Gce(t){if(pi(t))return Object.entries(t).reduce(function(e,n){var r=Xo(n,2),i=r[0],a=r[1];return[].concat(ax(e),[i],ax(a))},[]).filter(function(e){return mx(e)||gx(e)}).join(",")}function $ce(t){return t instanceof DOMException&&(t.name==="AbortError"||t.code===t.ABORT_ERR)}function qce(t){return t instanceof DOMException&&(t.name==="SecurityError"||t.code===t.SECURITY_ERR)}function mx(t){return t==="audio/*"||t==="video/*"||t==="image/*"||t==="text/*"||/\w+\/[-+.\w]+/g.test(t)}function gx(t){return/^.*\.[\w]+$/.test(t)}var Yce=["children"],Vce=["open"],Hce=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],zce=["refKey","onChange","onClick"];function Wce(t){return Qce(t)||Kce(t)||hx(t)||jce()}function jce(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
293
293
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Kce(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Qce(t){if(Array.isArray(t))return gh(t)}function mh(t,e){return Jce(t)||Zce(t,e)||hx(t,e)||Xce()}function Xce(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
package/package.json
CHANGED
|
@@ -1,100 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@zydon/common",
|
|
3
|
-
"private": false,
|
|
4
|
-
"version": "1.0.70",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"dev": "vite",
|
|
8
|
-
"build": "tsc && vite build",
|
|
9
|
-
"preview": "vite preview",
|
|
10
|
-
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
|
11
|
-
"lint:fix": "eslint --fix src/**/*.{jsx,ts,tsx}",
|
|
12
|
-
"format": "prettier --write \"**/*.*\""
|
|
13
|
-
},
|
|
14
|
-
"files": [
|
|
15
|
-
"dist",
|
|
16
|
-
"README"
|
|
17
|
-
],
|
|
18
|
-
"exports": {
|
|
19
|
-
".": {
|
|
20
|
-
"import": "./dist/index.js",
|
|
21
|
-
"require": "./dist/index.umd.jcs"
|
|
22
|
-
},
|
|
23
|
-
"./styles.css": "./dist/style.css"
|
|
24
|
-
},
|
|
25
|
-
"module": "./dist/index.js",
|
|
26
|
-
"types": "./dist/index.d.ts",
|
|
27
|
-
"devDependencies": {
|
|
28
|
-
"@emotion/react": "^11.11.1",
|
|
29
|
-
"@emotion/styled": "^11.11.0",
|
|
30
|
-
"@mui/lab": "^5.0.0-alpha.145",
|
|
31
|
-
"@mui/material": "^5.14.10",
|
|
32
|
-
"@mui/x-data-grid-premium": "^6.14.0",
|
|
33
|
-
"@mui/x-date-pickers-pro": "^6.14.0",
|
|
34
|
-
"@types/color": "^3.0.3",
|
|
35
|
-
"@types/lodash": "^4.14.197",
|
|
36
|
-
"@types/node": "^20.5.3",
|
|
37
|
-
"@types/numeral": "^2.0.2",
|
|
38
|
-
"@types/react": "^18.2.15",
|
|
39
|
-
"@types/react-color": "^3.0.6",
|
|
40
|
-
"@types/react-dom": "^18.2.7",
|
|
41
|
-
"@types/react-lazy-load-image-component": "^1.5.3",
|
|
42
|
-
"@types/react-window": "^1.8.5",
|
|
43
|
-
"@typescript-eslint/eslint-plugin": "^6.4.1",
|
|
44
|
-
"@typescript-eslint/parser": "^6.4.1",
|
|
45
|
-
"@vitejs/plugin-react": "^4.0.3",
|
|
46
|
-
"eslint": "^8.47.0",
|
|
47
|
-
"eslint-config-prettier": "^9.0.0",
|
|
48
|
-
"eslint-plugin-prettier": "^5.0.0",
|
|
49
|
-
"eslint-plugin-react": "^7.33.2",
|
|
50
|
-
"eslint-plugin-react-hooks": "^4.6.0",
|
|
51
|
-
"eslint-plugin-react-refresh": "^0.4.3",
|
|
52
|
-
"prettier": "^3.0.2",
|
|
53
|
-
"react": ">=18.x",
|
|
54
|
-
"react-dom": ">=18.x",
|
|
55
|
-
"react-hook-form": "^7.46.1",
|
|
56
|
-
"react-router-dom": "^6.16.0",
|
|
57
|
-
"typescript": "^5.0.2",
|
|
58
|
-
"vite": "^4.4.5",
|
|
59
|
-
"vite-plugin-dts": "^3.5.2",
|
|
60
|
-
"vite-tsconfig-paths": "^4.2.0"
|
|
61
|
-
},
|
|
62
|
-
"peerDependencies": {
|
|
63
|
-
"@emotion/react": ">=11.x",
|
|
64
|
-
"@emotion/styled": ">=11.x",
|
|
65
|
-
"@mui/lab": ">=5.x",
|
|
66
|
-
"@mui/material": ">=5.x",
|
|
67
|
-
"@mui/x-data-grid-premium": ">=6.x",
|
|
68
|
-
"@mui/x-date-pickers-pro": ">=6.x",
|
|
69
|
-
"react": ">=18.x",
|
|
70
|
-
"react-dom": ">=18.x",
|
|
71
|
-
"react-hook-form": ">=7.x",
|
|
72
|
-
"react-router-dom": ">=6.x"
|
|
73
|
-
},
|
|
74
|
-
"dependencies": {
|
|
75
|
-
"@iconify/react": "^4.1.1",
|
|
76
|
-
"color": "^4.2.3",
|
|
77
|
-
"date-fns": "^2.30.0",
|
|
78
|
-
"framer-motion": "^10.16.3",
|
|
79
|
-
"highlight.js": "^11.8.0",
|
|
80
|
-
"notistack": "^3.0.1",
|
|
81
|
-
"numeral": "^2.0.6",
|
|
82
|
-
"react-color": "^2.19.3",
|
|
83
|
-
"react-dropzone": "^14.2.3",
|
|
84
|
-
"react-easy-crop": "^5.0.0",
|
|
85
|
-
"react-imask": "^7.1.3",
|
|
86
|
-
"react-lazy-load-image-component": "^1.6.0",
|
|
87
|
-
"react-quill": "^2.0.0",
|
|
88
|
-
"react-window": "^1.8.9",
|
|
89
|
-
"simplebar-react": "^3.2.4"
|
|
90
|
-
},
|
|
91
|
-
"author": "Zydon Tech",
|
|
92
|
-
"bugs": {
|
|
93
|
-
"url": "https://github.com/zydontecnologia"
|
|
94
|
-
},
|
|
95
|
-
"homepage": "https://github.com/zydontecnologia",
|
|
96
|
-
"license": "MIT",
|
|
97
|
-
"publishConfig": {
|
|
98
|
-
"access": "public"
|
|
99
|
-
}
|
|
100
|
-
}
|
|
1
|
+
{"name":"@zydon/common","private":false,"version":"1.0.72","type":"module","scripts":{"dev":"vite","build":"tsc && vite build","preview":"vite preview","lint":"eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0","lint:fix":"eslint --fix src/**/*.{jsx,ts,tsx}","format":"prettier --write \"**/*.*\""},"files":["dist","README"],"exports":{".":{"import":"./dist/index.js","require":"./dist/index.umd.jcs"},"./styles.css":"./dist/style.css"},"module":"./dist/index.js","types":"./dist/index.d.ts","devDependencies":{"@emotion/react":"^11.11.1","@emotion/styled":"^11.11.0","@mui/lab":"^5.0.0-alpha.145","@mui/material":"^5.14.10","@mui/x-data-grid-premium":"^6.14.0","@mui/x-date-pickers-pro":"^6.14.0","@types/color":"^3.0.3","@types/lodash":"^4.14.197","@types/node":"^20.5.3","@types/numeral":"^2.0.2","@types/react":"^18.2.15","@types/react-color":"^3.0.6","@types/react-dom":"^18.2.7","@types/react-lazy-load-image-component":"^1.5.3","@types/react-window":"^1.8.5","@typescript-eslint/eslint-plugin":"^6.4.1","@typescript-eslint/parser":"^6.4.1","@vitejs/plugin-react":"^4.0.3","eslint":"^8.47.0","eslint-config-prettier":"^9.0.0","eslint-plugin-prettier":"^5.0.0","eslint-plugin-react":"^7.33.2","eslint-plugin-react-hooks":"^4.6.0","eslint-plugin-react-refresh":"^0.4.3","prettier":"^3.0.2","react":">=18.x","react-dom":">=18.x","react-hook-form":"^7.46.1","react-router-dom":"^6.16.0","typescript":"^5.0.2","vite":"^4.4.5","vite-plugin-dts":"^3.5.2","vite-tsconfig-paths":"^4.2.0"},"peerDependencies":{"@emotion/react":">=11.x","@emotion/styled":">=11.x","@mui/lab":">=5.x","@mui/material":">=5.x","@mui/x-data-grid-premium":">=6.x","@mui/x-date-pickers-pro":">=6.x","react":">=18.x","react-dom":">=18.x","react-hook-form":">=7.x","react-router-dom":">=6.x"},"dependencies":{"@iconify/react":"^4.1.1","color":"^4.2.3","date-fns":"^2.30.0","framer-motion":"^10.16.3","highlight.js":"^11.8.0","notistack":"^3.0.1","numeral":"^2.0.6","react-color":"^2.19.3","react-dropzone":"^14.2.3","react-easy-crop":"^5.0.0","react-imask":"^7.1.3","react-lazy-load-image-component":"^1.6.0","react-quill":"^2.0.0","react-window":"^1.8.9","simplebar-react":"^3.2.4"},"author":"Zydon Tech","bugs":{"url":"https://github.com/zydontecnologia"},"homepage":"https://github.com/zydontecnologia","license":"MIT","publishConfig":{"access":"public"}}
|