@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
package/README.md CHANGED
@@ -338,6 +338,97 @@ being submitted. Remove the `?mock=` parameter to return to the live flow.
338
338
  > production. The key only gates demo behaviour in the browser session that supplies
339
339
  > it; it grants no access and carries no risk if shared.
340
340
 
341
+ ## Partner attribution
342
+
343
+ If you are a Credify partner, tell the widget who you are and the quotes it
344
+ collects are credited to your firm:
345
+
346
+ ```html
347
+ <script src="https://widget.getcredify.com/index.umd.js"></script>
348
+ <script>
349
+ CredifyInsuranceWidget.init({
350
+ partner: { id: 'cp_live_eDt64Vv3jIS7x9hnQGv8i4iLLFDdRX0o' }
351
+ });
352
+ </script>
353
+ ```
354
+
355
+ Your partner ID is in the partner portal under **Settings → API keys**, with
356
+ this snippet already filled in. You do not create it — it exists as soon as
357
+ your firm profile does, and it never changes.
358
+
359
+ **It is not a secret.** It names your firm and authorizes nothing: holding it
360
+ lets you say "credit Acme for this quote" and nothing else. It cannot submit an
361
+ application, read anything, or act as you. So it belongs in your page source,
362
+ and there is nothing to rotate.
363
+
364
+ **Never put a secret key here.** The `sk_live_`/`sk_test_` keys are for
365
+ server-to-server calls to the Intake API, and anyone viewing your page could
366
+ read one pasted into this snippet. The widget refuses anything that is not a
367
+ `cp_` id, but the safer habit is not to have the key near the browser at all.
368
+
369
+ ### Your logo and colour
370
+
371
+ The same id also brands the widget. Set your logo and brand colour in the
372
+ partner portal under **Settings → Partner profile** and embeds carrying your id
373
+ pick them up — there is nothing to add to the snippet.
374
+
375
+ Your logo appears above the quote form, and your brand colour becomes the fill
376
+ behind the buttons customers press. A colour you have not set means Credify's
377
+ own green, so an embed looks exactly as it does today until you choose
378
+ otherwise.
379
+
380
+ Logos are PNG, JPEG or WebP up to 1 MB, re-encoded and served from
381
+ `assets.getcredify.com`. SVG is not accepted: it is a document that can carry
382
+ script, not just a picture.
383
+
384
+ Changes reach live embeds within about five minutes.
385
+
386
+ What does not change is the licence disclosure under the form, and the support
387
+ number on it. Quotes are written by Credify Corporation, a licensed insurance
388
+ agency, whoever referred the customer — so the widget carries your branding and
389
+ Credify's licensing at the same time, which is what makes the co-branding
390
+ truthful.
391
+
392
+ If the branding cannot be loaded the widget renders unbranded and the quote
393
+ proceeds normally, for the same reason a malformed id does not stop one.
394
+
395
+ ### Labelling a placement
396
+
397
+ `sub` records which page or campaign produced the quote, and comes back in your
398
+ reporting. Different pages can carry different values with the same id:
399
+
400
+ ```js
401
+ CredifyInsuranceWidget.init({
402
+ partner: { id: 'cp_live_...', sub: 'homepage-hero' }
403
+ });
404
+ ```
405
+
406
+ Lowercased and reduced to letters, digits, `-` and `_`; capped at 100
407
+ characters.
408
+
409
+ ### If you get it wrong
410
+
411
+ A malformed id — a typo, or a secret key pasted in by mistake — is ignored with
412
+ a console warning and the flow continues unattributed. A visitor never loses a
413
+ quote because attribution was misconfigured, so check your browser console
414
+ after wiring it up rather than assuming silence means success.
415
+
416
+ An id belonging to a partner who is no longer active stops attributing for the
417
+ same reason: the quote is still created, it is simply credited to nobody.
418
+
419
+ ### React hosts using the kit directly
420
+
421
+ Embeds built on `@getcredify/credify-insurance-ui-kit` pass the same object to
422
+ `configureApi` instead:
423
+
424
+ ```ts
425
+ configureApi({
426
+ baseUrl: 'https://api.getcredify.com',
427
+ storagePrefix: 'acme_credify_',
428
+ partner: { id: 'cp_live_...' }
429
+ });
430
+ ```
431
+
341
432
  ## Test Mode (internal)
342
433
 
343
434
  Test mode is for walking the **live** flow — real API, real carriers, real SMS —
