@getcredify/credify-insurance-widget 1.44.1 → 1.45.0
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/README.md +1 -1
- package/dist/{address-BEVwov8q-DDhbGo15.js → address-BEVwov8q-BHA-1zzm.js} +1 -1
- package/dist/api-BLmgLEy-.js +51 -0
- package/dist/{car-B83tx4O2.js → car-B8Sfr377.js} +1 -1
- package/dist/{check-Bu17NqRV.js → check-B8qTJ1zD.js} +1 -1
- package/dist/{copy-applicant-offer-CqzfNhkJ-DLXjbOLT.js → copy-applicant-offer-BPo842pD-COcsLcbo.js} +3 -3
- package/dist/{copy-from-record-BNP6CFFR-6SC1msxp.js → copy-from-record-DL503itm-B05F775l.js} +10 -10
- package/dist/{coverageDerivation-CV2ORogj-De8x_Bpm.js → coverageDerivation-CV2ORogj-D4IAkVAP.js} +1 -1
- package/dist/{fixtures-ijbZ16Zg-9n-90hL2.js → fixtures-ijbZ16Zg-CB6WPBEx.js} +1 -1
- package/dist/{household-prefill-CmtB9R3R-Bw0M1Q50.js → household-prefill-DJ-Y0NcP-TwmnYrqf.js} +30 -30
- package/dist/{householdPrefill-DLm3pxFH-BQibTi9l.js → householdPrefill-DLm3pxFH-Gudko0w4.js} +1 -1
- package/dist/iframe/assets/{address-BEVwov8q-BiiIpq2c.js → address-BEVwov8q-RcBegFnh.js} +1 -1
- package/dist/iframe/assets/{car-cifgdWXX.js → car-DQIQf4LA.js} +1 -1
- package/dist/iframe/assets/{check-TbHiw7rw.js → check-BiNh2j82.js} +1 -1
- package/dist/iframe/assets/{copy-applicant-offer-CqzfNhkJ-CVahKn8I.js → copy-applicant-offer-BPo842pD-Cj352DzN.js} +1 -1
- package/dist/iframe/assets/{copy-from-record-BNP6CFFR-Cn7Nr7XT.js → copy-from-record-DL503itm-B7hBbUhh.js} +2 -2
- package/dist/iframe/assets/{coverageDerivation-CV2ORogj-B7aNPljp.js → coverageDerivation-CV2ORogj-D3oRqD1U.js} +1 -1
- package/dist/iframe/assets/{dob-calendar-RIJ5S6YU-CdxMGaLz.js → dob-calendar-RIJ5S6YU-vOGgSHSK.js} +1 -1
- package/dist/iframe/assets/{fixtures-ijbZ16Zg-NuD06-4v.js → fixtures-ijbZ16Zg-BmEw6uDw.js} +1 -1
- package/dist/iframe/assets/household-prefill-DJ-Y0NcP-z6AnkJcR.js +1 -0
- package/dist/iframe/assets/{householdPrefill-DLm3pxFH-DzyOYQr_.js → householdPrefill-DLm3pxFH-BZXueCa7.js} +1 -1
- package/dist/iframe/assets/iframe-ku_diR98.js +107 -0
- package/dist/iframe/assets/{index-BknEWAR5.js → index-IiQzPjFm.js} +2 -2
- package/dist/iframe/assets/intake-review-panel-CWz2efw4-CP-sEc-j.js +1 -0
- package/dist/iframe/assets/{mockJump-hNzgzUmO-CQ7eZ354.js → mockJump-H1NFTDah-yzeq4yea.js} +1 -1
- package/dist/iframe/assets/payload-CQc06PZC-BxklUdmW.js +1 -0
- package/dist/iframe/assets/{question-list-DFjWa8ZA-DbabOwyP.js → question-list-CcoyuyQD-DCzTkzeE.js} +11 -11
- package/dist/iframe/assets/rates-panel-MXCbnqpL-TFkvW-DN.js +17 -0
- package/dist/iframe/assets/{review-panel-C_WxX33U-CxzpQutt.js → review-panel-CFVxGU7F-CqUUCDLK.js} +2 -2
- package/dist/iframe/assets/stage-BSRsu--X-BAWfI2cm.js +1 -0
- package/dist/iframe/assets/validation-ELW00AsL-ytOMlsxG.js +3 -0
- package/dist/iframe/assets/{vehicleCoverage-CBWORI1l-BqOK33e3.js → vehicleCoverage-DI2dKrnI-DVXwPfxd.js} +1 -1
- package/dist/iframe/assets/{visibility-CKRGC3Il-CLpoN3cd.js → visibility-CyRoLvg5-CxslMJYX.js} +1 -1
- package/dist/iframe/assets/waves-vdL6w3zC.js +16 -0
- package/dist/iframe/iframe.html +1 -1
- package/dist/{index-CY0roJE_.js → index-IZRzz1Mi.js} +1 -1
- package/dist/index.es.js +1 -1
- package/dist/index.umd.js +103 -103
- package/dist/{intake-review-panel-D27t8CZO-CxiXytFS.js → intake-review-panel-CWz2efw4-BQ-Nog4K.js} +27 -27
- package/dist/{mockJump-hNzgzUmO-CsTzthio.js → mockJump-H1NFTDah-CkqZVQxf.js} +1 -1
- package/dist/{payload-DrGFAxms-DmfWvvu_.js → payload-CQc06PZC-KA6cBCno.js} +26 -26
- package/dist/{question-list-DFjWa8ZA-B8f7Jf6J.js → question-list-CcoyuyQD-_c4J4n0G.js} +51 -51
- package/dist/rates-panel-MXCbnqpL-DGYBAFto.js +1323 -0
- package/dist/{review-panel-C_WxX33U-CZu6We48.js → review-panel-CFVxGU7F-CtO3WmnD.js} +51 -51
- package/dist/stage-BSRsu--X-DJs8ps3K.js +197 -0
- package/dist/utils/prefill.d.ts +2 -4
- package/dist/{validation-D42QXxck-BPUVtzkv.js → validation-ELW00AsL-C4xgPdbr.js} +341 -343
- package/dist/{vehicleCoverage-CBWORI1l-DZmjvVjU.js → vehicleCoverage-DI2dKrnI-Lq9BCjQm.js} +3 -3
- package/dist/{visibility-CKRGC3Il-_72Koc98.js → visibility-CyRoLvg5-DNRgF2sH.js} +6 -6
- package/dist/waves-DM8Lgssk.js +71 -0
- package/dist/{widget-CP6ApixH.js → widget-3S1xkGig.js} +2972 -2827
- package/package.json +2 -2
- package/dist/api-CWMwIjKu.js +0 -51
- package/dist/core-CrEw_I-E-CsRUhlZy.js +0 -417
- package/dist/iframe/assets/core-CrEw_I-E-DJNj5Zzo.js +0 -16
- package/dist/iframe/assets/household-prefill-CmtB9R3R-0b9HYzDA.js +0 -1
- package/dist/iframe/assets/iframe-Be9NY0jq.js +0 -107
- package/dist/iframe/assets/intake-review-panel-D27t8CZO-QuAzDm1O.js +0 -1
- package/dist/iframe/assets/payload-DrGFAxms-DIGXNw5l.js +0 -1
- package/dist/iframe/assets/rates-panel-BSFiWEZX-GsRBXu7R.js +0 -17
- package/dist/iframe/assets/stage-knShj71W-CEkRTdvw.js +0 -1
- package/dist/iframe/assets/validation-D42QXxck-DrIBn9be.js +0 -3
- package/dist/rates-panel-BSFiWEZX-DdETQZ83.js +0 -1001
- package/dist/stage-knShj71W-XIJ7bUoN.js +0 -197
|
@@ -2,12 +2,12 @@ var Ce = (n) => {
|
|
|
2
2
|
throw TypeError(n);
|
|
3
3
|
};
|
|
4
4
|
var be = (n, o, e) => o.has(n) || Ce("Cannot " + e);
|
|
5
|
-
var w = (n, o, e) => (be(n, o, "read from private field"), e ? e.call(n) : o.get(n)), xe = (n, o, e) => o.has(n) ? Ce("Cannot add the same private member more than once") : o instanceof WeakSet ? o.add(n) : o.set(n, e),
|
|
6
|
-
import { a4 as He, ag as
|
|
7
|
-
import { o as Ue, n as We, r as
|
|
5
|
+
var w = (n, o, e) => (be(n, o, "read from private field"), e ? e.call(n) : o.get(n)), xe = (n, o, e) => o.has(n) ? Ce("Cannot add the same private member more than once") : o instanceof WeakSet ? o.add(n) : o.set(n, e), Q = (n, o, e, t) => (be(n, o, "write to private field"), t ? t.call(n, e) : o.set(n, e), e);
|
|
6
|
+
import { a4 as He, ag as L, ah as K, t as Be, K as ye, G as Re, U as Fe, ai as Ge, L as te } from "./widget-3S1xkGig.js";
|
|
7
|
+
import { o as Ue, n as We, r as Ye } from "./stage-BSRsu--X-DJs8ps3K.js";
|
|
8
8
|
import * as l from "react";
|
|
9
|
-
import { jsx as i, jsxs as M, Fragment as
|
|
10
|
-
import { c as q, u as oe, a as we, P as z, b as Ne, d as
|
|
9
|
+
import { jsx as i, jsxs as M, Fragment as Je } from "react/jsx-runtime";
|
|
10
|
+
import { c as q, u as oe, a as we, P as z, b as Ne, d as Qe, e as Xe, C as Ze } from "./index-IZRzz1Mi.js";
|
|
11
11
|
(function() {
|
|
12
12
|
if (typeof n > "u")
|
|
13
13
|
var n = { env: {} };
|
|
@@ -41,14 +41,14 @@ function _e(n) {
|
|
|
41
41
|
c.displayName = o;
|
|
42
42
|
const d = n + "CollectionSlot", f = K(d), p = l.forwardRef(
|
|
43
43
|
(b, v) => {
|
|
44
|
-
const { scope: I, children: A } = b, u = r(d, I), m =
|
|
44
|
+
const { scope: I, children: A } = b, u = r(d, I), m = L(v, u.collectionRef);
|
|
45
45
|
return /* @__PURE__ */ i(f, { ref: m, children: A });
|
|
46
46
|
}
|
|
47
47
|
);
|
|
48
48
|
p.displayName = d;
|
|
49
49
|
const a = n + "CollectionItemSlot", h = "data-radix-collection-item", g = K(a), N = l.forwardRef(
|
|
50
50
|
(b, v) => {
|
|
51
|
-
const { scope: I, children: A, ...u } = b, m = l.useRef(null), E =
|
|
51
|
+
const { scope: I, children: A, ...u } = b, m = l.useRef(null), E = L(v, m), _ = r(a, I);
|
|
52
52
|
return l.useEffect(() => (_.itemMap.set(m, { ref: m, ...u }), () => void _.itemMap.delete(m))), /* @__PURE__ */ i(g, { [h]: "", ref: E, children: A });
|
|
53
53
|
}
|
|
54
54
|
);
|
|
@@ -71,11 +71,11 @@ function _e(n) {
|
|
|
71
71
|
];
|
|
72
72
|
}
|
|
73
73
|
y(_e, "createCollection");
|
|
74
|
-
var Ie = /* @__PURE__ */ new WeakMap(), x, S,
|
|
74
|
+
var Ie = /* @__PURE__ */ new WeakMap(), x, S, X = (S = class extends Map {
|
|
75
75
|
constructor(e) {
|
|
76
76
|
super(e);
|
|
77
77
|
xe(this, x);
|
|
78
|
-
|
|
78
|
+
Q(this, x, [...super.keys()]), Ie.set(this, !0);
|
|
79
79
|
}
|
|
80
80
|
set(e, t) {
|
|
81
81
|
return Ie.get(this) && (this.has(e) ? w(this, x)[w(this, x).indexOf(e)] = e : w(this, x).push(e)), super.set(e, t), this;
|
|
@@ -136,7 +136,7 @@ var Ie = /* @__PURE__ */ new WeakMap(), x, S, J = (S = class extends Map {
|
|
|
136
136
|
return this.entryAt(-1);
|
|
137
137
|
}
|
|
138
138
|
clear() {
|
|
139
|
-
return
|
|
139
|
+
return Q(this, x, []), super.clear();
|
|
140
140
|
}
|
|
141
141
|
delete(e) {
|
|
142
142
|
const t = super.delete(e);
|
|
@@ -294,7 +294,7 @@ function nt(n) {
|
|
|
294
294
|
collectionElement: null,
|
|
295
295
|
collectionRef: { current: null },
|
|
296
296
|
collectionRefObject: { current: null },
|
|
297
|
-
itemMap: new
|
|
297
|
+
itemMap: new X(),
|
|
298
298
|
setItemMap: /* @__PURE__ */ y(() => {
|
|
299
299
|
}, "setItemMap")
|
|
300
300
|
}
|
|
@@ -308,23 +308,23 @@ function nt(n) {
|
|
|
308
308
|
const f = /* @__PURE__ */ y((u) => {
|
|
309
309
|
const { scope: m, children: E, state: _ } = u, P = l.useRef(null), [k, R] = l.useState(
|
|
310
310
|
null
|
|
311
|
-
), U =
|
|
311
|
+
), U = L(P, R), [W, Y] = _;
|
|
312
312
|
return l.useEffect(() => {
|
|
313
313
|
if (!k) return;
|
|
314
|
-
const
|
|
314
|
+
const $ = Ee(() => {
|
|
315
315
|
});
|
|
316
|
-
return
|
|
316
|
+
return $.observe(k, {
|
|
317
317
|
childList: !0,
|
|
318
318
|
subtree: !0
|
|
319
319
|
}), () => {
|
|
320
|
-
|
|
320
|
+
$.disconnect();
|
|
321
321
|
};
|
|
322
322
|
}, [k]), /* @__PURE__ */ i(
|
|
323
323
|
s,
|
|
324
324
|
{
|
|
325
325
|
scope: m,
|
|
326
326
|
itemMap: W,
|
|
327
|
-
setItemMap:
|
|
327
|
+
setItemMap: Y,
|
|
328
328
|
collectionRef: U,
|
|
329
329
|
collectionRefObject: P,
|
|
330
330
|
collectionElement: k,
|
|
@@ -335,27 +335,27 @@ function nt(n) {
|
|
|
335
335
|
f.displayName = o + "Impl";
|
|
336
336
|
const p = n + "CollectionSlot", a = K(p), h = l.forwardRef(
|
|
337
337
|
(u, m) => {
|
|
338
|
-
const { scope: E, children: _ } = u, P = r(p, E), k =
|
|
338
|
+
const { scope: E, children: _ } = u, P = r(p, E), k = L(m, P.collectionRef);
|
|
339
339
|
return /* @__PURE__ */ i(a, { ref: k, children: _ });
|
|
340
340
|
}
|
|
341
341
|
);
|
|
342
342
|
h.displayName = p;
|
|
343
343
|
const g = n + "CollectionItemSlot", N = "data-radix-collection-item", C = K(g), b = l.forwardRef(
|
|
344
344
|
(u, m) => {
|
|
345
|
-
const { scope: E, children: _, ...P } = u, k = l.useRef(null), [R, U] = l.useState(null), W =
|
|
346
|
-
Se(
|
|
347
|
-
const ge =
|
|
345
|
+
const { scope: E, children: _, ...P } = u, k = l.useRef(null), [R, U] = l.useState(null), W = L(m, k, U), Y = r(g, E), { setItemMap: $ } = Y, J = l.useRef(P);
|
|
346
|
+
Se(J.current, P) || (J.current = P);
|
|
347
|
+
const ge = J.current;
|
|
348
348
|
return l.useEffect(() => {
|
|
349
349
|
const ve = ge;
|
|
350
|
-
return
|
|
351
|
-
|
|
350
|
+
return $((T) => R ? T.has(R) ? T.set(R, { ...ve, element: R }).toSorted(Z) : (T.set(R, { ...ve, element: R }), T.toSorted(Z)) : T), () => {
|
|
351
|
+
$((T) => !R || !T.has(R) ? T : (T.delete(R), new X(T)));
|
|
352
352
|
};
|
|
353
|
-
}, [R, ge,
|
|
353
|
+
}, [R, ge, $]), /* @__PURE__ */ i(C, { [N]: "", ref: W, children: _ });
|
|
354
354
|
}
|
|
355
355
|
);
|
|
356
356
|
b.displayName = g;
|
|
357
357
|
function v() {
|
|
358
|
-
return l.useState(new
|
|
358
|
+
return l.useState(new X());
|
|
359
359
|
}
|
|
360
360
|
y(v, "useInitCollection");
|
|
361
361
|
function I(u) {
|
|
@@ -464,14 +464,14 @@ var it = Object.defineProperty, j = (n, o) => it(n, "name", { value: o, configur
|
|
|
464
464
|
// blank line to reduce diff noise
|
|
465
465
|
/* @__PURE__ */ j(function(o, e) {
|
|
466
466
|
const { forceMount: t, ...s } = o, r = se(Te, o.__scopeCollapsible);
|
|
467
|
-
return /* @__PURE__ */ i(
|
|
467
|
+
return /* @__PURE__ */ i(Qe, { present: t || r.open, children: ({ present: c }) => /* @__PURE__ */ i(ht, { ...s, ref: e, present: c }) });
|
|
468
468
|
}, "CollapsibleContent")
|
|
469
469
|
), ht = /* @__PURE__ */ l.forwardRef(/* @__PURE__ */ j(function(o, e) {
|
|
470
|
-
const { __scopeCollapsible: t, present: s, children: r, ...c } = o, d = se(Te, t), [f, p] = l.useState(s), a = l.useRef(null), h =
|
|
470
|
+
const { __scopeCollapsible: t, present: s, children: r, ...c } = o, d = se(Te, t), [f, p] = l.useState(s), a = l.useRef(null), h = L(e, a), g = l.useRef(0), N = g.current, C = l.useRef(0), b = C.current, v = d.open || f, I = l.useRef(v), A = l.useRef(void 0);
|
|
471
471
|
return l.useEffect(() => {
|
|
472
472
|
const u = requestAnimationFrame(() => I.current = !1);
|
|
473
473
|
return () => cancelAnimationFrame(u);
|
|
474
|
-
}, []),
|
|
474
|
+
}, []), Xe(() => {
|
|
475
475
|
const u = a.current;
|
|
476
476
|
if (u) {
|
|
477
477
|
A.current = A.current || {
|
|
@@ -503,7 +503,7 @@ function H(n) {
|
|
|
503
503
|
return n ? "open" : "closed";
|
|
504
504
|
}
|
|
505
505
|
j(H, "getState");
|
|
506
|
-
var mt = dt, gt = ft, vt = pt, Ct = Object.defineProperty, O = (n, o) => Ct(n, "name", { value: o, configurable: !0 }), D = "Accordion", bt = ["Home", "End", "ArrowDown", "ArrowUp", "ArrowLeft", "ArrowRight"], [ce, xt, yt] = /* @__PURE__ */ _e(D), [B,
|
|
506
|
+
var mt = dt, gt = ft, vt = pt, Ct = Object.defineProperty, O = (n, o) => Ct(n, "name", { value: o, configurable: !0 }), D = "Accordion", bt = ["Home", "End", "ArrowDown", "ArrowUp", "ArrowLeft", "ArrowRight"], [ce, xt, yt] = /* @__PURE__ */ _e(D), [B, Ft] = q(D, [
|
|
507
507
|
yt,
|
|
508
508
|
ke
|
|
509
509
|
]), ie = ke(), It = /* @__PURE__ */ l.forwardRef(
|
|
@@ -512,7 +512,7 @@ var mt = dt, gt = ft, vt = pt, Ct = Object.defineProperty, O = (n, o) => Ct(n, "
|
|
|
512
512
|
const { type: t, ...s } = o, r = s, c = s;
|
|
513
513
|
return /* @__PURE__ */ i(ce.Provider, { scope: o.__scopeAccordion, children: t === "multiple" ? /* @__PURE__ */ i(Nt, { ...c, ref: e }) : /* @__PURE__ */ i(wt, { ...r, ref: e }) });
|
|
514
514
|
}, "Accordion")
|
|
515
|
-
), [De, At] = B(D), [
|
|
515
|
+
), [De, At] = B(D), [Le, Rt] = B(
|
|
516
516
|
D,
|
|
517
517
|
{ collapsible: !1 }
|
|
518
518
|
), wt = /* @__PURE__ */ l.forwardRef(
|
|
@@ -538,7 +538,7 @@ var mt = dt, gt = ft, vt = pt, Ct = Object.defineProperty, O = (n, o) => Ct(n, "
|
|
|
538
538
|
value: l.useMemo(() => f ? [f] : [], [f]),
|
|
539
539
|
onItemOpen: p,
|
|
540
540
|
onItemClose: l.useCallback(() => c && p(""), [c, p]),
|
|
541
|
-
children: /* @__PURE__ */ i(
|
|
541
|
+
children: /* @__PURE__ */ i(Le, { scope: o.__scopeAccordion, collapsible: c, children: /* @__PURE__ */ i($e, { ...d, ref: e }) })
|
|
542
542
|
}
|
|
543
543
|
);
|
|
544
544
|
}, "AccordionImplSingle")
|
|
@@ -568,12 +568,12 @@ var mt = dt, gt = ft, vt = pt, Ct = Object.defineProperty, O = (n, o) => Ct(n, "
|
|
|
568
568
|
value: d,
|
|
569
569
|
onItemOpen: p,
|
|
570
570
|
onItemClose: a,
|
|
571
|
-
children: /* @__PURE__ */ i(
|
|
571
|
+
children: /* @__PURE__ */ i(Le, { scope: o.__scopeAccordion, collapsible: !0, children: /* @__PURE__ */ i($e, { ...c, ref: e }) })
|
|
572
572
|
}
|
|
573
573
|
);
|
|
574
|
-
}, "AccordionImplMultiple")), [_t,
|
|
574
|
+
}, "AccordionImplMultiple")), [_t, F] = B(D), $e = /* @__PURE__ */ l.forwardRef(
|
|
575
575
|
/* @__PURE__ */ O(function(o, e) {
|
|
576
|
-
const { __scopeAccordion: t, disabled: s, dir: r, orientation: c = "vertical", ...d } = o, f = l.useRef(null), p =
|
|
576
|
+
const { __scopeAccordion: t, disabled: s, dir: r, orientation: c = "vertical", ...d } = o, f = l.useRef(null), p = L(f, e), a = xt(t), g = Me(r) === "ltr", N = Ne(o.onKeyDown, (C) => {
|
|
577
577
|
if (!bt.includes(C.key)) return;
|
|
578
578
|
const b = C.target, v = a().filter((R) => !R.ref.current?.disabled), I = v.findIndex((R) => R.ref.current === b), A = v.length;
|
|
579
579
|
if (I === -1) return;
|
|
@@ -628,7 +628,7 @@ var mt = dt, gt = ft, vt = pt, Ct = Object.defineProperty, O = (n, o) => Ct(n, "
|
|
|
628
628
|
}, "AccordionImpl")
|
|
629
629
|
), ee = "AccordionItem", [Pt, le] = B(ee), St = /* @__PURE__ */ l.forwardRef(
|
|
630
630
|
/* @__PURE__ */ O(function(o, e) {
|
|
631
|
-
const { __scopeAccordion: t, value: s, ...r } = o, c =
|
|
631
|
+
const { __scopeAccordion: t, value: s, ...r } = o, c = F(ee, t), d = At(ee, t), f = ie(t), p = we(), a = s && d.value.includes(s) || !1, h = c.disabled || o.disabled;
|
|
632
632
|
return /* @__PURE__ */ i(
|
|
633
633
|
Pt,
|
|
634
634
|
{
|
|
@@ -657,7 +657,7 @@ var mt = dt, gt = ft, vt = pt, Ct = Object.defineProperty, O = (n, o) => Ct(n, "
|
|
|
657
657
|
), Ot = "AccordionHeader", Et = /* @__PURE__ */ l.forwardRef(
|
|
658
658
|
// blank line to reduce diff noise
|
|
659
659
|
/* @__PURE__ */ O(function(o, e) {
|
|
660
|
-
const { __scopeAccordion: t, ...s } = o, r =
|
|
660
|
+
const { __scopeAccordion: t, ...s } = o, r = F(D, t), c = le(Ot, t);
|
|
661
661
|
return /* @__PURE__ */ i(
|
|
662
662
|
z.h3,
|
|
663
663
|
{
|
|
@@ -672,7 +672,7 @@ var mt = dt, gt = ft, vt = pt, Ct = Object.defineProperty, O = (n, o) => Ct(n, "
|
|
|
672
672
|
), Ae = "AccordionTrigger", Mt = /* @__PURE__ */ l.forwardRef(
|
|
673
673
|
// blank line to reduce diff noise
|
|
674
674
|
/* @__PURE__ */ O(function(o, e) {
|
|
675
|
-
const { __scopeAccordion: t, ...s } = o, r =
|
|
675
|
+
const { __scopeAccordion: t, ...s } = o, r = F(D, t), c = le(Ae, t), d = Rt(Ae, t), f = ie(t);
|
|
676
676
|
return /* @__PURE__ */ i(ce.ItemSlot, { scope: t, children: /* @__PURE__ */ i(
|
|
677
677
|
gt,
|
|
678
678
|
{
|
|
@@ -688,7 +688,7 @@ var mt = dt, gt = ft, vt = pt, Ct = Object.defineProperty, O = (n, o) => Ct(n, "
|
|
|
688
688
|
), kt = "AccordionContent", Tt = /* @__PURE__ */ l.forwardRef(
|
|
689
689
|
// blank line to reduce diff noise
|
|
690
690
|
/* @__PURE__ */ O(function(o, e) {
|
|
691
|
-
const { __scopeAccordion: t, ...s } = o, r =
|
|
691
|
+
const { __scopeAccordion: t, ...s } = o, r = F(D, t), c = le(kt, t), d = ie(t);
|
|
692
692
|
return /* @__PURE__ */ i(
|
|
693
693
|
vt,
|
|
694
694
|
{
|
|
@@ -711,13 +711,13 @@ function ae(n) {
|
|
|
711
711
|
return n ? "open" : "closed";
|
|
712
712
|
}
|
|
713
713
|
O(ae, "getState");
|
|
714
|
-
var Dt = It,
|
|
714
|
+
var Dt = It, Lt = St, $t = Et, ze = Mt, je = Tt, Ve = Dt, de = l.forwardRef(({ className: n, ...o }, e) => /* @__PURE__ */ i(Lt, {
|
|
715
715
|
ref: e,
|
|
716
716
|
className: te("cds-border-b cds-border-border", n),
|
|
717
717
|
...o
|
|
718
718
|
}));
|
|
719
719
|
de.displayName = "AccordionItem";
|
|
720
|
-
var ue = l.forwardRef(({ className: n, children: o, ...e }, t) => /* @__PURE__ */ i(
|
|
720
|
+
var ue = l.forwardRef(({ className: n, children: o, ...e }, t) => /* @__PURE__ */ i($t, {
|
|
721
721
|
className: "cds-flex",
|
|
722
722
|
children: /* @__PURE__ */ M(ze, {
|
|
723
723
|
ref: t,
|
|
@@ -741,13 +741,13 @@ var zt = /* @__PURE__ */ Be({
|
|
|
741
741
|
GroupEntries: () => me,
|
|
742
742
|
ReviewEditButton: () => Ke,
|
|
743
743
|
ReviewPanel: () => qe,
|
|
744
|
-
RowList: () =>
|
|
744
|
+
RowList: () => G,
|
|
745
745
|
sectionClass: () => pe,
|
|
746
746
|
sectionHeadingClass: () => he
|
|
747
747
|
}), pe = "cds-mb-4 cds-rounded-xl cds-border cds-border-border cds-bg-surface-elevated cds-p-4", he = "cds-text-sm cds-font-bold cds-uppercase cds-tracking-wide cds-text-fg", jt = (n) => {
|
|
748
748
|
let o = n.label.replace(/s$/i, "").toLowerCase();
|
|
749
749
|
return `${n.entries.length} ${n.entries.length === 1 ? o : `${o}s`}`;
|
|
750
|
-
},
|
|
750
|
+
}, G = ({ rows: n }) => /* @__PURE__ */ i("dl", {
|
|
751
751
|
className: "cds-space-y-1 cds-text-sm",
|
|
752
752
|
children: n.map((o) => /* @__PURE__ */ M("div", {
|
|
753
753
|
className: "cds-flex cds-justify-between cds-gap-4",
|
|
@@ -774,7 +774,7 @@ var zt = /* @__PURE__ */ Be({
|
|
|
774
774
|
let h = o[a] ?? [];
|
|
775
775
|
return {
|
|
776
776
|
stage: a,
|
|
777
|
-
rows:
|
|
777
|
+
rows: Ye({
|
|
778
778
|
questions: h,
|
|
779
779
|
values: e,
|
|
780
780
|
stageKey: a,
|
|
@@ -839,13 +839,13 @@ var zt = /* @__PURE__ */ Be({
|
|
|
839
839
|
onClick: () => c(a.stage)
|
|
840
840
|
})]
|
|
841
841
|
}),
|
|
842
|
-
a.rows.length ? /* @__PURE__ */ i(
|
|
842
|
+
a.rows.length ? /* @__PURE__ */ i(G, { rows: a.rows }) : null,
|
|
843
843
|
a.groups.map((g) => /* @__PURE__ */ i(me, { group: g }, g.groupKey))
|
|
844
844
|
]
|
|
845
845
|
}, a.stage);
|
|
846
846
|
}),
|
|
847
|
-
/* @__PURE__ */ i(
|
|
848
|
-
/* @__PURE__ */ i(
|
|
847
|
+
/* @__PURE__ */ i(Fe, { message: s }),
|
|
848
|
+
/* @__PURE__ */ i(Ge, {
|
|
849
849
|
disabled: p.length > 0,
|
|
850
850
|
busy: t,
|
|
851
851
|
onChoose: d
|
|
@@ -856,7 +856,7 @@ var zt = /* @__PURE__ */ Be({
|
|
|
856
856
|
})
|
|
857
857
|
]
|
|
858
858
|
});
|
|
859
|
-
}, me = ({ group: n }) => n.entries.length ? /* @__PURE__ */ M(
|
|
859
|
+
}, me = ({ group: n }) => n.entries.length ? /* @__PURE__ */ M(Je, { children: [/* @__PURE__ */ i("p", {
|
|
860
860
|
className: "cds-mb-1 cds-text-sm cds-text-fg-muted",
|
|
861
861
|
children: jt(n)
|
|
862
862
|
}), /* @__PURE__ */ i(Ve, {
|
|
@@ -869,7 +869,7 @@ var zt = /* @__PURE__ */ Be({
|
|
|
869
869
|
children: o.name
|
|
870
870
|
}), /* @__PURE__ */ i(fe, {
|
|
871
871
|
className: "cds-pb-3 cds-pt-0",
|
|
872
|
-
children: /* @__PURE__ */ i(
|
|
872
|
+
children: /* @__PURE__ */ i(G, { rows: o.rows })
|
|
873
873
|
})]
|
|
874
874
|
}, `${n.groupKey}-${e}`))
|
|
875
875
|
})] }) : /* @__PURE__ */ M("p", {
|
|
@@ -880,7 +880,7 @@ var zt = /* @__PURE__ */ Be({
|
|
|
880
880
|
" added yet."
|
|
881
881
|
]
|
|
882
882
|
});
|
|
883
|
-
const
|
|
883
|
+
const Gt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
884
884
|
__proto__: null,
|
|
885
885
|
a: pe,
|
|
886
886
|
c: fe,
|
|
@@ -888,7 +888,7 @@ const Ft = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
888
888
|
l: de,
|
|
889
889
|
n: qe,
|
|
890
890
|
o: he,
|
|
891
|
-
r:
|
|
891
|
+
r: G,
|
|
892
892
|
s: Ve,
|
|
893
893
|
t: me,
|
|
894
894
|
u: ue
|
|
@@ -897,7 +897,7 @@ export {
|
|
|
897
897
|
me as D,
|
|
898
898
|
tt as P,
|
|
899
899
|
he as S,
|
|
900
|
-
|
|
901
|
-
|
|
900
|
+
Gt as r,
|
|
901
|
+
G as w,
|
|
902
902
|
pe as x
|
|
903
903
|
};
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
import { t as O, $ as P, a0 as V, a1 as x, a2 as D } from "./widget-3S1xkGig.js";
|
|
2
|
+
import { t as q, n as k } from "./types-LUGvo5ic-CiVRcsV9.js";
|
|
3
|
+
import { k as d, j as f, n as F, u as L, c as U, d as R, A as j } from "./visibility-CyRoLvg5-DNRgF2sH.js";
|
|
4
|
+
import { A as b } from "./validation-ELW00AsL-C4xgPdbr.js";
|
|
5
|
+
import { t as $, l as Y, a as Q, o as M, i as K, f as I, n as W, r as B } from "./vehicleCoverage-DI2dKrnI-Lq9BCjQm.js";
|
|
6
|
+
(function() {
|
|
7
|
+
if (typeof s > "u")
|
|
8
|
+
var s = { env: {} };
|
|
9
|
+
})();
|
|
10
|
+
var C = /* @__PURE__ */ new Set([
|
|
11
|
+
"sale_price_cents",
|
|
12
|
+
"dwelling_replacement_cost",
|
|
13
|
+
"other_structures_coverage",
|
|
14
|
+
"personal_property_coverage",
|
|
15
|
+
"loss_of_use_coverage",
|
|
16
|
+
"custom_equipment_value_cents",
|
|
17
|
+
"cost_new_value_cents",
|
|
18
|
+
"stated_value_amount_cents",
|
|
19
|
+
"property_damage_amount_paid_cents",
|
|
20
|
+
"personal_injury_amount_paid_cents",
|
|
21
|
+
"auto_current_annual_premium_cents",
|
|
22
|
+
"amount_paid_cents"
|
|
23
|
+
]), G = /* @__PURE__ */ new Set([
|
|
24
|
+
"total_area_sq_ft",
|
|
25
|
+
"annual_mileage",
|
|
26
|
+
"miles_to_work",
|
|
27
|
+
"distance_to_coast_miles"
|
|
28
|
+
]), H = (s) => C.has(s), Z = (s) => C.has(s) || G.has(s), z = (s, e) => {
|
|
29
|
+
let i = String(s ?? "").replace(/\D/g, "");
|
|
30
|
+
if (!i) return "";
|
|
31
|
+
let r = Number(i);
|
|
32
|
+
if (!Number.isFinite(r)) return "";
|
|
33
|
+
let n = r.toLocaleString("en-US");
|
|
34
|
+
return e ? `$${n}` : n;
|
|
35
|
+
}, pe = /* @__PURE__ */ O({
|
|
36
|
+
STAGES_BY_PRODUCT: () => D,
|
|
37
|
+
ZIP_FIRST_PAINT_CACHE_KEY: () => x,
|
|
38
|
+
ZIP_FIRST_PAINT_QUESTIONS: () => V,
|
|
39
|
+
itemScope: () => A,
|
|
40
|
+
reviewGroupsForStage: () => le,
|
|
41
|
+
reviewRowsForStage: () => ne,
|
|
42
|
+
stageSlice: () => re,
|
|
43
|
+
validateStage: () => se
|
|
44
|
+
}), J = ["ssn_display"], A = (s, e) => {
|
|
45
|
+
let i = {
|
|
46
|
+
...s,
|
|
47
|
+
...e
|
|
48
|
+
};
|
|
49
|
+
for (let r of J) r in e || delete i[r];
|
|
50
|
+
return i;
|
|
51
|
+
}, X = (s, e, i) => {
|
|
52
|
+
let r = A(s, e);
|
|
53
|
+
for (let n of i) n.key in e ? r[n.key] = e[n.key] : delete r[n.key];
|
|
54
|
+
return r;
|
|
55
|
+
}, ee = {
|
|
56
|
+
vehicles: "Vehicle",
|
|
57
|
+
drivers: "Driver",
|
|
58
|
+
driver_accidents: "Accident",
|
|
59
|
+
driver_violations: "Violation",
|
|
60
|
+
losses: "Loss",
|
|
61
|
+
home_losses: "Loss"
|
|
62
|
+
}, h = (s) => ee[s] ?? "Entry", w = (s, e, i, r) => {
|
|
63
|
+
let n = (l, t) => {
|
|
64
|
+
l.forEach((a) => {
|
|
65
|
+
let u = L(a);
|
|
66
|
+
if (u) {
|
|
67
|
+
let o = U(a) || t[a.key] === u.conditionalValue;
|
|
68
|
+
r(a.key, u.conditionalQuestions ?? [], o);
|
|
69
|
+
}
|
|
70
|
+
R(a, t).forEach((o) => {
|
|
71
|
+
o.conditionalQuestionsAllowMultiple || n(o.conditionalQuestions ?? [], t);
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
};
|
|
75
|
+
n(F(s), e);
|
|
76
|
+
}, se = ({ questions: s, values: e, stageKey: i }) => {
|
|
77
|
+
let r = d(s, e, i), n = b(r, e), l = [], t = [];
|
|
78
|
+
for (let [a, u] of Object.entries(n)) {
|
|
79
|
+
let o = r.find((c) => c.key === a);
|
|
80
|
+
t.push(`${o?.question ?? a}: ${u}`);
|
|
81
|
+
}
|
|
82
|
+
if (w(s, e, i, (a, u, o) => {
|
|
83
|
+
if (!o) return;
|
|
84
|
+
let c = f(e, a);
|
|
85
|
+
if (!c.length) {
|
|
86
|
+
t.push(`Add at least one ${h(a).toLowerCase()}.`), n[k(a)] = `Add at least one ${h(a).toLowerCase()}.`;
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
c.forEach((y, p) => {
|
|
90
|
+
let _ = j(u, y, e, i, p), N = b(_, X(e, y, _)), m = {};
|
|
91
|
+
for (let v of _) {
|
|
92
|
+
let g = N[v.key];
|
|
93
|
+
g && (m[v.key] = g, t.push(`${h(a)} ${p + 1} — ${v.question}: ${g}`));
|
|
94
|
+
}
|
|
95
|
+
Object.keys(m).length && l.push({
|
|
96
|
+
groupKey: a,
|
|
97
|
+
index: p,
|
|
98
|
+
errorsByKey: m
|
|
99
|
+
});
|
|
100
|
+
});
|
|
101
|
+
}), r.some((a) => a.key === "vehicle_policy_selections")) {
|
|
102
|
+
let a = f(e, "vehicles"), u = /* @__PURE__ */ new Map();
|
|
103
|
+
for (let y of Y(a)) u.set(y.index, { ...y.errorsByKey }), t.push(`Vehicle ${y.index + 1} — coverage selections are incomplete.`);
|
|
104
|
+
let o = Q(e), c = f(e, "drivers").length;
|
|
105
|
+
a.forEach((y, p) => {
|
|
106
|
+
let _ = M(o, p, c);
|
|
107
|
+
_ && (u.set(p, {
|
|
108
|
+
...u.get(p) ?? {},
|
|
109
|
+
[$]: _
|
|
110
|
+
}), t.push(`Vehicle ${p + 1} — ${_}`));
|
|
111
|
+
});
|
|
112
|
+
for (let [y, p] of u) l.push({
|
|
113
|
+
groupKey: "vehicles",
|
|
114
|
+
index: y,
|
|
115
|
+
errorsByKey: p
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
return {
|
|
119
|
+
errorsByKey: n,
|
|
120
|
+
itemErrors: l,
|
|
121
|
+
issues: t,
|
|
122
|
+
isValid: Object.keys(n).length === 0 && l.length === 0
|
|
123
|
+
};
|
|
124
|
+
}, E = (s) => Object.values(s).every((e) => e == null || String(e).trim() === ""), re = (s, e, i) => {
|
|
125
|
+
let r = {};
|
|
126
|
+
for (let l of d(s, e, i)) l.key in e && (r[l.key] = e[l.key]);
|
|
127
|
+
w(s, e, i, (l, t, a) => {
|
|
128
|
+
let u = k(l);
|
|
129
|
+
if (!a || !(u in e)) return;
|
|
130
|
+
let o = f(e, l), c = o.filter((y) => !E(y));
|
|
131
|
+
!c.length && o.length || (r[u] = c, r[l] = e[l] ?? "Yes");
|
|
132
|
+
});
|
|
133
|
+
let n = k("vehicles");
|
|
134
|
+
return d(s, e, i).some((l) => l.key === "vehicle_policy_selections") && n in e && !(n in r) && (r[n] = f(e, "vehicles").filter((l) => !E(l)), r.vehicles = e.vehicles ?? "Yes", "driver_vehicle_assignments" in e && (r[$] = e[$])), r;
|
|
135
|
+
}, ie = (s, e) => [s.first_name, s.last_name].map((i) => String(i ?? "").trim()).filter(Boolean).join(" ") || `Driver ${e + 1}`, te = (s, e, i) => s === "vehicles" ? I(e, i) : s === "drivers" ? ie(e, i) : `${h(s)} ${i + 1}`, le = ({ questions: s, values: e, stageKey: i, suppressedKeys: r }) => {
|
|
136
|
+
let n = [];
|
|
137
|
+
return w(s, e, i, (l, t, a) => {
|
|
138
|
+
if (!a) return;
|
|
139
|
+
let u = f(e, l).map((o, c) => {
|
|
140
|
+
let y = A(e, o), p = j(t, o, e, i, c);
|
|
141
|
+
return {
|
|
142
|
+
name: te(l, o, c),
|
|
143
|
+
rows: p.filter((_) => !_.key.endsWith(q)).filter((_) => !r?.has(_.key)).map((_) => ({
|
|
144
|
+
key: `${l}__${c}__${_.key}`,
|
|
145
|
+
label: _.question,
|
|
146
|
+
value: S(_, o[_.key], y)
|
|
147
|
+
}))
|
|
148
|
+
};
|
|
149
|
+
});
|
|
150
|
+
n.push({
|
|
151
|
+
groupKey: l,
|
|
152
|
+
label: l.replace(/_/g, " ").replace(/^./, (o) => o.toUpperCase()),
|
|
153
|
+
entries: u
|
|
154
|
+
});
|
|
155
|
+
}), n;
|
|
156
|
+
}, T = (s) => {
|
|
157
|
+
let e = String(s ?? "").replace(/\D/g, "");
|
|
158
|
+
return e.length >= 4 ? e.slice(-4) : null;
|
|
159
|
+
}, S = (s, e, i) => {
|
|
160
|
+
if (s.key === "social_security_number") {
|
|
161
|
+
let r = T(e) ?? T(i.ssn_display);
|
|
162
|
+
return r ? `•••–••–${r}` : "—";
|
|
163
|
+
}
|
|
164
|
+
return e == null || e === "" ? "—" : e === !0 ? "Yes" : e === !1 ? "No" : Array.isArray(e) ? `${e.length} added` : s.inputType === "select" || s.inputType === "radio" ? P(s.key, String(e)) : s.inputType === "number" && Z(s.key) && z(e, H(s.key)) || String(e);
|
|
165
|
+
}, ae = (s) => ({
|
|
166
|
+
question: B[s],
|
|
167
|
+
key: s,
|
|
168
|
+
required: !0,
|
|
169
|
+
inputType: "select"
|
|
170
|
+
}), ne = ({ questions: s, values: e, stageKey: i, suppressedKeys: r }) => {
|
|
171
|
+
let n = d(s, e, i), l = n.filter((t) => !t.key.endsWith(q)).filter((t) => t.key !== K).filter((t) => !r?.has(t.key)).map((t) => ({
|
|
172
|
+
key: t.key,
|
|
173
|
+
label: t.question,
|
|
174
|
+
value: S(t, e[t.key], e)
|
|
175
|
+
}));
|
|
176
|
+
return n.some((t) => t.key === "vehicle_policy_selections") && f(e, "vehicles").forEach((t, a) => {
|
|
177
|
+
let u = I(t, a);
|
|
178
|
+
for (let o of W) l.push({
|
|
179
|
+
key: `${K}__${a}__${o}`,
|
|
180
|
+
label: `${u} — ${B[o]}`,
|
|
181
|
+
value: S(ae(o), t[o], e)
|
|
182
|
+
});
|
|
183
|
+
}), l;
|
|
184
|
+
};
|
|
185
|
+
export {
|
|
186
|
+
pe as a,
|
|
187
|
+
G as c,
|
|
188
|
+
Z as d,
|
|
189
|
+
re as i,
|
|
190
|
+
z as l,
|
|
191
|
+
le as n,
|
|
192
|
+
se as o,
|
|
193
|
+
ne as r,
|
|
194
|
+
C as s,
|
|
195
|
+
A as t,
|
|
196
|
+
H as u
|
|
197
|
+
};
|
package/dist/utils/prefill.d.ts
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Contact details the host page already collected, passed to `init()`. Module
|
|
3
|
-
* state, like the partner attribution: the flow reads it as it mounts.
|
|
4
|
-
*/
|
|
5
1
|
import type { QuotePrefill } from '@getcredify/credify-insurance-ui-kit/ui';
|
|
6
2
|
export type WidgetPrefill = {
|
|
7
3
|
/** 5-digit ZIP. Anything else is dropped. */
|
|
8
4
|
zip?: string;
|
|
9
5
|
email?: string;
|
|
6
|
+
/** US number, masked or raw, with or without the country code. */
|
|
7
|
+
phone?: string;
|
|
10
8
|
};
|
|
11
9
|
/**
|
|
12
10
|
* Validates the host's `prefill` option. Every rejection path drops the value and
|