@scbt-ecom/ui 0.75.0 → 0.75.2
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/{index-DRIZ5Qrl.js → index-CiahWWHr.js} +2229 -2225
- package/dist/index-CiahWWHr.js.map +1 -0
- package/dist/shared/ui/formElements/uncontrolled/slider/ui/sliderMarks/hooks/useSliderMarks.d.ts +3 -1
- package/dist/ui.js +8 -32
- package/dist/ui.js.map +1 -1
- package/dist/widget.js +83 -83
- package/dist/widget.js.map +1 -1
- package/package.json +1 -1
- package/dist/index-DRIZ5Qrl.js.map +0 -1
package/dist/widget.js
CHANGED
|
@@ -4,17 +4,17 @@ var Re = (t) => {
|
|
|
4
4
|
};
|
|
5
5
|
var kt = (t, e, r) => e in t ? yt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
6
6
|
var ae = (t, e, r) => kt(t, typeof e != "symbol" ? e + "" : e, r), we = (t, e, r) => e.has(t) || Re("Cannot " + r);
|
|
7
|
-
var h = (t, e, r) => (we(t, e, "read from private field"), r ? r.call(t) : e.get(t)), I = (t, e, r) => e.has(t) ? Re("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r),
|
|
7
|
+
var h = (t, e, r) => (we(t, e, "read from private field"), r ? r.call(t) : e.get(t)), I = (t, e, r) => e.has(t) ? Re("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), N = (t, e, r, o) => (we(t, e, "write to private field"), o ? o.call(t, r) : e.set(t, r), r), q = (t, e, r) => (we(t, e, "access private method"), r);
|
|
8
8
|
var pe = (t, e, r, o) => ({
|
|
9
9
|
set _(i) {
|
|
10
|
-
|
|
10
|
+
N(t, e, i, r);
|
|
11
11
|
},
|
|
12
12
|
get _() {
|
|
13
13
|
return h(t, e, o);
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
|
-
import { S as Je, x as Ge, Q as wt, y as E, z as _e, E as Nt, F as vt, G as He, J as z, T as Ct, W as It, X as Tt, Y as Mt, Z as De, _ as Pe, $ as Et, a0 as Le, a1 as ze, a2 as Ot, j as n, B as Te, c as O, R as S, n as et, s as Ft, H as P, i as f, t as je, q as Me, L as St, o as Ee, A as oe, v as tt, a3 as Bt, r as Rt, U as Oe, a4 as Fe, a5 as _t, M as Ht } from "./index-
|
|
17
|
-
import { T as
|
|
16
|
+
import { S as Je, x as Ge, Q as wt, y as E, z as _e, E as Nt, F as vt, G as He, J as z, T as Ct, W as It, X as Tt, Y as Mt, Z as De, _ as Pe, $ as Et, a0 as Le, a1 as ze, a2 as Ot, j as n, B as Te, c as O, R as S, n as et, s as Ft, H as P, i as f, t as je, q as Me, L as St, o as Ee, A as oe, v as tt, a3 as Bt, r as Rt, U as Oe, a4 as Fe, a5 as _t, M as Ht } from "./index-CiahWWHr.js";
|
|
17
|
+
import { T as j, c as d } from "./typeGuards-CSiImkUY.js";
|
|
18
18
|
import * as le from "react";
|
|
19
19
|
import { useCallback as rt, useState as L, useMemo as se, createElement as nt, Fragment as Dt, useEffect as be, useRef as Se, useReducer as Pt, memo as Be, forwardRef as Lt } from "react";
|
|
20
20
|
import { scrollToElement as zt, createPhoneNumber as ye, getUuid as Qe, capitalize as Qt } from "./utils.js";
|
|
@@ -28,7 +28,7 @@ var _, $e, Wt = ($e = class extends Je {
|
|
|
28
28
|
constructor(e = {}) {
|
|
29
29
|
super();
|
|
30
30
|
I(this, _);
|
|
31
|
-
this.config = e,
|
|
31
|
+
this.config = e, N(this, _, /* @__PURE__ */ new Map());
|
|
32
32
|
}
|
|
33
33
|
build(e, r, o) {
|
|
34
34
|
const i = r.queryKey, a = r.queryHash ?? Ge(i, r);
|
|
@@ -103,7 +103,7 @@ var _, $e, Wt = ($e = class extends Je {
|
|
|
103
103
|
I(this, H);
|
|
104
104
|
I(this, T);
|
|
105
105
|
I(this, J);
|
|
106
|
-
this.mutationId = e.mutationId,
|
|
106
|
+
this.mutationId = e.mutationId, N(this, T, e.mutationCache), N(this, H, []), this.state = e.state || $t(), this.setOptions(e.options), this.scheduleGc();
|
|
107
107
|
}
|
|
108
108
|
setOptions(e) {
|
|
109
109
|
this.options = e, this.updateGcTime(this.options.gcTime);
|
|
@@ -119,7 +119,7 @@ var _, $e, Wt = ($e = class extends Je {
|
|
|
119
119
|
}));
|
|
120
120
|
}
|
|
121
121
|
removeObserver(e) {
|
|
122
|
-
|
|
122
|
+
N(this, H, h(this, H).filter((r) => r !== e)), this.scheduleGc(), h(this, T).notify({
|
|
123
123
|
type: "observerRemoved",
|
|
124
124
|
mutation: this,
|
|
125
125
|
observer: e
|
|
@@ -134,11 +134,11 @@ var _, $e, Wt = ($e = class extends Je {
|
|
|
134
134
|
this.execute(this.state.variables);
|
|
135
135
|
}
|
|
136
136
|
async execute(e) {
|
|
137
|
-
var a, l, u, m, x, p, c, b,
|
|
137
|
+
var a, l, u, m, x, p, c, b, g, k, w, B, R, V, C, M, A, X, xe, ie;
|
|
138
138
|
const r = () => {
|
|
139
139
|
q(this, D, U).call(this, { type: "continue" });
|
|
140
140
|
};
|
|
141
|
-
|
|
141
|
+
N(this, J, vt({
|
|
142
142
|
fn: () => this.options.mutationFn ? this.options.mutationFn(e) : Promise.reject(new Error("No mutationFn found")),
|
|
143
143
|
onFail: (v, he) => {
|
|
144
144
|
q(this, D, U).call(this, { type: "failed", failureCount: v, error: he });
|
|
@@ -177,14 +177,14 @@ var _, $e, Wt = ($e = class extends Je {
|
|
|
177
177
|
e,
|
|
178
178
|
this.state.context,
|
|
179
179
|
this
|
|
180
|
-
)), await ((b = (c = this.options).onSuccess) == null ? void 0 : b.call(c, v, e, this.state.context)), await ((
|
|
181
|
-
|
|
180
|
+
)), await ((b = (c = this.options).onSuccess) == null ? void 0 : b.call(c, v, e, this.state.context)), await ((k = (g = h(this, T).config).onSettled) == null ? void 0 : k.call(
|
|
181
|
+
g,
|
|
182
182
|
v,
|
|
183
183
|
null,
|
|
184
184
|
this.state.variables,
|
|
185
185
|
this.state.context,
|
|
186
186
|
this
|
|
187
|
-
)), await ((B = (
|
|
187
|
+
)), await ((B = (w = this.options).onSettled) == null ? void 0 : B.call(w, v, null, e, this.state.context)), q(this, D, U).call(this, { type: "success", data: v }), v;
|
|
188
188
|
} catch (v) {
|
|
189
189
|
try {
|
|
190
190
|
throw await ((V = (R = h(this, T).config).onError) == null ? void 0 : V.call(
|
|
@@ -302,7 +302,7 @@ var Q, F, me, Xe, Zt = (Xe = class extends Je {
|
|
|
302
302
|
I(this, Q);
|
|
303
303
|
I(this, F);
|
|
304
304
|
I(this, me);
|
|
305
|
-
this.config = e,
|
|
305
|
+
this.config = e, N(this, Q, /* @__PURE__ */ new Set()), N(this, F, /* @__PURE__ */ new Map()), N(this, me, 0);
|
|
306
306
|
}
|
|
307
307
|
build(e, r, o) {
|
|
308
308
|
const i = new Kt({
|
|
@@ -397,20 +397,20 @@ function ce(t) {
|
|
|
397
397
|
function Ve(t) {
|
|
398
398
|
return {
|
|
399
399
|
onFetch: (e, r) => {
|
|
400
|
-
var p, c, b,
|
|
401
|
-
const o = e.options, i = (b = (c = (p = e.fetchOptions) == null ? void 0 : p.meta) == null ? void 0 : c.fetchMore) == null ? void 0 : b.direction, a = ((
|
|
400
|
+
var p, c, b, g, k;
|
|
401
|
+
const o = e.options, i = (b = (c = (p = e.fetchOptions) == null ? void 0 : p.meta) == null ? void 0 : c.fetchMore) == null ? void 0 : b.direction, a = ((g = e.state.data) == null ? void 0 : g.pages) || [], l = ((k = e.state.data) == null ? void 0 : k.pageParams) || [];
|
|
402
402
|
let u = { pages: [], pageParams: [] }, m = 0;
|
|
403
403
|
const x = async () => {
|
|
404
|
-
let
|
|
404
|
+
let w = !1;
|
|
405
405
|
const B = (C) => {
|
|
406
406
|
Object.defineProperty(C, "signal", {
|
|
407
407
|
enumerable: !0,
|
|
408
|
-
get: () => (e.signal.aborted ?
|
|
409
|
-
|
|
408
|
+
get: () => (e.signal.aborted ? w = !0 : e.signal.addEventListener("abort", () => {
|
|
409
|
+
w = !0;
|
|
410
410
|
}), e.signal)
|
|
411
411
|
});
|
|
412
412
|
}, R = Ct(e.options, e.fetchOptions), V = async (C, M, A) => {
|
|
413
|
-
if (
|
|
413
|
+
if (w)
|
|
414
414
|
return Promise.reject();
|
|
415
415
|
if (M == null && C.pages.length)
|
|
416
416
|
return Promise.resolve(C);
|
|
@@ -448,9 +448,9 @@ function Ve(t) {
|
|
|
448
448
|
return u;
|
|
449
449
|
};
|
|
450
450
|
e.options.persister ? e.fetchFn = () => {
|
|
451
|
-
var
|
|
452
|
-
return (B = (
|
|
453
|
-
|
|
451
|
+
var w, B;
|
|
452
|
+
return (B = (w = e.options).persister) == null ? void 0 : B.call(
|
|
453
|
+
w,
|
|
454
454
|
x,
|
|
455
455
|
{
|
|
456
456
|
client: e.client,
|
|
@@ -487,18 +487,18 @@ var y, W, K, ee, te, $, re, ne, Ye, Yt = (Ye = class {
|
|
|
487
487
|
I(this, $);
|
|
488
488
|
I(this, re);
|
|
489
489
|
I(this, ne);
|
|
490
|
-
|
|
490
|
+
N(this, y, t.queryCache || new Wt()), N(this, W, t.mutationCache || new Zt()), N(this, K, t.defaultOptions || {}), N(this, ee, /* @__PURE__ */ new Map()), N(this, te, /* @__PURE__ */ new Map()), N(this, $, 0);
|
|
491
491
|
}
|
|
492
492
|
mount() {
|
|
493
|
-
pe(this, $)._++, h(this, $) === 1 && (
|
|
493
|
+
pe(this, $)._++, h(this, $) === 1 && (N(this, re, Mt.subscribe(async (t) => {
|
|
494
494
|
t && (await this.resumePausedMutations(), h(this, y).onFocus());
|
|
495
|
-
})),
|
|
495
|
+
})), N(this, ne, De.subscribe(async (t) => {
|
|
496
496
|
t && (await this.resumePausedMutations(), h(this, y).onOnline());
|
|
497
497
|
})));
|
|
498
498
|
}
|
|
499
499
|
unmount() {
|
|
500
500
|
var t, e;
|
|
501
|
-
pe(this, $)._--, h(this, $) === 0 && ((t = h(this, re)) == null || t.call(this),
|
|
501
|
+
pe(this, $)._--, h(this, $) === 0 && ((t = h(this, re)) == null || t.call(this), N(this, re, void 0), (e = h(this, ne)) == null || e.call(this), N(this, ne, void 0));
|
|
502
502
|
}
|
|
503
503
|
isFetching(t) {
|
|
504
504
|
return h(this, y).findAll({ ...t, fetchStatus: "fetching" }).length;
|
|
@@ -632,7 +632,7 @@ var y, W, K, ee, te, $, re, ne, Ye, Yt = (Ye = class {
|
|
|
632
632
|
return h(this, K);
|
|
633
633
|
}
|
|
634
634
|
setDefaultOptions(t) {
|
|
635
|
-
|
|
635
|
+
N(this, K, t);
|
|
636
636
|
}
|
|
637
637
|
setQueryDefaults(t, e) {
|
|
638
638
|
h(this, ee).set(Le(t), {
|
|
@@ -696,14 +696,14 @@ const Jt = [
|
|
|
696
696
|
"form",
|
|
697
697
|
"seoHeader",
|
|
698
698
|
"calculator"
|
|
699
|
-
],
|
|
699
|
+
], s = Jt.reduce(
|
|
700
700
|
(t, e) => (t[e] = e, t),
|
|
701
701
|
{}
|
|
702
702
|
), Gt = ["getFioSchema"], mt = (t, e, r) => {
|
|
703
703
|
const o = t[e];
|
|
704
|
-
if (
|
|
704
|
+
if (j.isNil(o))
|
|
705
705
|
throw new Error(`validation for type ${String(e)} not found`);
|
|
706
|
-
if (!
|
|
706
|
+
if (!j.isFunction(o))
|
|
707
707
|
throw new Error(`Cannot generate ${String(e)} because is not a function`);
|
|
708
708
|
return o(r);
|
|
709
709
|
}, er = (t, e) => mt(at.base, t, e), tr = (t, e) => mt(at.dadata, t, e), xt = (t) => {
|
|
@@ -776,7 +776,7 @@ const Jt = [
|
|
|
776
776
|
] }),
|
|
777
777
|
a && x && (l == null ? void 0 : l.handlerOptions) && /* @__PURE__ */ n.jsx(Z, { intent: "primary", className: d("desktop:w-[200px]", i == null ? void 0 : i.button), size: "lg", ...l })
|
|
778
778
|
] }),
|
|
779
|
-
(o || x) && r && /* @__PURE__ */ n.jsx("div", { className: d("flex w-full justify-end", i == null ? void 0 : i.imgContainer), children: r && "url" in r &&
|
|
779
|
+
(o || x) && r && /* @__PURE__ */ n.jsx("div", { className: d("flex w-full justify-end", i == null ? void 0 : i.imgContainer), children: r && "url" in r && j.isObject(r) ? /* @__PURE__ */ n.jsx("img", { className: d("h-[246px] object-cover", i == null ? void 0 : i.img), src: r.url, alt: r.alt }) : r })
|
|
780
780
|
]
|
|
781
781
|
},
|
|
782
782
|
e
|
|
@@ -789,7 +789,7 @@ const Jt = [
|
|
|
789
789
|
fourCards: "grid-cols-1 mobile:grid-rows-[400px,1fr,1fr,400px] desktop:grid-cols-3"
|
|
790
790
|
}
|
|
791
791
|
}
|
|
792
|
-
}), Zn = ({ headline: t, details: e, variant: r, classes: o }) => /* @__PURE__ */ n.jsx("section", { id:
|
|
792
|
+
}), Zn = ({ headline: t, details: e, variant: r, classes: o }) => /* @__PURE__ */ n.jsx("section", { id: s.benefit, "data-test-id": s.benefit, className: d("pb-20", o == null ? void 0 : o.root), children: /* @__PURE__ */ n.jsxs(S, { className: o == null ? void 0 : o.container, children: [
|
|
793
793
|
/* @__PURE__ */ n.jsx(
|
|
794
794
|
"div",
|
|
795
795
|
{
|
|
@@ -812,8 +812,8 @@ const Jt = [
|
|
|
812
812
|
return /* @__PURE__ */ n.jsx(
|
|
813
813
|
"header",
|
|
814
814
|
{
|
|
815
|
-
id:
|
|
816
|
-
"data-test-id":
|
|
815
|
+
id: s.header,
|
|
816
|
+
"data-test-id": s.header,
|
|
817
817
|
className: d("flex h-[64px] items-center justify-center bg-color-white desktop:h-[72px]", o == null ? void 0 : o.header),
|
|
818
818
|
children: /* @__PURE__ */ n.jsx(S, { className: d(o == null ? void 0 : o.container), children: /* @__PURE__ */ n.jsxs("div", { className: d("flex items-center justify-between gap-5", o == null ? void 0 : o.wrapper), children: [
|
|
819
819
|
/* @__PURE__ */ n.jsx(
|
|
@@ -844,27 +844,27 @@ const Jt = [
|
|
|
844
844
|
imgDesktop: l,
|
|
845
845
|
color: u
|
|
846
846
|
}) => {
|
|
847
|
-
var
|
|
848
|
-
const { isDesktop: m, isMobile: x } = G(), { primary: p, secondary: c } = r || {}, b = a && "url" in a &&
|
|
847
|
+
var w;
|
|
848
|
+
const { isDesktop: m, isMobile: x } = G(), { primary: p, secondary: c } = r || {}, b = a && "url" in a && j.isObject(a) ? /* @__PURE__ */ n.jsx("img", { className: "h-full w-full object-cover object-center", alt: "Картинка баннера", src: a.url }) : a, g = l && "url" in l && j.isObject(l) ? /* @__PURE__ */ n.jsx("img", { className: "h-full w-full object-cover object-center", alt: "Картинка баннера", src: l.url }) : l, k = /* @__PURE__ */ n.jsx(
|
|
849
849
|
"div",
|
|
850
850
|
{
|
|
851
851
|
className: d(
|
|
852
852
|
"flex items-center justify-center pt-4 desktop:absolute desktop:bottom-[-50px] desktop:right-1/2 desktop:translate-x-1/2 desktop:pt-0",
|
|
853
853
|
i == null ? void 0 : i.advantageContainer
|
|
854
854
|
),
|
|
855
|
-
children: (o == null ? void 0 : o.details) && ((
|
|
855
|
+
children: (o == null ? void 0 : o.details) && ((w = o == null ? void 0 : o.details) == null ? void 0 : w.items.length) > 0 && /* @__PURE__ */ n.jsx(Ce, { ...o })
|
|
856
856
|
}
|
|
857
857
|
);
|
|
858
858
|
return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
859
859
|
/* @__PURE__ */ n.jsxs(
|
|
860
860
|
"section",
|
|
861
861
|
{
|
|
862
|
-
id:
|
|
863
|
-
"data-test-id":
|
|
862
|
+
id: s.banner,
|
|
863
|
+
"data-test-id": s.banner,
|
|
864
864
|
style: { backgroundColor: u ?? "#d9edff" },
|
|
865
865
|
className: d("relative h-[552px] desktop:h-[456px]", i == null ? void 0 : i.root),
|
|
866
866
|
children: [
|
|
867
|
-
/* @__PURE__ */ n.jsx("div", { className: "absolute bottom-0 left-0 right-0 top-0 mx-auto h-full max-w-[1920px] desktop:h-[456px]", children: x ? b :
|
|
867
|
+
/* @__PURE__ */ n.jsx("div", { className: "absolute bottom-0 left-0 right-0 top-0 mx-auto h-full max-w-[1920px] desktop:h-[456px]", children: x ? b : g }),
|
|
868
868
|
/* @__PURE__ */ n.jsxs(S, { className: d("h-full", i == null ? void 0 : i.container), children: [
|
|
869
869
|
/* @__PURE__ */ n.jsx("div", { className: d("flex h-full", i == null ? void 0 : i.wrapper), children: /* @__PURE__ */ n.jsxs("div", { className: d("flex w-[328px] flex-col gap-10 pt-6 desktop:w-full desktop:pt-20", i == null ? void 0 : i.textBlock), children: [
|
|
870
870
|
/* @__PURE__ */ n.jsxs("div", { className: "z-10 flex flex-col gap-4", children: [
|
|
@@ -913,12 +913,12 @@ const Jt = [
|
|
|
913
913
|
}
|
|
914
914
|
)
|
|
915
915
|
] }) }),
|
|
916
|
-
m && (o == null ? void 0 : o.enabled) &&
|
|
916
|
+
m && (o == null ? void 0 : o.enabled) && k
|
|
917
917
|
] })
|
|
918
918
|
]
|
|
919
919
|
}
|
|
920
920
|
),
|
|
921
|
-
x && (o == null ? void 0 : o.enabled) &&
|
|
921
|
+
x && (o == null ? void 0 : o.enabled) && k
|
|
922
922
|
] });
|
|
923
923
|
}, qe = ({
|
|
924
924
|
headTitle: t,
|
|
@@ -930,14 +930,14 @@ const Jt = [
|
|
|
930
930
|
imgDesktop: l,
|
|
931
931
|
color: u
|
|
932
932
|
}) => {
|
|
933
|
-
var
|
|
934
|
-
const { isMobile: m } = G(), { primary: x, secondary: p } = r || {}, c = a && "url" in a &&
|
|
933
|
+
var g, k;
|
|
934
|
+
const { isMobile: m } = G(), { primary: x, secondary: p } = r || {}, c = a && "url" in a && j.isObject(a) ? /* @__PURE__ */ n.jsx("img", { className: "w-full object-contain", alt: a.alt, src: a.url }) : a, b = l && "url" in l && j.isObject(l) ? /* @__PURE__ */ n.jsx("img", { className: "w-full object-contain", alt: l.alt, src: l.url }) : l;
|
|
935
935
|
return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
936
936
|
/* @__PURE__ */ n.jsx(
|
|
937
937
|
"section",
|
|
938
938
|
{
|
|
939
|
-
id:
|
|
940
|
-
"data-test-id":
|
|
939
|
+
id: s.banner,
|
|
940
|
+
"data-test-id": s.banner,
|
|
941
941
|
style: { backgroundColor: u ?? "#d9edff" },
|
|
942
942
|
className: d("bg-banner-skyblue-300 desktop:h-[456px]", i == null ? void 0 : i.root),
|
|
943
943
|
children: /* @__PURE__ */ n.jsxs(S, { className: d("relative", i == null ? void 0 : i.container), children: [
|
|
@@ -1007,7 +1007,7 @@ const Jt = [
|
|
|
1007
1007
|
"items-center justify-center rounded-md bg-color-blue-grey-100 p-4 pb-8 mobile:hidden desktop:absolute desktop:bottom-[-50px] desktop:right-1/2 desktop:flex desktop:translate-x-1/2 desktop:p-0",
|
|
1008
1008
|
i == null ? void 0 : i.advantageContainer
|
|
1009
1009
|
),
|
|
1010
|
-
children: (o == null ? void 0 : o.details) && ((
|
|
1010
|
+
children: (o == null ? void 0 : o.details) && ((g = o == null ? void 0 : o.details) == null ? void 0 : g.items.length) > 0 && /* @__PURE__ */ n.jsx(Ce, { ...o })
|
|
1011
1011
|
}
|
|
1012
1012
|
)
|
|
1013
1013
|
] })
|
|
@@ -1020,7 +1020,7 @@ const Jt = [
|
|
|
1020
1020
|
"flex items-center justify-center rounded-md bg-color-blue-grey-100 p-4 pb-8 desktop:absolute desktop:bottom-[-50px] desktop:right-1/2 desktop:hidden desktop:translate-x-1/2 desktop:p-0",
|
|
1021
1021
|
i == null ? void 0 : i.advantageContainer
|
|
1022
1022
|
),
|
|
1023
|
-
children: (o == null ? void 0 : o.details) && ((
|
|
1023
|
+
children: (o == null ? void 0 : o.details) && ((k = o == null ? void 0 : o.details) == null ? void 0 : k.items.length) > 0 && /* @__PURE__ */ n.jsx(Ce, { ...o })
|
|
1024
1024
|
}
|
|
1025
1025
|
)
|
|
1026
1026
|
] });
|
|
@@ -1176,8 +1176,8 @@ const Jt = [
|
|
|
1176
1176
|
}) => /* @__PURE__ */ n.jsx(
|
|
1177
1177
|
"footer",
|
|
1178
1178
|
{
|
|
1179
|
-
id:
|
|
1180
|
-
"data-test-id":
|
|
1179
|
+
id: s.footer,
|
|
1180
|
+
"data-test-id": s.footer,
|
|
1181
1181
|
className: d("w-full bg-color-footer py-8 desktop:py-10", i == null ? void 0 : i.root),
|
|
1182
1182
|
children: /* @__PURE__ */ n.jsx(S, { className: d(i == null ? void 0 : i.footerContainer), children: /* @__PURE__ */ n.jsxs("div", { className: d("mobile:pb-[176px]", i == null ? void 0 : i.footerWrapper), children: [
|
|
1183
1183
|
/* @__PURE__ */ n.jsxs(
|
|
@@ -1196,7 +1196,7 @@ const Jt = [
|
|
|
1196
1196
|
]
|
|
1197
1197
|
}
|
|
1198
1198
|
),
|
|
1199
|
-
!
|
|
1199
|
+
!j.isArrayEmpty(a) && /* @__PURE__ */ n.jsx(mr, { details: a, classes: i == null ? void 0 : i.navLinks }),
|
|
1200
1200
|
r.enabled && /* @__PURE__ */ n.jsx(cr, { text: r.text }),
|
|
1201
1201
|
/* @__PURE__ */ n.jsxs(
|
|
1202
1202
|
"div",
|
|
@@ -1252,7 +1252,7 @@ const Jt = [
|
|
|
1252
1252
|
]
|
|
1253
1253
|
}
|
|
1254
1254
|
);
|
|
1255
|
-
}, Gn = ({ headline: t, details: e, variant: r, classes: o }) => /* @__PURE__ */ n.jsx("section", { id:
|
|
1255
|
+
}, Gn = ({ headline: t, details: e, variant: r, classes: o }) => /* @__PURE__ */ n.jsx("section", { id: s.stepper, "data-test-id": s.stepper, className: o == null ? void 0 : o.root, children: /* @__PURE__ */ n.jsx(S, { className: o == null ? void 0 : o.container, children: /* @__PURE__ */ n.jsxs("div", { className: d("flex flex-col gap-6 desktop:items-start desktop:gap-12", o == null ? void 0 : o.wrapper), children: [
|
|
1256
1256
|
/* @__PURE__ */ n.jsx(P, { as: "h2", className: d("text-color-dark", o == null ? void 0 : o.headline), children: t }),
|
|
1257
1257
|
/* @__PURE__ */ n.jsx(
|
|
1258
1258
|
"div",
|
|
@@ -1371,8 +1371,8 @@ const Jt = [
|
|
|
1371
1371
|
image: i,
|
|
1372
1372
|
classes: a
|
|
1373
1373
|
}) => {
|
|
1374
|
-
const l = r === "fourItems", u = r === "twoItems", m = i && "url" in i &&
|
|
1375
|
-
return /* @__PURE__ */ n.jsx("section", { id:
|
|
1374
|
+
const l = r === "fourItems", u = r === "twoItems", m = i && "url" in i && j.isObject(i) ? /* @__PURE__ */ n.jsx("img", { className: "w-full object-contain", alt: i.alt, src: i.url }) : i;
|
|
1375
|
+
return /* @__PURE__ */ n.jsx("section", { id: s.longBanner, "data-test-id": s.longBanner, className: d(a == null ? void 0 : a.root), children: /* @__PURE__ */ n.jsxs(S, { className: d(a == null ? void 0 : a.container), children: [
|
|
1376
1376
|
u && /* @__PURE__ */ n.jsx(Ne, { intent: r, headline: t }),
|
|
1377
1377
|
/* @__PURE__ */ n.jsxs(
|
|
1378
1378
|
"div",
|
|
@@ -1644,8 +1644,8 @@ const Jt = [
|
|
|
1644
1644
|
return /* @__PURE__ */ n.jsx(
|
|
1645
1645
|
"section",
|
|
1646
1646
|
{
|
|
1647
|
-
id:
|
|
1648
|
-
"data-test-id":
|
|
1647
|
+
id: s.interLinking,
|
|
1648
|
+
"data-test-id": s.interLinking,
|
|
1649
1649
|
className: d("min-w-full desktop:min-w-[1140px]", a == null ? void 0 : a.root),
|
|
1650
1650
|
children: /* @__PURE__ */ n.jsx(S, { children: /* @__PURE__ */ n.jsx(
|
|
1651
1651
|
oe,
|
|
@@ -1879,7 +1879,7 @@ const Jt = [
|
|
|
1879
1879
|
}, Kr = ({ entity: t, classes: e, accordionsConfig: r }) => /* @__PURE__ */ n.jsx("div", { className: d("flex flex-col gap-6", e == null ? void 0 : e.entityWrapper), children: Wr({ entity: t, classes: e, accordionsConfig: r }) }), no = ({ headline: t, tabs: e, classes: r, accordionsConfig: o }) => {
|
|
1880
1880
|
var u, m;
|
|
1881
1881
|
const [i, a] = L(0), l = se(() => e == null ? void 0 : e.map((x) => x == null ? void 0 : x.tabName), [e]) ?? [];
|
|
1882
|
-
return !e || (e == null ? void 0 : e.length) === 0 ? null : /* @__PURE__ */ n.jsx("section", { id:
|
|
1882
|
+
return !e || (e == null ? void 0 : e.length) === 0 ? null : /* @__PURE__ */ n.jsx("section", { id: s.usefulInfo, "data-test-id": s.usefulInfo, className: d(r == null ? void 0 : r.root), children: /* @__PURE__ */ n.jsxs(S, { className: d(r == null ? void 0 : r.container), children: [
|
|
1883
1883
|
/* @__PURE__ */ n.jsx(P, { className: d(r == null ? void 0 : r.headline), as: "h2", children: t }),
|
|
1884
1884
|
/* @__PURE__ */ n.jsx("div", { className: d("mt-6 flex flex-col gap-2 desktop:mt-12", r == null ? void 0 : r.tabsWrapper), children: /* @__PURE__ */ n.jsx(Tr, { tabsNames: l, activeTab: i, setActiveTab: a, classes: r == null ? void 0 : r.tabs }) }),
|
|
1885
1885
|
/* @__PURE__ */ n.jsx("div", { className: d("mt-6 flex flex-col gap-6", r == null ? void 0 : r.contentWrapper), children: (m = (u = e == null ? void 0 : e[i]) == null ? void 0 : u.contents) == null ? void 0 : m.map((x, p) => /* @__PURE__ */ n.jsx(Kr, { accordionsConfig: o, ...x, classes: r == null ? void 0 : r.entityClasses }, p)) })
|
|
@@ -2001,8 +2001,8 @@ class Ie {
|
|
|
2001
2001
|
l.value.split(";").forEach((p) => {
|
|
2002
2002
|
const [c, b] = p.split(":");
|
|
2003
2003
|
if (c && b) {
|
|
2004
|
-
const
|
|
2005
|
-
x[
|
|
2004
|
+
const g = c.trim().replace(/-([a-z])/g, (k, w) => w.toUpperCase());
|
|
2005
|
+
x[g] = b.trim();
|
|
2006
2006
|
}
|
|
2007
2007
|
}), m = x;
|
|
2008
2008
|
break;
|
|
@@ -2067,18 +2067,18 @@ const Yr = ({ promises: t }) => {
|
|
|
2067
2067
|
classes: l
|
|
2068
2068
|
}) => {
|
|
2069
2069
|
var V, C;
|
|
2070
|
-
const { submitCallback: u, ...m } = a || {}, [x, p] = L(!1), c = xt(t), b = dt.getZodDefaults(c), { control:
|
|
2070
|
+
const { submitCallback: u, ...m } = a || {}, [x, p] = L(!1), c = xt(t), b = dt.getZodDefaults(c), { control: g, handleSubmit: k } = it({
|
|
2071
2071
|
schema: c,
|
|
2072
2072
|
defaultValues: b,
|
|
2073
2073
|
mode: "onBlur"
|
|
2074
|
-
}),
|
|
2074
|
+
}), w = Jr(r, t), B = qt({ control: g, fields: w || [], schema: c }), R = (M) => {
|
|
2075
2075
|
u && u({ ...M, agree: x }), console.warn(M);
|
|
2076
2076
|
};
|
|
2077
2077
|
return /* @__PURE__ */ n.jsx(en, { children: /* @__PURE__ */ n.jsxs(
|
|
2078
2078
|
"div",
|
|
2079
2079
|
{
|
|
2080
|
-
id:
|
|
2081
|
-
"data-test-id":
|
|
2080
|
+
id: s.form,
|
|
2081
|
+
"data-test-id": s.form,
|
|
2082
2082
|
className: d(
|
|
2083
2083
|
"border-warm-grey-200 px-4 desktop:gap-8 desktop:p-14",
|
|
2084
2084
|
"relative flex flex-col gap-6 rounded-sm border py-8",
|
|
@@ -2104,7 +2104,7 @@ const Yr = ({ promises: t }) => {
|
|
|
2104
2104
|
/* @__PURE__ */ n.jsxs(
|
|
2105
2105
|
"form",
|
|
2106
2106
|
{
|
|
2107
|
-
onSubmit:
|
|
2107
|
+
onSubmit: k(R),
|
|
2108
2108
|
className: d("flex w-[328px] flex-col gap-y-6", "desktop:w-[524px] desktop:gap-y-8", l == null ? void 0 : l.form),
|
|
2109
2109
|
children: [
|
|
2110
2110
|
r.enabled && /* @__PURE__ */ n.jsx(
|
|
@@ -2117,7 +2117,7 @@ const Yr = ({ promises: t }) => {
|
|
|
2117
2117
|
classes: l == null ? void 0 : l.progressBar
|
|
2118
2118
|
}
|
|
2119
2119
|
),
|
|
2120
|
-
/* @__PURE__ */ n.jsx(ct, { control:
|
|
2120
|
+
/* @__PURE__ */ n.jsx(ct, { control: g, fields: t }),
|
|
2121
2121
|
/* @__PURE__ */ n.jsxs("div", { className: "mob-body-regular-m flex flex-col items-center justify-center gap-4 desktop:flex-row desktop:justify-between", children: [
|
|
2122
2122
|
tn(o, x, p, l == null ? void 0 : l.approvement),
|
|
2123
2123
|
/* @__PURE__ */ n.jsx(
|
|
@@ -2225,8 +2225,8 @@ const Yr = ({ promises: t }) => {
|
|
|
2225
2225
|
return be(() => {
|
|
2226
2226
|
if (!ot)
|
|
2227
2227
|
return;
|
|
2228
|
-
let u = window.location.pathname.split("/").filter((p) => !
|
|
2229
|
-
|
|
2228
|
+
let u = window.location.pathname.split("/").filter((p) => !j.isStringEmpty(p));
|
|
2229
|
+
j.isUndefined(t) || (j.isString(t) ? u = u.slice(u.findIndex((p) => p === t)) : u = u.slice(t)), j.isUndefined(e) || (j.isString(e) ? u = u.slice(0, u.findIndex((p) => p === e) + 1) : u = u.slice(0, e + 1));
|
|
2230
2230
|
let m = [], x = "";
|
|
2231
2231
|
if (i) {
|
|
2232
2232
|
const p = {
|
|
@@ -2271,8 +2271,8 @@ const Yr = ({ promises: t }) => {
|
|
|
2271
2271
|
const [i, a] = L(!1), l = Se(null);
|
|
2272
2272
|
Vt(l, () => a(!1));
|
|
2273
2273
|
const u = rn(o), { first: m, middle: x, last: p } = se(() => {
|
|
2274
|
-
let b = [],
|
|
2275
|
-
return e && (b = u.slice(0, e),
|
|
2274
|
+
let b = [], g = [], k = [];
|
|
2275
|
+
return e && (b = u.slice(0, e), g = u.slice(e, u.length - e), k = u.slice(u.length - e)), { first: b, middle: g, last: k };
|
|
2276
2276
|
}, [u, e]), c = t ?? /* @__PURE__ */ n.jsx(f, { name: "arrows/arrowRight", className: d("size-4", r == null ? void 0 : r.separator) });
|
|
2277
2277
|
return /* @__PURE__ */ n.jsx(
|
|
2278
2278
|
"div",
|
|
@@ -2402,7 +2402,7 @@ const on = (t, e) => {
|
|
|
2402
2402
|
);
|
|
2403
2403
|
}, mn = Lt(({ category: t, active: e, onActiveTabChange: r }, o) => {
|
|
2404
2404
|
var m, x;
|
|
2405
|
-
const i = o && "current" in o ? o : null, a = (m = i == null ? void 0 : i.current) == null ? void 0 : m.getBoundingClientRect(), l = e && !
|
|
2405
|
+
const i = o && "current" in o ? o : null, a = (m = i == null ? void 0 : i.current) == null ? void 0 : m.getBoundingClientRect(), l = e && !j.isArrayEmpty(t.children), u = j.isArrayEmpty(t.children) ? "a" : "span";
|
|
2406
2406
|
return /* @__PURE__ */ n.jsxs(
|
|
2407
2407
|
Fe.div,
|
|
2408
2408
|
{
|
|
@@ -2597,10 +2597,10 @@ const on = (t, e) => {
|
|
|
2597
2597
|
label: e.title ?? ""
|
|
2598
2598
|
})), jn = ({ categories: t, helpers: e, phone: r, ...o }) => {
|
|
2599
2599
|
const i = gn(t), [a, l] = L(i[0]), u = (x) => {
|
|
2600
|
-
|
|
2600
|
+
j.isUndefined(x) || j.isArray(x) || l(x);
|
|
2601
2601
|
}, m = se(() => {
|
|
2602
2602
|
var x;
|
|
2603
|
-
return
|
|
2603
|
+
return j.isUndefined(a) || j.isArray(a) ? [] : ((x = t.find((p) => p.title === a.value)) == null ? void 0 : x.children) ?? [];
|
|
2604
2604
|
}, [a, t]);
|
|
2605
2605
|
return /* @__PURE__ */ n.jsxs(
|
|
2606
2606
|
Fe.div,
|
|
@@ -2618,7 +2618,7 @@ const on = (t, e) => {
|
|
|
2618
2618
|
/* @__PURE__ */ n.jsx(Oe.SelectBase, { label: "Категория", options: i, value: a, onChange: u }),
|
|
2619
2619
|
/* @__PURE__ */ n.jsx("div", { className: "flex w-full flex-col items-center justify-center gap-y-1", children: m.map((x) => {
|
|
2620
2620
|
var p;
|
|
2621
|
-
return
|
|
2621
|
+
return j.isArrayEmpty(x.children) ? /* @__PURE__ */ n.jsx("div", { className: "w-full px-4 py-2.5", children: /* @__PURE__ */ n.jsx("a", { href: (p = x.link) == null ? void 0 : p.href, className: "desk-body-regular-m inline-block w-full", children: x.title }) }, x.title) : /* @__PURE__ */ n.jsx(bn, { category: x }, x.title);
|
|
2622
2622
|
}) }),
|
|
2623
2623
|
/* @__PURE__ */ n.jsx("div", { className: "h-[1px] w-full bg-color-blue-grey-200" }),
|
|
2624
2624
|
/* @__PURE__ */ n.jsxs("div", { className: "flex w-full flex-col items-center justify-center gap-y-1", children: [
|
|
@@ -2661,7 +2661,7 @@ const on = (t, e) => {
|
|
|
2661
2661
|
] });
|
|
2662
2662
|
}, ao = ({ categories: t, helpers: e, phone: r }) => {
|
|
2663
2663
|
const { isMobile: o } = G();
|
|
2664
|
-
return /* @__PURE__ */ n.jsxs("div", { id:
|
|
2664
|
+
return /* @__PURE__ */ n.jsxs("div", { id: s.seoHeader, "data-test-id": s.seoHeader, className: "mx-auto w-full max-w-[1440px]", children: [
|
|
2665
2665
|
o ? /* @__PURE__ */ n.jsx(sn, { categories: t.map((i) => i.children).flat(), helpers: e, phone: r }) : /* @__PURE__ */ n.jsx(fn, { categories: t, helpers: e, phone: r }),
|
|
2666
2666
|
/* @__PURE__ */ n.jsx(
|
|
2667
2667
|
nn,
|
|
@@ -2760,10 +2760,10 @@ const on = (t, e) => {
|
|
|
2760
2760
|
slidersGroupConfig: t,
|
|
2761
2761
|
additionalSliderGroupConfig: e
|
|
2762
2762
|
}) => {
|
|
2763
|
-
const [r, o] = L(!1), { watch: i, setValue: a } = ke(), l = t == null ? void 0 : t.fields.find(({ args: R }) => R.name === "sum"), { args: u } = l || {}, { max: m, name: x, defaultValue: p } = u || {}, c = i(x), { min: b, name:
|
|
2763
|
+
const [r, o] = L(!1), { watch: i, setValue: a } = ke(), l = t == null ? void 0 : t.fields.find(({ args: R }) => R.name === "sum"), { args: u } = l || {}, { max: m, name: x, defaultValue: p } = u || {}, c = i(x), { min: b, name: g } = (e == null ? void 0 : e.args) ?? {}, k = i(g), w = Number(m ?? 0) - (c ?? p);
|
|
2764
2764
|
return be(() => {
|
|
2765
|
-
|
|
2766
|
-
}, [
|
|
2765
|
+
k > w && a(g, w);
|
|
2766
|
+
}, [w, k, a, c]), be(() => {
|
|
2767
2767
|
Number(m) === c && o(!1);
|
|
2768
2768
|
}, [o, m, c]), {
|
|
2769
2769
|
sliderVisible: r,
|
|
@@ -2772,11 +2772,11 @@ const on = (t, e) => {
|
|
|
2772
2772
|
sumName: x,
|
|
2773
2773
|
sumDefaultValue: p,
|
|
2774
2774
|
sumValue: c,
|
|
2775
|
-
additionalSliderMax:
|
|
2775
|
+
additionalSliderMax: w,
|
|
2776
2776
|
onCheckedChange: () => {
|
|
2777
|
-
o((R) => !R), Number(m) === c && (a(x ?? "", c - Fn), a(
|
|
2777
|
+
o((R) => !R), k <= 0 && a(g, b), Number(m) === c && (a(x ?? "", c - Fn), a(g, b));
|
|
2778
2778
|
},
|
|
2779
|
-
sliderSumExist: !
|
|
2779
|
+
sliderSumExist: !j.isObjectEmpty(l == null ? void 0 : l.args),
|
|
2780
2780
|
sliderSumCorrectType: (l == null ? void 0 : l.args.componentType) === "algorithmic" || (l == null ? void 0 : l.args.componentType) === "step"
|
|
2781
2781
|
};
|
|
2782
2782
|
}, Sn = (t) => {
|
|
@@ -2811,7 +2811,7 @@ const on = (t, e) => {
|
|
|
2811
2811
|
slidersGroupConfig: t,
|
|
2812
2812
|
additionalSliderGroupConfig: e
|
|
2813
2813
|
});
|
|
2814
|
-
return
|
|
2814
|
+
return j.isNil(e == null ? void 0 : e.args) || !(e != null && e.args) ? null : /* @__PURE__ */ n.jsxs("div", { className: "flex flex-col gap-4", children: [
|
|
2815
2815
|
/* @__PURE__ */ n.jsxs("div", { className: "inline-flex items-center gap-2", children: [
|
|
2816
2816
|
/* @__PURE__ */ n.jsx(Oe.SwitchBase, { checked: o, onCheckedChange: a }),
|
|
2817
2817
|
/* @__PURE__ */ n.jsx("p", { className: "desk-body-regular-l", children: "Хочу получить деньги дополнительно" })
|
|
@@ -2878,7 +2878,7 @@ const on = (t, e) => {
|
|
|
2878
2878
|
}, lo = ({ calculators: t, headline: e }) => {
|
|
2879
2879
|
var m;
|
|
2880
2880
|
const r = t.length > 1, [o, i] = L(r ? (m = t[0]) == null ? void 0 : m.name : ""), a = se(() => t == null ? void 0 : t.map(({ name: x, label: p }) => ({ name: x, label: p })), [t]), l = r ? a == null ? void 0 : a.findIndex((x) => x.name === o) : 0, u = t[l];
|
|
2881
|
-
return /* @__PURE__ */ n.jsx("section", { id:
|
|
2881
|
+
return /* @__PURE__ */ n.jsx("section", { id: s.calculator, children: /* @__PURE__ */ n.jsx(S, { children: /* @__PURE__ */ n.jsxs("div", { className: "rounded-md bg-color-white px-10 py-12 shadow-md", children: [
|
|
2882
2882
|
/* @__PURE__ */ n.jsx(P, { className: "mb-12", as: "h2", children: e }),
|
|
2883
2883
|
r && /* @__PURE__ */ n.jsx(
|
|
2884
2884
|
Hn,
|
|
@@ -2924,6 +2924,6 @@ export {
|
|
|
2924
2924
|
Jt as WIDGET_LIST,
|
|
2925
2925
|
xt as getDynamicSchema,
|
|
2926
2926
|
Gr as queryClient,
|
|
2927
|
-
|
|
2927
|
+
s as widgetIds
|
|
2928
2928
|
};
|
|
2929
2929
|
//# sourceMappingURL=widget.js.map
|