@burdenoff/microfe-subscriberbot 2026.1103.2 → 2026.1105.2

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 (206) hide show
  1. package/dist/index.js +3 -3
  2. package/dist/stories/Accessibility.stories.d.ts +13 -0
  3. package/dist/stories/Accessibility.stories.d.ts.map +1 -0
  4. package/dist/stories/pages/AgentNewPage.stories.d.ts.map +1 -1
  5. package/dist/stories/pages/BankConnectionsPage.stories.d.ts +1 -0
  6. package/dist/stories/pages/BankConnectionsPage.stories.d.ts.map +1 -1
  7. package/dist/stories/pages/DashboardPage.stories.d.ts.map +1 -1
  8. package/dist/stories/pages/EnterpriseSpendPage.stories.d.ts.map +1 -1
  9. package/dist/stories/pages/InboxPage.stories.d.ts.map +1 -1
  10. package/dist/subscriberbot/admin/AdminDashboardPage.d.ts.map +1 -1
  11. package/dist/subscriberbot/admin/AdminDashboardPage.js +168 -168
  12. package/dist/subscriberbot/admin/AdminDashboardPage.js.map +1 -1
  13. package/dist/subscriberbot/admin/NegotiationDeskPanel.d.ts.map +1 -1
  14. package/dist/subscriberbot/admin/NegotiationDeskPanel.js +116 -116
  15. package/dist/subscriberbot/admin/NegotiationDeskPanel.js.map +1 -1
  16. package/dist/subscriberbot/admin/ProcurementDeskPanel.d.ts.map +1 -1
  17. package/dist/subscriberbot/admin/ProcurementDeskPanel.js +211 -211
  18. package/dist/subscriberbot/admin/ProcurementDeskPanel.js.map +1 -1
  19. package/dist/subscriberbot/components/Modal.d.ts.map +1 -1
  20. package/dist/subscriberbot/components/Modal.js +43 -33
  21. package/dist/subscriberbot/components/Modal.js.map +1 -1
  22. package/dist/subscriberbot/components/PageLayout.d.ts +6 -0
  23. package/dist/subscriberbot/components/PageLayout.d.ts.map +1 -1
  24. package/dist/subscriberbot/components/PageLayout.js +2 -1
  25. package/dist/subscriberbot/components/PageLayout.js.map +1 -1
  26. package/dist/subscriberbot/components/PostureOptions.d.ts.map +1 -1
  27. package/dist/subscriberbot/components/PostureOptions.js +10 -10
  28. package/dist/subscriberbot/components/PostureOptions.js.map +1 -1
  29. package/dist/subscriberbot/components/StateViews.d.ts +2 -0
  30. package/dist/subscriberbot/components/StateViews.d.ts.map +1 -1
  31. package/dist/subscriberbot/components/StateViews.js +46 -37
  32. package/dist/subscriberbot/components/StateViews.js.map +1 -1
  33. package/dist/subscriberbot/components/StatusBadge.d.ts.map +1 -1
  34. package/dist/subscriberbot/components/StatusBadge.js +6 -6
  35. package/dist/subscriberbot/components/StatusBadge.js.map +1 -1
  36. package/dist/subscriberbot/components/decisions/DecisionBanners.js +6 -6
  37. package/dist/subscriberbot/components/decisions/DecisionCard.d.ts.map +1 -1
  38. package/dist/subscriberbot/components/decisions/DecisionCard.js +149 -147
  39. package/dist/subscriberbot/components/decisions/DecisionCard.js.map +1 -1
  40. package/dist/subscriberbot/components/mobile/MobileDashboard.d.ts.map +1 -1
  41. package/dist/subscriberbot/components/mobile/MobileDashboard.js +143 -135
  42. package/dist/subscriberbot/components/mobile/MobileDashboard.js.map +1 -1
  43. package/dist/subscriberbot/components/mobile/MobileRelationshipList.d.ts.map +1 -1
  44. package/dist/subscriberbot/components/mobile/MobileRelationshipList.js +114 -114
  45. package/dist/subscriberbot/components/mobile/MobileRelationshipList.js.map +1 -1
  46. package/dist/subscriberbot/components/mobile/MobileScreen.d.ts +3 -0
  47. package/dist/subscriberbot/components/mobile/MobileScreen.d.ts.map +1 -1
  48. package/dist/subscriberbot/components/mobile/MobileScreen.js +5 -3
  49. package/dist/subscriberbot/components/mobile/MobileScreen.js.map +1 -1
  50. package/dist/subscriberbot/components/negotiations/NegotiationStatusPill.js +4 -4
  51. package/dist/subscriberbot/components/negotiations/NegotiationTimeline.d.ts.map +1 -1
  52. package/dist/subscriberbot/components/negotiations/NegotiationTimeline.js +11 -11
  53. package/dist/subscriberbot/components/negotiations/NegotiationTimeline.js.map +1 -1
  54. package/dist/subscriberbot/components/negotiations/OutcomeForm.d.ts.map +1 -1
  55. package/dist/subscriberbot/components/negotiations/OutcomeForm.js +29 -29
  56. package/dist/subscriberbot/components/negotiations/OutcomeForm.js.map +1 -1
  57. package/dist/subscriberbot/components/procurement/ProcurementOutcomeForm.d.ts.map +1 -1
  58. package/dist/subscriberbot/components/procurement/ProcurementOutcomeForm.js +43 -43
  59. package/dist/subscriberbot/components/procurement/ProcurementOutcomeForm.js.map +1 -1
  60. package/dist/subscriberbot/components/procurement/ProcurementStatusPill.js +4 -4
  61. package/dist/subscriberbot/components/procurement/ProcurementThread.d.ts.map +1 -1
  62. package/dist/subscriberbot/components/procurement/ProcurementThread.js +14 -14
  63. package/dist/subscriberbot/components/procurement/ProcurementThread.js.map +1 -1
  64. package/dist/subscriberbot/components/savings/SavingsCards.d.ts.map +1 -1
  65. package/dist/subscriberbot/components/savings/SavingsCards.js +242 -237
  66. package/dist/subscriberbot/components/savings/SavingsCards.js.map +1 -1
  67. package/dist/subscriberbot/components/viz.d.ts +1 -0
  68. package/dist/subscriberbot/components/viz.d.ts.map +1 -1
  69. package/dist/subscriberbot/components/viz.js +100 -101
  70. package/dist/subscriberbot/components/viz.js.map +1 -1
  71. package/dist/subscriberbot/hooks/index.js +1 -1
  72. package/dist/subscriberbot/hooks/useFormError.d.ts +7 -0
  73. package/dist/subscriberbot/hooks/useFormError.d.ts.map +1 -0
  74. package/dist/subscriberbot/hooks/useFormError.js +28 -0
  75. package/dist/subscriberbot/hooks/useFormError.js.map +1 -0
  76. package/dist/subscriberbot/hooks/useFormatters.d.ts +11 -0
  77. package/dist/subscriberbot/hooks/useFormatters.d.ts.map +1 -0
  78. package/dist/subscriberbot/hooks/useFormatters.js +13 -0
  79. package/dist/subscriberbot/hooks/useFormatters.js.map +1 -0
  80. package/dist/subscriberbot/hooks/useSubscriberBotApi.d.ts.map +1 -1
  81. package/dist/subscriberbot/hooks/useSubscriberBotApi.js +371 -370
  82. package/dist/subscriberbot/hooks/useSubscriberBotApi.js.map +1 -1
  83. package/dist/subscriberbot/hooks/useTr.d.ts.map +1 -1
  84. package/dist/subscriberbot/hooks/useTr.js +1 -1
  85. package/dist/subscriberbot/hooks/useTr.js.map +1 -1
  86. package/dist/subscriberbot/index.js +1 -1
  87. package/dist/subscriberbot/pages/AssetVaultPage.d.ts.map +1 -1
  88. package/dist/subscriberbot/pages/AssetVaultPage.js +124 -124
  89. package/dist/subscriberbot/pages/AssetVaultPage.js.map +1 -1
  90. package/dist/subscriberbot/pages/DashboardPage.d.ts +0 -10
  91. package/dist/subscriberbot/pages/DashboardPage.d.ts.map +1 -1
  92. package/dist/subscriberbot/pages/DashboardPage.js +115 -98
  93. package/dist/subscriberbot/pages/DashboardPage.js.map +1 -1
  94. package/dist/subscriberbot/pages/InboxPage.d.ts +0 -10
  95. package/dist/subscriberbot/pages/InboxPage.d.ts.map +1 -1
  96. package/dist/subscriberbot/pages/InboxPage.js +421 -402
  97. package/dist/subscriberbot/pages/InboxPage.js.map +1 -1
  98. package/dist/subscriberbot/pages/InsightsPage.d.ts.map +1 -1
  99. package/dist/subscriberbot/pages/InsightsPage.js +130 -121
  100. package/dist/subscriberbot/pages/InsightsPage.js.map +1 -1
  101. package/dist/subscriberbot/pages/InvoicesPage.d.ts +0 -12
  102. package/dist/subscriberbot/pages/InvoicesPage.d.ts.map +1 -1
  103. package/dist/subscriberbot/pages/InvoicesPage.js +237 -215
  104. package/dist/subscriberbot/pages/InvoicesPage.js.map +1 -1
  105. package/dist/subscriberbot/pages/RenewalsPage.d.ts.map +1 -1
  106. package/dist/subscriberbot/pages/RenewalsPage.js +303 -295
  107. package/dist/subscriberbot/pages/RenewalsPage.js.map +1 -1
  108. package/dist/subscriberbot/pages/SavingsPage.d.ts.map +1 -1
  109. package/dist/subscriberbot/pages/SavingsPage.js +57 -57
  110. package/dist/subscriberbot/pages/SavingsPage.js.map +1 -1
  111. package/dist/subscriberbot/pages/WorkflowsPage.d.ts +0 -13
  112. package/dist/subscriberbot/pages/WorkflowsPage.d.ts.map +1 -1
  113. package/dist/subscriberbot/pages/WorkflowsPage.js +202 -196
  114. package/dist/subscriberbot/pages/WorkflowsPage.js.map +1 -1
  115. package/dist/subscriberbot/pages/agents/AgentDetailPage.d.ts +0 -18
  116. package/dist/subscriberbot/pages/agents/AgentDetailPage.d.ts.map +1 -1
  117. package/dist/subscriberbot/pages/agents/AgentDetailPage.js +283 -275
  118. package/dist/subscriberbot/pages/agents/AgentDetailPage.js.map +1 -1
  119. package/dist/subscriberbot/pages/agents/AgentNewPage.d.ts +0 -6
  120. package/dist/subscriberbot/pages/agents/AgentNewPage.d.ts.map +1 -1
  121. package/dist/subscriberbot/pages/agents/AgentNewPage.js +85 -77
  122. package/dist/subscriberbot/pages/agents/AgentNewPage.js.map +1 -1
  123. package/dist/subscriberbot/pages/agents/AgentsListPage.d.ts +0 -9
  124. package/dist/subscriberbot/pages/agents/AgentsListPage.d.ts.map +1 -1
  125. package/dist/subscriberbot/pages/agents/AgentsListPage.js +136 -136
  126. package/dist/subscriberbot/pages/agents/AgentsListPage.js.map +1 -1
  127. package/dist/subscriberbot/pages/banking/BankConnectionsPage.d.ts +0 -9
  128. package/dist/subscriberbot/pages/banking/BankConnectionsPage.d.ts.map +1 -1
  129. package/dist/subscriberbot/pages/banking/BankConnectionsPage.js +272 -260
  130. package/dist/subscriberbot/pages/banking/BankConnectionsPage.js.map +1 -1
  131. package/dist/subscriberbot/pages/decisions/DecisionDetailPage.d.ts +0 -10
  132. package/dist/subscriberbot/pages/decisions/DecisionDetailPage.d.ts.map +1 -1
  133. package/dist/subscriberbot/pages/decisions/DecisionDetailPage.js +96 -96
  134. package/dist/subscriberbot/pages/decisions/DecisionDetailPage.js.map +1 -1
  135. package/dist/subscriberbot/pages/decisions/DecisionsPage.d.ts +0 -11
  136. package/dist/subscriberbot/pages/decisions/DecisionsPage.d.ts.map +1 -1
  137. package/dist/subscriberbot/pages/decisions/DecisionsPage.js +46 -46
  138. package/dist/subscriberbot/pages/decisions/DecisionsPage.js.map +1 -1
  139. package/dist/subscriberbot/pages/enterprise/EnterpriseSpendPage.d.ts +0 -11
  140. package/dist/subscriberbot/pages/enterprise/EnterpriseSpendPage.d.ts.map +1 -1
  141. package/dist/subscriberbot/pages/enterprise/EnterpriseSpendPage.js +181 -171
  142. package/dist/subscriberbot/pages/enterprise/EnterpriseSpendPage.js.map +1 -1
  143. package/dist/subscriberbot/pages/negotiations/NegotiationDetailPage.d.ts +0 -9
  144. package/dist/subscriberbot/pages/negotiations/NegotiationDetailPage.d.ts.map +1 -1
  145. package/dist/subscriberbot/pages/negotiations/NegotiationDetailPage.js +164 -164
  146. package/dist/subscriberbot/pages/negotiations/NegotiationDetailPage.js.map +1 -1
  147. package/dist/subscriberbot/pages/negotiations/NegotiationNewPage.d.ts +0 -9
  148. package/dist/subscriberbot/pages/negotiations/NegotiationNewPage.d.ts.map +1 -1
  149. package/dist/subscriberbot/pages/negotiations/NegotiationNewPage.js +197 -181
  150. package/dist/subscriberbot/pages/negotiations/NegotiationNewPage.js.map +1 -1
  151. package/dist/subscriberbot/pages/negotiations/NegotiationsPage.d.ts +0 -8
  152. package/dist/subscriberbot/pages/negotiations/NegotiationsPage.d.ts.map +1 -1
  153. package/dist/subscriberbot/pages/negotiations/NegotiationsPage.js +79 -79
  154. package/dist/subscriberbot/pages/negotiations/NegotiationsPage.js.map +1 -1
  155. package/dist/subscriberbot/pages/procurement/ProcurementDetailPage.d.ts +0 -9
  156. package/dist/subscriberbot/pages/procurement/ProcurementDetailPage.d.ts.map +1 -1
  157. package/dist/subscriberbot/pages/procurement/ProcurementDetailPage.js +147 -147
  158. package/dist/subscriberbot/pages/procurement/ProcurementDetailPage.js.map +1 -1
  159. package/dist/subscriberbot/pages/procurement/ProcurementNewPage.d.ts +0 -10
  160. package/dist/subscriberbot/pages/procurement/ProcurementNewPage.d.ts.map +1 -1
  161. package/dist/subscriberbot/pages/procurement/ProcurementNewPage.js +204 -188
  162. package/dist/subscriberbot/pages/procurement/ProcurementNewPage.js.map +1 -1
  163. package/dist/subscriberbot/pages/procurement/ProcurementPage.d.ts +0 -9
  164. package/dist/subscriberbot/pages/procurement/ProcurementPage.d.ts.map +1 -1
  165. package/dist/subscriberbot/pages/procurement/ProcurementPage.js +80 -80
  166. package/dist/subscriberbot/pages/procurement/ProcurementPage.js.map +1 -1
  167. package/dist/subscriberbot/pages/providers/ProviderDetailPage.d.ts +0 -10
  168. package/dist/subscriberbot/pages/providers/ProviderDetailPage.d.ts.map +1 -1
  169. package/dist/subscriberbot/pages/providers/ProviderDetailPage.js +484 -458
  170. package/dist/subscriberbot/pages/providers/ProviderDetailPage.js.map +1 -1
  171. package/dist/subscriberbot/pages/providers/ProviderNewPage.d.ts +0 -8
  172. package/dist/subscriberbot/pages/providers/ProviderNewPage.d.ts.map +1 -1
  173. package/dist/subscriberbot/pages/providers/ProviderNewPage.js +146 -136
  174. package/dist/subscriberbot/pages/providers/ProviderNewPage.js.map +1 -1
  175. package/dist/subscriberbot/pages/providers/ProvidersListPage.d.ts +0 -10
  176. package/dist/subscriberbot/pages/providers/ProvidersListPage.d.ts.map +1 -1
  177. package/dist/subscriberbot/pages/providers/ProvidersListPage.js +88 -87
  178. package/dist/subscriberbot/pages/providers/ProvidersListPage.js.map +1 -1
  179. package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.d.ts +0 -11
  180. package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.d.ts.map +1 -1
  181. package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js +520 -490
  182. package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js.map +1 -1
  183. package/dist/subscriberbot/pages/relationships/RelationshipNewPage.d.ts +0 -8
  184. package/dist/subscriberbot/pages/relationships/RelationshipNewPage.d.ts.map +1 -1
  185. package/dist/subscriberbot/pages/relationships/RelationshipNewPage.js +112 -91
  186. package/dist/subscriberbot/pages/relationships/RelationshipNewPage.js.map +1 -1
  187. package/dist/subscriberbot/pages/relationships/RelationshipsListPage.d.ts +0 -8
  188. package/dist/subscriberbot/pages/relationships/RelationshipsListPage.d.ts.map +1 -1
  189. package/dist/subscriberbot/pages/relationships/RelationshipsListPage.js +97 -96
  190. package/dist/subscriberbot/pages/relationships/RelationshipsListPage.js.map +1 -1
  191. package/dist/subscriberbot/pages/workflows/WorkflowBuilderPage.d.ts.map +1 -1
  192. package/dist/subscriberbot/pages/workflows/WorkflowBuilderPage.js +76 -74
  193. package/dist/subscriberbot/pages/workflows/WorkflowBuilderPage.js.map +1 -1
  194. package/dist/subscriberbot/pages/workflows/workflowBuilderGraph.d.ts +5 -3
  195. package/dist/subscriberbot/pages/workflows/workflowBuilderGraph.d.ts.map +1 -1
  196. package/dist/subscriberbot/pages/workflows/workflowBuilderGraph.js +26 -25
  197. package/dist/subscriberbot/pages/workflows/workflowBuilderGraph.js.map +1 -1
  198. package/dist/subscriberbot/utils/formatters.d.ts +16 -5
  199. package/dist/subscriberbot/utils/formatters.d.ts.map +1 -1
  200. package/dist/subscriberbot/utils/formatters.js +57 -25
  201. package/dist/subscriberbot/utils/formatters.js.map +1 -1
  202. package/dist/subscriberbot/utils/plaidLink.d.ts +2 -1
  203. package/dist/subscriberbot/utils/plaidLink.d.ts.map +1 -1
  204. package/dist/subscriberbot/utils/plaidLink.js +21 -21
  205. package/dist/subscriberbot/utils/plaidLink.js.map +1 -1
  206. package/package.json +1 -1
