@scbt-ecom/ui 0.0.41 → 0.0.47
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/{api-hh0lx9Yk.js → api-CmmTpYha.js} +671 -621
- package/dist/api-CmmTpYha.js.map +1 -0
- package/dist/client.js +15837 -8599
- package/dist/client.js.map +1 -1
- package/dist/configs/index.d.ts +1 -0
- package/dist/configs/tailwindPresets/extendsPreset.d.ts +2 -0
- package/dist/configs/tailwindPresets/index.d.ts +2 -0
- package/dist/configs/tailwindPresets/resetPreset.d.ts +2 -0
- package/dist/hybrid.d.ts +1 -19
- package/dist/hybrid.js +889 -820
- package/dist/hybrid.js.map +1 -1
- package/dist/shared/constants/designSystem/colors.d.ts +4 -0
- package/dist/shared/ui/ResponsiveContainer.d.ts +1 -1
- package/dist/shared/ui/button/Button.d.ts +2 -2
- package/dist/shared/ui/formControlElements/comboboxControlSelect/ComboboxControlReactSelect.d.ts +31 -0
- package/dist/shared/ui/formControlElements/comboboxControlSelect/index.d.ts +1 -0
- package/dist/shared/ui/formControlElements/comboboxControlSelect/model/selectClassnames.d.ts +21 -0
- package/dist/shared/ui/formControlElements/comboboxControlSelect/model/types.d.ts +36 -0
- package/dist/shared/ui/formControlElements/comboboxControlSelect/ui/DropdownIndicator.d.ts +2 -0
- package/dist/shared/ui/formControlElements/comboboxControlSelect/ui/MultiValueRemove.d.ts +2 -0
- package/dist/shared/ui/formControlElements/comboboxControlSelect/ui/Option.d.ts +2 -0
- package/dist/shared/ui/formControlElements/comboboxControlSelect/ui/index.d.ts +3 -0
- package/dist/shared/ui/formControlElements/index.d.ts +3 -1
- package/dist/shared/ui/formControlElements/inputControlUploader/InputControlUploader.d.ts +10 -0
- package/dist/shared/ui/formControlElements/inputControlUploader/index.d.ts +1 -0
- package/dist/shared/ui/formControlElements/inputControlUploader/model/helpers.d.ts +8 -0
- package/dist/shared/ui/formControlElements/inputControlUploader/model/hooks/useUploader.d.ts +11 -0
- package/dist/shared/ui/formControlElements/inputControlUploader/model/index.d.ts +1 -0
- package/dist/shared/ui/formControlElements/inputControlUploader/model/types.d.ts +20 -0
- package/dist/shared/ui/formControlElements/inputControlUploader/ui/File.d.ts +12 -0
- package/dist/shared/ui/formControlElements/inputControlUploader/ui/Files.d.ts +12 -0
- package/dist/shared/ui/formControlElements/inputControlUploader/ui/Input.d.ts +11 -0
- package/dist/shared/ui/formControlElements/inputControlUploader/ui/Uploader.d.ts +15 -0
- package/dist/shared/ui/formControlElements/inputControlUploader/ui/index.d.ts +3 -0
- package/dist/shared/ui/formControlElements/inputSliderControl/InputSliderControl.d.ts +20 -0
- package/dist/shared/ui/formControlElements/{inputSliderControlNeedFix → inputSliderControl/model}/helpers/getInputSliderSuffix.d.ts +1 -1
- package/dist/shared/ui/formControlElements/{inputSliderControlNeedFix → inputSliderControl/model}/helpers/getStepByVariant.d.ts +1 -1
- package/dist/shared/ui/formControlElements/inputSliderControl/model/types.d.ts +1 -0
- package/dist/shared/ui/formControlElements/{inputSliderControlNeedFix/hooks → inputSliderControl/model}/useSlider.d.ts +1 -1
- package/dist/shared/ui/formControlElements/inputSliderControl/ui/SliderControl.d.ts +17 -0
- package/dist/shared/ui/formControlElements/model/index.d.ts +2 -2
- package/dist/shared/ui/formControlElements/selectControl/ui/CustomOption.d.ts +2 -1
- package/dist/shared/ui/formControlElements/ui/FieldAttachment.d.ts +2 -1
- package/dist/shared/ui/formControlElements/ui/FieldWrapper.d.ts +1 -1
- package/dist/shared/ui/formControlElements/ui/Label.d.ts +11 -0
- package/dist/shared/ui/icon/sprite.gen.d.ts +1 -1
- package/dist/shared/ui/index.d.ts +1 -1
- package/dist/shared/ui/modal/Modal.d.ts +2 -2
- package/dist/shared/ui/modal/model/helpers.d.ts +33 -0
- package/dist/shared/ui/modal/ui/ModalHeader.d.ts +1 -1
- package/dist/sprites/files.svg +1 -1
- package/dist/style.css +1 -1
- package/dist/widgets/banner/Banner.d.ts +2 -1
- package/dist/widgets/banner/model/helpers.d.ts +5 -0
- package/dist/widgets/banner/ui/BannerButtonsGroup.d.ts +2 -1
- package/dist/widgets/banner/ui/banners/BannerImageFull.d.ts +2 -0
- package/dist/widgets/banner/ui/banners/BannerWithSeparateImg.d.ts +2 -0
- package/dist/widgets/banner/ui/banners/index.d.ts +1 -0
- package/package.json +24 -21
- package/dist/api-hh0lx9Yk.js.map +0 -1
- package/dist/shared/ui/formControlElements/inputSliderControlNeedFix/InputSliderControl.d.ts +0 -7
- package/dist/shared/ui/formControlElements/inputSliderControlNeedFix/model/types.d.ts +0 -10
- package/dist/shared/ui/formControlElements/inputSliderControlNeedFix/ui/SliderControl.d.ts +0 -4
- /package/dist/shared/ui/formControlElements/{inputSliderControlNeedFix → inputSliderControl}/index.d.ts +0 -0
- /package/dist/shared/ui/formControlElements/{inputSliderControlNeedFix → inputSliderControl/model}/helpers/dates/getEndWordMonth.d.ts +0 -0
- /package/dist/shared/ui/formControlElements/{inputSliderControlNeedFix → inputSliderControl/model}/helpers/dates/getYearEnding.d.ts +0 -0
- /package/dist/shared/ui/formControlElements/{inputSliderControlNeedFix → inputSliderControl/model}/helpers/dates/index.d.ts +0 -0
- /package/dist/shared/ui/formControlElements/{inputSliderControlNeedFix → inputSliderControl/model}/helpers/formatNumber.d.ts +0 -0
- /package/dist/shared/ui/formControlElements/{inputSliderControlNeedFix → inputSliderControl/model}/helpers/index.d.ts +0 -0
- /package/dist/shared/ui/formControlElements/{inputSliderControlNeedFix → inputSliderControl}/ui/index.d.ts +0 -0
package/dist/hybrid.js
CHANGED
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
import { p as Fe, j as g, c as x, H as
|
|
2
|
-
import { B as nn, D as an, b as sn, S as on } from "./api-
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
|
|
5
|
-
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
|
|
6
|
-
}
|
|
7
|
-
const Vr = (r, e) => JSON.stringify(r) === JSON.stringify(e), zr = typeof window < "u" && window.document !== void 0, Ee = (r) => r.split("-").map((e) => e.charAt(0).toUpperCase() + e.slice(1).toLowerCase()).join("-"), Pr = (r, e = "dd.MM.yyyy") => Fe(r, e, /* @__PURE__ */ new Date()), Br = ({ children: r, className: e, ...t }) => /* @__PURE__ */ g.jsx("section", { className: x("pb-16 desktop:pb-20", e), ...t, children: r }), dt = ({ children: r, className: e }) => /* @__PURE__ */ g.jsx("div", { className: x("w-full px-4 m-auto desktop:max-w-[1188px]", e), children: r }), lt = j("grid", {
|
|
1
|
+
import { p as Fe, j as g, c as x, H as mt, a as L, I as Me, L as ht, i as yt, g as We } from "./api-CmmTpYha.js";
|
|
2
|
+
import { B as nn, D as an, b as sn, S as on } from "./api-CmmTpYha.js";
|
|
3
|
+
import { forwardRef as qe } from "react";
|
|
4
|
+
const Mr = (r, e) => JSON.stringify(r) === JSON.stringify(e), $r = typeof window < "u" && window.document !== void 0, je = (r) => r.split("-").map((e) => e.charAt(0).toUpperCase() + e.slice(1).toLowerCase()).join("-"), Pr = (r, e = "dd.MM.yyyy") => Fe(r, e, /* @__PURE__ */ new Date()), Vr = ({ children: r, className: e, ...t }) => /* @__PURE__ */ g.jsx("section", { className: x("pb-16 desktop:pb-20", e), ...t, children: r }), gt = ({ children: r, className: e, ...t }) => /* @__PURE__ */ g.jsx("div", { className: x("m-auto w-full px-4 desktop:max-w-[1188px]", e), ...t, children: r }), vt = L("grid", {
|
|
8
5
|
variants: {
|
|
9
6
|
columnCount: {
|
|
10
7
|
twoColumns: "grid-cols-[repeat(2,minmax(172px,_1fr))] desktop:grid-cols-[repeat(2,minmax(172px,_1fr))]",
|
|
11
8
|
threeColumns: "grid-cols-[repeat(3,minmax(172px,_1fr))] desktop:grid-cols-[repeat(3,minmax(312px,_1fr))]"
|
|
12
9
|
}
|
|
13
10
|
}
|
|
14
|
-
}),
|
|
11
|
+
}), _t = L("grid", {
|
|
15
12
|
variants: {
|
|
16
13
|
columnCount: {
|
|
17
14
|
twoColumns: "",
|
|
@@ -44,7 +41,7 @@ const Vr = (r, e) => JSON.stringify(r) === JSON.stringify(e), zr = typeof window
|
|
|
44
41
|
class: "grid-cols-[repeat(3,_auto)]"
|
|
45
42
|
}
|
|
46
43
|
]
|
|
47
|
-
}),
|
|
44
|
+
}), xt = L("grid", {
|
|
48
45
|
variants: {
|
|
49
46
|
columnCount: {
|
|
50
47
|
twoColumns: "",
|
|
@@ -57,7 +54,7 @@ const Vr = (r, e) => JSON.stringify(r) === JSON.stringify(e), zr = typeof window
|
|
|
57
54
|
class: "mobile:overflow-x-scroll mobile:max-w-[368px] mb-1"
|
|
58
55
|
}
|
|
59
56
|
]
|
|
60
|
-
}),
|
|
57
|
+
}), bt = L("border-b border-warm-grey-200 py-4 desktop:desk-body-regular-l mob-body-regular-l", {
|
|
61
58
|
variants: {
|
|
62
59
|
columnCount: {
|
|
63
60
|
twoColumns: "",
|
|
@@ -75,39 +72,39 @@ const Vr = (r, e) => JSON.stringify(r) === JSON.stringify(e), zr = typeof window
|
|
|
75
72
|
class: "border-transparent border-0 p-0"
|
|
76
73
|
}
|
|
77
74
|
]
|
|
78
|
-
}),
|
|
75
|
+
}), zr = ({
|
|
79
76
|
headTitle: r,
|
|
80
77
|
tableRows: e,
|
|
81
78
|
tableHead: t,
|
|
82
79
|
additionalText: n,
|
|
83
80
|
columnCount: a,
|
|
84
|
-
classes:
|
|
81
|
+
classes: s
|
|
85
82
|
}) => {
|
|
86
|
-
const
|
|
87
|
-
return /* @__PURE__ */ g.jsx(
|
|
88
|
-
/* @__PURE__ */ g.jsx(
|
|
89
|
-
/* @__PURE__ */ g.jsxs("div", { className: x(
|
|
90
|
-
/* @__PURE__ */ g.jsx("ul", { className: x(
|
|
83
|
+
const i = t && t.length > 0 ? "exist" : "notExist";
|
|
84
|
+
return /* @__PURE__ */ g.jsx(gt, { children: /* @__PURE__ */ g.jsxs("div", { className: x("flex flex-col", s == null ? void 0 : s.tableRootWrapper), children: [
|
|
85
|
+
/* @__PURE__ */ g.jsx(mt, { as: "h3", className: x("mob-title-bold-m pb-6 desktop:desk-title-bold-s", s == null ? void 0 : s.tableHeading), children: r }),
|
|
86
|
+
/* @__PURE__ */ g.jsxs("div", { className: x(xt({ columnCount: a }), s == null ? void 0 : s.tableBody), children: [
|
|
87
|
+
/* @__PURE__ */ g.jsx("ul", { className: x(vt({ columnCount: a }), s == null ? void 0 : s.tableTitlesContainer), children: t == null ? void 0 : t.map((o) => /* @__PURE__ */ g.jsx(
|
|
91
88
|
"li",
|
|
92
89
|
{
|
|
93
90
|
className: x(
|
|
94
|
-
"border-b border-warm-grey-200
|
|
95
|
-
|
|
91
|
+
"mob-body-regular-l border-b border-warm-grey-200 py-4 desktop:desk-body-regular-l",
|
|
92
|
+
s == null ? void 0 : s.tableTitleRow
|
|
96
93
|
),
|
|
97
94
|
children: o
|
|
98
95
|
},
|
|
99
96
|
o
|
|
100
97
|
)) }),
|
|
101
|
-
/* @__PURE__ */ g.jsx("ul", { className: x("mb-4 flex flex-col",
|
|
98
|
+
/* @__PURE__ */ g.jsx("ul", { className: x("mb-4 flex flex-col", s == null ? void 0 : s.tableBodyContainer), children: e.map((o, c) => /* @__PURE__ */ g.jsx("li", { className: x(_t({ columnCount: a, titlesExist: i }), s == null ? void 0 : s.tableBodyRow), children: o.map((l, m) => /* @__PURE__ */ g.jsx("p", { className: x(bt({ titlesExist: i, columnCount: a }), s == null ? void 0 : s.tableBodyCeil), children: l.text }, m)) }, c)) })
|
|
102
99
|
] }),
|
|
103
|
-
/* @__PURE__ */ g.jsx("p", { className: x("mob-body-regular-m desktop:desk-body-regular-l",
|
|
100
|
+
/* @__PURE__ */ g.jsx("p", { className: x("mob-body-regular-m desktop:desk-body-regular-l", s == null ? void 0 : s.tableAdditionalText), children: n })
|
|
104
101
|
] }) });
|
|
105
|
-
},
|
|
102
|
+
}, Br = ({ linksList: r }) => /* @__PURE__ */ g.jsx("div", { "aria-label": "Breadcrumb", className: "flex max-w-[840px] items-center gap-2", children: r.map((e) => /* @__PURE__ */ g.jsx(g.Fragment, { children: "path" in e ? /* @__PURE__ */ g.jsxs(
|
|
106
103
|
"div",
|
|
107
104
|
{
|
|
108
105
|
className: x(
|
|
109
|
-
"flex items-center gap-1
|
|
110
|
-
{ "
|
|
106
|
+
"flex items-center gap-1 rounded-sm border-2 border-solid border-transparent px-1 focus-within:border-primary-focus",
|
|
107
|
+
{ "pointer-events-none !border-transparent": e == null ? void 0 : e.isDisabled }
|
|
111
108
|
),
|
|
112
109
|
children: [
|
|
113
110
|
/* @__PURE__ */ g.jsx(
|
|
@@ -117,71 +114,45 @@ const Vr = (r, e) => JSON.stringify(r) === JSON.stringify(e), zr = typeof window
|
|
|
117
114
|
target: "_blank",
|
|
118
115
|
rel: "noreferrer",
|
|
119
116
|
className: x(
|
|
120
|
-
"desk-body-regular-m text-color-primary-default hover:text-color-primary-hover
|
|
117
|
+
"desk-body-regular-m text-color-primary-default outline-none hover:text-color-primary-hover focus:text-color-primary-default",
|
|
121
118
|
{ "!text-color-disabled": e == null ? void 0 : e.isDisabled }
|
|
122
119
|
),
|
|
123
120
|
children: e.label
|
|
124
121
|
}
|
|
125
122
|
),
|
|
126
123
|
/* @__PURE__ */ g.jsx(
|
|
127
|
-
|
|
124
|
+
Me,
|
|
128
125
|
{
|
|
129
126
|
name: "arrows/arrowRight",
|
|
130
|
-
className: x("text-icon-primary-default
|
|
127
|
+
className: x("size-4 text-icon-primary-default", { "!text-icon-disabled": e == null ? void 0 : e.isDisabled })
|
|
131
128
|
}
|
|
132
129
|
)
|
|
133
130
|
]
|
|
134
131
|
}
|
|
135
|
-
) : /* @__PURE__ */ g.jsx("div", { "aria-current": "page", className: "text-color-blue-grey-600
|
|
136
|
-
variants: {
|
|
137
|
-
position: {
|
|
138
|
-
absolute: "absolute",
|
|
139
|
-
static: "static",
|
|
140
|
-
fixed: "fixed"
|
|
141
|
-
}
|
|
142
|
-
},
|
|
143
|
-
defaultVariants: {
|
|
144
|
-
position: "static"
|
|
145
|
-
}
|
|
146
|
-
}), mt = j("border-2 border-solid block animate-spin rounded-full", {
|
|
147
|
-
variants: {
|
|
148
|
-
intent: {
|
|
149
|
-
primary: "border-white border-b-transparent",
|
|
150
|
-
secondary: "border-primary-default border-b-transparent"
|
|
151
|
-
},
|
|
152
|
-
size: {
|
|
153
|
-
sm: "size-5 border-2",
|
|
154
|
-
md: "size-8 border-2",
|
|
155
|
-
lg: "size-12 border-4"
|
|
156
|
-
}
|
|
157
|
-
},
|
|
158
|
-
defaultVariants: {
|
|
159
|
-
size: "md",
|
|
160
|
-
intent: "primary"
|
|
161
|
-
}
|
|
162
|
-
}), ht = ({ size: r = "md", classes: e, intent: t = "secondary", position: n = "static", text: a, ...i }) => /* @__PURE__ */ g.jsxs("div", { className: x(pt({ position: n }), { "flex flex-col items-center gap-2": a }, e == null ? void 0 : e.wrapper), children: [
|
|
163
|
-
/* @__PURE__ */ g.jsx("span", { "data-testid": "loader", className: x(mt({ size: r, intent: t }), e == null ? void 0 : e.loader), ...i }),
|
|
164
|
-
a && /* @__PURE__ */ g.jsx("p", { className: x("desk-body-regular-l text-color-dark", e == null ? void 0 : e.text), children: a })
|
|
165
|
-
] }), yt = (r) => {
|
|
132
|
+
) : /* @__PURE__ */ g.jsx("div", { "aria-current": "page", className: "desk-body-regular-m text-color-blue-grey-600", children: e.label }) })) }), wt = (r) => {
|
|
166
133
|
switch (r) {
|
|
167
134
|
case "ghost":
|
|
168
135
|
case "secondary":
|
|
169
136
|
return "secondary";
|
|
170
137
|
case "primary":
|
|
171
138
|
case "negative":
|
|
139
|
+
case "admin-accent":
|
|
140
|
+
case "admin-primary":
|
|
172
141
|
return "primary";
|
|
173
142
|
default:
|
|
174
143
|
return r;
|
|
175
144
|
}
|
|
176
|
-
},
|
|
177
|
-
"relative flex items-center justify-center gap-4 cursor-pointer rounded-sm w-
|
|
145
|
+
}, kt = L(
|
|
146
|
+
"relative flex items-center justify-center gap-4 cursor-pointer rounded-sm w-max px-4 outline-offset-4 outline-transparent outline-2 desk-body-regular-l transition duration-12 active:scale-[0.97] disabled:pointer-events-none",
|
|
178
147
|
{
|
|
179
148
|
variants: {
|
|
180
149
|
intent: {
|
|
181
|
-
primary: "bg-color-primary-default text-color-white outline-offset-[3px]
|
|
150
|
+
primary: "bg-color-primary-default text-color-white outline-offset-[3px] hover:bg-color-primary-hover active:bg-color-primary-hover focus:bg-color-primary-default focus:outline-primary-focus disabled:bg-color-primary-disabled",
|
|
182
151
|
secondary: "bg-transparent text-color-primary-default border border-solid border-primary-default hover:bg-color-primary-tr-hover active:bg-color-primary-tr-pressed active:border-primary-hover focus:outline-primary-focus focus:bg-color-primary-tr-focus disabled:bg-color-blue-grey-200 disabled:text-color-primary-disabled disabled:border-transparent",
|
|
183
152
|
ghost: "bg-transparent text-color-primary-default hover:bg-color-primary-tr-hover hover:text-color-primary-hover focus:bg-color-primary-tr-focus focus:outline-primary-focus active:bg-color-primary-tr-pressed active:text-color-primary-hover disabled:text-color-primary-disabled disabled:bg-transparent",
|
|
184
|
-
negative: "bg-color-secondary-default text-color-white outline-offset-[3px] hover:bg-color-secondary-hover disabled:bg-color-secondary-disabled active:bg-color-secondary-hover focus:bg-color-secondary-default focus:outline-primary-focus"
|
|
153
|
+
negative: "bg-color-secondary-default text-color-white outline-offset-[3px] hover:bg-color-secondary-hover disabled:bg-color-secondary-disabled active:bg-color-secondary-hover focus:bg-color-secondary-default focus:outline-primary-focus",
|
|
154
|
+
"admin-accent": "bg-color-purple text-color-white hover:bg-color-purple-hover hover:shadow-md",
|
|
155
|
+
"admin-primary": "transition-none bg-color-dark text-color-white hover:bg-color-transparent border-transparent border hover:border-dark hover:text-color-dark hover:shadow-md"
|
|
185
156
|
},
|
|
186
157
|
size: {
|
|
187
158
|
sm: "h-10",
|
|
@@ -231,36 +202,36 @@ const Vr = (r, e) => JSON.stringify(r) === JSON.stringify(e), zr = typeof window
|
|
|
231
202
|
isFull: !1
|
|
232
203
|
}
|
|
233
204
|
}
|
|
234
|
-
),
|
|
205
|
+
), Ur = qe(
|
|
235
206
|
({
|
|
236
207
|
intent: r,
|
|
237
208
|
size: e,
|
|
238
209
|
className: t,
|
|
239
210
|
children: n,
|
|
240
211
|
type: a = "button",
|
|
241
|
-
iconLeft:
|
|
242
|
-
iconRight:
|
|
212
|
+
iconLeft: s,
|
|
213
|
+
iconRight: i,
|
|
243
214
|
disabled: o = !1,
|
|
244
|
-
isLoading:
|
|
245
|
-
isFull:
|
|
246
|
-
textFormat:
|
|
215
|
+
isLoading: c = !1,
|
|
216
|
+
isFull: l = !1,
|
|
217
|
+
textFormat: m,
|
|
247
218
|
...C
|
|
248
|
-
},
|
|
219
|
+
}, ye) => /* @__PURE__ */ g.jsx(
|
|
249
220
|
"button",
|
|
250
221
|
{
|
|
251
|
-
ref:
|
|
222
|
+
ref: ye,
|
|
252
223
|
type: a,
|
|
253
|
-
disabled: o ||
|
|
254
|
-
className: x(
|
|
224
|
+
disabled: o || c,
|
|
225
|
+
className: x(kt({ intent: r, size: e, textFormat: m, isLoading: c, isFull: l }), t),
|
|
255
226
|
...C,
|
|
256
|
-
children:
|
|
257
|
-
|
|
227
|
+
children: c ? /* @__PURE__ */ g.jsx(ht, { size: "sm", intent: wt(r) }) : /* @__PURE__ */ g.jsxs(g.Fragment, { children: [
|
|
228
|
+
s && /* @__PURE__ */ g.jsx("span", { className: "flex size-5 items-center justify-center", children: s }),
|
|
258
229
|
n,
|
|
259
|
-
|
|
230
|
+
i && /* @__PURE__ */ g.jsx("span", { className: "flex size-5 items-center justify-center", children: i })
|
|
260
231
|
] })
|
|
261
232
|
}
|
|
262
233
|
)
|
|
263
|
-
),
|
|
234
|
+
), Tt = L(
|
|
264
235
|
"group flex items-center justify-center cursor-pointer rounded-full outline-offset-[3px] outline-transparent outline-2 transition duration-12 active:scale-[0.97] disabled:pointer-events-none",
|
|
265
236
|
{
|
|
266
237
|
variants: {
|
|
@@ -280,9 +251,9 @@ const Vr = (r, e) => JSON.stringify(r) === JSON.stringify(e), zr = typeof window
|
|
|
280
251
|
size: "lg"
|
|
281
252
|
}
|
|
282
253
|
}
|
|
283
|
-
),
|
|
284
|
-
({ size: r, intent: e, children: t, classes: n, type: a = "button", ...
|
|
285
|
-
),
|
|
254
|
+
), Fr = qe(
|
|
255
|
+
({ size: r, intent: e, children: t, classes: n, type: a = "button", ...s }, i) => /* @__PURE__ */ g.jsx("button", { ref: i, type: a, className: x(Tt({ intent: e, size: r }), n == null ? void 0 : n.button), ...s, children: /* @__PURE__ */ g.jsx("span", { className: x(n == null ? void 0 : n.icon), children: t }) })
|
|
256
|
+
), Ct = L(
|
|
286
257
|
"group underline underline-offset-4 outline-none p-[2px] rounded-sm border border-solid border-transparent",
|
|
287
258
|
{
|
|
288
259
|
variants: {
|
|
@@ -310,7 +281,7 @@ const Vr = (r, e) => JSON.stringify(r) === JSON.stringify(e), zr = typeof window
|
|
|
310
281
|
size: "sm"
|
|
311
282
|
}
|
|
312
283
|
}
|
|
313
|
-
),
|
|
284
|
+
), Nt = L("size-6", {
|
|
314
285
|
variants: {
|
|
315
286
|
intent: {
|
|
316
287
|
blue: "text-icon-primary-default group-hover:text-icon-primary-hover group-focus:text-icon-primary-default ",
|
|
@@ -325,19 +296,19 @@ const Vr = (r, e) => JSON.stringify(r) === JSON.stringify(e), zr = typeof window
|
|
|
325
296
|
intent: "blue",
|
|
326
297
|
disabled: !1
|
|
327
298
|
}
|
|
328
|
-
}),
|
|
299
|
+
}), Wr = ({
|
|
329
300
|
Component: r = "a",
|
|
330
301
|
intent: e,
|
|
331
302
|
children: t,
|
|
332
303
|
withIcon: n,
|
|
333
304
|
disabled: a,
|
|
334
|
-
size:
|
|
335
|
-
icon:
|
|
305
|
+
size: s,
|
|
306
|
+
icon: i = "arrows/arrowLink",
|
|
336
307
|
...o
|
|
337
|
-
}) => /* @__PURE__ */ g.jsxs(r, { className: x(
|
|
308
|
+
}) => /* @__PURE__ */ g.jsxs(r, { className: x(Ct({ intent: e, withIcon: n, disabled: a, size: s })), ...o, children: [
|
|
338
309
|
t,
|
|
339
|
-
n && /* @__PURE__ */ g.jsx(
|
|
340
|
-
] }),
|
|
310
|
+
n && /* @__PURE__ */ g.jsx(Me, { name: i, className: x(Nt({ intent: e, disabled: a })) })
|
|
311
|
+
] }), Et = L("size-8 transition-colors", {
|
|
341
312
|
variants: {
|
|
342
313
|
intent: {
|
|
343
314
|
outline: "text-icon-secondary-dark-default group-hover:text-icon-secondary-dark-hover",
|
|
@@ -347,10 +318,10 @@ const Vr = (r, e) => JSON.stringify(r) === JSON.stringify(e), zr = typeof window
|
|
|
347
318
|
defaultVariants: {
|
|
348
319
|
intent: "outline"
|
|
349
320
|
}
|
|
350
|
-
}),
|
|
321
|
+
}), St = {
|
|
351
322
|
filled: "files/documentFilled",
|
|
352
323
|
outline: "files/documentOutline"
|
|
353
|
-
},
|
|
324
|
+
}, qr = ({ text: r, size: e, sizeType: t, href: n, intent: a = "outline" }) => /* @__PURE__ */ g.jsxs(
|
|
354
325
|
"a",
|
|
355
326
|
{
|
|
356
327
|
href: n,
|
|
@@ -358,12 +329,12 @@ const Vr = (r, e) => JSON.stringify(r) === JSON.stringify(e), zr = typeof window
|
|
|
358
329
|
rel: "noreferrer",
|
|
359
330
|
tabIndex: 0,
|
|
360
331
|
className: x(
|
|
361
|
-
"flex items-center gap-2
|
|
332
|
+
"group flex max-w-[288px] cursor-pointer items-center gap-2 rounded-sm p-1 outline outline-2 outline-transparent transition-colors focus-within:outline-primary-focus desktop:max-w-[592px]"
|
|
362
333
|
),
|
|
363
334
|
children: [
|
|
364
|
-
/* @__PURE__ */ g.jsx(
|
|
365
|
-
/* @__PURE__ */ g.jsxs("div", { className: x("flex flex-
|
|
366
|
-
/* @__PURE__ */ g.jsx("p", { className: x("desk-body-medium-l text-color-dark
|
|
335
|
+
/* @__PURE__ */ g.jsx(Me, { name: St[a], className: x(Et({ intent: a })) }),
|
|
336
|
+
/* @__PURE__ */ g.jsxs("div", { className: x("flex flex-1 flex-col"), children: [
|
|
337
|
+
/* @__PURE__ */ g.jsx("p", { className: x("desk-body-medium-l text-color-dark"), children: r }),
|
|
367
338
|
/* @__PURE__ */ g.jsxs("div", { className: x("desk-body-regular-m text-color-disabled"), children: [
|
|
368
339
|
e,
|
|
369
340
|
" ",
|
|
@@ -372,17 +343,17 @@ const Vr = (r, e) => JSON.stringify(r) === JSON.stringify(e), zr = typeof window
|
|
|
372
343
|
] })
|
|
373
344
|
]
|
|
374
345
|
}
|
|
375
|
-
),
|
|
376
|
-
/* @__PURE__ */ g.jsx("a", { href: `tel:${r}`, className: x("
|
|
377
|
-
/* @__PURE__ */ g.jsx("p", { className: x("
|
|
378
|
-
] }),
|
|
379
|
-
r && /* @__PURE__ */ g.jsx("div", { className: x("flex justify-between gap-5
|
|
380
|
-
/* @__PURE__ */ g.jsxs("div", { className: x("relative
|
|
346
|
+
), Gr = ({ phone: r, text: e, classes: t }) => /* @__PURE__ */ g.jsxs("div", { className: x("flex flex-col", t == null ? void 0 : t.wrapper), children: [
|
|
347
|
+
/* @__PURE__ */ g.jsx("a", { href: `tel:${r}`, className: x("desk-body-medium-l text-color-dark", t == null ? void 0 : t.link), children: r }),
|
|
348
|
+
/* @__PURE__ */ g.jsx("p", { className: x("desk-body-regular-l text-color-tetriary", t == null ? void 0 : t.text), children: e })
|
|
349
|
+
] }), Hr = ({ topContent: r, bottomContent: e, progress: t, maxPercent: n = 100, classes: a }) => /* @__PURE__ */ g.jsxs("div", { className: x("flex flex-col", a == null ? void 0 : a.wrapper), children: [
|
|
350
|
+
r && /* @__PURE__ */ g.jsx("div", { className: x("mb-2 flex justify-between gap-5", a == null ? void 0 : a.topContent), children: r }),
|
|
351
|
+
/* @__PURE__ */ g.jsxs("div", { className: x("relative h-2 w-[328xp] rounded-md bg-color-blue-grey-100 desktop:w-[524px]", a == null ? void 0 : a.progressBar), children: [
|
|
381
352
|
/* @__PURE__ */ g.jsx(
|
|
382
353
|
"div",
|
|
383
354
|
{
|
|
384
355
|
style: { width: `${t}%` },
|
|
385
|
-
className: x("relative
|
|
356
|
+
className: x("relative z-[4] h-2 rounded-md bg-color-positive transition-all", a == null ? void 0 : a.progress)
|
|
386
357
|
}
|
|
387
358
|
),
|
|
388
359
|
/* @__PURE__ */ g.jsx(
|
|
@@ -390,14 +361,14 @@ const Vr = (r, e) => JSON.stringify(r) === JSON.stringify(e), zr = typeof window
|
|
|
390
361
|
{
|
|
391
362
|
style: { maxWidth: `${n}%` },
|
|
392
363
|
className: x(
|
|
393
|
-
"absolute z-[2] h-full w-full
|
|
364
|
+
"progressBar-apply absolute top-1/2 z-[2] h-full w-full -translate-y-1/2 animate-progress-loader rounded-md",
|
|
394
365
|
a == null ? void 0 : a.loader
|
|
395
366
|
)
|
|
396
367
|
}
|
|
397
368
|
)
|
|
398
369
|
] }),
|
|
399
|
-
e && /* @__PURE__ */ g.jsx("div", { className: x("flex justify-between gap-5
|
|
400
|
-
] }),
|
|
370
|
+
e && /* @__PURE__ */ g.jsx("div", { className: x("mt-2 flex justify-between gap-5", a == null ? void 0 : a.bottomContent), children: e })
|
|
371
|
+
] }), Jr = ({ className: r }) => /* @__PURE__ */ g.jsx("div", { className: x("skeleton-apply h-full w-full", r) }), Zt = /^[\u0400-\u04FF\u00CB\u00EB -]+$/, Pe = /^(?:[^-]+(?:-[^-]+){0,4}|[^-]+)$/, jt = /^[a-zA-Zа-яА-ЯёЁ]+(?:\s*-\s*[a-zA-Zа-яА-ЯёЁ]+){0,4}(?:\s+[a-zA-Zа-яА-ЯёЁ]+(?:\s*-\s*[a-zA-Zа-яА-ЯёЁ]+){0,4})?$/i, ge = {
|
|
401
372
|
REQUIRED: "Поле обязательно к заполнению",
|
|
402
373
|
MIN_LENGTH: "Минимальная длина символов должна быть не менее",
|
|
403
374
|
MAX_LENGTH: "Максимальная длина символов должна быть не более",
|
|
@@ -419,40 +390,40 @@ var b;
|
|
|
419
390
|
throw new Error();
|
|
420
391
|
}
|
|
421
392
|
r.assertNever = t, r.arrayToEnum = (a) => {
|
|
422
|
-
const
|
|
423
|
-
for (const
|
|
424
|
-
i
|
|
425
|
-
return
|
|
393
|
+
const s = {};
|
|
394
|
+
for (const i of a)
|
|
395
|
+
s[i] = i;
|
|
396
|
+
return s;
|
|
426
397
|
}, r.getValidEnumValues = (a) => {
|
|
427
|
-
const
|
|
428
|
-
for (const o of
|
|
429
|
-
|
|
430
|
-
return r.objectValues(
|
|
431
|
-
}, r.objectValues = (a) => r.objectKeys(a).map(function(
|
|
432
|
-
return a[
|
|
398
|
+
const s = r.objectKeys(a).filter((o) => typeof a[a[o]] != "number"), i = {};
|
|
399
|
+
for (const o of s)
|
|
400
|
+
i[o] = a[o];
|
|
401
|
+
return r.objectValues(i);
|
|
402
|
+
}, r.objectValues = (a) => r.objectKeys(a).map(function(s) {
|
|
403
|
+
return a[s];
|
|
433
404
|
}), r.objectKeys = typeof Object.keys == "function" ? (a) => Object.keys(a) : (a) => {
|
|
434
|
-
const
|
|
435
|
-
for (const
|
|
436
|
-
Object.prototype.hasOwnProperty.call(a,
|
|
437
|
-
return
|
|
438
|
-
}, r.find = (a,
|
|
439
|
-
for (const
|
|
440
|
-
if (i
|
|
441
|
-
return
|
|
405
|
+
const s = [];
|
|
406
|
+
for (const i in a)
|
|
407
|
+
Object.prototype.hasOwnProperty.call(a, i) && s.push(i);
|
|
408
|
+
return s;
|
|
409
|
+
}, r.find = (a, s) => {
|
|
410
|
+
for (const i of a)
|
|
411
|
+
if (s(i))
|
|
412
|
+
return i;
|
|
442
413
|
}, r.isInteger = typeof Number.isInteger == "function" ? (a) => Number.isInteger(a) : (a) => typeof a == "number" && isFinite(a) && Math.floor(a) === a;
|
|
443
|
-
function n(a,
|
|
444
|
-
return a.map((
|
|
414
|
+
function n(a, s = " | ") {
|
|
415
|
+
return a.map((i) => typeof i == "string" ? `'${i}'` : i).join(s);
|
|
445
416
|
}
|
|
446
|
-
r.joinValues = n, r.jsonStringifyReplacer = (a,
|
|
417
|
+
r.joinValues = n, r.jsonStringifyReplacer = (a, s) => typeof s == "bigint" ? s.toString() : s;
|
|
447
418
|
})(b || (b = {}));
|
|
448
|
-
var
|
|
419
|
+
var Re;
|
|
449
420
|
(function(r) {
|
|
450
421
|
r.mergeShapes = (e, t) => ({
|
|
451
422
|
...e,
|
|
452
423
|
...t
|
|
453
424
|
// second overwrites first
|
|
454
425
|
});
|
|
455
|
-
})(
|
|
426
|
+
})(Re || (Re = {}));
|
|
456
427
|
const f = b.arrayToEnum([
|
|
457
428
|
"string",
|
|
458
429
|
"nan",
|
|
@@ -474,7 +445,7 @@ const f = b.arrayToEnum([
|
|
|
474
445
|
"never",
|
|
475
446
|
"map",
|
|
476
447
|
"set"
|
|
477
|
-
]),
|
|
448
|
+
]), M = (r) => {
|
|
478
449
|
switch (typeof r) {
|
|
479
450
|
case "undefined":
|
|
480
451
|
return f.undefined;
|
|
@@ -512,7 +483,7 @@ const f = b.arrayToEnum([
|
|
|
512
483
|
"invalid_intersection_types",
|
|
513
484
|
"not_multiple_of",
|
|
514
485
|
"not_finite"
|
|
515
|
-
]),
|
|
486
|
+
]), Ot = (r) => JSON.stringify(r, null, 2).replace(/"([^"]+)":/g, "$1:");
|
|
516
487
|
class N extends Error {
|
|
517
488
|
constructor(e) {
|
|
518
489
|
super(), this.issues = [], this.addIssue = (n) => {
|
|
@@ -527,23 +498,23 @@ class N extends Error {
|
|
|
527
498
|
return this.issues;
|
|
528
499
|
}
|
|
529
500
|
format(e) {
|
|
530
|
-
const t = e || function(
|
|
531
|
-
return
|
|
532
|
-
}, n = { _errors: [] }, a = (
|
|
533
|
-
for (const
|
|
534
|
-
if (
|
|
535
|
-
|
|
536
|
-
else if (
|
|
537
|
-
a(
|
|
538
|
-
else if (
|
|
539
|
-
a(
|
|
540
|
-
else if (
|
|
541
|
-
n._errors.push(t(
|
|
501
|
+
const t = e || function(s) {
|
|
502
|
+
return s.message;
|
|
503
|
+
}, n = { _errors: [] }, a = (s) => {
|
|
504
|
+
for (const i of s.issues)
|
|
505
|
+
if (i.code === "invalid_union")
|
|
506
|
+
i.unionErrors.map(a);
|
|
507
|
+
else if (i.code === "invalid_return_type")
|
|
508
|
+
a(i.returnTypeError);
|
|
509
|
+
else if (i.code === "invalid_arguments")
|
|
510
|
+
a(i.argumentsError);
|
|
511
|
+
else if (i.path.length === 0)
|
|
512
|
+
n._errors.push(t(i));
|
|
542
513
|
else {
|
|
543
|
-
let o = n,
|
|
544
|
-
for (;
|
|
545
|
-
const
|
|
546
|
-
|
|
514
|
+
let o = n, c = 0;
|
|
515
|
+
for (; c < i.path.length; ) {
|
|
516
|
+
const l = i.path[c];
|
|
517
|
+
c === i.path.length - 1 ? (o[l] = o[l] || { _errors: [] }, o[l]._errors.push(t(i))) : o[l] = o[l] || { _errors: [] }, o = o[l], c++;
|
|
547
518
|
}
|
|
548
519
|
}
|
|
549
520
|
};
|
|
@@ -573,7 +544,7 @@ class N extends Error {
|
|
|
573
544
|
}
|
|
574
545
|
}
|
|
575
546
|
N.create = (r) => new N(r);
|
|
576
|
-
const
|
|
547
|
+
const J = (r, e) => {
|
|
577
548
|
let t;
|
|
578
549
|
switch (r.code) {
|
|
579
550
|
case d.invalid_type:
|
|
@@ -629,34 +600,34 @@ const H = (r, e) => {
|
|
|
629
600
|
}
|
|
630
601
|
return { message: t };
|
|
631
602
|
};
|
|
632
|
-
let Ge =
|
|
633
|
-
function
|
|
603
|
+
let Ge = J;
|
|
604
|
+
function It(r) {
|
|
634
605
|
Ge = r;
|
|
635
606
|
}
|
|
636
607
|
function ve() {
|
|
637
608
|
return Ge;
|
|
638
609
|
}
|
|
639
610
|
const _e = (r) => {
|
|
640
|
-
const { data: e, path: t, errorMaps: n, issueData: a } = r,
|
|
611
|
+
const { data: e, path: t, errorMaps: n, issueData: a } = r, s = [...t, ...a.path || []], i = {
|
|
641
612
|
...a,
|
|
642
|
-
path:
|
|
613
|
+
path: s
|
|
643
614
|
};
|
|
644
615
|
if (a.message !== void 0)
|
|
645
616
|
return {
|
|
646
617
|
...a,
|
|
647
|
-
path:
|
|
618
|
+
path: s,
|
|
648
619
|
message: a.message
|
|
649
620
|
};
|
|
650
621
|
let o = "";
|
|
651
|
-
const
|
|
652
|
-
for (const
|
|
653
|
-
o =
|
|
622
|
+
const c = n.filter((l) => !!l).slice().reverse();
|
|
623
|
+
for (const l of c)
|
|
624
|
+
o = l(i, { data: e, defaultError: o }).message;
|
|
654
625
|
return {
|
|
655
626
|
...a,
|
|
656
|
-
path:
|
|
627
|
+
path: s,
|
|
657
628
|
message: o
|
|
658
629
|
};
|
|
659
|
-
},
|
|
630
|
+
}, Rt = [];
|
|
660
631
|
function u(r, e) {
|
|
661
632
|
const t = ve(), n = _e({
|
|
662
633
|
issueData: e,
|
|
@@ -666,7 +637,7 @@ function u(r, e) {
|
|
|
666
637
|
r.common.contextualErrorMap,
|
|
667
638
|
r.schemaErrorMap,
|
|
668
639
|
t,
|
|
669
|
-
t ===
|
|
640
|
+
t === J ? void 0 : J
|
|
670
641
|
// then global default map
|
|
671
642
|
].filter((a) => !!a)
|
|
672
643
|
});
|
|
@@ -694,10 +665,10 @@ class k {
|
|
|
694
665
|
static async mergeObjectAsync(e, t) {
|
|
695
666
|
const n = [];
|
|
696
667
|
for (const a of t) {
|
|
697
|
-
const
|
|
668
|
+
const s = await a.key, i = await a.value;
|
|
698
669
|
n.push({
|
|
699
|
-
key:
|
|
700
|
-
value:
|
|
670
|
+
key: s,
|
|
671
|
+
value: i
|
|
701
672
|
});
|
|
702
673
|
}
|
|
703
674
|
return k.mergeObjectSync(e, n);
|
|
@@ -705,17 +676,17 @@ class k {
|
|
|
705
676
|
static mergeObjectSync(e, t) {
|
|
706
677
|
const n = {};
|
|
707
678
|
for (const a of t) {
|
|
708
|
-
const { key:
|
|
709
|
-
if (
|
|
679
|
+
const { key: s, value: i } = a;
|
|
680
|
+
if (s.status === "aborted" || i.status === "aborted")
|
|
710
681
|
return y;
|
|
711
|
-
|
|
682
|
+
s.status === "dirty" && e.dirty(), i.status === "dirty" && e.dirty(), s.value !== "__proto__" && (typeof i.value < "u" || a.alwaysSet) && (n[s.value] = i.value);
|
|
712
683
|
}
|
|
713
684
|
return { status: e.value, value: n };
|
|
714
685
|
}
|
|
715
686
|
}
|
|
716
687
|
const y = Object.freeze({
|
|
717
688
|
status: "aborted"
|
|
718
|
-
}),
|
|
689
|
+
}), G = (r) => ({ status: "dirty", value: r }), T = (r) => ({ status: "valid", value: r }), Ae = (r) => r.status === "aborted", De = (r) => r.status === "dirty", ee = (r) => r.status === "valid", te = (r) => typeof Promise < "u" && r instanceof Promise;
|
|
719
690
|
function xe(r, e, t, n) {
|
|
720
691
|
if (typeof e == "function" ? r !== e || !n : !e.has(r)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
721
692
|
return e.get(r);
|
|
@@ -728,8 +699,8 @@ var p;
|
|
|
728
699
|
(function(r) {
|
|
729
700
|
r.errToObj = (e) => typeof e == "string" ? { message: e } : e || {}, r.toString = (e) => typeof e == "string" ? e : e == null ? void 0 : e.message;
|
|
730
701
|
})(p || (p = {}));
|
|
731
|
-
var
|
|
732
|
-
class
|
|
702
|
+
var Q, K;
|
|
703
|
+
class I {
|
|
733
704
|
constructor(e, t, n, a) {
|
|
734
705
|
this._cachedPath = [], this.parent = e, this.data = t, this._path = n, this._key = a;
|
|
735
706
|
}
|
|
@@ -737,8 +708,8 @@ class R {
|
|
|
737
708
|
return this._cachedPath.length || (this._key instanceof Array ? this._cachedPath.push(...this._path, ...this._key) : this._cachedPath.push(...this._path, this._key)), this._cachedPath;
|
|
738
709
|
}
|
|
739
710
|
}
|
|
740
|
-
const
|
|
741
|
-
if (
|
|
711
|
+
const Ve = (r, e) => {
|
|
712
|
+
if (ee(e))
|
|
742
713
|
return { success: !0, data: e.value };
|
|
743
714
|
if (!r.common.issues.length)
|
|
744
715
|
throw new Error("Validation failed but no issues detected.");
|
|
@@ -758,10 +729,10 @@ function v(r) {
|
|
|
758
729
|
const { errorMap: e, invalid_type_error: t, required_error: n, description: a } = r;
|
|
759
730
|
if (e && (t || n))
|
|
760
731
|
throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);
|
|
761
|
-
return e ? { errorMap: e, description: a } : { errorMap: (
|
|
762
|
-
var
|
|
763
|
-
const { message:
|
|
764
|
-
return
|
|
732
|
+
return e ? { errorMap: e, description: a } : { errorMap: (i, o) => {
|
|
733
|
+
var c, l;
|
|
734
|
+
const { message: m } = r;
|
|
735
|
+
return i.code === "invalid_enum_value" ? { message: m ?? o.defaultError } : typeof o.data > "u" ? { message: (c = m ?? n) !== null && c !== void 0 ? c : o.defaultError } : i.code !== "invalid_type" ? { message: o.defaultError } : { message: (l = m ?? t) !== null && l !== void 0 ? l : o.defaultError };
|
|
765
736
|
}, description: a };
|
|
766
737
|
}
|
|
767
738
|
class _ {
|
|
@@ -772,13 +743,13 @@ class _ {
|
|
|
772
743
|
return this._def.description;
|
|
773
744
|
}
|
|
774
745
|
_getType(e) {
|
|
775
|
-
return
|
|
746
|
+
return M(e.data);
|
|
776
747
|
}
|
|
777
748
|
_getOrReturnCtx(e, t) {
|
|
778
749
|
return t || {
|
|
779
750
|
common: e.parent.common,
|
|
780
751
|
data: e.data,
|
|
781
|
-
parsedType:
|
|
752
|
+
parsedType: M(e.data),
|
|
782
753
|
schemaErrorMap: this._def.errorMap,
|
|
783
754
|
path: e.path,
|
|
784
755
|
parent: e.parent
|
|
@@ -790,7 +761,7 @@ class _ {
|
|
|
790
761
|
ctx: {
|
|
791
762
|
common: e.parent.common,
|
|
792
763
|
data: e.data,
|
|
793
|
-
parsedType:
|
|
764
|
+
parsedType: M(e.data),
|
|
794
765
|
schemaErrorMap: this._def.errorMap,
|
|
795
766
|
path: e.path,
|
|
796
767
|
parent: e.parent
|
|
@@ -799,7 +770,7 @@ class _ {
|
|
|
799
770
|
}
|
|
800
771
|
_parseSync(e) {
|
|
801
772
|
const t = this._parse(e);
|
|
802
|
-
if (
|
|
773
|
+
if (te(t))
|
|
803
774
|
throw new Error("Synchronous parse encountered promise.");
|
|
804
775
|
return t;
|
|
805
776
|
}
|
|
@@ -825,9 +796,9 @@ class _ {
|
|
|
825
796
|
schemaErrorMap: this._def.errorMap,
|
|
826
797
|
parent: null,
|
|
827
798
|
data: e,
|
|
828
|
-
parsedType:
|
|
829
|
-
},
|
|
830
|
-
return
|
|
799
|
+
parsedType: M(e)
|
|
800
|
+
}, s = this._parseSync({ data: e, path: a.path, parent: a });
|
|
801
|
+
return Ve(a, s);
|
|
831
802
|
}
|
|
832
803
|
async parseAsync(e, t) {
|
|
833
804
|
const n = await this.safeParseAsync(e, t);
|
|
@@ -846,18 +817,18 @@ class _ {
|
|
|
846
817
|
schemaErrorMap: this._def.errorMap,
|
|
847
818
|
parent: null,
|
|
848
819
|
data: e,
|
|
849
|
-
parsedType:
|
|
850
|
-
}, a = this._parse({ data: e, path: n.path, parent: n }),
|
|
851
|
-
return
|
|
820
|
+
parsedType: M(e)
|
|
821
|
+
}, a = this._parse({ data: e, path: n.path, parent: n }), s = await (te(a) ? a : Promise.resolve(a));
|
|
822
|
+
return Ve(n, s);
|
|
852
823
|
}
|
|
853
824
|
refine(e, t) {
|
|
854
825
|
const n = (a) => typeof t == "string" || typeof t > "u" ? { message: t } : typeof t == "function" ? t(a) : t;
|
|
855
|
-
return this._refinement((a,
|
|
856
|
-
const
|
|
826
|
+
return this._refinement((a, s) => {
|
|
827
|
+
const i = e(a), o = () => s.addIssue({
|
|
857
828
|
code: d.custom,
|
|
858
829
|
...n(a)
|
|
859
830
|
});
|
|
860
|
-
return typeof Promise < "u" &&
|
|
831
|
+
return typeof Promise < "u" && i instanceof Promise ? i.then((c) => c ? !0 : (o(), !1)) : i ? !0 : (o(), !1);
|
|
861
832
|
});
|
|
862
833
|
}
|
|
863
834
|
refinement(e, t) {
|
|
@@ -866,7 +837,7 @@ class _ {
|
|
|
866
837
|
_refinement(e) {
|
|
867
838
|
return new Z({
|
|
868
839
|
schema: this,
|
|
869
|
-
typeName:
|
|
840
|
+
typeName: h.ZodEffects,
|
|
870
841
|
effect: { type: "refinement", refinement: e }
|
|
871
842
|
});
|
|
872
843
|
}
|
|
@@ -874,10 +845,10 @@ class _ {
|
|
|
874
845
|
return this._refinement(e);
|
|
875
846
|
}
|
|
876
847
|
optional() {
|
|
877
|
-
return
|
|
848
|
+
return O.create(this, this._def);
|
|
878
849
|
}
|
|
879
850
|
nullable() {
|
|
880
|
-
return
|
|
851
|
+
return B.create(this, this._def);
|
|
881
852
|
}
|
|
882
853
|
nullish() {
|
|
883
854
|
return this.nullable().optional();
|
|
@@ -886,10 +857,10 @@ class _ {
|
|
|
886
857
|
return S.create(this, this._def);
|
|
887
858
|
}
|
|
888
859
|
promise() {
|
|
889
|
-
return
|
|
860
|
+
return X.create(this, this._def);
|
|
890
861
|
}
|
|
891
862
|
or(e) {
|
|
892
|
-
return
|
|
863
|
+
return se.create([this, e], this._def);
|
|
893
864
|
}
|
|
894
865
|
and(e) {
|
|
895
866
|
return ie.create(this, e, this._def);
|
|
@@ -898,33 +869,33 @@ class _ {
|
|
|
898
869
|
return new Z({
|
|
899
870
|
...v(this._def),
|
|
900
871
|
schema: this,
|
|
901
|
-
typeName:
|
|
872
|
+
typeName: h.ZodEffects,
|
|
902
873
|
effect: { type: "transform", transform: e }
|
|
903
874
|
});
|
|
904
875
|
}
|
|
905
876
|
default(e) {
|
|
906
877
|
const t = typeof e == "function" ? e : () => e;
|
|
907
|
-
return new
|
|
878
|
+
return new ue({
|
|
908
879
|
...v(this._def),
|
|
909
880
|
innerType: this,
|
|
910
881
|
defaultValue: t,
|
|
911
|
-
typeName:
|
|
882
|
+
typeName: h.ZodDefault
|
|
912
883
|
});
|
|
913
884
|
}
|
|
914
885
|
brand() {
|
|
915
|
-
return new
|
|
916
|
-
typeName:
|
|
886
|
+
return new $e({
|
|
887
|
+
typeName: h.ZodBranded,
|
|
917
888
|
type: this,
|
|
918
889
|
...v(this._def)
|
|
919
890
|
});
|
|
920
891
|
}
|
|
921
892
|
catch(e) {
|
|
922
893
|
const t = typeof e == "function" ? e : () => e;
|
|
923
|
-
return new
|
|
894
|
+
return new fe({
|
|
924
895
|
...v(this._def),
|
|
925
896
|
innerType: this,
|
|
926
897
|
catchValue: t,
|
|
927
|
-
typeName:
|
|
898
|
+
typeName: h.ZodCatch
|
|
928
899
|
});
|
|
929
900
|
}
|
|
930
901
|
describe(e) {
|
|
@@ -935,10 +906,10 @@ class _ {
|
|
|
935
906
|
});
|
|
936
907
|
}
|
|
937
908
|
pipe(e) {
|
|
938
|
-
return
|
|
909
|
+
return me.create(this, e);
|
|
939
910
|
}
|
|
940
911
|
readonly() {
|
|
941
|
-
return
|
|
912
|
+
return pe.create(this);
|
|
942
913
|
}
|
|
943
914
|
isOptional() {
|
|
944
915
|
return this.safeParse(void 0).success;
|
|
@@ -947,14 +918,14 @@ class _ {
|
|
|
947
918
|
return this.safeParse(null).success;
|
|
948
919
|
}
|
|
949
920
|
}
|
|
950
|
-
const
|
|
951
|
-
let
|
|
952
|
-
const
|
|
921
|
+
const At = /^c[^\s-]{8,}$/i, Dt = /^[0-9a-z]+$/, Lt = /^[0-9A-HJKMNP-TV-Z]{26}$/, Mt = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, $t = /^[a-z0-9_-]{21}$/i, Pt = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, Vt = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, zt = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
922
|
+
let Oe;
|
|
923
|
+
const Bt = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, Ut = /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/, Ft = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, Je = "((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))", Wt = new RegExp(`^${Je}$`);
|
|
953
924
|
function Ye(r) {
|
|
954
925
|
let e = "([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";
|
|
955
926
|
return r.precision ? e = `${e}\\.\\d{${r.precision}}` : r.precision == null && (e = `${e}(\\.\\d+)?`), e;
|
|
956
927
|
}
|
|
957
|
-
function
|
|
928
|
+
function qt(r) {
|
|
958
929
|
return new RegExp(`^${Ye(r)}$`);
|
|
959
930
|
}
|
|
960
931
|
function Xe(r) {
|
|
@@ -962,150 +933,150 @@ function Xe(r) {
|
|
|
962
933
|
const t = [];
|
|
963
934
|
return t.push(r.local ? "Z?" : "Z"), r.offset && t.push("([+-]\\d{2}:?\\d{2})"), e = `${e}(${t.join("|")})`, new RegExp(`^${e}$`);
|
|
964
935
|
}
|
|
965
|
-
function
|
|
966
|
-
return !!((e === "v4" || !e) &&
|
|
936
|
+
function Gt(r, e) {
|
|
937
|
+
return !!((e === "v4" || !e) && Bt.test(r) || (e === "v6" || !e) && Ut.test(r));
|
|
967
938
|
}
|
|
968
939
|
class E extends _ {
|
|
969
940
|
_parse(e) {
|
|
970
941
|
if (this._def.coerce && (e.data = String(e.data)), this._getType(e) !== f.string) {
|
|
971
|
-
const
|
|
972
|
-
return u(
|
|
942
|
+
const s = this._getOrReturnCtx(e);
|
|
943
|
+
return u(s, {
|
|
973
944
|
code: d.invalid_type,
|
|
974
945
|
expected: f.string,
|
|
975
|
-
received:
|
|
946
|
+
received: s.parsedType
|
|
976
947
|
}), y;
|
|
977
948
|
}
|
|
978
949
|
const n = new k();
|
|
979
950
|
let a;
|
|
980
|
-
for (const
|
|
981
|
-
if (
|
|
982
|
-
e.data.length <
|
|
951
|
+
for (const s of this._def.checks)
|
|
952
|
+
if (s.kind === "min")
|
|
953
|
+
e.data.length < s.value && (a = this._getOrReturnCtx(e, a), u(a, {
|
|
983
954
|
code: d.too_small,
|
|
984
|
-
minimum:
|
|
955
|
+
minimum: s.value,
|
|
985
956
|
type: "string",
|
|
986
957
|
inclusive: !0,
|
|
987
958
|
exact: !1,
|
|
988
|
-
message:
|
|
959
|
+
message: s.message
|
|
989
960
|
}), n.dirty());
|
|
990
|
-
else if (
|
|
991
|
-
e.data.length >
|
|
961
|
+
else if (s.kind === "max")
|
|
962
|
+
e.data.length > s.value && (a = this._getOrReturnCtx(e, a), u(a, {
|
|
992
963
|
code: d.too_big,
|
|
993
|
-
maximum:
|
|
964
|
+
maximum: s.value,
|
|
994
965
|
type: "string",
|
|
995
966
|
inclusive: !0,
|
|
996
967
|
exact: !1,
|
|
997
|
-
message:
|
|
968
|
+
message: s.message
|
|
998
969
|
}), n.dirty());
|
|
999
|
-
else if (
|
|
1000
|
-
const
|
|
1001
|
-
(
|
|
970
|
+
else if (s.kind === "length") {
|
|
971
|
+
const i = e.data.length > s.value, o = e.data.length < s.value;
|
|
972
|
+
(i || o) && (a = this._getOrReturnCtx(e, a), i ? u(a, {
|
|
1002
973
|
code: d.too_big,
|
|
1003
|
-
maximum:
|
|
974
|
+
maximum: s.value,
|
|
1004
975
|
type: "string",
|
|
1005
976
|
inclusive: !0,
|
|
1006
977
|
exact: !0,
|
|
1007
|
-
message:
|
|
978
|
+
message: s.message
|
|
1008
979
|
}) : o && u(a, {
|
|
1009
980
|
code: d.too_small,
|
|
1010
|
-
minimum:
|
|
981
|
+
minimum: s.value,
|
|
1011
982
|
type: "string",
|
|
1012
983
|
inclusive: !0,
|
|
1013
984
|
exact: !0,
|
|
1014
|
-
message:
|
|
985
|
+
message: s.message
|
|
1015
986
|
}), n.dirty());
|
|
1016
|
-
} else if (
|
|
1017
|
-
|
|
987
|
+
} else if (s.kind === "email")
|
|
988
|
+
Vt.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
|
|
1018
989
|
validation: "email",
|
|
1019
990
|
code: d.invalid_string,
|
|
1020
|
-
message:
|
|
991
|
+
message: s.message
|
|
1021
992
|
}), n.dirty());
|
|
1022
|
-
else if (
|
|
1023
|
-
|
|
993
|
+
else if (s.kind === "emoji")
|
|
994
|
+
Oe || (Oe = new RegExp(zt, "u")), Oe.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
|
|
1024
995
|
validation: "emoji",
|
|
1025
996
|
code: d.invalid_string,
|
|
1026
|
-
message:
|
|
997
|
+
message: s.message
|
|
1027
998
|
}), n.dirty());
|
|
1028
|
-
else if (
|
|
1029
|
-
|
|
999
|
+
else if (s.kind === "uuid")
|
|
1000
|
+
Mt.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
|
|
1030
1001
|
validation: "uuid",
|
|
1031
1002
|
code: d.invalid_string,
|
|
1032
|
-
message:
|
|
1003
|
+
message: s.message
|
|
1033
1004
|
}), n.dirty());
|
|
1034
|
-
else if (
|
|
1035
|
-
|
|
1005
|
+
else if (s.kind === "nanoid")
|
|
1006
|
+
$t.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
|
|
1036
1007
|
validation: "nanoid",
|
|
1037
1008
|
code: d.invalid_string,
|
|
1038
|
-
message:
|
|
1009
|
+
message: s.message
|
|
1039
1010
|
}), n.dirty());
|
|
1040
|
-
else if (
|
|
1041
|
-
|
|
1011
|
+
else if (s.kind === "cuid")
|
|
1012
|
+
At.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
|
|
1042
1013
|
validation: "cuid",
|
|
1043
1014
|
code: d.invalid_string,
|
|
1044
|
-
message:
|
|
1015
|
+
message: s.message
|
|
1045
1016
|
}), n.dirty());
|
|
1046
|
-
else if (
|
|
1047
|
-
|
|
1017
|
+
else if (s.kind === "cuid2")
|
|
1018
|
+
Dt.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
|
|
1048
1019
|
validation: "cuid2",
|
|
1049
1020
|
code: d.invalid_string,
|
|
1050
|
-
message:
|
|
1021
|
+
message: s.message
|
|
1051
1022
|
}), n.dirty());
|
|
1052
|
-
else if (
|
|
1053
|
-
|
|
1023
|
+
else if (s.kind === "ulid")
|
|
1024
|
+
Lt.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
|
|
1054
1025
|
validation: "ulid",
|
|
1055
1026
|
code: d.invalid_string,
|
|
1056
|
-
message:
|
|
1027
|
+
message: s.message
|
|
1057
1028
|
}), n.dirty());
|
|
1058
|
-
else if (
|
|
1029
|
+
else if (s.kind === "url")
|
|
1059
1030
|
try {
|
|
1060
1031
|
new URL(e.data);
|
|
1061
1032
|
} catch {
|
|
1062
1033
|
a = this._getOrReturnCtx(e, a), u(a, {
|
|
1063
1034
|
validation: "url",
|
|
1064
1035
|
code: d.invalid_string,
|
|
1065
|
-
message:
|
|
1036
|
+
message: s.message
|
|
1066
1037
|
}), n.dirty();
|
|
1067
1038
|
}
|
|
1068
|
-
else
|
|
1039
|
+
else s.kind === "regex" ? (s.regex.lastIndex = 0, s.regex.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
|
|
1069
1040
|
validation: "regex",
|
|
1070
1041
|
code: d.invalid_string,
|
|
1071
|
-
message:
|
|
1072
|
-
}), n.dirty())) :
|
|
1042
|
+
message: s.message
|
|
1043
|
+
}), n.dirty())) : s.kind === "trim" ? e.data = e.data.trim() : s.kind === "includes" ? e.data.includes(s.value, s.position) || (a = this._getOrReturnCtx(e, a), u(a, {
|
|
1073
1044
|
code: d.invalid_string,
|
|
1074
|
-
validation: { includes:
|
|
1075
|
-
message:
|
|
1076
|
-
}), n.dirty()) :
|
|
1045
|
+
validation: { includes: s.value, position: s.position },
|
|
1046
|
+
message: s.message
|
|
1047
|
+
}), n.dirty()) : s.kind === "toLowerCase" ? e.data = e.data.toLowerCase() : s.kind === "toUpperCase" ? e.data = e.data.toUpperCase() : s.kind === "startsWith" ? e.data.startsWith(s.value) || (a = this._getOrReturnCtx(e, a), u(a, {
|
|
1077
1048
|
code: d.invalid_string,
|
|
1078
|
-
validation: { startsWith:
|
|
1079
|
-
message:
|
|
1080
|
-
}), n.dirty()) :
|
|
1049
|
+
validation: { startsWith: s.value },
|
|
1050
|
+
message: s.message
|
|
1051
|
+
}), n.dirty()) : s.kind === "endsWith" ? e.data.endsWith(s.value) || (a = this._getOrReturnCtx(e, a), u(a, {
|
|
1081
1052
|
code: d.invalid_string,
|
|
1082
|
-
validation: { endsWith:
|
|
1083
|
-
message:
|
|
1084
|
-
}), n.dirty()) :
|
|
1053
|
+
validation: { endsWith: s.value },
|
|
1054
|
+
message: s.message
|
|
1055
|
+
}), n.dirty()) : s.kind === "datetime" ? Xe(s).test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
|
|
1085
1056
|
code: d.invalid_string,
|
|
1086
1057
|
validation: "datetime",
|
|
1087
|
-
message:
|
|
1088
|
-
}), n.dirty()) :
|
|
1058
|
+
message: s.message
|
|
1059
|
+
}), n.dirty()) : s.kind === "date" ? Wt.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
|
|
1089
1060
|
code: d.invalid_string,
|
|
1090
1061
|
validation: "date",
|
|
1091
|
-
message:
|
|
1092
|
-
}), n.dirty()) :
|
|
1062
|
+
message: s.message
|
|
1063
|
+
}), n.dirty()) : s.kind === "time" ? qt(s).test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
|
|
1093
1064
|
code: d.invalid_string,
|
|
1094
1065
|
validation: "time",
|
|
1095
|
-
message:
|
|
1096
|
-
}), n.dirty()) :
|
|
1066
|
+
message: s.message
|
|
1067
|
+
}), n.dirty()) : s.kind === "duration" ? Pt.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
|
|
1097
1068
|
validation: "duration",
|
|
1098
1069
|
code: d.invalid_string,
|
|
1099
|
-
message:
|
|
1100
|
-
}), n.dirty()) :
|
|
1070
|
+
message: s.message
|
|
1071
|
+
}), n.dirty()) : s.kind === "ip" ? Gt(e.data, s.version) || (a = this._getOrReturnCtx(e, a), u(a, {
|
|
1101
1072
|
validation: "ip",
|
|
1102
1073
|
code: d.invalid_string,
|
|
1103
|
-
message:
|
|
1104
|
-
}), n.dirty()) :
|
|
1074
|
+
message: s.message
|
|
1075
|
+
}), n.dirty()) : s.kind === "base64" ? Ft.test(e.data) || (a = this._getOrReturnCtx(e, a), u(a, {
|
|
1105
1076
|
validation: "base64",
|
|
1106
1077
|
code: d.invalid_string,
|
|
1107
|
-
message:
|
|
1108
|
-
}), n.dirty()) : b.assertNever(
|
|
1078
|
+
message: s.message
|
|
1079
|
+
}), n.dirty()) : b.assertNever(s);
|
|
1109
1080
|
return { status: n.value, value: e.data };
|
|
1110
1081
|
}
|
|
1111
1082
|
_regex(e, t, n) {
|
|
@@ -1318,58 +1289,58 @@ E.create = (r) => {
|
|
|
1318
1289
|
var e;
|
|
1319
1290
|
return new E({
|
|
1320
1291
|
checks: [],
|
|
1321
|
-
typeName:
|
|
1292
|
+
typeName: h.ZodString,
|
|
1322
1293
|
coerce: (e = r == null ? void 0 : r.coerce) !== null && e !== void 0 ? e : !1,
|
|
1323
1294
|
...v(r)
|
|
1324
1295
|
});
|
|
1325
1296
|
};
|
|
1326
|
-
function
|
|
1327
|
-
const t = (r.toString().split(".")[1] || "").length, n = (e.toString().split(".")[1] || "").length, a = t > n ? t : n,
|
|
1328
|
-
return
|
|
1297
|
+
function Ht(r, e) {
|
|
1298
|
+
const t = (r.toString().split(".")[1] || "").length, n = (e.toString().split(".")[1] || "").length, a = t > n ? t : n, s = parseInt(r.toFixed(a).replace(".", "")), i = parseInt(e.toFixed(a).replace(".", ""));
|
|
1299
|
+
return s % i / Math.pow(10, a);
|
|
1329
1300
|
}
|
|
1330
|
-
class
|
|
1301
|
+
class P extends _ {
|
|
1331
1302
|
constructor() {
|
|
1332
1303
|
super(...arguments), this.min = this.gte, this.max = this.lte, this.step = this.multipleOf;
|
|
1333
1304
|
}
|
|
1334
1305
|
_parse(e) {
|
|
1335
1306
|
if (this._def.coerce && (e.data = Number(e.data)), this._getType(e) !== f.number) {
|
|
1336
|
-
const
|
|
1337
|
-
return u(
|
|
1307
|
+
const s = this._getOrReturnCtx(e);
|
|
1308
|
+
return u(s, {
|
|
1338
1309
|
code: d.invalid_type,
|
|
1339
1310
|
expected: f.number,
|
|
1340
|
-
received:
|
|
1311
|
+
received: s.parsedType
|
|
1341
1312
|
}), y;
|
|
1342
1313
|
}
|
|
1343
1314
|
let n;
|
|
1344
1315
|
const a = new k();
|
|
1345
|
-
for (const
|
|
1346
|
-
|
|
1316
|
+
for (const s of this._def.checks)
|
|
1317
|
+
s.kind === "int" ? b.isInteger(e.data) || (n = this._getOrReturnCtx(e, n), u(n, {
|
|
1347
1318
|
code: d.invalid_type,
|
|
1348
1319
|
expected: "integer",
|
|
1349
1320
|
received: "float",
|
|
1350
|
-
message:
|
|
1351
|
-
}), a.dirty()) :
|
|
1321
|
+
message: s.message
|
|
1322
|
+
}), a.dirty()) : s.kind === "min" ? (s.inclusive ? e.data < s.value : e.data <= s.value) && (n = this._getOrReturnCtx(e, n), u(n, {
|
|
1352
1323
|
code: d.too_small,
|
|
1353
|
-
minimum:
|
|
1324
|
+
minimum: s.value,
|
|
1354
1325
|
type: "number",
|
|
1355
|
-
inclusive:
|
|
1326
|
+
inclusive: s.inclusive,
|
|
1356
1327
|
exact: !1,
|
|
1357
|
-
message:
|
|
1358
|
-
}), a.dirty()) :
|
|
1328
|
+
message: s.message
|
|
1329
|
+
}), a.dirty()) : s.kind === "max" ? (s.inclusive ? e.data > s.value : e.data >= s.value) && (n = this._getOrReturnCtx(e, n), u(n, {
|
|
1359
1330
|
code: d.too_big,
|
|
1360
|
-
maximum:
|
|
1331
|
+
maximum: s.value,
|
|
1361
1332
|
type: "number",
|
|
1362
|
-
inclusive:
|
|
1333
|
+
inclusive: s.inclusive,
|
|
1363
1334
|
exact: !1,
|
|
1364
|
-
message:
|
|
1365
|
-
}), a.dirty()) :
|
|
1335
|
+
message: s.message
|
|
1336
|
+
}), a.dirty()) : s.kind === "multipleOf" ? Ht(e.data, s.value) !== 0 && (n = this._getOrReturnCtx(e, n), u(n, {
|
|
1366
1337
|
code: d.not_multiple_of,
|
|
1367
|
-
multipleOf:
|
|
1368
|
-
message:
|
|
1369
|
-
}), a.dirty()) :
|
|
1338
|
+
multipleOf: s.value,
|
|
1339
|
+
message: s.message
|
|
1340
|
+
}), a.dirty()) : s.kind === "finite" ? Number.isFinite(e.data) || (n = this._getOrReturnCtx(e, n), u(n, {
|
|
1370
1341
|
code: d.not_finite,
|
|
1371
|
-
message:
|
|
1372
|
-
}), a.dirty()) : b.assertNever(
|
|
1342
|
+
message: s.message
|
|
1343
|
+
}), a.dirty()) : b.assertNever(s);
|
|
1373
1344
|
return { status: a.value, value: e.data };
|
|
1374
1345
|
}
|
|
1375
1346
|
gte(e, t) {
|
|
@@ -1385,7 +1356,7 @@ class $ extends _ {
|
|
|
1385
1356
|
return this.setLimit("max", e, !1, p.toString(t));
|
|
1386
1357
|
}
|
|
1387
1358
|
setLimit(e, t, n, a) {
|
|
1388
|
-
return new
|
|
1359
|
+
return new P({
|
|
1389
1360
|
...this._def,
|
|
1390
1361
|
checks: [
|
|
1391
1362
|
...this._def.checks,
|
|
@@ -1399,7 +1370,7 @@ class $ extends _ {
|
|
|
1399
1370
|
});
|
|
1400
1371
|
}
|
|
1401
1372
|
_addCheck(e) {
|
|
1402
|
-
return new
|
|
1373
|
+
return new P({
|
|
1403
1374
|
...this._def,
|
|
1404
1375
|
checks: [...this._def.checks, e]
|
|
1405
1376
|
});
|
|
@@ -1493,9 +1464,9 @@ class $ extends _ {
|
|
|
1493
1464
|
return Number.isFinite(t) && Number.isFinite(e);
|
|
1494
1465
|
}
|
|
1495
1466
|
}
|
|
1496
|
-
|
|
1467
|
+
P.create = (r) => new P({
|
|
1497
1468
|
checks: [],
|
|
1498
|
-
typeName:
|
|
1469
|
+
typeName: h.ZodNumber,
|
|
1499
1470
|
coerce: (r == null ? void 0 : r.coerce) || !1,
|
|
1500
1471
|
...v(r)
|
|
1501
1472
|
});
|
|
@@ -1505,33 +1476,33 @@ class V extends _ {
|
|
|
1505
1476
|
}
|
|
1506
1477
|
_parse(e) {
|
|
1507
1478
|
if (this._def.coerce && (e.data = BigInt(e.data)), this._getType(e) !== f.bigint) {
|
|
1508
|
-
const
|
|
1509
|
-
return u(
|
|
1479
|
+
const s = this._getOrReturnCtx(e);
|
|
1480
|
+
return u(s, {
|
|
1510
1481
|
code: d.invalid_type,
|
|
1511
1482
|
expected: f.bigint,
|
|
1512
|
-
received:
|
|
1483
|
+
received: s.parsedType
|
|
1513
1484
|
}), y;
|
|
1514
1485
|
}
|
|
1515
1486
|
let n;
|
|
1516
1487
|
const a = new k();
|
|
1517
|
-
for (const
|
|
1518
|
-
|
|
1488
|
+
for (const s of this._def.checks)
|
|
1489
|
+
s.kind === "min" ? (s.inclusive ? e.data < s.value : e.data <= s.value) && (n = this._getOrReturnCtx(e, n), u(n, {
|
|
1519
1490
|
code: d.too_small,
|
|
1520
1491
|
type: "bigint",
|
|
1521
|
-
minimum:
|
|
1522
|
-
inclusive:
|
|
1523
|
-
message:
|
|
1524
|
-
}), a.dirty()) :
|
|
1492
|
+
minimum: s.value,
|
|
1493
|
+
inclusive: s.inclusive,
|
|
1494
|
+
message: s.message
|
|
1495
|
+
}), a.dirty()) : s.kind === "max" ? (s.inclusive ? e.data > s.value : e.data >= s.value) && (n = this._getOrReturnCtx(e, n), u(n, {
|
|
1525
1496
|
code: d.too_big,
|
|
1526
1497
|
type: "bigint",
|
|
1527
|
-
maximum:
|
|
1528
|
-
inclusive:
|
|
1529
|
-
message:
|
|
1530
|
-
}), a.dirty()) :
|
|
1498
|
+
maximum: s.value,
|
|
1499
|
+
inclusive: s.inclusive,
|
|
1500
|
+
message: s.message
|
|
1501
|
+
}), a.dirty()) : s.kind === "multipleOf" ? e.data % s.value !== BigInt(0) && (n = this._getOrReturnCtx(e, n), u(n, {
|
|
1531
1502
|
code: d.not_multiple_of,
|
|
1532
|
-
multipleOf:
|
|
1533
|
-
message:
|
|
1534
|
-
}), a.dirty()) : b.assertNever(
|
|
1503
|
+
multipleOf: s.value,
|
|
1504
|
+
message: s.message
|
|
1505
|
+
}), a.dirty()) : b.assertNever(s);
|
|
1535
1506
|
return { status: a.value, value: e.data };
|
|
1536
1507
|
}
|
|
1537
1508
|
gte(e, t) {
|
|
@@ -1622,12 +1593,12 @@ V.create = (r) => {
|
|
|
1622
1593
|
var e;
|
|
1623
1594
|
return new V({
|
|
1624
1595
|
checks: [],
|
|
1625
|
-
typeName:
|
|
1596
|
+
typeName: h.ZodBigInt,
|
|
1626
1597
|
coerce: (e = r == null ? void 0 : r.coerce) !== null && e !== void 0 ? e : !1,
|
|
1627
1598
|
...v(r)
|
|
1628
1599
|
});
|
|
1629
1600
|
};
|
|
1630
|
-
class
|
|
1601
|
+
class re extends _ {
|
|
1631
1602
|
_parse(e) {
|
|
1632
1603
|
if (this._def.coerce && (e.data = !!e.data), this._getType(e) !== f.boolean) {
|
|
1633
1604
|
const n = this._getOrReturnCtx(e);
|
|
@@ -1640,52 +1611,52 @@ class te extends _ {
|
|
|
1640
1611
|
return T(e.data);
|
|
1641
1612
|
}
|
|
1642
1613
|
}
|
|
1643
|
-
|
|
1644
|
-
typeName:
|
|
1614
|
+
re.create = (r) => new re({
|
|
1615
|
+
typeName: h.ZodBoolean,
|
|
1645
1616
|
coerce: (r == null ? void 0 : r.coerce) || !1,
|
|
1646
1617
|
...v(r)
|
|
1647
1618
|
});
|
|
1648
|
-
class
|
|
1619
|
+
class F extends _ {
|
|
1649
1620
|
_parse(e) {
|
|
1650
1621
|
if (this._def.coerce && (e.data = new Date(e.data)), this._getType(e) !== f.date) {
|
|
1651
|
-
const
|
|
1652
|
-
return u(
|
|
1622
|
+
const s = this._getOrReturnCtx(e);
|
|
1623
|
+
return u(s, {
|
|
1653
1624
|
code: d.invalid_type,
|
|
1654
1625
|
expected: f.date,
|
|
1655
|
-
received:
|
|
1626
|
+
received: s.parsedType
|
|
1656
1627
|
}), y;
|
|
1657
1628
|
}
|
|
1658
1629
|
if (isNaN(e.data.getTime())) {
|
|
1659
|
-
const
|
|
1660
|
-
return u(
|
|
1630
|
+
const s = this._getOrReturnCtx(e);
|
|
1631
|
+
return u(s, {
|
|
1661
1632
|
code: d.invalid_date
|
|
1662
1633
|
}), y;
|
|
1663
1634
|
}
|
|
1664
1635
|
const n = new k();
|
|
1665
1636
|
let a;
|
|
1666
|
-
for (const
|
|
1667
|
-
|
|
1637
|
+
for (const s of this._def.checks)
|
|
1638
|
+
s.kind === "min" ? e.data.getTime() < s.value && (a = this._getOrReturnCtx(e, a), u(a, {
|
|
1668
1639
|
code: d.too_small,
|
|
1669
|
-
message:
|
|
1640
|
+
message: s.message,
|
|
1670
1641
|
inclusive: !0,
|
|
1671
1642
|
exact: !1,
|
|
1672
|
-
minimum:
|
|
1643
|
+
minimum: s.value,
|
|
1673
1644
|
type: "date"
|
|
1674
|
-
}), n.dirty()) :
|
|
1645
|
+
}), n.dirty()) : s.kind === "max" ? e.data.getTime() > s.value && (a = this._getOrReturnCtx(e, a), u(a, {
|
|
1675
1646
|
code: d.too_big,
|
|
1676
|
-
message:
|
|
1647
|
+
message: s.message,
|
|
1677
1648
|
inclusive: !0,
|
|
1678
1649
|
exact: !1,
|
|
1679
|
-
maximum:
|
|
1650
|
+
maximum: s.value,
|
|
1680
1651
|
type: "date"
|
|
1681
|
-
}), n.dirty()) : b.assertNever(
|
|
1652
|
+
}), n.dirty()) : b.assertNever(s);
|
|
1682
1653
|
return {
|
|
1683
1654
|
status: n.value,
|
|
1684
1655
|
value: new Date(e.data.getTime())
|
|
1685
1656
|
};
|
|
1686
1657
|
}
|
|
1687
1658
|
_addCheck(e) {
|
|
1688
|
-
return new
|
|
1659
|
+
return new F({
|
|
1689
1660
|
...this._def,
|
|
1690
1661
|
checks: [...this._def.checks, e]
|
|
1691
1662
|
});
|
|
@@ -1717,10 +1688,10 @@ class U extends _ {
|
|
|
1717
1688
|
return e != null ? new Date(e) : null;
|
|
1718
1689
|
}
|
|
1719
1690
|
}
|
|
1720
|
-
|
|
1691
|
+
F.create = (r) => new F({
|
|
1721
1692
|
checks: [],
|
|
1722
1693
|
coerce: (r == null ? void 0 : r.coerce) || !1,
|
|
1723
|
-
typeName:
|
|
1694
|
+
typeName: h.ZodDate,
|
|
1724
1695
|
...v(r)
|
|
1725
1696
|
});
|
|
1726
1697
|
class be extends _ {
|
|
@@ -1737,10 +1708,10 @@ class be extends _ {
|
|
|
1737
1708
|
}
|
|
1738
1709
|
}
|
|
1739
1710
|
be.create = (r) => new be({
|
|
1740
|
-
typeName:
|
|
1711
|
+
typeName: h.ZodSymbol,
|
|
1741
1712
|
...v(r)
|
|
1742
1713
|
});
|
|
1743
|
-
class
|
|
1714
|
+
class ne extends _ {
|
|
1744
1715
|
_parse(e) {
|
|
1745
1716
|
if (this._getType(e) !== f.undefined) {
|
|
1746
1717
|
const n = this._getOrReturnCtx(e);
|
|
@@ -1753,11 +1724,11 @@ class re extends _ {
|
|
|
1753
1724
|
return T(e.data);
|
|
1754
1725
|
}
|
|
1755
1726
|
}
|
|
1756
|
-
|
|
1757
|
-
typeName:
|
|
1727
|
+
ne.create = (r) => new ne({
|
|
1728
|
+
typeName: h.ZodUndefined,
|
|
1758
1729
|
...v(r)
|
|
1759
1730
|
});
|
|
1760
|
-
class
|
|
1731
|
+
class ae extends _ {
|
|
1761
1732
|
_parse(e) {
|
|
1762
1733
|
if (this._getType(e) !== f.null) {
|
|
1763
1734
|
const n = this._getOrReturnCtx(e);
|
|
@@ -1770,11 +1741,11 @@ class ne extends _ {
|
|
|
1770
1741
|
return T(e.data);
|
|
1771
1742
|
}
|
|
1772
1743
|
}
|
|
1773
|
-
|
|
1774
|
-
typeName:
|
|
1744
|
+
ae.create = (r) => new ae({
|
|
1745
|
+
typeName: h.ZodNull,
|
|
1775
1746
|
...v(r)
|
|
1776
1747
|
});
|
|
1777
|
-
class
|
|
1748
|
+
class Y extends _ {
|
|
1778
1749
|
constructor() {
|
|
1779
1750
|
super(...arguments), this._any = !0;
|
|
1780
1751
|
}
|
|
@@ -1782,11 +1753,11 @@ class J extends _ {
|
|
|
1782
1753
|
return T(e.data);
|
|
1783
1754
|
}
|
|
1784
1755
|
}
|
|
1785
|
-
|
|
1786
|
-
typeName:
|
|
1756
|
+
Y.create = (r) => new Y({
|
|
1757
|
+
typeName: h.ZodAny,
|
|
1787
1758
|
...v(r)
|
|
1788
1759
|
});
|
|
1789
|
-
class
|
|
1760
|
+
class U extends _ {
|
|
1790
1761
|
constructor() {
|
|
1791
1762
|
super(...arguments), this._unknown = !0;
|
|
1792
1763
|
}
|
|
@@ -1794,11 +1765,11 @@ class B extends _ {
|
|
|
1794
1765
|
return T(e.data);
|
|
1795
1766
|
}
|
|
1796
1767
|
}
|
|
1797
|
-
|
|
1798
|
-
typeName:
|
|
1768
|
+
U.create = (r) => new U({
|
|
1769
|
+
typeName: h.ZodUnknown,
|
|
1799
1770
|
...v(r)
|
|
1800
1771
|
});
|
|
1801
|
-
class
|
|
1772
|
+
class D extends _ {
|
|
1802
1773
|
_parse(e) {
|
|
1803
1774
|
const t = this._getOrReturnCtx(e);
|
|
1804
1775
|
return u(t, {
|
|
@@ -1808,8 +1779,8 @@ class M extends _ {
|
|
|
1808
1779
|
}), y;
|
|
1809
1780
|
}
|
|
1810
1781
|
}
|
|
1811
|
-
|
|
1812
|
-
typeName:
|
|
1782
|
+
D.create = (r) => new D({
|
|
1783
|
+
typeName: h.ZodNever,
|
|
1813
1784
|
...v(r)
|
|
1814
1785
|
});
|
|
1815
1786
|
class we extends _ {
|
|
@@ -1826,7 +1797,7 @@ class we extends _ {
|
|
|
1826
1797
|
}
|
|
1827
1798
|
}
|
|
1828
1799
|
we.create = (r) => new we({
|
|
1829
|
-
typeName:
|
|
1800
|
+
typeName: h.ZodVoid,
|
|
1830
1801
|
...v(r)
|
|
1831
1802
|
});
|
|
1832
1803
|
class S extends _ {
|
|
@@ -1839,11 +1810,11 @@ class S extends _ {
|
|
|
1839
1810
|
received: t.parsedType
|
|
1840
1811
|
}), y;
|
|
1841
1812
|
if (a.exactLength !== null) {
|
|
1842
|
-
const
|
|
1843
|
-
(
|
|
1844
|
-
code:
|
|
1813
|
+
const i = t.data.length > a.exactLength.value, o = t.data.length < a.exactLength.value;
|
|
1814
|
+
(i || o) && (u(t, {
|
|
1815
|
+
code: i ? d.too_big : d.too_small,
|
|
1845
1816
|
minimum: o ? a.exactLength.value : void 0,
|
|
1846
|
-
maximum:
|
|
1817
|
+
maximum: i ? a.exactLength.value : void 0,
|
|
1847
1818
|
type: "array",
|
|
1848
1819
|
inclusive: !0,
|
|
1849
1820
|
exact: !0,
|
|
@@ -1865,9 +1836,9 @@ class S extends _ {
|
|
|
1865
1836
|
exact: !1,
|
|
1866
1837
|
message: a.maxLength.message
|
|
1867
1838
|
}), n.dirty()), t.common.async)
|
|
1868
|
-
return Promise.all([...t.data].map((
|
|
1869
|
-
const
|
|
1870
|
-
return k.mergeArray(n,
|
|
1839
|
+
return Promise.all([...t.data].map((i, o) => a.type._parseAsync(new I(t, i, t.path, o)))).then((i) => k.mergeArray(n, i));
|
|
1840
|
+
const s = [...t.data].map((i, o) => a.type._parseSync(new I(t, i, t.path, o)));
|
|
1841
|
+
return k.mergeArray(n, s);
|
|
1871
1842
|
}
|
|
1872
1843
|
get element() {
|
|
1873
1844
|
return this._def.type;
|
|
@@ -1899,15 +1870,15 @@ S.create = (r, e) => new S({
|
|
|
1899
1870
|
minLength: null,
|
|
1900
1871
|
maxLength: null,
|
|
1901
1872
|
exactLength: null,
|
|
1902
|
-
typeName:
|
|
1873
|
+
typeName: h.ZodArray,
|
|
1903
1874
|
...v(e)
|
|
1904
1875
|
});
|
|
1905
|
-
function
|
|
1876
|
+
function q(r) {
|
|
1906
1877
|
if (r instanceof w) {
|
|
1907
1878
|
const e = {};
|
|
1908
1879
|
for (const t in r.shape) {
|
|
1909
1880
|
const n = r.shape[t];
|
|
1910
|
-
e[t] =
|
|
1881
|
+
e[t] = O.create(q(n));
|
|
1911
1882
|
}
|
|
1912
1883
|
return new w({
|
|
1913
1884
|
...r._def,
|
|
@@ -1915,8 +1886,8 @@ function W(r) {
|
|
|
1915
1886
|
});
|
|
1916
1887
|
} else return r instanceof S ? new S({
|
|
1917
1888
|
...r._def,
|
|
1918
|
-
type:
|
|
1919
|
-
}) : r instanceof
|
|
1889
|
+
type: q(r.element)
|
|
1890
|
+
}) : r instanceof O ? O.create(q(r.unwrap())) : r instanceof B ? B.create(q(r.unwrap())) : r instanceof R ? R.create(r.items.map((e) => q(e))) : r;
|
|
1920
1891
|
}
|
|
1921
1892
|
class w extends _ {
|
|
1922
1893
|
constructor() {
|
|
@@ -1930,66 +1901,66 @@ class w extends _ {
|
|
|
1930
1901
|
}
|
|
1931
1902
|
_parse(e) {
|
|
1932
1903
|
if (this._getType(e) !== f.object) {
|
|
1933
|
-
const
|
|
1934
|
-
return u(
|
|
1904
|
+
const l = this._getOrReturnCtx(e);
|
|
1905
|
+
return u(l, {
|
|
1935
1906
|
code: d.invalid_type,
|
|
1936
1907
|
expected: f.object,
|
|
1937
|
-
received:
|
|
1908
|
+
received: l.parsedType
|
|
1938
1909
|
}), y;
|
|
1939
1910
|
}
|
|
1940
|
-
const { status: n, ctx: a } = this._processInputParams(e), { shape:
|
|
1941
|
-
if (!(this._def.catchall instanceof
|
|
1942
|
-
for (const
|
|
1943
|
-
|
|
1944
|
-
const
|
|
1945
|
-
for (const
|
|
1946
|
-
const
|
|
1947
|
-
|
|
1948
|
-
key: { status: "valid", value:
|
|
1949
|
-
value:
|
|
1950
|
-
alwaysSet:
|
|
1911
|
+
const { status: n, ctx: a } = this._processInputParams(e), { shape: s, keys: i } = this._getCached(), o = [];
|
|
1912
|
+
if (!(this._def.catchall instanceof D && this._def.unknownKeys === "strip"))
|
|
1913
|
+
for (const l in a.data)
|
|
1914
|
+
i.includes(l) || o.push(l);
|
|
1915
|
+
const c = [];
|
|
1916
|
+
for (const l of i) {
|
|
1917
|
+
const m = s[l], C = a.data[l];
|
|
1918
|
+
c.push({
|
|
1919
|
+
key: { status: "valid", value: l },
|
|
1920
|
+
value: m._parse(new I(a, C, a.path, l)),
|
|
1921
|
+
alwaysSet: l in a.data
|
|
1951
1922
|
});
|
|
1952
1923
|
}
|
|
1953
|
-
if (this._def.catchall instanceof
|
|
1954
|
-
const
|
|
1955
|
-
if (
|
|
1956
|
-
for (const
|
|
1957
|
-
|
|
1958
|
-
key: { status: "valid", value:
|
|
1959
|
-
value: { status: "valid", value: a.data[
|
|
1924
|
+
if (this._def.catchall instanceof D) {
|
|
1925
|
+
const l = this._def.unknownKeys;
|
|
1926
|
+
if (l === "passthrough")
|
|
1927
|
+
for (const m of o)
|
|
1928
|
+
c.push({
|
|
1929
|
+
key: { status: "valid", value: m },
|
|
1930
|
+
value: { status: "valid", value: a.data[m] }
|
|
1960
1931
|
});
|
|
1961
|
-
else if (
|
|
1932
|
+
else if (l === "strict")
|
|
1962
1933
|
o.length > 0 && (u(a, {
|
|
1963
1934
|
code: d.unrecognized_keys,
|
|
1964
1935
|
keys: o
|
|
1965
1936
|
}), n.dirty());
|
|
1966
|
-
else if (
|
|
1937
|
+
else if (l !== "strip") throw new Error("Internal ZodObject error: invalid unknownKeys value.");
|
|
1967
1938
|
} else {
|
|
1968
|
-
const
|
|
1969
|
-
for (const
|
|
1970
|
-
const C = a.data[
|
|
1971
|
-
|
|
1972
|
-
key: { status: "valid", value:
|
|
1973
|
-
value:
|
|
1974
|
-
new
|
|
1939
|
+
const l = this._def.catchall;
|
|
1940
|
+
for (const m of o) {
|
|
1941
|
+
const C = a.data[m];
|
|
1942
|
+
c.push({
|
|
1943
|
+
key: { status: "valid", value: m },
|
|
1944
|
+
value: l._parse(
|
|
1945
|
+
new I(a, C, a.path, m)
|
|
1975
1946
|
//, ctx.child(key), value, getParsedType(value)
|
|
1976
1947
|
),
|
|
1977
|
-
alwaysSet:
|
|
1948
|
+
alwaysSet: m in a.data
|
|
1978
1949
|
});
|
|
1979
1950
|
}
|
|
1980
1951
|
}
|
|
1981
1952
|
return a.common.async ? Promise.resolve().then(async () => {
|
|
1982
|
-
const
|
|
1983
|
-
for (const
|
|
1984
|
-
const C = await
|
|
1985
|
-
|
|
1953
|
+
const l = [];
|
|
1954
|
+
for (const m of c) {
|
|
1955
|
+
const C = await m.key, ye = await m.value;
|
|
1956
|
+
l.push({
|
|
1986
1957
|
key: C,
|
|
1987
|
-
value:
|
|
1988
|
-
alwaysSet:
|
|
1958
|
+
value: ye,
|
|
1959
|
+
alwaysSet: m.alwaysSet
|
|
1989
1960
|
});
|
|
1990
1961
|
}
|
|
1991
|
-
return
|
|
1992
|
-
}).then((
|
|
1962
|
+
return l;
|
|
1963
|
+
}).then((l) => k.mergeObjectSync(n, l)) : k.mergeObjectSync(n, c);
|
|
1993
1964
|
}
|
|
1994
1965
|
get shape() {
|
|
1995
1966
|
return this._def.shape();
|
|
@@ -2000,12 +1971,12 @@ class w extends _ {
|
|
|
2000
1971
|
unknownKeys: "strict",
|
|
2001
1972
|
...e !== void 0 ? {
|
|
2002
1973
|
errorMap: (t, n) => {
|
|
2003
|
-
var a,
|
|
2004
|
-
const
|
|
1974
|
+
var a, s, i, o;
|
|
1975
|
+
const c = (i = (s = (a = this._def).errorMap) === null || s === void 0 ? void 0 : s.call(a, t, n).message) !== null && i !== void 0 ? i : n.defaultError;
|
|
2005
1976
|
return t.code === "unrecognized_keys" ? {
|
|
2006
|
-
message: (o = p.errToObj(e).message) !== null && o !== void 0 ? o :
|
|
1977
|
+
message: (o = p.errToObj(e).message) !== null && o !== void 0 ? o : c
|
|
2007
1978
|
} : {
|
|
2008
|
-
message:
|
|
1979
|
+
message: c
|
|
2009
1980
|
};
|
|
2010
1981
|
}
|
|
2011
1982
|
} : {}
|
|
@@ -2062,7 +2033,7 @@ class w extends _ {
|
|
|
2062
2033
|
...this._def.shape(),
|
|
2063
2034
|
...e._def.shape()
|
|
2064
2035
|
}),
|
|
2065
|
-
typeName:
|
|
2036
|
+
typeName: h.ZodObject
|
|
2066
2037
|
});
|
|
2067
2038
|
}
|
|
2068
2039
|
// merge<
|
|
@@ -2152,7 +2123,7 @@ class w extends _ {
|
|
|
2152
2123
|
* @deprecated
|
|
2153
2124
|
*/
|
|
2154
2125
|
deepPartial() {
|
|
2155
|
-
return
|
|
2126
|
+
return q(this);
|
|
2156
2127
|
}
|
|
2157
2128
|
partial(e) {
|
|
2158
2129
|
const t = {};
|
|
@@ -2170,10 +2141,10 @@ class w extends _ {
|
|
|
2170
2141
|
if (e && !e[n])
|
|
2171
2142
|
t[n] = this.shape[n];
|
|
2172
2143
|
else {
|
|
2173
|
-
let
|
|
2174
|
-
for (;
|
|
2175
|
-
|
|
2176
|
-
t[n] =
|
|
2144
|
+
let s = this.shape[n];
|
|
2145
|
+
for (; s instanceof O; )
|
|
2146
|
+
s = s._def.innerType;
|
|
2147
|
+
t[n] = s;
|
|
2177
2148
|
}
|
|
2178
2149
|
}), new w({
|
|
2179
2150
|
...this._def,
|
|
@@ -2187,43 +2158,43 @@ class w extends _ {
|
|
|
2187
2158
|
w.create = (r, e) => new w({
|
|
2188
2159
|
shape: () => r,
|
|
2189
2160
|
unknownKeys: "strip",
|
|
2190
|
-
catchall:
|
|
2191
|
-
typeName:
|
|
2161
|
+
catchall: D.create(),
|
|
2162
|
+
typeName: h.ZodObject,
|
|
2192
2163
|
...v(e)
|
|
2193
2164
|
});
|
|
2194
2165
|
w.strictCreate = (r, e) => new w({
|
|
2195
2166
|
shape: () => r,
|
|
2196
2167
|
unknownKeys: "strict",
|
|
2197
|
-
catchall:
|
|
2198
|
-
typeName:
|
|
2168
|
+
catchall: D.create(),
|
|
2169
|
+
typeName: h.ZodObject,
|
|
2199
2170
|
...v(e)
|
|
2200
2171
|
});
|
|
2201
2172
|
w.lazycreate = (r, e) => new w({
|
|
2202
2173
|
shape: r,
|
|
2203
2174
|
unknownKeys: "strip",
|
|
2204
|
-
catchall:
|
|
2205
|
-
typeName:
|
|
2175
|
+
catchall: D.create(),
|
|
2176
|
+
typeName: h.ZodObject,
|
|
2206
2177
|
...v(e)
|
|
2207
2178
|
});
|
|
2208
|
-
class
|
|
2179
|
+
class se extends _ {
|
|
2209
2180
|
_parse(e) {
|
|
2210
2181
|
const { ctx: t } = this._processInputParams(e), n = this._def.options;
|
|
2211
|
-
function a(
|
|
2212
|
-
for (const o of
|
|
2182
|
+
function a(s) {
|
|
2183
|
+
for (const o of s)
|
|
2213
2184
|
if (o.result.status === "valid")
|
|
2214
2185
|
return o.result;
|
|
2215
|
-
for (const o of
|
|
2186
|
+
for (const o of s)
|
|
2216
2187
|
if (o.result.status === "dirty")
|
|
2217
2188
|
return t.common.issues.push(...o.ctx.common.issues), o.result;
|
|
2218
|
-
const
|
|
2189
|
+
const i = s.map((o) => new N(o.ctx.common.issues));
|
|
2219
2190
|
return u(t, {
|
|
2220
2191
|
code: d.invalid_union,
|
|
2221
|
-
unionErrors:
|
|
2192
|
+
unionErrors: i
|
|
2222
2193
|
}), y;
|
|
2223
2194
|
}
|
|
2224
2195
|
if (t.common.async)
|
|
2225
|
-
return Promise.all(n.map(async (
|
|
2226
|
-
const
|
|
2196
|
+
return Promise.all(n.map(async (s) => {
|
|
2197
|
+
const i = {
|
|
2227
2198
|
...t,
|
|
2228
2199
|
common: {
|
|
2229
2200
|
...t.common,
|
|
@@ -2232,37 +2203,37 @@ class ae extends _ {
|
|
|
2232
2203
|
parent: null
|
|
2233
2204
|
};
|
|
2234
2205
|
return {
|
|
2235
|
-
result: await
|
|
2206
|
+
result: await s._parseAsync({
|
|
2236
2207
|
data: t.data,
|
|
2237
2208
|
path: t.path,
|
|
2238
|
-
parent:
|
|
2209
|
+
parent: i
|
|
2239
2210
|
}),
|
|
2240
|
-
ctx:
|
|
2211
|
+
ctx: i
|
|
2241
2212
|
};
|
|
2242
2213
|
})).then(a);
|
|
2243
2214
|
{
|
|
2244
|
-
let
|
|
2245
|
-
const
|
|
2246
|
-
for (const
|
|
2247
|
-
const
|
|
2215
|
+
let s;
|
|
2216
|
+
const i = [];
|
|
2217
|
+
for (const c of n) {
|
|
2218
|
+
const l = {
|
|
2248
2219
|
...t,
|
|
2249
2220
|
common: {
|
|
2250
2221
|
...t.common,
|
|
2251
2222
|
issues: []
|
|
2252
2223
|
},
|
|
2253
2224
|
parent: null
|
|
2254
|
-
},
|
|
2225
|
+
}, m = c._parseSync({
|
|
2255
2226
|
data: t.data,
|
|
2256
2227
|
path: t.path,
|
|
2257
|
-
parent:
|
|
2228
|
+
parent: l
|
|
2258
2229
|
});
|
|
2259
|
-
if (
|
|
2260
|
-
return
|
|
2261
|
-
|
|
2230
|
+
if (m.status === "valid")
|
|
2231
|
+
return m;
|
|
2232
|
+
m.status === "dirty" && !s && (s = { result: m, ctx: l }), l.common.issues.length && i.push(l.common.issues);
|
|
2262
2233
|
}
|
|
2263
|
-
if (
|
|
2264
|
-
return t.common.issues.push(...
|
|
2265
|
-
const o =
|
|
2234
|
+
if (s)
|
|
2235
|
+
return t.common.issues.push(...s.ctx.common.issues), s.result;
|
|
2236
|
+
const o = i.map((c) => new N(c));
|
|
2266
2237
|
return u(t, {
|
|
2267
2238
|
code: d.invalid_union,
|
|
2268
2239
|
unionErrors: o
|
|
@@ -2273,13 +2244,13 @@ class ae extends _ {
|
|
|
2273
2244
|
return this._def.options;
|
|
2274
2245
|
}
|
|
2275
2246
|
}
|
|
2276
|
-
|
|
2247
|
+
se.create = (r, e) => new se({
|
|
2277
2248
|
options: r,
|
|
2278
|
-
typeName:
|
|
2249
|
+
typeName: h.ZodUnion,
|
|
2279
2250
|
...v(e)
|
|
2280
2251
|
});
|
|
2281
|
-
const
|
|
2282
|
-
class
|
|
2252
|
+
const A = (r) => r instanceof de ? A(r.schema) : r instanceof Z ? A(r.innerType()) : r instanceof le ? [r.value] : r instanceof z ? r.options : r instanceof ce ? b.objectValues(r.enum) : r instanceof ue ? A(r._def.innerType) : r instanceof ne ? [void 0] : r instanceof ae ? [null] : r instanceof O ? [void 0, ...A(r.unwrap())] : r instanceof B ? [null, ...A(r.unwrap())] : r instanceof $e || r instanceof pe ? A(r.unwrap()) : r instanceof fe ? A(r._def.innerType) : [];
|
|
2253
|
+
class Se extends _ {
|
|
2283
2254
|
_parse(e) {
|
|
2284
2255
|
const { ctx: t } = this._processInputParams(e);
|
|
2285
2256
|
if (t.parsedType !== f.object)
|
|
@@ -2288,12 +2259,12 @@ class Ce extends _ {
|
|
|
2288
2259
|
expected: f.object,
|
|
2289
2260
|
received: t.parsedType
|
|
2290
2261
|
}), y;
|
|
2291
|
-
const n = this.discriminator, a = t.data[n],
|
|
2292
|
-
return
|
|
2262
|
+
const n = this.discriminator, a = t.data[n], s = this.optionsMap.get(a);
|
|
2263
|
+
return s ? t.common.async ? s._parseAsync({
|
|
2293
2264
|
data: t.data,
|
|
2294
2265
|
path: t.path,
|
|
2295
2266
|
parent: t
|
|
2296
|
-
}) :
|
|
2267
|
+
}) : s._parseSync({
|
|
2297
2268
|
data: t.data,
|
|
2298
2269
|
path: t.path,
|
|
2299
2270
|
parent: t
|
|
@@ -2322,18 +2293,18 @@ class Ce extends _ {
|
|
|
2322
2293
|
*/
|
|
2323
2294
|
static create(e, t, n) {
|
|
2324
2295
|
const a = /* @__PURE__ */ new Map();
|
|
2325
|
-
for (const
|
|
2326
|
-
const
|
|
2327
|
-
if (!
|
|
2296
|
+
for (const s of t) {
|
|
2297
|
+
const i = A(s.shape[e]);
|
|
2298
|
+
if (!i.length)
|
|
2328
2299
|
throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);
|
|
2329
|
-
for (const o of
|
|
2300
|
+
for (const o of i) {
|
|
2330
2301
|
if (a.has(o))
|
|
2331
2302
|
throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);
|
|
2332
|
-
a.set(o,
|
|
2303
|
+
a.set(o, s);
|
|
2333
2304
|
}
|
|
2334
2305
|
}
|
|
2335
|
-
return new
|
|
2336
|
-
typeName:
|
|
2306
|
+
return new Se({
|
|
2307
|
+
typeName: h.ZodDiscriminatedUnion,
|
|
2337
2308
|
discriminator: e,
|
|
2338
2309
|
options: t,
|
|
2339
2310
|
optionsMap: a,
|
|
@@ -2341,39 +2312,39 @@ class Ce extends _ {
|
|
|
2341
2312
|
});
|
|
2342
2313
|
}
|
|
2343
2314
|
}
|
|
2344
|
-
function
|
|
2345
|
-
const t =
|
|
2315
|
+
function Le(r, e) {
|
|
2316
|
+
const t = M(r), n = M(e);
|
|
2346
2317
|
if (r === e)
|
|
2347
2318
|
return { valid: !0, data: r };
|
|
2348
2319
|
if (t === f.object && n === f.object) {
|
|
2349
|
-
const a = b.objectKeys(e),
|
|
2350
|
-
for (const o of
|
|
2351
|
-
const
|
|
2352
|
-
if (!
|
|
2320
|
+
const a = b.objectKeys(e), s = b.objectKeys(r).filter((o) => a.indexOf(o) !== -1), i = { ...r, ...e };
|
|
2321
|
+
for (const o of s) {
|
|
2322
|
+
const c = Le(r[o], e[o]);
|
|
2323
|
+
if (!c.valid)
|
|
2353
2324
|
return { valid: !1 };
|
|
2354
|
-
|
|
2325
|
+
i[o] = c.data;
|
|
2355
2326
|
}
|
|
2356
|
-
return { valid: !0, data:
|
|
2327
|
+
return { valid: !0, data: i };
|
|
2357
2328
|
} else if (t === f.array && n === f.array) {
|
|
2358
2329
|
if (r.length !== e.length)
|
|
2359
2330
|
return { valid: !1 };
|
|
2360
2331
|
const a = [];
|
|
2361
|
-
for (let
|
|
2362
|
-
const
|
|
2363
|
-
if (!
|
|
2332
|
+
for (let s = 0; s < r.length; s++) {
|
|
2333
|
+
const i = r[s], o = e[s], c = Le(i, o);
|
|
2334
|
+
if (!c.valid)
|
|
2364
2335
|
return { valid: !1 };
|
|
2365
|
-
a.push(
|
|
2336
|
+
a.push(c.data);
|
|
2366
2337
|
}
|
|
2367
2338
|
return { valid: !0, data: a };
|
|
2368
2339
|
} else return t === f.date && n === f.date && +r == +e ? { valid: !0, data: r } : { valid: !1 };
|
|
2369
2340
|
}
|
|
2370
2341
|
class ie extends _ {
|
|
2371
2342
|
_parse(e) {
|
|
2372
|
-
const { status: t, ctx: n } = this._processInputParams(e), a = (
|
|
2373
|
-
if (
|
|
2343
|
+
const { status: t, ctx: n } = this._processInputParams(e), a = (s, i) => {
|
|
2344
|
+
if (Ae(s) || Ae(i))
|
|
2374
2345
|
return y;
|
|
2375
|
-
const o =
|
|
2376
|
-
return o.valid ? ((
|
|
2346
|
+
const o = Le(s.value, i.value);
|
|
2347
|
+
return o.valid ? ((De(s) || De(i)) && t.dirty(), { status: t.value, value: o.data }) : (u(n, {
|
|
2377
2348
|
code: d.invalid_intersection_types
|
|
2378
2349
|
}), y);
|
|
2379
2350
|
};
|
|
@@ -2388,7 +2359,7 @@ class ie extends _ {
|
|
|
2388
2359
|
path: n.path,
|
|
2389
2360
|
parent: n
|
|
2390
2361
|
})
|
|
2391
|
-
]).then(([
|
|
2362
|
+
]).then(([s, i]) => a(s, i)) : a(this._def.left._parseSync({
|
|
2392
2363
|
data: n.data,
|
|
2393
2364
|
path: n.path,
|
|
2394
2365
|
parent: n
|
|
@@ -2402,10 +2373,10 @@ class ie extends _ {
|
|
|
2402
2373
|
ie.create = (r, e, t) => new ie({
|
|
2403
2374
|
left: r,
|
|
2404
2375
|
right: e,
|
|
2405
|
-
typeName:
|
|
2376
|
+
typeName: h.ZodIntersection,
|
|
2406
2377
|
...v(t)
|
|
2407
2378
|
});
|
|
2408
|
-
class
|
|
2379
|
+
class R extends _ {
|
|
2409
2380
|
_parse(e) {
|
|
2410
2381
|
const { status: t, ctx: n } = this._processInputParams(e);
|
|
2411
2382
|
if (n.parsedType !== f.array)
|
|
@@ -2429,33 +2400,33 @@ class A extends _ {
|
|
|
2429
2400
|
exact: !1,
|
|
2430
2401
|
type: "array"
|
|
2431
2402
|
}), t.dirty());
|
|
2432
|
-
const
|
|
2433
|
-
const
|
|
2434
|
-
return
|
|
2435
|
-
}).filter((
|
|
2436
|
-
return n.common.async ? Promise.all(
|
|
2403
|
+
const s = [...n.data].map((i, o) => {
|
|
2404
|
+
const c = this._def.items[o] || this._def.rest;
|
|
2405
|
+
return c ? c._parse(new I(n, i, n.path, o)) : null;
|
|
2406
|
+
}).filter((i) => !!i);
|
|
2407
|
+
return n.common.async ? Promise.all(s).then((i) => k.mergeArray(t, i)) : k.mergeArray(t, s);
|
|
2437
2408
|
}
|
|
2438
2409
|
get items() {
|
|
2439
2410
|
return this._def.items;
|
|
2440
2411
|
}
|
|
2441
2412
|
rest(e) {
|
|
2442
|
-
return new
|
|
2413
|
+
return new R({
|
|
2443
2414
|
...this._def,
|
|
2444
2415
|
rest: e
|
|
2445
2416
|
});
|
|
2446
2417
|
}
|
|
2447
2418
|
}
|
|
2448
|
-
|
|
2419
|
+
R.create = (r, e) => {
|
|
2449
2420
|
if (!Array.isArray(r))
|
|
2450
2421
|
throw new Error("You must pass an array of schemas to z.tuple([ ... ])");
|
|
2451
|
-
return new
|
|
2422
|
+
return new R({
|
|
2452
2423
|
items: r,
|
|
2453
|
-
typeName:
|
|
2424
|
+
typeName: h.ZodTuple,
|
|
2454
2425
|
rest: null,
|
|
2455
2426
|
...v(e)
|
|
2456
2427
|
});
|
|
2457
2428
|
};
|
|
2458
|
-
class
|
|
2429
|
+
class oe extends _ {
|
|
2459
2430
|
get keySchema() {
|
|
2460
2431
|
return this._def.keyType;
|
|
2461
2432
|
}
|
|
@@ -2470,11 +2441,11 @@ class se extends _ {
|
|
|
2470
2441
|
expected: f.object,
|
|
2471
2442
|
received: n.parsedType
|
|
2472
2443
|
}), y;
|
|
2473
|
-
const a = [],
|
|
2444
|
+
const a = [], s = this._def.keyType, i = this._def.valueType;
|
|
2474
2445
|
for (const o in n.data)
|
|
2475
2446
|
a.push({
|
|
2476
|
-
key:
|
|
2477
|
-
value:
|
|
2447
|
+
key: s._parse(new I(n, o, n.path, o)),
|
|
2448
|
+
value: i._parse(new I(n, n.data[o], n.path, o)),
|
|
2478
2449
|
alwaysSet: o in n.data
|
|
2479
2450
|
});
|
|
2480
2451
|
return n.common.async ? k.mergeObjectAsync(t, a) : k.mergeObjectSync(t, a);
|
|
@@ -2483,15 +2454,15 @@ class se extends _ {
|
|
|
2483
2454
|
return this._def.valueType;
|
|
2484
2455
|
}
|
|
2485
2456
|
static create(e, t, n) {
|
|
2486
|
-
return t instanceof _ ? new
|
|
2457
|
+
return t instanceof _ ? new oe({
|
|
2487
2458
|
keyType: e,
|
|
2488
2459
|
valueType: t,
|
|
2489
|
-
typeName:
|
|
2460
|
+
typeName: h.ZodRecord,
|
|
2490
2461
|
...v(n)
|
|
2491
|
-
}) : new
|
|
2462
|
+
}) : new oe({
|
|
2492
2463
|
keyType: E.create(),
|
|
2493
2464
|
valueType: e,
|
|
2494
|
-
typeName:
|
|
2465
|
+
typeName: h.ZodRecord,
|
|
2495
2466
|
...v(t)
|
|
2496
2467
|
});
|
|
2497
2468
|
}
|
|
@@ -2511,28 +2482,28 @@ class ke extends _ {
|
|
|
2511
2482
|
expected: f.map,
|
|
2512
2483
|
received: n.parsedType
|
|
2513
2484
|
}), y;
|
|
2514
|
-
const a = this._def.keyType,
|
|
2515
|
-
key: a._parse(new
|
|
2516
|
-
value:
|
|
2485
|
+
const a = this._def.keyType, s = this._def.valueType, i = [...n.data.entries()].map(([o, c], l) => ({
|
|
2486
|
+
key: a._parse(new I(n, o, n.path, [l, "key"])),
|
|
2487
|
+
value: s._parse(new I(n, c, n.path, [l, "value"]))
|
|
2517
2488
|
}));
|
|
2518
2489
|
if (n.common.async) {
|
|
2519
2490
|
const o = /* @__PURE__ */ new Map();
|
|
2520
2491
|
return Promise.resolve().then(async () => {
|
|
2521
|
-
for (const
|
|
2522
|
-
const
|
|
2523
|
-
if (
|
|
2492
|
+
for (const c of i) {
|
|
2493
|
+
const l = await c.key, m = await c.value;
|
|
2494
|
+
if (l.status === "aborted" || m.status === "aborted")
|
|
2524
2495
|
return y;
|
|
2525
|
-
(
|
|
2496
|
+
(l.status === "dirty" || m.status === "dirty") && t.dirty(), o.set(l.value, m.value);
|
|
2526
2497
|
}
|
|
2527
2498
|
return { status: t.value, value: o };
|
|
2528
2499
|
});
|
|
2529
2500
|
} else {
|
|
2530
2501
|
const o = /* @__PURE__ */ new Map();
|
|
2531
|
-
for (const
|
|
2532
|
-
const
|
|
2533
|
-
if (
|
|
2502
|
+
for (const c of i) {
|
|
2503
|
+
const l = c.key, m = c.value;
|
|
2504
|
+
if (l.status === "aborted" || m.status === "aborted")
|
|
2534
2505
|
return y;
|
|
2535
|
-
(
|
|
2506
|
+
(l.status === "dirty" || m.status === "dirty") && t.dirty(), o.set(l.value, m.value);
|
|
2536
2507
|
}
|
|
2537
2508
|
return { status: t.value, value: o };
|
|
2538
2509
|
}
|
|
@@ -2541,10 +2512,10 @@ class ke extends _ {
|
|
|
2541
2512
|
ke.create = (r, e, t) => new ke({
|
|
2542
2513
|
valueType: e,
|
|
2543
2514
|
keyType: r,
|
|
2544
|
-
typeName:
|
|
2515
|
+
typeName: h.ZodMap,
|
|
2545
2516
|
...v(t)
|
|
2546
2517
|
});
|
|
2547
|
-
class
|
|
2518
|
+
class W extends _ {
|
|
2548
2519
|
_parse(e) {
|
|
2549
2520
|
const { status: t, ctx: n } = this._processInputParams(e);
|
|
2550
2521
|
if (n.parsedType !== f.set)
|
|
@@ -2569,27 +2540,27 @@ class F extends _ {
|
|
|
2569
2540
|
exact: !1,
|
|
2570
2541
|
message: a.maxSize.message
|
|
2571
2542
|
}), t.dirty());
|
|
2572
|
-
const
|
|
2573
|
-
function
|
|
2574
|
-
const
|
|
2575
|
-
for (const
|
|
2576
|
-
if (
|
|
2543
|
+
const s = this._def.valueType;
|
|
2544
|
+
function i(c) {
|
|
2545
|
+
const l = /* @__PURE__ */ new Set();
|
|
2546
|
+
for (const m of c) {
|
|
2547
|
+
if (m.status === "aborted")
|
|
2577
2548
|
return y;
|
|
2578
|
-
|
|
2549
|
+
m.status === "dirty" && t.dirty(), l.add(m.value);
|
|
2579
2550
|
}
|
|
2580
|
-
return { status: t.value, value:
|
|
2551
|
+
return { status: t.value, value: l };
|
|
2581
2552
|
}
|
|
2582
|
-
const o = [...n.data.values()].map((
|
|
2583
|
-
return n.common.async ? Promise.all(o).then((
|
|
2553
|
+
const o = [...n.data.values()].map((c, l) => s._parse(new I(n, c, n.path, l)));
|
|
2554
|
+
return n.common.async ? Promise.all(o).then((c) => i(c)) : i(o);
|
|
2584
2555
|
}
|
|
2585
2556
|
min(e, t) {
|
|
2586
|
-
return new
|
|
2557
|
+
return new W({
|
|
2587
2558
|
...this._def,
|
|
2588
2559
|
minSize: { value: e, message: p.toString(t) }
|
|
2589
2560
|
});
|
|
2590
2561
|
}
|
|
2591
2562
|
max(e, t) {
|
|
2592
|
-
return new
|
|
2563
|
+
return new W({
|
|
2593
2564
|
...this._def,
|
|
2594
2565
|
maxSize: { value: e, message: p.toString(t) }
|
|
2595
2566
|
});
|
|
@@ -2601,14 +2572,14 @@ class F extends _ {
|
|
|
2601
2572
|
return this.min(1, e);
|
|
2602
2573
|
}
|
|
2603
2574
|
}
|
|
2604
|
-
|
|
2575
|
+
W.create = (r, e) => new W({
|
|
2605
2576
|
valueType: r,
|
|
2606
2577
|
minSize: null,
|
|
2607
2578
|
maxSize: null,
|
|
2608
|
-
typeName:
|
|
2579
|
+
typeName: h.ZodSet,
|
|
2609
2580
|
...v(e)
|
|
2610
2581
|
});
|
|
2611
|
-
class
|
|
2582
|
+
class H extends _ {
|
|
2612
2583
|
constructor() {
|
|
2613
2584
|
super(...arguments), this.validate = this.implement;
|
|
2614
2585
|
}
|
|
@@ -2620,7 +2591,7 @@ class G extends _ {
|
|
|
2620
2591
|
expected: f.function,
|
|
2621
2592
|
received: t.parsedType
|
|
2622
2593
|
}), y;
|
|
2623
|
-
function n(o,
|
|
2594
|
+
function n(o, c) {
|
|
2624
2595
|
return _e({
|
|
2625
2596
|
data: o,
|
|
2626
2597
|
path: t.path,
|
|
@@ -2628,15 +2599,15 @@ class G extends _ {
|
|
|
2628
2599
|
t.common.contextualErrorMap,
|
|
2629
2600
|
t.schemaErrorMap,
|
|
2630
2601
|
ve(),
|
|
2631
|
-
|
|
2632
|
-
].filter((
|
|
2602
|
+
J
|
|
2603
|
+
].filter((l) => !!l),
|
|
2633
2604
|
issueData: {
|
|
2634
2605
|
code: d.invalid_arguments,
|
|
2635
|
-
argumentsError:
|
|
2606
|
+
argumentsError: c
|
|
2636
2607
|
}
|
|
2637
2608
|
});
|
|
2638
2609
|
}
|
|
2639
|
-
function a(o,
|
|
2610
|
+
function a(o, c) {
|
|
2640
2611
|
return _e({
|
|
2641
2612
|
data: o,
|
|
2642
2613
|
path: t.path,
|
|
@@ -2644,34 +2615,34 @@ class G extends _ {
|
|
|
2644
2615
|
t.common.contextualErrorMap,
|
|
2645
2616
|
t.schemaErrorMap,
|
|
2646
2617
|
ve(),
|
|
2647
|
-
|
|
2648
|
-
].filter((
|
|
2618
|
+
J
|
|
2619
|
+
].filter((l) => !!l),
|
|
2649
2620
|
issueData: {
|
|
2650
2621
|
code: d.invalid_return_type,
|
|
2651
|
-
returnTypeError:
|
|
2622
|
+
returnTypeError: c
|
|
2652
2623
|
}
|
|
2653
2624
|
});
|
|
2654
2625
|
}
|
|
2655
|
-
const
|
|
2656
|
-
if (this._def.returns instanceof
|
|
2626
|
+
const s = { errorMap: t.common.contextualErrorMap }, i = t.data;
|
|
2627
|
+
if (this._def.returns instanceof X) {
|
|
2657
2628
|
const o = this;
|
|
2658
|
-
return T(async function(...
|
|
2659
|
-
const
|
|
2660
|
-
throw
|
|
2661
|
-
}), C = await Reflect.apply(
|
|
2662
|
-
return await o._def.returns._def.type.parseAsync(C,
|
|
2663
|
-
throw
|
|
2629
|
+
return T(async function(...c) {
|
|
2630
|
+
const l = new N([]), m = await o._def.args.parseAsync(c, s).catch((Ze) => {
|
|
2631
|
+
throw l.addIssue(n(c, Ze)), l;
|
|
2632
|
+
}), C = await Reflect.apply(i, this, m);
|
|
2633
|
+
return await o._def.returns._def.type.parseAsync(C, s).catch((Ze) => {
|
|
2634
|
+
throw l.addIssue(a(C, Ze)), l;
|
|
2664
2635
|
});
|
|
2665
2636
|
});
|
|
2666
2637
|
} else {
|
|
2667
2638
|
const o = this;
|
|
2668
|
-
return T(function(...
|
|
2669
|
-
const
|
|
2670
|
-
if (!
|
|
2671
|
-
throw new N([n(
|
|
2672
|
-
const
|
|
2639
|
+
return T(function(...c) {
|
|
2640
|
+
const l = o._def.args.safeParse(c, s);
|
|
2641
|
+
if (!l.success)
|
|
2642
|
+
throw new N([n(c, l.error)]);
|
|
2643
|
+
const m = Reflect.apply(i, this, l.data), C = o._def.returns.safeParse(m, s);
|
|
2673
2644
|
if (!C.success)
|
|
2674
|
-
throw new N([a(
|
|
2645
|
+
throw new N([a(m, C.error)]);
|
|
2675
2646
|
return C.data;
|
|
2676
2647
|
});
|
|
2677
2648
|
}
|
|
@@ -2683,13 +2654,13 @@ class G extends _ {
|
|
|
2683
2654
|
return this._def.returns;
|
|
2684
2655
|
}
|
|
2685
2656
|
args(...e) {
|
|
2686
|
-
return new
|
|
2657
|
+
return new H({
|
|
2687
2658
|
...this._def,
|
|
2688
|
-
args:
|
|
2659
|
+
args: R.create(e).rest(U.create())
|
|
2689
2660
|
});
|
|
2690
2661
|
}
|
|
2691
2662
|
returns(e) {
|
|
2692
|
-
return new
|
|
2663
|
+
return new H({
|
|
2693
2664
|
...this._def,
|
|
2694
2665
|
returns: e
|
|
2695
2666
|
});
|
|
@@ -2701,15 +2672,15 @@ class G extends _ {
|
|
|
2701
2672
|
return this.parse(e);
|
|
2702
2673
|
}
|
|
2703
2674
|
static create(e, t, n) {
|
|
2704
|
-
return new
|
|
2705
|
-
args: e ||
|
|
2706
|
-
returns: t ||
|
|
2707
|
-
typeName:
|
|
2675
|
+
return new H({
|
|
2676
|
+
args: e || R.create([]).rest(U.create()),
|
|
2677
|
+
returns: t || U.create(),
|
|
2678
|
+
typeName: h.ZodFunction,
|
|
2708
2679
|
...v(n)
|
|
2709
2680
|
});
|
|
2710
2681
|
}
|
|
2711
2682
|
}
|
|
2712
|
-
class
|
|
2683
|
+
class de extends _ {
|
|
2713
2684
|
get schema() {
|
|
2714
2685
|
return this._def.getter();
|
|
2715
2686
|
}
|
|
@@ -2718,12 +2689,12 @@ class oe extends _ {
|
|
|
2718
2689
|
return this._def.getter()._parse({ data: t.data, path: t.path, parent: t });
|
|
2719
2690
|
}
|
|
2720
2691
|
}
|
|
2721
|
-
|
|
2692
|
+
de.create = (r, e) => new de({
|
|
2722
2693
|
getter: r,
|
|
2723
|
-
typeName:
|
|
2694
|
+
typeName: h.ZodLazy,
|
|
2724
2695
|
...v(e)
|
|
2725
2696
|
});
|
|
2726
|
-
class
|
|
2697
|
+
class le extends _ {
|
|
2727
2698
|
_parse(e) {
|
|
2728
2699
|
if (e.data !== this._def.value) {
|
|
2729
2700
|
const t = this._getOrReturnCtx(e);
|
|
@@ -2739,21 +2710,21 @@ class de extends _ {
|
|
|
2739
2710
|
return this._def.value;
|
|
2740
2711
|
}
|
|
2741
2712
|
}
|
|
2742
|
-
|
|
2713
|
+
le.create = (r, e) => new le({
|
|
2743
2714
|
value: r,
|
|
2744
|
-
typeName:
|
|
2715
|
+
typeName: h.ZodLiteral,
|
|
2745
2716
|
...v(e)
|
|
2746
2717
|
});
|
|
2747
2718
|
function Qe(r, e) {
|
|
2748
2719
|
return new z({
|
|
2749
2720
|
values: r,
|
|
2750
|
-
typeName:
|
|
2721
|
+
typeName: h.ZodEnum,
|
|
2751
2722
|
...v(e)
|
|
2752
2723
|
});
|
|
2753
2724
|
}
|
|
2754
2725
|
class z extends _ {
|
|
2755
2726
|
constructor() {
|
|
2756
|
-
super(...arguments),
|
|
2727
|
+
super(...arguments), Q.set(this, void 0);
|
|
2757
2728
|
}
|
|
2758
2729
|
_parse(e) {
|
|
2759
2730
|
if (typeof e.data != "string") {
|
|
@@ -2764,7 +2735,7 @@ class z extends _ {
|
|
|
2764
2735
|
code: d.invalid_type
|
|
2765
2736
|
}), y;
|
|
2766
2737
|
}
|
|
2767
|
-
if (xe(this,
|
|
2738
|
+
if (xe(this, Q) || He(this, Q, new Set(this._def.values)), !xe(this, Q).has(e.data)) {
|
|
2768
2739
|
const t = this._getOrReturnCtx(e), n = this._def.values;
|
|
2769
2740
|
return u(t, {
|
|
2770
2741
|
received: t.data,
|
|
@@ -2808,11 +2779,11 @@ class z extends _ {
|
|
|
2808
2779
|
});
|
|
2809
2780
|
}
|
|
2810
2781
|
}
|
|
2811
|
-
|
|
2782
|
+
Q = /* @__PURE__ */ new WeakMap();
|
|
2812
2783
|
z.create = Qe;
|
|
2813
|
-
class
|
|
2784
|
+
class ce extends _ {
|
|
2814
2785
|
constructor() {
|
|
2815
|
-
super(...arguments),
|
|
2786
|
+
super(...arguments), K.set(this, void 0);
|
|
2816
2787
|
}
|
|
2817
2788
|
_parse(e) {
|
|
2818
2789
|
const t = b.getValidEnumValues(this._def.values), n = this._getOrReturnCtx(e);
|
|
@@ -2824,7 +2795,7 @@ class le extends _ {
|
|
|
2824
2795
|
code: d.invalid_type
|
|
2825
2796
|
}), y;
|
|
2826
2797
|
}
|
|
2827
|
-
if (xe(this,
|
|
2798
|
+
if (xe(this, K) || He(this, K, new Set(b.getValidEnumValues(this._def.values))), !xe(this, K).has(e.data)) {
|
|
2828
2799
|
const a = b.objectValues(t);
|
|
2829
2800
|
return u(n, {
|
|
2830
2801
|
received: n.data,
|
|
@@ -2838,13 +2809,13 @@ class le extends _ {
|
|
|
2838
2809
|
return this._def.values;
|
|
2839
2810
|
}
|
|
2840
2811
|
}
|
|
2841
|
-
|
|
2842
|
-
|
|
2812
|
+
K = /* @__PURE__ */ new WeakMap();
|
|
2813
|
+
ce.create = (r, e) => new ce({
|
|
2843
2814
|
values: r,
|
|
2844
|
-
typeName:
|
|
2815
|
+
typeName: h.ZodNativeEnum,
|
|
2845
2816
|
...v(e)
|
|
2846
2817
|
});
|
|
2847
|
-
class
|
|
2818
|
+
class X extends _ {
|
|
2848
2819
|
unwrap() {
|
|
2849
2820
|
return this._def.type;
|
|
2850
2821
|
}
|
|
@@ -2863,9 +2834,9 @@ class Y extends _ {
|
|
|
2863
2834
|
})));
|
|
2864
2835
|
}
|
|
2865
2836
|
}
|
|
2866
|
-
|
|
2837
|
+
X.create = (r, e) => new X({
|
|
2867
2838
|
type: r,
|
|
2868
|
-
typeName:
|
|
2839
|
+
typeName: h.ZodPromise,
|
|
2869
2840
|
...v(e)
|
|
2870
2841
|
});
|
|
2871
2842
|
class Z extends _ {
|
|
@@ -2873,47 +2844,47 @@ class Z extends _ {
|
|
|
2873
2844
|
return this._def.schema;
|
|
2874
2845
|
}
|
|
2875
2846
|
sourceType() {
|
|
2876
|
-
return this._def.schema._def.typeName ===
|
|
2847
|
+
return this._def.schema._def.typeName === h.ZodEffects ? this._def.schema.sourceType() : this._def.schema;
|
|
2877
2848
|
}
|
|
2878
2849
|
_parse(e) {
|
|
2879
|
-
const { status: t, ctx: n } = this._processInputParams(e), a = this._def.effect || null,
|
|
2880
|
-
addIssue: (
|
|
2881
|
-
u(n,
|
|
2850
|
+
const { status: t, ctx: n } = this._processInputParams(e), a = this._def.effect || null, s = {
|
|
2851
|
+
addIssue: (i) => {
|
|
2852
|
+
u(n, i), i.fatal ? t.abort() : t.dirty();
|
|
2882
2853
|
},
|
|
2883
2854
|
get path() {
|
|
2884
2855
|
return n.path;
|
|
2885
2856
|
}
|
|
2886
2857
|
};
|
|
2887
|
-
if (
|
|
2888
|
-
const
|
|
2858
|
+
if (s.addIssue = s.addIssue.bind(s), a.type === "preprocess") {
|
|
2859
|
+
const i = a.transform(n.data, s);
|
|
2889
2860
|
if (n.common.async)
|
|
2890
|
-
return Promise.resolve(
|
|
2861
|
+
return Promise.resolve(i).then(async (o) => {
|
|
2891
2862
|
if (t.value === "aborted")
|
|
2892
2863
|
return y;
|
|
2893
|
-
const
|
|
2864
|
+
const c = await this._def.schema._parseAsync({
|
|
2894
2865
|
data: o,
|
|
2895
2866
|
path: n.path,
|
|
2896
2867
|
parent: n
|
|
2897
2868
|
});
|
|
2898
|
-
return
|
|
2869
|
+
return c.status === "aborted" ? y : c.status === "dirty" || t.value === "dirty" ? G(c.value) : c;
|
|
2899
2870
|
});
|
|
2900
2871
|
{
|
|
2901
2872
|
if (t.value === "aborted")
|
|
2902
2873
|
return y;
|
|
2903
2874
|
const o = this._def.schema._parseSync({
|
|
2904
|
-
data:
|
|
2875
|
+
data: i,
|
|
2905
2876
|
path: n.path,
|
|
2906
2877
|
parent: n
|
|
2907
2878
|
});
|
|
2908
|
-
return o.status === "aborted" ? y : o.status === "dirty" || t.value === "dirty" ?
|
|
2879
|
+
return o.status === "aborted" ? y : o.status === "dirty" || t.value === "dirty" ? G(o.value) : o;
|
|
2909
2880
|
}
|
|
2910
2881
|
}
|
|
2911
2882
|
if (a.type === "refinement") {
|
|
2912
|
-
const
|
|
2913
|
-
const
|
|
2883
|
+
const i = (o) => {
|
|
2884
|
+
const c = a.refinement(o, s);
|
|
2914
2885
|
if (n.common.async)
|
|
2915
|
-
return Promise.resolve(
|
|
2916
|
-
if (
|
|
2886
|
+
return Promise.resolve(c);
|
|
2887
|
+
if (c instanceof Promise)
|
|
2917
2888
|
throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");
|
|
2918
2889
|
return o;
|
|
2919
2890
|
};
|
|
@@ -2923,41 +2894,41 @@ class Z extends _ {
|
|
|
2923
2894
|
path: n.path,
|
|
2924
2895
|
parent: n
|
|
2925
2896
|
});
|
|
2926
|
-
return o.status === "aborted" ? y : (o.status === "dirty" && t.dirty(),
|
|
2897
|
+
return o.status === "aborted" ? y : (o.status === "dirty" && t.dirty(), i(o.value), { status: t.value, value: o.value });
|
|
2927
2898
|
} else
|
|
2928
|
-
return this._def.schema._parseAsync({ data: n.data, path: n.path, parent: n }).then((o) => o.status === "aborted" ? y : (o.status === "dirty" && t.dirty(),
|
|
2899
|
+
return this._def.schema._parseAsync({ data: n.data, path: n.path, parent: n }).then((o) => o.status === "aborted" ? y : (o.status === "dirty" && t.dirty(), i(o.value).then(() => ({ status: t.value, value: o.value }))));
|
|
2929
2900
|
}
|
|
2930
2901
|
if (a.type === "transform")
|
|
2931
2902
|
if (n.common.async === !1) {
|
|
2932
|
-
const
|
|
2903
|
+
const i = this._def.schema._parseSync({
|
|
2933
2904
|
data: n.data,
|
|
2934
2905
|
path: n.path,
|
|
2935
2906
|
parent: n
|
|
2936
2907
|
});
|
|
2937
|
-
if (!
|
|
2938
|
-
return
|
|
2939
|
-
const o = a.transform(
|
|
2908
|
+
if (!ee(i))
|
|
2909
|
+
return i;
|
|
2910
|
+
const o = a.transform(i.value, s);
|
|
2940
2911
|
if (o instanceof Promise)
|
|
2941
2912
|
throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");
|
|
2942
2913
|
return { status: t.value, value: o };
|
|
2943
2914
|
} else
|
|
2944
|
-
return this._def.schema._parseAsync({ data: n.data, path: n.path, parent: n }).then((
|
|
2915
|
+
return this._def.schema._parseAsync({ data: n.data, path: n.path, parent: n }).then((i) => ee(i) ? Promise.resolve(a.transform(i.value, s)).then((o) => ({ status: t.value, value: o })) : i);
|
|
2945
2916
|
b.assertNever(a);
|
|
2946
2917
|
}
|
|
2947
2918
|
}
|
|
2948
2919
|
Z.create = (r, e, t) => new Z({
|
|
2949
2920
|
schema: r,
|
|
2950
|
-
typeName:
|
|
2921
|
+
typeName: h.ZodEffects,
|
|
2951
2922
|
effect: e,
|
|
2952
2923
|
...v(t)
|
|
2953
2924
|
});
|
|
2954
2925
|
Z.createWithPreprocess = (r, e, t) => new Z({
|
|
2955
2926
|
schema: e,
|
|
2956
2927
|
effect: { type: "preprocess", transform: r },
|
|
2957
|
-
typeName:
|
|
2928
|
+
typeName: h.ZodEffects,
|
|
2958
2929
|
...v(t)
|
|
2959
2930
|
});
|
|
2960
|
-
class
|
|
2931
|
+
class O extends _ {
|
|
2961
2932
|
_parse(e) {
|
|
2962
2933
|
return this._getType(e) === f.undefined ? T(void 0) : this._def.innerType._parse(e);
|
|
2963
2934
|
}
|
|
@@ -2965,12 +2936,12 @@ class I extends _ {
|
|
|
2965
2936
|
return this._def.innerType;
|
|
2966
2937
|
}
|
|
2967
2938
|
}
|
|
2968
|
-
|
|
2939
|
+
O.create = (r, e) => new O({
|
|
2969
2940
|
innerType: r,
|
|
2970
|
-
typeName:
|
|
2941
|
+
typeName: h.ZodOptional,
|
|
2971
2942
|
...v(e)
|
|
2972
2943
|
});
|
|
2973
|
-
class
|
|
2944
|
+
class B extends _ {
|
|
2974
2945
|
_parse(e) {
|
|
2975
2946
|
return this._getType(e) === f.null ? T(null) : this._def.innerType._parse(e);
|
|
2976
2947
|
}
|
|
@@ -2978,12 +2949,12 @@ class P extends _ {
|
|
|
2978
2949
|
return this._def.innerType;
|
|
2979
2950
|
}
|
|
2980
2951
|
}
|
|
2981
|
-
|
|
2952
|
+
B.create = (r, e) => new B({
|
|
2982
2953
|
innerType: r,
|
|
2983
|
-
typeName:
|
|
2954
|
+
typeName: h.ZodNullable,
|
|
2984
2955
|
...v(e)
|
|
2985
2956
|
});
|
|
2986
|
-
class
|
|
2957
|
+
class ue extends _ {
|
|
2987
2958
|
_parse(e) {
|
|
2988
2959
|
const { ctx: t } = this._processInputParams(e);
|
|
2989
2960
|
let n = t.data;
|
|
@@ -2997,13 +2968,13 @@ class ce extends _ {
|
|
|
2997
2968
|
return this._def.innerType;
|
|
2998
2969
|
}
|
|
2999
2970
|
}
|
|
3000
|
-
|
|
2971
|
+
ue.create = (r, e) => new ue({
|
|
3001
2972
|
innerType: r,
|
|
3002
|
-
typeName:
|
|
2973
|
+
typeName: h.ZodDefault,
|
|
3003
2974
|
defaultValue: typeof e.default == "function" ? e.default : () => e.default,
|
|
3004
2975
|
...v(e)
|
|
3005
2976
|
});
|
|
3006
|
-
class
|
|
2977
|
+
class fe extends _ {
|
|
3007
2978
|
_parse(e) {
|
|
3008
2979
|
const { ctx: t } = this._processInputParams(e), n = {
|
|
3009
2980
|
...t,
|
|
@@ -3018,9 +2989,9 @@ class ue extends _ {
|
|
|
3018
2989
|
...n
|
|
3019
2990
|
}
|
|
3020
2991
|
});
|
|
3021
|
-
return
|
|
2992
|
+
return te(a) ? a.then((s) => ({
|
|
3022
2993
|
status: "valid",
|
|
3023
|
-
value:
|
|
2994
|
+
value: s.status === "valid" ? s.value : this._def.catchValue({
|
|
3024
2995
|
get error() {
|
|
3025
2996
|
return new N(n.common.issues);
|
|
3026
2997
|
},
|
|
@@ -3040,9 +3011,9 @@ class ue extends _ {
|
|
|
3040
3011
|
return this._def.innerType;
|
|
3041
3012
|
}
|
|
3042
3013
|
}
|
|
3043
|
-
|
|
3014
|
+
fe.create = (r, e) => new fe({
|
|
3044
3015
|
innerType: r,
|
|
3045
|
-
typeName:
|
|
3016
|
+
typeName: h.ZodCatch,
|
|
3046
3017
|
catchValue: typeof e.catch == "function" ? e.catch : () => e.catch,
|
|
3047
3018
|
...v(e)
|
|
3048
3019
|
});
|
|
@@ -3060,11 +3031,11 @@ class Te extends _ {
|
|
|
3060
3031
|
}
|
|
3061
3032
|
}
|
|
3062
3033
|
Te.create = (r) => new Te({
|
|
3063
|
-
typeName:
|
|
3034
|
+
typeName: h.ZodNaN,
|
|
3064
3035
|
...v(r)
|
|
3065
3036
|
});
|
|
3066
|
-
const
|
|
3067
|
-
class
|
|
3037
|
+
const Jt = Symbol("zod_brand");
|
|
3038
|
+
class $e extends _ {
|
|
3068
3039
|
_parse(e) {
|
|
3069
3040
|
const { ctx: t } = this._processInputParams(e), n = t.data;
|
|
3070
3041
|
return this._def.type._parse({
|
|
@@ -3077,18 +3048,18 @@ class De extends _ {
|
|
|
3077
3048
|
return this._def.type;
|
|
3078
3049
|
}
|
|
3079
3050
|
}
|
|
3080
|
-
class
|
|
3051
|
+
class me extends _ {
|
|
3081
3052
|
_parse(e) {
|
|
3082
3053
|
const { status: t, ctx: n } = this._processInputParams(e);
|
|
3083
3054
|
if (n.common.async)
|
|
3084
3055
|
return (async () => {
|
|
3085
|
-
const
|
|
3056
|
+
const s = await this._def.in._parseAsync({
|
|
3086
3057
|
data: n.data,
|
|
3087
3058
|
path: n.path,
|
|
3088
3059
|
parent: n
|
|
3089
3060
|
});
|
|
3090
|
-
return
|
|
3091
|
-
data:
|
|
3061
|
+
return s.status === "aborted" ? y : s.status === "dirty" ? (t.dirty(), G(s.value)) : this._def.out._parseAsync({
|
|
3062
|
+
data: s.value,
|
|
3092
3063
|
path: n.path,
|
|
3093
3064
|
parent: n
|
|
3094
3065
|
});
|
|
@@ -3110,222 +3081,222 @@ class pe extends _ {
|
|
|
3110
3081
|
}
|
|
3111
3082
|
}
|
|
3112
3083
|
static create(e, t) {
|
|
3113
|
-
return new
|
|
3084
|
+
return new me({
|
|
3114
3085
|
in: e,
|
|
3115
3086
|
out: t,
|
|
3116
|
-
typeName:
|
|
3087
|
+
typeName: h.ZodPipeline
|
|
3117
3088
|
});
|
|
3118
3089
|
}
|
|
3119
3090
|
}
|
|
3120
|
-
class
|
|
3091
|
+
class pe extends _ {
|
|
3121
3092
|
_parse(e) {
|
|
3122
|
-
const t = this._def.innerType._parse(e), n = (a) => (
|
|
3123
|
-
return
|
|
3093
|
+
const t = this._def.innerType._parse(e), n = (a) => (ee(a) && (a.value = Object.freeze(a.value)), a);
|
|
3094
|
+
return te(t) ? t.then((a) => n(a)) : n(t);
|
|
3124
3095
|
}
|
|
3125
3096
|
unwrap() {
|
|
3126
3097
|
return this._def.innerType;
|
|
3127
3098
|
}
|
|
3128
3099
|
}
|
|
3129
|
-
|
|
3100
|
+
pe.create = (r, e) => new pe({
|
|
3130
3101
|
innerType: r,
|
|
3131
|
-
typeName:
|
|
3102
|
+
typeName: h.ZodReadonly,
|
|
3132
3103
|
...v(e)
|
|
3133
3104
|
});
|
|
3134
3105
|
function Ke(r, e = {}, t) {
|
|
3135
|
-
return r ?
|
|
3136
|
-
var
|
|
3106
|
+
return r ? Y.create().superRefine((n, a) => {
|
|
3107
|
+
var s, i;
|
|
3137
3108
|
if (!r(n)) {
|
|
3138
|
-
const o = typeof e == "function" ? e(n) : typeof e == "string" ? { message: e } : e,
|
|
3139
|
-
a.addIssue({ code: "custom", ...
|
|
3109
|
+
const o = typeof e == "function" ? e(n) : typeof e == "string" ? { message: e } : e, c = (i = (s = o.fatal) !== null && s !== void 0 ? s : t) !== null && i !== void 0 ? i : !0, l = typeof o == "string" ? { message: o } : o;
|
|
3110
|
+
a.addIssue({ code: "custom", ...l, fatal: c });
|
|
3140
3111
|
}
|
|
3141
|
-
}) :
|
|
3112
|
+
}) : Y.create();
|
|
3142
3113
|
}
|
|
3143
|
-
const
|
|
3114
|
+
const Yt = {
|
|
3144
3115
|
object: w.lazycreate
|
|
3145
3116
|
};
|
|
3146
|
-
var
|
|
3117
|
+
var h;
|
|
3147
3118
|
(function(r) {
|
|
3148
3119
|
r.ZodString = "ZodString", r.ZodNumber = "ZodNumber", r.ZodNaN = "ZodNaN", r.ZodBigInt = "ZodBigInt", r.ZodBoolean = "ZodBoolean", r.ZodDate = "ZodDate", r.ZodSymbol = "ZodSymbol", r.ZodUndefined = "ZodUndefined", r.ZodNull = "ZodNull", r.ZodAny = "ZodAny", r.ZodUnknown = "ZodUnknown", r.ZodNever = "ZodNever", r.ZodVoid = "ZodVoid", r.ZodArray = "ZodArray", r.ZodObject = "ZodObject", r.ZodUnion = "ZodUnion", r.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", r.ZodIntersection = "ZodIntersection", r.ZodTuple = "ZodTuple", r.ZodRecord = "ZodRecord", r.ZodMap = "ZodMap", r.ZodSet = "ZodSet", r.ZodFunction = "ZodFunction", r.ZodLazy = "ZodLazy", r.ZodLiteral = "ZodLiteral", r.ZodEnum = "ZodEnum", r.ZodEffects = "ZodEffects", r.ZodNativeEnum = "ZodNativeEnum", r.ZodOptional = "ZodOptional", r.ZodNullable = "ZodNullable", r.ZodDefault = "ZodDefault", r.ZodCatch = "ZodCatch", r.ZodPromise = "ZodPromise", r.ZodBranded = "ZodBranded", r.ZodPipeline = "ZodPipeline", r.ZodReadonly = "ZodReadonly";
|
|
3149
|
-
})(
|
|
3150
|
-
const
|
|
3120
|
+
})(h || (h = {}));
|
|
3121
|
+
const Xt = (r, e = {
|
|
3151
3122
|
message: `Input not instance of ${r.name}`
|
|
3152
|
-
}) => Ke((t) => t instanceof r, e), et = E.create, tt =
|
|
3123
|
+
}) => Ke((t) => t instanceof r, e), et = E.create, tt = P.create, Qt = Te.create, Kt = V.create, rt = re.create, er = F.create, tr = be.create, rr = ne.create, nr = ae.create, ar = Y.create, sr = U.create, ir = D.create, or = we.create, dr = S.create, lr = w.create, cr = w.strictCreate, ur = se.create, fr = Se.create, pr = ie.create, mr = R.create, hr = oe.create, yr = ke.create, gr = W.create, vr = H.create, _r = de.create, xr = le.create, br = z.create, wr = ce.create, kr = X.create, ze = Z.create, Tr = O.create, Cr = B.create, Nr = Z.createWithPreprocess, Er = me.create, Sr = () => et().optional(), Zr = () => tt().optional(), jr = () => rt().optional(), Or = {
|
|
3153
3124
|
string: (r) => E.create({ ...r, coerce: !0 }),
|
|
3154
|
-
number: (r) =>
|
|
3155
|
-
boolean: (r) =>
|
|
3125
|
+
number: (r) => P.create({ ...r, coerce: !0 }),
|
|
3126
|
+
boolean: (r) => re.create({
|
|
3156
3127
|
...r,
|
|
3157
3128
|
coerce: !0
|
|
3158
3129
|
}),
|
|
3159
3130
|
bigint: (r) => V.create({ ...r, coerce: !0 }),
|
|
3160
|
-
date: (r) =>
|
|
3161
|
-
},
|
|
3162
|
-
var
|
|
3131
|
+
date: (r) => F.create({ ...r, coerce: !0 })
|
|
3132
|
+
}, Ir = y;
|
|
3133
|
+
var j = /* @__PURE__ */ Object.freeze({
|
|
3163
3134
|
__proto__: null,
|
|
3164
|
-
defaultErrorMap:
|
|
3165
|
-
setErrorMap:
|
|
3135
|
+
defaultErrorMap: J,
|
|
3136
|
+
setErrorMap: It,
|
|
3166
3137
|
getErrorMap: ve,
|
|
3167
3138
|
makeIssue: _e,
|
|
3168
|
-
EMPTY_PATH:
|
|
3139
|
+
EMPTY_PATH: Rt,
|
|
3169
3140
|
addIssueToContext: u,
|
|
3170
3141
|
ParseStatus: k,
|
|
3171
3142
|
INVALID: y,
|
|
3172
|
-
DIRTY:
|
|
3143
|
+
DIRTY: G,
|
|
3173
3144
|
OK: T,
|
|
3174
|
-
isAborted:
|
|
3175
|
-
isDirty:
|
|
3176
|
-
isValid:
|
|
3177
|
-
isAsync:
|
|
3145
|
+
isAborted: Ae,
|
|
3146
|
+
isDirty: De,
|
|
3147
|
+
isValid: ee,
|
|
3148
|
+
isAsync: te,
|
|
3178
3149
|
get util() {
|
|
3179
3150
|
return b;
|
|
3180
3151
|
},
|
|
3181
3152
|
get objectUtil() {
|
|
3182
|
-
return
|
|
3153
|
+
return Re;
|
|
3183
3154
|
},
|
|
3184
3155
|
ZodParsedType: f,
|
|
3185
|
-
getParsedType:
|
|
3156
|
+
getParsedType: M,
|
|
3186
3157
|
ZodType: _,
|
|
3187
3158
|
datetimeRegex: Xe,
|
|
3188
3159
|
ZodString: E,
|
|
3189
|
-
ZodNumber:
|
|
3160
|
+
ZodNumber: P,
|
|
3190
3161
|
ZodBigInt: V,
|
|
3191
|
-
ZodBoolean:
|
|
3192
|
-
ZodDate:
|
|
3162
|
+
ZodBoolean: re,
|
|
3163
|
+
ZodDate: F,
|
|
3193
3164
|
ZodSymbol: be,
|
|
3194
|
-
ZodUndefined:
|
|
3195
|
-
ZodNull:
|
|
3196
|
-
ZodAny:
|
|
3197
|
-
ZodUnknown:
|
|
3198
|
-
ZodNever:
|
|
3165
|
+
ZodUndefined: ne,
|
|
3166
|
+
ZodNull: ae,
|
|
3167
|
+
ZodAny: Y,
|
|
3168
|
+
ZodUnknown: U,
|
|
3169
|
+
ZodNever: D,
|
|
3199
3170
|
ZodVoid: we,
|
|
3200
3171
|
ZodArray: S,
|
|
3201
3172
|
ZodObject: w,
|
|
3202
|
-
ZodUnion:
|
|
3203
|
-
ZodDiscriminatedUnion:
|
|
3173
|
+
ZodUnion: se,
|
|
3174
|
+
ZodDiscriminatedUnion: Se,
|
|
3204
3175
|
ZodIntersection: ie,
|
|
3205
|
-
ZodTuple:
|
|
3206
|
-
ZodRecord:
|
|
3176
|
+
ZodTuple: R,
|
|
3177
|
+
ZodRecord: oe,
|
|
3207
3178
|
ZodMap: ke,
|
|
3208
|
-
ZodSet:
|
|
3209
|
-
ZodFunction:
|
|
3210
|
-
ZodLazy:
|
|
3211
|
-
ZodLiteral:
|
|
3179
|
+
ZodSet: W,
|
|
3180
|
+
ZodFunction: H,
|
|
3181
|
+
ZodLazy: de,
|
|
3182
|
+
ZodLiteral: le,
|
|
3212
3183
|
ZodEnum: z,
|
|
3213
|
-
ZodNativeEnum:
|
|
3214
|
-
ZodPromise:
|
|
3184
|
+
ZodNativeEnum: ce,
|
|
3185
|
+
ZodPromise: X,
|
|
3215
3186
|
ZodEffects: Z,
|
|
3216
3187
|
ZodTransformer: Z,
|
|
3217
|
-
ZodOptional:
|
|
3218
|
-
ZodNullable:
|
|
3219
|
-
ZodDefault:
|
|
3220
|
-
ZodCatch:
|
|
3188
|
+
ZodOptional: O,
|
|
3189
|
+
ZodNullable: B,
|
|
3190
|
+
ZodDefault: ue,
|
|
3191
|
+
ZodCatch: fe,
|
|
3221
3192
|
ZodNaN: Te,
|
|
3222
|
-
BRAND:
|
|
3223
|
-
ZodBranded:
|
|
3224
|
-
ZodPipeline:
|
|
3225
|
-
ZodReadonly:
|
|
3193
|
+
BRAND: Jt,
|
|
3194
|
+
ZodBranded: $e,
|
|
3195
|
+
ZodPipeline: me,
|
|
3196
|
+
ZodReadonly: pe,
|
|
3226
3197
|
custom: Ke,
|
|
3227
3198
|
Schema: _,
|
|
3228
3199
|
ZodSchema: _,
|
|
3229
|
-
late:
|
|
3200
|
+
late: Yt,
|
|
3230
3201
|
get ZodFirstPartyTypeKind() {
|
|
3231
|
-
return
|
|
3202
|
+
return h;
|
|
3232
3203
|
},
|
|
3233
|
-
coerce:
|
|
3234
|
-
any:
|
|
3235
|
-
array:
|
|
3236
|
-
bigint:
|
|
3204
|
+
coerce: Or,
|
|
3205
|
+
any: ar,
|
|
3206
|
+
array: dr,
|
|
3207
|
+
bigint: Kt,
|
|
3237
3208
|
boolean: rt,
|
|
3238
|
-
date:
|
|
3239
|
-
discriminatedUnion:
|
|
3240
|
-
effect:
|
|
3241
|
-
enum:
|
|
3242
|
-
function:
|
|
3243
|
-
instanceof:
|
|
3244
|
-
intersection:
|
|
3245
|
-
lazy:
|
|
3246
|
-
literal:
|
|
3247
|
-
map:
|
|
3248
|
-
nan:
|
|
3249
|
-
nativeEnum:
|
|
3250
|
-
never:
|
|
3251
|
-
null:
|
|
3252
|
-
nullable:
|
|
3209
|
+
date: er,
|
|
3210
|
+
discriminatedUnion: fr,
|
|
3211
|
+
effect: ze,
|
|
3212
|
+
enum: br,
|
|
3213
|
+
function: vr,
|
|
3214
|
+
instanceof: Xt,
|
|
3215
|
+
intersection: pr,
|
|
3216
|
+
lazy: _r,
|
|
3217
|
+
literal: xr,
|
|
3218
|
+
map: yr,
|
|
3219
|
+
nan: Qt,
|
|
3220
|
+
nativeEnum: wr,
|
|
3221
|
+
never: ir,
|
|
3222
|
+
null: nr,
|
|
3223
|
+
nullable: Cr,
|
|
3253
3224
|
number: tt,
|
|
3254
|
-
object:
|
|
3255
|
-
oboolean:
|
|
3256
|
-
onumber:
|
|
3257
|
-
optional:
|
|
3258
|
-
ostring:
|
|
3259
|
-
pipeline:
|
|
3260
|
-
preprocess:
|
|
3261
|
-
promise:
|
|
3262
|
-
record:
|
|
3263
|
-
set:
|
|
3264
|
-
strictObject:
|
|
3225
|
+
object: lr,
|
|
3226
|
+
oboolean: jr,
|
|
3227
|
+
onumber: Zr,
|
|
3228
|
+
optional: Tr,
|
|
3229
|
+
ostring: Sr,
|
|
3230
|
+
pipeline: Er,
|
|
3231
|
+
preprocess: Nr,
|
|
3232
|
+
promise: kr,
|
|
3233
|
+
record: hr,
|
|
3234
|
+
set: gr,
|
|
3235
|
+
strictObject: cr,
|
|
3265
3236
|
string: et,
|
|
3266
|
-
symbol:
|
|
3267
|
-
transformer:
|
|
3268
|
-
tuple:
|
|
3269
|
-
undefined:
|
|
3270
|
-
union:
|
|
3271
|
-
unknown:
|
|
3272
|
-
void:
|
|
3273
|
-
NEVER:
|
|
3237
|
+
symbol: tr,
|
|
3238
|
+
transformer: ze,
|
|
3239
|
+
tuple: mr,
|
|
3240
|
+
undefined: rr,
|
|
3241
|
+
union: ur,
|
|
3242
|
+
unknown: sr,
|
|
3243
|
+
void: or,
|
|
3244
|
+
NEVER: Ir,
|
|
3274
3245
|
ZodIssueCode: d,
|
|
3275
|
-
quotelessJson:
|
|
3246
|
+
quotelessJson: Ot,
|
|
3276
3247
|
ZodError: N
|
|
3277
3248
|
});
|
|
3278
|
-
const
|
|
3279
|
-
const e = r.trim().replace(/\s+/g, " ").split(" "), [t, n, ...a] = e,
|
|
3249
|
+
const Be = (r) => {
|
|
3250
|
+
const e = r.trim().replace(/\s+/g, " ").split(" "), [t, n, ...a] = e, s = a == null ? void 0 : a.join(" ");
|
|
3280
3251
|
return {
|
|
3281
3252
|
surname: t,
|
|
3282
3253
|
name: n,
|
|
3283
|
-
patronymic:
|
|
3254
|
+
patronymic: s
|
|
3284
3255
|
};
|
|
3285
|
-
},
|
|
3286
|
-
|
|
3287
|
-
code:
|
|
3256
|
+
}, Yr = j.string({ invalid_type_error: "Обязательно к заполнению", required_error: "Обязательно к заполнению" }).superRefine((r, e) => {
|
|
3257
|
+
Zt.test(r) || e.addIssue({
|
|
3258
|
+
code: j.ZodIssueCode.custom,
|
|
3288
3259
|
message: "Должна быть только кириллица"
|
|
3289
3260
|
});
|
|
3290
|
-
const { surname: t, name: n, patronymic: a } =
|
|
3261
|
+
const { surname: t, name: n, patronymic: a } = Be(r);
|
|
3291
3262
|
(!t || !n) && e.addIssue({
|
|
3292
|
-
code:
|
|
3263
|
+
code: j.ZodIssueCode.custom,
|
|
3293
3264
|
message: "Введите имя и фамилию"
|
|
3294
|
-
}),
|
|
3295
|
-
code:
|
|
3265
|
+
}), Pe.test(n) || e.addIssue({
|
|
3266
|
+
code: j.ZodIssueCode.custom,
|
|
3296
3267
|
message: "Неверно введено имя"
|
|
3297
|
-
}),
|
|
3298
|
-
code:
|
|
3268
|
+
}), Pe.test(t) || e.addIssue({
|
|
3269
|
+
code: j.ZodIssueCode.custom,
|
|
3299
3270
|
message: "Неверно введена фамилия"
|
|
3300
|
-
}), a && (
|
|
3301
|
-
code:
|
|
3271
|
+
}), a && (jt.test(a) || e.addIssue({
|
|
3272
|
+
code: j.ZodIssueCode.custom,
|
|
3302
3273
|
message: "Неверно введено отчество"
|
|
3303
3274
|
}));
|
|
3304
3275
|
}).transform((r) => {
|
|
3305
|
-
const { surname: e, name: t, patronymic: n } =
|
|
3276
|
+
const { surname: e, name: t, patronymic: n } = Be(r);
|
|
3306
3277
|
return {
|
|
3307
|
-
surname:
|
|
3308
|
-
name:
|
|
3309
|
-
patronymic: n ?
|
|
3278
|
+
surname: je(e),
|
|
3279
|
+
name: je(t),
|
|
3280
|
+
patronymic: n ? je(n) : void 0
|
|
3310
3281
|
};
|
|
3311
|
-
}),
|
|
3312
|
-
const [t, n, a] = (r == null ? void 0 : r.split(".")) ?? "",
|
|
3282
|
+
}), Xr = j.string().length(10, { message: ge.INVALID_DATE }).superRefine((r, e) => {
|
|
3283
|
+
const [t, n, a] = (r == null ? void 0 : r.split(".")) ?? "", s = Fe(`${t}/${n}/${a}`, "dd/MM/yyyy", /* @__PURE__ */ new Date());
|
|
3313
3284
|
+a <= 1950 && e.addIssue({
|
|
3314
|
-
code:
|
|
3315
|
-
message:
|
|
3316
|
-
}),
|
|
3317
|
-
code:
|
|
3318
|
-
message:
|
|
3319
|
-
}), (/* @__PURE__ */ new Date()).getTime() < new Date(
|
|
3320
|
-
code:
|
|
3321
|
-
message:
|
|
3285
|
+
code: j.ZodIssueCode.custom,
|
|
3286
|
+
message: ge.INVALID_DATE
|
|
3287
|
+
}), yt(s) || e.addIssue({
|
|
3288
|
+
code: j.ZodIssueCode.custom,
|
|
3289
|
+
message: ge.INVALID_DATE
|
|
3290
|
+
}), (/* @__PURE__ */ new Date()).getTime() < new Date(s).getTime() && e.addIssue({
|
|
3291
|
+
code: j.ZodIssueCode.custom,
|
|
3292
|
+
message: ge.FUTURE_DATE_NOT_ALLOWED
|
|
3322
3293
|
});
|
|
3323
|
-
}),
|
|
3294
|
+
}), he = {
|
|
3324
3295
|
transparent: "transparent",
|
|
3325
3296
|
current: "currentColor",
|
|
3326
3297
|
inherit: "inherit",
|
|
3327
3298
|
initial: "initial"
|
|
3328
|
-
},
|
|
3299
|
+
}, Ce = {
|
|
3329
3300
|
"blue-grey-100": "#f3f4f7",
|
|
3330
3301
|
"blue-grey-200": "#eaedf1",
|
|
3331
3302
|
"blue-grey-300": "#d4dbe2",
|
|
@@ -3349,8 +3320,12 @@ const Ve = (r) => {
|
|
|
3349
3320
|
white: "#ffffff",
|
|
3350
3321
|
"primary-disabled": "#809bc7",
|
|
3351
3322
|
"secondary-disabled": "#FFB7BF",
|
|
3352
|
-
|
|
3353
|
-
|
|
3323
|
+
dark: "#000000",
|
|
3324
|
+
purple: "#5f40bd",
|
|
3325
|
+
"purple-hover": "#52399d",
|
|
3326
|
+
overlay: "#0000004d",
|
|
3327
|
+
...he
|
|
3328
|
+
}, nt = {
|
|
3354
3329
|
dark: "#292929",
|
|
3355
3330
|
disabled: "#a9b6c5",
|
|
3356
3331
|
footer: "#c3c3c3",
|
|
@@ -3364,8 +3339,8 @@ const Ve = (r) => {
|
|
|
3364
3339
|
white: "#ffffff",
|
|
3365
3340
|
"primary-disabled": "#809bc7",
|
|
3366
3341
|
"blue-grey-600": "#94a4b7",
|
|
3367
|
-
...
|
|
3368
|
-
},
|
|
3342
|
+
...he
|
|
3343
|
+
}, at = {
|
|
3369
3344
|
"barvcray-200": "#ebeef4",
|
|
3370
3345
|
"barvcray-300": "#dde1e8",
|
|
3371
3346
|
"greymint-200": "#deecee",
|
|
@@ -3378,8 +3353,8 @@ const Ve = (r) => {
|
|
|
3378
3353
|
"skyblue-100": "#f4f8fe",
|
|
3379
3354
|
"skyblue-200": "#e7f3ff",
|
|
3380
3355
|
"skyblue-300": "#d9edff",
|
|
3381
|
-
...
|
|
3382
|
-
},
|
|
3356
|
+
...he
|
|
3357
|
+
}, $ = {
|
|
3383
3358
|
"accent-default": "#2477ff",
|
|
3384
3359
|
"accent-hover": "#0053da",
|
|
3385
3360
|
"blue-grey-100": "#f3f4f7",
|
|
@@ -3404,8 +3379,8 @@ const Ve = (r) => {
|
|
|
3404
3379
|
white: "#ffffff",
|
|
3405
3380
|
"primary-disabled": "#809bc7",
|
|
3406
3381
|
footer: "#C3C3C3",
|
|
3407
|
-
...
|
|
3408
|
-
},
|
|
3382
|
+
...he
|
|
3383
|
+
}, Ne = {
|
|
3409
3384
|
"blue-grey-500": "#a9b6c5",
|
|
3410
3385
|
"blue-grey-700": "#69809a",
|
|
3411
3386
|
"blue-grey-800": "#5a6e85",
|
|
@@ -3423,21 +3398,21 @@ const Ve = (r) => {
|
|
|
3423
3398
|
warning: "#f49f00",
|
|
3424
3399
|
white: "#ffffff",
|
|
3425
3400
|
"primary-disabled": "#809bc7",
|
|
3426
|
-
...
|
|
3427
|
-
},
|
|
3401
|
+
...he
|
|
3402
|
+
}, st = {
|
|
3428
3403
|
none: "0",
|
|
3429
3404
|
sm: "4px",
|
|
3430
3405
|
md: "8px",
|
|
3431
3406
|
lg: "16px",
|
|
3432
3407
|
full: "9999px"
|
|
3433
|
-
},
|
|
3408
|
+
}, it = {
|
|
3434
3409
|
30: "30deg",
|
|
3435
3410
|
45: "45deg",
|
|
3436
3411
|
80: "80deg",
|
|
3437
3412
|
90: "90deg",
|
|
3438
3413
|
110: "110deg",
|
|
3439
3414
|
180: "180deg"
|
|
3440
|
-
},
|
|
3415
|
+
}, ot = {
|
|
3441
3416
|
12: "12px",
|
|
3442
3417
|
14: "14px",
|
|
3443
3418
|
16: "16px",
|
|
@@ -3447,7 +3422,7 @@ const Ve = (r) => {
|
|
|
3447
3422
|
28: "28px",
|
|
3448
3423
|
32: "32px",
|
|
3449
3424
|
40: "40px"
|
|
3450
|
-
},
|
|
3425
|
+
}, dt = {
|
|
3451
3426
|
16: "16px",
|
|
3452
3427
|
20: "20px",
|
|
3453
3428
|
22: "22px",
|
|
@@ -3456,7 +3431,7 @@ const Ve = (r) => {
|
|
|
3456
3431
|
32: "32px",
|
|
3457
3432
|
40: "40px",
|
|
3458
3433
|
48: "48px"
|
|
3459
|
-
},
|
|
3434
|
+
}, lt = {
|
|
3460
3435
|
/* # Headline */
|
|
3461
3436
|
".mob-headline-bold-m": {
|
|
3462
3437
|
"@apply font-bold text-28 leading-32": ""
|
|
@@ -3516,7 +3491,7 @@ const Ve = (r) => {
|
|
|
3516
3491
|
"@apply font-normal text-12 leading-16": ""
|
|
3517
3492
|
}
|
|
3518
3493
|
};
|
|
3519
|
-
var
|
|
3494
|
+
var ct = {}, ut = {};
|
|
3520
3495
|
(function(r) {
|
|
3521
3496
|
Object.defineProperty(r, "__esModule", {
|
|
3522
3497
|
value: !0
|
|
@@ -3533,17 +3508,17 @@ var nt = {}, at = {};
|
|
|
3533
3508
|
};
|
|
3534
3509
|
}
|
|
3535
3510
|
e.withOptions = function(n, a = () => ({})) {
|
|
3536
|
-
const
|
|
3511
|
+
const s = function(i) {
|
|
3537
3512
|
return {
|
|
3538
|
-
__options:
|
|
3539
|
-
handler: n(
|
|
3540
|
-
config: a(
|
|
3513
|
+
__options: i,
|
|
3514
|
+
handler: n(i),
|
|
3515
|
+
config: a(i)
|
|
3541
3516
|
};
|
|
3542
3517
|
};
|
|
3543
|
-
return
|
|
3518
|
+
return s.__isOptionsFunction = !0, s.__pluginFunction = n, s.__configFunction = a, s;
|
|
3544
3519
|
};
|
|
3545
3520
|
const t = e;
|
|
3546
|
-
})(
|
|
3521
|
+
})(ut);
|
|
3547
3522
|
(function(r) {
|
|
3548
3523
|
Object.defineProperty(r, "__esModule", {
|
|
3549
3524
|
value: !0
|
|
@@ -3553,23 +3528,23 @@ var nt = {}, at = {};
|
|
|
3553
3528
|
return n;
|
|
3554
3529
|
}
|
|
3555
3530
|
});
|
|
3556
|
-
const e = /* @__PURE__ */ t(
|
|
3531
|
+
const e = /* @__PURE__ */ t(ut);
|
|
3557
3532
|
function t(a) {
|
|
3558
3533
|
return a && a.__esModule ? a : {
|
|
3559
3534
|
default: a
|
|
3560
3535
|
};
|
|
3561
3536
|
}
|
|
3562
3537
|
const n = e.default;
|
|
3563
|
-
})(
|
|
3564
|
-
let
|
|
3565
|
-
var
|
|
3566
|
-
const
|
|
3538
|
+
})(ct);
|
|
3539
|
+
let Ie = ct;
|
|
3540
|
+
var ft = (Ie.__esModule ? Ie : { default: Ie }).default;
|
|
3541
|
+
const Ee = /* @__PURE__ */ We(ft), Rr = ft;
|
|
3567
3542
|
function Ue(r) {
|
|
3568
3543
|
return Object.fromEntries(
|
|
3569
3544
|
Object.entries(r).filter(([e]) => e !== "DEFAULT")
|
|
3570
3545
|
);
|
|
3571
3546
|
}
|
|
3572
|
-
var
|
|
3547
|
+
var Ar = Rr(
|
|
3573
3548
|
({ addUtilities: r, matchUtilities: e, theme: t }) => {
|
|
3574
3549
|
r({
|
|
3575
3550
|
"@keyframes enter": t("keyframes.enter"),
|
|
@@ -3725,37 +3700,37 @@ var Dr = Ar(
|
|
|
3725
3700
|
}
|
|
3726
3701
|
}
|
|
3727
3702
|
);
|
|
3728
|
-
const
|
|
3703
|
+
const pt = /* @__PURE__ */ We(Ar), Qr = {
|
|
3729
3704
|
theme: {
|
|
3730
3705
|
screens: {
|
|
3731
3706
|
mobile: { max: "1187px" },
|
|
3732
3707
|
desktop: "1188px"
|
|
3733
3708
|
},
|
|
3734
3709
|
backgroundColor: {
|
|
3735
|
-
color:
|
|
3736
|
-
banner:
|
|
3737
|
-
icon:
|
|
3710
|
+
color: Ce,
|
|
3711
|
+
banner: at,
|
|
3712
|
+
icon: $
|
|
3738
3713
|
},
|
|
3739
3714
|
textColor: {
|
|
3740
|
-
icon:
|
|
3741
|
-
color:
|
|
3715
|
+
icon: $,
|
|
3716
|
+
color: nt
|
|
3742
3717
|
},
|
|
3743
|
-
fill:
|
|
3744
|
-
stroke:
|
|
3745
|
-
borderColor:
|
|
3746
|
-
outlineColor:
|
|
3747
|
-
borderRadius:
|
|
3718
|
+
fill: $,
|
|
3719
|
+
stroke: $,
|
|
3720
|
+
borderColor: Ne,
|
|
3721
|
+
outlineColor: Ne,
|
|
3722
|
+
borderRadius: st,
|
|
3748
3723
|
fontFamily: { roboto: ["var(--ff-roboto)", "sans-serif"] },
|
|
3749
|
-
fontSize:
|
|
3750
|
-
lineHeight:
|
|
3751
|
-
gradientColorStops:
|
|
3724
|
+
fontSize: ot,
|
|
3725
|
+
lineHeight: dt,
|
|
3726
|
+
gradientColorStops: Ce,
|
|
3752
3727
|
boxShadow: {
|
|
3753
3728
|
sm: "0 8px 20px 0 rgba(0, 0, 0, 0.08)",
|
|
3754
3729
|
md: "0 12px 20px 0 rgba(0, 33, 87, 0.10)",
|
|
3755
3730
|
lg: "0 16px 24px 0 rgba(0, 33, 87, 0.16)"
|
|
3756
3731
|
},
|
|
3757
3732
|
extend: {
|
|
3758
|
-
bgGradientDeg:
|
|
3733
|
+
bgGradientDeg: it,
|
|
3759
3734
|
width: {
|
|
3760
3735
|
"popper-content": "var(--radix-popover-content-available-width)",
|
|
3761
3736
|
"popper-trigger": "var(--radix-popover-trigger-width)",
|
|
@@ -3800,11 +3775,103 @@ const Mr = /* @__PURE__ */ qe(Dr), en = {
|
|
|
3800
3775
|
},
|
|
3801
3776
|
plugins: [
|
|
3802
3777
|
// eslint-disable-next-line global-require
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
r(
|
|
3778
|
+
pt,
|
|
3779
|
+
Ee(({ addComponents: r }) => {
|
|
3780
|
+
r(lt);
|
|
3781
|
+
}),
|
|
3782
|
+
Ee(function({ matchUtilities: r, theme: e }) {
|
|
3783
|
+
r(
|
|
3784
|
+
{
|
|
3785
|
+
"bg-deg-gradient": (t) => ({
|
|
3786
|
+
"background-image": `linear-gradient(${t}, var(--tw-gradient-stops))`
|
|
3787
|
+
})
|
|
3788
|
+
},
|
|
3789
|
+
{
|
|
3790
|
+
values: Object.assign(e("bgGradientDeg", {}), {})
|
|
3791
|
+
}
|
|
3792
|
+
);
|
|
3793
|
+
})
|
|
3794
|
+
]
|
|
3795
|
+
}, Kr = {
|
|
3796
|
+
theme: {
|
|
3797
|
+
extend: {
|
|
3798
|
+
transitionDuration: {
|
|
3799
|
+
DEFAULT: "0.3s",
|
|
3800
|
+
12: "0.12s",
|
|
3801
|
+
15: "0.15s",
|
|
3802
|
+
2: "2s",
|
|
3803
|
+
333: "333s"
|
|
3804
|
+
},
|
|
3805
|
+
transitionTimingFunction: {
|
|
3806
|
+
DEFAULT: "ease-in-out"
|
|
3807
|
+
},
|
|
3808
|
+
keyframes: {
|
|
3809
|
+
slideDown: {
|
|
3810
|
+
from: { height: "0px" },
|
|
3811
|
+
to: { height: "var(--radix-accordion-content-height)" }
|
|
3812
|
+
},
|
|
3813
|
+
slideUp: {
|
|
3814
|
+
from: { height: "var(--radix-accordion-content-height)" },
|
|
3815
|
+
to: { height: "0px" }
|
|
3816
|
+
},
|
|
3817
|
+
"scale-in": {
|
|
3818
|
+
from: { opacity: "0", scale: "0" },
|
|
3819
|
+
to: { opacity: "1", scale: "1" }
|
|
3820
|
+
},
|
|
3821
|
+
"progress-loader": {
|
|
3822
|
+
"100%": {
|
|
3823
|
+
backgroundPosition: "100% 100%"
|
|
3824
|
+
}
|
|
3825
|
+
}
|
|
3826
|
+
},
|
|
3827
|
+
animation: {
|
|
3828
|
+
slideDown: "slideDown 0.3s cubic-bezier(0.87, 0, 0.13, 1)",
|
|
3829
|
+
slideUp: "slideUp 0.3s cubic-bezier(0.87, 0, 0.13, 1)",
|
|
3830
|
+
"scale-in": "scale-in 0.3s ease-in-out",
|
|
3831
|
+
"progress-loader": "progress-loader 250s linear infinite"
|
|
3832
|
+
}
|
|
3833
|
+
}
|
|
3834
|
+
}
|
|
3835
|
+
}, en = {
|
|
3836
|
+
theme: {
|
|
3837
|
+
screens: {
|
|
3838
|
+
mobile: { max: "1187px" },
|
|
3839
|
+
desktop: "1188px"
|
|
3840
|
+
},
|
|
3841
|
+
backgroundColor: {
|
|
3842
|
+
color: Ce,
|
|
3843
|
+
banner: at,
|
|
3844
|
+
icon: $
|
|
3845
|
+
},
|
|
3846
|
+
textColor: {
|
|
3847
|
+
icon: $,
|
|
3848
|
+
color: nt
|
|
3849
|
+
},
|
|
3850
|
+
fill: $,
|
|
3851
|
+
stroke: $,
|
|
3852
|
+
borderColor: Ne,
|
|
3853
|
+
outlineColor: Ne,
|
|
3854
|
+
borderRadius: st,
|
|
3855
|
+
fontFamily: { roboto: ["var(--ff-roboto)", "sans-serif"] },
|
|
3856
|
+
fontSize: ot,
|
|
3857
|
+
lineHeight: dt,
|
|
3858
|
+
gradientColorStops: Ce,
|
|
3859
|
+
boxShadow: {
|
|
3860
|
+
sm: "0 8px 20px 0 rgba(0, 0, 0, 0.08)",
|
|
3861
|
+
md: "0 12px 20px 0 rgba(0, 33, 87, 0.10)",
|
|
3862
|
+
lg: "0 16px 24px 0 rgba(0, 33, 87, 0.16)"
|
|
3863
|
+
},
|
|
3864
|
+
extend: {
|
|
3865
|
+
bgGradientDeg: it
|
|
3866
|
+
}
|
|
3867
|
+
},
|
|
3868
|
+
plugins: [
|
|
3869
|
+
// eslint-disable-next-line global-require
|
|
3870
|
+
pt,
|
|
3871
|
+
Ee(({ addComponents: r }) => {
|
|
3872
|
+
r(lt);
|
|
3806
3873
|
}),
|
|
3807
|
-
|
|
3874
|
+
Ee(function({ matchUtilities: r, theme: e }) {
|
|
3808
3875
|
r(
|
|
3809
3876
|
{
|
|
3810
3877
|
"bg-deg-gradient": (t) => ({
|
|
@@ -3820,44 +3887,46 @@ const Mr = /* @__PURE__ */ qe(Dr), en = {
|
|
|
3820
3887
|
};
|
|
3821
3888
|
export {
|
|
3822
3889
|
nn as Badge,
|
|
3823
|
-
|
|
3824
|
-
|
|
3825
|
-
|
|
3826
|
-
|
|
3890
|
+
Br as Breadcrumbs,
|
|
3891
|
+
Ur as Button,
|
|
3892
|
+
Fr as ButtonIcon,
|
|
3893
|
+
Wr as CustomLink,
|
|
3827
3894
|
an as DADATA_BASE_CACHE_URL,
|
|
3828
3895
|
sn as DADATA_BASE_CONSTANTS_URL,
|
|
3829
|
-
|
|
3830
|
-
|
|
3831
|
-
|
|
3896
|
+
qr as Document,
|
|
3897
|
+
mt as Heading,
|
|
3898
|
+
Me as Icon,
|
|
3832
3899
|
ht as Loader,
|
|
3833
|
-
|
|
3834
|
-
|
|
3835
|
-
|
|
3836
|
-
|
|
3837
|
-
|
|
3838
|
-
|
|
3900
|
+
Gr as PhoneView,
|
|
3901
|
+
Hr as ProgressBar,
|
|
3902
|
+
gt as ResponsiveContainer,
|
|
3903
|
+
Pe as RgxCheckForHyphen,
|
|
3904
|
+
jt as RgxPatronymic,
|
|
3905
|
+
Zt as RgxUnicode,
|
|
3839
3906
|
on as SPRITES_META,
|
|
3840
|
-
|
|
3841
|
-
|
|
3842
|
-
|
|
3843
|
-
|
|
3844
|
-
|
|
3845
|
-
|
|
3846
|
-
|
|
3847
|
-
|
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
|
|
3907
|
+
Vr as Section,
|
|
3908
|
+
Jr as Skeleton,
|
|
3909
|
+
zr as Table,
|
|
3910
|
+
ge as VALIDATION_MESSAGES,
|
|
3911
|
+
Ce as allowedBackgroundColors,
|
|
3912
|
+
it as allowedBackgroundDeg,
|
|
3913
|
+
at as allowedBannersBackgroundColors,
|
|
3914
|
+
st as allowedBorderRadius,
|
|
3915
|
+
ot as allowedFontSize,
|
|
3916
|
+
$ as allowedIconsColors,
|
|
3917
|
+
dt as allowedLineHeight,
|
|
3918
|
+
Ne as allowedStrokeColors,
|
|
3919
|
+
nt as allowedTextColors,
|
|
3920
|
+
lt as allowedTextStyles,
|
|
3921
|
+
je as capitalize,
|
|
3855
3922
|
x as cn,
|
|
3856
|
-
|
|
3923
|
+
Mr as deepCompare,
|
|
3924
|
+
Kr as extendsPreset,
|
|
3857
3925
|
Pr as formatToDate,
|
|
3858
|
-
|
|
3859
|
-
en as
|
|
3860
|
-
|
|
3861
|
-
|
|
3926
|
+
$r as isClient,
|
|
3927
|
+
en as resetPreset,
|
|
3928
|
+
Qr as tailwindConfigBase,
|
|
3929
|
+
Xr as zodCalendarValidate,
|
|
3930
|
+
Yr as zodDadataFioValidate
|
|
3862
3931
|
};
|
|
3863
3932
|
//# sourceMappingURL=hybrid.js.map
|