@getcredify/credify-insurance-widget 1.41.1 → 1.42.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 (65) hide show
  1. package/README.md +91 -0
  2. package/dist/address-BEVwov8q-C8G87tij.js +59 -0
  3. package/dist/api-C7f0dnt7.js +51 -0
  4. package/dist/car-B0hJrE0Z.js +26 -0
  5. package/dist/check-Dfh9u4c0.js +15 -0
  6. package/dist/copy-applicant-offer-B-BIN2o5-BX-QE7Ao.js +56 -0
  7. package/dist/copy-from-record-BNP6CFFR-Bcb9EW-a.js +189 -0
  8. package/dist/core-Po4qPIof-fZL0sXdW.js +417 -0
  9. package/dist/coverageDerivation-CV2ORogj-CAthw76f.js +76 -0
  10. package/dist/credify-insurance-widget.css +1 -1
  11. package/dist/{fixtures-ijbZ16Zg-BfdDTLYu.js → fixtures-ijbZ16Zg-Csnryzo8.js} +1 -1
  12. package/dist/household-prefill-DVLBBva1-GGgzEdDL.js +151 -0
  13. package/dist/householdPrefill-DLm3pxFH-B34UGBGP.js +111 -0
  14. package/dist/iframe/assets/address-BEVwov8q-BpbNiia-.js +1 -0
  15. package/dist/iframe/assets/car-DkfXVYz0.js +6 -0
  16. package/dist/iframe/assets/check-l6TGSrXO.js +6 -0
  17. package/dist/iframe/assets/copy-applicant-offer-B-BIN2o5-cs-SCWuH.js +1 -0
  18. package/dist/iframe/assets/copy-from-record-BNP6CFFR-BtCRUQRw.js +6 -0
  19. package/dist/iframe/assets/core-Po4qPIof-jDmdAxP7.js +16 -0
  20. package/dist/iframe/assets/coverageDerivation-CV2ORogj-DhQFAhwv.js +1 -0
  21. package/dist/iframe/assets/dob-calendar-RIJ5S6YU-DO_r0-z3.js +1 -0
  22. package/dist/iframe/assets/{fixtures-ijbZ16Zg-DbpkZfa3.js → fixtures-ijbZ16Zg-CUQxYANz.js} +1 -1
  23. package/dist/iframe/assets/household-prefill-DVLBBva1-DTK1EHT0.js +1 -0
  24. package/dist/iframe/assets/householdPrefill-DLm3pxFH-BM54Rqyd.js +6 -0
  25. package/dist/iframe/assets/iframe-BImWklE9.js +107 -0
  26. package/dist/iframe/assets/iframe-Bl0qTZgO.css +1 -0
  27. package/dist/iframe/assets/index-CNb9AhPB.js +6 -0
  28. package/dist/iframe/assets/intake-review-panel-B7rXvRvm-wNGntinn.js +1 -0
  29. package/dist/iframe/assets/{mockJump-CL8w249w-Bp9W72n5.js → mockJump-DpXrnQUq-DKyp2H5R.js} +1 -1
  30. package/dist/iframe/assets/payload-JXpCaeS6-CcfrGvLo.js +1 -0
  31. package/dist/iframe/assets/question-list-ChcBzofd-D5ZVofFR.js +317 -0
  32. package/dist/iframe/assets/rates-panel-BaIzEqX6-GSsykLkc.js +17 -0
  33. package/dist/iframe/assets/review-panel-DYCuhwdo-CyBebe6T.js +6 -0
  34. package/dist/iframe/assets/stage-Bpq1A5xB-CwZgWOhp.js +1 -0
  35. package/dist/iframe/assets/types-LUGvo5ic-CB-wcgK3.js +1 -0
  36. package/dist/iframe/assets/validation-DRqHT-u7-pY2KjHw4.js +3 -0
  37. package/dist/iframe/assets/vehicleCoverage-BPJaWQyg-DBJ_jL3e.js +1 -0
  38. package/dist/iframe/assets/visibility-hEdBjgi7-_AUGO8E2.js +1 -0
  39. package/dist/iframe/iframe.html +2 -2
  40. package/dist/index-CQXR1Un8.js +354 -0
  41. package/dist/index.d.ts +16 -0
  42. package/dist/index.es.js +4 -4
  43. package/dist/index.umd.js +105 -115
  44. package/dist/intake-review-panel-B7rXvRvm-CDyR-rVg.js +186 -0
  45. package/dist/{mockJump-CL8w249w-1jjBaNyK.js → mockJump-DpXrnQUq-BaitU9aZ.js} +1 -1
  46. package/dist/payload-JXpCaeS6-pjITtvlm.js +128 -0
  47. package/dist/question-list-ChcBzofd-fVRN9fTl.js +6505 -0
  48. package/dist/rates-panel-BaIzEqX6-BULjKxqz.js +1001 -0
  49. package/dist/review-panel-DYCuhwdo-BImR4S06.js +903 -0
  50. package/dist/stage-Bpq1A5xB-Cphc07aC.js +197 -0
  51. package/dist/types-LUGvo5ic-CiVRcsV9.js +9 -0
  52. package/dist/utils/assets.d.ts +12 -0
  53. package/dist/utils/branding.d.ts +21 -0
  54. package/dist/utils/partner.d.ts +32 -0
  55. package/dist/utils/support/bland.d.ts +5 -0
  56. package/dist/validation-DRqHT-u7-CL2m7f4k.js +2852 -0
  57. package/dist/vehicleCoverage-BPJaWQyg-g7bBFmro.js +144 -0
  58. package/dist/visibility-hEdBjgi7-WW4BVjmf.js +198 -0
  59. package/dist/widget-BUAzkBEK.js +13061 -0
  60. package/package.json +2 -2
  61. package/dist/api-Cjj6Dfhg.js +0 -51
  62. package/dist/iframe/assets/dob-calendar-RIJ5S6YU-DMJbmHdB.js +0 -1
  63. package/dist/iframe/assets/iframe-DFqQdMHv.css +0 -1
  64. package/dist/iframe/assets/iframe-iPSy7w5L.js +0 -494
  65. package/dist/widget-Umfy69_M.js +0 -27318
