@burdenoff/microfe-subscriberbot 2026.1107.7 → 2026.1110.1

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 (186) hide show
  1. package/dist/node_modules/clsx/dist/clsx.js +8 -7
  2. package/dist/node_modules/clsx/dist/clsx.js.map +1 -1
  3. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +134 -151
  4. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -1
  5. package/dist/subscriberbot/SubscriberBotRoot.js +10 -7
  6. package/dist/subscriberbot/SubscriberBotRoot.js.map +1 -1
  7. package/dist/subscriberbot/SubscriberBotRoutes.js +1 -2
  8. package/dist/subscriberbot/SubscriberBotRoutes.js.map +1 -1
  9. package/dist/subscriberbot/admin/AdminDashboardPage.js +9 -10
  10. package/dist/subscriberbot/admin/AdminDashboardPage.js.map +1 -1
  11. package/dist/subscriberbot/admin/AdminRoot.js +2 -3
  12. package/dist/subscriberbot/admin/AdminRoot.js.map +1 -1
  13. package/dist/subscriberbot/admin/NegotiationDeskPanel.js +56 -57
  14. package/dist/subscriberbot/admin/NegotiationDeskPanel.js.map +1 -1
  15. package/dist/subscriberbot/admin/ProcurementDeskPanel.js +107 -108
  16. package/dist/subscriberbot/admin/ProcurementDeskPanel.js.map +1 -1
  17. package/dist/subscriberbot/admin/index.js +1 -1
  18. package/dist/subscriberbot/components/EmptyState.js +1 -2
  19. package/dist/subscriberbot/components/EmptyState.js.map +1 -1
  20. package/dist/subscriberbot/components/MetricsCard.js +1 -2
  21. package/dist/subscriberbot/components/MetricsCard.js.map +1 -1
  22. package/dist/subscriberbot/components/Modal.js +2 -3
  23. package/dist/subscriberbot/components/Modal.js.map +1 -1
  24. package/dist/subscriberbot/components/PageLayout.js +1 -2
  25. package/dist/subscriberbot/components/PageLayout.js.map +1 -1
  26. package/dist/subscriberbot/components/PostureOptions.js +7 -8
  27. package/dist/subscriberbot/components/PostureOptions.js.map +1 -1
  28. package/dist/subscriberbot/components/StateViews.js +1 -2
  29. package/dist/subscriberbot/components/StateViews.js.map +1 -1
  30. package/dist/subscriberbot/components/StatusBadge.js +2 -3
  31. package/dist/subscriberbot/components/StatusBadge.js.map +1 -1
  32. package/dist/subscriberbot/components/decisions/DecisionBanners.js +7 -8
  33. package/dist/subscriberbot/components/decisions/DecisionBanners.js.map +1 -1
  34. package/dist/subscriberbot/components/decisions/DecisionCard.js +65 -66
  35. package/dist/subscriberbot/components/decisions/DecisionCard.js.map +1 -1
  36. package/dist/subscriberbot/components/decisions/decisionModel.js +2 -3
  37. package/dist/subscriberbot/components/decisions/decisionModel.js.map +1 -1
  38. package/dist/subscriberbot/components/decisions/index.js +4 -3
  39. package/dist/subscriberbot/components/index.js +8 -7
  40. package/dist/subscriberbot/components/mobile/MobileDashboard.js +23 -24
  41. package/dist/subscriberbot/components/mobile/MobileDashboard.js.map +1 -1
  42. package/dist/subscriberbot/components/mobile/MobileRelationshipList.js +40 -49
  43. package/dist/subscriberbot/components/mobile/MobileRelationshipList.js.map +1 -1
  44. package/dist/subscriberbot/components/mobile/MobileScreen.js +1 -2
  45. package/dist/subscriberbot/components/mobile/MobileScreen.js.map +1 -1
  46. package/dist/subscriberbot/components/mobile/RelationshipGlyph.js +1 -2
  47. package/dist/subscriberbot/components/mobile/RelationshipGlyph.js.map +1 -1
  48. package/dist/subscriberbot/components/mobile/index.js +4 -3
  49. package/dist/subscriberbot/components/negotiations/NegotiationStatusPill.js +1 -2
  50. package/dist/subscriberbot/components/negotiations/NegotiationStatusPill.js.map +1 -1
  51. package/dist/subscriberbot/components/negotiations/NegotiationTimeline.js +4 -5
  52. package/dist/subscriberbot/components/negotiations/NegotiationTimeline.js.map +1 -1
  53. package/dist/subscriberbot/components/negotiations/OutcomeForm.js +4 -5
  54. package/dist/subscriberbot/components/negotiations/OutcomeForm.js.map +1 -1
  55. package/dist/subscriberbot/components/negotiations/index.js +5 -4
  56. package/dist/subscriberbot/components/negotiations/labels.js +1 -2
  57. package/dist/subscriberbot/components/negotiations/labels.js.map +1 -1
  58. package/dist/subscriberbot/components/procurement/ProcurementOutcomeForm.js +4 -5
  59. package/dist/subscriberbot/components/procurement/ProcurementOutcomeForm.js.map +1 -1
  60. package/dist/subscriberbot/components/procurement/ProcurementStatusPill.js +1 -2
  61. package/dist/subscriberbot/components/procurement/ProcurementStatusPill.js.map +1 -1
  62. package/dist/subscriberbot/components/procurement/ProcurementThread.js +4 -5
  63. package/dist/subscriberbot/components/procurement/ProcurementThread.js.map +1 -1
  64. package/dist/subscriberbot/components/procurement/index.js +5 -4
  65. package/dist/subscriberbot/components/procurement/labels.js +1 -2
  66. package/dist/subscriberbot/components/procurement/labels.js.map +1 -1
  67. package/dist/subscriberbot/components/savings/SavingsCards.js +90 -91
  68. package/dist/subscriberbot/components/savings/SavingsCards.js.map +1 -1
  69. package/dist/subscriberbot/components/savings/index.js +3 -2
  70. package/dist/subscriberbot/components/savings/savingsModel.js +2 -3
  71. package/dist/subscriberbot/components/savings/savingsModel.js.map +1 -1
  72. package/dist/subscriberbot/components/viz.js +2 -3
  73. package/dist/subscriberbot/components/viz.js.map +1 -1
  74. package/dist/subscriberbot/context/SubscriberBotContext.js +3 -3
  75. package/dist/subscriberbot/context/SubscriberBotContext.js.map +1 -1
  76. package/dist/subscriberbot/context/index.js +1 -1
  77. package/dist/subscriberbot/hooks/index.js +2 -2
  78. package/dist/subscriberbot/hooks/useAutonomousAgentMode.js +2 -3
  79. package/dist/subscriberbot/hooks/useAutonomousAgentMode.js.map +1 -1
  80. package/dist/subscriberbot/hooks/useBankingApi.js +2 -3
  81. package/dist/subscriberbot/hooks/useBankingApi.js.map +1 -1
  82. package/dist/subscriberbot/hooks/useCompactViewport.js +1 -2
  83. package/dist/subscriberbot/hooks/useCompactViewport.js.map +1 -1
  84. package/dist/subscriberbot/hooks/useFormError.js +1 -2
  85. package/dist/subscriberbot/hooks/useFormError.js.map +1 -1
  86. package/dist/subscriberbot/hooks/useFormatters.js +1 -2
  87. package/dist/subscriberbot/hooks/useFormatters.js.map +1 -1
  88. package/dist/subscriberbot/hooks/useNegotiationApi.js +2 -3
  89. package/dist/subscriberbot/hooks/useNegotiationApi.js.map +1 -1
  90. package/dist/subscriberbot/hooks/useProcurementApi.js +2 -3
  91. package/dist/subscriberbot/hooks/useProcurementApi.js.map +1 -1
  92. package/dist/subscriberbot/hooks/useRouteSelection.js +3 -3
  93. package/dist/subscriberbot/hooks/useRouteSelection.js.map +1 -1
  94. package/dist/subscriberbot/hooks/useSubscriberBotApi.js +1 -2
  95. package/dist/subscriberbot/hooks/useSubscriberBotApi.js.map +1 -1
  96. package/dist/subscriberbot/hooks/useTr.js +1 -2
  97. package/dist/subscriberbot/hooks/useTr.js.map +1 -1
  98. package/dist/subscriberbot/index.js +9 -8
  99. package/dist/subscriberbot/pages/AssetVaultPage.js +34 -35
  100. package/dist/subscriberbot/pages/AssetVaultPage.js.map +1 -1
  101. package/dist/subscriberbot/pages/DashboardPage.js +86 -87
  102. package/dist/subscriberbot/pages/DashboardPage.js.map +1 -1
  103. package/dist/subscriberbot/pages/InboxPage.js +194 -199
  104. package/dist/subscriberbot/pages/InboxPage.js.map +1 -1
  105. package/dist/subscriberbot/pages/InsightsPage.js +28 -29
  106. package/dist/subscriberbot/pages/InsightsPage.js.map +1 -1
  107. package/dist/subscriberbot/pages/InvoicesPage.js +179 -188
  108. package/dist/subscriberbot/pages/InvoicesPage.js.map +1 -1
  109. package/dist/subscriberbot/pages/RenewalsPage.js +293 -298
  110. package/dist/subscriberbot/pages/RenewalsPage.js.map +1 -1
  111. package/dist/subscriberbot/pages/SavingsPage.js +25 -26
  112. package/dist/subscriberbot/pages/SavingsPage.js.map +1 -1
  113. package/dist/subscriberbot/pages/WorkflowsPage.js +67 -68
  114. package/dist/subscriberbot/pages/WorkflowsPage.js.map +1 -1
  115. package/dist/subscriberbot/pages/agents/AgentDetailPage.js +126 -127
  116. package/dist/subscriberbot/pages/agents/AgentDetailPage.js.map +1 -1
  117. package/dist/subscriberbot/pages/agents/AgentNewPage.js +10 -11
  118. package/dist/subscriberbot/pages/agents/AgentNewPage.js.map +1 -1
  119. package/dist/subscriberbot/pages/agents/AgentsListPage.js +23 -24
  120. package/dist/subscriberbot/pages/agents/AgentsListPage.js.map +1 -1
  121. package/dist/subscriberbot/pages/banking/BankConnectionsPage.js +337 -359
  122. package/dist/subscriberbot/pages/banking/BankConnectionsPage.js.map +1 -1
  123. package/dist/subscriberbot/pages/banking/ConnectBankModal.js +22 -27
  124. package/dist/subscriberbot/pages/banking/ConnectBankModal.js.map +1 -1
  125. package/dist/subscriberbot/pages/decisions/DecisionDetailPage.js +25 -26
  126. package/dist/subscriberbot/pages/decisions/DecisionDetailPage.js.map +1 -1
  127. package/dist/subscriberbot/pages/decisions/DecisionsPage.js +34 -35
  128. package/dist/subscriberbot/pages/decisions/DecisionsPage.js.map +1 -1
  129. package/dist/subscriberbot/pages/enterprise/EnterpriseSpendPage.js +125 -130
  130. package/dist/subscriberbot/pages/enterprise/EnterpriseSpendPage.js.map +1 -1
  131. package/dist/subscriberbot/pages/negotiations/NegotiationDetailPage.js +94 -95
  132. package/dist/subscriberbot/pages/negotiations/NegotiationDetailPage.js.map +1 -1
  133. package/dist/subscriberbot/pages/negotiations/NegotiationNewPage.js +15 -16
  134. package/dist/subscriberbot/pages/negotiations/NegotiationNewPage.js.map +1 -1
  135. package/dist/subscriberbot/pages/negotiations/NegotiationsPage.js +20 -21
  136. package/dist/subscriberbot/pages/negotiations/NegotiationsPage.js.map +1 -1
  137. package/dist/subscriberbot/pages/procurement/ProcurementDetailPage.js +86 -87
  138. package/dist/subscriberbot/pages/procurement/ProcurementDetailPage.js.map +1 -1
  139. package/dist/subscriberbot/pages/procurement/ProcurementNewPage.js +164 -165
  140. package/dist/subscriberbot/pages/procurement/ProcurementNewPage.js.map +1 -1
  141. package/dist/subscriberbot/pages/procurement/ProcurementPage.js +20 -21
  142. package/dist/subscriberbot/pages/procurement/ProcurementPage.js.map +1 -1
  143. package/dist/subscriberbot/pages/providers/ProviderDetailPage.js +350 -351
  144. package/dist/subscriberbot/pages/providers/ProviderDetailPage.js.map +1 -1
  145. package/dist/subscriberbot/pages/providers/ProviderInsights.js +95 -96
  146. package/dist/subscriberbot/pages/providers/ProviderInsights.js.map +1 -1
  147. package/dist/subscriberbot/pages/providers/ProviderNewPage.js +11 -12
  148. package/dist/subscriberbot/pages/providers/ProviderNewPage.js.map +1 -1
  149. package/dist/subscriberbot/pages/providers/ProvidersListPage.js +62 -63
  150. package/dist/subscriberbot/pages/providers/ProvidersListPage.js.map +1 -1
  151. package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js +166 -172
  152. package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js.map +1 -1
  153. package/dist/subscriberbot/pages/relationships/RelationshipNewPage.js +12 -13
  154. package/dist/subscriberbot/pages/relationships/RelationshipNewPage.js.map +1 -1
  155. package/dist/subscriberbot/pages/relationships/RelationshipsListPage.js +21 -22
  156. package/dist/subscriberbot/pages/relationships/RelationshipsListPage.js.map +1 -1
  157. package/dist/subscriberbot/pages/workflows/WorkflowBuilderPage.js +242 -255
  158. package/dist/subscriberbot/pages/workflows/WorkflowBuilderPage.js.map +1 -1
  159. package/dist/subscriberbot/pages/workflows/workflowBuilderGraph.js +2 -3
  160. package/dist/subscriberbot/pages/workflows/workflowBuilderGraph.js.map +1 -1
  161. package/dist/subscriberbot/services/createSandboxAssistantTransport.js +1 -2
  162. package/dist/subscriberbot/services/createSandboxAssistantTransport.js.map +1 -1
  163. package/dist/subscriberbot/store/index.js +1 -1
  164. package/dist/subscriberbot/store/subscriberbotStore.js +1 -2
  165. package/dist/subscriberbot/store/subscriberbotStore.js.map +1 -1
  166. package/dist/subscriberbot/utils/bankRedirectLink.js +18 -19
  167. package/dist/subscriberbot/utils/bankRedirectLink.js.map +1 -1
  168. package/dist/subscriberbot/utils/chartScale.js +1 -2
  169. package/dist/subscriberbot/utils/chartScale.js.map +1 -1
  170. package/dist/subscriberbot/utils/cn.js +2 -3
  171. package/dist/subscriberbot/utils/cn.js.map +1 -1
  172. package/dist/subscriberbot/utils/formatters.js +4 -5
  173. package/dist/subscriberbot/utils/formatters.js.map +1 -1
  174. package/dist/subscriberbot/utils/navigation.js +1 -2
  175. package/dist/subscriberbot/utils/navigation.js.map +1 -1
  176. package/dist/subscriberbot/utils/pageContext.js +3 -4
  177. package/dist/subscriberbot/utils/pageContext.js.map +1 -1
  178. package/dist/subscriberbot/utils/plaidLink.js +21 -22
  179. package/dist/subscriberbot/utils/plaidLink.js.map +1 -1
  180. package/dist/subscriberbot/utils/portfolio.d.ts +4 -3
  181. package/dist/subscriberbot/utils/portfolio.d.ts.map +1 -1
  182. package/dist/subscriberbot/utils/portfolio.js +10 -11
  183. package/dist/subscriberbot/utils/portfolio.js.map +1 -1
  184. package/dist/subscriberbot/utils/renewals.js +1 -2
  185. package/dist/subscriberbot/utils/renewals.js.map +1 -1
  186. package/package.json +2 -2
