@getcredify/credify-insurance-widget 1.36.0 → 1.37.1
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/iframe/assets/{iframe-CszwzNOZ.js → iframe-CSrAr58U.js} +27 -27
- package/dist/iframe/assets/iframe-CSrAr58U.js.map +1 -0
- package/dist/iframe/iframe.html +1 -1
- package/dist/index.es.js +313 -310
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +5 -5
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/dist/iframe/assets/iframe-CszwzNOZ.js.map +0 -1
package/dist/index.es.js
CHANGED
|
@@ -5939,12 +5939,12 @@ function dl(e) {
|
|
|
5939
5939
|
isOverTarget: !1,
|
|
5940
5940
|
pointerType: null,
|
|
5941
5941
|
disposables: []
|
|
5942
|
-
}), { addGlobalListener: $, removeAllGlobalListeners: S } = bi(), y = Ee((w,
|
|
5942
|
+
}), { addGlobalListener: $, removeAllGlobalListeners: S } = bi(), y = Ee((w, j) => {
|
|
5943
5943
|
let H = b.current;
|
|
5944
5944
|
if (s || H.didFirePressStart) return !1;
|
|
5945
5945
|
let P = !0;
|
|
5946
5946
|
if (H.isTriggeringEvent = !0, n) {
|
|
5947
|
-
let q = new Ya("pressstart",
|
|
5947
|
+
let q = new Ya("pressstart", j, w);
|
|
5948
5948
|
n(q), P = q.shouldStopPropagation;
|
|
5949
5949
|
}
|
|
5950
5950
|
return r && r(!0), H.isTriggeringEvent = !1, H.didFirePressStart = !0, g(!0), P;
|
|
@@ -5952,17 +5952,17 @@ function dl(e) {
|
|
|
5952
5952
|
s,
|
|
5953
5953
|
n,
|
|
5954
5954
|
r
|
|
5955
|
-
]), E = Ee((w,
|
|
5955
|
+
]), E = Ee((w, j, H = !0) => {
|
|
5956
5956
|
let P = b.current;
|
|
5957
5957
|
if (!P.didFirePressStart) return !1;
|
|
5958
5958
|
P.didFirePressStart = !1, P.isTriggeringEvent = !0;
|
|
5959
5959
|
let q = !0;
|
|
5960
5960
|
if (a) {
|
|
5961
|
-
let C = new Ya("pressend",
|
|
5961
|
+
let C = new Ya("pressend", j, w);
|
|
5962
5962
|
a(C), q = C.shouldStopPropagation;
|
|
5963
5963
|
}
|
|
5964
5964
|
if (r && r(!1), g(!1), t && H && !s) {
|
|
5965
|
-
let C = new Ya("press",
|
|
5965
|
+
let C = new Ya("press", j, w);
|
|
5966
5966
|
t(C), q &&= C.shouldStopPropagation;
|
|
5967
5967
|
}
|
|
5968
5968
|
return P.isTriggeringEvent = !1, q;
|
|
@@ -5971,12 +5971,12 @@ function dl(e) {
|
|
|
5971
5971
|
a,
|
|
5972
5972
|
r,
|
|
5973
5973
|
t
|
|
5974
|
-
]), _ = et(E), A = Ee((w,
|
|
5974
|
+
]), _ = et(E), A = Ee((w, j) => {
|
|
5975
5975
|
let H = b.current;
|
|
5976
5976
|
if (s) return !1;
|
|
5977
5977
|
if (o) {
|
|
5978
5978
|
H.isTriggeringEvent = !0;
|
|
5979
|
-
let P = new Ya("pressup",
|
|
5979
|
+
let P = new Ya("pressup", j, w);
|
|
5980
5980
|
return o(P), H.isTriggeringEvent = !1, P.shouldStopPropagation;
|
|
5981
5981
|
}
|
|
5982
5982
|
return !0;
|
|
@@ -5984,11 +5984,11 @@ function dl(e) {
|
|
|
5984
5984
|
s,
|
|
5985
5985
|
o
|
|
5986
5986
|
]), N = et(A), K = Ee((w) => {
|
|
5987
|
-
let
|
|
5988
|
-
if (
|
|
5989
|
-
|
|
5990
|
-
for (let H of
|
|
5991
|
-
|
|
5987
|
+
let j = b.current;
|
|
5988
|
+
if (j.isPressed && j.target) {
|
|
5989
|
+
j.didFirePressStart && j.pointerType != null && E(Fr(j.target, w), j.pointerType, !1), j.isPressed = !1, j.isOverTarget = !1, j.activePointerId = null, j.pointerType = null, S(), d || Jc(j.target);
|
|
5990
|
+
for (let H of j.disposables) H();
|
|
5991
|
+
j.disposables = [];
|
|
5992
5992
|
}
|
|
5993
5993
|
}, [
|
|
5994
5994
|
d,
|
|
@@ -6006,7 +6006,7 @@ function dl(e) {
|
|
|
6006
6006
|
}, [
|
|
6007
6007
|
s
|
|
6008
6008
|
]);
|
|
6009
|
-
let
|
|
6009
|
+
let Z = Ee((w) => {
|
|
6010
6010
|
c && K(w);
|
|
6011
6011
|
}, [
|
|
6012
6012
|
c,
|
|
@@ -6016,16 +6016,16 @@ function dl(e) {
|
|
|
6016
6016
|
}, [
|
|
6017
6017
|
s,
|
|
6018
6018
|
i
|
|
6019
|
-
]), re = Ee((w,
|
|
6019
|
+
]), re = Ee((w, j) => {
|
|
6020
6020
|
if (!s && i) {
|
|
6021
6021
|
let H = new MouseEvent("click", w);
|
|
6022
|
-
mp(H,
|
|
6022
|
+
mp(H, j), i(sl(H));
|
|
6023
6023
|
}
|
|
6024
6024
|
}, [
|
|
6025
6025
|
s,
|
|
6026
6026
|
i
|
|
6027
6027
|
]), he = J(() => {
|
|
6028
|
-
let w = b.current,
|
|
6028
|
+
let w = b.current, j = {
|
|
6029
6029
|
onKeyDown(P) {
|
|
6030
6030
|
if (es(P.nativeEvent, P.currentTarget) && ke(P.currentTarget, ve(P))) {
|
|
6031
6031
|
rd(ve(P), P.key) && P.preventDefault();
|
|
@@ -6062,7 +6062,7 @@ function dl(e) {
|
|
|
6062
6062
|
}
|
|
6063
6063
|
};
|
|
6064
6064
|
if (typeof PointerEvent < "u") {
|
|
6065
|
-
|
|
6065
|
+
j.onPointerDown = (C) => {
|
|
6066
6066
|
if (C.button !== 0 || !ke(C.currentTarget, ve(C))) return;
|
|
6067
6067
|
if (B$(C.nativeEvent)) {
|
|
6068
6068
|
w.pointerType = "virtual";
|
|
@@ -6076,7 +6076,7 @@ function dl(e) {
|
|
|
6076
6076
|
"releasePointerCapture" in Q && ("hasPointerCapture" in Q ? Q.hasPointerCapture(C.pointerId) && Q.releasePointerCapture(C.pointerId) : Q.releasePointerCapture(C.pointerId)), $(Te(C.currentTarget), "pointerup", P, !1), $(Te(C.currentTarget), "pointercancel", q, !1);
|
|
6077
6077
|
}
|
|
6078
6078
|
k && C.stopPropagation();
|
|
6079
|
-
},
|
|
6079
|
+
}, j.onMouseDown = (C) => {
|
|
6080
6080
|
if (ke(C.currentTarget, ve(C)) && C.button === 0) {
|
|
6081
6081
|
if (l) {
|
|
6082
6082
|
let k = M$(C.target);
|
|
@@ -6084,12 +6084,12 @@ function dl(e) {
|
|
|
6084
6084
|
}
|
|
6085
6085
|
C.stopPropagation();
|
|
6086
6086
|
}
|
|
6087
|
-
},
|
|
6087
|
+
}, j.onPointerUp = (C) => {
|
|
6088
6088
|
!ke(C.currentTarget, ve(C)) || w.pointerType === "virtual" || C.button === 0 && !w.isPressed && N(C, w.pointerType || C.pointerType);
|
|
6089
|
-
},
|
|
6089
|
+
}, j.onPointerEnter = (C) => {
|
|
6090
6090
|
C.pointerId === w.activePointerId && w.target && !w.isOverTarget && w.pointerType != null && (w.isOverTarget = !0, y(Fr(w.target, C), w.pointerType));
|
|
6091
|
-
},
|
|
6092
|
-
C.pointerId === w.activePointerId && w.target && w.isOverTarget && w.pointerType != null && (w.isOverTarget = !1, _(Fr(w.target, C), w.pointerType, !1),
|
|
6091
|
+
}, j.onPointerLeave = (C) => {
|
|
6092
|
+
C.pointerId === w.activePointerId && w.target && w.isOverTarget && w.pointerType != null && (w.isOverTarget = !1, _(Fr(w.target, C), w.pointerType, !1), Z(C));
|
|
6093
6093
|
};
|
|
6094
6094
|
let P = (C) => {
|
|
6095
6095
|
if (C.pointerId === w.activePointerId && w.isPressed && C.button === 0 && w.target) {
|
|
@@ -6105,18 +6105,18 @@ function dl(e) {
|
|
|
6105
6105
|
}, q = (C) => {
|
|
6106
6106
|
F(C);
|
|
6107
6107
|
};
|
|
6108
|
-
|
|
6108
|
+
j.onDragStart = (C) => {
|
|
6109
6109
|
ke(C.currentTarget, ve(C)) && F(C);
|
|
6110
6110
|
};
|
|
6111
6111
|
}
|
|
6112
|
-
return
|
|
6112
|
+
return j;
|
|
6113
6113
|
}, [
|
|
6114
6114
|
$,
|
|
6115
6115
|
s,
|
|
6116
6116
|
l,
|
|
6117
6117
|
S,
|
|
6118
6118
|
d,
|
|
6119
|
-
|
|
6119
|
+
Z,
|
|
6120
6120
|
y,
|
|
6121
6121
|
I,
|
|
6122
6122
|
re
|
|
@@ -6125,23 +6125,23 @@ function dl(e) {
|
|
|
6125
6125
|
if (!f) return;
|
|
6126
6126
|
const w = Te(f.current);
|
|
6127
6127
|
if (!w || !w.head || w.getElementById(ed)) return;
|
|
6128
|
-
const
|
|
6129
|
-
|
|
6128
|
+
const j = w.createElement("style");
|
|
6129
|
+
j.id = ed;
|
|
6130
6130
|
let H = Np(w);
|
|
6131
|
-
H && (
|
|
6131
|
+
H && (j.nonce = H), j.textContent = `
|
|
6132
6132
|
@layer {
|
|
6133
6133
|
[${td}] {
|
|
6134
6134
|
touch-action: pan-x pan-y pinch-zoom;
|
|
6135
6135
|
}
|
|
6136
6136
|
}
|
|
6137
|
-
`.trim(), w.head.prepend(
|
|
6137
|
+
`.trim(), w.head.prepend(j);
|
|
6138
6138
|
}, [
|
|
6139
6139
|
f
|
|
6140
6140
|
]), ae(() => {
|
|
6141
6141
|
let w = b.current;
|
|
6142
6142
|
return () => {
|
|
6143
6143
|
d || Jc(w.target ?? void 0);
|
|
6144
|
-
for (let
|
|
6144
|
+
for (let j of w.disposables) j();
|
|
6145
6145
|
w.disposables = [];
|
|
6146
6146
|
};
|
|
6147
6147
|
}, [
|
|
@@ -9289,9 +9289,9 @@ function ds(e, t) {
|
|
|
9289
9289
|
function fs(e, t, r = {}) {
|
|
9290
9290
|
let { block: n = "nearest", inline: a = "nearest" } = r;
|
|
9291
9291
|
if (e === t) return;
|
|
9292
|
-
let o = e.scrollTop, i = e.scrollLeft, s = t.getBoundingClientRect(), u = e.getBoundingClientRect(), l = window.getComputedStyle(t), c = window.getComputedStyle(e), d = document.scrollingElement || document.documentElement, f = e === d, m = e === d ? 0 : u.top, p = e === d ? e.clientHeight : u.bottom, g = e === d ? 0 : u.left, b = e === d ? e.clientWidth : u.right, $ = parseFloat(l.scrollMarginTop) || 0, S = parseFloat(l.scrollMarginBottom) || 0, y = parseFloat(l.scrollMarginLeft) || 0, E = parseFloat(l.scrollMarginRight) || 0, _ = parseFloat(c.scrollPaddingTop) || 0, A = parseFloat(c.scrollPaddingBottom) || 0, N = parseFloat(c.scrollPaddingLeft) || 0, K = parseFloat(c.scrollPaddingRight) || 0, F = parseFloat(c.borderTopWidth) || 0,
|
|
9292
|
+
let o = e.scrollTop, i = e.scrollLeft, s = t.getBoundingClientRect(), u = e.getBoundingClientRect(), l = window.getComputedStyle(t), c = window.getComputedStyle(e), d = document.scrollingElement || document.documentElement, f = e === d, m = e === d ? 0 : u.top, p = e === d ? e.clientHeight : u.bottom, g = e === d ? 0 : u.left, b = e === d ? e.clientWidth : u.right, $ = parseFloat(l.scrollMarginTop) || 0, S = parseFloat(l.scrollMarginBottom) || 0, y = parseFloat(l.scrollMarginLeft) || 0, E = parseFloat(l.scrollMarginRight) || 0, _ = parseFloat(c.scrollPaddingTop) || 0, A = parseFloat(c.scrollPaddingBottom) || 0, N = parseFloat(c.scrollPaddingLeft) || 0, K = parseFloat(c.scrollPaddingRight) || 0, F = parseFloat(c.borderTopWidth) || 0, Z = parseFloat(c.borderBottomWidth) || 0, I = parseFloat(c.borderLeftWidth) || 0, re = parseFloat(c.borderRightWidth) || 0, he = s.top - $, w = s.bottom + S, j = s.left - y, H = s.right + E, P = e === d ? 0 : I + re, q = e === d ? 0 : F + Z, C = e === d ? 0 : e.offsetWidth - e.clientWidth - P, k = e === d ? 0 : e.offsetHeight - e.clientHeight - q, Q = m + (f ? 0 : F) + _, fe = p - (f ? 0 : Z) - A - k, oe = g + (f ? 0 : I) + N, V = b - (f ? 0 : re) - K;
|
|
9293
9293
|
c.direction === "rtl" && !Aa() ? oe += C : V -= C;
|
|
9294
|
-
let ee = he < Q || w > fe, x =
|
|
9294
|
+
let ee = he < Q || w > fe, x = j < oe || H > V;
|
|
9295
9295
|
if (ee && n === "start") o += he - Q;
|
|
9296
9296
|
else if (ee && n === "center") o += (he + w) / 2 - (Q + fe) / 2;
|
|
9297
9297
|
else if (ee && n === "end") o += w - fe;
|
|
@@ -9299,11 +9299,11 @@ function fs(e, t, r = {}) {
|
|
|
9299
9299
|
let D = he - Q, v = w - fe;
|
|
9300
9300
|
o += Math.abs(D) <= Math.abs(v) ? D : v;
|
|
9301
9301
|
}
|
|
9302
|
-
if (x && a === "start") i +=
|
|
9303
|
-
else if (x && a === "center") i += (
|
|
9302
|
+
if (x && a === "start") i += j - oe;
|
|
9303
|
+
else if (x && a === "center") i += (j + H) / 2 - (oe + V) / 2;
|
|
9304
9304
|
else if (x && a === "end") i += H - V;
|
|
9305
9305
|
else if (x && a === "nearest") {
|
|
9306
|
-
let D =
|
|
9306
|
+
let D = j - oe, v = H - V;
|
|
9307
9307
|
i += Math.abs(D) <= Math.abs(v) ? D : v;
|
|
9308
9308
|
}
|
|
9309
9309
|
e.scrollTo({
|
|
@@ -9454,7 +9454,7 @@ function LE(e, t, r) {
|
|
|
9454
9454
|
day: "numeric",
|
|
9455
9455
|
timeZone: t.timeZone,
|
|
9456
9456
|
calendar: n.calendar.identifier
|
|
9457
|
-
}),
|
|
9457
|
+
}), Z = J(() => F.formatToParts(p).find((I) => I.type === "day").value, [
|
|
9458
9458
|
F,
|
|
9459
9459
|
p
|
|
9460
9460
|
]);
|
|
@@ -9496,7 +9496,7 @@ function LE(e, t, r) {
|
|
|
9496
9496
|
isUnavailable: c,
|
|
9497
9497
|
isOutsideVisibleRange: n.compare(t.visibleRange.start) < 0 || n.compare(t.visibleRange.end) > 0,
|
|
9498
9498
|
isInvalid: m,
|
|
9499
|
-
formattedDate:
|
|
9499
|
+
formattedDate: Z
|
|
9500
9500
|
};
|
|
9501
9501
|
}
|
|
9502
9502
|
function UE(e, t) {
|
|
@@ -9667,7 +9667,7 @@ function jE(e) {
|
|
|
9667
9667
|
default:
|
|
9668
9668
|
return Ad(_, o, n, i, s);
|
|
9669
9669
|
}
|
|
9670
|
-
}, [K, F] = M(N), [
|
|
9670
|
+
}, [K, F] = M(N), [Z, I] = M(e.autoFocus || !1), [re, he] = M(o);
|
|
9671
9671
|
zE(o, re) || (he(o), F(N()));
|
|
9672
9672
|
let w = J(() => {
|
|
9673
9673
|
let V = {
|
|
@@ -9677,8 +9677,8 @@ function jE(e) {
|
|
|
9677
9677
|
}, [
|
|
9678
9678
|
K,
|
|
9679
9679
|
o
|
|
9680
|
-
]), [
|
|
9681
|
-
if (!vi(p,
|
|
9680
|
+
]), [j, H] = M(p);
|
|
9681
|
+
if (!vi(p, j)) {
|
|
9682
9682
|
let V = Ve(_, p);
|
|
9683
9683
|
F(Ad(V, o, n, i, s)), A(V), H(p);
|
|
9684
9684
|
}
|
|
@@ -9802,14 +9802,14 @@ function jE(e) {
|
|
|
9802
9802
|
Array.isArray(g) ? x = g : g != null && (x = [
|
|
9803
9803
|
g
|
|
9804
9804
|
]);
|
|
9805
|
-
let D = x.findIndex((
|
|
9805
|
+
let D = x.findIndex((W) => je(W, ee)), v = D >= 0 ? x.slice(0, D).concat(x.slice(D + 1)) : [
|
|
9806
9806
|
...x,
|
|
9807
9807
|
ee
|
|
9808
9808
|
];
|
|
9809
9809
|
b(v);
|
|
9810
9810
|
} else C(V);
|
|
9811
9811
|
},
|
|
9812
|
-
isFocused:
|
|
9812
|
+
isFocused: Z,
|
|
9813
9813
|
setFocused: I,
|
|
9814
9814
|
isInvalid(V) {
|
|
9815
9815
|
return Xa(V, i, s);
|
|
@@ -9818,7 +9818,7 @@ function jE(e) {
|
|
|
9818
9818
|
return !$ || this.isCellDisabled(V) || this.isCellUnavailable(V) ? !1 : Array.isArray($) ? $.some((ee) => je(ee, V)) : je(V, $);
|
|
9819
9819
|
},
|
|
9820
9820
|
isCellFocused(V) {
|
|
9821
|
-
return
|
|
9821
|
+
return Z && _ && je(V, _);
|
|
9822
9822
|
},
|
|
9823
9823
|
isCellDisabled(V) {
|
|
9824
9824
|
return e.isDisabled || V.compare(K) < 0 || V.compare(w) > 0 || this.isInvalid(V);
|
|
@@ -9844,16 +9844,16 @@ function jE(e) {
|
|
|
9844
9844
|
}), D = [], v = o.days && o.days < 7 ? o.days : 7;
|
|
9845
9845
|
if (v === 7) {
|
|
9846
9846
|
x = ha(x, n, f);
|
|
9847
|
-
let
|
|
9848
|
-
for (let Y = 0; Y <
|
|
9847
|
+
let W = hl(x, n, f);
|
|
9848
|
+
for (let Y = 0; Y < W; Y++) D.push(null);
|
|
9849
9849
|
}
|
|
9850
9850
|
for (; D.length < v; ) {
|
|
9851
9851
|
D.push(x);
|
|
9852
|
-
let
|
|
9852
|
+
let W = x.add({
|
|
9853
9853
|
days: 1
|
|
9854
9854
|
});
|
|
9855
|
-
if (je(x,
|
|
9856
|
-
x =
|
|
9855
|
+
if (je(x, W)) break;
|
|
9856
|
+
x = W;
|
|
9857
9857
|
}
|
|
9858
9858
|
for (; D.length < v; ) D.push(null);
|
|
9859
9859
|
return D;
|
|
@@ -10147,14 +10147,14 @@ function rS(e) {
|
|
|
10147
10147
|
validationDetails: o0
|
|
10148
10148
|
} : null, l = J(() => {
|
|
10149
10149
|
if (!i || a == null) return null;
|
|
10150
|
-
let
|
|
10151
|
-
return kd(
|
|
10150
|
+
let Z = nS(i, a);
|
|
10151
|
+
return kd(Z);
|
|
10152
10152
|
}, [
|
|
10153
10153
|
i,
|
|
10154
10154
|
a
|
|
10155
10155
|
]);
|
|
10156
10156
|
o?.validationDetails.valid && (o = void 0);
|
|
10157
|
-
let c = Ne(tS), d = J(() => n ? Array.isArray(n) ? n.flatMap((
|
|
10157
|
+
let c = Ne(tS), d = J(() => n ? Array.isArray(n) ? n.flatMap((Z) => Du(c[Z])) : Du(c[n]) : [], [
|
|
10158
10158
|
c,
|
|
10159
10159
|
n
|
|
10160
10160
|
]), [f, m] = M(c), [p, g] = M(!1);
|
|
@@ -10165,18 +10165,18 @@ function rS(e) {
|
|
|
10165
10165
|
]), $ = G(Kn), [S, y] = M(Kn), E = G(Kn), _ = () => {
|
|
10166
10166
|
if (!A) return;
|
|
10167
10167
|
N(!1);
|
|
10168
|
-
let
|
|
10169
|
-
hs(
|
|
10168
|
+
let Z = l || o || $.current;
|
|
10169
|
+
hs(Z, E.current) || (E.current = Z, y(Z));
|
|
10170
10170
|
}, [A, N] = M(!1);
|
|
10171
10171
|
return ae(_), {
|
|
10172
10172
|
realtimeValidation: u || b || l || o || Kn,
|
|
10173
10173
|
displayValidation: s === "native" ? u || b || S : u || b || l || o || S,
|
|
10174
|
-
updateValidation(
|
|
10175
|
-
s === "aria" && !hs(S,
|
|
10174
|
+
updateValidation(Z) {
|
|
10175
|
+
s === "aria" && !hs(S, Z) ? y(Z) : $.current = Z;
|
|
10176
10176
|
},
|
|
10177
10177
|
resetValidation() {
|
|
10178
|
-
let
|
|
10179
|
-
hs(
|
|
10178
|
+
let Z = Kn;
|
|
10179
|
+
hs(Z, E.current) || (E.current = Z, y(Z)), s === "native" && N(!1), g(!0);
|
|
10180
10180
|
},
|
|
10181
10181
|
commitValidation() {
|
|
10182
10182
|
s === "native" && N(!0), g(!0);
|
|
@@ -10616,16 +10616,16 @@ function mS(e) {
|
|
|
10616
10616
|
}, [
|
|
10617
10617
|
$
|
|
10618
10618
|
]);
|
|
10619
|
-
const F = et(l ?? Pd),
|
|
10619
|
+
const F = et(l ?? Pd), Z = et(d ?? Pd), I = et(() => {
|
|
10620
10620
|
(o === void 0 || isNaN(o) || r === void 0 || isNaN(r) || r < o) && (F(), re(60));
|
|
10621
10621
|
}), re = et((oe) => {
|
|
10622
10622
|
S(), b.current = !0, t.current = window.setTimeout(I, oe);
|
|
10623
10623
|
}), he = et(() => {
|
|
10624
|
-
(a === void 0 || isNaN(a) || r === void 0 || isNaN(r) || r > a) && (
|
|
10624
|
+
(a === void 0 || isNaN(a) || r === void 0 || isNaN(r) || r > a) && (Z(), w(60));
|
|
10625
10625
|
}), w = et((oe) => {
|
|
10626
10626
|
S(), b.current = !0, t.current = window.setTimeout(he, oe);
|
|
10627
10627
|
});
|
|
10628
|
-
let
|
|
10628
|
+
let j = (oe) => {
|
|
10629
10629
|
oe.preventDefault();
|
|
10630
10630
|
}, { addGlobalListener: H, removeAllGlobalListeners: P } = bi(), q = G(!1), [C, k] = M(null);
|
|
10631
10631
|
ae(() => {
|
|
@@ -10656,7 +10656,7 @@ function mS(e) {
|
|
|
10656
10656
|
onPressStart: (oe) => {
|
|
10657
10657
|
$(), oe.pointerType !== "touch" ? (l?.(), k("mouse")) : (H(window, "pointercancel", K, {
|
|
10658
10658
|
capture: !0
|
|
10659
|
-
}), q.current = !1, k("touch")), H(window, "contextmenu",
|
|
10659
|
+
}), q.current = !1, k("touch")), H(window, "contextmenu", j);
|
|
10660
10660
|
},
|
|
10661
10661
|
onPressUp: (oe) => {
|
|
10662
10662
|
$(), oe.pointerType === "touch" && (q.current = !0), P(), k(null);
|
|
@@ -11505,10 +11505,10 @@ function Ld(e, t, r, n, a, o, i, s) {
|
|
|
11505
11505
|
n[Zo[l]] - a) : Math.max(0, e[c] + e[l] + (s ? t[l] : 0) - r[l] - r[c] + (i.scroll[l] ?? 0) - (n[l] ?? 0) - n[Zo[l]] - a);
|
|
11506
11506
|
}
|
|
11507
11507
|
function RS(e, t, r, n, a, o, i, s, u, l, c, d, f, m, p, g, b, $) {
|
|
11508
|
-
let S = Bd(e), { size: y, crossAxis: E, crossSize: _, placement: A, crossPlacement: N } = S, K = bs(t, s, r, S, c, d, l, f, p, g, u), F = c,
|
|
11509
|
-
if (i && r[y] >
|
|
11508
|
+
let S = Bd(e), { size: y, crossAxis: E, crossSize: _, placement: A, crossPlacement: N } = S, K = bs(t, s, r, S, c, d, l, f, p, g, u), F = c, Z = Ld(s, l, t, a, o + c, S, u, b);
|
|
11509
|
+
if (i && r[y] > Z) {
|
|
11510
11510
|
let ee = Bd(`${Zo[A]} ${N}`), x = bs(t, s, r, ee, c, d, l, f, p, g, u);
|
|
11511
|
-
Ld(s, l, t, a, o + c, ee, u, b) >
|
|
11511
|
+
Ld(s, l, t, a, o + c, ee, u, b) > Z && (S = ee, K = x, F = c);
|
|
11512
11512
|
}
|
|
11513
11513
|
let I = "bottom";
|
|
11514
11514
|
S.axis === "top" ? S.placement === "top" ? I = "top" : S.placement === "bottom" && (I = "bottom") : S.crossAxis === "top" && (S.crossPlacement === "top" ? I = "bottom" : S.crossPlacement === "bottom" && (I = "top"));
|
|
@@ -11516,12 +11516,12 @@ function RS(e, t, r, n, a, o, i, s, u, l, c, d, f, m, p, g, b, $) {
|
|
|
11516
11516
|
K[E] += re;
|
|
11517
11517
|
let he = IS(K, s, l, f, a, o, r.height, I, u, b, $);
|
|
11518
11518
|
m && m < he && (he = m), r.height = Math.min(r.height, he), K = bs(t, s, r, S, F, d, l, f, p, g, u), re = Od(E, K[E], r[_], s, u, o, l), K[E] += re;
|
|
11519
|
-
let w = {},
|
|
11519
|
+
let w = {}, j = t[E] - K[E] - a[Pt[E]], H = j + 0.5 * t[_];
|
|
11520
11520
|
const P = p / 2 + g, q = Pt[E] === "left" ? (a.left ?? 0) + (a.right ?? 0) : (a.top ?? 0) + (a.bottom ?? 0), C = r[_] - q - p / 2 - g, k = t[E] + p / 2 - (K[E] + a[Pt[E]]), Q = t[E] + t[_] - p / 2 - (K[E] + a[Pt[E]]), fe = lu(H, k, Q);
|
|
11521
|
-
w[E] = lu(fe, P, C), { placement: A, crossPlacement: N } = S, p ?
|
|
11521
|
+
w[E] = lu(fe, P, C), { placement: A, crossPlacement: N } = S, p ? j = w[E] : N === "right" ? j += t[_] : N === "center" && (j += t[_] / 2);
|
|
11522
11522
|
let oe = A === "left" || A === "top" ? r[y] : 0, V = {
|
|
11523
|
-
x: A === "top" || A === "bottom" ?
|
|
11524
|
-
y: A === "left" || A === "right" ?
|
|
11523
|
+
x: A === "top" || A === "bottom" ? j : oe,
|
|
11524
|
+
y: A === "left" || A === "right" ? j : oe
|
|
11525
11525
|
};
|
|
11526
11526
|
return {
|
|
11527
11527
|
position: K,
|
|
@@ -11557,8 +11557,8 @@ function MS(e) {
|
|
|
11557
11557
|
width: 0,
|
|
11558
11558
|
height: 0
|
|
11559
11559
|
} : F = Ud(s, g, !1);
|
|
11560
|
-
let
|
|
11561
|
-
return RS(t, y, E, A, _, o, i, N, K, F, u, l, S, c, d, f,
|
|
11560
|
+
let Z = ke(s, g);
|
|
11561
|
+
return RS(t, y, E, A, _, o, i, N, K, F, u, l, S, c, d, f, Z, p);
|
|
11562
11562
|
}
|
|
11563
11563
|
function Ci(e, t) {
|
|
11564
11564
|
let { top: r, left: n, width: a, height: o } = e.getBoundingClientRect();
|
|
@@ -11672,13 +11672,13 @@ function US(e) {
|
|
|
11672
11672
|
]);
|
|
11673
11673
|
let N = Ee(() => {
|
|
11674
11674
|
if (m === !1 || !p || !a.current || !n.current || !c || Or?.scale !== A.current) return;
|
|
11675
|
-
let
|
|
11675
|
+
let Z = null;
|
|
11676
11676
|
if (i.current && al(i.current)) {
|
|
11677
|
-
let w = ze()?.getBoundingClientRect(),
|
|
11678
|
-
|
|
11677
|
+
let w = ze()?.getBoundingClientRect(), j = i.current.getBoundingClientRect();
|
|
11678
|
+
Z = {
|
|
11679
11679
|
type: "top",
|
|
11680
|
-
offset: (w?.top ?? 0) -
|
|
11681
|
-
},
|
|
11680
|
+
offset: (w?.top ?? 0) - j.top
|
|
11681
|
+
}, Z.offset > j.height / 2 && (Z.type = "bottom", Z.offset = (w?.bottom ?? 0) - j.bottom);
|
|
11682
11682
|
}
|
|
11683
11683
|
let I = a.current;
|
|
11684
11684
|
!b && a.current && (I.style.top = "0px", I.style.bottom = "", I.style.maxHeight = (window.visualViewport?.height ?? window.innerHeight) + "px");
|
|
@@ -11700,9 +11700,9 @@ function US(e) {
|
|
|
11700
11700
|
if (!re.position) return;
|
|
11701
11701
|
I.style.top = "", I.style.bottom = "", I.style.left = "", I.style.right = "", Object.keys(re.position).forEach((w) => I.style[w] = re.position[w] + "px"), I.style.maxHeight = re.maxHeight != null ? re.maxHeight + "px" : "";
|
|
11702
11702
|
let he = ze();
|
|
11703
|
-
if (
|
|
11704
|
-
let w = he.getBoundingClientRect(),
|
|
11705
|
-
i.current.scrollTop += H -
|
|
11703
|
+
if (Z && he && i.current) {
|
|
11704
|
+
let w = he.getBoundingClientRect(), j = i.current.getBoundingClientRect(), H = w[Z.type] - j[Z.type];
|
|
11705
|
+
i.current.scrollTop += H - Z.offset;
|
|
11706
11706
|
}
|
|
11707
11707
|
E(re);
|
|
11708
11708
|
}, _);
|
|
@@ -11715,8 +11715,8 @@ function US(e) {
|
|
|
11715
11715
|
});
|
|
11716
11716
|
let K = G(!1);
|
|
11717
11717
|
Re(() => {
|
|
11718
|
-
let
|
|
11719
|
-
K.current = !0, clearTimeout(
|
|
11718
|
+
let Z, I = () => {
|
|
11719
|
+
K.current = !0, clearTimeout(Z), Z = setTimeout(() => {
|
|
11720
11720
|
K.current = !1;
|
|
11721
11721
|
}, 500), N();
|
|
11722
11722
|
}, re = () => {
|
|
@@ -12346,11 +12346,11 @@ function nw({ state: e, isExiting: t, UNSTABLE_portalContainer: r, clearContexts
|
|
|
12346
12346
|
a.trigger
|
|
12347
12347
|
]);
|
|
12348
12348
|
let E = J(() => {
|
|
12349
|
-
let
|
|
12350
|
-
if (n) for (let I of n)
|
|
12349
|
+
let Z = b.children;
|
|
12350
|
+
if (n) for (let I of n) Z = /* @__PURE__ */ X.createElement(I.Provider, {
|
|
12351
12351
|
value: null
|
|
12352
|
-
},
|
|
12353
|
-
return
|
|
12352
|
+
}, Z);
|
|
12353
|
+
return Z;
|
|
12354
12354
|
}, [
|
|
12355
12355
|
b.children,
|
|
12356
12356
|
n
|
|
@@ -13606,7 +13606,7 @@ function yw(e, t, r) {
|
|
|
13606
13606
|
break;
|
|
13607
13607
|
}
|
|
13608
13608
|
}
|
|
13609
|
-
},
|
|
13609
|
+
}, Z = () => {
|
|
13610
13610
|
n.current = "", r.current && Xh(r.current, {
|
|
13611
13611
|
containingElement: Ei(r.current)
|
|
13612
13612
|
}), window.getSelection()?.collapse(r.current);
|
|
@@ -13656,7 +13656,7 @@ function yw(e, t, r) {
|
|
|
13656
13656
|
t.segments
|
|
13657
13657
|
]);
|
|
13658
13658
|
e !== w && !t.isInvalid && (l = void 0);
|
|
13659
|
-
let
|
|
13659
|
+
let j = Zt(), H = !t.isDisabled && !t.isReadOnly && e.isEditable, P = e.type === "literal" ? "" : i.of(e.type), q = Ta({
|
|
13660
13660
|
"aria-label": `${P}${s ? `, ${s}` : ""}${u ? ", " : ""}`,
|
|
13661
13661
|
"aria-labelledby": u
|
|
13662
13662
|
});
|
|
@@ -13675,7 +13675,7 @@ function yw(e, t, r) {
|
|
|
13675
13675
|
}
|
|
13676
13676
|
return {
|
|
13677
13677
|
segmentProps: Fe(g, q, {
|
|
13678
|
-
id:
|
|
13678
|
+
id: j,
|
|
13679
13679
|
...he,
|
|
13680
13680
|
"aria-invalid": t.isInvalid ? "true" : void 0,
|
|
13681
13681
|
"aria-describedby": l,
|
|
@@ -13690,7 +13690,7 @@ function yw(e, t, r) {
|
|
|
13690
13690
|
inputMode: t.isDisabled || e.type === "dayPeriod" || e.type === "era" || !H ? void 0 : "numeric",
|
|
13691
13691
|
tabIndex: t.isDisabled ? void 0 : 0,
|
|
13692
13692
|
onKeyDown: S,
|
|
13693
|
-
onFocus:
|
|
13693
|
+
onFocus: Z,
|
|
13694
13694
|
style: C,
|
|
13695
13695
|
// Prevent pointer events from reaching useDatePickerGroup, and allow native browser behavior to focus the segment.
|
|
13696
13696
|
onPointerDown(k) {
|
|
@@ -14783,7 +14783,7 @@ function Tw(e) {
|
|
|
14783
14783
|
]), F = J(() => new ar(t, K), [
|
|
14784
14784
|
t,
|
|
14785
14785
|
K
|
|
14786
|
-
]),
|
|
14786
|
+
]), Z = J(() => F.resolvedOptions(), [
|
|
14787
14787
|
F
|
|
14788
14788
|
]), I = J(() => Sw(e.placeholderValue, d, p, f), [
|
|
14789
14789
|
e.placeholderValue,
|
|
@@ -14802,14 +14802,14 @@ function Tw(e) {
|
|
|
14802
14802
|
] : [],
|
|
14803
14803
|
"minute",
|
|
14804
14804
|
"second"
|
|
14805
|
-
],
|
|
14806
|
-
return v.slice(
|
|
14805
|
+
], W = v.indexOf(e.maxGranularity || "era"), Y = v.indexOf(d === "hour" && D ? "dayPeriod" : d);
|
|
14806
|
+
return v.slice(W, Y + 1);
|
|
14807
14807
|
}, [
|
|
14808
14808
|
e.maxGranularity,
|
|
14809
14809
|
d,
|
|
14810
14810
|
g
|
|
14811
|
-
]), [he, w] = M(y), [
|
|
14812
|
-
(y !== he || g !== P || !vi(p,
|
|
14811
|
+
]), [he, w] = M(y), [j, H] = M(p), [P, q] = M(g);
|
|
14812
|
+
(y !== he || g !== P || !vi(p, j)) && (E = new zt(p, g, y), w(y), H(p), q(g), _(E));
|
|
14813
14813
|
let C = (D) => {
|
|
14814
14814
|
if (!(e.isDisabled || e.isReadOnly))
|
|
14815
14815
|
if (D == null || D instanceof zt && D.isCleared(re))
|
|
@@ -14820,9 +14820,9 @@ function Tw(e) {
|
|
|
14820
14820
|
if (D.isComplete(re)) {
|
|
14821
14821
|
let v = D.toValue(y ?? I);
|
|
14822
14822
|
if (D.validate(v, re)) {
|
|
14823
|
-
let
|
|
14824
|
-
if (!b ||
|
|
14825
|
-
_(new zt(p, g, y)), $(
|
|
14823
|
+
let W = Ve(v, c?.calendar || new pt());
|
|
14824
|
+
if (!b || W.compare(b) !== 0) {
|
|
14825
|
+
_(new zt(p, g, y)), $(W);
|
|
14826
14826
|
return;
|
|
14827
14827
|
}
|
|
14828
14828
|
}
|
|
@@ -14834,10 +14834,10 @@ function Tw(e) {
|
|
|
14834
14834
|
m,
|
|
14835
14835
|
y,
|
|
14836
14836
|
I
|
|
14837
|
-
]), Q = J(() => kw(k, E, F,
|
|
14837
|
+
]), Q = J(() => kw(k, E, F, Z, p, t, d), [
|
|
14838
14838
|
k,
|
|
14839
14839
|
F,
|
|
14840
|
-
|
|
14840
|
+
Z,
|
|
14841
14841
|
E,
|
|
14842
14842
|
p,
|
|
14843
14843
|
t,
|
|
@@ -14910,10 +14910,10 @@ function Tw(e) {
|
|
|
14910
14910
|
return new ar(t, v).format(k);
|
|
14911
14911
|
},
|
|
14912
14912
|
getDateFormatter(D, v) {
|
|
14913
|
-
let
|
|
14913
|
+
let W = {
|
|
14914
14914
|
...N,
|
|
14915
14915
|
...v
|
|
14916
|
-
}, Y = Tn({},
|
|
14916
|
+
}, Y = Tn({}, W);
|
|
14917
14917
|
return new ar(D, Y);
|
|
14918
14918
|
}
|
|
14919
14919
|
};
|
|
@@ -15083,8 +15083,8 @@ function Mw(e, t, r) {
|
|
|
15083
15083
|
...e,
|
|
15084
15084
|
isDisabled: t.isOpen,
|
|
15085
15085
|
onBlurWithin: (F) => {
|
|
15086
|
-
let
|
|
15087
|
-
ke(
|
|
15086
|
+
let Z = document.getElementById(a);
|
|
15087
|
+
ke(Z, F.relatedTarget) || (N.current = !1, e.onBlur?.(F), e.onFocusChange?.(!1));
|
|
15088
15088
|
},
|
|
15089
15089
|
onFocusWithin: (F) => {
|
|
15090
15090
|
N.current || (N.current = !0, e.onFocus?.(F), e.onFocusChange?.(!0));
|
|
@@ -15201,7 +15201,7 @@ function Fw(e) {
|
|
|
15201
15201
|
}, F = (I) => {
|
|
15202
15202
|
let re = typeof c == "function" ? c() : c;
|
|
15203
15203
|
l ? m || re ? K(I, m || Yd(e.defaultValue || e.placeholderValue)) : f(I) : (n(I), _.commitValidation()), re && t.setOpen(!1);
|
|
15204
|
-
},
|
|
15204
|
+
}, Z = (I) => {
|
|
15205
15205
|
d && I ? K(d, I) : p(I);
|
|
15206
15206
|
};
|
|
15207
15207
|
return {
|
|
@@ -15212,7 +15212,7 @@ function Fw(e) {
|
|
|
15212
15212
|
dateValue: d,
|
|
15213
15213
|
timeValue: m,
|
|
15214
15214
|
setDateValue: F,
|
|
15215
|
-
setTimeValue:
|
|
15215
|
+
setTimeValue: Z,
|
|
15216
15216
|
granularity: i,
|
|
15217
15217
|
hasTime: l,
|
|
15218
15218
|
...t,
|
|
@@ -15453,23 +15453,23 @@ function Vw({
|
|
|
15453
15453
|
/* @__PURE__ */ T("header", { className: "date-picker-calendar-header", children: [
|
|
15454
15454
|
/* @__PURE__ */ h(ns, { className: "date-picker-nav-button", slot: "previous", type: "button", children: "‹" }),
|
|
15455
15455
|
/* @__PURE__ */ T("div", { className: "date-picker-selects", children: [
|
|
15456
|
-
/* @__PURE__ */ h(XE, { format: "long", children: ({ "aria-label": N, value: K, items: F, onChange:
|
|
15456
|
+
/* @__PURE__ */ h(XE, { format: "long", children: ({ "aria-label": N, value: K, items: F, onChange: Z }) => /* @__PURE__ */ h(
|
|
15457
15457
|
Jd,
|
|
15458
15458
|
{
|
|
15459
15459
|
label: N,
|
|
15460
15460
|
value: K,
|
|
15461
15461
|
items: F,
|
|
15462
|
-
onChange:
|
|
15462
|
+
onChange: Z,
|
|
15463
15463
|
className: "date-picker-select--month"
|
|
15464
15464
|
}
|
|
15465
15465
|
) }),
|
|
15466
|
-
/* @__PURE__ */ h(QE, { visibleYears: 120, children: ({ "aria-label": N, value: K, items: F, onChange:
|
|
15466
|
+
/* @__PURE__ */ h(QE, { visibleYears: 120, children: ({ "aria-label": N, value: K, items: F, onChange: Z }) => /* @__PURE__ */ h(
|
|
15467
15467
|
Jd,
|
|
15468
15468
|
{
|
|
15469
15469
|
label: N,
|
|
15470
15470
|
value: K,
|
|
15471
15471
|
items: F,
|
|
15472
|
-
onChange:
|
|
15472
|
+
onChange: Z,
|
|
15473
15473
|
className: "date-picker-select--year"
|
|
15474
15474
|
}
|
|
15475
15475
|
) }),
|
|
@@ -15614,19 +15614,19 @@ function Zw({
|
|
|
15614
15614
|
disabled: f,
|
|
15615
15615
|
...m
|
|
15616
15616
|
}) {
|
|
15617
|
-
const p = G(null), g = G(null), b = G(null), [$, S] = M(!1), [y, E] = M(""), [_, A] = M(-1), [N, K] = M("bottom"), F = Array.isArray(u) ? String(u[0] ?? "") : String(u ?? ""),
|
|
15617
|
+
const p = G(null), g = G(null), b = G(null), [$, S] = M(!1), [y, E] = M(""), [_, A] = M(-1), [N, K] = M("bottom"), F = Array.isArray(u) ? String(u[0] ?? "") : String(u ?? ""), Z = s.find((C) => C.value === F), I = `${e}-listbox`, re = _ >= 0 ? `${e}-option-${_}` : void 0, he = [r ? `${e}-hint` : null, n ? `${e}-error` : null].filter(Boolean).join(" ") || void 0, w = J(() => {
|
|
15618
15618
|
const C = y.trim().toLowerCase();
|
|
15619
|
-
return !C ||
|
|
15620
|
-
}, [s, y,
|
|
15619
|
+
return !C || Z?.label === y ? s : s.filter((k) => k.label.toLowerCase().includes(C) || k.value.toLowerCase().includes(C));
|
|
15620
|
+
}, [s, y, Z?.label]);
|
|
15621
15621
|
ae(() => {
|
|
15622
|
-
E(
|
|
15623
|
-
}, [
|
|
15622
|
+
E(Z?.label ?? "");
|
|
15623
|
+
}, [Z?.label]), ae(() => {
|
|
15624
15624
|
if (!$) return;
|
|
15625
15625
|
const C = (k) => {
|
|
15626
|
-
p.current && !p.current.contains(k.target) && (S(!1), A(-1), E(
|
|
15626
|
+
p.current && !p.current.contains(k.target) && (S(!1), A(-1), E(Z?.label ?? ""));
|
|
15627
15627
|
};
|
|
15628
15628
|
return document.addEventListener("mousedown", C), () => document.removeEventListener("mousedown", C);
|
|
15629
|
-
}, [$,
|
|
15629
|
+
}, [$, Z?.label]), ae(() => {
|
|
15630
15630
|
if (!$) return;
|
|
15631
15631
|
const C = () => {
|
|
15632
15632
|
const k = g.current;
|
|
@@ -15638,7 +15638,7 @@ function Zw({
|
|
|
15638
15638
|
window.removeEventListener("resize", C), window.removeEventListener("scroll", C, !0);
|
|
15639
15639
|
};
|
|
15640
15640
|
}, [w.length, $]);
|
|
15641
|
-
const
|
|
15641
|
+
const j = () => {
|
|
15642
15642
|
if (f) return;
|
|
15643
15643
|
S(!0);
|
|
15644
15644
|
const C = w.findIndex((k) => k.value === F);
|
|
@@ -15650,14 +15650,14 @@ function Zw({
|
|
|
15650
15650
|
switch (C.key) {
|
|
15651
15651
|
case "ArrowDown":
|
|
15652
15652
|
if (C.preventDefault(), !$) {
|
|
15653
|
-
|
|
15653
|
+
j();
|
|
15654
15654
|
return;
|
|
15655
15655
|
}
|
|
15656
15656
|
A((k) => Math.min(k + 1, w.length - 1));
|
|
15657
15657
|
break;
|
|
15658
15658
|
case "ArrowUp":
|
|
15659
15659
|
if (C.preventDefault(), !$) {
|
|
15660
|
-
|
|
15660
|
+
j();
|
|
15661
15661
|
return;
|
|
15662
15662
|
}
|
|
15663
15663
|
A((k) => k > 0 ? k - 1 : -1);
|
|
@@ -15666,7 +15666,7 @@ function Zw({
|
|
|
15666
15666
|
$ && _ >= 0 && w[_] && (C.preventDefault(), H(w[_]));
|
|
15667
15667
|
break;
|
|
15668
15668
|
case "Escape":
|
|
15669
|
-
$ && (C.preventDefault(), S(!1), A(-1), E(
|
|
15669
|
+
$ && (C.preventDefault(), S(!1), A(-1), E(Z?.label ?? ""));
|
|
15670
15670
|
break;
|
|
15671
15671
|
}
|
|
15672
15672
|
}, q = (C) => {
|
|
@@ -15692,9 +15692,9 @@ function Zw({
|
|
|
15692
15692
|
"aria-describedby": he,
|
|
15693
15693
|
autoComplete: "off",
|
|
15694
15694
|
onFocus: (C) => {
|
|
15695
|
-
c?.(C),
|
|
15695
|
+
c?.(C), j();
|
|
15696
15696
|
},
|
|
15697
|
-
onClick:
|
|
15697
|
+
onClick: j,
|
|
15698
15698
|
onChange: (C) => {
|
|
15699
15699
|
E(C.currentTarget.value), S(!0), A(-1);
|
|
15700
15700
|
},
|
|
@@ -15810,9 +15810,9 @@ function Yw(e) {
|
|
|
15810
15810
|
}), t;
|
|
15811
15811
|
}
|
|
15812
15812
|
function qw({ id: e, label: t, hint: r, error: n, required: a, className: o, onChange: i, onPlaceSelect: s, value: u, ...l }) {
|
|
15813
|
-
const c = G(null), d = G(null), f = G(null), m = G(null), [p, g] = M(!0), [b, $] = M(u || ""), [S, y] = M([]), [E, _] = M(!1), [A, N] = M(-1), K = `${e}-suggestions`, F = A >= 0 ? `${e}-suggestion-${A}` : void 0,
|
|
15813
|
+
const c = G(null), d = G(null), f = G(null), m = G(null), [p, g] = M(!0), [b, $] = M(u || ""), [S, y] = M([]), [E, _] = M(!1), [A, N] = M(-1), K = `${e}-suggestions`, F = A >= 0 ? `${e}-suggestion-${A}` : void 0, Z = G([]), I = G(!1), re = G(-1);
|
|
15814
15814
|
ae(() => {
|
|
15815
|
-
|
|
15815
|
+
Z.current = S;
|
|
15816
15816
|
}, [S]), ae(() => {
|
|
15817
15817
|
I.current = E;
|
|
15818
15818
|
}, [E]), ae(() => {
|
|
@@ -15849,15 +15849,15 @@ function qw({ id: e, label: t, hint: r, error: n, required: a, className: o, onC
|
|
|
15849
15849
|
}
|
|
15850
15850
|
);
|
|
15851
15851
|
}, 300);
|
|
15852
|
-
},
|
|
15853
|
-
if (!I.current ||
|
|
15852
|
+
}, j = (P) => {
|
|
15853
|
+
if (!I.current || Z.current.length === 0) {
|
|
15854
15854
|
P.key === "Escape" && (_(!1), I.current = !1);
|
|
15855
15855
|
return;
|
|
15856
15856
|
}
|
|
15857
15857
|
switch (P.key) {
|
|
15858
15858
|
case "ArrowDown":
|
|
15859
15859
|
P.preventDefault(), N((q) => {
|
|
15860
|
-
const C = q <
|
|
15860
|
+
const C = q < Z.current.length - 1 ? q + 1 : q;
|
|
15861
15861
|
return re.current = C, C;
|
|
15862
15862
|
});
|
|
15863
15863
|
break;
|
|
@@ -15868,7 +15868,7 @@ function qw({ id: e, label: t, hint: r, error: n, required: a, className: o, onC
|
|
|
15868
15868
|
});
|
|
15869
15869
|
break;
|
|
15870
15870
|
case "Enter":
|
|
15871
|
-
P.preventDefault(), re.current >= 0 && re.current <
|
|
15871
|
+
P.preventDefault(), re.current >= 0 && re.current < Z.current.length && H(Z.current[re.current]);
|
|
15872
15872
|
break;
|
|
15873
15873
|
case "Escape":
|
|
15874
15874
|
P.preventDefault(), _(!1), I.current = !1;
|
|
@@ -15910,7 +15910,7 @@ function qw({ id: e, label: t, hint: r, error: n, required: a, className: o, onC
|
|
|
15910
15910
|
className: `form-input ${n ? "input-error" : ""}`,
|
|
15911
15911
|
value: b,
|
|
15912
15912
|
onChange: w,
|
|
15913
|
-
onKeyDown:
|
|
15913
|
+
onKeyDown: j,
|
|
15914
15914
|
role: "combobox",
|
|
15915
15915
|
"aria-autocomplete": "list",
|
|
15916
15916
|
"aria-expanded": E && S.length > 0,
|
|
@@ -21725,79 +21725,79 @@ function Jb({
|
|
|
21725
21725
|
ae(() => {
|
|
21726
21726
|
r && S((x) => ({ ...x, ...r }));
|
|
21727
21727
|
}, [r]);
|
|
21728
|
-
const [E, _] = M({}), A = G(/* @__PURE__ */ new Map()), N = G(/* @__PURE__ */ new Set()), [, K] = M({}), [F,
|
|
21728
|
+
const [E, _] = M({}), A = G(/* @__PURE__ */ new Map()), N = G(/* @__PURE__ */ new Set()), [, K] = M({}), [F, Z] = M({}), I = G(!1);
|
|
21729
21729
|
ae(() => {
|
|
21730
21730
|
!o || I.current || !d.some((D) => D.key === "year" || D.key === "make" || D.key === "model" || D.key === "body_style") || (I.current = !0, c({}).catch(() => {
|
|
21731
21731
|
}));
|
|
21732
21732
|
}, [o, d, c]);
|
|
21733
|
-
const [re, he] = M({}), [w,
|
|
21733
|
+
const [re, he] = M({}), [w, j] = M({}), H = Ee(
|
|
21734
21734
|
async (x, D) => {
|
|
21735
21735
|
if (!o || !Sf(D)) return;
|
|
21736
21736
|
const v = x ? x.join("-") : "_root";
|
|
21737
|
-
he((
|
|
21737
|
+
he((W) => ({ ...W, [v]: !0 })), j((W) => ({ ...W, [v]: null }));
|
|
21738
21738
|
try {
|
|
21739
|
-
const
|
|
21740
|
-
if (
|
|
21741
|
-
|
|
21739
|
+
const W = await dT({ quoteId: o, vin: D });
|
|
21740
|
+
if (W.error) {
|
|
21741
|
+
j((se) => ({ ...se, [v]: W.error }));
|
|
21742
21742
|
return;
|
|
21743
21743
|
}
|
|
21744
21744
|
let Y = y;
|
|
21745
|
-
|
|
21745
|
+
W.year && (Y = ut(Y, x, "year", String(W.year))), W.make && (Y = ut(Y, x, "make", W.make)), W.model && (Y = ut(Y, x, "model", W.model)), W.bodyStyle && (Y = ut(Y, x, "body_style", W.bodyStyle)), r && n ? n(Y) : b(Y), S(Y), A.current.clear(), N.current.clear(), K({});
|
|
21746
21746
|
} catch {
|
|
21747
|
-
|
|
21747
|
+
j((W) => ({ ...W, [v]: "VIN lookup failed — please enter vehicle details manually" }));
|
|
21748
21748
|
} finally {
|
|
21749
|
-
he((
|
|
21749
|
+
he((W) => ({ ...W, [v]: !1 }));
|
|
21750
21750
|
}
|
|
21751
21751
|
},
|
|
21752
21752
|
[o, y, r, n]
|
|
21753
21753
|
), P = Ee((x) => {
|
|
21754
|
-
const D = `${x.year}|${x.make ?? ""}|${x.model ?? ""}`, v = x.model ? "bodyStyles" : x.make ? "models" : "makes",
|
|
21755
|
-
return
|
|
21754
|
+
const D = `${x.year}|${x.make ?? ""}|${x.model ?? ""}`, v = x.model ? "bodyStyles" : x.make ? "models" : "makes", W = A.current.get(D);
|
|
21755
|
+
return W ? W[v] ?? [] : void 0;
|
|
21756
21756
|
}, []), q = Ee(
|
|
21757
21757
|
(x, D) => {
|
|
21758
21758
|
if (!o) return;
|
|
21759
|
-
const v = `${D.year}|${D.make ?? ""}|${D.model ?? ""}`,
|
|
21760
|
-
A.current.has(v) || N.current.has(v) || (N.current.add(v),
|
|
21761
|
-
A.current.set(v, se), K((
|
|
21759
|
+
const v = `${D.year}|${D.make ?? ""}|${D.model ?? ""}`, W = D.model ? "bodyStyles" : D.make ? "models" : "makes", Y = `${x}:${W}`;
|
|
21760
|
+
A.current.has(v) || N.current.has(v) || (N.current.add(v), Z((se) => ({ ...se, [Y]: !0 })), c(D).then((se) => {
|
|
21761
|
+
A.current.set(v, se), K((z) => ({ ...z, [Y]: se[W] ?? [] }));
|
|
21762
21762
|
}).catch(() => {
|
|
21763
21763
|
A.current.set(v, {}), K((se) => ({ ...se, [Y]: [] }));
|
|
21764
21764
|
}).finally(() => {
|
|
21765
|
-
N.current.delete(v),
|
|
21765
|
+
N.current.delete(v), Z((se) => ({ ...se, [Y]: !1 }));
|
|
21766
21766
|
}));
|
|
21767
21767
|
},
|
|
21768
21768
|
[o, c]
|
|
21769
21769
|
);
|
|
21770
21770
|
function C(x, D, v) {
|
|
21771
|
-
const
|
|
21772
|
-
return x ? { state:
|
|
21771
|
+
const W = y, Y = x ? ia(y, x) ?? {} : W;
|
|
21772
|
+
return x ? { state: W.state, ...Y, [D]: v } : { ...Y, [D]: v };
|
|
21773
21773
|
}
|
|
21774
21774
|
function k(x, D) {
|
|
21775
|
-
const v = Mb.filter((Y) => Y.targetKey === x || Y.dependsOn.includes(x)),
|
|
21775
|
+
const v = Mb.filter((Y) => Y.targetKey === x || Y.dependsOn.includes(x)), W = { [x]: void 0 };
|
|
21776
21776
|
for (const Y of v) {
|
|
21777
21777
|
const se = Y.validate(D);
|
|
21778
|
-
Y.targetKey in
|
|
21778
|
+
Y.targetKey in W ? se !== void 0 && (W[Y.targetKey] = se) : W[Y.targetKey] = se;
|
|
21779
21779
|
}
|
|
21780
|
-
_((Y) => ({ ...Y, ...
|
|
21780
|
+
_((Y) => ({ ...Y, ...W }));
|
|
21781
21781
|
}
|
|
21782
21782
|
const Q = (x, D, v) => {
|
|
21783
|
-
const
|
|
21784
|
-
if (Wt(
|
|
21783
|
+
const W = ot(y, v, x);
|
|
21784
|
+
if (Wt(W, D)) {
|
|
21785
21785
|
E[x] && _((se) => ({ ...se, [x]: void 0 }));
|
|
21786
21786
|
return;
|
|
21787
21787
|
}
|
|
21788
|
-
const Y = Nu(x,
|
|
21788
|
+
const Y = Nu(x, W);
|
|
21789
21789
|
if (Y) {
|
|
21790
21790
|
_((se) => ({ ...se, [x]: Y }));
|
|
21791
21791
|
return;
|
|
21792
21792
|
}
|
|
21793
|
-
k(x, C(v, x,
|
|
21793
|
+
k(x, C(v, x, W));
|
|
21794
21794
|
};
|
|
21795
21795
|
ae(() => {
|
|
21796
21796
|
let x = y, D = !1;
|
|
21797
21797
|
d.forEach((v) => {
|
|
21798
21798
|
if (!Co(v)) return;
|
|
21799
|
-
const
|
|
21800
|
-
ot(x, void 0,
|
|
21799
|
+
const W = String(v.key);
|
|
21800
|
+
ot(x, void 0, W) !== "Yes" && (x = ut(x, void 0, W, "Yes"), D = !0);
|
|
21801
21801
|
}), D && (r && n ? n(x) : b(x), S(x));
|
|
21802
21802
|
}, [d, y, r, n]);
|
|
21803
21803
|
function fe(x, D) {
|
|
@@ -21812,7 +21812,7 @@ function Jb({
|
|
|
21812
21812
|
const L = ot(y, D, "vehicle_has_modifications");
|
|
21813
21813
|
if (L !== "Yes" && L !== !0) return null;
|
|
21814
21814
|
}
|
|
21815
|
-
const
|
|
21815
|
+
const W = v === "auto_reason_for_no_insurance" && f.currentCarrierKey ? y[f.currentCarrierKey] === "NoPriorInsurance" ? "Reason you are not currently insured" : "Reason for lapse in coverage" : x.question, Y = x.hint, se = ot(y, D, v), z = Eo(x, f) ? ca(y, f) : v === "social_security_number" && Jo(y.state ?? y.State) ? !0 : x.required, me = E[v], Ce = (L) => {
|
|
21816
21816
|
let ue = ut(y, D, v, L);
|
|
21817
21817
|
if (x.inputType === "radio" && x.conditionals) {
|
|
21818
21818
|
const B = x.conditionals ?? [];
|
|
@@ -21971,7 +21971,7 @@ function Jb({
|
|
|
21971
21971
|
return U > 0 && U !== 100 ? `Driver percentages for this vehicle must add up to 100% (currently ${U}%).` : null;
|
|
21972
21972
|
};
|
|
21973
21973
|
return /* @__PURE__ */ T("div", { children: [
|
|
21974
|
-
/* @__PURE__ */ h("h4", { style: { marginBottom: "12px" }, children:
|
|
21974
|
+
/* @__PURE__ */ h("h4", { style: { marginBottom: "12px" }, children: W }),
|
|
21975
21975
|
L.map((de, le) => {
|
|
21976
21976
|
const ge = [de.year, de.make, de.model].filter(Boolean).join(" ") || `Vehicle ${le + 1}`, R = te(le);
|
|
21977
21977
|
return /* @__PURE__ */ T(
|
|
@@ -22012,7 +22012,7 @@ function Jb({
|
|
|
22012
22012
|
if (v === "vin" && o) {
|
|
22013
22013
|
const L = D ? D.join("-") : "_root", ue = re[L] ?? !1, B = w[L] ?? null, ne = [Y ? `${v}-hint` : null, me ? `${v}-error` : null, B ? `${v}-vin-error` : null].filter(Boolean).join(" ");
|
|
22014
22014
|
return /* @__PURE__ */ T("div", { children: [
|
|
22015
|
-
/* @__PURE__ */ h(xt, { id: v, label:
|
|
22015
|
+
/* @__PURE__ */ h(xt, { id: v, label: W, hint: Y, error: me, required: z, children: /* @__PURE__ */ T("div", { className: "flex items-end gap-2", children: [
|
|
22016
22016
|
/* @__PURE__ */ h("div", { className: "flex-1 min-w-0", children: /* @__PURE__ */ h(
|
|
22017
22017
|
"input",
|
|
22018
22018
|
{
|
|
@@ -22020,8 +22020,8 @@ function Jb({
|
|
|
22020
22020
|
className: `form-input ${me ? "input-error" : ""}`,
|
|
22021
22021
|
"aria-invalid": !!me,
|
|
22022
22022
|
"aria-describedby": ne || void 0,
|
|
22023
|
-
"aria-required":
|
|
22024
|
-
required:
|
|
22023
|
+
"aria-required": z || void 0,
|
|
22024
|
+
required: z,
|
|
22025
22025
|
value: gt(se),
|
|
22026
22026
|
maxLength: 17,
|
|
22027
22027
|
onChange: (te) => Ce(te.currentTarget.value),
|
|
@@ -22050,7 +22050,7 @@ function Jb({
|
|
|
22050
22050
|
po,
|
|
22051
22051
|
{
|
|
22052
22052
|
id: v,
|
|
22053
|
-
label:
|
|
22053
|
+
label: W,
|
|
22054
22054
|
hint: Y,
|
|
22055
22055
|
value: L,
|
|
22056
22056
|
inputMode: "numeric",
|
|
@@ -22061,7 +22061,7 @@ function Jb({
|
|
|
22061
22061
|
Ce(B);
|
|
22062
22062
|
},
|
|
22063
22063
|
onBlur: () => Q(v, "text", D),
|
|
22064
|
-
"aria-required":
|
|
22064
|
+
"aria-required": z || void 0,
|
|
22065
22065
|
error: me,
|
|
22066
22066
|
autoComplete: lo[v]
|
|
22067
22067
|
},
|
|
@@ -22073,12 +22073,12 @@ function Jb({
|
|
|
22073
22073
|
po,
|
|
22074
22074
|
{
|
|
22075
22075
|
id: v,
|
|
22076
|
-
label:
|
|
22076
|
+
label: W,
|
|
22077
22077
|
hint: Y,
|
|
22078
22078
|
value: gt(se),
|
|
22079
22079
|
onChange: (L) => Ce(L.currentTarget.value.replace(/[^A-Z0-9]/gi, "").slice(0, 20)),
|
|
22080
22080
|
onBlur: () => Q(v, "text", D),
|
|
22081
|
-
"aria-required":
|
|
22081
|
+
"aria-required": z || void 0,
|
|
22082
22082
|
error: me,
|
|
22083
22083
|
autoComplete: "off",
|
|
22084
22084
|
maxLength: 20
|
|
@@ -22091,12 +22091,12 @@ function Jb({
|
|
|
22091
22091
|
n$,
|
|
22092
22092
|
{
|
|
22093
22093
|
id: v,
|
|
22094
|
-
label:
|
|
22094
|
+
label: W,
|
|
22095
22095
|
hint: B,
|
|
22096
22096
|
value: gt(se),
|
|
22097
22097
|
onChange: (ne) => Ce(ne.currentTarget.value),
|
|
22098
22098
|
onBlur: () => Q(v, "text", D),
|
|
22099
|
-
"aria-required":
|
|
22099
|
+
"aria-required": z || void 0,
|
|
22100
22100
|
error: me
|
|
22101
22101
|
},
|
|
22102
22102
|
v
|
|
@@ -22106,12 +22106,12 @@ function Jb({
|
|
|
22106
22106
|
po,
|
|
22107
22107
|
{
|
|
22108
22108
|
id: v,
|
|
22109
|
-
label:
|
|
22109
|
+
label: W,
|
|
22110
22110
|
hint: Y,
|
|
22111
22111
|
value: gt(se),
|
|
22112
22112
|
onChange: (L) => Ce(L.currentTarget.value),
|
|
22113
22113
|
onBlur: () => Q(v, "text", D),
|
|
22114
|
-
"aria-required":
|
|
22114
|
+
"aria-required": z || void 0,
|
|
22115
22115
|
error: me,
|
|
22116
22116
|
autoComplete: lo[v],
|
|
22117
22117
|
maxLength: wT[v]
|
|
@@ -22124,11 +22124,11 @@ function Jb({
|
|
|
22124
22124
|
a$,
|
|
22125
22125
|
{
|
|
22126
22126
|
id: v,
|
|
22127
|
-
label:
|
|
22127
|
+
label: W,
|
|
22128
22128
|
value: gt(se),
|
|
22129
22129
|
onChange: (L) => Ce(L.currentTarget.value),
|
|
22130
22130
|
onBlur: () => Q(v, "email", D),
|
|
22131
|
-
"aria-required":
|
|
22131
|
+
"aria-required": z || void 0,
|
|
22132
22132
|
error: me
|
|
22133
22133
|
},
|
|
22134
22134
|
v
|
|
@@ -22138,11 +22138,11 @@ function Jb({
|
|
|
22138
22138
|
i$,
|
|
22139
22139
|
{
|
|
22140
22140
|
id: v,
|
|
22141
|
-
label:
|
|
22141
|
+
label: W,
|
|
22142
22142
|
value: gt(se),
|
|
22143
22143
|
onChange: (L) => Ce(L.currentTarget.value),
|
|
22144
22144
|
onBlur: () => Q(v, "password", D),
|
|
22145
|
-
"aria-required":
|
|
22145
|
+
"aria-required": z || void 0,
|
|
22146
22146
|
error: me
|
|
22147
22147
|
},
|
|
22148
22148
|
v
|
|
@@ -22153,11 +22153,11 @@ function Jb({
|
|
|
22153
22153
|
ip,
|
|
22154
22154
|
{
|
|
22155
22155
|
id: v,
|
|
22156
|
-
label:
|
|
22156
|
+
label: W,
|
|
22157
22157
|
value: gt(se),
|
|
22158
22158
|
onChange: (L) => Ce(L.currentTarget.value),
|
|
22159
22159
|
onBlur: () => Q(v, "tel", D),
|
|
22160
|
-
"aria-required":
|
|
22160
|
+
"aria-required": z || void 0,
|
|
22161
22161
|
error: me
|
|
22162
22162
|
},
|
|
22163
22163
|
v
|
|
@@ -22182,11 +22182,11 @@ function Jb({
|
|
|
22182
22182
|
o$,
|
|
22183
22183
|
{
|
|
22184
22184
|
id: v,
|
|
22185
|
-
label:
|
|
22185
|
+
label: W,
|
|
22186
22186
|
value: gt(se),
|
|
22187
22187
|
onChange: (L) => Ce(L.currentTarget.value),
|
|
22188
22188
|
onBlur: () => Q(v, "url", D),
|
|
22189
|
-
"aria-required":
|
|
22189
|
+
"aria-required": z || void 0,
|
|
22190
22190
|
error: me
|
|
22191
22191
|
},
|
|
22192
22192
|
v
|
|
@@ -22197,14 +22197,15 @@ function Jb({
|
|
|
22197
22197
|
r$,
|
|
22198
22198
|
{
|
|
22199
22199
|
id: v,
|
|
22200
|
-
label:
|
|
22200
|
+
label: W,
|
|
22201
22201
|
hint: Y,
|
|
22202
22202
|
value: Jf(se),
|
|
22203
22203
|
isCurrency: Zf.has(v),
|
|
22204
22204
|
maxDigits: L,
|
|
22205
22205
|
onChange: (ue) => Ce(Wf(ue.currentTarget.value)),
|
|
22206
22206
|
onBlur: () => Q(v, "number", D),
|
|
22207
|
-
|
|
22207
|
+
required: z,
|
|
22208
|
+
"aria-required": z || void 0,
|
|
22208
22209
|
error: me
|
|
22209
22210
|
},
|
|
22210
22211
|
v
|
|
@@ -22212,7 +22213,7 @@ function Jb({
|
|
|
22212
22213
|
Gi,
|
|
22213
22214
|
{
|
|
22214
22215
|
id: v,
|
|
22215
|
-
label:
|
|
22216
|
+
label: W,
|
|
22216
22217
|
hint: Y,
|
|
22217
22218
|
value: Jf(se),
|
|
22218
22219
|
inputMode: "numeric",
|
|
@@ -22229,7 +22230,8 @@ function Jb({
|
|
|
22229
22230
|
L !== void 0 && (B = B.slice(0, L)), Ce(Wf(B));
|
|
22230
22231
|
},
|
|
22231
22232
|
onBlur: () => Q(v, "number", D),
|
|
22232
|
-
|
|
22233
|
+
required: z,
|
|
22234
|
+
"aria-required": z || void 0,
|
|
22233
22235
|
error: me
|
|
22234
22236
|
},
|
|
22235
22237
|
v
|
|
@@ -22240,11 +22242,11 @@ function Jb({
|
|
|
22240
22242
|
s$,
|
|
22241
22243
|
{
|
|
22242
22244
|
id: v,
|
|
22243
|
-
label:
|
|
22245
|
+
label: W,
|
|
22244
22246
|
value: gt(se),
|
|
22245
22247
|
onChange: (L) => Ce(L.currentTarget.value),
|
|
22246
22248
|
onBlur: () => Q(v, "textarea", D),
|
|
22247
|
-
"aria-required":
|
|
22249
|
+
"aria-required": z || void 0,
|
|
22248
22250
|
error: me,
|
|
22249
22251
|
rows: 4
|
|
22250
22252
|
},
|
|
@@ -22256,7 +22258,7 @@ function Jb({
|
|
|
22256
22258
|
Vw,
|
|
22257
22259
|
{
|
|
22258
22260
|
id: v,
|
|
22259
|
-
label:
|
|
22261
|
+
label: W,
|
|
22260
22262
|
hint: Y,
|
|
22261
22263
|
value: gt(se),
|
|
22262
22264
|
min: L,
|
|
@@ -22266,7 +22268,7 @@ function Jb({
|
|
|
22266
22268
|
Ce(ne), !Wt(ne, "date") && !Nu(v, ne) && k(v, C(D, v, ne));
|
|
22267
22269
|
},
|
|
22268
22270
|
onBlur: () => Q(v, "date", D),
|
|
22269
|
-
"aria-required":
|
|
22271
|
+
"aria-required": z || void 0,
|
|
22270
22272
|
error: me,
|
|
22271
22273
|
autoComplete: lo[v]
|
|
22272
22274
|
},
|
|
@@ -22278,8 +22280,8 @@ function Jb({
|
|
|
22278
22280
|
const L = Array.isArray(se) ? se : [], ue = `${v}-error`;
|
|
22279
22281
|
return /* @__PURE__ */ T("fieldset", { className: "space-y-2", "aria-describedby": me ? ue : void 0, children: [
|
|
22280
22282
|
/* @__PURE__ */ T("legend", { className: "form-label", children: [
|
|
22281
|
-
|
|
22282
|
-
|
|
22283
|
+
W,
|
|
22284
|
+
z && /* @__PURE__ */ T(Ct, { children: [
|
|
22283
22285
|
/* @__PURE__ */ h("span", { className: "text-red-600 ml-1", "aria-hidden": "true", children: "*" }),
|
|
22284
22286
|
/* @__PURE__ */ h("span", { className: "sr-only", children: " required" })
|
|
22285
22287
|
] })
|
|
@@ -22296,7 +22298,7 @@ function Jb({
|
|
|
22296
22298
|
const le = new Set(L);
|
|
22297
22299
|
de.currentTarget.checked ? le.add(B) : le.delete(B), Ce(Array.from(le));
|
|
22298
22300
|
},
|
|
22299
|
-
"aria-required":
|
|
22301
|
+
"aria-required": z || void 0,
|
|
22300
22302
|
"aria-describedby": me ? ue : void 0
|
|
22301
22303
|
},
|
|
22302
22304
|
ne
|
|
@@ -22309,10 +22311,10 @@ function Jb({
|
|
|
22309
22311
|
rn,
|
|
22310
22312
|
{
|
|
22311
22313
|
id: v,
|
|
22312
|
-
label:
|
|
22314
|
+
label: z ? `${W} *` : W,
|
|
22313
22315
|
checked: !!se,
|
|
22314
22316
|
onChange: (L) => Ce(L.currentTarget.checked),
|
|
22315
|
-
"aria-required":
|
|
22317
|
+
"aria-required": z || void 0
|
|
22316
22318
|
},
|
|
22317
22319
|
v
|
|
22318
22320
|
);
|
|
@@ -22321,7 +22323,7 @@ function Jb({
|
|
|
22321
22323
|
if (Co(x))
|
|
22322
22324
|
return null;
|
|
22323
22325
|
const L = x.options ?? [], ue = D && D.length > 0 ? `${v}__${D.join("__")}` : v;
|
|
22324
|
-
return /* @__PURE__ */ h(Ww, { legend:
|
|
22326
|
+
return /* @__PURE__ */ h(Ww, { legend: W, required: z, children: L.map((B) => /* @__PURE__ */ h(
|
|
22325
22327
|
jw,
|
|
22326
22328
|
{
|
|
22327
22329
|
name: ue,
|
|
@@ -22388,8 +22390,9 @@ function Jb({
|
|
|
22388
22390
|
qn,
|
|
22389
22391
|
{
|
|
22390
22392
|
id: de,
|
|
22391
|
-
label: B ? `${
|
|
22392
|
-
|
|
22393
|
+
label: B ? `${W} — ${B}` : W,
|
|
22394
|
+
required: z,
|
|
22395
|
+
"aria-required": z || void 0,
|
|
22393
22396
|
error: me,
|
|
22394
22397
|
disabled: ue,
|
|
22395
22398
|
value: le ? "" : PT(se),
|
|
@@ -22431,7 +22434,7 @@ function Jb({
|
|
|
22431
22434
|
qw,
|
|
22432
22435
|
{
|
|
22433
22436
|
id: v,
|
|
22434
|
-
label:
|
|
22437
|
+
label: W,
|
|
22435
22438
|
value: gt(se),
|
|
22436
22439
|
onChange: (L, ue) => {
|
|
22437
22440
|
let B = ut(y, D, v, L);
|
|
@@ -22447,8 +22450,8 @@ function Jb({
|
|
|
22447
22450
|
r && n ? n(B) : b(B), S(B);
|
|
22448
22451
|
},
|
|
22449
22452
|
onBlur: () => Q(v, "address", D),
|
|
22450
|
-
required:
|
|
22451
|
-
"aria-required":
|
|
22453
|
+
required: z,
|
|
22454
|
+
"aria-required": z || void 0,
|
|
22452
22455
|
error: me
|
|
22453
22456
|
},
|
|
22454
22457
|
v
|
|
@@ -22458,39 +22461,39 @@ function Jb({
|
|
|
22458
22461
|
}
|
|
22459
22462
|
}
|
|
22460
22463
|
function oe(x, D) {
|
|
22461
|
-
const v = x.some((Y) => String(Y.key) === "years_at_address"),
|
|
22464
|
+
const v = x.some((Y) => String(Y.key) === "years_at_address"), W = x.find((Y) => String(Y.key) === "months_at_address");
|
|
22462
22465
|
return x.map((Y, se) => {
|
|
22463
|
-
const
|
|
22464
|
-
if (
|
|
22465
|
-
if (Ts(
|
|
22466
|
+
const z = String(Y.key);
|
|
22467
|
+
if (z === "months_at_address" && v || !Do(Y, y, f) || !As(Y, y, D) || !$o(Y, y, i)) return null;
|
|
22468
|
+
if (Ts(z, Y, y, i)) {
|
|
22466
22469
|
const te = f.currentCarrierKey ? y[f.currentCarrierKey] : void 0;
|
|
22467
|
-
if (!(te && te !== "NoPriorInsurance" && Pn(y, f) && Cs.has(
|
|
22470
|
+
if (!(te && te !== "NoPriorInsurance" && Pn(y, f) && Cs.has(z))) return null;
|
|
22468
22471
|
}
|
|
22469
|
-
const me = fe(Y, D), Ce =
|
|
22472
|
+
const me = fe(Y, D), Ce = z === "years_at_address" && W ? fe(W, D) : null, L = Y.conditionals ?? [];
|
|
22470
22473
|
if (!L.length)
|
|
22471
|
-
return i === "BundlePolicy" &&
|
|
22474
|
+
return i === "BundlePolicy" && z === "policy_bi" ? /* @__PURE__ */ T("div", { className: xs(z, i, D), "data-question-key": z, children: [
|
|
22472
22475
|
/* @__PURE__ */ h("h3", { className: "text-lg font-semibold mt-6 mb-3", children: "Vehicle Coverage Information" }),
|
|
22473
22476
|
me
|
|
22474
|
-
] }, `wrap-${
|
|
22477
|
+
] }, `wrap-${z}-${se}`) : /* @__PURE__ */ T("div", { className: xs(z, i, D), "data-question-key": z, children: [
|
|
22475
22478
|
me,
|
|
22476
22479
|
Ce
|
|
22477
|
-
] }, `wrap-${
|
|
22478
|
-
const ue = Gf(Y, ot(y, D,
|
|
22479
|
-
return /* @__PURE__ */ T("div", { className: xs(
|
|
22480
|
+
] }, `wrap-${z}-${se}`);
|
|
22481
|
+
const ue = Gf(Y, ot(y, D, z)), B = L.filter((te) => Qn(ue, te.conditionalType, te.conditionalValue)), ne = B.length > 1 && !B.some((te) => te.conditionalQuestionsAllowMultiple) ? B.slice(0, 1) : B;
|
|
22482
|
+
return /* @__PURE__ */ T("div", { className: xs(z, i, D), "data-question-key": z, children: [
|
|
22480
22483
|
me,
|
|
22481
22484
|
Ce,
|
|
22482
22485
|
ne.map((te, de) => {
|
|
22483
22486
|
const le = te.conditionalQuestions ?? [];
|
|
22484
22487
|
if (!le.length) return null;
|
|
22485
22488
|
if (!te.conditionalQuestionsAllowMultiple)
|
|
22486
|
-
return /* @__PURE__ */ h("div", { className: "mt-3", children: oe(le, D) }, `branch-${
|
|
22487
|
-
const ge = co(
|
|
22489
|
+
return /* @__PURE__ */ h("div", { className: "mt-3", children: oe(le, D) }, `branch-${z}-${de}`);
|
|
22490
|
+
const ge = co(z), R = ia(y, [...D ?? [], ge]) ?? [], U = Math.max(1, R.length || 1), ce = () => {
|
|
22488
22491
|
const ye = At(y, [...D ?? [], ge, R.length], {});
|
|
22489
22492
|
r && n ? n(ye) : b(ye), S(ye);
|
|
22490
22493
|
}, ie = () => {
|
|
22491
22494
|
const ye = R.slice(0, Math.max(0, R.length - 1)), be = At(y, [...D ?? [], ge], ye);
|
|
22492
22495
|
r && n ? n(be) : b(be), S(be);
|
|
22493
|
-
}, pe = `${
|
|
22496
|
+
}, pe = `${z}__c${de}`;
|
|
22494
22497
|
return /* @__PURE__ */ T("div", { className: "mt-3", children: [
|
|
22495
22498
|
/* @__PURE__ */ T("div", { className: "repeatable-controls flex items-center justify-between mb-2 gap-2", children: [
|
|
22496
22499
|
/* @__PURE__ */ h("div", { className: "text-sm font-medium opacity-75", children: "Add one or more entries" }),
|
|
@@ -22500,7 +22503,7 @@ function Jb({
|
|
|
22500
22503
|
] })
|
|
22501
22504
|
] }),
|
|
22502
22505
|
Array.from({ length: U }).map((ye, be) => {
|
|
22503
|
-
const Ae = [...D ?? [], ge, be], we = `${pe}__i${be}`, Se = R[be] ?? {}, Oe =
|
|
22506
|
+
const Ae = [...D ?? [], ge, be], we = `${pe}__i${be}`, Se = R[be] ?? {}, Oe = z === "drivers", Ue = Oe ? `Driver #${be + 1}` : z === "vehicles" ? `Vehicle #${be + 1}` : z === "home_losses" || z === "losses" ? `Loss #${be + 1}` : `Entry #${be + 1}`, Fi = Oe && typeof Se.ssn_display == "string" && Se.ssn_display ? ` — ${Se.ssn_display}` : "";
|
|
22504
22507
|
return /* @__PURE__ */ T("div", { className: "rounded-lg border p-3 mb-3", children: [
|
|
22505
22508
|
/* @__PURE__ */ T("div", { className: "text-sm font-semibold mb-2", children: [
|
|
22506
22509
|
Ue,
|
|
@@ -22556,27 +22559,27 @@ function Jb({
|
|
|
22556
22559
|
})
|
|
22557
22560
|
] }, `group-${we}`);
|
|
22558
22561
|
})
|
|
22559
|
-
] }, `branch-${
|
|
22562
|
+
] }, `branch-${z}-${de}`);
|
|
22560
22563
|
})
|
|
22561
|
-
] }, `wrap-${
|
|
22564
|
+
] }, `wrap-${z}-${se}`);
|
|
22562
22565
|
});
|
|
22563
22566
|
}
|
|
22564
22567
|
const V = J(() => {
|
|
22565
|
-
const x = [], D = (v,
|
|
22568
|
+
const x = [], D = (v, W) => {
|
|
22566
22569
|
v.forEach((Y) => {
|
|
22567
|
-
if (!Do(Y, y, f) || !As(Y, y,
|
|
22570
|
+
if (!Do(Y, y, f) || !As(Y, y, W) || !$o(Y, y, i)) return;
|
|
22568
22571
|
const se = String(Y.key);
|
|
22569
22572
|
if (Ts(se, Y, y, i)) {
|
|
22570
22573
|
const ue = f.currentCarrierKey ? y[f.currentCarrierKey] : void 0;
|
|
22571
22574
|
if (!(ue && ue !== "NoPriorInsurance" && Pn(y, f) && Cs.has(se))) return;
|
|
22572
22575
|
}
|
|
22573
22576
|
Co(Y) || x.push(Y);
|
|
22574
|
-
const
|
|
22575
|
-
if (!
|
|
22576
|
-
const me = Gf(Y, ot(y,
|
|
22577
|
+
const z = Y.conditionals ?? [];
|
|
22578
|
+
if (!z.length) return;
|
|
22579
|
+
const me = Gf(Y, ot(y, W, se)), Ce = z.filter((ue) => Qn(me, ue.conditionalType, ue.conditionalValue));
|
|
22577
22580
|
(Ce.length > 1 && !Ce.some((ue) => ue.conditionalQuestionsAllowMultiple) ? Ce.slice(0, 1) : Ce).forEach((ue) => {
|
|
22578
22581
|
const B = ue.conditionalQuestions ?? [];
|
|
22579
|
-
B.length && (ue.conditionalQuestionsAllowMultiple || D(B,
|
|
22582
|
+
B.length && (ue.conditionalQuestionsAllowMultiple || D(B, W));
|
|
22580
22583
|
});
|
|
22581
22584
|
});
|
|
22582
22585
|
};
|
|
@@ -22589,9 +22592,9 @@ function Jb({
|
|
|
22589
22592
|
}, [s, V, y, f]);
|
|
22590
22593
|
function ee(x) {
|
|
22591
22594
|
x.preventDefault();
|
|
22592
|
-
const D = ca(y, f), v = V.map((Y) => Eo(Y, f) ? { ...Y, required: D } : Y),
|
|
22593
|
-
if (_(
|
|
22594
|
-
const Y = V.findIndex((se) =>
|
|
22595
|
+
const D = ca(y, f), v = V.map((Y) => Eo(Y, f) ? { ...Y, required: D } : Y), W = Sa(v, y);
|
|
22596
|
+
if (_(W), Object.keys(W).length > 0) {
|
|
22597
|
+
const Y = V.findIndex((se) => W[se.key]);
|
|
22595
22598
|
Y >= 0 && document.getElementById(V[Y].key)?.focus();
|
|
22596
22599
|
return;
|
|
22597
22600
|
}
|
|
@@ -23070,7 +23073,7 @@ function dk({
|
|
|
23070
23073
|
quoteId: o,
|
|
23071
23074
|
nonTerminalStageKeys: i
|
|
23072
23075
|
}) {
|
|
23073
|
-
const [s, u] = M(a ?? 0), [l, c] = M(n ?? {}), [d, f] = M({}), [m, p] = M(!1), [g, b] = M(!1), [$, S] = M(null), [y, E] = M(0), [_, A] = M([]), [N, K] = M(a ?? 0), F = G({}),
|
|
23076
|
+
const [s, u] = M(a ?? 0), [l, c] = M(n ?? {}), [d, f] = M({}), [m, p] = M(!1), [g, b] = M(!1), [$, S] = M(null), [y, E] = M(0), [_, A] = M([]), [N, K] = M(a ?? 0), F = G({}), Z = G([]), I = G(null), re = G(e), he = Array.isArray(e) && e.length > 0, w = he ? Math.min(s, e.length - 1) : 0, j = he ? e[w] : null, H = j?.key ?? null, P = G(l);
|
|
23074
23077
|
P.current = l;
|
|
23075
23078
|
const q = om({
|
|
23076
23079
|
targetStage: "Vehicle",
|
|
@@ -23097,23 +23100,23 @@ function dk({
|
|
|
23097
23100
|
shouldSkip: () => KT(P.current)
|
|
23098
23101
|
}), k = H === "Vehicle" && q.isPending || H === "Driver" && C.isPending;
|
|
23099
23102
|
ae(() => {
|
|
23100
|
-
a !== void 0 && (u(a), K((
|
|
23103
|
+
a !== void 0 && (u(a), K((z) => Math.max(z, a)));
|
|
23101
23104
|
}, [a]), re.current = e;
|
|
23102
23105
|
const Q = J(() => {
|
|
23103
|
-
const
|
|
23104
|
-
return
|
|
23106
|
+
const z = w >= e.length - 1;
|
|
23107
|
+
return z && H && i?.has(H) ? !1 : !!(z || e.slice(w + 1).every((Ce) => Ce.key === "AutoPolicy") && (l.drivers__items ?? []).length <= 1);
|
|
23105
23108
|
}, [w, e, l, H, i]);
|
|
23106
23109
|
ae(() => {
|
|
23107
23110
|
he && s >= e.length && u(e.length - 1);
|
|
23108
23111
|
}, [s, e.length, he]), ae(() => {
|
|
23109
23112
|
E(0), A([]);
|
|
23110
23113
|
}, [H]), ae(() => {
|
|
23111
|
-
const
|
|
23112
|
-
|
|
23114
|
+
const z = Z.current[w];
|
|
23115
|
+
z && z.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "center" });
|
|
23113
23116
|
}, [w]), ae(() => {
|
|
23114
23117
|
n !== void 0 && c(n);
|
|
23115
23118
|
}, [n]), ae(() => {
|
|
23116
|
-
if (!
|
|
23119
|
+
if (!j || !H) {
|
|
23117
23120
|
p(!1), S(null);
|
|
23118
23121
|
return;
|
|
23119
23122
|
}
|
|
@@ -23121,32 +23124,32 @@ function dk({
|
|
|
23121
23124
|
p(!1), S(null);
|
|
23122
23125
|
return;
|
|
23123
23126
|
}
|
|
23124
|
-
let
|
|
23125
|
-
return p(!0), S(null), Promise.resolve(
|
|
23126
|
-
if (!
|
|
23127
|
+
let z = !1;
|
|
23128
|
+
return p(!0), S(null), Promise.resolve(j.loadQuestions()).then((me) => {
|
|
23129
|
+
if (!z) {
|
|
23127
23130
|
if (!Array.isArray(me)) throw new Error(`loadQuestions("${H}") did not return an array`);
|
|
23128
23131
|
f((Ce) => ({ ...Ce, [H]: me }));
|
|
23129
23132
|
}
|
|
23130
23133
|
}).catch((me) => {
|
|
23131
|
-
|
|
23134
|
+
z || S(`Failed to load stage "${j?.title ?? ""}": ${me?.message ?? "Unknown error"}`);
|
|
23132
23135
|
}).finally(() => {
|
|
23133
|
-
|
|
23136
|
+
z || p(!1);
|
|
23134
23137
|
}), () => {
|
|
23135
|
-
|
|
23138
|
+
z = !0;
|
|
23136
23139
|
};
|
|
23137
|
-
}, [
|
|
23140
|
+
}, [j, H, d]);
|
|
23138
23141
|
const fe = H ? d[H] : void 0, oe = J(() => Hl(Nl(fe ?? [])), [fe]);
|
|
23139
23142
|
ae(() => {
|
|
23140
|
-
|
|
23143
|
+
j && H && fe && XT({
|
|
23141
23144
|
stageKey: H,
|
|
23142
|
-
stageTitle:
|
|
23145
|
+
stageTitle: j.title ?? H,
|
|
23143
23146
|
stepIndex: s + 1,
|
|
23144
23147
|
totalSteps: e.length
|
|
23145
23148
|
});
|
|
23146
|
-
}, [H, s, e.length,
|
|
23149
|
+
}, [H, s, e.length, j, fe]);
|
|
23147
23150
|
const V = J(() => {
|
|
23148
23151
|
if (!fe) return {};
|
|
23149
|
-
const
|
|
23152
|
+
const z = {};
|
|
23150
23153
|
((L) => {
|
|
23151
23154
|
const ue = [], B = (ne) => {
|
|
23152
23155
|
ne.forEach((te, de) => {
|
|
@@ -23161,22 +23164,22 @@ function dk({
|
|
|
23161
23164
|
};
|
|
23162
23165
|
return B(L), ue;
|
|
23163
23166
|
})(fe).forEach((L) => {
|
|
23164
|
-
L in l && (
|
|
23167
|
+
L in l && (z[L] = l[L]);
|
|
23165
23168
|
});
|
|
23166
23169
|
for (const L of ["state", "State", "address", "product"])
|
|
23167
|
-
L in l && (
|
|
23170
|
+
L in l && (z[L] = l[L]);
|
|
23168
23171
|
for (const [L, ue] of Object.entries(l))
|
|
23169
|
-
L.endsWith(o_) && !(L in
|
|
23170
|
-
return
|
|
23171
|
-
}, [fe, l]), ee = (
|
|
23172
|
-
c((me) => ({ ...me, ...
|
|
23172
|
+
L.endsWith(o_) && !(L in z) && (z[L] = ue);
|
|
23173
|
+
return z;
|
|
23174
|
+
}, [fe, l]), ee = (z) => {
|
|
23175
|
+
c((me) => ({ ...me, ...z }));
|
|
23173
23176
|
}, x = () => {
|
|
23174
|
-
u((
|
|
23175
|
-
}, D = (
|
|
23176
|
-
|
|
23177
|
+
u((z) => z > 0 ? z - 1 : 0), document.querySelector(".panel-body")?.scrollTo({ top: 0, behavior: "instant" });
|
|
23178
|
+
}, D = (z) => {
|
|
23179
|
+
z < 0 || z >= e.length || z > N || z === w || (u(z), document.querySelector(".panel-body")?.scrollTo({ top: 0, behavior: "instant" }));
|
|
23177
23180
|
}, v = async () => {
|
|
23178
|
-
if (!fe || !
|
|
23179
|
-
const
|
|
23181
|
+
if (!fe || !j || m || $ || g || k) return;
|
|
23182
|
+
const z = Mi(fe, V, H ?? void 0), me = ca(l, oe), Ce = z.map((ie) => Eo(ie, oe) ? { ...ie, required: me } : ie), L = Sa(Ce, V), ue = new Set(Ce.map((ie, pe) => Sr(ie, pe))), B = Object.entries(L).some(([ie, pe]) => pe && ue.has(ie)), ne = ck(fe, l, H ?? void 0), de = z.some((ie) => String(ie.key ?? "") === "vehicle_policy_selections") ? i_(l) : !1, le = l.driver_vehicle_assignments, ge = l.drivers__items ?? [];
|
|
23180
23183
|
let R = !1;
|
|
23181
23184
|
if (le && ge.length >= 2) {
|
|
23182
23185
|
const ie = l.vehicles__items ?? [];
|
|
@@ -23230,7 +23233,7 @@ function dk({
|
|
|
23230
23233
|
} finally {
|
|
23231
23234
|
b(!1);
|
|
23232
23235
|
}
|
|
23233
|
-
},
|
|
23236
|
+
}, W = J(() => !!(!fe || m || $ || g || k), [fe, m, $, g, k]), Y = e.length > 0 ? (w + 1) / e.length * 100 : 0, se = sk(H ?? "unknown-stage");
|
|
23234
23237
|
return he ? /* @__PURE__ */ T("div", { className: `form-wizard-shell form-wizard-shell--${se}`, "data-stage-key": H ?? void 0, children: [
|
|
23235
23238
|
H === "Vehicle" && q.suggestions && q.suggestions.length > 0 && /* @__PURE__ */ h(
|
|
23236
23239
|
Qf,
|
|
@@ -23267,12 +23270,12 @@ function dk({
|
|
|
23267
23270
|
style: { scrollbarWidth: "none", msOverflowStyle: "none" },
|
|
23268
23271
|
tabIndex: 0,
|
|
23269
23272
|
"aria-label": "Quote steps",
|
|
23270
|
-
children: e.flatMap((
|
|
23273
|
+
children: e.flatMap((z, me) => [
|
|
23271
23274
|
/* @__PURE__ */ h(
|
|
23272
23275
|
"li",
|
|
23273
23276
|
{
|
|
23274
23277
|
ref: (Ce) => {
|
|
23275
|
-
|
|
23278
|
+
Z.current[me] = Ce;
|
|
23276
23279
|
},
|
|
23277
23280
|
className: "flex-shrink-0",
|
|
23278
23281
|
children: /* @__PURE__ */ h(
|
|
@@ -23284,15 +23287,15 @@ function dk({
|
|
|
23284
23287
|
onClick: () => D(me),
|
|
23285
23288
|
disabled: me > N,
|
|
23286
23289
|
"aria-current": me === w ? "step" : void 0,
|
|
23287
|
-
"aria-label": `${
|
|
23288
|
-
children:
|
|
23290
|
+
"aria-label": `${z.title}, step ${me + 1} of ${e.length}${me > N ? ", not available yet" : ""}`,
|
|
23291
|
+
children: z.title
|
|
23289
23292
|
}
|
|
23290
23293
|
)
|
|
23291
23294
|
},
|
|
23292
|
-
|
|
23295
|
+
z.key ?? `stage-${me}`
|
|
23293
23296
|
),
|
|
23294
23297
|
...me < e.length - 1 ? [
|
|
23295
|
-
/* @__PURE__ */ h("li", { className: "form-wizard-step-arrow text-slate-400 flex-shrink-0", "aria-hidden": "true", children: "›" }, `arrow-${
|
|
23298
|
+
/* @__PURE__ */ h("li", { className: "form-wizard-step-arrow text-slate-400 flex-shrink-0", "aria-hidden": "true", children: "›" }, `arrow-${z.key ?? me}`)
|
|
23296
23299
|
] : []
|
|
23297
23300
|
])
|
|
23298
23301
|
}
|
|
@@ -23339,11 +23342,11 @@ function dk({
|
|
|
23339
23342
|
tabIndex: -1,
|
|
23340
23343
|
children: [
|
|
23341
23344
|
/* @__PURE__ */ h("p", { className: "font-semibold", children: "Please fix the following before continuing:" }),
|
|
23342
|
-
/* @__PURE__ */ h("ul", { className: "mt-2 list-disc space-y-1 pl-5", children: _.map((
|
|
23345
|
+
/* @__PURE__ */ h("ul", { className: "mt-2 list-disc space-y-1 pl-5", children: _.map((z, me) => /* @__PURE__ */ h("li", { children: z }, `${z}-${me}`)) })
|
|
23343
23346
|
]
|
|
23344
23347
|
}
|
|
23345
23348
|
),
|
|
23346
|
-
|
|
23349
|
+
j && !k && /* @__PURE__ */ h(
|
|
23347
23350
|
Jb,
|
|
23348
23351
|
{
|
|
23349
23352
|
questions: fe ?? [],
|
|
@@ -23354,19 +23357,19 @@ function dk({
|
|
|
23354
23357
|
widgetStageKey: H ?? void 0,
|
|
23355
23358
|
validationAttempt: y
|
|
23356
23359
|
},
|
|
23357
|
-
|
|
23360
|
+
j.key
|
|
23358
23361
|
),
|
|
23359
23362
|
!m && $ && /* @__PURE__ */ T("div", { className: "text-red-600 text-sm -mt-4", role: "alert", children: [
|
|
23360
23363
|
/* @__PURE__ */ h("div", { children: $ }),
|
|
23361
|
-
|
|
23364
|
+
j && /* @__PURE__ */ h(
|
|
23362
23365
|
"button",
|
|
23363
23366
|
{
|
|
23364
23367
|
type: "button",
|
|
23365
23368
|
className: "credify-retry-btn underline mt-1 font-bold",
|
|
23366
23369
|
onClick: () => {
|
|
23367
|
-
f((
|
|
23368
|
-
if (!H) return
|
|
23369
|
-
const me = { ...
|
|
23370
|
+
f((z) => {
|
|
23371
|
+
if (!H) return z;
|
|
23372
|
+
const me = { ...z };
|
|
23370
23373
|
return delete me[H], me;
|
|
23371
23374
|
});
|
|
23372
23375
|
},
|
|
@@ -23393,14 +23396,14 @@ function dk({
|
|
|
23393
23396
|
type: "button",
|
|
23394
23397
|
"data-widget-ctrl": "next",
|
|
23395
23398
|
onClick: v,
|
|
23396
|
-
disabled:
|
|
23399
|
+
disabled: W,
|
|
23397
23400
|
className: [
|
|
23398
23401
|
"form-wizard-next-btn",
|
|
23399
23402
|
w > 0 ? "" : "w-full",
|
|
23400
23403
|
"h-12 rounded-full text-white transition",
|
|
23401
23404
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
23402
23405
|
"flex items-center justify-center gap-2",
|
|
23403
|
-
|
|
23406
|
+
W ? "bg-gray-300" : "bg-blue-600 hover:bg-blue-600/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-600/40 bg-primary hover:bg-primary/90 focus-visible:ring-primary/40"
|
|
23404
23407
|
].join(" "),
|
|
23405
23408
|
children: [
|
|
23406
23409
|
g && /* @__PURE__ */ T("svg", { className: "animate-spin h-5 w-5 text-white", xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", children: [
|
|
@@ -23865,7 +23868,7 @@ function $k({
|
|
|
23865
23868
|
requirePursueVerification: o = !1,
|
|
23866
23869
|
onSubScreenChange: i
|
|
23867
23870
|
}) {
|
|
23868
|
-
const s = J(() => Array.isArray(e) ? e : [], [e]), u = s.length > 0, [l, c] = M({}), [d, f] = M("admitted"), [m, p] = M(!1), [g, b] = M(null), [$, S] = M(!1), [y, E] = M(null), [_, A] = M(!1), [N, K] = M(a), [F,
|
|
23871
|
+
const s = J(() => Array.isArray(e) ? e : [], [e]), u = s.length > 0, [l, c] = M({}), [d, f] = M("admitted"), [m, p] = M(!1), [g, b] = M(null), [$, S] = M(!1), [y, E] = M(null), [_, A] = M(!1), [N, K] = M(a), [F, Z] = M(""), [I, re] = M("phone"), [he, w] = M("idle"), [j, H] = M(null), P = !!(y || g);
|
|
23869
23872
|
ae(() => {
|
|
23870
23873
|
i?.(P);
|
|
23871
23874
|
}, [P, i]), ae(() => () => i?.(!1), [i]);
|
|
@@ -23880,10 +23883,10 @@ function $k({
|
|
|
23880
23883
|
ce && l[U.quote_rate_id] === "success" && R.add(ce);
|
|
23881
23884
|
}
|
|
23882
23885
|
return R;
|
|
23883
|
-
}, [s, l]), fe = J(() => Object.values(l).some((R) => R === "success"), [l]), oe = J(() => m ? !0 : !r || k.length === 0 ? fe : k.every((R) => Q.has(R)), [m, r, fe, k, Q]), V = J(() => u ? s.filter((R) => (R.admitted_status ?? "admitted") === "admitted") : [], [s, u]), ee = J(() => u ? s.filter((R) => R.admitted_status === "non_admitted") : [], [s, u]), x = J(() => u ? s.filter((R) => R.admitted_status === "not_quoted") : [], [s, u]), D = V.length, v = ee.length,
|
|
23886
|
+
}, [s, l]), fe = J(() => Object.values(l).some((R) => R === "success"), [l]), oe = J(() => m ? !0 : !r || k.length === 0 ? fe : k.every((R) => Q.has(R)), [m, r, fe, k, Q]), V = J(() => u ? s.filter((R) => (R.admitted_status ?? "admitted") === "admitted") : [], [s, u]), ee = J(() => u ? s.filter((R) => R.admitted_status === "non_admitted") : [], [s, u]), x = J(() => u ? s.filter((R) => R.admitted_status === "not_quoted") : [], [s, u]), D = V.length, v = ee.length, W = x.length, Y = D + v > 0, se = Y || W > 0, z = J(() => bk(x), [x]);
|
|
23884
23887
|
ae(() => {
|
|
23885
|
-
se && d === "admitted" && D === 0 && (v > 0 ? f("non_admitted") :
|
|
23886
|
-
}, [d, D, v,
|
|
23888
|
+
se && d === "admitted" && D === 0 && (v > 0 ? f("non_admitted") : W > 0 && f("not_quoted"));
|
|
23889
|
+
}, [d, D, v, W, se]);
|
|
23887
23890
|
const me = J(() => Y ? d === "admitted" ? V : d === "non_admitted" ? ee : [] : [], [Y, d, V, ee]), Ce = (R) => {
|
|
23888
23891
|
if (R.key !== "ArrowLeft" && R.key !== "ArrowRight" && R.key !== "Home" && R.key !== "End")
|
|
23889
23892
|
return;
|
|
@@ -23932,7 +23935,7 @@ function $k({
|
|
|
23932
23935
|
] });
|
|
23933
23936
|
const B = (R) => {
|
|
23934
23937
|
if (c((U) => ({ ...U, [R.quote_rate_id]: "idle" })), S(!1), wo(), !_ && (o || !Qt())) {
|
|
23935
|
-
K(a),
|
|
23938
|
+
K(a), Z(""), re("phone"), w("idle"), H(null), E({ cardKey: R.quote_rate_id, rate: R });
|
|
23936
23939
|
return;
|
|
23937
23940
|
}
|
|
23938
23941
|
b({ cardKey: R.quote_rate_id, rate: R });
|
|
@@ -24001,7 +24004,7 @@ function $k({
|
|
|
24001
24004
|
label: "What is your phone number?",
|
|
24002
24005
|
value: N,
|
|
24003
24006
|
onChange: (ie) => K(ie.currentTarget.value),
|
|
24004
|
-
error:
|
|
24007
|
+
error: j ?? void 0
|
|
24005
24008
|
}
|
|
24006
24009
|
),
|
|
24007
24010
|
/* @__PURE__ */ T("div", { className: "mt-3 text-xs text-slate-600 space-y-1", children: [
|
|
@@ -24033,8 +24036,8 @@ function $k({
|
|
|
24033
24036
|
pattern: "[0-9]*",
|
|
24034
24037
|
maxLength: 6,
|
|
24035
24038
|
autoComplete: "one-time-code",
|
|
24036
|
-
onChange: (ie) =>
|
|
24037
|
-
error:
|
|
24039
|
+
onChange: (ie) => Z(ie.currentTarget.value.replace(/\D+/g, "").slice(0, 6)),
|
|
24040
|
+
error: j ?? void 0
|
|
24038
24041
|
}
|
|
24039
24042
|
),
|
|
24040
24043
|
/* @__PURE__ */ h(Qb, { stageKey: "SMSVerification" }),
|
|
@@ -24111,7 +24114,7 @@ function $k({
|
|
|
24111
24114
|
]
|
|
24112
24115
|
}
|
|
24113
24116
|
),
|
|
24114
|
-
|
|
24117
|
+
W > 0 && /* @__PURE__ */ T(
|
|
24115
24118
|
"button",
|
|
24116
24119
|
{
|
|
24117
24120
|
id: Yt.not_quoted.tab,
|
|
@@ -24123,13 +24126,13 @@ function $k({
|
|
|
24123
24126
|
className: `border-b-2 px-1 py-2 text-sm font-semibold transition ${d === "not_quoted" ? "border-cyan-500 text-slate-900" : "border-transparent text-slate-500 hover:text-slate-800"}`,
|
|
24124
24127
|
children: [
|
|
24125
24128
|
"Not Quoted (",
|
|
24126
|
-
|
|
24129
|
+
W,
|
|
24127
24130
|
")"
|
|
24128
24131
|
]
|
|
24129
24132
|
}
|
|
24130
24133
|
)
|
|
24131
24134
|
] }) }),
|
|
24132
|
-
/* @__PURE__ */ h("div", { id: Yt[d].panel, role: "tabpanel", "aria-labelledby": Yt[d].tab, tabIndex: 0, children: d === "not_quoted" ?
|
|
24135
|
+
/* @__PURE__ */ h("div", { id: Yt[d].panel, role: "tabpanel", "aria-labelledby": Yt[d].tab, tabIndex: 0, children: d === "not_quoted" ? z.map((R) => /* @__PURE__ */ T("div", { className: "mt-6", children: [
|
|
24133
24136
|
R.lob != null && /* @__PURE__ */ h("h4", { className: "mb-3 text-center text-base font-semibold text-slate-800", children: R.title }),
|
|
24134
24137
|
/* @__PURE__ */ h("div", { className: "space-y-3", children: R.rates.map((U) => /* @__PURE__ */ h(vk, { item: U }, U.quote_rate_id)) })
|
|
24135
24138
|
] }, R.lob ?? "all")) : /* @__PURE__ */ T(Ct, { children: [
|
|
@@ -24523,15 +24526,15 @@ function Rk({ stages: e, initialValues: t, quoteId: r, isSubmitting: n, onConfir
|
|
|
24523
24526
|
for (const [ee, x] of Object.entries(u))
|
|
24524
24527
|
if (x.some((D) => String(D.key ?? "") === "vehicles")) return ee;
|
|
24525
24528
|
return null;
|
|
24526
|
-
}, [u]), [
|
|
24529
|
+
}, [u]), [Z, I] = M([]), [re, he] = M(!1), w = G(0), j = Ik(i), H = G(/* @__PURE__ */ new Map()), P = G(Promise.resolve()), q = Ee(
|
|
24527
24530
|
(ee) => {
|
|
24528
24531
|
const x = `${ee.year ?? ""}|${ee.make ?? ""}|${ee.model ?? ""}`, D = H.current, v = D.get(x);
|
|
24529
24532
|
if (v) return v;
|
|
24530
|
-
const
|
|
24533
|
+
const W = P.current.catch(() => {
|
|
24531
24534
|
}).then(() => qb({ quoteId: r, ...ee }));
|
|
24532
|
-
P.current =
|
|
24535
|
+
P.current = W.catch(() => {
|
|
24533
24536
|
});
|
|
24534
|
-
const Y =
|
|
24537
|
+
const Y = W.catch((se) => {
|
|
24535
24538
|
throw D.delete(x), se;
|
|
24536
24539
|
});
|
|
24537
24540
|
return D.set(x, Y), Y;
|
|
@@ -24539,7 +24542,7 @@ function Rk({ stages: e, initialValues: t, quoteId: r, isSubmitting: n, onConfir
|
|
|
24539
24542
|
[r]
|
|
24540
24543
|
);
|
|
24541
24544
|
ae(() => {
|
|
24542
|
-
if (!F || !
|
|
24545
|
+
if (!F || !j) {
|
|
24543
24546
|
I([]), he(!1);
|
|
24544
24547
|
return;
|
|
24545
24548
|
}
|
|
@@ -24553,24 +24556,24 @@ function Rk({ stages: e, initialValues: t, quoteId: r, isSubmitting: n, onConfir
|
|
|
24553
24556
|
});
|
|
24554
24557
|
}, Nk);
|
|
24555
24558
|
return () => window.clearTimeout(x);
|
|
24556
|
-
}, [F,
|
|
24559
|
+
}, [F, j, r, q]);
|
|
24557
24560
|
const C = J(() => {
|
|
24558
24561
|
const ee = {};
|
|
24559
24562
|
for (const x of o) {
|
|
24560
24563
|
const D = String(x.key), v = u[D];
|
|
24561
24564
|
v && (ee[D] = Sk({ stageKey: D, questions: v, values: i }));
|
|
24562
24565
|
}
|
|
24563
|
-
if (F && ee[F] &&
|
|
24566
|
+
if (F && ee[F] && Z.length > 0) {
|
|
24564
24567
|
const x = ee[F];
|
|
24565
24568
|
ee[F] = {
|
|
24566
24569
|
...x,
|
|
24567
|
-
errorsByKey: { ...x.errorsByKey, ...Object.fromEntries(
|
|
24568
|
-
issues: [...x.issues, ...
|
|
24570
|
+
errorsByKey: { ...x.errorsByKey, ...Object.fromEntries(Z.map((D) => [D.key, D.message])) },
|
|
24571
|
+
issues: [...x.issues, ...Z],
|
|
24569
24572
|
hasIssues: !0
|
|
24570
24573
|
};
|
|
24571
24574
|
}
|
|
24572
24575
|
return ee;
|
|
24573
|
-
}, [o, u, i, F,
|
|
24576
|
+
}, [o, u, i, F, Z]), k = J(() => Object.values(C).reduce((ee, x) => ee + x.issues.length, 0), [C]), Q = n || E, fe = !f && !c && k === 0 && b && !Q && !re, oe = Ee(() => {
|
|
24574
24577
|
const ee = o.find((x) => C[String(x.key)]?.hasIssues);
|
|
24575
24578
|
ee && document.getElementById(`review-section-${String(ee.key)}`)?.scrollIntoView({ behavior: "smooth", block: "start" });
|
|
24576
24579
|
}, [o, C]), V = Ee(async () => {
|
|
@@ -24755,8 +24758,8 @@ function Fk({
|
|
|
24755
24758
|
const I = 100, re = 100 / (s / I), he = setInterval(() => {
|
|
24756
24759
|
m((w) => {
|
|
24757
24760
|
if (N.current || A.current) return w;
|
|
24758
|
-
const
|
|
24759
|
-
return
|
|
24761
|
+
const j = w + re;
|
|
24762
|
+
return j < 100 ? j : (N.current = !0, setTimeout(() => {
|
|
24760
24763
|
if (S.current) {
|
|
24761
24764
|
if (A.current) return;
|
|
24762
24765
|
A.current = !0, y.current?.();
|
|
@@ -24775,7 +24778,7 @@ function Fk({
|
|
|
24775
24778
|
const I = Math.floor(s / ks.length), re = setInterval(() => g((he) => Math.min(he + 1, ks.length - 1)), I);
|
|
24776
24779
|
return () => clearInterval(re);
|
|
24777
24780
|
}, [u, s, e.length]);
|
|
24778
|
-
const K = e.length === 0, F = K ? null : e[Math.min(u, e.length - 1)],
|
|
24781
|
+
const K = e.length === 0, F = K ? null : e[Math.min(u, e.length - 1)], Z = c > 0;
|
|
24779
24782
|
return /* @__PURE__ */ T(Ct, { children: [
|
|
24780
24783
|
/* @__PURE__ */ h("style", { children: `
|
|
24781
24784
|
@keyframes providerPulse {
|
|
@@ -24881,7 +24884,7 @@ function Fk({
|
|
|
24881
24884
|
children: K ? "Connecting to top carriers" : "Fetching your best rates"
|
|
24882
24885
|
}
|
|
24883
24886
|
),
|
|
24884
|
-
/* @__PURE__ */ h("p", { style: { fontSize: 14, color: "#64748B", marginTop: 8, marginBottom: 0 }, children: K ? "Identifying the carriers eligible for your quote..." :
|
|
24887
|
+
/* @__PURE__ */ h("p", { style: { fontSize: 14, color: "#64748B", marginTop: 8, marginBottom: 0 }, children: K ? "Identifying the carriers eligible for your quote..." : Z ? "Still gathering — a few carriers are taking a little longer..." : "We're reaching out to multiple insurers on your behalf" })
|
|
24885
24888
|
] }),
|
|
24886
24889
|
/* @__PURE__ */ h("div", { style: { display: "flex", justifyContent: "center", marginBottom: 32 }, children: K ? (
|
|
24887
24890
|
// Skeleton dots during warm-up
|
|
@@ -25048,7 +25051,7 @@ function Fk({
|
|
|
25048
25051
|
textTransform: "uppercase",
|
|
25049
25052
|
margin: "0 0 4px"
|
|
25050
25053
|
},
|
|
25051
|
-
children:
|
|
25054
|
+
children: Z ? "Still checking" : "Now checking"
|
|
25052
25055
|
}
|
|
25053
25056
|
),
|
|
25054
25057
|
/* @__PURE__ */ h(
|
|
@@ -25427,7 +25430,7 @@ function uP(e) {
|
|
|
25427
25430
|
const n = [];
|
|
25428
25431
|
t.line_1 && n.push(t.line_1), t.line_2 && n.push(t.line_2), t.city && n.push(t.city), t.state && n.push(t.state), t.postal_code && n.push(t.postal_code), n.length > 0 && (r.address = n.join(", ")), typeof t.ssn_display == "string" && (r.ssn_display = t.ssn_display), t.years_at_address !== null && t.years_at_address !== void 0 && (r.years_at_address = t.years_at_address), t.months_at_address !== null && t.months_at_address !== void 0 && (r.months_at_address = t.months_at_address), t.move_in_date && (r.move_in_date = yt(t.move_in_date));
|
|
25429
25432
|
const a = [];
|
|
25430
|
-
t.prior_line_1 && a.push(t.prior_line_1), t.prior_line_2 && a.push(t.prior_line_2), t.prior_city && a.push(t.prior_city), t.prior_state && a.push(t.prior_state), t.prior_postal_code && a.push(t.prior_postal_code), a.length > 0 && (r.prior_address = a.join(", ")), t.years_at_prior_address !== null && t.years_at_prior_address !== void 0 && (r.years_at_prior_address = t.years_at_prior_address), t.is_mailing_address_different !== null && t.is_mailing_address_different !== void 0 && (r.is_mailing_address_different = De(t.is_mailing_address_different)), t.mailing_address && (r.mailing_address = t.mailing_address), t.effective_date && (r.effective_date = yt(t.effective_date)), t.auto_has_prior_insurance !== null && t.auto_has_prior_insurance !== void 0 && (r.auto_has_prior_insurance = De(t.auto_has_prior_insurance)), t.auto_prior_expiration_date && (r.auto_prior_expiration_date = yt(t.auto_prior_expiration_date)), t.auto_prior_carrier_name && (r.auto_prior_carrier_name = t.auto_prior_carrier_name), t.auto_prior_liability_limit && (r.auto_prior_liability_limit = t.auto_prior_liability_limit), t.auto_reason_for_no_insurance && (r.auto_reason_for_no_insurance = t.auto_reason_for_no_insurance), t.auto_prior_years !== null && t.auto_prior_years !== void 0 && (r.auto_prior_years = t.auto_prior_years), t.auto_prior_months !== null && t.auto_prior_months !== void 0 && (r.auto_prior_months = t.auto_prior_months), t.auto_continuous_coverage_years !== null && t.auto_continuous_coverage_years !== void 0 && (r.auto_continuous_coverage_years = t.auto_continuous_coverage_years), t.auto_cancelled_declined_refused_to_renew !== null && t.auto_cancelled_declined_refused_to_renew !== void 0 && (r.auto_cancelled_declined_refused_to_renew = De(t.auto_cancelled_declined_refused_to_renew)), t.auto_current_annual_premium_cents !== null && t.auto_current_annual_premium_cents !== void 0 && (r.auto_current_annual_premium_cents = t.auto_current_annual_premium_cents), t.policy_bi && (r.policy_bi = t.policy_bi), t.policy_um && (r.policy_um = t.policy_um), t.policy_pd && (r.policy_pd = t.policy_pd), t.policy_mp && (r.policy_mp = t.policy_mp), t.policy_umpd && (r.policy_umpd = t.policy_umpd), t.policy_pip && (r.policy_pip = t.policy_pip), t.policy_auto_death_indemnity && (r.policy_auto_death_indemnity = t.policy_auto_death_indemnity), t.driver_vehicle_assignments && (r.driver_vehicle_assignments = t.driver_vehicle_assignments), t.home_has_prior_insurance !== null && t.home_has_prior_insurance !== void 0 && (r.home_has_prior_insurance = De(t.home_has_prior_insurance)), t.home_prior_expiration_date && (r.home_prior_expiration_date = yt(t.home_prior_expiration_date)), t.home_prior_carrier_name && (r.home_prior_carrier_name = t.home_prior_carrier_name), t.home_prior_years !== null && t.home_prior_years !== void 0 && (r.home_prior_years = t.home_prior_years), t.home_continuous_coverage_years !== null && t.home_continuous_coverage_years !== void 0 && (r.home_continuous_coverage_years = t.home_continuous_coverage_years), t.property_insurance_cancelled !== null && t.property_insurance_cancelled !== void 0 && (r.property_insurance_cancelled = De(t.property_insurance_cancelled)), t.lapse_in_coverage !== null && t.lapse_in_coverage !== void 0 && (r.lapse_in_coverage = De(t.lapse_in_coverage)), t.year_built !== null && t.year_built !== void 0 && (r.year_built = t.year_built), t.number_of_units !== null && t.number_of_units !== void 0 && (r.number_of_units = t.number_of_units), t.number_of_stories !== null && t.number_of_stories !== void 0 && (r.number_of_stories = t.number_of_stories), t.number_of_beds !== null && t.number_of_beds !== void 0 && (r.number_of_beds = t.number_of_beds), t.number_of_full_baths !== null && t.number_of_full_baths !== void 0 && (r.number_of_full_baths = t.number_of_full_baths), t.number_of_partial_baths !== null && t.number_of_partial_baths !== void 0 && (r.number_of_partial_baths = t.number_of_partial_baths), t.under_construction !== null && t.under_construction !== void 0 && (r.under_construction = De(t.under_construction)), t.distance_from_fire_hydrant_ft && (r.distance_from_fire_hydrant_ft = t.distance_from_fire_hydrant_ft), t.distance_from_fire_station_miles && (r.distance_from_fire_station_miles = t.distance_from_fire_station_miles), t.architectural_style && (r.architectural_style = t.architectural_style), t.dwelling_type && (r.dwelling_type = t.dwelling_type), t.construction_quality && (r.construction_quality = t.construction_quality), t.located_over_water !== null && t.located_over_water !== void 0 && (r.located_over_water = t.located_over_water), t.construction_type && (r.construction_type = t.construction_type), t.exterior_wall_type && (r.exterior_wall_type = t.exterior_wall_type), t.foundation_type && (r.foundation_type = t.foundation_type), t.roof_material_type && (r.roof_material_type = t.roof_material_type), t.roof_shape && (r.roof_shape = t.roof_shape), t.roof_updated_type && (r.roof_updated_type = t.roof_updated_type), t.year_roof_updated !== null && t.year_roof_updated !== void 0 && (r.year_roof_updated = t.year_roof_updated), t.mit_credit_form !== null && t.mit_credit_form !== void 0 && (r.mit_credit_form = De(t.mit_credit_form)), t.storm_shutters !== null && t.storm_shutters !== void 0 && (r.storm_shutters = De(t.storm_shutters)), t.heating_type && (r.heating_type = t.heating_type), t.oil_tank_location && (r.oil_tank_location = t.oil_tank_location), t.heating_fuel_type && (r.heating_fuel_type = t.heating_fuel_type), t.number_of_fireplaces !== null && t.number_of_fireplaces !== void 0 && (r.number_of_fireplaces = t.number_of_fireplaces), t.basement_type && (r.basement_type = t.basement_type), t.parking_type && (r.parking_type = t.parking_type), t.number_of_parking_spaces !== null && t.number_of_parking_spaces !== void 0 && (r.number_of_parking_spaces = t.number_of_parking_spaces), t.plumbing_type && (r.plumbing_type = t.plumbing_type), t.pool_type && (r.pool_type = t.pool_type), t.total_area_sq_ft !== null && t.total_area_sq_ft !== void 0 && (r.total_area_sq_ft = t.total_area_sq_ft), t.parcel_area_sq_ft !== null && t.parcel_area_sq_ft !== void 0 && (r.parcel_area_sq_ft = t.parcel_area_sq_ft), t.residence_type && (r.residence_type = t.residence_type), t.usage_type && (r.usage_type = t.usage_type), t.household_size !== null && t.household_size !== void 0 && (r.household_size = t.household_size), t.number_of_mortgagees !== null && t.number_of_mortgagees !== void 0 && (r.number_of_mortgagees = t.number_of_mortgagees), t.has_dog !== null && t.has_dog !== void 0 && (r.has_dog = De(t.has_dog)), t.dog_breed_type && (r.dog_breed_type = t.dog_breed_type), t.number_of_dogs !== null && t.number_of_dogs !== void 0 && (r.number_of_dogs = t.number_of_dogs), t.has_vicious_animals !== null && t.has_vicious_animals !== void 0 && (r.has_vicious_animals = De(t.has_vicious_animals)), t.has_business_on_premises !== null && t.has_business_on_premises !== void 0 && (r.has_business_on_premises = De(t.has_business_on_premises)), t.business_class && (r.business_class = t.business_class), t.occupancy_type && (r.occupancy_type = t.occupancy_type), t.short_term_rental !== null && t.short_term_rental !== void 0 && (r.short_term_rental = De(t.short_term_rental)), t.sale_price_cents !== null && t.sale_price_cents !== void 0 && (r.sale_price_cents = Math.round(Number(t.sale_price_cents) / 100)), t.number_of_families !== null && t.number_of_families !== void 0 && (r.number_of_families = t.number_of_families), t.number_of_units_in_firewall !== null && t.number_of_units_in_firewall !== void 0 && (r.number_of_units_in_firewall = t.number_of_units_in_firewall), t.heating_update_yn !== null && t.heating_update_yn !== void 0 && (r.heating_update_yn = De(t.heating_update_yn)), t.heating_update_type && (r.heating_update_type = t.heating_update_type), t.heating_update_year !== null && t.heating_update_year !== void 0 && (r.heating_update_year = t.heating_update_year), t.plumbing_update_yn !== null && t.plumbing_update_yn !== void 0 && (r.plumbing_update_yn = De(t.plumbing_update_yn)), t.plumbing_update_type && (r.plumbing_update_type = t.plumbing_update_type), t.plumbing_update_year !== null && t.plumbing_update_year !== void 0 && (r.plumbing_update_year = t.plumbing_update_year), t.electrical_update_yn !== null && t.electrical_update_yn !== void 0 && (r.electrical_update_yn = De(t.electrical_update_yn)), t.electrical_update_type && (r.electrical_update_type = t.electrical_update_type), t.electrical_update_year !== null && t.electrical_update_year !== void 0 && (r.electrical_update_year = t.electrical_update_year), t.electric_circuit_breaker !== null && t.electric_circuit_breaker !== void 0 && (r.electric_circuit_breaker = De(t.electric_circuit_breaker)), t.dwelling_replacement_cost !== null && t.dwelling_replacement_cost !== void 0 && (r.dwelling_replacement_cost = t.dwelling_replacement_cost), t.other_structures_coverage !== null && t.other_structures_coverage !== void 0 && (r.other_structures_coverage = t.other_structures_coverage), t.personal_property_coverage !== null && t.personal_property_coverage !== void 0 && (r.personal_property_coverage = t.personal_property_coverage), t.loss_of_use_coverage !== null && t.loss_of_use_coverage !== void 0 && (r.loss_of_use_coverage = t.loss_of_use_coverage), t.personal_liability && (r.personal_liability = t.personal_liability), t.dwelling_medical_payments && (r.dwelling_medical_payments = t.dwelling_medical_payments), t.all_perils_deductible && (r.all_perils_deductible = t.all_perils_deductible), t.windstorm_deductible && (r.windstorm_deductible = t.windstorm_deductible), t.has_garage !== null && t.has_garage !== void 0 && (r.has_garage = De(t.has_garage)), t.has_pool !== null && t.has_pool !== void 0 && (r.has_pool = De(t.has_pool)), t.has_trampoline !== null && t.has_trampoline !== void 0 && (r.has_trampoline = De(t.has_trampoline)), t.gender && (r.gender = t.gender), t.marital_status && (r.marital_status = t.marital_status), t.employment_industry && (r.employment_industry = t.employment_industry), t.occupation && (r.occupation = t.occupation), t.has_co_applicant !== null && t.has_co_applicant !== void 0 && (r.has_co_applicant = De(t.has_co_applicant)), t.co_applicant_first_name && (r.co_applicant_first_name = t.co_applicant_first_name), t.co_applicant_middle_name && (r.co_applicant_middle_name = t.co_applicant_middle_name), t.co_applicant_last_name && (r.co_applicant_last_name = t.co_applicant_last_name), t.co_applicant_gender && (r.co_applicant_gender = t.co_applicant_gender), t.co_applicant_marital_status && (r.co_applicant_marital_status = t.co_applicant_marital_status), t.co_applicant_relationship && (r.co_applicant_relationship = t.co_applicant_relationship), t.co_applicant_date_of_birth && (r.co_applicant_date_of_birth = yt(t.co_applicant_date_of_birth)), t.co_applicant_employment_industry && (r.co_applicant_employment_industry = t.co_applicant_employment_industry), t.co_applicant_occupation && (r.co_applicant_occupation = t.co_applicant_occupation), t.retiree_discount !== null && t.retiree_discount !== void 0 && (r.retiree_discount = De(t.retiree_discount)), t.gated_community_discount !== null && t.gated_community_discount !== void 0 && (r.gated_community_discount = De(t.gated_community_discount)), t.multi_policy_discount !== null && t.multi_policy_discount !== void 0 && (r.multi_policy_discount = De(t.multi_policy_discount)), t.non_smoker_discount !== null && t.non_smoker_discount !== void 0 && (r.non_smoker_discount = De(t.non_smoker_discount)), t.first_time_buyer_discount !== null && t.first_time_buyer_discount !== void 0 && (r.first_time_buyer_discount = De(t.first_time_buyer_discount)), t.fire_detection_system !== null && t.fire_detection_system !== void 0 && (r.fire_detection_system = De(t.fire_detection_system)), t.burglar_alarm_system !== null && t.burglar_alarm_system !== void 0 && (r.burglar_alarm_system = De(t.burglar_alarm_system)), t.burglar_alarm_system_type && (r.burglar_alarm_system_type = t.burglar_alarm_system_type), t.smoke_detectors !== null && t.smoke_detectors !== void 0 && (r.smoke_detectors = De(t.smoke_detectors)), t.sprinkler_system !== null && t.sprinkler_system !== void 0 && (r.sprinkler_system = De(t.sprinkler_system)), t.sprinkler_system_type && (r.sprinkler_system_type = t.sprinkler_system_type), t.gas_leakage_detector !== null && t.gas_leakage_detector !== void 0 && (r.gas_leakage_detector = De(t.gas_leakage_detector)), t.deadbolt_locks !== null && t.deadbolt_locks !== void 0 && (r.deadbolt_locks = De(t.deadbolt_locks)), t.fire_extinguisher !== null && t.fire_extinguisher !== void 0 && (r.fire_extinguisher = De(t.fire_extinguisher)), t.order_credit_authorized !== null && t.order_credit_authorized !== void 0 && (r.order_credit_authorized = De(t.order_credit_authorized)), t.has_health_insurance_auto_accident !== null && t.has_health_insurance_auto_accident !== void 0 && (r.has_health_insurance_auto_accident = De(t.has_health_insurance_auto_accident)), t.is_corporation !== null && t.is_corporation !== void 0 && (r.is_corporation = De(t.is_corporation)), t.named_insured_foreclosure_repo_bankruptcy !== null && t.named_insured_foreclosure_repo_bankruptcy !== void 0 && (r.named_insured_foreclosure_repo_bankruptcy = De(t.named_insured_foreclosure_repo_bankruptcy)), t.named_insured_convicted_insurance_fraud !== null && t.named_insured_convicted_insurance_fraud !== void 0 && (r.named_insured_convicted_insurance_fraud = De(t.named_insured_convicted_insurance_fraud));
|
|
25433
|
+
t.prior_line_1 && a.push(t.prior_line_1), t.prior_line_2 && a.push(t.prior_line_2), t.prior_city && a.push(t.prior_city), t.prior_state && a.push(t.prior_state), t.prior_postal_code && a.push(t.prior_postal_code), a.length > 0 && (r.prior_address = a.join(", ")), t.years_at_prior_address !== null && t.years_at_prior_address !== void 0 && (r.years_at_prior_address = t.years_at_prior_address), t.is_mailing_address_different !== null && t.is_mailing_address_different !== void 0 && (r.is_mailing_address_different = De(t.is_mailing_address_different)), t.mailing_address && (r.mailing_address = t.mailing_address), t.effective_date && (r.effective_date = yt(t.effective_date)), t.auto_has_prior_insurance !== null && t.auto_has_prior_insurance !== void 0 && (r.auto_has_prior_insurance = De(t.auto_has_prior_insurance)), t.auto_prior_expiration_date && (r.auto_prior_expiration_date = yt(t.auto_prior_expiration_date)), t.auto_prior_carrier_name && (r.auto_prior_carrier_name = t.auto_prior_carrier_name), t.auto_prior_liability_limit && (r.auto_prior_liability_limit = t.auto_prior_liability_limit), t.auto_reason_for_no_insurance && (r.auto_reason_for_no_insurance = t.auto_reason_for_no_insurance), t.auto_prior_years !== null && t.auto_prior_years !== void 0 && (r.auto_prior_years = t.auto_prior_years), t.auto_prior_months !== null && t.auto_prior_months !== void 0 && (r.auto_prior_months = t.auto_prior_months), t.auto_continuous_coverage_years !== null && t.auto_continuous_coverage_years !== void 0 && (r.auto_continuous_coverage_years = t.auto_continuous_coverage_years), t.auto_cancelled_declined_refused_to_renew !== null && t.auto_cancelled_declined_refused_to_renew !== void 0 && (r.auto_cancelled_declined_refused_to_renew = De(t.auto_cancelled_declined_refused_to_renew)), t.auto_current_annual_premium_cents !== null && t.auto_current_annual_premium_cents !== void 0 && (r.auto_current_annual_premium_cents = t.auto_current_annual_premium_cents), t.policy_bi && (r.policy_bi = t.policy_bi), t.policy_um && (r.policy_um = t.policy_um), t.policy_pd && (r.policy_pd = t.policy_pd), t.policy_mp && (r.policy_mp = t.policy_mp), t.policy_umpd && (r.policy_umpd = t.policy_umpd), t.policy_pip && (r.policy_pip = t.policy_pip), t.policy_auto_death_indemnity && (r.policy_auto_death_indemnity = t.policy_auto_death_indemnity), t.driver_vehicle_assignments && (r.driver_vehicle_assignments = t.driver_vehicle_assignments), t.home_has_prior_insurance !== null && t.home_has_prior_insurance !== void 0 && (r.home_has_prior_insurance = De(t.home_has_prior_insurance)), t.home_prior_expiration_date && (r.home_prior_expiration_date = yt(t.home_prior_expiration_date)), t.home_prior_carrier_name && (r.home_prior_carrier_name = t.home_prior_carrier_name), t.home_prior_years !== null && t.home_prior_years !== void 0 && (r.home_prior_years = t.home_prior_years), t.home_continuous_coverage_years !== null && t.home_continuous_coverage_years !== void 0 && (r.home_continuous_coverage_years = t.home_continuous_coverage_years), t.property_insurance_cancelled !== null && t.property_insurance_cancelled !== void 0 && (r.property_insurance_cancelled = De(t.property_insurance_cancelled)), t.lapse_in_coverage !== null && t.lapse_in_coverage !== void 0 && (r.lapse_in_coverage = De(t.lapse_in_coverage)), t.year_built !== null && t.year_built !== void 0 && (r.year_built = t.year_built), t.number_of_units !== null && t.number_of_units !== void 0 && (r.number_of_units = t.number_of_units), t.number_of_stories !== null && t.number_of_stories !== void 0 && (r.number_of_stories = t.number_of_stories), t.number_of_beds !== null && t.number_of_beds !== void 0 && (r.number_of_beds = t.number_of_beds), t.number_of_full_baths !== null && t.number_of_full_baths !== void 0 && (r.number_of_full_baths = t.number_of_full_baths), t.number_of_partial_baths !== null && t.number_of_partial_baths !== void 0 && (r.number_of_partial_baths = t.number_of_partial_baths), t.under_construction !== null && t.under_construction !== void 0 && (r.under_construction = De(t.under_construction)), t.distance_from_fire_hydrant_ft && (r.distance_from_fire_hydrant_ft = t.distance_from_fire_hydrant_ft), t.distance_from_fire_station_miles && (r.distance_from_fire_station_miles = t.distance_from_fire_station_miles), t.architectural_style && (r.architectural_style = t.architectural_style), t.dwelling_type && (r.dwelling_type = t.dwelling_type), t.construction_quality && (r.construction_quality = t.construction_quality), t.located_over_water !== null && t.located_over_water !== void 0 && (r.located_over_water = t.located_over_water), t.construction_type && (r.construction_type = t.construction_type), t.exterior_wall_type && (r.exterior_wall_type = t.exterior_wall_type), t.foundation_type && (r.foundation_type = t.foundation_type), t.roof_material_type && (r.roof_material_type = t.roof_material_type), t.roof_shape && (r.roof_shape = t.roof_shape), t.roof_updated_type && (r.roof_updated_type = t.roof_updated_type), t.year_roof_updated !== null && t.year_roof_updated !== void 0 && (r.year_roof_updated = t.year_roof_updated), t.mit_credit_form !== null && t.mit_credit_form !== void 0 && (r.mit_credit_form = De(t.mit_credit_form)), t.storm_shutters !== null && t.storm_shutters !== void 0 && (r.storm_shutters = De(t.storm_shutters)), t.heating_type && (r.heating_type = t.heating_type), t.oil_tank_location && (r.oil_tank_location = t.oil_tank_location), t.heating_fuel_type && (r.heating_fuel_type = t.heating_fuel_type), t.number_of_fireplaces !== null && t.number_of_fireplaces !== void 0 && (r.number_of_fireplaces = t.number_of_fireplaces), t.basement_type && (r.basement_type = t.basement_type), t.parking_type && (r.parking_type = t.parking_type), t.garage_type && (r.garage_type = t.garage_type), t.number_of_parking_spaces !== null && t.number_of_parking_spaces !== void 0 && (r.number_of_parking_spaces = t.number_of_parking_spaces), t.plumbing_type && (r.plumbing_type = t.plumbing_type), t.pool_type && (r.pool_type = t.pool_type), t.total_area_sq_ft !== null && t.total_area_sq_ft !== void 0 && (r.total_area_sq_ft = t.total_area_sq_ft), t.parcel_area_sq_ft !== null && t.parcel_area_sq_ft !== void 0 && (r.parcel_area_sq_ft = t.parcel_area_sq_ft), t.residence_type && (r.residence_type = t.residence_type), t.usage_type && (r.usage_type = t.usage_type), t.household_size !== null && t.household_size !== void 0 && (r.household_size = t.household_size), t.number_of_mortgagees !== null && t.number_of_mortgagees !== void 0 && (r.number_of_mortgagees = t.number_of_mortgagees), t.has_dog !== null && t.has_dog !== void 0 && (r.has_dog = De(t.has_dog)), t.dog_breed_type && (r.dog_breed_type = t.dog_breed_type), t.number_of_dogs !== null && t.number_of_dogs !== void 0 && (r.number_of_dogs = t.number_of_dogs), t.has_vicious_animals !== null && t.has_vicious_animals !== void 0 && (r.has_vicious_animals = De(t.has_vicious_animals)), t.has_business_on_premises !== null && t.has_business_on_premises !== void 0 && (r.has_business_on_premises = De(t.has_business_on_premises)), t.business_class && (r.business_class = t.business_class), t.occupancy_type && (r.occupancy_type = t.occupancy_type), t.short_term_rental !== null && t.short_term_rental !== void 0 && (r.short_term_rental = De(t.short_term_rental)), t.sale_price_cents !== null && t.sale_price_cents !== void 0 && (r.sale_price_cents = Math.round(Number(t.sale_price_cents) / 100)), t.number_of_families !== null && t.number_of_families !== void 0 && (r.number_of_families = t.number_of_families), t.number_of_units_in_firewall !== null && t.number_of_units_in_firewall !== void 0 && (r.number_of_units_in_firewall = t.number_of_units_in_firewall), t.heating_update_yn !== null && t.heating_update_yn !== void 0 && (r.heating_update_yn = De(t.heating_update_yn)), t.heating_update_type && (r.heating_update_type = t.heating_update_type), t.heating_update_year !== null && t.heating_update_year !== void 0 && (r.heating_update_year = t.heating_update_year), t.plumbing_update_yn !== null && t.plumbing_update_yn !== void 0 && (r.plumbing_update_yn = De(t.plumbing_update_yn)), t.plumbing_update_type && (r.plumbing_update_type = t.plumbing_update_type), t.plumbing_update_year !== null && t.plumbing_update_year !== void 0 && (r.plumbing_update_year = t.plumbing_update_year), t.electrical_update_yn !== null && t.electrical_update_yn !== void 0 && (r.electrical_update_yn = De(t.electrical_update_yn)), t.electrical_update_type && (r.electrical_update_type = t.electrical_update_type), t.electrical_update_year !== null && t.electrical_update_year !== void 0 && (r.electrical_update_year = t.electrical_update_year), t.electric_circuit_breaker !== null && t.electric_circuit_breaker !== void 0 && (r.electric_circuit_breaker = De(t.electric_circuit_breaker)), t.dwelling_replacement_cost !== null && t.dwelling_replacement_cost !== void 0 && (r.dwelling_replacement_cost = t.dwelling_replacement_cost), t.other_structures_coverage !== null && t.other_structures_coverage !== void 0 && (r.other_structures_coverage = t.other_structures_coverage), t.personal_property_coverage !== null && t.personal_property_coverage !== void 0 && (r.personal_property_coverage = t.personal_property_coverage), t.loss_of_use_coverage !== null && t.loss_of_use_coverage !== void 0 && (r.loss_of_use_coverage = t.loss_of_use_coverage), t.personal_liability && (r.personal_liability = t.personal_liability), t.dwelling_medical_payments && (r.dwelling_medical_payments = t.dwelling_medical_payments), t.all_perils_deductible && (r.all_perils_deductible = t.all_perils_deductible), t.windstorm_deductible && (r.windstorm_deductible = t.windstorm_deductible), t.has_garage !== null && t.has_garage !== void 0 && (r.has_garage = De(t.has_garage)), t.has_pool !== null && t.has_pool !== void 0 && (r.has_pool = De(t.has_pool)), t.has_trampoline !== null && t.has_trampoline !== void 0 && (r.has_trampoline = De(t.has_trampoline)), t.gender && (r.gender = t.gender), t.marital_status && (r.marital_status = t.marital_status), t.employment_industry && (r.employment_industry = t.employment_industry), t.occupation && (r.occupation = t.occupation), t.has_co_applicant !== null && t.has_co_applicant !== void 0 && (r.has_co_applicant = De(t.has_co_applicant)), t.co_applicant_first_name && (r.co_applicant_first_name = t.co_applicant_first_name), t.co_applicant_middle_name && (r.co_applicant_middle_name = t.co_applicant_middle_name), t.co_applicant_last_name && (r.co_applicant_last_name = t.co_applicant_last_name), t.co_applicant_gender && (r.co_applicant_gender = t.co_applicant_gender), t.co_applicant_marital_status && (r.co_applicant_marital_status = t.co_applicant_marital_status), t.co_applicant_relationship && (r.co_applicant_relationship = t.co_applicant_relationship), t.co_applicant_date_of_birth && (r.co_applicant_date_of_birth = yt(t.co_applicant_date_of_birth)), t.co_applicant_employment_industry && (r.co_applicant_employment_industry = t.co_applicant_employment_industry), t.co_applicant_occupation && (r.co_applicant_occupation = t.co_applicant_occupation), t.retiree_discount !== null && t.retiree_discount !== void 0 && (r.retiree_discount = De(t.retiree_discount)), t.gated_community_discount !== null && t.gated_community_discount !== void 0 && (r.gated_community_discount = De(t.gated_community_discount)), t.multi_policy_discount !== null && t.multi_policy_discount !== void 0 && (r.multi_policy_discount = De(t.multi_policy_discount)), t.non_smoker_discount !== null && t.non_smoker_discount !== void 0 && (r.non_smoker_discount = De(t.non_smoker_discount)), t.first_time_buyer_discount !== null && t.first_time_buyer_discount !== void 0 && (r.first_time_buyer_discount = De(t.first_time_buyer_discount)), t.fire_detection_system !== null && t.fire_detection_system !== void 0 && (r.fire_detection_system = De(t.fire_detection_system)), t.fire_detection_system_type && (r.fire_detection_system_type = t.fire_detection_system_type), t.burglar_alarm_system !== null && t.burglar_alarm_system !== void 0 && (r.burglar_alarm_system = De(t.burglar_alarm_system)), t.burglar_alarm_system_type && (r.burglar_alarm_system_type = t.burglar_alarm_system_type), t.smoke_detectors !== null && t.smoke_detectors !== void 0 && (r.smoke_detectors = De(t.smoke_detectors)), t.sprinkler_system !== null && t.sprinkler_system !== void 0 && (r.sprinkler_system = De(t.sprinkler_system)), t.sprinkler_system_type && (r.sprinkler_system_type = t.sprinkler_system_type), t.gas_leakage_detector !== null && t.gas_leakage_detector !== void 0 && (r.gas_leakage_detector = De(t.gas_leakage_detector)), t.deadbolt_locks !== null && t.deadbolt_locks !== void 0 && (r.deadbolt_locks = De(t.deadbolt_locks)), t.fire_extinguisher !== null && t.fire_extinguisher !== void 0 && (r.fire_extinguisher = De(t.fire_extinguisher)), t.order_credit_authorized !== null && t.order_credit_authorized !== void 0 && (r.order_credit_authorized = De(t.order_credit_authorized)), t.has_health_insurance_auto_accident !== null && t.has_health_insurance_auto_accident !== void 0 && (r.has_health_insurance_auto_accident = De(t.has_health_insurance_auto_accident)), t.is_corporation !== null && t.is_corporation !== void 0 && (r.is_corporation = De(t.is_corporation)), t.named_insured_foreclosure_repo_bankruptcy !== null && t.named_insured_foreclosure_repo_bankruptcy !== void 0 && (r.named_insured_foreclosure_repo_bankruptcy = De(t.named_insured_foreclosure_repo_bankruptcy)), t.named_insured_convicted_insurance_fraud !== null && t.named_insured_convicted_insurance_fraud !== void 0 && (r.named_insured_convicted_insurance_fraud = De(t.named_insured_convicted_insurance_fraud));
|
|
25431
25434
|
const o = {};
|
|
25432
25435
|
if (t.vehicles)
|
|
25433
25436
|
for (const i of t.vehicles)
|
|
@@ -25564,7 +25567,7 @@ function gP({ isOpen: e, onClose: t }) {
|
|
|
25564
25567
|
ae(() => {
|
|
25565
25568
|
i.current = a;
|
|
25566
25569
|
}, [a]);
|
|
25567
|
-
const [s, u] = M(null), [l, c] = M(!1), [d, f] = M(!1), [m, p] = M(!1), [g, b] = M(!1), [$, S] = M([]), y = G(null), [E, _] = M(null), [A, N] = M(void 0), [K, F] = M(!1), [
|
|
25570
|
+
const [s, u] = M(null), [l, c] = M(!1), [d, f] = M(!1), [m, p] = M(!1), [g, b] = M(!1), [$, S] = M([]), y = G(null), [E, _] = M(null), [A, N] = M(void 0), [K, F] = M(!1), [Z, I] = M(null), [re, he] = M(null), [w, j] = M(!1), [H, P] = M(!1), [q, C] = M(!1), k = G(!1), Q = G(null), fe = G(null), oe = G(null), V = G(null), [ee, x] = M(!1);
|
|
25568
25571
|
ae(() => {
|
|
25569
25572
|
if (!m || g) return;
|
|
25570
25573
|
const B = vm(r);
|
|
@@ -25768,13 +25771,13 @@ function gP({ isOpen: e, onClose: t }) {
|
|
|
25768
25771
|
}, 0);
|
|
25769
25772
|
return () => window.clearTimeout(B);
|
|
25770
25773
|
}, [ee]), ae(() => {
|
|
25771
|
-
e || (_(null), N(void 0), F(!1), p(!1), he(null),
|
|
25774
|
+
e || (_(null), N(void 0), F(!1), p(!1), he(null), j(!1), x(!1));
|
|
25772
25775
|
}, [e]), ae(() => {
|
|
25773
25776
|
e && JT();
|
|
25774
25777
|
}, [e]), ae(() => {
|
|
25775
25778
|
s && Array.isArray(s) && tk({ rateCount: s.length });
|
|
25776
25779
|
}, [s]);
|
|
25777
|
-
const
|
|
25780
|
+
const W = Ee(() => {
|
|
25778
25781
|
I(null), N(Math.max(0, r.length - 1));
|
|
25779
25782
|
}, [r.length]), Y = Ee(
|
|
25780
25783
|
async (B, ne) => {
|
|
@@ -25818,26 +25821,26 @@ function gP({ isOpen: e, onClose: t }) {
|
|
|
25818
25821
|
), se = Ee(
|
|
25819
25822
|
async (B) => {
|
|
25820
25823
|
if (!(!re || !a || w)) {
|
|
25821
|
-
|
|
25824
|
+
j(!0);
|
|
25822
25825
|
try {
|
|
25823
25826
|
const te = { ...Ur(re.allValues), communications_consent: B };
|
|
25824
25827
|
he(null), await Y(te, "consent_submit");
|
|
25825
25828
|
} finally {
|
|
25826
|
-
|
|
25829
|
+
j(!1);
|
|
25827
25830
|
}
|
|
25828
25831
|
}
|
|
25829
25832
|
},
|
|
25830
25833
|
[re, a, w, Y]
|
|
25831
|
-
),
|
|
25834
|
+
), z = Ee(
|
|
25832
25835
|
async (B) => {
|
|
25833
25836
|
if (!(!a || w)) {
|
|
25834
|
-
|
|
25837
|
+
j(!0);
|
|
25835
25838
|
try {
|
|
25836
25839
|
_(B);
|
|
25837
25840
|
const ne = { ...Ur(B), customer_review_confirmed: !0 };
|
|
25838
25841
|
await Y(ne, "review_submit");
|
|
25839
25842
|
} finally {
|
|
25840
|
-
|
|
25843
|
+
j(!1);
|
|
25841
25844
|
}
|
|
25842
25845
|
}
|
|
25843
25846
|
},
|
|
@@ -25865,13 +25868,13 @@ function gP({ isOpen: e, onClose: t }) {
|
|
|
25865
25868
|
/* @__PURE__ */ T(
|
|
25866
25869
|
"div",
|
|
25867
25870
|
{
|
|
25868
|
-
className: `modal-panel bg-white relative w-full flex flex-col max-h-[90vh] overflow-hidden ${!!(!
|
|
25871
|
+
className: `modal-panel bg-white relative w-full flex flex-col max-h-[90vh] overflow-hidden ${!!(!Z && s && a && !l) ? "max-w-6xl" : "max-w-2xl"}`,
|
|
25869
25872
|
role: "document",
|
|
25870
25873
|
children: [
|
|
25871
25874
|
/* @__PURE__ */ h("h2", { id: "insurance-modal-title", className: "sr-only", children: "Credify insurance quote widget" }),
|
|
25872
25875
|
/* @__PURE__ */ h("button", { onClick: me, className: "modal-close-btn absolute top-4 right-4", "aria-label": "Close quote form", type: "button", children: /* @__PURE__ */ h("span", { "aria-hidden": "true", children: "×" }) }),
|
|
25873
|
-
!m && !
|
|
25874
|
-
/* @__PURE__ */ T("div", { className: "panel-body flex-1 min-h-0 overflow-
|
|
25876
|
+
!m && !Z && /* @__PURE__ */ h("div", { className: "widget-modal-header text-center", children: /* @__PURE__ */ h("h2", { className: "h1-title", children: "Let's shop multiple leading carriers for you" }) }),
|
|
25877
|
+
/* @__PURE__ */ T("div", { className: "panel-body flex-1 min-h-0 overflow-y-auto", children: [
|
|
25875
25878
|
H && /* @__PURE__ */ T(
|
|
25876
25879
|
"div",
|
|
25877
25880
|
{
|
|
@@ -25892,8 +25895,8 @@ function gP({ isOpen: e, onClose: t }) {
|
|
|
25892
25895
|
]
|
|
25893
25896
|
}
|
|
25894
25897
|
),
|
|
25895
|
-
|
|
25896
|
-
!
|
|
25898
|
+
Z && /* @__PURE__ */ h(f_, { onGoBack: W }),
|
|
25899
|
+
!Z && m && (() => {
|
|
25897
25900
|
const B = vm(r);
|
|
25898
25901
|
return /* @__PURE__ */ h(
|
|
25899
25902
|
Fk,
|
|
@@ -25908,15 +25911,15 @@ function gP({ isOpen: e, onClose: t }) {
|
|
|
25908
25911
|
}
|
|
25909
25912
|
);
|
|
25910
25913
|
})(),
|
|
25911
|
-
!
|
|
25912
|
-
!
|
|
25914
|
+
!Z && !m && re && /* @__PURE__ */ h(zw, { onChoose: se, isSubmitting: w }),
|
|
25915
|
+
!Z && !s && !m && !re && /* @__PURE__ */ h(Ct, { children: K || r.length === 0 ? /* @__PURE__ */ h("div", { className: "flex items-center justify-center py-12", children: /* @__PURE__ */ h("div", { className: "text-slate-600", children: "Loading..." }) }) : q && a ? /* @__PURE__ */ h(
|
|
25913
25916
|
Rk,
|
|
25914
25917
|
{
|
|
25915
25918
|
stages: r,
|
|
25916
25919
|
initialValues: E ?? {},
|
|
25917
25920
|
quoteId: a,
|
|
25918
25921
|
isSubmitting: w,
|
|
25919
|
-
onConfirmed:
|
|
25922
|
+
onConfirmed: z
|
|
25920
25923
|
}
|
|
25921
25924
|
) : /* @__PURE__ */ h(
|
|
25922
25925
|
dk,
|
|
@@ -26021,7 +26024,7 @@ function gP({ isOpen: e, onClose: t }) {
|
|
|
26021
26024
|
}
|
|
26022
26025
|
) }),
|
|
26023
26026
|
" ",
|
|
26024
|
-
!
|
|
26027
|
+
!Z && s && a && /* @__PURE__ */ h(
|
|
26025
26028
|
$k,
|
|
26026
26029
|
{
|
|
26027
26030
|
rates: s,
|
|
@@ -26075,7 +26078,7 @@ function bP({ isOpen: e }) {
|
|
|
26075
26078
|
const t = () => __.close();
|
|
26076
26079
|
return /* @__PURE__ */ h(tl, { fallback: /* @__PURE__ */ h(yP, { onClose: t }), children: /* @__PURE__ */ h(gP, { isOpen: e, onClose: t }) });
|
|
26077
26080
|
}
|
|
26078
|
-
var Is = { dsn: "", environment: "production", release: "
|
|
26081
|
+
var Is = { dsn: "", environment: "production", release: "c17815f0e3c1103e5daecd58a5cd0ecf718a2daf" };
|
|
26079
26082
|
function _P() {
|
|
26080
26083
|
try {
|
|
26081
26084
|
return typeof Is < "u" && Is ? Is : {};
|