@@ -0,0 +1,903 @@
1
+ var Ce = (n) => {
2
+ throw TypeError(n);
3
+ };
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), J = (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 $, ah as K, t as Be, R as ye, G as Re, X as Ge, ai as Fe, U as te } from "./widget-BUAzkBEK.js";
7
+ import { o as Ue, n as We, r as Ye } from "./stage-Bpq1A5xB-Cphc07aC.js";
8
+ import * as l from "react";
9
+ import { jsx as i, jsxs as M, Fragment as Xe } from "react/jsx-runtime";
10
+ import { c as q, u as oe, a as we, P as z, b as Ne, d as Je, e as Qe, C as Ze } from "./index-CQXR1Un8.js";
11
+ (function() {
12
+ if (typeof n > "u")
13
+ var n = { env: {} };
14
+ })();
15
+ /**
16
+ * @license lucide-react v0.562.0 - ISC
17
+ *
18
+ * This source code is licensed under the ISC license.
19
+ * See the LICENSE file in the root directory of this source tree.
20
+ */
21
+ const et = [
22
+ [
23
+ "path",
24
+ {
25
+ d: "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",
26
+ key: "1a8usu"
27
+ }
28
+ ],
29
+ ["path", { d: "m15 5 4 4", key: "1mk7zo" }]
30
+ ], tt = He("pencil", et);
31
+ var ot = Object.defineProperty, y = (n, o) => ot(n, "name", { value: o, configurable: !0 });
32
+ // @__NO_SIDE_EFFECTS__
33
+ function _e(n) {
34
+ const o = n + "CollectionProvider", [e, t] = q(o), [s, r] = e(
35
+ o,
36
+ { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
37
+ ), c = /* @__PURE__ */ y((b) => {
38
+ const { scope: v, children: I } = b, A = l.useRef(null), u = l.useRef(/* @__PURE__ */ new Map()).current;
39
+ return /* @__PURE__ */ i(s, { scope: v, itemMap: u, collectionRef: A, children: I });
40
+ }, "CollectionProvider");
41
+ c.displayName = o;
42
+ const d = n + "CollectionSlot", f = K(d), p = l.forwardRef(
43
+ (b, v) => {
44
+ const { scope: I, children: A } = b, u = r(d, I), m = $(v, u.collectionRef);
45
+ return /* @__PURE__ */ i(f, { ref: m, children: A });
46
+ }
47
+ );
48
+ p.displayName = d;
49
+ const a = n + "CollectionItemSlot", h = "data-radix-collection-item", g = K(a), N = l.forwardRef(
50
+ (b, v) => {
51
+ const { scope: I, children: A, ...u } = b, m = l.useRef(null), E = $(v, m), _ = r(a, I);
52
+ return l.useEffect(() => (_.itemMap.set(m, { ref: m, ...u }), () => void _.itemMap.delete(m))), /* @__PURE__ */ i(g, { [h]: "", ref: E, children: A });
53
+ }
54
+ );
55
+ N.displayName = a;
56
+ function C(b) {
57
+ const v = r(n + "CollectionConsumer", b);
58
+ return l.useCallback(() => {
59
+ const A = v.collectionRef.current;
60
+ if (!A) return [];
61
+ const u = Array.from(A.querySelectorAll(`[${h}]`));
62
+ return Array.from(v.itemMap.values()).sort(
63
+ (_, P) => u.indexOf(_.ref.current) - u.indexOf(P.ref.current)
64
+ );
65
+ }, [v.collectionRef, v.itemMap]);
66
+ }
67
+ return y(C, "useCollection"), [
68
+ { Provider: c, Slot: p, ItemSlot: N },
69
+ C,
70
+ t
71
+ ];
72
+ }
73
+ y(_e, "createCollection");
74
+ var Ie = /* @__PURE__ */ new WeakMap(), x, S, Q = (S = class extends Map {
75
+ constructor(e) {
76
+ super(e);
77
+ xe(this, x);
78
+ J(this, x, [...super.keys()]), Ie.set(this, !0);
79
+ }
80
+ set(e, t) {
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;
82
+ }
83
+ insert(e, t, s) {
84
+ const r = this.has(t), c = w(this, x).length, d = ne(e);
85
+ let f = d >= 0 ? d : c + d;
86
+ const p = f < 0 || f >= c ? -1 : f;
87
+ if (p === this.size || r && p === this.size - 1 || p === -1)
88
+ return this.set(t, s), this;
89
+ const a = this.size + (r ? 0 : 1);
90
+ d < 0 && f++;
91
+ const h = [...w(this, x)];
92
+ let g, N = !1;
93
+ for (let C = f; C < a; C++)
94
+ if (f === C) {
95
+ let b = h[C];
96
+ h[C] === t && (b = h[C + 1]), r && this.delete(t), g = this.get(b), this.set(t, s);
97
+ } else {
98
+ !N && h[C - 1] === t && (N = !0);
99
+ const b = h[N ? C : C - 1], v = g;
100
+ g = this.get(b), this.delete(b), this.set(b, v);
101
+ }
102
+ return this;
103
+ }
104
+ with(e, t, s) {
105
+ const r = new S(this);
106
+ return r.insert(e, t, s), r;
107
+ }
108
+ before(e) {
109
+ const t = w(this, x).indexOf(e) - 1;
110
+ if (!(t < 0))
111
+ return this.entryAt(t);
112
+ }
113
+ /**
114
+ * Sets a new key-value pair at the position before the given key.
115
+ */
116
+ setBefore(e, t, s) {
117
+ const r = w(this, x).indexOf(e);
118
+ return r === -1 ? this : this.insert(r, t, s);
119
+ }
120
+ after(e) {
121
+ let t = w(this, x).indexOf(e);
122
+ if (t = t === -1 || t === this.size - 1 ? -1 : t + 1, t !== -1)
123
+ return this.entryAt(t);
124
+ }
125
+ /**
126
+ * Sets a new key-value pair at the position after the given key.
127
+ */
128
+ setAfter(e, t, s) {
129
+ const r = w(this, x).indexOf(e);
130
+ return r === -1 ? this : this.insert(r + 1, t, s);
131
+ }
132
+ first() {
133
+ return this.entryAt(0);
134
+ }
135
+ last() {
136
+ return this.entryAt(-1);
137
+ }
138
+ clear() {
139
+ return J(this, x, []), super.clear();
140
+ }
141
+ delete(e) {
142
+ const t = super.delete(e);
143
+ return t && w(this, x).splice(w(this, x).indexOf(e), 1), t;
144
+ }
145
+ deleteAt(e) {
146
+ const t = this.keyAt(e);
147
+ return t !== void 0 ? this.delete(t) : !1;
148
+ }
149
+ at(e) {
150
+ const t = V(w(this, x), e);
151
+ if (t !== void 0)
152
+ return this.get(t);
153
+ }
154
+ entryAt(e) {
155
+ const t = V(w(this, x), e);
156
+ if (t !== void 0)
157
+ return [t, this.get(t)];
158
+ }
159
+ indexOf(e) {
160
+ return w(this, x).indexOf(e);
161
+ }
162
+ keyAt(e) {
163
+ return V(w(this, x), e);
164
+ }
165
+ from(e, t) {
166
+ const s = this.indexOf(e);
167
+ if (s === -1)
168
+ return;
169
+ let r = s + t;
170
+ return r < 0 && (r = 0), r >= this.size && (r = this.size - 1), this.at(r);
171
+ }
172
+ keyFrom(e, t) {
173
+ const s = this.indexOf(e);
174
+ if (s === -1)
175
+ return;
176
+ let r = s + t;
177
+ return r < 0 && (r = 0), r >= this.size && (r = this.size - 1), this.keyAt(r);
178
+ }
179
+ find(e, t) {
180
+ let s = 0;
181
+ for (const r of this) {
182
+ if (Reflect.apply(e, t, [r, s, this]))
183
+ return r;
184
+ s++;
185
+ }
186
+ }
187
+ findIndex(e, t) {
188
+ let s = 0;
189
+ for (const r of this) {
190
+ if (Reflect.apply(e, t, [r, s, this]))
191
+ return s;
192
+ s++;
193
+ }
194
+ return -1;
195
+ }
196
+ filter(e, t) {
197
+ const s = [];
198
+ let r = 0;
199
+ for (const c of this)
200
+ Reflect.apply(e, t, [c, r, this]) && s.push(c), r++;
201
+ return new S(s);
202
+ }
203
+ map(e, t) {
204
+ const s = [];
205
+ let r = 0;
206
+ for (const c of this)
207
+ s.push([c[0], Reflect.apply(e, t, [c, r, this])]), r++;
208
+ return new S(s);
209
+ }
210
+ reduce(...e) {
211
+ const [t, s] = e;
212
+ let r = 0, c = s ?? this.at(0);
213
+ for (const d of this)
214
+ r === 0 && e.length === 1 ? c = d : c = Reflect.apply(t, this, [c, d, r, this]), r++;
215
+ return c;
216
+ }
217
+ reduceRight(...e) {
218
+ const [t, s] = e;
219
+ let r = s ?? this.at(-1);
220
+ for (let c = this.size - 1; c >= 0; c--) {
221
+ const d = this.at(c);
222
+ c === this.size - 1 && e.length === 1 ? r = d : r = Reflect.apply(t, this, [r, d, c, this]);
223
+ }
224
+ return r;
225
+ }
226
+ toSorted(e) {
227
+ const t = [...this.entries()].sort(e);
228
+ return new S(t);
229
+ }
230
+ toReversed() {
231
+ const e = new S();
232
+ for (let t = this.size - 1; t >= 0; t--) {
233
+ const s = this.keyAt(t), r = this.get(s);
234
+ e.set(s, r);
235
+ }
236
+ return e;
237
+ }
238
+ toSpliced(...e) {
239
+ const t = [...this.entries()];
240
+ return t.splice(...e), new S(t);
241
+ }
242
+ slice(e, t) {
243
+ const s = new S();
244
+ let r = this.size - 1;
245
+ if (e === void 0)
246
+ return s;
247
+ e < 0 && (e = e + this.size), t !== void 0 && t > 0 && (r = t - 1);
248
+ for (let c = e; c <= r; c++) {
249
+ const d = this.keyAt(c), f = this.get(d);
250
+ s.set(d, f);
251
+ }
252
+ return s;
253
+ }
254
+ every(e, t) {
255
+ let s = 0;
256
+ for (const r of this) {
257
+ if (!Reflect.apply(e, t, [r, s, this]))
258
+ return !1;
259
+ s++;
260
+ }
261
+ return !0;
262
+ }
263
+ some(e, t) {
264
+ let s = 0;
265
+ for (const r of this) {
266
+ if (Reflect.apply(e, t, [r, s, this]))
267
+ return !0;
268
+ s++;
269
+ }
270
+ return !1;
271
+ }
272
+ }, x = new WeakMap(), y(S, "OrderedDict"), S);
273
+ function V(n, o) {
274
+ if ("at" in Array.prototype)
275
+ return Array.prototype.at.call(n, o);
276
+ const e = Pe(n, o);
277
+ return e === -1 ? void 0 : n[e];
278
+ }
279
+ y(V, "at");
280
+ function Pe(n, o) {
281
+ const e = n.length, t = ne(o), s = t >= 0 ? t : e + t;
282
+ return s < 0 || s >= e ? -1 : s;
283
+ }
284
+ y(Pe, "toSafeIndex");
285
+ function ne(n) {
286
+ return n !== n || n === 0 ? 0 : Math.trunc(n);
287
+ }
288
+ y(ne, "toSafeInteger");
289
+ // @__NO_SIDE_EFFECTS__
290
+ function nt(n) {
291
+ const o = n + "CollectionProvider", [e, t] = q(o), [s, r] = e(
292
+ o,
293
+ {
294
+ collectionElement: null,
295
+ collectionRef: { current: null },
296
+ collectionRefObject: { current: null },
297
+ itemMap: new Q(),
298
+ setItemMap: /* @__PURE__ */ y(() => {
299
+ }, "setItemMap")
300
+ }
301
+ ), c = /* @__PURE__ */ y(({ state: u, ...m }) => u ? /* @__PURE__ */ i(f, { ...m, state: u }) : /* @__PURE__ */ i(d, { ...m }), "CollectionProvider");
302
+ c.displayName = o;
303
+ const d = /* @__PURE__ */ y((u) => {
304
+ const m = v();
305
+ return /* @__PURE__ */ i(f, { ...u, state: m });
306
+ }, "CollectionInit");
307
+ d.displayName = o + "Init";
308
+ const f = /* @__PURE__ */ y((u) => {
309
+ const { scope: m, children: E, state: _ } = u, P = l.useRef(null), [k, R] = l.useState(
310
+ null
311
+ ), U = $(P, R), [W, Y] = _;
312
+ return l.useEffect(() => {
313
+ if (!k) return;
314
+ const L = Ee(() => {
315
+ });
316
+ return L.observe(k, {
317
+ childList: !0,
318
+ subtree: !0
319
+ }), () => {
320
+ L.disconnect();
321
+ };
322
+ }, [k]), /* @__PURE__ */ i(
323
+ s,
324
+ {
325
+ scope: m,
326
+ itemMap: W,
327
+ setItemMap: Y,
328
+ collectionRef: U,
329
+ collectionRefObject: P,
330
+ collectionElement: k,
331
+ children: E
332
+ }
333
+ );
334
+ }, "CollectionProviderImpl");
335
+ f.displayName = o + "Impl";
336
+ const p = n + "CollectionSlot", a = K(p), h = l.forwardRef(
337
+ (u, m) => {
338
+ const { scope: E, children: _ } = u, P = r(p, E), k = $(m, P.collectionRef);
339
+ return /* @__PURE__ */ i(a, { ref: k, children: _ });
340
+ }
341
+ );
342
+ h.displayName = p;
343
+ const g = n + "CollectionItemSlot", N = "data-radix-collection-item", C = K(g), b = l.forwardRef(
344
+ (u, m) => {
345
+ const { scope: E, children: _, ...P } = u, k = l.useRef(null), [R, U] = l.useState(null), W = $(m, k, U), Y = r(g, E), { setItemMap: L } = Y, X = l.useRef(P);
346
+ Se(X.current, P) || (X.current = P);
347
+ const ge = X.current;
348
+ return l.useEffect(() => {
349
+ const ve = ge;
350
+ return L((T) => R ? T.has(R) ? T.set(R, { ...ve, element: R }).toSorted(Z) : (T.set(R, { ...ve, element: R }), T.toSorted(Z)) : T), () => {
351
+ L((T) => !R || !T.has(R) ? T : (T.delete(R), new Q(T)));
352
+ };
353
+ }, [R, ge, L]), /* @__PURE__ */ i(C, { [N]: "", ref: W, children: _ });
354
+ }
355
+ );
356
+ b.displayName = g;
357
+ function v() {
358
+ return l.useState(new Q());
359
+ }
360
+ y(v, "useInitCollection");
361
+ function I(u) {
362
+ const { itemMap: m } = r(n + "CollectionConsumer", u);
363
+ return m;
364
+ }
365
+ return y(I, "useCollection"), [
366
+ { Provider: c, Slot: h, ItemSlot: b },
367
+ {
368
+ createCollectionScope: t,
369
+ useCollection: I,
370
+ useInitCollection: v
371
+ }
372
+ ];
373
+ }
374
+ y(nt, "createCollection");
375
+ function Se(n, o) {
376
+ if (n === o) return !0;
377
+ if (typeof n != "object" || typeof o != "object" || n == null || o == null) return !1;
378
+ const e = Object.keys(n), t = Object.keys(o);
379
+ if (e.length !== t.length) return !1;
380
+ for (const s of e)
381
+ if (!Object.prototype.hasOwnProperty.call(o, s) || n[s] !== o[s]) return !1;
382
+ return !0;
383
+ }
384
+ y(Se, "shallowEqual");
385
+ function Oe(n, o) {
386
+ return !!(o.compareDocumentPosition(n) & Node.DOCUMENT_POSITION_PRECEDING);
387
+ }
388
+ y(Oe, "isElementPreceding");
389
+ function Z(n, o) {
390
+ return !n[1].element || !o[1].element ? 0 : Oe(n[1].element, o[1].element) ? -1 : 1;
391
+ }
392
+ y(Z, "sortByDocumentPosition");
393
+ function Ee(n) {
394
+ return new MutationObserver((e) => {
395
+ for (const t of e)
396
+ if (t.type === "childList") {
397
+ n();
398
+ return;
399
+ }
400
+ });
401
+ }
402
+ y(Ee, "getChildListObserver");
403
+ var rt = Object.defineProperty, st = (n, o) => rt(n, "name", { value: o, configurable: !0 }), ct = l.createContext(void 0);
404
+ function Me(n) {
405
+ const o = l.useContext(ct);
406
+ return n || o || "ltr";
407
+ }
408
+ st(Me, "useDirection");
409
+ var it = Object.defineProperty, j = (n, o) => it(n, "name", { value: o, configurable: !0 }), re = "Collapsible", [lt, ke] = q(re), [at, se] = lt(re), dt = /* @__PURE__ */ l.forwardRef(
410
+ /* @__PURE__ */ j(function(o, e) {
411
+ const {
412
+ __scopeCollapsible: t,
413
+ open: s,
414
+ defaultOpen: r,
415
+ disabled: c,
416
+ onOpenChange: d,
417
+ ...f
418
+ } = o, [p, a] = oe({
419
+ prop: s,
420
+ defaultProp: r ?? !1,
421
+ onChange: d,
422
+ caller: re
423
+ });
424
+ return /* @__PURE__ */ i(
425
+ at,
426
+ {
427
+ scope: t,
428
+ disabled: c,
429
+ contentId: we(),
430
+ open: p,
431
+ onOpenToggle: l.useCallback(() => a((h) => !h), [a]),
432
+ children: /* @__PURE__ */ i(
433
+ z.div,
434
+ {
435
+ "data-state": H(p),
436
+ "data-disabled": c ? "" : void 0,
437
+ ...f,
438
+ ref: e
439
+ }
440
+ )
441
+ }
442
+ );
443
+ }, "Collapsible")
444
+ ), ut = "CollapsibleTrigger", ft = /* @__PURE__ */ l.forwardRef(
445
+ // blank line to reduce diff noise
446
+ /* @__PURE__ */ j(function(o, e) {
447
+ const { __scopeCollapsible: t, ...s } = o, r = se(ut, t);
448
+ return /* @__PURE__ */ i(
449
+ z.button,
450
+ {
451
+ type: "button",
452
+ "aria-controls": r.open ? r.contentId : void 0,
453
+ "aria-expanded": r.open || !1,
454
+ "data-state": H(r.open),
455
+ "data-disabled": r.disabled ? "" : void 0,
456
+ disabled: r.disabled,
457
+ ...s,
458
+ ref: e,
459
+ onClick: Ne(o.onClick, r.onOpenToggle)
460
+ }
461
+ );
462
+ }, "CollapsibleTrigger")
463
+ ), Te = "CollapsibleContent", pt = /* @__PURE__ */ l.forwardRef(
464
+ // blank line to reduce diff noise
465
+ /* @__PURE__ */ j(function(o, e) {
466
+ const { forceMount: t, ...s } = o, r = se(Te, o.__scopeCollapsible);
467
+ return /* @__PURE__ */ i(Je, { present: t || r.open, children: ({ present: c }) => /* @__PURE__ */ i(ht, { ...s, ref: e, present: c }) });
468
+ }, "CollapsibleContent")
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 = $(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
+ return l.useEffect(() => {
472
+ const u = requestAnimationFrame(() => I.current = !1);
473
+ return () => cancelAnimationFrame(u);
474
+ }, []), Qe(() => {
475
+ const u = a.current;
476
+ if (u) {
477
+ A.current = A.current || {
478
+ transitionDuration: u.style.transitionDuration,
479
+ animationName: u.style.animationName
480
+ }, u.style.transitionDuration = "0s", u.style.animationName = "none";
481
+ const m = u.getBoundingClientRect();
482
+ g.current = m.height, C.current = m.width, I.current || (u.style.transitionDuration = A.current.transitionDuration, u.style.animationName = A.current.animationName), p(s);
483
+ }
484
+ }, [d.open, s]), /* @__PURE__ */ i(
485
+ z.div,
486
+ {
487
+ "data-state": H(d.open),
488
+ "data-disabled": d.disabled ? "" : void 0,
489
+ id: d.contentId,
490
+ hidden: !v,
491
+ ...c,
492
+ ref: h,
493
+ style: {
494
+ "--radix-collapsible-content-height": N ? `${N}px` : void 0,
495
+ "--radix-collapsible-content-width": b ? `${b}px` : void 0,
496
+ ...o.style
497
+ },
498
+ children: v && r
499
+ }
500
+ );
501
+ }, "CollapsibleContentImpl"));
502
+ function H(n) {
503
+ return n ? "open" : "closed";
504
+ }
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, Gt] = q(D, [
507
+ yt,
508
+ ke
509
+ ]), ie = ke(), It = /* @__PURE__ */ l.forwardRef(
510
+ // blank line to reduce diff noise
511
+ /* @__PURE__ */ O(function(o, e) {
512
+ const { type: t, ...s } = o, r = s, c = s;
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
+ }, "Accordion")
515
+ ), [De, At] = B(D), [$e, Rt] = B(
516
+ D,
517
+ { collapsible: !1 }
518
+ ), wt = /* @__PURE__ */ l.forwardRef(
519
+ // blank line to reduce diff noise
520
+ /* @__PURE__ */ O(function(o, e) {
521
+ const {
522
+ value: t,
523
+ defaultValue: s,
524
+ onValueChange: r = /* @__PURE__ */ O(() => {
525
+ }, "onValueChange"),
526
+ collapsible: c = !1,
527
+ ...d
528
+ } = o, [f, p] = oe({
529
+ prop: t,
530
+ defaultProp: s ?? "",
531
+ onChange: r,
532
+ caller: D
533
+ });
534
+ return /* @__PURE__ */ i(
535
+ De,
536
+ {
537
+ scope: o.__scopeAccordion,
538
+ value: l.useMemo(() => f ? [f] : [], [f]),
539
+ onItemOpen: p,
540
+ onItemClose: l.useCallback(() => c && p(""), [c, p]),
541
+ children: /* @__PURE__ */ i($e, { scope: o.__scopeAccordion, collapsible: c, children: /* @__PURE__ */ i(Le, { ...d, ref: e }) })
542
+ }
543
+ );
544
+ }, "AccordionImplSingle")
545
+ ), Nt = /* @__PURE__ */ l.forwardRef(/* @__PURE__ */ O(function(o, e) {
546
+ const {
547
+ value: t,
548
+ defaultValue: s,
549
+ onValueChange: r = /* @__PURE__ */ O(() => {
550
+ }, "onValueChange"),
551
+ ...c
552
+ } = o, [d, f] = oe({
553
+ prop: t,
554
+ defaultProp: s ?? [],
555
+ onChange: r,
556
+ caller: D
557
+ }), p = l.useCallback(
558
+ (h) => f((g = []) => [...g, h]),
559
+ [f]
560
+ ), a = l.useCallback(
561
+ (h) => f((g = []) => g.filter((N) => N !== h)),
562
+ [f]
563
+ );
564
+ return /* @__PURE__ */ i(
565
+ De,
566
+ {
567
+ scope: o.__scopeAccordion,
568
+ value: d,
569
+ onItemOpen: p,
570
+ onItemClose: a,
571
+ children: /* @__PURE__ */ i($e, { scope: o.__scopeAccordion, collapsible: !0, children: /* @__PURE__ */ i(Le, { ...c, ref: e }) })
572
+ }
573
+ );
574
+ }, "AccordionImplMultiple")), [_t, G] = B(D), Le = /* @__PURE__ */ l.forwardRef(
575
+ /* @__PURE__ */ O(function(o, e) {
576
+ const { __scopeAccordion: t, disabled: s, dir: r, orientation: c = "vertical", ...d } = o, f = l.useRef(null), p = $(f, e), a = xt(t), g = Me(r) === "ltr", N = Ne(o.onKeyDown, (C) => {
577
+ if (!bt.includes(C.key)) return;
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
+ if (I === -1) return;
580
+ C.preventDefault();
581
+ let u = I;
582
+ const m = 0, E = A - 1, _ = /* @__PURE__ */ O(() => {
583
+ u = I + 1, u > E && (u = m);
584
+ }, "moveNext"), P = /* @__PURE__ */ O(() => {
585
+ u = I - 1, u < m && (u = E);
586
+ }, "movePrev");
587
+ switch (C.key) {
588
+ case "Home":
589
+ u = m;
590
+ break;
591
+ case "End":
592
+ u = E;
593
+ break;
594
+ case "ArrowRight":
595
+ c === "horizontal" && (g ? _() : P());
596
+ break;
597
+ case "ArrowDown":
598
+ c === "vertical" && _();
599
+ break;
600
+ case "ArrowLeft":
601
+ c === "horizontal" && (g ? P() : _());
602
+ break;
603
+ case "ArrowUp":
604
+ c === "vertical" && P();
605
+ break;
606
+ }
607
+ const k = u % A;
608
+ v[k].ref.current?.focus();
609
+ });
610
+ return /* @__PURE__ */ i(
611
+ _t,
612
+ {
613
+ scope: t,
614
+ disabled: s,
615
+ direction: r,
616
+ orientation: c,
617
+ children: /* @__PURE__ */ i(ce.Slot, { scope: t, children: /* @__PURE__ */ i(
618
+ z.div,
619
+ {
620
+ ...d,
621
+ "data-orientation": c,
622
+ ref: p,
623
+ onKeyDown: s ? void 0 : N
624
+ }
625
+ ) })
626
+ }
627
+ );
628
+ }, "AccordionImpl")
629
+ ), ee = "AccordionItem", [Pt, le] = B(ee), St = /* @__PURE__ */ l.forwardRef(
630
+ /* @__PURE__ */ O(function(o, e) {
631
+ const { __scopeAccordion: t, value: s, ...r } = o, c = G(ee, t), d = At(ee, t), f = ie(t), p = we(), a = s && d.value.includes(s) || !1, h = c.disabled || o.disabled;
632
+ return /* @__PURE__ */ i(
633
+ Pt,
634
+ {
635
+ scope: t,
636
+ open: a,
637
+ disabled: h,
638
+ triggerId: p,
639
+ children: /* @__PURE__ */ i(
640
+ mt,
641
+ {
642
+ "data-orientation": c.orientation,
643
+ "data-state": ae(a),
644
+ ...f,
645
+ ...r,
646
+ ref: e,
647
+ disabled: h,
648
+ open: a,
649
+ onOpenChange: (g) => {
650
+ g ? d.onItemOpen(s) : d.onItemClose(s);
651
+ }
652
+ }
653
+ )
654
+ }
655
+ );
656
+ }, "AccordionItem")
657
+ ), Ot = "AccordionHeader", Et = /* @__PURE__ */ l.forwardRef(
658
+ // blank line to reduce diff noise
659
+ /* @__PURE__ */ O(function(o, e) {
660
+ const { __scopeAccordion: t, ...s } = o, r = G(D, t), c = le(Ot, t);
661
+ return /* @__PURE__ */ i(
662
+ z.h3,
663
+ {
664
+ "data-orientation": r.orientation,
665
+ "data-state": ae(c.open),
666
+ "data-disabled": c.disabled ? "" : void 0,
667
+ ...s,
668
+ ref: e
669
+ }
670
+ );
671
+ }, "AccordionHeader")
672
+ ), Ae = "AccordionTrigger", Mt = /* @__PURE__ */ l.forwardRef(
673
+ // blank line to reduce diff noise
674
+ /* @__PURE__ */ O(function(o, e) {
675
+ const { __scopeAccordion: t, ...s } = o, r = G(D, t), c = le(Ae, t), d = Rt(Ae, t), f = ie(t);
676
+ return /* @__PURE__ */ i(ce.ItemSlot, { scope: t, children: /* @__PURE__ */ i(
677
+ gt,
678
+ {
679
+ "aria-disabled": c.open && !d.collapsible || void 0,
680
+ "data-orientation": r.orientation,
681
+ id: c.triggerId,
682
+ ...f,
683
+ ...s,
684
+ ref: e
685
+ }
686
+ ) });
687
+ }, "AccordionTrigger")
688
+ ), kt = "AccordionContent", Tt = /* @__PURE__ */ l.forwardRef(
689
+ // blank line to reduce diff noise
690
+ /* @__PURE__ */ O(function(o, e) {
691
+ const { __scopeAccordion: t, ...s } = o, r = G(D, t), c = le(kt, t), d = ie(t);
692
+ return /* @__PURE__ */ i(
693
+ vt,
694
+ {
695
+ role: "region",
696
+ "aria-labelledby": c.triggerId,
697
+ "data-orientation": r.orientation,
698
+ ...d,
699
+ ...s,
700
+ ref: e,
701
+ style: {
702
+ "--radix-accordion-content-height": "var(--radix-collapsible-content-height)",
703
+ "--radix-accordion-content-width": "var(--radix-collapsible-content-width)",
704
+ ...o.style
705
+ }
706
+ }
707
+ );
708
+ }, "AccordionContent")
709
+ );
710
+ function ae(n) {
711
+ return n ? "open" : "closed";
712
+ }
713
+ O(ae, "getState");
714
+ var Dt = It, $t = St, Lt = Et, ze = Mt, je = Tt, Ve = Dt, de = l.forwardRef(({ className: n, ...o }, e) => /* @__PURE__ */ i($t, {
715
+ ref: e,
716
+ className: te("cds-border-b cds-border-border", n),
717
+ ...o
718
+ }));
719
+ de.displayName = "AccordionItem";
720
+ var ue = l.forwardRef(({ className: n, children: o, ...e }, t) => /* @__PURE__ */ i(Lt, {
721
+ className: "cds-flex",
722
+ children: /* @__PURE__ */ M(ze, {
723
+ ref: t,
724
+ className: te("cds-flex cds-flex-1 cds-items-center cds-justify-between cds-py-4 cds-text-left cds-font-medium cds-text-fg cds-transition-all hover:cds-underline focus-visible:cds-outline-none focus-visible:cds-ring-2 focus-visible:cds-ring-ring [&[data-state=open]>svg]:cds-rotate-180", n),
725
+ ...e,
726
+ children: [o, /* @__PURE__ */ i(Ze, { className: "cds-h-4 cds-w-4 cds-shrink-0 cds-text-fg-muted cds-transition-transform cds-duration-200" })]
727
+ })
728
+ }));
729
+ ue.displayName = ze.displayName;
730
+ var fe = l.forwardRef(({ className: n, children: o, ...e }, t) => /* @__PURE__ */ i(je, {
731
+ ref: t,
732
+ className: "cds-overflow-hidden cds-text-sm cds-text-fg data-[state=closed]:cds-animate-accordion-up data-[state=open]:cds-animate-accordion-down",
733
+ ...e,
734
+ children: /* @__PURE__ */ i("div", {
735
+ className: te("cds-pb-4 cds-pt-0", n),
736
+ children: o
737
+ })
738
+ }));
739
+ fe.displayName = je.displayName;
740
+ var zt = /* @__PURE__ */ Be({
741
+ GroupEntries: () => me,
742
+ ReviewEditButton: () => Ke,
743
+ ReviewPanel: () => qe,
744
+ RowList: () => F,
745
+ sectionClass: () => pe,
746
+ sectionHeadingClass: () => he
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
+ let o = n.label.replace(/s$/i, "").toLowerCase();
749
+ return `${n.entries.length} ${n.entries.length === 1 ? o : `${o}s`}`;
750
+ }, F = ({ rows: n }) => /* @__PURE__ */ i("dl", {
751
+ className: "cds-space-y-1 cds-text-sm",
752
+ children: n.map((o) => /* @__PURE__ */ M("div", {
753
+ className: "cds-flex cds-justify-between cds-gap-4",
754
+ children: [/* @__PURE__ */ i("dt", {
755
+ className: "cds-min-w-0 cds-flex-1 cds-text-fg-muted",
756
+ children: o.label
757
+ }), /* @__PURE__ */ i("dd", {
758
+ "data-credify-redact": !0,
759
+ className: "cds-max-w-[55%] cds-text-right cds-font-semibold cds-text-fg",
760
+ children: o.value
761
+ })]
762
+ }, o.key))
763
+ }), Ke = ({ label: n, onClick: o }) => /* @__PURE__ */ M("button", {
764
+ type: "button",
765
+ onClick: o,
766
+ "aria-label": `Edit ${n}`,
767
+ className: `cds-inline-flex cds-items-center cds-gap-1 cds-rounded cds-px-2 cds-py-1 cds-text-xs cds-font-semibold cds-text-fg hover:cds-bg-highlight ${Re}`,
768
+ children: [/* @__PURE__ */ i(tt, {
769
+ "aria-hidden": "true",
770
+ className: "cds-h-3.5 cds-w-3.5"
771
+ }), "Edit"]
772
+ }), qe = ({ stages: n, questionsByStage: o, values: e, busy: t, error: s, suppressedKeys: r, onEditStage: c, onConfirm: d }) => {
773
+ let f = n.map((a) => {
774
+ let h = o[a] ?? [];
775
+ return {
776
+ stage: a,
777
+ rows: Ye({
778
+ questions: h,
779
+ values: e,
780
+ stageKey: a,
781
+ suppressedKeys: r
782
+ }),
783
+ groups: We({
784
+ questions: h,
785
+ values: e,
786
+ stageKey: a,
787
+ suppressedKeys: r
788
+ }),
789
+ validation: Ue({
790
+ questions: h,
791
+ values: e,
792
+ stageKey: a
793
+ })
794
+ };
795
+ }), p = f.filter((a) => !a.validation.isValid);
796
+ return /* @__PURE__ */ M("div", {
797
+ className: "cds-py-2",
798
+ children: [
799
+ /* @__PURE__ */ i("h2", {
800
+ className: "cds-mb-1 cds-text-2xl cds-font-bold cds-text-fg",
801
+ children: "Review your answers"
802
+ }),
803
+ /* @__PURE__ */ i("p", {
804
+ className: "cds-mb-5 cds-text-sm cds-text-fg-muted",
805
+ children: "Carriers price from exactly this — a quick check now avoids surprises later."
806
+ }),
807
+ p.length ? /* @__PURE__ */ M("div", {
808
+ className: "cds-mb-5 cds-rounded-xl cds-border cds-border-warning cds-bg-warning-surface cds-p-4",
809
+ children: [/* @__PURE__ */ M("h3", {
810
+ className: "cds-mb-2 cds-text-sm cds-font-bold cds-text-fg",
811
+ children: [p.length === 1 ? "One section needs" : `${p.length} sections need`, " attention"]
812
+ }), /* @__PURE__ */ i("ul", {
813
+ className: "cds-space-y-1 cds-text-sm cds-text-fg-muted",
814
+ children: p.map((a) => /* @__PURE__ */ M("li", { children: [
815
+ /* @__PURE__ */ i("button", {
816
+ type: "button",
817
+ onClick: () => c(a.stage),
818
+ className: `cds-font-semibold cds-text-fg cds-underline ${Re}`,
819
+ children: ye(a.stage).short
820
+ }),
821
+ ": ",
822
+ a.validation.issues[0],
823
+ a.validation.issues.length > 1 ? ` (+${a.validation.issues.length - 1} more)` : ""
824
+ ] }, a.stage))
825
+ })]
826
+ }) : null,
827
+ f.filter((a) => a.rows.length > 0 || a.groups.length > 0).map((a) => {
828
+ let h = ye(a.stage).short;
829
+ return /* @__PURE__ */ M("section", {
830
+ className: pe,
831
+ children: [
832
+ /* @__PURE__ */ M("div", {
833
+ className: "cds-mb-2 cds-flex cds-items-center cds-justify-between",
834
+ children: [/* @__PURE__ */ i("h3", {
835
+ className: he,
836
+ children: h
837
+ }), /* @__PURE__ */ i(Ke, {
838
+ label: h,
839
+ onClick: () => c(a.stage)
840
+ })]
841
+ }),
842
+ a.rows.length ? /* @__PURE__ */ i(F, { rows: a.rows }) : null,
843
+ a.groups.map((g) => /* @__PURE__ */ i(me, { group: g }, g.groupKey))
844
+ ]
845
+ }, a.stage);
846
+ }),
847
+ /* @__PURE__ */ i(Ge, { message: s }),
848
+ /* @__PURE__ */ i(Fe, {
849
+ disabled: p.length > 0,
850
+ busy: t,
851
+ onChoose: d
852
+ }),
853
+ /* @__PURE__ */ i("p", {
854
+ className: "cds-mt-3 cds-text-xs cds-text-fg-muted",
855
+ children: "Either choice takes you to your quotes. Submitting runs a soft credit inquiry with the carriers you authorized. It does not affect your credit score."
856
+ })
857
+ ]
858
+ });
859
+ }, me = ({ group: n }) => n.entries.length ? /* @__PURE__ */ M(Xe, { children: [/* @__PURE__ */ i("p", {
860
+ className: "cds-mb-1 cds-text-sm cds-text-fg-muted",
861
+ children: jt(n)
862
+ }), /* @__PURE__ */ i(Ve, {
863
+ type: "multiple",
864
+ children: n.entries.map((o, e) => /* @__PURE__ */ M(de, {
865
+ value: `${n.groupKey}-${e}`,
866
+ className: "cds-border-border last:cds-border-b-0",
867
+ children: [/* @__PURE__ */ i(ue, {
868
+ className: "cds-py-2 cds-text-sm cds-font-semibold cds-text-fg hover:cds-no-underline",
869
+ children: o.name
870
+ }), /* @__PURE__ */ i(fe, {
871
+ className: "cds-pb-3 cds-pt-0",
872
+ children: /* @__PURE__ */ i(F, { rows: o.rows })
873
+ })]
874
+ }, `${n.groupKey}-${e}`))
875
+ })] }) : /* @__PURE__ */ M("p", {
876
+ className: "cds-text-sm cds-text-fg-muted",
877
+ children: [
878
+ "No ",
879
+ n.label.toLowerCase(),
880
+ " added yet."
881
+ ]
882
+ });
883
+ const Ft = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
884
+ __proto__: null,
885
+ a: pe,
886
+ c: fe,
887
+ i: zt,
888
+ l: de,
889
+ n: qe,
890
+ o: he,
891
+ r: F,
892
+ s: Ve,
893
+ t: me,
894
+ u: ue
895
+ }, Symbol.toStringTag, { value: "Module" }));
896
+ export {
897
+ me as D,
898
+ tt as P,
899
+ he as S,
900
+ Ft as r,
901
+ F as w,
902
+ pe as x
903
+ };