@@ -1,22 +1,22 @@
1
- import { useSubscriberBot as e } from "../context/SubscriberBotContext.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";
5
- import { PageLayout as i } from "../components/PageLayout.js";
6
- import { MetricsCard as a } from "../components/MetricsCard.js";
7
- import { StatusBadge as o } from "../components/StatusBadge.js";
8
- import { EmptyState as s } from "../components/EmptyState.js";
9
- import { Modal as c } from "../components/Modal.js";
10
- import { ErrorView as l, LoadingView as u, Section as d } from "../components/StateViews.js";
11
- import { CHART_COLORS as f, Donut as p, Legend as m } from "../components/viz.js";
12
- import { useCreateInvoice as h, useCreatePaymentInstrument as g, useInvoices as _, useMarkInvoicePaid as v, usePaymentInstruments as y, useRelationships as b, useRemovePaymentInstrument as x } from "../hooks/useSubscriberBotApi.js";
13
- import { useFormError as S } from "../hooks/useFormError.js";
1
+ import { useFormatters as e } from "../hooks/useFormatters.js";
2
+ import { useFormError as t } from "../hooks/useFormError.js";
3
+ import { PageLayout as n } from "../components/PageLayout.js";
4
+ import { MetricsCard as r } from "../components/MetricsCard.js";
5
+ import { StatusBadge as i } from "../components/StatusBadge.js";
6
+ import { EmptyState as a } from "../components/EmptyState.js";
7
+ import { Modal as o } from "../components/Modal.js";
8
+ import { ErrorView as s, LoadingView as c, Section as l } from "../components/StateViews.js";
9
+ import { CHART_COLORS as u, Donut as d, Legend as f } from "../components/viz.js";
10
+ import { useSubscriberBot as p } from "../context/SubscriberBotContext.js";
11
+ import { useCreateInvoice as m, useCreatePaymentInstrument as h, useInvoices as g, useMarkInvoicePaid as _, usePaymentInstruments as v, useRelationships as y, useRemovePaymentInstrument as b } from "../hooks/useSubscriberBotApi.js";
12
+ import { useTr as x } from "../hooks/useTr.js";
13
+ import { cn as S } from "../utils/cn.js";
14
14
  import { useMemo as C, useState as w } from "react";