@@ -1,413 +1,418 @@
1
1
  import { useSubscriberBot as e } from "../../context/SubscriberBotContext.js";
2
- import { cn as t } from "../../utils/cn.js";
3
- import { formatCurrency as n, formatEnumLabel as r } from "../../utils/formatters.js";
2
+ import { useTr as t } from "../../hooks/useTr.js";
3
+ import { useFormatters as n } from "../../hooks/useFormatters.js";
4
+ import { cn as r } from "../../utils/cn.js";
4
5
  import { Modal as i } from "../Modal.js";
5
- import { useTr as a } from "../../hooks/useTr.js";
6
- import { useConsolidateRelationships as o, useDismissBundle as s } from "../../hooks/useSubscriberBotApi.js";
7
- import { RECOMMENDATION_LABEL as c, confidencePercent as l, isDestructive as u, relationshipSnapshot as d } from "../decisions/decisionModel.js";
8
- import { ApplyDecisionDialog as f, DecisionSources as p, DismissDecisionDialog as m } from "../decisions/DecisionCard.js";
6
+ import { useConsolidateRelationships as a, useDismissBundle as o } from "../../hooks/useSubscriberBotApi.js";
7
+ import { RECOMMENDATION_LABEL as s, confidencePercent as c, isDestructive as l, relationshipSnapshot as u } from "../decisions/decisionModel.js";
8
+ import { ApplyDecisionDialog as d, DecisionSources as f, DismissDecisionDialog as p } from "../decisions/DecisionCard.js";
9
9
  import "../decisions/index.js";