@@ -0,0 +1,59 @@
1
+ import { t as _ } from "./widget-BUAzkBEK.js";
2
+ (function() {
3
+ if (typeof t > "u")
4
+ var t = { env: {} };
5
+ })();
6
+ var u = /* @__PURE__ */ _({
7
+ ADDRESS_COLUMN_PREFIXES: () => p,
8
+ addressFromColumns: () => c,
9
+ addressToColumns: () => m,
10
+ composeAddress: () => n,
11
+ normalizeStateCode: () => a,
12
+ parseAddress: () => l
13
+ }), a = (t) => {
14
+ let e = t.trim();
15
+ return /^[A-Za-z]{2}$/.test(e) ? e.toUpperCase() : e;
16
+ }, l = (t) => {
17
+ let [e = "", r = "", o = ""] = t.split(",").map((d) => d.trim()).filter(Boolean), i = /^([A-Za-z .]{2,})\s+(\d{5})(?:-\d{4})?$/.exec(o);
18
+ return {
19
+ line_1: e,
20
+ city: r,
21
+ state: a(i?.[1]?.trim() ?? ""),
22
+ postal_code: i?.[2] ?? ""
23
+ };
24
+ }, n = (t) => {
25
+ let e = [t.line_1.trim(), t.line_2.trim()].filter(Boolean).join(" ");
26
+ if (!e) return "";
27
+ let r = a(t.state.trim());
28
+ return `${e}, ${t.city.trim()}, ${r} ${t.postal_code.trim()}`.replace(/\s+/g, " ").trim();
29
+ }, p = {
30
+ address: "",
31
+ prior_address: "prior_",
32
+ garaging_address: "garaging_address_"
33
+ }, s = (t, e) => {
34
+ let r = t[e];
35
+ return r == null ? "" : String(r);
36
+ }, c = (t, e) => n({
37
+ line_1: s(t, `${e}line_1`),
38
+ line_2: s(t, `${e}line_2`),
39
+ city: s(t, `${e}city`),
40
+ state: s(t, `${e}state`),
41
+ postal_code: s(t, `${e}postal_code`)
42
+ }), m = (t, e) => {
43
+ let r = l(t);
44
+ return {
45
+ [`${e}line_1`]: r.line_1 || null,
46
+ [`${e}city`]: r.city || null,
47
+ [`${e}state`]: r.state || null,
48
+ [`${e}postal_code`]: r.postal_code || null
49
+ };
50
+ };
51
+ export {
52
+ n as a,
53
+ u as i,
54
+ c as n,
55
+ a as o,
56
+ m as r,
57
+ l as s,
58
+ p as t
59
+ };
@@ -0,0 +1,51 @@
1
+ import { w as i, e as o, Q as t, A as r, D as l, c as u, H as n, z as d, K as f, P as p, b as g, W as c, V as m, d as S, T, j as h, O as y, k as Q, E as k, Y as A, C as E, p as v, _ as P, S as R, a as C, B as _, f as O, m as V, g as b, v as D, M as I, h as K, s as U, x as B, I as F, y as L, i as M, l as Y, L as q, N as x, n as G, o as H, q as N, r as W } from "./widget-BUAzkBEK.js";
2
+ (function() {
3
+ if (typeof e > "u")
4
+ var e = { env: {} };
5
+ })();
6
+ export {
7
+ i as AUTH_TOKEN_STORAGE_KEY,
8
+ o as CredifyApiError,
9
+ t as QUOTE_ID_STORAGE_KEY,
10
+ r as applyDriverPrefill,
11
+ l as applyVehiclePrefill,
12
+ u as bodyWithQuoteId,
13
+ n as buildResumeUrl,
14
+ d as captureResumeTokenFromUrl,
15
+ f as cityFromZip,
16
+ p as clearQuoteSession,
17
+ g as configureApi,
18
+ c as configureZipCityLookup,
19
+ m as consumeResumeToken,
20
+ S as createQuote,
21
+ T as decodeVin,
22
+ h as dismissDriverPrefill,
23
+ y as dismissVehiclePrefill,
24
+ Q as fetchDriverPrefillSuggestions,
25
+ k as fetchVehiclePrefillSuggestions,
26
+ A as getApiConfig,
27
+ E as getQuestionsByStage,
28
+ v as getQuote,
29
+ P as getRates,
30
+ R as getStagesForQuote,
31
+ C as getVehicleOptions,
32
+ _ as hasResumeToken,
33
+ O as isMockEnabled,
34
+ V as isSupportedState,
35
+ b as isTestModeEnabled,
36
+ D as issueResumeLink,
37
+ I as loadAuthToken,
38
+ K as loadQuoteId,
39
+ U as post,
40
+ B as prefillProperty,
41
+ F as prefillSuggestions,
42
+ L as redeemResumeToken,
43
+ M as requestBind,
44
+ Y as resetApiConfig,
45
+ q as resetPrefillSuggestions,
46
+ x as saveAuthToken,
47
+ G as saveQuoteId,
48
+ H as sendSmsCode,
49
+ N as updateQuote,
50
+ W as verifySmsCode
51
+ };
@@ -0,0 +1,26 @@
1
+ import { a4 as e } from "./widget-BUAzkBEK.js";
2
+ (function() {
3
+ if (typeof c > "u")
4
+ var c = { env: {} };
5
+ })();
6
+ /**
7
+ * @license lucide-react v0.562.0 - ISC
8
+ *
9
+ * This source code is licensed under the ISC license.
10
+ * See the LICENSE file in the root directory of this source tree.
11
+ */
12
+ const r = [
13
+ [
14
+ "path",
15
+ {
16
+ 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",
17
+ key: "5owen"
18
+ }
19
+ ],
20
+ ["circle", { cx: "7", cy: "17", r: "2", key: "u2ysq9" }],
21
+ ["path", { d: "M9 17h6", key: "r8uit2" }],
22
+ ["circle", { cx: "17", cy: "17", r: "2", key: "axvx0g" }]
23
+ ], a = e("car", r);
24
+ export {
25
+ a as C
26
+ };
@@ -0,0 +1,15 @@
1
+ import { a4 as c } from "./widget-BUAzkBEK.js";
2
+ (function() {
3
+ if (typeof e > "u")
4
+ var e = { env: {} };
5
+ })();
6
+ /**
7
+ * @license lucide-react v0.562.0 - ISC
8
+ *
9
+ * This source code is licensed under the ISC license.
10
+ * See the LICENSE file in the root directory of this source tree.
11
+ */
12
+ const o = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]], t = c("check", o);
13
+ export {
14
+ t as C
15
+ };
@@ -0,0 +1,56 @@
1
+ import { t as d } from "./widget-BUAzkBEK.js";
2
+ import { k as y, j as h } from "./visibility-hEdBjgi7-WW4BVjmf.js";
3
+ import { u as m, l as f, s as c } from "./copy-from-record-BNP6CFFR-Bcb9EW-a.js";
4
+ import { useMemo as p, useCallback as b } from "react";
5
+ import { jsx as g } from "react/jsx-runtime";
6
+ (function() {
7
+ if (typeof a > "u")
8
+ var a = { env: {} };
9
+ })();
10
+ var O = /* @__PURE__ */ d({ CopyApplicantOffer: () => v }), k = {
11
+ Demographics: {
12
+ kind: "applicant",
13
+ heading: "Are you one of the drivers?",
14
+ body: "We'll reuse the details you already gave for them, so you don't type them twice.",
15
+ applyLabel: "Use these details"
16
+ },
17
+ Ssn: {
18
+ kind: "applicantSsn",
19
+ heading: "Are you one of the drivers?",
20
+ body: "We can reuse the Social Security number you already entered for them.",
21
+ applyLabel: "Use the SSN"
22
+ }
23
+ }, v = ({ stage: a, questions: n, values: t, onPatch: u }) => {
24
+ let e = k[a], i = p(() => e ? y(n, t, a) : [], [
25
+ e,
26
+ n,
27
+ t,
28
+ a
29
+ ]), r = b((o) => e ? m({
30
+ kind: e.kind,
31
+ source: h(t, "drivers")[o] ?? {},
32
+ targetQuestions: i
33
+ }) : {}, [
34
+ e,
35
+ t,
36
+ i
37
+ ]), l = p(() => e ? f(t).filter((o) => Object.keys(r(o.index)).length > 0) : [], [
38
+ e,
39
+ t,
40
+ r
41
+ ]);
42
+ return !e || !l.length ? null : /* @__PURE__ */ g(c, {
43
+ heading: e.heading,
44
+ body: e.body,
45
+ applyLabel: e.applyLabel,
46
+ candidates: l,
47
+ onApply: (o) => {
48
+ let s = r(o);
49
+ return u(s), Object.keys(s).length;
50
+ }
51
+ });
52
+ };
53
+ export {
54
+ O as n,
55
+ v as t
56
+ };
@@ -0,0 +1,189 @@
1
+ import { a4 as x, a5 as b, G as v } from "./widget-BUAzkBEK.js";
2
+ import { j as N } from "./visibility-hEdBjgi7-WW4BVjmf.js";
3
+ import { O as f } from "./validation-DRqHT-u7-CL2m7f4k.js";
4
+ import { useState as y } from "react";
5
+ import { jsxs as p, jsx as n, Fragment as k } from "react/jsx-runtime";
6
+ import { C as K } from "./check-Dfh9u4c0.js";
7
+ (function() {
8
+ if (typeof t > "u")
9
+ var t = { env: {} };
10
+ })();
11
+ /**
12
+ * @license lucide-react v0.562.0 - ISC
13
+ *
14
+ * This source code is licensed under the ISC license.
15
+ * See the LICENSE file in the root directory of this source tree.
16
+ */
17
+ const S = [
18
+ ["path", { d: "M2 21a8 8 0 0 1 13.292-6", key: "bjp14o" }],
19
+ ["circle", { cx: "10", cy: "8", r: "5", key: "o932ke" }],
20
+ ["path", { d: "m16 19 2 2 4-4", key: "1b14m6" }]
21
+ ], w = x("user-round-check", S);
22
+ var A = {
23
+ applicant: {
24
+ gender: "gender",
25
+ marital_status: "marital_status",
26
+ employment_industry: "industry",
27
+ occupation: "occupation"
28
+ },
29
+ applicantSsn: { social_security_number: "social_security_number" },
30
+ coApplicant: {
31
+ co_applicant_first_name: "first_name",
32
+ co_applicant_middle_name: "middle_name",
33
+ co_applicant_last_name: "last_name",
34
+ co_applicant_date_of_birth: "date_of_birth",
35
+ co_applicant_gender: "gender",
36
+ co_applicant_marital_status: "marital_status",
37
+ co_applicant_employment_industry: "industry",
38
+ co_applicant_occupation: "occupation",
39
+ co_applicant_relationship: "relationship_to_insured"
40
+ },
41
+ driverFromApplicant: {
42
+ first_name: "first_name",
43
+ last_name: "last_name",
44
+ date_of_birth: "date_of_birth",
45
+ gender: "gender",
46
+ marital_status: "marital_status",
47
+ industry: "employment_industry",
48
+ occupation: "occupation",
49
+ social_security_number: "social_security_number"
50
+ }
51
+ }, $ = {
52
+ applicant: {
53
+ industryKey: "employment_industry",
54
+ occupationKey: "occupation"
55
+ },
56
+ coApplicant: {
57
+ industryKey: "co_applicant_employment_industry",
58
+ occupationKey: "co_applicant_occupation"
59
+ },
60
+ driverFromApplicant: {
61
+ industryKey: "industry",
62
+ occupationKey: "occupation"
63
+ }
64
+ }, j = {
65
+ Separated: ["Seperated"],
66
+ Seperated: ["Separated"],
67
+ DomesticPartner: ["Domestic Partner"],
68
+ "Domestic Partner": ["DomesticPartner"]
69
+ }, C = (t, c) => {
70
+ let e = t.options;
71
+ if (!Array.isArray(e) || e.length === 0) return c;
72
+ let i = String(c);
73
+ return e.includes(i) ? c : (j[i] ?? []).find((a) => e.includes(a));
74
+ }, h = (t, c = "") => [t[`${c}first_name`], t[`${c}last_name`]].map((e) => String(e ?? "").trim()).filter(Boolean).join(" "), O = (t) => h(t), B = (t, c = {}) => N(t, "drivers").flatMap((e, i) => {
75
+ if (c.exclude?.(e, i)) return [];
76
+ let a = h(e);
77
+ return a || !f(e.date_of_birth) ? [{
78
+ index: i,
79
+ name: a || `Driver ${i + 1}`
80
+ }] : [];
81
+ }), G = ({ kind: t, source: c, targetQuestions: e }) => {
82
+ let i = new Map(e.map((d) => [d.key, d])), a = {};
83
+ for (let [d, o] of Object.entries(A[t])) {
84
+ let m = i.get(d);
85
+ if (!m) continue;
86
+ let u = c[o];
87
+ if (f(u, m.inputType)) continue;
88
+ let l = C(m, u);
89
+ l !== void 0 && (a[d] = l);
90
+ }
91
+ let r = $[t];
92
+ return r && a[r.occupationKey] !== void 0 && (b(a[r.industryKey])?.includes(String(a[r.occupationKey])) || delete a[r.occupationKey]), a;
93
+ }, I = ({ heading: t, body: c, candidates: e, applyLabel: i = "Use these details", onApply: a }) => {
94
+ let [r, d] = y(e[0]?.index ?? 0), [o, m] = y(null);
95
+ if (!e.length) return null;
96
+ if (o) return /* @__PURE__ */ p("p", {
97
+ className: "cds-mb-4 cds-flex cds-items-center cds-gap-2 cds-text-sm cds-text-fg-muted",
98
+ "aria-live": "polite",
99
+ children: [
100
+ /* @__PURE__ */ n(K, {
101
+ "aria-hidden": "true",
102
+ className: "cds-h-4 cds-w-4 cds-shrink-0 cds-text-accent"
103
+ }),
104
+ "Filled ",
105
+ o.count,
106
+ " ",
107
+ o.count === 1 ? "answer" : "answers",
108
+ " from ",
109
+ /* @__PURE__ */ n("span", {
110
+ "data-credify-redact": !0,
111
+ children: o.name
112
+ }),
113
+ ". Change anything below that is not right."
114
+ ]
115
+ });
116
+ let u = () => {
117
+ let s = e.find((g) => g.index === r) ?? e[0];
118
+ if (!s) return;
119
+ let _ = a(s.index);
120
+ _ > 0 && m({
121
+ name: s.name,
122
+ count: _
123
+ });
124
+ }, l = e.length === 1 ? e[0] : void 0;
125
+ return /* @__PURE__ */ n("div", {
126
+ className: "cds-mb-5 cds-rounded-xl cds-border cds-border-accent/40 cds-bg-highlight cds-p-4",
127
+ children: /* @__PURE__ */ p("div", {
128
+ className: "cds-flex cds-items-start cds-gap-3",
129
+ children: [/* @__PURE__ */ n(w, {
130
+ "aria-hidden": "true",
131
+ className: "cds-mt-0.5 cds-h-5 cds-w-5 cds-shrink-0 cds-text-accent"
132
+ }), /* @__PURE__ */ p("div", {
133
+ className: "cds-min-w-0 cds-flex-1",
134
+ children: [
135
+ /* @__PURE__ */ n("h3", {
136
+ className: "cds-text-sm cds-font-bold cds-text-fg",
137
+ children: t
138
+ }),
139
+ /* @__PURE__ */ n("p", {
140
+ className: "cds-mt-0.5 cds-text-sm cds-text-fg-muted",
141
+ children: c
142
+ }),
143
+ l ? null : /* @__PURE__ */ p("fieldset", {
144
+ className: "cds-mt-3",
145
+ children: [/* @__PURE__ */ n("legend", {
146
+ className: "sr-only",
147
+ children: t
148
+ }), /* @__PURE__ */ n("div", {
149
+ className: "cds-space-y-1.5",
150
+ children: e.map((s) => /* @__PURE__ */ p("label", {
151
+ className: "cds-flex cds-cursor-pointer cds-items-center cds-gap-2 cds-text-sm cds-text-fg",
152
+ children: [/* @__PURE__ */ n("input", {
153
+ type: "radio",
154
+ name: `copy-source-${t.replace(/\W+/g, "-")}`,
155
+ checked: r === s.index,
156
+ onChange: () => d(s.index)
157
+ }), /* @__PURE__ */ n("span", {
158
+ "data-credify-redact": !0,
159
+ className: "cds-font-semibold",
160
+ children: s.name
161
+ })]
162
+ }, s.index))
163
+ })]
164
+ }),
165
+ /* @__PURE__ */ n("button", {
166
+ type: "button",
167
+ onClick: u,
168
+ 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 ${v}`,
169
+ children: l ? /* @__PURE__ */ p(k, { children: [
170
+ i,
171
+ " from ",
172
+ /* @__PURE__ */ n("span", {
173
+ "data-credify-redact": !0,
174
+ children: l.name
175
+ })
176
+ ] }) : i
177
+ })
178
+ ]
179
+ })]
180
+ })
181
+ });
182
+ };
183
+ export {
184
+ w as U,
185
+ O as c,
186
+ B as l,
187
+ I as s,
188
+ G as u
189
+ };