15
15
  import { AlertTriangle as T, CheckCircle2 as E, CreditCard as D, FileText as O, Plus as k, Receipt as A, Star as j, Trash2 as M } from "lucide-react";
16
16
  import { Fragment as N, jsx as P, jsxs as F } from "react/jsx-runtime";
17
- import { GlassCard as I, PagePurpose as ee } from "@burdenoff/fe-libs/ui";
18
- //#region src/subscriberbot/pages/InvoicesPage.tsx
19
- var L = 25, R = "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)]", z = "mb-1 block text-xs font-medium text-text-secondary", B = {
17
+ import { GlassCard as I, PagePurpose as L } from "@burdenoff/fe-libs/ui";
18
+ // src/subscriberbot/pages/InvoicesPage.tsx
19
+ var R = 25, z = "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)]", B = "mb-1 block text-xs font-medium text-text-secondary", V = {
20
20
  ISSUED: "invoices.filters.issued",
21
21
  OVERDUE: "invoices.filters.overdue",
22
22
  PAID: "invoices.filters.paid",
@@ -24,7 +24,7 @@ var L = 25, R = "w-full rounded-lg border border-border-subtle bg-bg-surface px-
24
24
  DRAFT: "invoices.filters.draft",
25
25
  CANCELLED: "invoices.filters.cancelled",
26
26
  REFUNDED: "invoices.filters.refunded"
27
- }, V = [
27
+ }, H = [
28
28
  "ISSUED",
29
29
  "DRAFT",
30
30
  "OVERDUE",
@@ -32,18 +32,18 @@ var L = 25, R = "w-full rounded-lg border border-border-subtle bg-bg-surface px-
32
32
  "FAILED",
33
33
  "CANCELLED",
34
34
  "REFUNDED"
35
- ], H = [
35
+ ], U = [
36
36
  "CARD",
37
37
  "BANK_ACCOUNT",
38
38
  "PAYPAL",
39
39
  "UPI",
40
40
  "WALLET",
41
41
  "OTHER"
42
- ], U = new Set([
42
+ ], W = /* @__PURE__ */ new Set([
43
43
  "ISSUED",
44
44
  "OVERDUE",
45
45
  "FAILED"
46
- ]), W = {
46
+ ]), G = {
47
47
  PAID: "var(--color-status-success-text)",
48
48
  OVERDUE: "var(--color-status-error-text)",
49
49
  FAILED: "var(--color-status-error-text)",
@@ -52,35 +52,31 @@ var L = 25, R = "w-full rounded-lg border border-border-subtle bg-bg-surface px-
52
52
  CANCELLED: "var(--color-chart-4)",
53
53
  REFUNDED: "var(--color-status-warning-text)"
54
54
  };
55
- function G({ onClose: e }) {
56
- let n = t(), r = h(), i = b({ pagination: {
55
+ function K({ onClose: e }) {
56
+ let n = x(), r = m(), i = y({ pagination: {
57
57
  limit: 100,
58
58
  offset: 0
59
- } }).data?.items ?? [], [a, o] = w(""), [s, l] = w(""), [u, d] = w("ISSUED"), [f, p] = w("USD"), [m, g] = w(""), [_, v] = w(""), [y, x] = w(""), [C, T] = w(""), [E, D] = w(""), [O, k, A, j] = S();
60
- return /* @__PURE__ */ P(c, {
59
+ } }).data?.items ?? [], [a, s] = w(""), [c, l] = w(""), [u, d] = w("ISSUED"), [f, p] = w("USD"), [h, g] = w(""), [_, v] = w(""), [b, S] = w(""), [C, T] = w(""), [E, D] = w(""), [O, k, A, j] = t();
60
+ return /* @__PURE__ */ P(o, {
61
61
  title: n("invoices.createModal.title", "Create invoice"),
62
62
  onClose: e,
63
63
  maxWidthClassName: "max-w-xl",
64
64
  children: /* @__PURE__ */ F("form", {
65
65
  onSubmit: (t) => {
66
- if (t.preventDefault(), k(null), !a) {
67
- k(n("invoices.createModal.relationshipRequired", "Select the relationship this invoice belongs to."), "inv-relationship");
68
- return;
69
- }
70
- r.mutate({
66
+ t.preventDefault(), k(null), a ? r.mutate({
71
67
  relationshipId: a,
72
68
  status: u,
73
69
  currency: f.trim() || "USD",
74
- ...s.trim() ? { number: s.trim() } : {},
75
- ...m.trim() ? { subtotal: Number(m) } : {},
70
+ ...c.trim() ? { number: c.trim() } : {},
71
+ ...h.trim() ? { subtotal: Number(h) } : {},
76
72
  ..._.trim() ? { taxAmount: Number(_) } : {},
77
- ...y.trim() ? { total: Number(y) } : {},
73
+ ...b.trim() ? { total: Number(b) } : {},
78
74
  ...C ? { issueDate: new Date(C).toISOString() } : {},
79
75
  ...E ? { dueDate: new Date(E).toISOString() } : {}
80
76
  }, {
81
77
  onSuccess: () => e(),
82
78
  onError: (e) => k(e instanceof Error ? e.message : n("invoices.createModal.error", "Could not create invoice."))
83
- });
79
+ }) : k(n("invoices.createModal.relationshipRequired", "Select the relationship this invoice belongs to."), "inv-relationship");
84
80
  },
85
81
  className: "space-y-4",
86
82
  children: [
@@ -93,7 +89,7 @@ function G({ onClose: e }) {
93
89
  }),
94
90
  /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ F("label", {
95
91
  htmlFor: "inv-relationship",
96
- className: z,
92
+ className: B,
97
93
  children: [
98
94
  n("invoices.createModal.relationshipLabel", "Relationship"),
99
95
  " ",
@@ -106,8 +102,8 @@ function G({ onClose: e }) {
106
102
  ...A("inv-relationship"),
107
103
  id: "inv-relationship",
108
104
  value: a,
109
- onChange: (e) => o(e.target.value),
110
- className: R,
105
+ onChange: (e) => s(e.target.value),
106
+ className: z,
111
107
  required: !0,
112
108
  children: [/* @__PURE__ */ P("option", {
113
109
  value: "",
@@ -122,35 +118,35 @@ function G({ onClose: e }) {
122
118
  children: [
123
119
  /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("label", {
124
120
  htmlFor: "inv-number",
125
- className: z,
121
+ className: B,
126
122
  children: n("invoices.createModal.numberLabel", "Number")
127
123
  }), /* @__PURE__ */ P("input", {
128
124
  ...A("inv-number"),
129
125
  id: "inv-number",
130
126
  type: "text",
131
- value: s,
127
+ value: c,
132
128
  onChange: (e) => l(e.target.value),
133
129
  placeholder: n("invoices.createModal.numberPlaceholder", "INV-0001"),
134
- className: R
130
+ className: z
135
131
  })] }),
136
132
  /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("label", {
137
133
  htmlFor: "inv-status",
138
- className: z,
134
+ className: B,
139
135
  children: n("invoices.createModal.statusLabel", "Status")
140
136
  }), /* @__PURE__ */ P("select", {
141
137
  ...A("inv-status"),
142
138
  id: "inv-status",
143
139
  value: u,
144
140
  onChange: (e) => d(e.target.value),
145
- className: R,
146
- children: V.map((e) => /* @__PURE__ */ P("option", {
141
+ className: z,
142
+ children: H.map((e) => /* @__PURE__ */ P("option", {
147
143
  value: e,
148
- children: n(B[e], e)
144
+ children: n(V[e], e)
149
145
  }, e))
150
146
  })] }),
151
147
  /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("label", {
152
148
  htmlFor: "inv-currency",
153
- className: z,
149
+ className: B,
154
150
  children: n("invoices.createModal.currencyLabel", "Currency")
155
151
  }), /* @__PURE__ */ P("input", {
156
152
  ...A("inv-currency"),
@@ -159,7 +155,7 @@ function G({ onClose: e }) {
159
155
  value: f,
160
156
  onChange: (e) => p(e.target.value.toUpperCase()),
161
157
  maxLength: 3,
162
- className: R
158
+ className: z
163
159
  })] })
164
160
  ]
165
161
  }),
@@ -168,7 +164,7 @@ function G({ onClose: e }) {
168
164
  children: [
169
165
  /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("label", {
170
166
  htmlFor: "inv-subtotal",
171
- className: z,
167
+ className: B,
172
168
  children: n("invoices.createModal.subtotalLabel", "Subtotal")
173
169
  }), /* @__PURE__ */ P("input", {
174
170
  ...A("inv-subtotal"),
@@ -176,13 +172,13 @@ function G({ onClose: e }) {
176
172
  type: "number",
177
173
  min: "0",
178
174
  step: "0.01",
179
- value: m,
175
+ value: h,
180
176
  onChange: (e) => g(e.target.value),
181
- className: R
177
+ className: z
182
178
  })] }),
183
179
  /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("label", {
184
180
  htmlFor: "inv-tax",
185
- className: z,
181
+ className: B,
186
182
  children: n("invoices.createModal.taxLabel", "Tax")
187
183
  }), /* @__PURE__ */ P("input", {
188
184
  ...A("inv-tax"),
@@ -192,11 +188,11 @@ function G({ onClose: e }) {
192
188
  step: "0.01",
193
189
  value: _,
194
190
  onChange: (e) => v(e.target.value),
195
- className: R
191
+ className: z
196
192
  })] }),
197
193
  /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("label", {
198
194
  htmlFor: "inv-total",
199
- className: z,
195
+ className: B,
200
196
  children: n("invoices.createModal.totalLabel", "Total")
201
197
  }), /* @__PURE__ */ P("input", {
202
198
  ...A("inv-total"),
@@ -204,9 +200,9 @@ function G({ onClose: e }) {
204
200
  type: "number",
205
201
  min: "0",
206
202
  step: "0.01",
207
- value: y,
208
- onChange: (e) => x(e.target.value),
209
- className: R
203
+ value: b,
204
+ onChange: (e) => S(e.target.value),
205
+ className: z
210
206
  })] })
211
207
  ]
212
208
  }),
@@ -214,7 +210,7 @@ function G({ onClose: e }) {
214
210
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
215
211
  children: [/* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("label", {
216
212
  htmlFor: "inv-issue",
217
- className: z,
213
+ className: B,
218
214
  children: n("invoices.createModal.issueDateLabel", "Issue date")
219
215
  }), /* @__PURE__ */ P("input", {
220
216
  ...A("inv-issue"),
@@ -222,10 +218,10 @@ function G({ onClose: e }) {
222
218
  type: "date",
223
219
  value: C,
224
220
  onChange: (e) => T(e.target.value),
225
- className: R
221
+ className: z
226
222
  })] }), /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("label", {
227
223
  htmlFor: "inv-due",
228
- className: z,
224
+ className: B,
229
225
  children: n("invoices.createModal.dueDateLabel", "Due date")
230
226
  }), /* @__PURE__ */ P("input", {
231
227
  ...A("inv-due"),
@@ -233,7 +229,7 @@ function G({ onClose: e }) {
233
229
  type: "date",
234
230
  value: E,
235
231
  onChange: (e) => D(e.target.value),
236
- className: R
232
+ className: z
237
233
  })] })]
