@getcredify/credify-insurance-widget 1.45.0 → 1.46.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.
Files changed (58) hide show
  1. package/dist/{address-BEVwov8q-BHA-1zzm.js → address-BEVwov8q-D41kOVu6.js} +1 -1
  2. package/dist/api-Cw2AUM88.js +77 -0
  3. package/dist/{car-B8Sfr377.js → car-CMnEV9_b.js} +3 -3
  4. package/dist/{check-B8qTJ1zD.js → check-BTgVTfcC.js} +1 -1
  5. package/dist/{copy-applicant-offer-BPo842pD-COcsLcbo.js → copy-applicant-offer-UApiJBeU-CKq7ImsF.js} +3 -3
  6. package/dist/{copy-from-record-DL503itm-B05F775l.js → copy-from-record-DL503itm-CTS4E7Rf.js} +11 -11
  7. package/dist/{coverageDerivation-CV2ORogj-D4IAkVAP.js → coverageDerivation-CV2ORogj-jMf2SoK5.js} +1 -1
  8. package/dist/{fixtures-ijbZ16Zg-CB6WPBEx.js → fixtures-ijbZ16Zg-ChdBIfNy.js} +1 -1
  9. package/dist/{household-prefill-DJ-Y0NcP-TwmnYrqf.js → household-prefill-BwSS00qI-BV0ZiWyf.js} +22 -22
  10. package/dist/{householdPrefill-DLm3pxFH-Gudko0w4.js → householdPrefill-DLm3pxFH-CsBUhGpI.js} +3 -3
  11. package/dist/iframe/assets/{address-BEVwov8q-RcBegFnh.js → address-BEVwov8q-WHZXNW9V.js} +1 -1
  12. package/dist/iframe/assets/api-DAGqvZlL.js +1 -0
  13. package/dist/iframe/assets/{car-DQIQf4LA.js → car-B5QKRfCv.js} +2 -2
  14. package/dist/iframe/assets/{check-BiNh2j82.js → check-COpOqcK1.js} +1 -1
  15. package/dist/iframe/assets/{copy-applicant-offer-BPo842pD-Cj352DzN.js → copy-applicant-offer-UApiJBeU-DzSzRNkI.js} +1 -1
  16. package/dist/iframe/assets/{copy-from-record-DL503itm-B7hBbUhh.js → copy-from-record-DL503itm-uUs1HZ1W.js} +2 -2
  17. package/dist/iframe/assets/{coverageDerivation-CV2ORogj-D3oRqD1U.js → coverageDerivation-CV2ORogj-BRpZ-qnO.js} +1 -1
  18. package/dist/iframe/assets/{dob-calendar-RIJ5S6YU-vOGgSHSK.js → dob-calendar-RIJ5S6YU-Bc9pcr1S.js} +1 -1
  19. package/dist/iframe/assets/{fixtures-ijbZ16Zg-BmEw6uDw.js → fixtures-ijbZ16Zg-DHtl-XVn.js} +1 -1
  20. package/dist/iframe/assets/household-prefill-BwSS00qI-DoI-FWTT.js +1 -0
  21. package/dist/iframe/assets/{householdPrefill-DLm3pxFH-BZXueCa7.js → householdPrefill-DLm3pxFH-Dh4Zfx2N.js} +1 -1
  22. package/dist/iframe/assets/{iframe-ku_diR98.js → iframe-B0t_86Ff.js} +35 -35
  23. package/dist/iframe/assets/{index-IiQzPjFm.js → index-Dn7YHcfA.js} +2 -2
  24. package/dist/iframe/assets/intake-review-panel-CjiYTJXh-RzRGAMUY.js +1 -0
  25. package/dist/iframe/assets/{mockJump-H1NFTDah-yzeq4yea.js → mockJump-DCZoGtRl-COeVYgAv.js} +1 -1
  26. package/dist/iframe/assets/{payload-CQc06PZC-BxklUdmW.js → payload-DurIYSZk-BKyiqX4B.js} +1 -1
  27. package/dist/iframe/assets/{question-list-CcoyuyQD-DCzTkzeE.js → question-list-CjN64tfw-C635WZhw.js} +3 -3
  28. package/dist/iframe/assets/rates-panel-B1xVYtTQ-7LijnnnG.js +17 -0
  29. package/dist/iframe/assets/{review-panel-CFVxGU7F-CqUUCDLK.js → review-panel-DuzWoTKP-ClL_jf1q.js} +2 -2
  30. package/dist/iframe/assets/stage-CnucLiNn-CeNTIedd.js +1 -0
  31. package/dist/iframe/assets/validation-Db4WCn17-CWj8NSXn.js +3 -0
  32. package/dist/iframe/assets/{vehicleCoverage-DI2dKrnI-DVXwPfxd.js → vehicleCoverage-CDBtkdww-B2U8GTFu.js} +1 -1
  33. package/dist/iframe/assets/visibility-iwttXt0y-DdU95s24.js +1 -0
  34. package/dist/iframe/assets/{waves-vdL6w3zC.js → waves-BTFsI5kF.js} +1 -1
  35. package/dist/iframe/iframe.html +1 -1
  36. package/dist/{index-IZRzz1Mi.js → index-BWYDsqpp.js} +26 -26
  37. package/dist/index.es.js +1 -1
  38. package/dist/index.umd.js +95 -95
  39. package/dist/{intake-review-panel-CWz2efw4-BQ-Nog4K.js → intake-review-panel-CjiYTJXh-CEbA61Dc.js} +5 -5
  40. package/dist/{mockJump-H1NFTDah-CkqZVQxf.js → mockJump-DCZoGtRl-Bo7POlsv.js} +1 -1
  41. package/dist/{payload-CQc06PZC-KA6cBCno.js → payload-DurIYSZk-DIu_QDwm.js} +2 -2
  42. package/dist/{question-list-CcoyuyQD-_c4J4n0G.js → question-list-CjN64tfw-1IKhM3Qt.js} +13 -13
  43. package/dist/{rates-panel-MXCbnqpL-DGYBAFto.js → rates-panel-B1xVYtTQ-zlc6y8FP.js} +237 -222
  44. package/dist/{review-panel-CFVxGU7F-CtO3WmnD.js → review-panel-DuzWoTKP-fVqE5OXc.js} +71 -71
  45. package/dist/{stage-BSRsu--X-DJs8ps3K.js → stage-CnucLiNn-cNOWRm4u.js} +4 -4
  46. package/dist/{validation-ELW00AsL-C4xgPdbr.js → validation-Db4WCn17-MXpuK34u.js} +2 -2
  47. package/dist/{vehicleCoverage-DI2dKrnI-Lq9BCjQm.js → vehicleCoverage-CDBtkdww-PMT13g0U.js} +3 -3
  48. package/dist/{visibility-CyRoLvg5-DNRgF2sH.js → visibility-iwttXt0y-DPpMfYyV.js} +1 -1
  49. package/dist/{waves-DM8Lgssk.js → waves-B32--xu4.js} +1 -1
  50. package/dist/{widget-3S1xkGig.js → widget-D6Yu93a3.js} +1062 -1057
  51. package/package.json +2 -2
  52. package/dist/api-BLmgLEy-.js +0 -51
  53. package/dist/iframe/assets/household-prefill-DJ-Y0NcP-z6AnkJcR.js +0 -1
  54. package/dist/iframe/assets/intake-review-panel-CWz2efw4-CP-sEc-j.js +0 -1
  55. package/dist/iframe/assets/rates-panel-MXCbnqpL-TFkvW-DN.js +0 -17
  56. package/dist/iframe/assets/stage-BSRsu--X-BAWfI2cm.js +0 -1
  57. package/dist/iframe/assets/validation-ELW00AsL-ytOMlsxG.js +0 -3
  58. package/dist/iframe/assets/visibility-CyRoLvg5-CxslMJYX.js +0 -1