10
- import { bundleMembers as h, parseBundledAmount as g, projectedConsolidationSavings as _, sectionOf as v } from "./savingsModel.js";
11
- import { useState as y } from "react";
12
- import { ArrowDownRight as b, CalendarRange as x, CheckCircle2 as S, Combine as C, ExternalLink as w, Gauge as T, Layers as E, ShieldAlert as D, Trash2 as O, XCircle as k } from "lucide-react";
13
- import { jsx as A, jsxs as j } from "react/jsx-runtime";
14
- import { GlassCard as M } from "@burdenoff/fe-libs/ui";
10
+ import { bundleMembers as m, parseBundledAmount as h, projectedConsolidationSavings as g, sectionOf as _ } from "./savingsModel.js";
11
+ import { useState as v } from "react";
12
+ import { ArrowDownRight as y, CalendarRange as b, CheckCircle2 as x, Combine as S, ExternalLink as C, Gauge as w, Layers as T, ShieldAlert as E, Trash2 as D, XCircle as O } from "lucide-react";
13
+ import { jsx as k, jsxs as A } from "react/jsx-runtime";
14
+ import { GlassCard as j } from "@burdenoff/fe-libs/ui";
15
15
  //#region src/subscriberbot/components/savings/SavingsCards.tsx
16
- var N = {
17
- cancel: O,
18
- downgrade: b,
19
- annual: x,
20
- other: E
21
- }, P = [
16
+ var M = {
17
+ cancel: D,
18
+ downgrade: y,
19
+ annual: b,
20
+ other: T
21
+ }, N = [
22
22
  "MONTHLY",
23
23
  "QUARTERLY",
24
24
  "YEARLY"
25
25
  ];
26
- function F(e, t) {
26
+ function P(e, t) {
27
27
  return e instanceof Error && e.message ? e.message : t;
28
28
  }
29
- function I(e, t, i) {
30
- return `${n(e, t)} / ${r(i).toLowerCase()}`;
31
- }
32
- var L = ({ decision: r }) => {
33
- let i = a(), { navigateTo: o } = e(), [s, h] = y(null), g = c[r.recommendation], _ = u(r.recommendation), b = d(r), x = N[v(r.recommendation)], C = b.label ?? r.relationshipId;
34
- return /* @__PURE__ */ j(M, {
29
+ var F = ({ decision: i }) => {
30
+ let { formatCurrency: a, formatPrice: o } = n(), m = t(), { navigateTo: h } = e(), [g, y] = v(null), b = s[i.recommendation], S = l(i.recommendation), T = u(i), E = M[_(i.recommendation)], D = T.label ?? i.relationshipId;
31
+ return /* @__PURE__ */ A(j, {
35
32
  treatment: "metric",
36
33
  className: "flex flex-col gap-3 p-4",
37
34
  "data-testid": "savings-card",
38
- "data-decision-id": r.id,
39
- "data-recommendation": r.recommendation,
35
+ "data-decision-id": i.id,
36
+ "data-recommendation": i.recommendation,
40
37
  children: [
41
- /* @__PURE__ */ j("div", {
38
+ /* @__PURE__ */ A("div", {
42
39
  className: "flex items-start gap-3",
43
40
  children: [
44
- /* @__PURE__ */ A("span", {
45
- className: t("flex size-9 shrink-0 items-center justify-center rounded-lg", _ ? "bg-status-error-bg-subtle text-status-error-text" : "bg-bg-sunken text-text-secondary"),
41
+ /* @__PURE__ */ k("span", {
42
+ className: r("flex size-9 shrink-0 items-center justify-center rounded-lg", S ? "bg-status-error-bg-subtle text-status-error-text" : "bg-bg-sunken text-text-secondary"),
46
43
  "aria-hidden": !0,
47
- children: /* @__PURE__ */ A(x, { className: "h-4 w-4" })
44
+ children: /* @__PURE__ */ k(E, { className: "h-4 w-4" })
48
45
  }),
49
- /* @__PURE__ */ j("div", {
46
+ /* @__PURE__ */ A("div", {
50
47
  className: "min-w-0 flex-1",
51
48
  children: [
52
- /* @__PURE__ */ A("p", {
49
+ /* @__PURE__ */ k("p", {
53
50
  className: "text-sm font-semibold text-text-primary",
54
- children: i(g.key, g.fallback)
51
+ children: m(b.key, b.fallback)
55
52
  }),
56
- /* @__PURE__ */ A("button", {
53
+ /* @__PURE__ */ k("button", {
57
54
  type: "button",
58
- onClick: () => o(`/relationships/${r.relationshipId}`),
59
- className: "block max-w-full truncate text-left text-sm text-text-primary hover:underline",
55
+ onClick: () => h(`/relationships/${i.relationshipId}`),
56
+ className: "block max-w-full truncate text-start text-sm text-text-primary hover:underline",
60
57
  "data-testid": "savings-card-relationship",
61
- children: C
58
+ children: D
62
59
  }),
63
- b.amount !== null && /* @__PURE__ */ A("p", {
60
+ T.amount !== null && /* @__PURE__ */ k("p", {
64
61
  className: "text-xs tabular-nums text-text-secondary",
65
- children: i("savings.card.current", "Now {{price}}", { price: I(b.amount, b.currency ?? r.currency, b.interval ?? "MONTHLY") })
62
+ children: m("savings.card.current", "Now {{price}}", { price: o(T.amount, T.currency ?? i.currency, T.interval ?? "MONTHLY") })
66
63
  })
67
64
  ]
68
65
  }),
69
- r.estimatedSavings > 0 && /* @__PURE__ */ j("p", {
70
- className: "shrink-0 text-right text-sm font-semibold tabular-nums text-status-success-text",
66
+ i.estimatedSavings > 0 && /* @__PURE__ */ A("p", {
67
+ className: "shrink-0 text-end text-sm font-semibold tabular-nums text-status-success-text",
71
68
  "data-testid": "savings-card-amount",
72
- children: [i("savings.card.save", "Save {{amount}}", { amount: n(r.estimatedSavings, r.currency) }), /* @__PURE__ */ A("span", {
69
+ children: [m("savings.card.save", "Save {{amount}}", { amount: a(i.estimatedSavings, i.currency) }), /* @__PURE__ */ k("span", {
73
70
  className: "block text-[11px] font-normal text-text-secondary",
74
- children: i("savings.card.perYear", "per year")
71
+ children: m("savings.card.perYear", "per year")
75
72
  })]
76
73
  })
77
74
  ]
78
75
  }),
79
- /* @__PURE__ */ A("p", {
76
+ /* @__PURE__ */ k("p", {
80
77
  className: "text-sm text-text-secondary",
81
- children: r.rationale
78
+ children: i.rationale
82
79
  }),
83
- /* @__PURE__ */ j("div", {
80
+ /* @__PURE__ */ A("div", {
84
81
  className: "flex flex-wrap items-center gap-2 text-xs",
85
- children: [/* @__PURE__ */ j("span", {
82
+ children: [/* @__PURE__ */ A("span", {
86
83
  className: "inline-flex items-center gap-1.5 rounded-md bg-bg-sunken px-2 py-0.5 text-text-secondary",
87
- children: [/* @__PURE__ */ A(T, {
84
+ children: [/* @__PURE__ */ k(w, {
88
85
  className: "h-3.5 w-3.5",
89
86
  "aria-hidden": !0
90
- }), i("decisions.card.confidence", "Confidence {{pct}}%", { pct: l(r.confidence) })]
91
- }), /* @__PURE__ */ j("button", {
87
+ }), m("decisions.card.confidence", "Confidence {{pct}}%", { pct: c(i.confidence) })]
88
+ }), /* @__PURE__ */ A("button", {
92
89
  type: "button",
93
- onClick: () => o(`/decisions/${r.id}`),
90
+ onClick: () => h(`/decisions/${i.id}`),
94
91
  className: "inline-flex items-center gap-1 rounded-md px-1 text-text-secondary hover:text-text-primary",
95
- children: [i("savings.card.details", "Details"), /* @__PURE__ */ A(w, {
92
+ children: [m("savings.card.details", "Details"), /* @__PURE__ */ k(C, {
96
93
  className: "h-3 w-3",
97
94
  "aria-hidden": !0
98
95
  })]
99
96
  })]
100
97
  }),
101
- /* @__PURE__ */ A(p, {
102
- decision: r,
98
+ /* @__PURE__ */ k(f, {
99
+ decision: i,
103
100
  limit: 3
104
101
  }),
105
- /* @__PURE__ */ j("div", {
102
+ /* @__PURE__ */ A("div", {
106
103
  className: "flex flex-wrap justify-end gap-2 border-t border-border-subtle pt-3",
107
- children: [/* @__PURE__ */ j("button", {
104
+ children: [/* @__PURE__ */ A("button", {
108
105
  type: "button",
109
- onClick: () => h("dismiss"),
106
+ onClick: () => y("dismiss"),
110
107
  "data-testid": "savings-dismiss",
111
108
  className: "inline-flex items-center gap-1.5 rounded-lg border border-border-subtle px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-bg-sunken",
112
- children: [/* @__PURE__ */ A(k, {
109
+ children: [/* @__PURE__ */ k(O, {
113
110
  className: "h-3.5 w-3.5",
114
111
  "aria-hidden": !0
115
- }), i("decisions.card.dismiss", "Dismiss")]
116
- }), /* @__PURE__ */ j("button", {
112
+ }), m("decisions.card.dismiss", "Dismiss")]
113
+ }), /* @__PURE__ */ A("button", {
117
114
  type: "button",
118
- onClick: () => h("apply"),
115
+ onClick: () => y("apply"),
119
116
  "data-testid": "savings-apply",
120
- className: t("inline-flex items-center gap-1.5 rounded-lg px-3 py-1.5 text-xs font-medium hover:opacity-90", _ ? "border border-status-error-text/40 bg-status-error-bg-subtle text-status-error-text" : "bg-action-primary-bg text-action-primary-text"),
121
- children: [/* @__PURE__ */ A(S, {
117
+ className: r("inline-flex items-center gap-1.5 rounded-lg px-3 py-1.5 text-xs font-medium hover:opacity-90", S ? "border border-status-error-text/40 bg-status-error-bg-subtle text-status-error-text" : "bg-action-primary-bg text-action-primary-text"),
118
+ children: [/* @__PURE__ */ k(x, {
122
119
  className: "h-3.5 w-3.5",
123
120
  "aria-hidden": !0
124
- }), i("savings.card.apply", "Apply")]
121
+ }), m("savings.card.apply", "Apply")]
125
122
  })]
126
123
  }),
127
- s === "apply" && /* @__PURE__ */ A(f, {
128
- decision: r,
129
- onClose: () => h(null)
124
+ g === "apply" && /* @__PURE__ */ k(d, {
125
+ decision: i,
126
+ onClose: () => y(null)
130
127
  }),
131
- s === "dismiss" && /* @__PURE__ */ A(m, {
132
- decision: r,
133
- onClose: () => h(null)
128
+ g === "dismiss" && /* @__PURE__ */ k(p, {
129
+ decision: i,
130
+ onClose: () => y(null)
134
131
  })
135
132
  ]
136
133
  });
137
- }, R = {
134
+ }, I = {
138
135
  keep: "bg-status-success-bg-subtle text-status-success-text",
139
136
  cancel: "bg-status-error-bg-subtle text-status-error-text",
140
137
  untouched: "bg-bg-sunken text-text-secondary"
141
- }, z = ({ role: e }) => {
142
- let n = a(), r = {
138
+ }, L = ({ role: e }) => {
139
+ let n = t(), i = {
143
140
  keep: n("savings.bundle.keep", "Keep"),
144
141
  cancel: n("savings.bundle.cancel", "Cancel"),
145
142
  untouched: n("savings.bundle.leftAlone", "Left alone")
146
143
  }[e];
147
- return /* @__PURE__ */ A("span", {
148
- className: t("shrink-0 rounded px-1.5 py-0.5 text-[10px] font-medium uppercase", R[e]),
149
- children: r
144
+ return /* @__PURE__ */ k("span", {
145
+ className: r("shrink-0 rounded px-1.5 py-0.5 text-[10px] font-medium uppercase", I[e]),
146
+ children: i
150
147
  });
151
- }, B = ({ member: e, role: t }) => /* @__PURE__ */ j("li", {
152
- className: "flex items-center gap-2.5 rounded-lg border border-border-subtle px-3 py-2 text-sm",
153
- "data-role": t,
154
- children: [
155
- /* @__PURE__ */ A(z, { role: t }),
156
- /* @__PURE__ */ A("span", {
157
- className: "min-w-0 flex-1 truncate text-text-primary",
158
- children: e.label
159
- }),
160
- /* @__PURE__ */ A("span", {
161
- className: "shrink-0 tabular-nums text-text-secondary",
162
- children: I(e.amount, e.currency, e.interval)
163
- })
164
- ]
165
- }), V = ({ bundle: e, onClose: t, onDone: s }) => {
166
- let c = a(), l = o(), [u, d] = y(""), [f, p] = y("MONTHLY"), [m, v] = y(!1), [b, x] = y(null), { keep: S, cancel: C, untouched: w } = h(e), T = g(u), E = Number.isNaN(T), D = T !== null && !E ? {
167
- amount: T,
168
- interval: f
169
- } : null, O = _(e, D), k = C.map((e) => `"${e.label}"`).join(", "), M = m && !E && !l.isPending && S !== null;
170
- return /* @__PURE__ */ A(i, {
171
- title: c("savings.bundle.consolidateTitle", "Consolidate subscriptions"),
172
- description: c("savings.bundle.consolidateDescription", "Keep one subscription and cancel the others. Each cancel is the same change you could make by hand."),
173
- onClose: t,
174
- children: /* @__PURE__ */ j("form", {
175
- onSubmit: (n) => {
176
- n.preventDefault(), M && (x(null), l.mutate({
148
+ }, R = ({ member: e, role: t }) => {
149
+ let { formatPrice: r } = n();
150
+ return /* @__PURE__ */ A("li", {
151
+ className: "flex items-center gap-2.5 rounded-lg border border-border-subtle px-3 py-2 text-sm",
152
+ "data-role": t,
153
+ children: [
154
+ /* @__PURE__ */ k(L, { role: t }),
155
+ /* @__PURE__ */ k("span", {
156
+ className: "min-w-0 flex-1 truncate text-text-primary",
157
+ children: e.label
158
+ }),
159
+ /* @__PURE__ */ k("span", {
160
+ className: "shrink-0 tabular-nums text-text-secondary",
161
+ children: r(e.amount, e.currency, e.interval)
162
+ })
163
+ ]
164
+ });
165
+ }, z = ({ bundle: e, onClose: r, onDone: o }) => {
166
+ let { formatCurrency: s, formatEnumLabel: c } = n(), l = t(), u = a(), [d, f] = v(""), [p, _] = v("MONTHLY"), [y, b] = v(!1), [x, S] = v(null), { keep: C, cancel: w, untouched: T } = m(e), E = h(d), D = Number.isNaN(E), O = E !== null && !D ? {
167
+ amount: E,
168
+ interval: p
169
+ } : null, j = g(e, O), M = w.map((e) => `"${e.label}"`).join(", "), F = y && !D && !u.isPending && C !== null;
170
+ return /* @__PURE__ */ k(i, {
171
+ title: l("savings.bundle.consolidateTitle", "Consolidate subscriptions"),
172
+ description: l("savings.bundle.consolidateDescription", "Keep one subscription and cancel the others. Each cancel is the same change you could make by hand."),
173
+ onClose: r,
174
+ children: /* @__PURE__ */ A("form", {
175
+ onSubmit: (t) => {
176
+ t.preventDefault(), F && (S(null), u.mutate({
177
177
  keepRelationshipId: e.keepRelationshipId,
178
- cancelRelationshipIds: C.map((e) => e.relationshipId),
179
- ...D ? {
180
- amount: D.amount,
181
- interval: D.interval
178
+ cancelRelationshipIds: w.map((e) => e.relationshipId),
179
+ ...O ? {
180
+ amount: O.amount,
181
+ interval: O.interval
182
182
  } : {}
183
183
  }, {
184
184
  onSuccess: (e) => {
185
- s(e), t();
185
+ o(e), r();
186
186
  },
187
- onError: (e) => x(F(e, c("savings.bundle.consolidateError", "Could not consolidate.")))
187
+ onError: (e) => S(P(e, l("savings.bundle.consolidateError", "Could not consolidate.")))
188
188
  }));
189
189
  },
190
190
  className: "space-y-4",
191
191
  "data-testid": "consolidate-dialog",
192
192
  children: [
193
- /* @__PURE__ */ j("ul", {
193
+ /* @__PURE__ */ A("ul", {
194
194
  className: "space-y-1.5",
195
195
  "data-testid": "consolidate-members",
196
196
  children: [
197
- S && /* @__PURE__ */ A(B, {
198
- member: S,
197
+ C && /* @__PURE__ */ k(R, {
198
+ member: C,
199
199
  role: "keep"
200
200
  }),
201
- C.map((e) => /* @__PURE__ */ A(B, {
201
+ w.map((e) => /* @__PURE__ */ k(R, {
202
202
  member: e,
203
203
  role: "cancel"
204
204
  }, e.relationshipId)),
205
- w.map((e) => /* @__PURE__ */ A(B, {
205
+ T.map((e) => /* @__PURE__ */ k(R, {
206
206
  member: e,
207
207
  role: "untouched"
208
208
  }, e.relationshipId))
209
209
  ]
210
210
  }),
211
- w.length > 0 && /* @__PURE__ */ A("p", {
211
+ T.length > 0 && /* @__PURE__ */ k("p", {
212
212
  className: "text-xs text-text-secondary",
213
- children: c("savings.bundle.untouched", "Subscriptions marked \"Left alone\" cover something the kept one does not, so they are not cancelled.")
213
+ children: l("savings.bundle.untouched", "Subscriptions marked \"Left alone\" cover something the kept one does not, so they are not cancelled.")
214
214
  }),
215
- /* @__PURE__ */ j("div", { children: [
216
- /* @__PURE__ */ A("p", {
215
+ /* @__PURE__ */ A("div", { children: [
216
+ /* @__PURE__ */ k("p", {
217
217
  className: "mb-1.5 text-xs font-medium text-text-secondary",
218
- children: c("savings.bundle.planLabel", "Bundled plan price for the kept subscription (optional)")
218
+ children: l("savings.bundle.planLabel", "Bundled plan price for the kept subscription (optional)")
219
219
  }),
220
- /* @__PURE__ */ j("div", {
220
+ /* @__PURE__ */ A("div", {
221
221
  className: "flex gap-2",
222
- children: [/* @__PURE__ */ A("input", {
222
+ children: [/* @__PURE__ */ k("input", {
223
223
  type: "number",
224
224
  inputMode: "decimal",
225
225
  min: "0",
226
226
  step: "0.01",
227
- value: u,
228
- onChange: (e) => d(e.target.value),
229
- placeholder: S ? String(S.amount) : c("savings.bundle.planPlaceholder", "Same price"),
230
- "aria-label": c("savings.bundle.planAmount", "Bundled plan amount"),
231
- "aria-invalid": E,
227
+ value: d,
228
+ onChange: (e) => f(e.target.value),
229
+ placeholder: C ? String(C.amount) : l("savings.bundle.planPlaceholder", "Same price"),
230
+ "aria-label": l("savings.bundle.planAmount", "Bundled plan amount"),
231
+ "aria-invalid": D,
232
+ "aria-describedby": D ? "consolidate-price-error" : void 0,
232
233
  "data-testid": "consolidate-amount",
233
234
  className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
234
- }), /* @__PURE__ */ A("select", {
235
- value: f,
236
- onChange: (e) => p(e.target.value),
237
- "aria-label": c("savings.bundle.planInterval", "Billing interval"),
235
+ }), /* @__PURE__ */ k("select", {
236
+ value: p,
237
+ onChange: (e) => _(e.target.value),
238
+ "aria-label": l("savings.bundle.planInterval", "Billing interval"),
238
239
  className: "rounded-lg border border-border-subtle bg-bg-surface px-2 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
239
- children: P.map((e) => /* @__PURE__ */ A("option", {
240
+ children: N.map((e) => /* @__PURE__ */ k("option", {
240
241
  value: e,
241
- children: r(e)
242
+ children: c(e)
242
243
  }, e))
243
244
  })]
244
245
  }),
245
- E && /* @__PURE__ */ A("p", {
246
+ D && /* @__PURE__ */ k("p", {
247
+ id: "consolidate-price-error",
248
+ role: "alert",
246
249
  className: "mt-1 text-xs text-status-error-text",
247
- children: c("savings.bundle.planInvalid", "Enter zero or a positive amount.")
250
+ children: l("savings.bundle.planInvalid", "Enter zero or a positive amount.")
248
251
  })
249
252
  ] }),
250
- /* @__PURE__ */ A("p", {
253
+ /* @__PURE__ */ k("p", {
251
254
  className: "text-sm text-text-primary",
252
255
  "data-testid": "consolidate-projected",
253
- children: c("savings.bundle.projected", "Estimated saving: {{amount}} a year", { amount: n(Math.max(O, 0), e.currency) })
256
+ children: l("savings.bundle.projected", "Estimated saving: {{amount}} a year", { amount: s(Math.max(j, 0), e.currency) })
254
257
  }),
255
- /* @__PURE__ */ j("label", {
258
+ /* @__PURE__ */ A("label", {
256
259
  className: "flex items-start gap-2.5 rounded-lg border border-status-error-text/30 bg-status-error-bg-subtle px-4 py-3 text-sm text-status-error-text",
257
- children: [/* @__PURE__ */ A("input", {
260
+ children: [/* @__PURE__ */ k("input", {
258
261
  type: "checkbox",
259
- checked: m,
260
- onChange: (e) => v(e.target.checked),
262
+ checked: y,
263
+ onChange: (e) => b(e.target.checked),
261
264
  className: "mt-0.5 size-4 shrink-0 rounded border-border-subtle",
262
265
  "data-testid": "consolidate-acknowledge"
263
- }), /* @__PURE__ */ A("span", { children: c("savings.bundle.acknowledge", "I want to cancel {{names}} and keep \"{{keep}}\". I understand the cancelled subscriptions will stop.", {
264
- names: k,
265
- keep: S?.label ?? ""
266
+ }), /* @__PURE__ */ k("span", { children: l("savings.bundle.acknowledge", "I want to cancel {{names}} and keep \"{{keep}}\". I understand the cancelled subscriptions will stop.", {
267
+ names: M,
268
+ keep: C?.label ?? ""
266
269
  }) })]
267
270
  }),
268
- b && /* @__PURE__ */ A("div", {
271
+ x && /* @__PURE__ */ k("div", {
272
+ role: "alert",
269
273
  className: "rounded-lg border border-status-error-text/30 bg-status-error-bg-subtle px-4 py-2 text-sm text-status-error-text",
270
- children: b
274
+ children: x
271
275
  }),
272
- /* @__PURE__ */ j("div", {
276
+ /* @__PURE__ */ A("div", {
273
277
  className: "flex justify-end gap-3",
274
- children: [/* @__PURE__ */ A("button", {
278
+ children: [/* @__PURE__ */ k("button", {
275
279
  type: "button",
276
- onClick: t,
280
+ onClick: r,
277
281
  className: "rounded-lg border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
278
- children: c("decisions.apply.back", "Not now")
279
- }), /* @__PURE__ */ A("button", {
282
+ children: l("decisions.apply.back", "Not now")
283
+ }), /* @__PURE__ */ k("button", {
280
284
  type: "submit",
281
- disabled: !M,
285
+ disabled: !F,
282
286
  "data-testid": "confirm-consolidate",
283
287
  className: "rounded-lg bg-action-danger-bg px-4 py-2 text-sm font-medium text-action-danger-text hover:bg-action-danger-bg-hover disabled:cursor-not-allowed disabled:opacity-50",
284
- children: l.isPending ? c("savings.bundle.consolidating", "Consolidating…") : c("savings.bundle.consolidateSubmit", "Consolidate")
288
+ children: u.isPending ? l("savings.bundle.consolidating", "Consolidating…") : l("savings.bundle.consolidateSubmit", "Consolidate")
285
289
  })]
286
290
  })
287
291
  ]
288
292
  })
289
293
  });
290
- }, H = ({ bundle: e, onClose: t }) => {
291
- let n = a(), r = s(), [o, c] = y(""), [l, u] = y(null);
292
- return /* @__PURE__ */ A(i, {
293
- title: n("savings.bundle.dismissTitle", "Dismiss bundle suggestion"),
294
- description: n("savings.bundle.dismissDescription", "It stays hidden until one of these subscriptions changes."),
295
- onClose: t,
296
- children: /* @__PURE__ */ j("form", {
297
- onSubmit: (i) => {
298
- i.preventDefault(), u(null), r.mutate({
294
+ }, B = ({ bundle: e, onClose: n }) => {
295
+ let r = t(), a = o(), [s, c] = v(""), [l, u] = v(null);
296
+ return /* @__PURE__ */ k(i, {
297
+ title: r("savings.bundle.dismissTitle", "Dismiss bundle suggestion"),
298
+ description: r("savings.bundle.dismissDescription", "It stays hidden until one of these subscriptions changes."),
299
+ onClose: n,
300
+ children: /* @__PURE__ */ A("form", {
301
+ onSubmit: (t) => {
302
+ t.preventDefault(), u(null), a.mutate({
299
303
  id: e.id,
300
- reason: o
304
+ reason: s
301
305
  }, {
302
- onSuccess: () => t(),
303
- onError: (e) => u(F(e, n("savings.bundle.dismissError", "Could not dismiss.")))
306
+ onSuccess: () => n(),
307
+ onError: (e) => u(P(e, r("savings.bundle.dismissError", "Could not dismiss.")))
304
308
  });
305
309
  },
306
310
  className: "space-y-4",
307
311
  "data-testid": "dismiss-bundle-dialog",
308
312
  children: [
309
- /* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("label", {
313
+ /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("label", {
310
314
  htmlFor: `dismiss-bundle-${e.id}`,
311
315
  className: "mb-1 block text-xs font-medium text-text-secondary",
312
- children: n("decisions.dismiss.reason", "Reason (optional)")
313
- }), /* @__PURE__ */ A("textarea", {
316
+ children: r("decisions.dismiss.reason", "Reason (optional)")
317
+ }), /* @__PURE__ */ k("textarea", {
314
318
  id: `dismiss-bundle-${e.id}`,
315
- value: o,
319
+ value: s,
316
320
  onChange: (e) => c(e.target.value),
317
321
  rows: 3,
318
322
  maxLength: 500,
319
- placeholder: n("savings.bundle.dismissPlaceholder", "e.g. They cover different needs"),
323
+ placeholder: r("savings.bundle.dismissPlaceholder", "e.g. They cover different needs"),
320
324
  className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
321
325
  })] }),
322
- l && /* @__PURE__ */ A("div", {
326
+ l && /* @__PURE__ */ k("div", {
327
+ role: "alert",
323
328
  className: "rounded-lg border border-status-error-text/30 bg-status-error-bg-subtle px-4 py-2 text-sm text-status-error-text",
324
329
  children: l
325
330
  }),
326
- /* @__PURE__ */ j("div", {
331
+ /* @__PURE__ */ A("div", {
327
332
  className: "flex justify-end gap-3",
328
- children: [/* @__PURE__ */ A("button", {
333
+ children: [/* @__PURE__ */ k("button", {
329
334
  type: "button",
330
- onClick: t,
335
+ onClick: n,
331
336
  className: "rounded-lg border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
332
- children: n("decisions.dismiss.back", "Back")
333
- }), /* @__PURE__ */ A("button", {
337
+ children: r("decisions.dismiss.back", "Back")
338
+ }), /* @__PURE__ */ k("button", {
334
339
  type: "submit",
335
- disabled: r.isPending,
340
+ disabled: a.isPending,
336
341
  "data-testid": "confirm-dismiss-bundle",
337
342
  className: "rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90 disabled:opacity-50",
338
- children: r.isPending ? n("decisions.dismiss.dismissing", "Dismissing…") : n("decisions.dismiss.submit", "Dismiss")
343
+ children: a.isPending ? r("decisions.dismiss.dismissing", "Dismissing…") : r("decisions.dismiss.submit", "Dismiss")
339
344
  })]
340
345
  })
341
346
  ]
342
347
  })
343
348
  });
344
- }, U = ({ bundle: t, onConsolidated: r }) => {
345
- let i = a(), { navigateTo: o } = e(), [s, c] = y(null), { keep: u, cancel: d } = h(t), f = new Set(t.dropRelationshipIds), p = {
346
- EXACT_DUPLICATE: i("savings.bundle.exactDuplicate", "Merge duplicate subscriptions"),
347
- CAPABILITY: i("savings.bundle.capability", "Several services for {{capability}}", { capability: t.title }),
348
- ENTITLEMENT: i("savings.bundle.entitlement", "Covered by a subscription you keep")
349
- }[t.type], m = t.annualSpend - t.annualSavings;
350
- return /* @__PURE__ */ j(M, {
349
+ }, V = ({ bundle: r, onConsolidated: i }) => {
350
+ let { formatCurrency: a, formatPrice: o } = n(), s = t(), { navigateTo: l } = e(), [u, d] = v(null), { keep: f, cancel: p } = m(r), h = new Set(r.dropRelationshipIds), g = {
351
+ EXACT_DUPLICATE: s("savings.bundle.exactDuplicate", "Merge duplicate subscriptions"),
352
+ CAPABILITY: s("savings.bundle.capability", "Several services for {{capability}}", { capability: r.title }),
353
+ ENTITLEMENT: s("savings.bundle.entitlement", "Covered by a subscription you keep")
354
+ }[r.type], _ = r.annualSpend - r.annualSavings;
355
+ return /* @__PURE__ */ A(j, {
351
356
  treatment: "metric",
352
357
  className: "flex flex-col gap-3 border border-status-warning-text/30 p-4",
353
358
  "data-testid": "bundle-card",
354
- "data-bundle-id": t.id,
355
- "data-type": t.type,
359
+ "data-bundle-id": r.id,
360
+ "data-type": r.type,
356
361
  children: [
357
- /* @__PURE__ */ j("div", {
362
+ /* @__PURE__ */ A("div", {
358
363
  className: "flex items-start gap-3",
359
364
  children: [
360
- /* @__PURE__ */ A("span", {
365
+ /* @__PURE__ */ k("span", {
361
366
  className: "flex size-9 shrink-0 items-center justify-center rounded-lg bg-status-warning-bg-subtle text-status-warning-text",
362
367
  "aria-hidden": !0,
363
- children: /* @__PURE__ */ A(C, { className: "h-4 w-4" })
368
+ children: /* @__PURE__ */ k(S, { className: "h-4 w-4" })
364
369
  }),
365
- /* @__PURE__ */ j("div", {
370
+ /* @__PURE__ */ A("div", {
366
371
  className: "min-w-0 flex-1",
367
- children: [/* @__PURE__ */ j("p", {
372
+ children: [/* @__PURE__ */ A("p", {
368
373
  className: "text-[11px] font-medium uppercase tracking-wide text-text-secondary",
369
- children: [i("savings.bundle.label", "Bundle suggestion"), t.type === "EXACT_DUPLICATE" && t.title ? ` · ${t.title}` : ""]
370
- }), /* @__PURE__ */ A("p", {
374
+ children: [s("savings.bundle.label", "Bundle suggestion"), r.type === "EXACT_DUPLICATE" && r.title ? ` · ${r.title}` : ""]
375
+ }), /* @__PURE__ */ k("p", {
371
376
  className: "text-sm font-semibold text-text-primary",
372
- children: p
377
+ children: g
373
378
  })]
374
379
  }),
375
- /* @__PURE__ */ j("p", {
376
- className: "shrink-0 text-right text-sm font-semibold tabular-nums text-status-success-text",
380
+ /* @__PURE__ */ A("p", {
381
+ className: "shrink-0 text-end text-sm font-semibold tabular-nums text-status-success-text",
377
382
  "data-testid": "bundle-card-amount",
378
- children: [i("savings.card.save", "Save {{amount}}", { amount: n(t.annualSavings, t.currency) }), /* @__PURE__ */ A("span", {
383
+ children: [s("savings.card.save", "Save {{amount}}", { amount: a(r.annualSavings, r.currency) }), /* @__PURE__ */ k("span", {
379
384
  className: "block text-[11px] font-normal text-text-secondary",
380
- children: i("savings.card.perYear", "per year")
385
+ children: s("savings.card.perYear", "per year")
381
386
  })]
382
387
  })
383
388
  ]
384
389
  }),
385
- /* @__PURE__ */ A("p", {
390
+ /* @__PURE__ */ k("p", {
386
391
  className: "text-sm text-text-secondary",
387
- children: t.rationale
392
+ children: r.rationale
388
393
  }),
389
- /* @__PURE__ */ A("ul", {
394
+ /* @__PURE__ */ k("ul", {
390
395
  className: "space-y-1",
391
396
  "data-testid": "bundle-relationships",
392
- children: t.members.map((e) => {
393
- let n = e.relationshipId === t.keepRelationshipId ? "keep" : f.has(e.relationshipId) ? "cancel" : "untouched";
394
- return /* @__PURE__ */ A("li", { children: /* @__PURE__ */ j("button", {
397
+ children: r.members.map((e) => {
398
+ let t = e.relationshipId === r.keepRelationshipId ? "keep" : h.has(e.relationshipId) ? "cancel" : "untouched";
399
+ return /* @__PURE__ */ k("li", { children: /* @__PURE__ */ A("button", {
395
400
  type: "button",
396
- onClick: () => o(`/relationships/${e.relationshipId}`),
401
+ onClick: () => l(`/relationships/${e.relationshipId}`),
397
402
  "data-relationship-id": e.relationshipId,
398
- "data-role": n,
399
- className: "flex w-full items-center gap-2 rounded-md border border-border-subtle bg-bg-sunken px-2.5 py-1.5 text-left text-xs hover:bg-bg-surface",
403
+ "data-role": t,
404
+ className: "flex w-full items-center gap-2 rounded-md border border-border-subtle bg-bg-sunken px-2.5 py-1.5 text-start text-xs hover:bg-bg-surface",
400
405
  children: [
401
- /* @__PURE__ */ A(z, { role: n }),
402
- /* @__PURE__ */ A("span", {
406
+ /* @__PURE__ */ k(L, { role: t }),
407
+ /* @__PURE__ */ k("span", {
403
408
  className: "min-w-0 flex-1 truncate font-medium text-text-primary",
404
409
  children: e.label
405
410
  }),
406
- /* @__PURE__ */ A("span", {
411
+ /* @__PURE__ */ k("span", {
407
412
  className: "shrink-0 tabular-nums text-text-secondary",
408
- children: I(e.amount, e.currency, e.interval)
413
+ children: o(e.amount, e.currency, e.interval)
409
414
  }),
410
- /* @__PURE__ */ A(w, {
415
+ /* @__PURE__ */ k(C, {
411
416
  className: "h-3 w-3 shrink-0 text-text-secondary",
412
417
  "aria-hidden": !0
413
418
  })
@@ -415,58 +420,58 @@ var L = ({ decision: r }) => {
415
420
  }) }, e.relationshipId);
416
421
  })
417
422
  }),
418
- /* @__PURE__ */ j("div", {
423
+ /* @__PURE__ */ A("div", {
419
424
  className: "flex flex-wrap gap-2 text-xs",
420
- children: [/* @__PURE__ */ A("span", {
425
+ children: [/* @__PURE__ */ k("span", {
421
426
  className: "inline-flex items-center rounded-md bg-bg-sunken px-2 py-0.5 tabular-nums text-text-secondary",
422
- children: i("savings.bundle.costChange", "{{before}} → {{after}} a year", {
423
- before: n(t.annualSpend, t.currency),
424
- after: n(m, t.currency)
427
+ children: s("savings.bundle.costChange", "{{before}} → {{after}} a year", {
428
+ before: a(r.annualSpend, r.currency),
429
+ after: a(_, r.currency)
425
430
  })
426
- }), /* @__PURE__ */ j("span", {
431
+ }), /* @__PURE__ */ A("span", {
427
432
  className: "inline-flex items-center gap-1.5 rounded-md bg-bg-sunken px-2 py-0.5 text-text-secondary",
428
- children: [/* @__PURE__ */ A(T, {
433
+ children: [/* @__PURE__ */ k(w, {
429
434
  className: "h-3.5 w-3.5",
430
435
  "aria-hidden": !0
431
- }), i("decisions.card.confidence", "Confidence {{pct}}%", { pct: l(t.confidence) })]
436
+ }), s("decisions.card.confidence", "Confidence {{pct}}%", { pct: c(r.confidence) })]
432
437
  })]
433
438
  }),
434
- /* @__PURE__ */ j("div", {
439
+ /* @__PURE__ */ A("div", {
435
440
  className: "flex flex-wrap justify-end gap-2 border-t border-border-subtle pt-3",
436
- children: [/* @__PURE__ */ j("button", {
441
+ children: [/* @__PURE__ */ A("button", {
437
442
  type: "button",
438
- onClick: () => c("dismiss"),
443
+ onClick: () => d("dismiss"),
439
444
  "data-testid": "bundle-dismiss",
440
445
  className: "inline-flex items-center gap-1.5 rounded-lg border border-border-subtle px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-bg-sunken",
441
- children: [/* @__PURE__ */ A(k, {
446
+ children: [/* @__PURE__ */ k(O, {
442
447
  className: "h-3.5 w-3.5",
443
448
  "aria-hidden": !0
444
- }), i("decisions.card.dismiss", "Dismiss")]
445
- }), /* @__PURE__ */ j("button", {
449
+ }), s("decisions.card.dismiss", "Dismiss")]
450
+ }), /* @__PURE__ */ A("button", {
446
451
  type: "button",
447
- onClick: () => c("consolidate"),
448
- disabled: !u || d.length === 0,
452
+ onClick: () => d("consolidate"),
453
+ disabled: !f || p.length === 0,
449
454
  "data-testid": "bundle-consolidate",
450
455
  className: "inline-flex items-center gap-1.5 rounded-lg border border-status-error-text/40 bg-status-error-bg-subtle px-3 py-1.5 text-xs font-medium text-status-error-text hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-50",
451
- children: [/* @__PURE__ */ A(D, {
456
+ children: [/* @__PURE__ */ k(E, {
452
457
  className: "h-3.5 w-3.5",
453
458
  "aria-hidden": !0
454
- }), i("savings.bundle.consolidate", "Review and consolidate")]
459
+ }), s("savings.bundle.consolidate", "Review and consolidate")]
455
460
  })]
456
461
  }),
457
- s === "consolidate" && /* @__PURE__ */ A(V, {
458
- bundle: t,
459
- onClose: () => c(null),
460
- onDone: (e) => r?.(e)
462
+ u === "consolidate" && /* @__PURE__ */ k(z, {
463
+ bundle: r,
464
+ onClose: () => d(null),
465
+ onDone: (e) => i?.(e)
461
466
  }),
462
- s === "dismiss" && /* @__PURE__ */ A(H, {
463
- bundle: t,
464
- onClose: () => c(null)
467
+ u === "dismiss" && /* @__PURE__ */ k(B, {
468
+ bundle: r,
469
+ onClose: () => d(null)
465
470
  })
466
471
  ]
467
472
  });
468
473
  };
469
474
  //#endregion
470
- export { U as BundleCard, L as SavingsCard };
475
+ export { V as BundleCard, F as SavingsCard };
471
476
 
472
477
  //# sourceMappingURL=SavingsCards.js.map