238
234
  }),
239
235
  /* @__PURE__ */ F("div", {
@@ -254,31 +250,27 @@ function G({ onClose: e }) {
254
250
  })
255
251
  });
256
252
  }
257
- function K({ onClose: e }) {
258
- let { formatEnumLabel: r } = n(), i = t(), a = g(), [o, s] = w(""), [l, u] = w("CARD"), [d, f] = w(""), [p, m] = w(""), [h, _] = w(""), [v, y] = w(""), [b, x] = w(!1), [C, T, E, D] = S();
259
- return /* @__PURE__ */ P(c, {
253
+ function q({ onClose: n }) {
254
+ let { formatEnumLabel: r } = e(), i = x(), a = h(), [s, c] = w(""), [l, u] = w("CARD"), [d, f] = w(""), [p, m] = w(""), [g, _] = w(""), [v, y] = w(""), [b, S] = w(!1), [C, T, E, D] = t();
255
+ return /* @__PURE__ */ P(o, {
260
256
  title: i("invoices.addPaymentMethodModal.title", "Add payment method"),
261
257
  description: i("invoices.addPaymentMethodModal.description", "A passive annotation of which external card/account pays for a subscription — no full card numbers or CVV."),
262
- onClose: e,
258
+ onClose: n,
263
259
  maxWidthClassName: "max-w-xl",
264
260
  children: /* @__PURE__ */ F("form", {
265
- onSubmit: (t) => {
266
- if (t.preventDefault(), T(null), !o.trim()) {
267
- T(i("invoices.addPaymentMethodModal.labelRequired", "A label is required."), "pm-label");
268
- return;
269
- }
270
- a.mutate({
271
- label: o.trim(),
261
+ onSubmit: (e) => {
262
+ e.preventDefault(), T(null), s.trim() ? a.mutate({
263
+ label: s.trim(),
272
264
  type: l,
273
265
  isDefault: b,
274
266
  ...d.trim() ? { brand: d.trim() } : {},
275
267
  ...p.trim() ? { last4: p.trim() } : {},
276
- ...h.trim() ? { expiryMonth: Number(h) } : {},
268
+ ...g.trim() ? { expiryMonth: Number(g) } : {},
277
269
  ...v.trim() ? { expiryYear: Number(v) } : {}
278
270
  }, {
279
- onSuccess: () => e(),
271
+ onSuccess: () => n(),
280
272
  onError: (e) => T(e instanceof Error ? e.message : i("invoices.addPaymentMethodModal.error", "Could not add payment method."))
281
- });
273
+ }) : T(i("invoices.addPaymentMethodModal.labelRequired", "A label is required."), "pm-label");
282
274
  },
283
275
  className: "space-y-4",
284
276
  children: [
@@ -293,7 +285,7 @@ function K({ onClose: e }) {
293
285
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
294
286
  children: [/* @__PURE__ */ F("div", { children: [/* @__PURE__ */ F("label", {
295
287
  htmlFor: "pm-label",
296
- className: z,
288
+ className: B,
297
289
  children: [
298
290
  i("invoices.addPaymentMethodModal.labelLabel", "Label"),
299
291
  " ",
@@ -306,22 +298,22 @@ function K({ onClose: e }) {
306
298
  ...E("pm-label"),
307
299
  id: "pm-label",
308
300
  type: "text",
309
- value: o,
310
- onChange: (e) => s(e.target.value),
301
+ value: s,
302
+ onChange: (e) => c(e.target.value),
311
303
  placeholder: i("invoices.addPaymentMethodModal.labelPlaceholder", "e.g. Personal Visa"),
312
- className: R,
304
+ className: z,
313
305
  required: !0
314
306
  })] }), /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("label", {
315
307
  htmlFor: "pm-type",
316
- className: z,
308
+ className: B,
317
309
  children: i("invoices.addPaymentMethodModal.typeLabel", "Type")
318
310
  }), /* @__PURE__ */ P("select", {
319
311
  ...E("pm-type"),
320
312
  id: "pm-type",
321
313
  value: l,
322
314
  onChange: (e) => u(e.target.value),
323
- className: R,
324
- children: H.map((e) => /* @__PURE__ */ P("option", {
315
+ className: z,
316
+ children: U.map((e) => /* @__PURE__ */ P("option", {
325
317
  value: e,
326
318
  children: r(e)
327
319
  }, e))
@@ -332,7 +324,7 @@ function K({ onClose: e }) {
332
324
  children: [
333
325
  /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("label", {
334
326
  htmlFor: "pm-brand",
335
- className: z,
327
+ className: B,
336
328
  children: i("invoices.addPaymentMethodModal.brandLabel", "Brand")
337
329
  }), /* @__PURE__ */ P("input", {
338
330
  ...E("pm-brand"),
@@ -341,11 +333,11 @@ function K({ onClose: e }) {
341
333
  value: d,
342
334
  onChange: (e) => f(e.target.value),
343
335
  placeholder: i("invoices.addPaymentMethodModal.brandPlaceholder", "Visa, Amex…"),
344
- className: R
336
+ className: z
345
337
  })] }),
346
338
  /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("label", {
347
339
  htmlFor: "pm-last4",
348
- className: z,
340
+ className: B,
349
341
  children: i("invoices.addPaymentMethodModal.last4Label", "Last 4")
350
342
  }), /* @__PURE__ */ P("input", {
351
343
  ...E("pm-last4"),
@@ -356,13 +348,13 @@ function K({ onClose: e }) {
356
348
  value: p,
357
349
  onChange: (e) => m(e.target.value.replace(/\D/g, "")),
358
350
  placeholder: i("invoices.addPaymentMethodModal.last4Placeholder", "4242"),
359
- className: R
351
+ className: z
360
352
  })] }),
361
353
  /* @__PURE__ */ F("div", {
362
354
  className: "grid grid-cols-2 gap-2",
363
355
  children: [/* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("label", {
364
356
  htmlFor: "pm-exp-month",
365
- className: z,
357
+ className: B,
366
358
  children: i("invoices.addPaymentMethodModal.expMonthLabel", "Exp. mo.")
367
359
  }), /* @__PURE__ */ P("input", {
368
360
  ...E("pm-exp-month"),
@@ -370,13 +362,13 @@ function K({ onClose: e }) {
370
362
  type: "number",
371
363
  min: "1",
372
364
  max: "12",
373
- value: h,
365
+ value: g,
374
366
  onChange: (e) => _(e.target.value),
375
367
  placeholder: i("invoices.addPaymentMethodModal.expMonthPlaceholder", "12"),
376
- className: R
368
+ className: z
377
369
  })] }), /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("label", {
378
370
  htmlFor: "pm-exp-year",
379
- className: z,
371
+ className: B,
380
372
  children: i("invoices.addPaymentMethodModal.expYearLabel", "Exp. yr.")
381
373
  }), /* @__PURE__ */ P("input", {
382
374
  ...E("pm-exp-year"),
@@ -387,7 +379,7 @@ function K({ onClose: e }) {
387
379
  value: v,
388
380
  onChange: (e) => y(e.target.value),
389
381
  placeholder: i("invoices.addPaymentMethodModal.expYearPlaceholder", "2028"),
390
- className: R
382
+ className: z
391
383
  })] })]
392
384
  })
393
385
  ]
@@ -397,7 +389,7 @@ function K({ onClose: e }) {
397
389
  children: [/* @__PURE__ */ P("input", {
398
390
  type: "checkbox",
399
391
  checked: b,
400
- onChange: (e) => x(e.target.checked),
392
+ onChange: (e) => S(e.target.checked),
401
393
  className: "size-4 rounded border-border-subtle"
402
394
  }), i("invoices.addPaymentMethodModal.defaultLabel", "Set as default")]
403
395
  }),
@@ -405,7 +397,7 @@ function K({ onClose: e }) {
405
397
  className: "flex justify-end gap-3",
406
398
  children: [/* @__PURE__ */ P("button", {
407
399
  type: "button",
408
- onClick: e,
400
+ onClick: n,
409
401
  className: "rounded-lg border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
410
402
  children: i("invoices.addPaymentMethodModal.cancel", "Cancel")
411
403
  }), /* @__PURE__ */ P("button", {
@@ -419,33 +411,33 @@ function K({ onClose: e }) {
419
411
  })
420
412
  });
421
413
  }
422
- function q() {
423
- let { formatEnumLabel: e } = n(), r = t(), { data: i, isLoading: a, isError: c, refetch: f } = y(), p = x(), [m, h] = w(!1), g = i ?? [];
424
- return /* @__PURE__ */ F(d, {
425
- title: r("invoices.paymentMethods.title", "Payment methods"),
426
- description: r("invoices.paymentMethods.description", "Which external cards and accounts pay for your subscriptions"),
414
+ function ee() {
415
+ let { formatEnumLabel: t } = e(), n = x(), { data: r, isLoading: o, isError: u, refetch: d } = v(), f = b(), [p, m] = w(!1), h = r ?? [];
416
+ return /* @__PURE__ */ F(l, {
417
+ title: n("invoices.paymentMethods.title", "Payment methods"),
418
+ description: n("invoices.paymentMethods.description", "Which external cards and accounts pay for your subscriptions"),
427
419
  action: /* @__PURE__ */ F("button", {
428
420
  type: "button",
429
- onClick: () => h(!0),
421
+ onClick: () => m(!0),
430
422
  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",
431
423
  children: [
432
424
  /* @__PURE__ */ P(k, { className: "h-3.5 w-3.5" }),
433
425
  " ",
434
- r("invoices.paymentMethods.add", "Add payment method")
426
+ n("invoices.paymentMethods.add", "Add payment method")
435
427
  ]
436
428
  }),
437
- children: [a ? /* @__PURE__ */ P(u, { label: r("invoices.paymentMethods.loading", "Loading payment methods…") }) : c ? /* @__PURE__ */ P(l, {
438
- message: r("invoices.paymentMethods.error", "Could not load payment methods."),
439
- onRetry: () => void f()
440
- }) : g.length === 0 ? /* @__PURE__ */ P(s, {
429
+ children: [o ? /* @__PURE__ */ P(c, { label: n("invoices.paymentMethods.loading", "Loading payment methods…") }) : u ? /* @__PURE__ */ P(s, {
430
+ message: n("invoices.paymentMethods.error", "Could not load payment methods."),
431
+ onRetry: () => void d()
432
+ }) : h.length === 0 ? /* @__PURE__ */ P(a, {
441
433
  illustration: "empty-data",
442
434
  icon: /* @__PURE__ */ P(D, { className: "h-12 w-12" }),
443
- title: r("invoices.paymentMethods.emptyTitle", "No payment methods"),
444
- description: r("invoices.paymentMethods.emptyDescription", "Annotate which card or account pays for each subscription. No full card numbers are stored.")
435
+ title: n("invoices.paymentMethods.emptyTitle", "No payment methods"),
436
+ description: n("invoices.paymentMethods.emptyDescription", "Annotate which card or account pays for each subscription. No full card numbers are stored.")
445
437
  }) : /* @__PURE__ */ P("div", {
446
438
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2 xl:grid-cols-3",
447
- children: g.map((t) => {
448
- let n = [t.expiryMonth && t.expiryYear ? `Exp ${String(t.expiryMonth).padStart(2, "0")}/${String(t.expiryYear).slice(-2)}` : null].filter(Boolean);
439
+ children: h.map((e) => {
440
+ let r = [e.expiryMonth && e.expiryYear ? `Exp ${String(e.expiryMonth).padStart(2, "0")}/${String(e.expiryYear).slice(-2)}` : null].filter(Boolean);
449
441
  return /* @__PURE__ */ F(I, {
450
442
  treatment: "metric",
451
443
  className: "flex flex-col gap-4 p-4",
@@ -463,68 +455,68 @@ function q() {
463
455
  className: "min-w-0",
464
456
  children: [/* @__PURE__ */ F("p", {
465
457
  className: "flex items-center gap-1.5 truncate text-sm font-semibold text-text-primary",
466
- children: [t.brand || t.label, t.isDefault && /* @__PURE__ */ F("span", {
458
+ children: [e.brand || e.label, e.isDefault && /* @__PURE__ */ F("span", {
467
459
  className: "inline-flex items-center gap-1 rounded-full bg-status-success-bg-subtle px-1.5 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-status-success-text",
468
460
  children: [/* @__PURE__ */ P(j, {
469
461
  className: "h-2.5 w-2.5 fill-current",
470
462
  "aria-hidden": !0
471
- }), r("invoices.paymentMethods.default", "Default")]
463
+ }), n("invoices.paymentMethods.default", "Default")]
472
464
  })]
473
465
  }), /* @__PURE__ */ P("p", {
474
466
  className: "font-mono text-sm tracking-[0.15em] text-text-secondary",
475
- children: t.last4 ? `•••• ${t.last4}` : e(t.type)
467
+ children: e.last4 ? `•••• ${e.last4}` : t(e.type)
476
468
  })]
477
469
  })]
478
- }), /* @__PURE__ */ P(o, { status: t.status })]
470
+ }), /* @__PURE__ */ P(i, { status: e.status })]
479
471
  }), /* @__PURE__ */ F("div", {
480
472
  className: "mt-auto flex items-center justify-between border-t border-border-subtle pt-3",
481
473
  children: [/* @__PURE__ */ P("p", {
482
474
  className: "truncate text-xs text-text-secondary",
483
- children: [t.label, ...n].filter(Boolean).join(" · ")
475
+ children: [e.label, ...r].filter(Boolean).join(" · ")
484
476
  }), /* @__PURE__ */ F("button", {
485
477
  type: "button",
486
- "aria-label": r("invoices.paymentMethods.removeAria", "Remove {{label}}", { label: t.label }),
487
- disabled: p.isPending,
488
- onClick: () => p.mutate(t.id),
478
+ "aria-label": n("invoices.paymentMethods.removeAria", "Remove {{label}}", { label: e.label }),
479
+ disabled: f.isPending,
480
+ onClick: () => f.mutate(e.id),
489
481
  className: "inline-flex shrink-0 items-center gap-1 rounded-lg border border-border-subtle px-2.5 py-1 text-xs font-medium text-text-secondary hover:border-status-error-text/40 hover:bg-status-error-bg-subtle hover:text-status-error-text disabled:opacity-50",
490
482
  children: [/* @__PURE__ */ P(M, {
491
483
  className: "h-3.5 w-3.5",
492
484
  "aria-hidden": !0
493
- }), r("invoices.paymentMethods.remove", "Remove")]
485
+ }), n("invoices.paymentMethods.remove", "Remove")]
494
486
  })]
495
487
  })]
496
- }, t.id);
488
+ }, e.id);
497
489
  })
498
- }), m && /* @__PURE__ */ P(K, { onClose: () => h(!1) })]
490
+ }), p && /* @__PURE__ */ P(q, { onClose: () => m(!1) })]
499
491
  });
500
492
  }