@@ -1,4 +1,4 @@
1
- import { t as _ } from "./widget-3S1xkGig.js";
1
+ import { t as _ } from "./widget-D6Yu93a3.js";
2
2
  (function() {
3
3
  if (typeof t > "u")
4
4
  var t = { env: {} };
@@ -0,0 +1,77 @@
1
+ import { j as f, e as c, A as g, P as p, a as m, d as S, X as h, q as y, b as T, H as k, Y as Q, Q as R, c as v, h as w, k as A, F as E, M as P, N as _, f as O, g as b, D as C, _ as U, x as I, E as V, O as D, J as F, i as L, v as N, Z as x, S as B, B as J, R as K, u as M, T as Y, l as Z, C as j, w as q, m as G, V as H, n as z, z as W, y as X, o as $, p as ee } from "./widget-D6Yu93a3.js";
2
+ (function() {
3
+ if (typeof e > "u")
4
+ var e = { env: {} };
5
+ })();
6
+ var r = "credify_landing_utm", o = [
7
+ "source",
8
+ "medium",
9
+ "campaign",
10
+ "content",
11
+ "term"
12
+ ], n = (e) => {
13
+ let s = new URLSearchParams(e), t = {};
14
+ for (let a of o) {
15
+ let i = s.get(`utm_${a}`)?.trim().slice(0, 100);
16
+ i && (t[a] = i);
17
+ }
18
+ return s.has("fbclid") && (t.fbclid = !0), Object.keys(t).length ? t : null;
19
+ }, l = () => {
20
+ if (typeof window > "u") return null;
21
+ try {
22
+ let e = n(window.location.search);
23
+ if (e) return window.sessionStorage.setItem(r, JSON.stringify(e)), e;
24
+ let s = window.sessionStorage.getItem(r);
25
+ return s ? JSON.parse(s) : null;
26
+ } catch {
27
+ return null;
28
+ }
29
+ };
30
+ export {
31
+ f as AUTH_TOKEN_STORAGE_KEY,
32
+ c as CredifyApiError,
33
+ g as QUOTE_ID_STORAGE_KEY,
34
+ p as applyDriverPrefill,
35
+ m as applyVehiclePrefill,
36
+ S as bodyWithQuoteId,
37
+ h as buildResumeUrl,
38
+ l as captureLandingUtm,
39
+ y as captureResumeTokenFromUrl,
40
+ T as cityFromZip,
41
+ k as clearQuoteSession,
42
+ Q as configureApi,
43
+ R as configureZipCityLookup,
44
+ v as consumeResumeToken,
45
+ w as createQuote,
46
+ A as decodeVin,
47
+ E as dismissDriverPrefill,
48
+ P as dismissVehiclePrefill,
49
+ _ as fetchDriverPrefillSuggestions,
50
+ O as fetchVehiclePrefillSuggestions,
51
+ b as getApiConfig,
52
+ C as getQuestionsByStage,
53
+ U as getQuote,
54
+ I as getRates,
55
+ V as getStagesForQuote,
56
+ D as getVehicleOptions,
57
+ F as hasResumeToken,
58
+ L as isMockEnabled,
59
+ N as isSupportedState,
60
+ x as isTestModeEnabled,
61
+ B as issueResumeLink,
62
+ J as loadAuthToken,
63
+ K as loadQuoteId,
64
+ n as parseUtm,
65
+ M as post,
66
+ Y as prefillProperty,
67
+ Z as prefillSuggestions,
68
+ j as redeemResumeToken,
69
+ q as requestBind,
70
+ G as resetApiConfig,
71
+ H as resetPrefillSuggestions,
72
+ z as saveAuthToken,
73
+ W as saveQuoteId,
74
+ X as sendSmsCode,
75
+ $ as updateQuote,
76
+ ee as verifySmsCode
77
+ };
@@ -1,4 +1,4 @@
1
- import { a4 as e } from "./widget-3S1xkGig.js";
1
+ import { $ as e } from "./widget-D6Yu93a3.js";
2
2
  (function() {
3
3
  if (typeof c > "u")
4
4
  var c = { env: {} };
@@ -20,7 +20,7 @@ const r = [
20
20
  ["circle", { cx: "7", cy: "17", r: "2", key: "u2ysq9" }],
21
21
  ["path", { d: "M9 17h6", key: "r8uit2" }],
22
22
  ["circle", { cx: "17", cy: "17", r: "2", key: "axvx0g" }]
23
- ], a = e("car", r);
23
+ ], n = e("car", r);
24
24
  export {
25
- a as C
25
+ n as C
26
26
  };
@@ -1,4 +1,4 @@
1
- import { a4 as c } from "./widget-3S1xkGig.js";
1
+ import { $ as c } from "./widget-D6Yu93a3.js";
2
2
  (function() {
3
3
  if (typeof e > "u")
4
4
  var e = { env: {} };
@@ -1,6 +1,6 @@
1
- import { t as d } from "./widget-3S1xkGig.js";
2
- import { k as y, j as h } from "./visibility-CyRoLvg5-DNRgF2sH.js";
3
- import { u as m, l as f, s as c } from "./copy-from-record-DL503itm-B05F775l.js";
1
+ import { t as d } from "./widget-D6Yu93a3.js";
2
+ import { k as y, j as h } from "./visibility-iwttXt0y-DPpMfYyV.js";
3
+ import { u as m, l as f, s as c } from "./copy-from-record-DL503itm-CTS4E7Rf.js";
4
4
  import { useMemo as p, useCallback as b } from "react";
5
5
  import { jsx as g } from "react/jsx-runtime";
6
6
  (function() {
@@ -1,9 +1,9 @@
1
- import { a4 as x, a5 as b, G as v } from "./widget-3S1xkGig.js";
2
- import { j as N } from "./visibility-CyRoLvg5-DNRgF2sH.js";
3
- import { k as f } from "./validation-ELW00AsL-C4xgPdbr.js";
1
+ import { $ as x, a7 as b, G as v } from "./widget-D6Yu93a3.js";
2
+ import { j as N } from "./visibility-iwttXt0y-DPpMfYyV.js";
3
+ import { k as f } from "./validation-Db4WCn17-MXpuK34u.js";
4
4
  import { useState as y } from "react";
5
5
  import { jsxs as p, jsx as n, Fragment as k } from "react/jsx-runtime";
6
- import { C as K } from "./check-B8qTJ1zD.js";
6
+ import { C as K } from "./check-BTgVTfcC.js";
7
7
  (function() {
8
8
  if (typeof t > "u")
9
9
  var t = { env: {} };
@@ -18,8 +18,8 @@ const S = [
18
18
  ["path", { d: "M2 21a8 8 0 0 1 13.292-6", key: "bjp14o" }],
19
19
  ["circle", { cx: "10", cy: "8", r: "5", key: "o932ke" }],
20
20
  ["path", { d: "m16 19 2 2 4-4", key: "1b14m6" }]
21
- ], w = x("user-round-check", S);
22
- var A = {
21
+ ], $ = x("user-round-check", S);
22
+ var w = {
23
23
  applicant: {
24
24
  gender: "gender",
25
25
  marital_status: "marital_status",
@@ -48,7 +48,7 @@ var A = {
48
48
  occupation: "occupation",
49
49
  social_security_number: "social_security_number"
50
50
  }
51
- }, $ = {
51
+ }, A = {
52
52
  applicant: {
53
53
  industryKey: "employment_industry",
54
54
  occupationKey: "occupation"
@@ -80,7 +80,7 @@ var A = {
80
80
  }] : [];
81
81
  }), G = ({ kind: t, source: c, targetQuestions: e }) => {
82
82
  let i = new Map(e.map((d) => [d.key, d])), a = {};
83
- for (let [d, o] of Object.entries(A[t])) {
83
+ for (let [d, o] of Object.entries(w[t])) {
84
84
  let m = i.get(d);
85
85
  if (!m) continue;
86
86
  let u = c[o];
@@ -88,7 +88,7 @@ var A = {
88
88
  let l = C(m, u);
89
89
  l !== void 0 && (a[d] = l);
90
90
  }
91
- let r = $[t];
91
+ let r = A[t];
92
92
  return r && a[r.occupationKey] !== void 0 && (b(a[r.industryKey])?.includes(String(a[r.occupationKey])) || delete a[r.occupationKey]), a;
93
93
  }, O = ({ heading: t, body: c, candidates: e, applyLabel: i = "Use these details", onApply: a }) => {
94
94
  let [r, d] = y(e[0]?.index ?? 0), [o, m] = y(null);
@@ -126,7 +126,7 @@ var A = {
126
126
  className: "cds-mb-5 cds-rounded-xl cds-border cds-border-accent/40 cds-bg-highlight cds-p-4",
127
127
  children: /* @__PURE__ */ p("div", {
128
128
  className: "cds-flex cds-items-start cds-gap-3",
129
- children: [/* @__PURE__ */ n(w, {
129
+ children: [/* @__PURE__ */ n($, {
130
130
  "aria-hidden": "true",
131
131
  className: "cds-mt-0.5 cds-h-5 cds-w-5 cds-shrink-0 cds-text-accent"
132
132
  }), /* @__PURE__ */ p("div", {
@@ -181,7 +181,7 @@ var A = {
181
181
  });
182
182
  };
183
183
  export {
184
- w as U,
184
+ $ as U,
185
185
  L as c,
186
186
  B as l,
187
187
  O as s,
@@ -1,4 +1,4 @@
1
- import { t as E } from "./widget-3S1xkGig.js";
1
+ import { t as E } from "./widget-D6Yu93a3.js";
2
2
  (function() {
3
3
  if (typeof r > "u")
4
4
  var r = { env: {} };
@@ -1,4 +1,4 @@
1
- import { t } from "./widget-3S1xkGig.js";
1
+ import { t } from "./widget-D6Yu93a3.js";
2
2
  (function() {
3
3
  if (typeof e > "u")
4
4
  var e = { env: {} };
@@ -1,23 +1,23 @@
1
- import { t as O, P as U, N as E, z as p, f as L, a as q, G as w } from "./widget-3S1xkGig.js";
2
- import { U as D, y as G, h as H, m as R, d as T, u as B, l as F } from "./householdPrefill-DLm3pxFH-Gudko0w4.js";
3
- import { j as J } from "./visibility-CyRoLvg5-DNRgF2sH.js";
4
- import { useState as u, useRef as C, useEffect as A } from "react";
1
+ import { t as U, F as z, P as E, l as p, M as L, a as q, G as w } from "./widget-D6Yu93a3.js";
2
+ import { U as B, y as D, h as F, m as G, d as H, u as M, l as R } from "./householdPrefill-DLm3pxFH-CsBUhGpI.js";
3
+ import { j as T } from "./visibility-iwttXt0y-DPpMfYyV.js";
4
+ import { useState as u, useRef as C, useEffect as I } from "react";
5
5
  import { jsx as d, jsxs as r } from "react/jsx-runtime";
6
- import { C as K } from "./car-B8Sfr377.js";
6
+ import { C as J } from "./car-CMnEV9_b.js";
7
7
  (function() {
8
8
  if (typeof t > "u")
9
9
  var t = { env: {} };
10
10
  })();
11
- var de = /* @__PURE__ */ O({ HouseholdPrefill: () => Q }), M = {
11
+ var de = /* @__PURE__ */ U({ HouseholdPrefill: () => Q }), K = {
12
12
  vehicle: {
13
13
  fetch: p.vehicle.fetch,
14
14
  peek: p.vehicle.peek,
15
15
  apply: q,
16
16
  dismiss: L,
17
- mergeInto: R,
17
+ mergeInto: G,
18
18
  skip: () => !1,
19
19
  alreadyPresent: () => !1,
20
- icon: K,
20
+ icon: J,
21
21
  heading: (t) => t === 1 ? "We found a vehicle at your address" : `We found ${t} vehicles at your address`,
22
22
  body: "Pick the ones you want covered and we'll fill in the details.",
23
23
  decline: "I'll add them myself",
@@ -27,23 +27,23 @@ var de = /* @__PURE__ */ O({ HouseholdPrefill: () => Q }), M = {
27
27
  fetch: p.driver.fetch,
28
28
  peek: p.driver.peek,
29
29
  apply: E,
30
- dismiss: U,
31
- mergeInto: H,
32
- skip: G,
33
- alreadyPresent: (t, c) => J(t, "drivers").some((i) => T(F(i), B(c.label))),
34
- icon: D,
30
+ dismiss: z,
31
+ mergeInto: F,
32
+ skip: D,
33
+ alreadyPresent: (t, c) => T(t, "drivers").some((i) => H(R(i), M(c.label))),
34
+ icon: B,
35
35
  heading: (t) => t === 1 ? "We found another driver in your household" : `We found ${t} drivers in your household`,
36
36
  body: "Add anyone who drives these vehicles. We already have you.",
37
37
  decline: "I'll add them myself",
38
38
  searching: "Looking for other drivers in your household…"
39
39
  }
40
- }, Q = ({ kind: t, quoteId: c, values: i, onApply: I }) => {
41
- let s = M[t], [g] = u(() => s.skip(i)), b = !!c && !g, n = b && c ? s.peek(c) : void 0, [v, a] = u(n ? n.length ? "offering" : "done" : "idle"), [P, $] = u(n ?? []), [o, x] = u(() => new Set((n ?? []).filter((e) => e.alreadyOnApplication).map((e) => e.id))), N = C(!1), k = C(i);
42
- A(() => {
40
+ }, Q = ({ kind: t, quoteId: c, values: i, onApply: P }) => {
41
+ let s = K[t], [g] = u(() => s.skip(i)), b = !!c && !g, n = b && c ? s.peek(c) : void 0, [v, a] = u(n ? n.length ? "offering" : "done" : "idle"), [$, A] = u(n ?? []), [o, x] = u(() => new Set((n ?? []).filter((e) => e.alreadyOnApplication).map((e) => e.id))), N = C(!1), k = C(i);
42
+ I(() => {
43
43
  k.current = i;
44
- }), A(() => {
44
+ }), I(() => {
45
45
  !c || N.current || g || (N.current = !0, s.fetch(c).then((e) => {
46
- $(e), x(new Set(e.filter((l) => l.alreadyOnApplication).map((l) => l.id))), a(e.length ? "offering" : "done");
46
+ A(e), x(new Set(e.filter((l) => l.alreadyOnApplication).map((l) => l.id))), a(e.length ? "offering" : "done");
47
47
  }).catch(() => {
48
48
  a("done");
49
49
  }));
@@ -74,7 +74,7 @@ var de = /* @__PURE__ */ O({ HouseholdPrefill: () => Q }), M = {
74
74
  })
75
75
  });
76
76
  if (h !== "offering" && h !== "applying") return null;
77
- let y = P.filter((e) => !s.alreadyPresent(i, e));
77
+ let y = $.filter((e) => !s.alreadyPresent(i, e));
78
78
  if (!y.length) return null;
79
79
  let W = (e) => {
80
80
  x((l) => {
@@ -85,8 +85,8 @@ var de = /* @__PURE__ */ O({ HouseholdPrefill: () => Q }), M = {
85
85
  if (!c || !o.size) return;
86
86
  a("applying");
87
87
  let e = await s.apply([...o], c);
88
- e.length && I(s.mergeInto(k.current, e)), a("done");
89
- }, z = () => {
88
+ e.length && P(s.mergeInto(k.current, e)), a("done");
89
+ }, O = () => {
90
90
  a("done"), c && s.dismiss(c);
91
91
  }, m = h === "applying";
92
92
  return /* @__PURE__ */ d("div", {
@@ -135,7 +135,7 @@ var de = /* @__PURE__ */ O({ HouseholdPrefill: () => Q }), M = {
135
135
  }), /* @__PURE__ */ d("button", {
136
136
  type: "button",
137
137
  disabled: m,
138
- onClick: z,
138
+ onClick: O,
139
139
  className: `cds-text-sm cds-font-semibold cds-text-fg cds-underline disabled:cds-opacity-50 ${w}`,
140
140
  children: s.decline
141
141
  })]
@@ -1,4 +1,4 @@
1
- import { a4 as A } from "./widget-3S1xkGig.js";
1
+ import { $ } from "./widget-D6Yu93a3.js";
2
2
  import { t as c } from "./types-LUGvo5ic-CiVRcsV9.js";
3
3
  (function() {
4
4
  if (typeof e > "u")
@@ -10,12 +10,12 @@ import { t as c } from "./types-LUGvo5ic-CiVRcsV9.js";
10
10
  * This source code is licensed under the ISC license.
11
11
  * See the LICENSE file in the root directory of this source tree.
12
12
  */
13
- const $ = [
13
+ const A = [
14
14
  ["path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2", key: "1yyitq" }],
15
15
  ["path", { d: "M16 3.128a4 4 0 0 1 0 7.744", key: "16gr8j" }],
16
16
  ["path", { d: "M22 21v-2a4 4 0 0 0-3-3.87", key: "kshegd" }],
17
17
  ["circle", { cx: "9", cy: "7", r: "4", key: "nufk8" }]
18
- ], N = A("users", $);
18
+ ], N = $("users", A);
19
19
  var k = `vehicles${c}`, o = `drivers${c}`, S = [
20
20
  "vin",
21
21
  "year",
@@ -1 +1 @@
1
- import{t as _}from"./iframe-ku_diR98.js";var u=_({ADDRESS_COLUMN_PREFIXES:()=>m,addressFromColumns:()=>p,addressToColumns:()=>c,composeAddress:()=>n,normalizeStateCode:()=>a,parseAddress:()=>i}),a=r=>{let t=r.trim();return/^[A-Za-z]{2}$/.test(t)?t.toUpperCase():t},i=r=>{let[t="",e="",o=""]=r.split(",").map(d=>d.trim()).filter(Boolean),l=/^([A-Za-z .]{2,})\s+(\d{5})(?:-\d{4})?$/.exec(o);return{line_1:t,city:e,state:a(l?.[1]?.trim()??""),postal_code:l?.[2]??""}},n=r=>{let t=[r.line_1.trim(),r.line_2.trim()].filter(Boolean).join(" ");if(!t)return"";let e=a(r.state.trim());return`${t}, ${r.city.trim()}, ${e} ${r.postal_code.trim()}`.replace(/\s+/g," ").trim()},m={address:"",prior_address:"prior_",garaging_address:"garaging_address_"},s=(r,t)=>{let e=r[t];return e==null?"":String(e)},p=(r,t)=>n({line_1:s(r,`${t}line_1`),line_2:s(r,`${t}line_2`),city:s(r,`${t}city`),state:s(r,`${t}state`),postal_code:s(r,`${t}postal_code`)}),c=(r,t)=>{let e=i(r);return{[`${t}line_1`]:e.line_1||null,[`${t}city`]:e.city||null,[`${t}state`]:e.state||null,[`${t}postal_code`]:e.postal_code||null}};export{n as a,u as i,p as n,a as o,c as r,i as s,m as t};
1
+ import{t as _}from"./iframe-B0t_86Ff.js";var u=_({ADDRESS_COLUMN_PREFIXES:()=>m,addressFromColumns:()=>p,addressToColumns:()=>c,composeAddress:()=>n,normalizeStateCode:()=>a,parseAddress:()=>i}),a=r=>{let t=r.trim();return/^[A-Za-z]{2}$/.test(t)?t.toUpperCase():t},i=r=>{let[t="",e="",o=""]=r.split(",").map(d=>d.trim()).filter(Boolean),l=/^([A-Za-z .]{2,})\s+(\d{5})(?:-\d{4})?$/.exec(o);return{line_1:t,city:e,state:a(l?.[1]?.trim()??""),postal_code:l?.[2]??""}},n=r=>{let t=[r.line_1.trim(),r.line_2.trim()].filter(Boolean).join(" ");if(!t)return"";let e=a(r.state.trim());return`${t}, ${r.city.trim()}, ${e} ${r.postal_code.trim()}`.replace(/\s+/g," ").trim()},m={address:"",prior_address:"prior_",garaging_address:"garaging_address_"},s=(r,t)=>{let e=r[t];return e==null?"":String(e)},p=(r,t)=>n({line_1:s(r,`${t}line_1`),line_2:s(r,`${t}line_2`),city:s(r,`${t}city`),state:s(r,`${t}state`),postal_code:s(r,`${t}postal_code`)}),c=(r,t)=>{let e=i(r);return{[`${t}line_1`]:e.line_1||null,[`${t}city`]:e.city||null,[`${t}state`]:e.state||null,[`${t}postal_code`]:e.postal_code||null}};export{n as a,u as i,p as n,a as o,c as r,i as s,m as t};
@@ -0,0 +1 @@
1
+ import{j as c,e as g,A as f,P as m,a as p,d as S,X as h,q as y,b as T,H as k,Y as Q,Q as R,c as w,h as A,k as E,F as P,M as _,N as O,f as b,g as v,D as C,_ as U,x as I,E as V,O as D,J as F,i as L,v as N,Z as x,S as B,B as J,R as K,u as M,T as Y,l as Z,C as j,w as q,m as G,V as H,n as z,z as W,y as X,o as $,p as ee}from"./iframe-B0t_86Ff.js";var r="credify_landing_utm",o=["source","medium","campaign","content","term"],n=e=>{let s=new URLSearchParams(e),a={};for(let t of o){let i=s.get(`utm_${t}`)?.trim().slice(0,100);i&&(a[t]=i)}return s.has("fbclid")&&(a.fbclid=!0),Object.keys(a).length?a:null},l=()=>{if(typeof window>"u")return null;try{let e=n(window.location.search);if(e)return window.sessionStorage.setItem(r,JSON.stringify(e)),e;let s=window.sessionStorage.getItem(r);return s?JSON.parse(s):null}catch{return null}};export{c as AUTH_TOKEN_STORAGE_KEY,g as CredifyApiError,f as QUOTE_ID_STORAGE_KEY,m as applyDriverPrefill,p as applyVehiclePrefill,S as bodyWithQuoteId,h as buildResumeUrl,l as captureLandingUtm,y as captureResumeTokenFromUrl,T as cityFromZip,k as clearQuoteSession,Q as configureApi,R as configureZipCityLookup,w as consumeResumeToken,A as createQuote,E as decodeVin,P as dismissDriverPrefill,_ as dismissVehiclePrefill,O as fetchDriverPrefillSuggestions,b as fetchVehiclePrefillSuggestions,v as getApiConfig,C as getQuestionsByStage,U as getQuote,I as getRates,V as getStagesForQuote,D as getVehicleOptions,F as hasResumeToken,L as isMockEnabled,N as isSupportedState,x as isTestModeEnabled,B as issueResumeLink,J as loadAuthToken,K as loadQuoteId,n as parseUtm,M as post,Y as prefillProperty,Z as prefillSuggestions,j as redeemResumeToken,q as requestBind,G as resetApiConfig,H as resetPrefillSuggestions,z as saveAuthToken,W as saveQuoteId,X as sendSmsCode,$ as updateQuote,ee as verifySmsCode};
@@ -1,6 +1,6 @@
1
- import{m as c}from"./iframe-ku_diR98.js";/**
1
+ import{a1 as c}from"./iframe-B0t_86Ff.js";/**
2
2
  * @license lucide-react v0.562.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
5
5
  * See the LICENSE file in the root directory of this source tree.
6
- */const e=[["path",{d:"M19 17h2c.6 0 1-.4 1-1v-3c0-.9-.7-1.7-1.5-1.9C18.7 10.6 16 10 16 10s-1.3-1.4-2.2-2.3c-.5-.4-1.1-.7-1.8-.7H5c-.6 0-1.1.4-1.4.9l-1.4 2.9A3.7 3.7 0 0 0 2 12v4c0 .6.4 1 1 1h2",key:"5owen"}],["circle",{cx:"7",cy:"17",r:"2",key:"u2ysq9"}],["path",{d:"M9 17h6",key:"r8uit2"}],["circle",{cx:"17",cy:"17",r:"2",key:"axvx0g"}]],o=c("car",e);export{o as C};
6
+ */const e=[["path",{d:"M19 17h2c.6 0 1-.4 1-1v-3c0-.9-.7-1.7-1.5-1.9C18.7 10.6 16 10 16 10s-1.3-1.4-2.2-2.3c-.5-.4-1.1-.7-1.8-.7H5c-.6 0-1.1.4-1.4.9l-1.4 2.9A3.7 3.7 0 0 0 2 12v4c0 .6.4 1 1 1h2",key:"5owen"}],["circle",{cx:"7",cy:"17",r:"2",key:"u2ysq9"}],["path",{d:"M9 17h6",key:"r8uit2"}],["circle",{cx:"17",cy:"17",r:"2",key:"axvx0g"}]],a=c("car",e);export{a as C};
@@ -1,4 +1,4 @@
1
- import{m as c}from"./iframe-ku_diR98.js";/**
1
+ import{a1 as c}from"./iframe-B0t_86Ff.js";/**
2
2
  * @license lucide-react v0.562.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- import{t as y,r as s,b as d}from"./iframe-ku_diR98.js";import{k as h,j as m}from"./visibility-CyRoLvg5-CxslMJYX.js";import{u as c,l as b,s as g}from"./copy-from-record-DL503itm-B7hBbUhh.js";import"./types-LUGvo5ic-CB-wcgK3.js";import"./validation-ELW00AsL-ytOMlsxG.js";import"./check-BiNh2j82.js";var O=y({CopyApplicantOffer:()=>k}),f={Demographics:{kind:"applicant",heading:"Are you one of the drivers?",body:"We'll reuse the details you already gave for them, so you don't type them twice.",applyLabel:"Use these details"},Ssn:{kind:"applicantSsn",heading:"Are you one of the drivers?",body:"We can reuse the Social Security number you already entered for them.",applyLabel:"Use the SSN"}},k=({stage:r,questions:n,values:t,onPatch:u})=>{let e=f[r],i=s.useMemo(()=>e?h(n,t,r):[],[e,n,t,r]),o=s.useCallback(a=>e?c({kind:e.kind,source:m(t,"drivers")[a]??{},targetQuestions:i}):{},[e,t,i]),l=s.useMemo(()=>e?b(t).filter(a=>Object.keys(o(a.index)).length>0):[],[e,t,o]);return!e||!l.length?null:d.jsx(g,{heading:e.heading,body:e.body,applyLabel:e.applyLabel,candidates:l,onApply:a=>{let p=o(a);return u(p),Object.keys(p).length}})};export{O as n,k as t};
1
+ import{t as y,G as s,I as d}from"./iframe-B0t_86Ff.js";import{k as h,j as m}from"./visibility-iwttXt0y-DdU95s24.js";import{u as c,l as b,s as g}from"./copy-from-record-DL503itm-uUs1HZ1W.js";import"./types-LUGvo5ic-CB-wcgK3.js";import"./validation-Db4WCn17-CWj8NSXn.js";import"./check-COpOqcK1.js";var O=y({CopyApplicantOffer:()=>k}),f={Demographics:{kind:"applicant",heading:"Are you one of the drivers?",body:"We'll reuse the details you already gave for them, so you don't type them twice.",applyLabel:"Use these details"},Ssn:{kind:"applicantSsn",heading:"Are you one of the drivers?",body:"We can reuse the Social Security number you already entered for them.",applyLabel:"Use the SSN"}},k=({stage:r,questions:n,values:t,onPatch:u})=>{let e=f[r],i=s.useMemo(()=>e?h(n,t,r):[],[e,n,t,r]),o=s.useCallback(a=>e?c({kind:e.kind,source:m(t,"drivers")[a]??{},targetQuestions:i}):{},[e,t,i]),l=s.useMemo(()=>e?b(t).filter(a=>Object.keys(o(a.index)).length>0):[],[e,t,o]);return!e||!l.length?null:d.jsx(g,{heading:e.heading,body:e.body,applyLabel:e.applyLabel,candidates:l,onApply:a=>{let p=o(a);return u(p),Object.keys(p).length}})};export{O as n,k as t};
@@ -1,6 +1,6 @@
1
- import{m as f,I as g,r as _,b as t,f as b}from"./iframe-ku_diR98.js";import{j}from"./visibility-CyRoLvg5-CxslMJYX.js";import{k as y}from"./validation-ELW00AsL-ytOMlsxG.js";import{C as v}from"./check-BiNh2j82.js";/**
1
+ import{a1 as f,ab as g,G as _,I as t,K as b}from"./iframe-B0t_86Ff.js";import{j}from"./visibility-iwttXt0y-DdU95s24.js";import{k as y}from"./validation-Db4WCn17-CWj8NSXn.js";import{C as v}from"./check-COpOqcK1.js";/**
2
2
  * @license lucide-react v0.562.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
5
5
  * See the LICENSE file in the root directory of this source tree.
6
- */const N=[["path",{d:"M2 21a8 8 0 0 1 13.292-6",key:"bjp14o"}],["circle",{cx:"10",cy:"8",r:"5",key:"o932ke"}],["path",{d:"m16 19 2 2 4-4",key:"1b14m6"}]],k=f("user-round-check",N);var K={applicant:{gender:"gender",marital_status:"marital_status",employment_industry:"industry",occupation:"occupation"},applicantSsn:{social_security_number:"social_security_number"},coApplicant:{co_applicant_first_name:"first_name",co_applicant_middle_name:"middle_name",co_applicant_last_name:"last_name",co_applicant_date_of_birth:"date_of_birth",co_applicant_gender:"gender",co_applicant_marital_status:"marital_status",co_applicant_employment_industry:"industry",co_applicant_occupation:"occupation",co_applicant_relationship:"relationship_to_insured"},driverFromApplicant:{first_name:"first_name",last_name:"last_name",date_of_birth:"date_of_birth",gender:"gender",marital_status:"marital_status",industry:"employment_industry",occupation:"occupation",social_security_number:"social_security_number"}},S={applicant:{industryKey:"employment_industry",occupationKey:"occupation"},coApplicant:{industryKey:"co_applicant_employment_industry",occupationKey:"co_applicant_occupation"},driverFromApplicant:{industryKey:"industry",occupationKey:"occupation"}},w={Separated:["Seperated"],Seperated:["Separated"],DomesticPartner:["Domestic Partner"],"Domestic Partner":["DomesticPartner"]},A=(a,s)=>{let e=a.options;if(!Array.isArray(e)||e.length===0)return s;let n=String(s);return e.includes(n)?s:(w[n]??[]).find(c=>e.includes(c))},h=(a,s="")=>[a[`${s}first_name`],a[`${s}last_name`]].map(e=>String(e??"").trim()).filter(Boolean).join(" "),P=a=>h(a),M=(a,s={})=>j(a,"drivers").flatMap((e,n)=>{if(s.exclude?.(e,n))return[];let c=h(e);return c||!y(e.date_of_birth)?[{index:n,name:c||`Driver ${n+1}`}]:[]}),U=({kind:a,source:s,targetQuestions:e})=>{let n=new Map(e.map(d=>[d.key,d])),c={};for(let[d,o]of Object.entries(K[a])){let p=n.get(d);if(!p)continue;let m=s[o];if(y(m,p.inputType))continue;let l=A(p,m);l!==void 0&&(c[d]=l)}let i=S[a];return i&&c[i.occupationKey]!==void 0&&(g(c[i.industryKey])?.includes(String(c[i.occupationKey]))||delete c[i.occupationKey]),c},E=({heading:a,body:s,candidates:e,applyLabel:n="Use these details",onApply:c})=>{let[i,d]=_.useState(e[0]?.index??0),[o,p]=_.useState(null);if(!e.length)return null;if(o)return t.jsxs("p",{className:"cds-mb-4 cds-flex cds-items-center cds-gap-2 cds-text-sm cds-text-fg-muted","aria-live":"polite",children:[t.jsx(v,{"aria-hidden":"true",className:"cds-h-4 cds-w-4 cds-shrink-0 cds-text-accent"}),"Filled ",o.count," ",o.count===1?"answer":"answers"," from ",t.jsx("span",{"data-credify-redact":!0,children:o.name}),". Change anything below that is not right."]});let m=()=>{let r=e.find(x=>x.index===i)??e[0];if(!r)return;let u=c(r.index);u>0&&p({name:r.name,count:u})},l=e.length===1?e[0]:void 0;return t.jsx("div",{className:"cds-mb-5 cds-rounded-xl cds-border cds-border-accent/40 cds-bg-highlight cds-p-4",children:t.jsxs("div",{className:"cds-flex cds-items-start cds-gap-3",children:[t.jsx(k,{"aria-hidden":"true",className:"cds-mt-0.5 cds-h-5 cds-w-5 cds-shrink-0 cds-text-accent"}),t.jsxs("div",{className:"cds-min-w-0 cds-flex-1",children:[t.jsx("h3",{className:"cds-text-sm cds-font-bold cds-text-fg",children:a}),t.jsx("p",{className:"cds-mt-0.5 cds-text-sm cds-text-fg-muted",children:s}),l?null:t.jsxs("fieldset",{className:"cds-mt-3",children:[t.jsx("legend",{className:"sr-only",children:a}),t.jsx("div",{className:"cds-space-y-1.5",children:e.map(r=>t.jsxs("label",{className:"cds-flex cds-cursor-pointer cds-items-center cds-gap-2 cds-text-sm cds-text-fg",children:[t.jsx("input",{type:"radio",name:`copy-source-${a.replace(/\W+/g,"-")}`,checked:i===r.index,onChange:()=>d(r.index)}),t.jsx("span",{"data-credify-redact":!0,className:"cds-font-semibold",children:r.name})]},r.index))})]}),t.jsx("button",{type:"button",onClick:m,className:`cds-mt-4 cds-rounded-lg cds-bg-accent cds-px-4 cds-py-2 cds-text-sm cds-font-bold cds-text-primary-foreground hover:cds-bg-accent ${b}`,children:l?t.jsxs(t.Fragment,{children:[n," from ",t.jsx("span",{"data-credify-redact":!0,children:l.name})]}):n})]})]})})};export{k as U,P as c,M as l,E as s,U as u};
6
+ */const N=[["path",{d:"M2 21a8 8 0 0 1 13.292-6",key:"bjp14o"}],["circle",{cx:"10",cy:"8",r:"5",key:"o932ke"}],["path",{d:"m16 19 2 2 4-4",key:"1b14m6"}]],k=f("user-round-check",N);var K={applicant:{gender:"gender",marital_status:"marital_status",employment_industry:"industry",occupation:"occupation"},applicantSsn:{social_security_number:"social_security_number"},coApplicant:{co_applicant_first_name:"first_name",co_applicant_middle_name:"middle_name",co_applicant_last_name:"last_name",co_applicant_date_of_birth:"date_of_birth",co_applicant_gender:"gender",co_applicant_marital_status:"marital_status",co_applicant_employment_industry:"industry",co_applicant_occupation:"occupation",co_applicant_relationship:"relationship_to_insured"},driverFromApplicant:{first_name:"first_name",last_name:"last_name",date_of_birth:"date_of_birth",gender:"gender",marital_status:"marital_status",industry:"employment_industry",occupation:"occupation",social_security_number:"social_security_number"}},S={applicant:{industryKey:"employment_industry",occupationKey:"occupation"},coApplicant:{industryKey:"co_applicant_employment_industry",occupationKey:"co_applicant_occupation"},driverFromApplicant:{industryKey:"industry",occupationKey:"occupation"}},w={Separated:["Seperated"],Seperated:["Separated"],DomesticPartner:["Domestic Partner"],"Domestic Partner":["DomesticPartner"]},A=(a,c)=>{let e=a.options;if(!Array.isArray(e)||e.length===0)return c;let n=String(c);return e.includes(n)?c:(w[n]??[]).find(s=>e.includes(s))},h=(a,c="")=>[a[`${c}first_name`],a[`${c}last_name`]].map(e=>String(e??"").trim()).filter(Boolean).join(" "),P=a=>h(a),I=(a,c={})=>j(a,"drivers").flatMap((e,n)=>{if(c.exclude?.(e,n))return[];let s=h(e);return s||!y(e.date_of_birth)?[{index:n,name:s||`Driver ${n+1}`}]:[]}),M=({kind:a,source:c,targetQuestions:e})=>{let n=new Map(e.map(d=>[d.key,d])),s={};for(let[d,o]of Object.entries(K[a])){let p=n.get(d);if(!p)continue;let m=c[o];if(y(m,p.inputType))continue;let l=A(p,m);l!==void 0&&(s[d]=l)}let i=S[a];return i&&s[i.occupationKey]!==void 0&&(g(s[i.industryKey])?.includes(String(s[i.occupationKey]))||delete s[i.occupationKey]),s},U=({heading:a,body:c,candidates:e,applyLabel:n="Use these details",onApply:s})=>{let[i,d]=_.useState(e[0]?.index??0),[o,p]=_.useState(null);if(!e.length)return null;if(o)return t.jsxs("p",{className:"cds-mb-4 cds-flex cds-items-center cds-gap-2 cds-text-sm cds-text-fg-muted","aria-live":"polite",children:[t.jsx(v,{"aria-hidden":"true",className:"cds-h-4 cds-w-4 cds-shrink-0 cds-text-accent"}),"Filled ",o.count," ",o.count===1?"answer":"answers"," from ",t.jsx("span",{"data-credify-redact":!0,children:o.name}),". Change anything below that is not right."]});let m=()=>{let r=e.find(x=>x.index===i)??e[0];if(!r)return;let u=s(r.index);u>0&&p({name:r.name,count:u})},l=e.length===1?e[0]:void 0;return t.jsx("div",{className:"cds-mb-5 cds-rounded-xl cds-border cds-border-accent/40 cds-bg-highlight cds-p-4",children:t.jsxs("div",{className:"cds-flex cds-items-start cds-gap-3",children:[t.jsx(k,{"aria-hidden":"true",className:"cds-mt-0.5 cds-h-5 cds-w-5 cds-shrink-0 cds-text-accent"}),t.jsxs("div",{className:"cds-min-w-0 cds-flex-1",children:[t.jsx("h3",{className:"cds-text-sm cds-font-bold cds-text-fg",children:a}),t.jsx("p",{className:"cds-mt-0.5 cds-text-sm cds-text-fg-muted",children:c}),l?null:t.jsxs("fieldset",{className:"cds-mt-3",children:[t.jsx("legend",{className:"sr-only",children:a}),t.jsx("div",{className:"cds-space-y-1.5",children:e.map(r=>t.jsxs("label",{className:"cds-flex cds-cursor-pointer cds-items-center cds-gap-2 cds-text-sm cds-text-fg",children:[t.jsx("input",{type:"radio",name:`copy-source-${a.replace(/\W+/g,"-")}`,checked:i===r.index,onChange:()=>d(r.index)}),t.jsx("span",{"data-credify-redact":!0,className:"cds-font-semibold",children:r.name})]},r.index))})]}),t.jsx("button",{type:"button",onClick:m,className:`cds-mt-4 cds-rounded-lg cds-bg-accent cds-px-4 cds-py-2 cds-text-sm cds-font-bold cds-text-primary-foreground hover:cds-bg-accent ${b}`,children:l?t.jsxs(t.Fragment,{children:[n," from ",t.jsx("span",{"data-credify-redact":!0,children:l.name})]}):n})]})]})})};export{k as U,P as c,I as l,U as s,M as u};
@@ -1 +1 @@
1
- import{t as E}from"./iframe-ku_diR98.js";var b=E({COVERAGE_EDITED_KEY:()=>o,COVERAGE_SHARE_OF_DWELLING:()=>i,DWELLING_KEY:()=>s,PURCHASE_PRICE_KEY:()=>d,backfillRelatedCoverages:()=>g,coverageSharePercent:()=>p,deriveRelatedCoverages:()=>C,derivedCoverageAmount:()=>u,isCoverageEdited:()=>f,markCoverageEdited:()=>m,seedHomeCoverages:()=>A}),i={other_structures_coverage:.1,personal_property_coverage:.5,loss_of_use_coverage:.2},s="dwelling_replacement_cost",d="sale_price_cents",o="__coverage_edited",_=500,u=(r,e)=>Math.round(r*e/_)*_,p=r=>{let e=i[r];return e===void 0?null:Math.round(e*100)},c=r=>{let e=r[o];return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]},f=(r,e)=>c(r).includes(e),a=r=>{let e=String(r??"").replace(/\D/g,"");if(!e)return null;let t=Number(e);return Number.isFinite(t)&&t>0?t:null},m=(r,e,t)=>{if(i[e]===void 0)return{};let l=c(r);return a(t)===null?l.includes(e)?{[o]:l.filter(n=>n!==e)}:{}:l.includes(e)?{}:{[o]:[...l,e]}},C=(r,e)=>{let t=a(e);if(t===null)return{};let l={};for(let[n,v]of Object.entries(i))f(r,n)||(l[n]=u(t,v));return l},g=r=>{let e=a(r[s]);if(e===null)return{};let t={};for(let[l,n]of Object.entries(i))a(r[l])===null&&(t[l]=u(e,n));return t},A=r=>{let e={};if(a(r.dwelling_replacement_cost)===null){let t=a(r[d]);t!==null&&(e[s]=t)}return{...e,...g({...r,...e})}};export{g as a,C as c,m as d,A as f,d as i,u as l,i as n,b as o,s as r,p as s,o as t,f as u};
1
+ import{t as E}from"./iframe-B0t_86Ff.js";var b=E({COVERAGE_EDITED_KEY:()=>o,COVERAGE_SHARE_OF_DWELLING:()=>i,DWELLING_KEY:()=>s,PURCHASE_PRICE_KEY:()=>d,backfillRelatedCoverages:()=>g,coverageSharePercent:()=>p,deriveRelatedCoverages:()=>C,derivedCoverageAmount:()=>u,isCoverageEdited:()=>f,markCoverageEdited:()=>m,seedHomeCoverages:()=>A}),i={other_structures_coverage:.1,personal_property_coverage:.5,loss_of_use_coverage:.2},s="dwelling_replacement_cost",d="sale_price_cents",o="__coverage_edited",_=500,u=(r,e)=>Math.round(r*e/_)*_,p=r=>{let e=i[r];return e===void 0?null:Math.round(e*100)},c=r=>{let e=r[o];return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]},f=(r,e)=>c(r).includes(e),a=r=>{let e=String(r??"").replace(/\D/g,"");if(!e)return null;let t=Number(e);return Number.isFinite(t)&&t>0?t:null},m=(r,e,t)=>{if(i[e]===void 0)return{};let l=c(r);return a(t)===null?l.includes(e)?{[o]:l.filter(n=>n!==e)}:{}:l.includes(e)?{}:{[o]:[...l,e]}},C=(r,e)=>{let t=a(e);if(t===null)return{};let l={};for(let[n,v]of Object.entries(i))f(r,n)||(l[n]=u(t,v));return l},g=r=>{let e=a(r[s]);if(e===null)return{};let t={};for(let[l,n]of Object.entries(i))a(r[l])===null&&(t[l]=u(e,n));return t},A=r=>{let e={};if(a(r.dwelling_replacement_cost)===null){let t=a(r[d]);t!==null&&(e[s]=t)}return{...e,...g({...r,...e})}};export{g as a,C as c,m as d,A as f,d as i,u as l,i as n,b as o,s as r,p as s,o as t,f as u};