md-components-mdigial-azamat 0.0.293 → 0.0.295

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.
@@ -1,4 +1,4 @@
1
- import '../assets/index.5961e40b.css';const r = ["children"];
1
+ import '../assets/index.8fb6dbbd.css';const r = ["children"];
2
2
  function t({ children: o }) {
3
3
  return o;
4
4
  }
@@ -1,56 +1,59 @@
1
- import { jsxs as m, jsx as l } from "react/jsx-runtime";
2
- import { useMemo as d, useState as y, useEffect as S } from "react";
3
- import { c as Y } from "../cn-6a4bf187.js";
4
- import { PlayerRangeField as Z } from "../CustomCalculator/components/player/PlayerRangeField.js";
5
- import { PlayerSelectField as q } from "../CustomCalculator/components/player/PlayerSelectField.js";
6
- import { formatFinanceMoney as v } from "../FinanceCalculator/utils/calculations.js";
7
- import { B as ee } from "../index-db918f20.js";
8
- import { b as te, a as ae } from "../const-6b683c28.js";
9
- import { C as ne } from "../CheckboxGroup-8262fc49.js";
10
- import { C as oe } from "../ComponentContainer-dca711c6.js";
11
- import { getFinanceApplicationFormConfig as re } from "./defaultConfig.js";
12
- import { buildFinanceApplicationPayload as le } from "./payloadTemplate.js";
13
- import { getMonthlyPayment as se } from "./player/calculation.js";
14
- import { DocumentsList as ce, TextInput as ie, FieldError as g, PhoneInput as me, textControlClass as ue } from "./player/fields.js";
15
- import { getInitialValues as F, getComputedValue as pe, isFieldVisible as xe, getCurrencyLabel as B, resolveFieldTemplate as de } from "./player/fieldValues.js";
16
- import { toNumber as he } from "./player/format.js";
17
- import { getApiRateRequest as be, extractSelectItems as ye, getResolvedSelectOptions as ge, extractRateFromResponse as fe } from "./player/remote.js";
18
- import { getFieldError as we } from "./player/validation.js";
19
- const Te = (h) => {
20
- var D, J, z, W;
21
- const t = d(() => re(h), [h]), [P, V] = y(!1), [L, O] = y({}), [$, C] = y({}), [k, N] = y({}), [E, _] = y(
22
- () => F(t.fields)
23
- ), x = (e, n) => {
24
- _((o) => ({
1
+ import { jsxs as i, jsx as s } from "react/jsx-runtime";
2
+ import { useMemo as b, useState as x, useEffect as B } from "react";
3
+ import { c as ce } from "../cn-6a4bf187.js";
4
+ import { PlayerRangeField as ie } from "../CustomCalculator/components/player/PlayerRangeField.js";
5
+ import { PlayerSelectField as me } from "../CustomCalculator/components/player/PlayerSelectField.js";
6
+ import { formatFinanceMoney as F } from "../FinanceCalculator/utils/calculations.js";
7
+ import { B as K } from "../index-db918f20.js";
8
+ import { b as Q, a as U } from "../const-6b683c28.js";
9
+ import { C as ue } from "../CheckboxGroup-8262fc49.js";
10
+ import { C as pe } from "../ComponentContainer-dca711c6.js";
11
+ import { getFinanceApplicationFormConfig as de } from "./defaultConfig.js";
12
+ import { buildFinanceApplicationPayload as xe, getFinanceApplicationPayloadFieldMap as he } from "./payloadTemplate.js";
13
+ import { getMonthlyPayment as be } from "./player/calculation.js";
14
+ import { DocumentsList as fe, TextInput as ye, FieldError as v, PhoneInput as ge, textControlClass as we } from "./player/fields.js";
15
+ import { getInitialValues as C, getComputedValue as Ne, isFieldVisible as ve, getCurrencyLabel as V, resolveFieldTemplate as Ce } from "./player/fieldValues.js";
16
+ import { toNumber as Se } from "./player/format.js";
17
+ import { getApiRateRequest as Fe, extractSelectItems as Ee, getResolvedSelectOptions as Pe, extractRateFromResponse as Be } from "./player/remote.js";
18
+ import { readSubmitErrorResponse as Ve, normalizeSubmitErrors as Le } from "./player/submitErrors.js";
19
+ import { getFieldError as ke } from "./player/validation.js";
20
+ const Ye = (f) => {
21
+ var X, R, W, G;
22
+ const t = b(() => de(f), [f]), [L, k] = x(!1), [Y, O] = x(!1), [$, y] = x({}), [j, g] = x(""), [I, E] = x({}), [_, P] = x({}), [D, S] = x(
23
+ () => C(t.fields)
24
+ ), h = (e, n) => {
25
+ S((o) => ({
25
26
  ...o,
26
27
  [e]: n
27
- })), O((o) => {
28
+ })), y((o) => {
28
29
  if (!o[e])
29
30
  return o;
30
31
  const { [e]: a, ...r } = o;
31
32
  return r;
32
- });
33
- }, c = d(() => {
33
+ }), g("");
34
+ }, Z = () => {
35
+ S(C(t.fields)), y({}), g(""), O(!1);
36
+ }, c = b(() => {
34
37
  const e = {
35
- ...F(t.fields),
36
- ...E
38
+ ...C(t.fields),
39
+ ...D
37
40
  };
38
41
  return t.fields.forEach((n) => {
39
- n.type === "computed" && (e[n.name] = pe(n, e));
42
+ n.type === "computed" && (e[n.name] = Ne(n, e));
40
43
  }), e;
41
- }, [t.fields, E]), s = d(
42
- () => be(t.calculation, c),
44
+ }, [t.fields, D]), l = b(
45
+ () => Fe(t.calculation, c),
43
46
  [t.calculation, c]
44
47
  );
45
- S(() => {
46
- if (!(s != null && s.url)) {
47
- C({});
48
+ B(() => {
49
+ if (!(l != null && l.url)) {
50
+ E({});
48
51
  return;
49
52
  }
50
53
  let e = !0;
51
54
  return (async () => {
52
55
  try {
53
- const o = await fetch(s.url);
56
+ const o = await fetch(l.url);
54
57
  if (!o.ok)
55
58
  throw new Error(`Rate request failed: ${o.status}`);
56
59
  let a;
@@ -59,16 +62,16 @@ const Te = (h) => {
59
62
  } catch {
60
63
  a = await o.text();
61
64
  }
62
- const r = fe(a, s.responsePath);
63
- e && C({ url: s.url, rate: r });
65
+ const r = Be(a, l.responsePath);
66
+ e && E({ url: l.url, rate: r });
64
67
  } catch {
65
- e && C({ url: s.url });
68
+ e && E({ url: l.url });
66
69
  }
67
70
  })(), () => {
68
71
  e = !1;
69
72
  };
70
- }, [s == null ? void 0 : s.responsePath, s == null ? void 0 : s.url]);
71
- const X = d(
73
+ }, [l == null ? void 0 : l.responsePath, l == null ? void 0 : l.url]);
74
+ const q = b(
72
75
  () => JSON.stringify(
73
76
  t.apiCollections.filter(
74
77
  (e) => t.fields.some(
@@ -87,7 +90,7 @@ const Te = (h) => {
87
90
  ),
88
91
  [t.apiCollections, t.fields]
89
92
  );
90
- S(() => {
93
+ B(() => {
91
94
  const e = new Set(
92
95
  t.fields.filter(
93
96
  (a) => {
@@ -99,7 +102,7 @@ const Te = (h) => {
99
102
  (a) => e.has(a.id) && !!a.url
100
103
  );
101
104
  if (n.length === 0) {
102
- N({});
105
+ P({});
103
106
  return;
104
107
  }
105
108
  let o = !0;
@@ -108,13 +111,13 @@ const Te = (h) => {
108
111
  const r = await fetch(a.url);
109
112
  if (!r.ok)
110
113
  throw new Error(`Options request failed: ${r.status}`);
111
- const u = await r.json(), i = ye(u, a.responsePath);
112
- o && N((p) => ({
114
+ const u = await r.json(), m = Ee(u, a.responsePath);
115
+ o && P((p) => ({
113
116
  ...p,
114
- [a.id]: { items: i }
117
+ [a.id]: { items: m }
115
118
  }));
116
119
  } catch {
117
- o && N((r) => ({
120
+ o && P((r) => ({
118
121
  ...r,
119
122
  [a.id]: { items: [] }
120
123
  }));
@@ -122,177 +125,189 @@ const Te = (h) => {
122
125
  }), () => {
123
126
  o = !1;
124
127
  };
125
- }, [t.apiCollections, t.fields, X]);
126
- const f = t.fields.filter(
127
- (e) => xe(e, c)
128
- ), G = f.filter(
128
+ }, [t.apiCollections, t.fields, q]);
129
+ const w = t.fields.filter(
130
+ (e) => ve(e, c)
131
+ ), ee = w.filter(
129
132
  (e) => (e.placement || "form") === "form"
130
- ), H = f.filter(
133
+ ), te = w.filter(
131
134
  (e) => e.placement === "result"
132
- ), b = d(
135
+ ), N = b(
133
136
  () => t.fields.reduce(
134
- (e, n) => (n.type === "select" && (e[n.name] = ge(
137
+ (e, n) => (n.type === "select" && (e[n.name] = Pe(
135
138
  n,
136
139
  c,
137
- k
140
+ _
138
141
  )), e),
139
142
  {}
140
143
  ),
141
- [t.fields, c, k]
142
- ), K = d(
144
+ [t.fields, c, _]
145
+ ), ae = b(
143
146
  () => JSON.stringify(
144
- Object.entries(b).map(([e, n]) => [
147
+ Object.entries(N).map(([e, n]) => [
145
148
  e,
146
149
  n.map((o) => o.value)
147
150
  ])
148
151
  ),
149
- [b]
152
+ [N]
150
153
  );
151
- S(() => {
152
- _((e) => {
154
+ B(() => {
155
+ S((e) => {
153
156
  const n = {
154
- ...F(t.fields),
157
+ ...C(t.fields),
155
158
  ...e
156
159
  };
157
160
  let o = !1, a = e;
158
161
  return t.fields.forEach((r) => {
159
162
  if (r.type !== "select")
160
163
  return;
161
- const u = b[r.name] || r.options;
164
+ const u = N[r.name] || r.options;
162
165
  if (u.length === 0)
163
166
  return;
164
- const i = n[r.name];
167
+ const m = n[r.name];
165
168
  u.some(
166
- (w) => String(w.value) === String(i)
169
+ (d) => String(d.value) === String(m)
167
170
  ) || (o || (a = { ...e }, o = !0), a[r.name] = u[0].value);
168
171
  }), o ? a : e;
169
172
  });
170
- }, [t.fields, b, K]);
171
- const I = se(
173
+ }, [t.fields, N, ae]);
174
+ const M = be(
172
175
  t,
173
176
  c,
174
- $.url === (s == null ? void 0 : s.url) ? $.rate : void 0
175
- ), j = f.find(
177
+ I.url === (l == null ? void 0 : l.url) ? I.rate : void 0
178
+ ), T = w.find(
176
179
  (e) => e.type === "money_range" && e.name === (t.calculation.amountField || "price")
177
- ), Q = j ? B(j, t.fields, c) : "", A = (D = t.labels.resultNote) == null ? void 0 : D.replace(/^\*\s*/, "").trim(), R = !!((J = t.documents) != null && J.title) || !!((W = (z = t.documents) == null ? void 0 : z.items) != null && W.filter(Boolean).length), U = async (e) => {
180
+ ), ne = T ? V(T, t.fields, c) : "", A = (X = t.labels.resultNote) == null ? void 0 : X.replace(/^\*\s*/, "").trim(), oe = !!((R = t.documents) != null && R.title) || !!((G = (W = t.documents) == null ? void 0 : W.items) != null && G.filter(Boolean).length), re = async (e) => {
178
181
  var a, r, u;
179
- e.preventDefault();
180
- const n = f.reduce(
181
- (i, p) => {
182
- const w = we(p, c[p.name]);
183
- return w && (i[p.name] = w), i;
182
+ e.preventDefault(), g("");
183
+ const n = w.reduce(
184
+ (m, p) => {
185
+ const d = ke(p, c[p.name]);
186
+ return d && (m[p.name] = d), m;
184
187
  },
185
188
  {}
186
189
  );
187
- if (O(n), Object.keys(n).length > 0)
190
+ if (y(n), Object.keys(n).length > 0)
188
191
  return;
189
- V(!0);
192
+ k(!0);
190
193
  const o = {
191
194
  ...c,
192
- monthly: I,
195
+ monthly: M,
193
196
  topic: t.topic
194
197
  };
195
- t.fields.forEach((i) => {
196
- i.type === "phone" && (o[i.name] = `${i.countryCode || "+996"}${c[i.name] || ""}`);
198
+ t.fields.forEach((m) => {
199
+ m.type === "phone" && (o[m.name] = `${m.countryCode || "+996"}${c[m.name] || ""}`);
197
200
  });
198
201
  try {
199
- const i = (r = (a = t.submit) == null ? void 0 : a.endpoint) == null ? void 0 : r.trim();
200
- if (i) {
201
- const p = le(
202
+ const m = (r = (a = t.submit) == null ? void 0 : a.endpoint) == null ? void 0 : r.trim();
203
+ if (m) {
204
+ const p = xe(
202
205
  t.submit.payloadTemplate,
203
206
  o
204
- );
205
- await fetch(i, {
207
+ ), d = await fetch(m, {
206
208
  method: t.submit.method || "POST",
207
209
  headers: { "Content-Type": "application/json" },
208
210
  body: JSON.stringify(p)
209
211
  });
212
+ if (!d.ok) {
213
+ const le = await Ve(d), H = Le(
214
+ le,
215
+ w,
216
+ he(t.submit.payloadTemplate),
217
+ t.submit.errorFieldMap
218
+ );
219
+ y(H.fieldErrors), g(H.formError);
220
+ return;
221
+ }
210
222
  } else
211
- await ((u = h.onSubmit) == null ? void 0 : u.call(h, o));
223
+ await ((u = f.onSubmit) == null ? void 0 : u.call(f, o));
224
+ y({}), S(C(t.fields)), O(!0);
225
+ } catch {
226
+ g("Не удалось отправить заявку. Попробуйте позже.");
212
227
  } finally {
213
- V(!1);
228
+ k(!1);
214
229
  }
215
- }, M = (e) => {
216
- const n = c[e.name], o = L[e.name];
230
+ }, z = (e) => {
231
+ const n = c[e.name], o = $[e.name];
217
232
  if (e.type === "text")
218
- return /* @__PURE__ */ m(
233
+ return /* @__PURE__ */ i(
219
234
  "div",
220
235
  {
221
236
  className: "w-full",
222
237
  children: [
223
- /* @__PURE__ */ l(
224
- ie,
238
+ /* @__PURE__ */ s(
239
+ ye,
225
240
  {
226
241
  label: e.label,
227
242
  value: String(n || ""),
228
243
  placeholder: e.placeholder,
229
244
  inputMode: e.inputMode,
230
- onChange: (a) => x(e.name, a)
245
+ onChange: (a) => h(e.name, a)
231
246
  }
232
247
  ),
233
- /* @__PURE__ */ l(g, { error: o })
248
+ /* @__PURE__ */ s(v, { error: o })
234
249
  ]
235
250
  },
236
251
  e.id
237
252
  );
238
253
  if (e.type === "phone")
239
- return /* @__PURE__ */ m(
254
+ return /* @__PURE__ */ i(
240
255
  "div",
241
256
  {
242
257
  className: "w-full",
243
258
  children: [
244
- /* @__PURE__ */ l(
245
- me,
259
+ /* @__PURE__ */ s(
260
+ ge,
246
261
  {
247
262
  label: e.label,
248
263
  value: String(n || ""),
249
264
  countryLabel: e.countryLabel,
250
265
  countryCode: e.countryCode,
251
266
  maxLength: e.maxLength,
252
- onChange: (a) => x(e.name, a)
267
+ onChange: (a) => h(e.name, a)
253
268
  }
254
269
  ),
255
- /* @__PURE__ */ l(g, { error: o })
270
+ /* @__PURE__ */ s(v, { error: o })
256
271
  ]
257
272
  },
258
273
  e.id
259
274
  );
260
275
  if (e.type === "select") {
261
- const a = b[e.name] || e.options;
262
- return /* @__PURE__ */ m(
276
+ const a = N[e.name] || e.options;
277
+ return /* @__PURE__ */ i(
263
278
  "div",
264
279
  {
265
280
  className: "w-full",
266
281
  children: [
267
- /* @__PURE__ */ l(
268
- q,
282
+ /* @__PURE__ */ s(
283
+ me,
269
284
  {
270
285
  title: e.label,
271
286
  value: n,
272
287
  options: a,
273
288
  color: t.color,
274
- onChangeValue: (r) => x(e.name, r)
289
+ onChangeValue: (r) => h(e.name, r)
275
290
  }
276
291
  ),
277
- /* @__PURE__ */ l(g, { error: o })
292
+ /* @__PURE__ */ s(v, { error: o })
278
293
  ]
279
294
  },
280
295
  e.id
281
296
  );
282
297
  }
283
298
  if (e.type === "money_range" || e.type === "term_range") {
284
- const a = e.type === "money_range" ? B(e, t.fields, c) : de(e.suffix, t.fields, c);
285
- return /* @__PURE__ */ m(
299
+ const a = e.type === "money_range" ? V(e, t.fields, c) : Ce(e.suffix, t.fields, c);
300
+ return /* @__PURE__ */ i(
286
301
  "div",
287
302
  {
288
303
  className: "flex w-full flex-col gap-2",
289
304
  children: [
290
- e.sectionLabel && /* @__PURE__ */ l("p", { className: "m-0", children: e.sectionLabel }),
291
- /* @__PURE__ */ l(
292
- Z,
305
+ e.sectionLabel && /* @__PURE__ */ s("p", { className: "m-0", children: e.sectionLabel }),
306
+ /* @__PURE__ */ s(
307
+ ie,
293
308
  {
294
309
  title: e.title || e.label,
295
- label: e.type === "money_range" ? `${e.minLabel || "Мин. сумма"}: ${v(e.min)} ${a || ""}, ${e.maxLabel || "Макс. сумма"}: ${v(e.max)} ${a || ""}` : void 0,
310
+ label: e.type === "money_range" ? `${e.minLabel || "Мин. сумма"}: ${F(e.min)} ${a || ""}, ${e.maxLabel || "Макс. сумма"}: ${F(e.max)} ${a || ""}` : void 0,
296
311
  currency: a || "",
297
312
  color: t.color,
298
313
  min: e.min,
@@ -301,18 +316,18 @@ const Te = (h) => {
301
316
  value: n,
302
317
  allowedValues: e.allowedValues,
303
318
  errorMin: e.min,
304
- onChangeValue: (r) => x(e.name, r)
319
+ onChangeValue: (r) => h(e.name, r)
305
320
  }
306
321
  ),
307
- e.allowedValues && e.allowedValues.length > 0 && /* @__PURE__ */ l("div", { className: "w-full overflow-x-auto pb-2", children: /* @__PURE__ */ l("div", { className: "mt-4 flex w-fit gap-3 max-tablet:gap-2", children: e.allowedValues.map((r) => {
322
+ e.allowedValues && e.allowedValues.length > 0 && /* @__PURE__ */ s("div", { className: "w-full overflow-x-auto pb-2", children: /* @__PURE__ */ s("div", { className: "mt-4 flex w-fit gap-3 max-tablet:gap-2", children: e.allowedValues.map((r) => {
308
323
  const u = Number(n) === Number(r);
309
- return /* @__PURE__ */ m(
324
+ return /* @__PURE__ */ i(
310
325
  "button",
311
326
  {
312
327
  type: "button",
313
- onClick: () => x(e.name, r),
328
+ onClick: () => h(e.name, r),
314
329
  style: u ? { backgroundColor: t.color } : void 0,
315
- className: Y(
330
+ className: ce(
316
331
  "min-w-[96px] rounded-xl border-none px-4 py-[10px] text-[15px] leading-5 transition-colors max-tablet:min-w-fit max-tablet:px-3 max-tablet:py-1.5 max-tablet:text-sm",
317
332
  u ? "text-white" : "bg-lightBlue text-neutral-900 hover:bg-grayBlue"
318
333
  ),
@@ -325,27 +340,27 @@ const Te = (h) => {
325
340
  r
326
341
  );
327
342
  }) }) }),
328
- /* @__PURE__ */ l(g, { error: o })
343
+ /* @__PURE__ */ s(v, { error: o })
329
344
  ]
330
345
  },
331
346
  e.id
332
347
  );
333
348
  }
334
349
  if (e.type === "computed") {
335
- const a = B(e, t.fields, c);
336
- return /* @__PURE__ */ m(
350
+ const a = V(e, t.fields, c);
351
+ return /* @__PURE__ */ i(
337
352
  "div",
338
353
  {
339
354
  className: "flex w-full flex-col gap-2",
340
355
  children: [
341
- e.sectionLabel && /* @__PURE__ */ l("p", { className: "m-0", children: e.sectionLabel }),
342
- e.placeholder && /* @__PURE__ */ l("span", { className: "text-[13px] leading-[13px] mt-1 text-[#8a96a8]", children: e.placeholder }),
343
- /* @__PURE__ */ l(
356
+ e.sectionLabel && /* @__PURE__ */ s("p", { className: "m-0", children: e.sectionLabel }),
357
+ e.placeholder && /* @__PURE__ */ s("span", { className: "text-[13px] leading-[13px] mt-1 text-[#8a96a8]", children: e.placeholder }),
358
+ /* @__PURE__ */ s(
344
359
  "input",
345
360
  {
346
- className: ue,
361
+ className: we,
347
362
  disabled: !0,
348
- value: `${v(he(n))} ${a || e.suffix || ""}`,
363
+ value: `${F(Se(n))} ${a || e.suffix || ""}`,
349
364
  readOnly: !0
350
365
  }
351
366
  )
@@ -354,69 +369,93 @@ const Te = (h) => {
354
369
  e.id
355
370
  );
356
371
  }
357
- return e.type === "checkbox" ? T(e) : null;
358
- }, T = (e) => /* @__PURE__ */ m(
372
+ return e.type === "checkbox" ? J(e) : null;
373
+ }, J = (e) => /* @__PURE__ */ i(
359
374
  "div",
360
375
  {
361
376
  className: "flex flex-col gap-1",
362
377
  children: [
363
- /* @__PURE__ */ l(
364
- ne,
378
+ /* @__PURE__ */ s(
379
+ ue,
365
380
  {
366
381
  checked: !!c[e.name],
367
- onChange: (n) => x(e.name, n.target.checked),
382
+ onChange: (n) => h(e.name, n.target.checked),
368
383
  label: e.label
369
384
  }
370
385
  ),
371
- /* @__PURE__ */ l(g, { error: L[e.name] })
386
+ /* @__PURE__ */ s(v, { error: $[e.name] })
372
387
  ]
373
388
  },
374
389
  e.id
375
- );
376
- return /* @__PURE__ */ m(oe, { children: [
377
- t.title && /* @__PURE__ */ l("h2", { className: "text-[26px] leading-[32px] md:text-[44px] md:leading-[52px] font-bold text-neutral-900 text-center m-0 mb-6", children: t.title }),
378
- /* @__PURE__ */ m(
390
+ ), se = /* @__PURE__ */ i("div", { className: "flex min-h-[360px] flex-col items-center justify-center rounded-[20px] bg-white px-6 py-12 text-center", children: [
391
+ /* @__PURE__ */ s(
392
+ "div",
393
+ {
394
+ className: "mb-6 flex h-16 w-16 items-center justify-center rounded-full text-[34px] font-bold text-white",
395
+ style: { backgroundColor: t.color },
396
+ "aria-hidden": "true",
397
+ children: "✓"
398
+ }
399
+ ),
400
+ /* @__PURE__ */ s("h3", { className: "m-0 text-[28px] leading-9 font-bold text-neutral-900", children: t.labels.successTitle }),
401
+ t.labels.successDescription && /* @__PURE__ */ s("p", { className: "m-0 mt-3 max-w-[460px] text-[16px] leading-6 text-[#6f7f95]", children: t.labels.successDescription }),
402
+ /* @__PURE__ */ s(
403
+ K,
404
+ {
405
+ type: "button",
406
+ size: Q.XL,
407
+ variant: U.Primary,
408
+ className: "mt-8 min-w-[260px]",
409
+ onClick: Z,
410
+ children: t.labels.successButton
411
+ }
412
+ )
413
+ ] });
414
+ return /* @__PURE__ */ i(pe, { children: [
415
+ t.title && /* @__PURE__ */ s("h2", { className: "text-[26px] leading-[32px] md:text-[44px] md:leading-[52px] font-bold text-neutral-900 text-center m-0 mb-6", children: t.title }),
416
+ Y ? se : /* @__PURE__ */ i(
379
417
  "form",
380
418
  {
381
419
  className: "flex rounded-[20px] overflow-hidden max-tablet:flex-col",
382
- onSubmit: U,
420
+ onSubmit: re,
383
421
  children: [
384
- /* @__PURE__ */ m("div", { className: "w-[60%] flex flex-col items-start justify-center gap-4 bg-white px-[88px] pt-8 pb-16 max-tablet:w-full max-tablet:px-4 max-tablet:py-3", children: [
385
- /* @__PURE__ */ l("p", { className: "text-[24px] leading-8 font-bold m-0 mb-2 max-tablet:text-center max-tablet:w-full", children: t.labels.formTitle }),
386
- G.map(M)
422
+ /* @__PURE__ */ i("div", { className: "w-[60%] flex flex-col items-start justify-center gap-4 bg-white px-[88px] pt-8 pb-16 max-tablet:w-full max-tablet:px-4 max-tablet:py-3", children: [
423
+ /* @__PURE__ */ s("p", { className: "text-[24px] leading-8 font-bold m-0 mb-2 max-tablet:text-center max-tablet:w-full", children: t.labels.formTitle }),
424
+ ee.map(z)
387
425
  ] }),
388
- /* @__PURE__ */ m("div", { className: "w-[40%] bg-[#f7f8fa] px-10 py-8 flex flex-col gap-8 max-tablet:w-full max-tablet:px-5 max-tablet:py-4", children: [
389
- /* @__PURE__ */ m("div", { className: "bg-white rounded-[20px] shadow-[0px_4px_24px_0px_rgba(55,65,81,0.12)] py-4 px-6 flex flex-col gap-1", children: [
390
- /* @__PURE__ */ l("span", { className: "text-[14px] leading-5 text-[#8a96a8]", children: t.labels.monthlyPayment }),
391
- /* @__PURE__ */ m("p", { className: "text-[24px] leading-8 font-semibold text-neutral-900 m-0", children: [
392
- v(I),
426
+ /* @__PURE__ */ i("div", { className: "w-[40%] bg-[#f7f8fa] px-10 py-8 flex flex-col gap-8 max-tablet:w-full max-tablet:px-5 max-tablet:py-4", children: [
427
+ /* @__PURE__ */ i("div", { className: "bg-white rounded-[20px] shadow-[0px_4px_24px_0px_rgba(55,65,81,0.12)] py-4 px-6 flex flex-col gap-1", children: [
428
+ /* @__PURE__ */ s("span", { className: "text-[14px] leading-5 text-[#8a96a8]", children: t.labels.monthlyPayment }),
429
+ /* @__PURE__ */ i("p", { className: "text-[24px] leading-8 font-semibold text-neutral-900 m-0", children: [
430
+ F(M),
393
431
  " ",
394
- Q
432
+ ne
395
433
  ] }),
396
- A && /* @__PURE__ */ m("p", { className: "mt-3 mb-0 border-t border-[#d7dce1] pt-3 text-[13px] leading-[18px] text-[#6f7f95]", children: [
397
- /* @__PURE__ */ l("span", { className: "text-red-500", children: "*" }),
434
+ A && /* @__PURE__ */ i("p", { className: "mt-3 mb-0 border-t border-[#d7dce1] pt-3 text-[13px] leading-[18px] text-[#6f7f95]", children: [
435
+ /* @__PURE__ */ s("span", { className: "text-red-500", children: "*" }),
398
436
  " ",
399
437
  A
400
438
  ] })
401
439
  ] }),
402
- R && /* @__PURE__ */ l(
403
- ce,
440
+ oe && /* @__PURE__ */ s(
441
+ fe,
404
442
  {
405
443
  title: t.documents.title,
406
444
  items: t.documents.items
407
445
  }
408
446
  ),
409
- H.map(
410
- (e) => e.type === "checkbox" ? T(e) : M(e)
447
+ te.map(
448
+ (e) => e.type === "checkbox" ? J(e) : z(e)
411
449
  ),
412
- /* @__PURE__ */ l(
413
- ee,
450
+ j && /* @__PURE__ */ s("p", { className: "m-0 rounded-xl bg-red-50 px-4 py-3 text-[13px] leading-[18px] text-red-600", children: j }),
451
+ /* @__PURE__ */ s(
452
+ K,
414
453
  {
415
454
  type: "submit",
416
- loading: P,
417
- disabled: P,
418
- size: te.XL,
419
- variant: ae.Primary,
455
+ loading: L,
456
+ disabled: L,
457
+ size: Q.XL,
458
+ variant: U.Primary,
420
459
  className: "w-full",
421
460
  children: t.labels.submit
422
461
  }
@@ -428,5 +467,5 @@ const Te = (h) => {
428
467
  ] });
429
468
  };
430
469
  export {
431
- Te as FinanceApplicationForm
470
+ Ye as FinanceApplicationForm
432
471
  };