501
493
  function J() {
502
- let { formatCurrency: c, formatDate: d } = n(), h = t(), { navigateTo: g } = e(), [y, x] = w(0), [S, D] = w(""), [j, M] = w(!1), R = [{
494
+ let { formatCurrency: t, formatDate: o } = e(), l = x(), { navigateTo: m } = p(), [h, v] = w(0), [b, D] = w(""), [j, M] = w(!1), z = [{
503
495
  value: "",
504
- label: h("invoices.filters.allStatuses", "All statuses")
505
- }, ...V.map((e) => ({
496
+ label: l("invoices.filters.allStatuses", "All statuses")
497
+ }, ...H.map((e) => ({
506
498
  value: e,
507
- label: h(B[e], e)
508
- }))], { data: z, isLoading: H, isError: K, refetch: J, isFetching: te } = _({
509
- status: S || void 0,
499
+ label: l(V[e], e)
500
+ }))], { data: B, isLoading: U, isError: q, refetch: J, isFetching: te } = g({
501
+ status: b || void 0,
510
502
  pagination: {
511
- limit: L,
512
- offset: y * L
503
+ limit: R,
504
+ offset: h * R
513
505
  }
514
- }), Y = v(), X = b({ pagination: {
506
+ }), Y = _(), X = y({ pagination: {
515
507
  limit: 100,
516
508
  offset: 0
517
509
  } }), ne = C(() => {
518
510
  let e = /* @__PURE__ */ new Map();
519
511
  for (let t of X.data?.items ?? []) e.set(t.id, t.label);
520
512
  return e;
521
- }, [X.data]), Z = C(() => z?.items ?? [], [z]), Q = z?.pageInfo.hasMore ?? !1, $ = C(() => {
522
- let e = Z.filter((e) => U.has(e.status)), t = Z[0]?.currency ?? "USD", n = /* @__PURE__ */ new Map();
513
+ }, [X.data]), Z = C(() => B?.items ?? [], [B]), Q = B?.pageInfo.hasMore ?? !1, $ = C(() => {
514
+ let e = Z.filter((e) => W.has(e.status)), t = Z[0]?.currency ?? "USD", n = /* @__PURE__ */ new Map();
523
515
  for (let e of Z) n.set(e.status, (n.get(e.status) ?? 0) + 1);
524
516
  let r = Array.from(n.entries()).sort((e, t) => t[1] - e[1]).map(([e, t], n) => ({
525
- label: h(B[e], e.charAt(0) + e.slice(1).toLowerCase()),
517
+ label: l(V[e], e.charAt(0) + e.slice(1).toLowerCase()),
526
518
  value: t,
527
- color: W[e] ?? f[n % f.length]
519
+ color: G[e] ?? u[n % u.length]
528
520
  }));
529
521
  return {
530
522
  outstandingCount: e.length,
@@ -534,10 +526,10 @@ function J() {
534
526
  distribution: r,
535
527
  currency: t
536
528
  };
537
- }, [Z, h]);
538
- return /* @__PURE__ */ F(i, {
539
- title: h("invoices.title", "Invoices"),
540
- description: h("invoices.description", "Your billing ledger across every relationship"),
529
+ }, [Z, l]);
530
+ return /* @__PURE__ */ F(n, {
531
+ title: l("invoices.title", "Invoices"),
532
+ description: l("invoices.description", "Your billing ledger across every relationship"),
541
533
  actions: /* @__PURE__ */ F("button", {
542
534
  type: "button",
543
535
  onClick: () => M(!0),
@@ -545,40 +537,40 @@ function J() {
545
537
  children: [
546
538
  /* @__PURE__ */ P(k, { className: "h-4 w-4" }),
547
539
  " ",
548
- h("invoices.create", "Create invoice")
540
+ l("invoices.create", "Create invoice")
549
541
  ]
550
542
  }),
551
543
  children: [
552
- /* @__PURE__ */ P(ee, {
544
+ /* @__PURE__ */ P(L, {
553
545
  className: "mb-4",
554
- children: h("invoices.purpose", "Every invoice from your recurring relationships in one ledger. Filter by status and settle issued or overdue invoices directly.")
546
+ children: l("invoices.purpose", "Every invoice from your recurring relationships in one ledger. Filter by status and settle issued or overdue invoices directly.")
555
547
  }),
556
- !H && !K && Z.length > 0 && /* @__PURE__ */ F("div", {
548
+ !U && !q && Z.length > 0 && /* @__PURE__ */ F("div", {
557
549
  className: "grid grid-cols-1 gap-4 lg:grid-cols-3",
558
550
  children: [/* @__PURE__ */ F("div", {
559
551
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:col-span-2",
560
552
  children: [
561
- /* @__PURE__ */ P(a, {
553
+ /* @__PURE__ */ P(r, {
562
554
  featured: !0,
563
555
  icon: /* @__PURE__ */ P(A, {}),
564
- value: c($.outstandingTotal, $.currency, { maximumFractionDigits: 0 }),
565
- label: h("invoices.metrics.outstanding", "Outstanding · this page")
556
+ value: t($.outstandingTotal, $.currency, { maximumFractionDigits: 0 }),
557
+ label: l("invoices.metrics.outstanding", "Outstanding · this page")
566
558
  }),
567
- /* @__PURE__ */ P(a, {
559
+ /* @__PURE__ */ P(r, {
568
560
  icon: /* @__PURE__ */ P(O, {}),
569
561
  value: $.outstandingCount,
570
- label: h("invoices.metrics.openInvoices", "Open invoices")
562
+ label: l("invoices.metrics.openInvoices", "Open invoices")
571
563
  }),
572
- /* @__PURE__ */ P(a, {
564
+ /* @__PURE__ */ P(r, {
573
565
  icon: /* @__PURE__ */ P(T, {}),
574
566
  value: $.overdueCount,
575
- label: h("invoices.metrics.overdue", "Overdue"),
567
+ label: l("invoices.metrics.overdue", "Overdue"),
576
568
  ...$.overdueCount > 0 ? { trend: "down" } : {}
577
569
  }),
578
- /* @__PURE__ */ P(a, {
570
+ /* @__PURE__ */ P(r, {
579
571
  icon: /* @__PURE__ */ P(E, {}),
580
572
  value: $.paidCount,
581
- label: h("invoices.metrics.paid", "Paid"),
573
+ label: l("invoices.metrics.paid", "Paid"),
582
574
  ...$.paidCount > 0 ? { trend: "up" } : {}
583
575
  })
584
576
  ]
@@ -588,22 +580,22 @@ function J() {
588
580
  children: [
589
581
  /* @__PURE__ */ P("p", {
590
582
  className: "text-sm font-semibold text-text-primary",
591
- children: h("invoices.metrics.statusBreakdown", "Status breakdown")
583
+ children: l("invoices.metrics.statusBreakdown", "Status breakdown")
592
584
  }),
593
585
  /* @__PURE__ */ P("p", {
594
586
  className: "text-xs text-text-secondary",
595
- children: h("invoices.metrics.statusBreakdownHint", "Across the invoices on this page")
587
+ children: l("invoices.metrics.statusBreakdownHint", "Across the invoices on this page")
596
588
  }),
597
589
  /* @__PURE__ */ F("div", {
598
590
  className: "mt-4 flex flex-col items-center gap-5 sm:flex-row sm:items-center lg:flex-col xl:flex-row",
599
- children: [/* @__PURE__ */ P(p, {
591
+ children: [/* @__PURE__ */ P(d, {
600
592
  data: $.distribution,
601
593
  size: 132,
602
594
  thickness: 16,
603
595
  centerLabel: String(Z.length),
604
- centerSub: h("invoices.metrics.invoices", "invoices"),
596
+ centerSub: l("invoices.metrics.invoices", "invoices"),
605
597
  className: "shrink-0"
606
- }), /* @__PURE__ */ P(m, {
598
+ }), /* @__PURE__ */ P(f, {
607
599
  data: $.distribution,
608
600
  className: "w-full min-w-0 flex-1",
609
601
  valueFormat: (e) => String(e)
@@ -615,33 +607,33 @@ function J() {
615
607
  /* @__PURE__ */ P("div", {
616
608
  className: "mt-6 flex flex-wrap items-center gap-3",
617
609
  children: /* @__PURE__ */ P("select", {
618
- "aria-label": h("invoices.filters.statusLabel", "Filter by status"),
619
- value: S,
610
+ "aria-label": l("invoices.filters.statusLabel", "Filter by status"),
611
+ value: b,
620
612
  onChange: (e) => {
621
- D(e.target.value), x(0);
613
+ D(e.target.value), v(0);
622
614
  },
623
615
  className: "rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-xs text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
624
- children: R.map((e) => /* @__PURE__ */ P("option", {
616
+ children: z.map((e) => /* @__PURE__ */ P("option", {
625
617
  value: e.value,
626
618
  children: e.label
627
619
  }, e.value))
628
620
  })
629
621
  }),
630
- H ? /* @__PURE__ */ P(u, { label: h("invoices.loading", "Loading invoices…") }) : K ? /* @__PURE__ */ P(l, {
631
- message: h("invoices.error", "Could not load invoices."),
622
+ U ? /* @__PURE__ */ P(c, { label: l("invoices.loading", "Loading invoices…") }) : q ? /* @__PURE__ */ P(s, {
623
+ message: l("invoices.error", "Could not load invoices."),
632
624
  onRetry: () => void J()
633
625
  }) : Z.length === 0 ? /* @__PURE__ */ P("div", {
634
626
  className: "mt-6",
635
- children: /* @__PURE__ */ P(s, {
627
+ children: /* @__PURE__ */ P(a, {
636
628
  illustration: "empty-data",
637
629
  icon: /* @__PURE__ */ P(A, { className: "h-12 w-12" }),
638
- title: h("invoices.emptyTitle", "No invoices"),
639
- description: S ? h("invoices.emptyDescriptionFiltered", "No invoices match this status filter.") : h("invoices.emptyDescription", "Invoices from your relationships will appear here — or create one manually."),
630
+ title: l("invoices.emptyTitle", "No invoices"),
631
+ description: b ? l("invoices.emptyDescriptionFiltered", "No invoices match this status filter.") : l("invoices.emptyDescription", "Invoices from your relationships will appear here — or create one manually."),
640
632
  action: /* @__PURE__ */ P("button", {
641
633
  type: "button",
642
634
  onClick: () => M(!0),
643
635
  className: "rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90",
644
- children: h("invoices.create", "Create invoice")
636
+ children: l("invoices.create", "Create invoice")
645
637
  })
646
638
  })
647
639
  }) : /* @__PURE__ */ F(N, { children: [/* @__PURE__ */ F("div", {
@@ -649,20 +641,20 @@ function J() {
649
641
  children: [/* @__PURE__ */ F("div", {
650
642
  className: "hidden grid-cols-[1.3fr_1.2fr_0.8fr_0.8fr_0.8fr_auto] gap-4 border-b border-border-subtle bg-bg-sunken px-4 py-2.5 text-xs font-medium text-text-secondary sm:grid",
651
643
  children: [
652
- /* @__PURE__ */ P("span", { children: h("invoices.table.invoice", "Invoice") }),
653
- /* @__PURE__ */ P("span", { children: h("invoices.table.subscription", "Subscription") }),
654
- /* @__PURE__ */ P("span", { children: h("invoices.table.status", "Status") }),
644
+ /* @__PURE__ */ P("span", { children: l("invoices.table.invoice", "Invoice") }),
645
+ /* @__PURE__ */ P("span", { children: l("invoices.table.subscription", "Subscription") }),
646
+ /* @__PURE__ */ P("span", { children: l("invoices.table.status", "Status") }),
655
647
  /* @__PURE__ */ P("span", {
656
648
  className: "text-end",
657
- children: h("invoices.table.total", "Total")
649
+ children: l("invoices.table.total", "Total")
658
650
  }),
659
651
  /* @__PURE__ */ P("span", {
660
652
  className: "text-end",
661
- children: h("invoices.table.due", "Due")
653
+ children: l("invoices.table.due", "Due")
662
654
  }),
663
655
  /* @__PURE__ */ P("span", {
664
656
  className: "text-end",
665
- children: h("invoices.table.action", "Action")
657
+ children: l("invoices.table.action", "Action")
666
658
  })
667
659
  ]
668
660
  }), /* @__PURE__ */ P("div", {
@@ -672,44 +664,44 @@ function J() {
672
664
  children: [
673
665
  /* @__PURE__ */ F("button", {
674
666
  type: "button",
675
- onClick: () => g(`/relationships/${e.relationshipId}`),
667
+ onClick: () => m(`/relationships/${e.relationshipId}`),
676
668
  className: "min-w-0 text-start",
677
669
  children: [/* @__PURE__ */ P("p", {
678
670
  className: "truncate text-sm font-medium text-text-primary",
679
- children: e.number || `${h("invoices.table.invoice", "Invoice")} ${e.id.slice(0, 8)}`
671
+ children: e.number || `${l("invoices.table.invoice", "Invoice")} ${e.id.slice(0, 8)}`
680
672
  }), /* @__PURE__ */ P("p", {
681
673
  className: "text-xs text-text-secondary",
682
- children: e.issueDate ? h("invoices.table.issued", "Issued {{date}}", { date: d(e.issueDate) }) : "—"
674
+ children: e.issueDate ? l("invoices.table.issued", "Issued {{date}}", { date: o(e.issueDate) }) : "—"
683
675
  })]
684
676
  }),
685
677
  /* @__PURE__ */ P("span", {
686
678
  className: "min-w-0 truncate text-sm text-text-secondary",
687
679
  children: ne.get(e.relationshipId) ?? "—"
688
680
  }),
689
- /* @__PURE__ */ P("span", { children: /* @__PURE__ */ P(o, { status: e.status }) }),
681
+ /* @__PURE__ */ P("span", { children: /* @__PURE__ */ P(i, { status: e.status }) }),
690
682
  /* @__PURE__ */ P("span", {
691
683
  className: "text-sm font-semibold tabular-nums text-text-primary sm:text-end",
692
- children: c(e.total, e.currency)
684
+ children: t(e.total, e.currency)
693
685
  }),
694
686
  /* @__PURE__ */ P("span", {
695
687
  className: "text-xs text-text-secondary sm:text-end",
696
- children: e.dueDate ? d(e.dueDate) : "—"
688
+ children: e.dueDate ? o(e.dueDate) : "—"
697
689
  }),
698
690
  /* @__PURE__ */ P("span", {
699
691
  className: "sm:text-end",
700
- children: U.has(e.status) ? /* @__PURE__ */ F("button", {
692
+ children: W.has(e.status) ? /* @__PURE__ */ F("button", {
701
693
  type: "button",
702
694
  disabled: Y.isPending,
703
695
  onClick: () => Y.mutate(e.id),
704
- "aria-label": h("invoices.table.markPaidAria", "Mark {{invoice}} paid", { invoice: e.number || `${h("invoices.table.invoice", "Invoice")} ${e.id.slice(0, 8)}` }),
696
+ "aria-label": l("invoices.table.markPaidAria", "Mark {{invoice}} paid", { invoice: e.number || `${l("invoices.table.invoice", "Invoice")} ${e.id.slice(0, 8)}` }),
705
697
  className: "inline-flex items-center gap-1.5 rounded-lg border border-status-success-text/30 bg-status-success-bg-subtle px-3 py-1.5 text-xs font-medium text-status-success-text hover:opacity-90 disabled:opacity-50",
706
698
  children: [/* @__PURE__ */ P(E, {
707
699
  className: "h-3.5 w-3.5",
708
700
  "aria-hidden": !0
709
- }), h("invoices.table.markPaid", "Mark paid")]
701
+ }), l("invoices.table.markPaid", "Mark paid")]
710
702
  }) : e.paidAt ? /* @__PURE__ */ P("span", {
711
703
  className: "text-xs text-text-secondary",
712
- children: h("invoices.table.paidAt", "Paid {{date}}", { date: d(e.paidAt) })
704
+ children: l("invoices.table.paidAt", "Paid {{date}}", { date: o(e.paidAt) })
713
705
  }) : /* @__PURE__ */ P("span", {
714
706
  className: "text-xs text-text-secondary",
715
707
  children: "—"
@@ -722,30 +714,29 @@ function J() {
722
714
  className: "mt-4 flex items-center justify-between",
723
715
  children: [/* @__PURE__ */ F("p", {
724
716
  className: "text-xs text-text-secondary",
725
- children: [h("invoices.pagination.page", "Page {{page}}", { page: y + 1 }), te ? ` · ${h("invoices.pagination.refreshing", "refreshing…")}` : ""]
717
+ children: [l("invoices.pagination.page", "Page {{page}}", { page: h + 1 }), te ? ` · ${l("invoices.pagination.refreshing", "refreshing…")}` : ""]
726
718
  }), /* @__PURE__ */ F("div", {
727
719
  className: "flex gap-2",
728
720
  children: [/* @__PURE__ */ P("button", {
729
721
  type: "button",
730
- disabled: y === 0,
731
- onClick: () => x((e) => Math.max(0, e - 1)),
732
- className: r("rounded-lg border border-border-subtle px-3 py-1.5 text-xs font-medium", y === 0 ? "cursor-not-allowed text-text-secondary opacity-50" : "text-text-primary hover:bg-bg-sunken"),
733
- children: h("invoices.pagination.previous", "Previous")
722
+ disabled: h === 0,
723
+ onClick: () => v((e) => Math.max(0, e - 1)),
724
+ className: S("rounded-lg border border-border-subtle px-3 py-1.5 text-xs font-medium", h === 0 ? "cursor-not-allowed text-text-secondary opacity-50" : "text-text-primary hover:bg-bg-sunken"),
725
+ children: l("invoices.pagination.previous", "Previous")
734
726
  }), /* @__PURE__ */ P("button", {
735
727
  type: "button",
736
728
  disabled: !Q,
737
- onClick: () => x((e) => e + 1),
738
- className: r("rounded-lg border border-border-subtle px-3 py-1.5 text-xs font-medium", Q ? "text-text-primary hover:bg-bg-sunken" : "cursor-not-allowed text-text-secondary opacity-50"),
739
- children: h("invoices.pagination.next", "Next")
729
+ onClick: () => v((e) => e + 1),
730
+ className: S("rounded-lg border border-border-subtle px-3 py-1.5 text-xs font-medium", Q ? "text-text-primary hover:bg-bg-sunken" : "cursor-not-allowed text-text-secondary opacity-50"),
731
+ children: l("invoices.pagination.next", "Next")
740
732
  })]
741
733
  })]
742
734
  })] }),
743
- /* @__PURE__ */ P(q, {}),
744
- j && /* @__PURE__ */ P(G, { onClose: () => M(!1) })
735
+ /* @__PURE__ */ P(ee, {}),
736
+ j && /* @__PURE__ */ P(K, { onClose: () => M(!1) })
745
737
  ]
746
738
  });
747
739
  }
748
- //#endregion
749
740
  export { J as InvoicesPage };
750
741
 
751
742
  //# sourceMappingURL=InvoicesPage.js.map