@burdenoff/microfe-billing 2026.1113.2 → 2026.1113.3

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 (105) hide show
  1. package/dist/billing/BillingRoot.js +83 -77
  2. package/dist/billing/BillingRoot.js.map +1 -1
  3. package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.js +78 -78
  4. package/dist/billing/modules/addons/pages/AddonCreatePage.js +70 -70
  5. package/dist/billing/modules/addons/pages/AddonDetailPage.js +72 -72
  6. package/dist/billing/modules/addons/pages/AddonEditPage.js +79 -79
  7. package/dist/billing/modules/addons/pages/AddonsBrowsePage.js +224 -224
  8. package/dist/billing/modules/addons/pages/AddonsListPage.js +186 -186
  9. package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js +168 -168
  10. package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js.map +1 -1
  11. package/dist/billing/modules/analytics/pages/AnalyticsPage.js +88 -88
  12. package/dist/billing/modules/billing/hooks/index.js +5 -5
  13. package/dist/billing/modules/billing/hooks/useInvoices.js +39 -20
  14. package/dist/billing/modules/billing/hooks/useInvoices.js.map +1 -1
  15. package/dist/billing/modules/billing/index.js +14 -14
  16. package/dist/billing/modules/billing/pages/BillingWebhookLogsPage.js +92 -92
  17. package/dist/billing/modules/billing/pages/InvoiceDetailPage.js +160 -160
  18. package/dist/billing/modules/billing/pages/InvoiceDetailPage.js.map +1 -1
  19. package/dist/billing/modules/billing/pages/InvoicesListPage.js +100 -100
  20. package/dist/billing/modules/billing/pages/OrderCallbackLogsPage.js +105 -105
  21. package/dist/billing/modules/billing/pages/PaymentMethodsPage.js +37 -37
  22. package/dist/billing/modules/billing/pages/RefundIssueLogsPage.js +41 -41
  23. package/dist/billing/modules/billing/pages/RefundsPage.js +334 -334
  24. package/dist/billing/modules/billing/pages/RefundsPage.js.map +1 -1
  25. package/dist/billing/modules/billing/pages/TransactionsPage.js +174 -174
  26. package/dist/billing/modules/billing/pages/TransactionsPage.js.map +1 -1
  27. package/dist/billing/modules/billing/pages/UserRefundsPage.js +24 -24
  28. package/dist/billing/modules/billing/pages/UserRefundsPage.js.map +1 -1
  29. package/dist/billing/modules/checkout/components/OrderSummary.js +71 -71
  30. package/dist/billing/modules/checkout/pages/CheckoutPage.js +646 -625
  31. package/dist/billing/modules/checkout/pages/CheckoutPage.js.map +1 -1
  32. package/dist/billing/modules/checkout/utils/checkoutOptions.d.ts +23 -0
  33. package/dist/billing/modules/checkout/utils/checkoutOptions.js +8 -0
  34. package/dist/billing/modules/checkout/utils/checkoutOptions.js.map +1 -0
  35. package/dist/billing/modules/coupons/pages/CouponDetailPage.js +112 -112
  36. package/dist/billing/modules/coupons/pages/CouponsListPage.js +118 -118
  37. package/dist/billing/modules/coupons/pages/CouponsListPage.js.map +1 -1
  38. package/dist/billing/modules/coupons/pages/CreateCouponPage.js +119 -119
  39. package/dist/billing/modules/coupons/pages/EditCouponPage.js +82 -82
  40. package/dist/billing/modules/credits/pages/AdminCreditsPage.js +30 -30
  41. package/dist/billing/modules/credits/pages/CreditTransactionsPage.js +77 -77
  42. package/dist/billing/modules/credits/pages/CreditWithdrawalPage.js +144 -144
  43. package/dist/billing/modules/credits/pages/CreditsPage.js +67 -67
  44. package/dist/billing/modules/dashboard/pages/OverviewPage.js +594 -442
  45. package/dist/billing/modules/dashboard/pages/OverviewPage.js.map +1 -1
  46. package/dist/billing/modules/dashboard/utils/overviewSummary.d.ts +46 -0
  47. package/dist/billing/modules/dashboard/utils/overviewSummary.js +37 -0
  48. package/dist/billing/modules/dashboard/utils/overviewSummary.js.map +1 -0
  49. package/dist/billing/modules/discounts/pages/DiscountsListPage.js +199 -199
  50. package/dist/billing/modules/discounts/pages/DiscountsListPage.js.map +1 -1
  51. package/dist/billing/modules/earnings/pages/DeveloperRevenueAdminPage.js +64 -64
  52. package/dist/billing/modules/earnings/pages/DeveloperRevenueOrgDetailPage.js +122 -122
  53. package/dist/billing/modules/earnings/pages/DeveloperRevenueOrgDetailPage.js.map +1 -1
  54. package/dist/billing/modules/earnings/pages/EarningsPage.js +102 -102
  55. package/dist/billing/modules/earnings/pages/EarningsPage.js.map +1 -1
  56. package/dist/billing/modules/earnings/pages/PayoutAdminPage.js +178 -178
  57. package/dist/billing/modules/earnings/pages/PayoutAdminPage.js.map +1 -1
  58. package/dist/billing/modules/earnings/pages/PayoutsPage.js +107 -107
  59. package/dist/billing/modules/earnings/pages/PayoutsPage.js.map +1 -1
  60. package/dist/billing/modules/plans/pages/PlanAssignFreePage.js +54 -54
  61. package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.js +94 -94
  62. package/dist/billing/modules/plans/pages/PlanCreatePage.js +73 -73
  63. package/dist/billing/modules/plans/pages/PlanDetailPage.js +96 -96
  64. package/dist/billing/modules/plans/pages/PlanEditPage.js +16 -16
  65. package/dist/billing/modules/plans/pages/PlanEditPage.js.map +1 -1
  66. package/dist/billing/modules/plans/pages/PlansBrowsePage.js +100 -100
  67. package/dist/billing/modules/plans/pages/PlansListPage.js +88 -88
  68. package/dist/billing/modules/promotions/pages/CreatePromotionPage.js +60 -60
  69. package/dist/billing/modules/promotions/pages/PromotionsListPage.js +37 -37
  70. package/dist/billing/modules/quota/pages/QuotaAssignFreePage.js +62 -62
  71. package/dist/billing/modules/quota/pages/QuotaPage.js +1 -1
  72. package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.js +69 -69
  73. package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.js +76 -76
  74. package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.js +80 -80
  75. package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.js +95 -95
  76. package/dist/billing/modules/settings/pages/SettingsPage.js +134 -134
  77. package/dist/billing/modules/settings/pages/SettingsPage.js.map +1 -1
  78. package/dist/billing/modules/settings/pages/TeamPermissionsPage.js +62 -62
  79. package/dist/billing/modules/settings/pages/TeamPermissionsPage.js.map +1 -1
  80. package/dist/billing/modules/subscriptions/components/ManageSeatsModal.js +36 -36
  81. package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js +534 -410
  82. package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js.map +1 -1
  83. package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.js +111 -111
  84. package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.js +166 -160
  85. package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.js.map +1 -1
  86. package/dist/billing/modules/subscriptions/utils/subscriptionDetailView.d.ts +30 -0
  87. package/dist/billing/modules/subscriptions/utils/subscriptionDetailView.js +20 -0
  88. package/dist/billing/modules/subscriptions/utils/subscriptionDetailView.js.map +1 -0
  89. package/dist/billing/modules/subscriptions/utils/upgradeAccess.d.ts +10 -0
  90. package/dist/billing/modules/subscriptions/utils/upgradeAccess.js +7 -0
  91. package/dist/billing/modules/subscriptions/utils/upgradeAccess.js.map +1 -0
  92. package/dist/billing/modules/usage/pages/UsagePage.js +722 -591
  93. package/dist/billing/modules/usage/pages/UsagePage.js.map +1 -1
  94. package/dist/billing/modules/usage/utils/usageHealth.d.ts +63 -0
  95. package/dist/billing/modules/usage/utils/usageHealth.js +43 -0
  96. package/dist/billing/modules/usage/utils/usageHealth.js.map +1 -0
  97. package/dist/billing/shared/components/EmptyState.js +3 -3
  98. package/dist/billing/shared/components/MoneyActionDialog.js +12 -12
  99. package/dist/billing/shared/ui/MetricCard.js +13 -13
  100. package/dist/billing/shared/utils/format.js +16 -4
  101. package/dist/billing/shared/utils/format.js.map +1 -1
  102. package/dist/billing/shared/utils/index.js +8 -8
  103. package/dist/generated/global-operations.js +294 -286
  104. package/dist/generated/global-operations.js.map +1 -1
  105. package/package.json +2 -2
@@ -13,13 +13,13 @@ import { useIsFluidgridsVariant as p } from "../../../hooks/useBillingVariant.js
13
13
  import { useTr as m } from "../../../shared/hooks/useTr.js";
14
14
  import { nativeConfirm as h, nativeImpact as g, nativeNotify as _ } from "../../../../utils/nativeBridge.js";
15
15
  import { useCallback as v, useEffect as y, useMemo as b, useRef as x, useState as S } from "react";
16
- import { RotateCcw as C } from "lucide-react";
17
- import { useSearchParams as w } from "react-router";
18
- import { Fragment as T, jsx as E, jsxs as D } from "react/jsx-runtime";
19
- import { IllustratedEmptyState as O, PagePurpose as k } from "@burdenoff/fe-libs/ui";
16
+ import { IllustratedEmptyState as C, PagePurpose as w } from "@burdenoff/fe-libs/ui";
17
+ import { RotateCcw as T } from "lucide-react";
18
+ import { useSearchParams as E } from "react-router";
19
+ import { Fragment as D, jsx as O, jsxs as k } from "react/jsx-runtime";
20
20
  // src/billing/modules/billing/pages/InvoicesListPage.tsx
21
21
  var A = () => {
22
- let t = m(), i = e(), s = a(), [c] = w(), l = c.get("billingAccountId") ?? void 0, { data: f } = o({ fetchPolicy: "cache-first" }), p = b(() => f?.getBillingAccountsByOrg ?? [], [f]), { payInvoice: h, voidInvoice: g } = n(), [A, M] = S(null), [N, P] = S(null), [F, I] = S(l);
22
+ let t = m(), i = e(), s = a(), [c] = E(), l = c.get("billingAccountId") ?? void 0, { data: f } = o({ fetchPolicy: "cache-first" }), p = b(() => f?.getBillingAccountsByOrg ?? [], [f]), { payInvoice: h, voidInvoice: g } = n(), [A, M] = S(null), [N, P] = S(null), [F, I] = S(l);
23
23
  y(() => {
24
24
  I(l);
25
25
  }, [l]);
@@ -73,9 +73,9 @@ var A = () => {
73
73
  }
74
74
  }
75
75
  }, [Q, g]);
76
- return s.canViewInvoices ? X && J.length === 0 ? /* @__PURE__ */ D("div", {
76
+ return s.canViewInvoices ? X && J.length === 0 ? /* @__PURE__ */ k("div", {
77
77
  className: "space-y-6 p-6",
78
- children: [/* @__PURE__ */ E("div", { className: "h-8 w-48 bg-bg-sunken animate-pulse rounded" }), /* @__PURE__ */ E("div", {
78
+ children: [/* @__PURE__ */ O("div", { className: "h-8 w-48 bg-bg-sunken animate-pulse rounded" }), /* @__PURE__ */ O("div", {
79
79
  className: "space-y-3",
80
80
  children: [
81
81
  1,
@@ -83,30 +83,30 @@ var A = () => {
83
83
  3,
84
84
  4,
85
85
  5
86
- ].map((e) => /* @__PURE__ */ E("div", {
86
+ ].map((e) => /* @__PURE__ */ O("div", {
87
87
  className: "border border-border-subtle rounded-lg p-4",
88
- children: /* @__PURE__ */ D("div", {
88
+ children: /* @__PURE__ */ k("div", {
89
89
  className: "flex items-center gap-4",
90
- children: [/* @__PURE__ */ E("div", { className: "size-10 bg-bg-sunken animate-pulse rounded" }), /* @__PURE__ */ D("div", {
90
+ children: [/* @__PURE__ */ O("div", { className: "size-10 bg-bg-sunken animate-pulse rounded" }), /* @__PURE__ */ k("div", {
91
91
  className: "flex-1 space-y-2",
92
- children: [/* @__PURE__ */ E("div", { className: "h-4 w-32 bg-bg-sunken animate-pulse rounded" }), /* @__PURE__ */ E("div", { className: "h-3 w-48 bg-bg-sunken animate-pulse rounded" })]
92
+ children: [/* @__PURE__ */ O("div", { className: "h-4 w-32 bg-bg-sunken animate-pulse rounded" }), /* @__PURE__ */ O("div", { className: "h-3 w-48 bg-bg-sunken animate-pulse rounded" })]
93
93
  })]
94
94
  })
95
95
  }, e))
96
96
  })]
97
- }) : Z ? /* @__PURE__ */ E("div", {
97
+ }) : Z ? /* @__PURE__ */ O("div", {
98
98
  className: "flex items-center justify-center h-full min-h-[400px]",
99
- children: /* @__PURE__ */ D("div", {
99
+ children: /* @__PURE__ */ k("div", {
100
100
  className: "text-center space-y-4",
101
101
  children: [
102
- /* @__PURE__ */ E("div", {
102
+ /* @__PURE__ */ O("div", {
103
103
  className: "size-12 mx-auto rounded-full bg-status-error-bg-subtle flex items-center justify-center",
104
- children: /* @__PURE__ */ E("svg", {
104
+ children: /* @__PURE__ */ O("svg", {
105
105
  className: "size-6 text-status-error-text",
106
106
  fill: "none",
107
107
  viewBox: "0 0 24 24",
108
108
  stroke: "currentColor",
109
- children: /* @__PURE__ */ E("path", {
109
+ children: /* @__PURE__ */ O("path", {
110
110
  strokeLinecap: "round",
111
111
  strokeLinejoin: "round",
112
112
  strokeWidth: 2,
@@ -114,15 +114,15 @@ var A = () => {
114
114
  })
115
115
  })
116
116
  }),
117
- /* @__PURE__ */ E("h2", {
117
+ /* @__PURE__ */ O("h2", {
118
118
  className: "text-lg font-semibold text-text-primary",
119
119
  children: t("billing.invoices.failedToLoad", "Failed to load invoices")
120
120
  }),
121
- /* @__PURE__ */ E("p", {
121
+ /* @__PURE__ */ O("p", {
122
122
  className: "text-sm text-text-secondary",
123
123
  children: Z.message
124
124
  }),
125
- /* @__PURE__ */ E("button", {
125
+ /* @__PURE__ */ O("button", {
126
126
  type: "button",
127
127
  onClick: () => Q(),
128
128
  className: "px-4 py-2 text-sm font-medium bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover transition-colors",
@@ -130,44 +130,44 @@ var A = () => {
130
130
  })
131
131
  ]
132
132
  })
133
- }) : /* @__PURE__ */ D("div", {
133
+ }) : /* @__PURE__ */ k("div", {
134
134
  className: "space-y-6 px-6 lg:px-8 py-6",
135
135
  children: [
136
- /* @__PURE__ */ D("div", {
136
+ /* @__PURE__ */ k("div", {
137
137
  className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
138
- children: [/* @__PURE__ */ D("div", { children: [
139
- /* @__PURE__ */ E("h1", {
138
+ children: [/* @__PURE__ */ k("div", { children: [
139
+ /* @__PURE__ */ O("h1", {
140
140
  className: "text-2xl md:text-3xl font-semibold tracking-tight text-text-primary",
141
141
  children: t("billing.invoices.title", "Invoices")
142
142
  }),
143
- /* @__PURE__ */ E("p", {
143
+ /* @__PURE__ */ O("p", {
144
144
  className: "text-sm text-text-secondary mt-1",
145
145
  children: t("billing.invoices.subtitle", "View and manage your billing invoices")
146
146
  }),
147
- /* @__PURE__ */ E(k, {
147
+ /* @__PURE__ */ O(w, {
148
148
  className: "mt-3",
149
149
  children: t("billing.invoices.purpose", "A record of everything you have been billed for — subscriptions, add-ons and one-off charges. Open an invoice to see line items, download the PDF, pay an outstanding amount, or request a refund.")
150
150
  })
151
- ] }), /* @__PURE__ */ D("div", {
151
+ ] }), /* @__PURE__ */ k("div", {
152
152
  className: "flex items-center gap-3",
153
- children: [/* @__PURE__ */ D("button", {
153
+ children: [/* @__PURE__ */ k("button", {
154
154
  type: "button",
155
155
  onClick: () => i("/refunds"),
156
156
  className: "inline-flex items-center gap-2 px-3 py-2 text-sm font-medium border border-border-subtle text-text-primary rounded-button hover:bg-bg-sunken hover:border-border-strong transition-all duration-200",
157
- children: [/* @__PURE__ */ E(C, { className: "size-4" }), t("billing.invoices.myRefunds", "My Refunds")]
158
- }), p.length > 1 && /* @__PURE__ */ D("div", {
157
+ children: [/* @__PURE__ */ O(T, { className: "size-4" }), t("billing.invoices.myRefunds", "My Refunds")]
158
+ }), p.length > 1 && /* @__PURE__ */ k("div", {
159
159
  className: "flex items-center gap-2",
160
- children: [/* @__PURE__ */ E("label", {
160
+ children: [/* @__PURE__ */ O("label", {
161
161
  className: "text-sm text-text-secondary whitespace-nowrap",
162
162
  children: t("billing.invoices.billingAccountLabel", "Billing Account")
163
- }), /* @__PURE__ */ D("select", {
163
+ }), /* @__PURE__ */ k("select", {
164
164
  value: R ?? "",
165
165
  onChange: (e) => I(e.target.value || null),
166
166
  className: "text-sm border border-border-subtle rounded-button bg-bg-surface text-text-primary px-3 py-2 focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
167
- children: [/* @__PURE__ */ E("option", {
167
+ children: [/* @__PURE__ */ O("option", {
168
168
  value: "",
169
169
  children: t("billing.invoices.allAccounts", "All Accounts")
170
- }), p.map((e) => /* @__PURE__ */ D("option", {
170
+ }), p.map((e) => /* @__PURE__ */ k("option", {
171
171
  value: e.id ?? "",
172
172
  children: [e.name ?? e.email ?? e.id, e.isDefault ? t("billing.invoices.defaultSuffix", " (Default)") : ""]
173
173
  }, e.id ?? ""))]
@@ -175,9 +175,9 @@ var A = () => {
175
175
  })]
176
176
  })]
177
177
  }),
178
- /* @__PURE__ */ D("div", {
178
+ /* @__PURE__ */ k("div", {
179
179
  className: "flex flex-wrap items-center gap-4 pb-4 border-b border-border-subtle",
180
- children: [/* @__PURE__ */ E("div", {
180
+ children: [/* @__PURE__ */ O("div", {
181
181
  className: "inline-flex rounded-lg border border-border-subtle p-1 bg-bg-sunken flex-wrap",
182
182
  children: [
183
183
  "all",
@@ -185,7 +185,7 @@ var A = () => {
185
185
  "PAID",
186
186
  "DRAFT",
187
187
  "VOID"
188
- ].map((e) => /* @__PURE__ */ E("button", {
188
+ ].map((e) => /* @__PURE__ */ O("button", {
189
189
  type: "button",
190
190
  onClick: () => {
191
191
  B(e), K(1);
@@ -193,20 +193,20 @@ var A = () => {
193
193
  className: `px-3 py-1.5 text-sm font-medium rounded-button transition-colors ${z === e ? "bg-bg-surface text-text-primary shadow-sm" : "text-text-secondary hover:text-text-primary"}`,
194
194
  children: e === "all" ? "All" : u(e)
195
195
  }, e))
196
- }), /* @__PURE__ */ D("div", {
196
+ }), /* @__PURE__ */ k("div", {
197
197
  className: "relative flex-1 min-w-0 w-full sm:max-w-md",
198
- children: [/* @__PURE__ */ E("svg", {
198
+ children: [/* @__PURE__ */ O("svg", {
199
199
  className: "absolute left-3 top-1/2 -translate-y-1/2 size-4 text-text-secondary",
200
200
  fill: "none",
201
201
  viewBox: "0 0 24 24",
202
202
  stroke: "currentColor",
203
- children: /* @__PURE__ */ E("path", {
203
+ children: /* @__PURE__ */ O("path", {
204
204
  strokeLinecap: "round",
205
205
  strokeLinejoin: "round",
206
206
  strokeWidth: 2,
207
207
  d: "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"
208
208
  })
209
- }), /* @__PURE__ */ E("input", {
209
+ }), /* @__PURE__ */ O("input", {
210
210
  type: "text",
211
211
  placeholder: t("billing.invoices.searchPlaceholder", "Search by invoice number..."),
212
212
  value: V,
@@ -215,56 +215,56 @@ var A = () => {
215
215
  })]
216
216
  })]
217
217
  }),
218
- A && /* @__PURE__ */ E("div", {
218
+ A && /* @__PURE__ */ O("div", {
219
219
  className: "rounded-button border border-status-error-border bg-status-error-bg-subtle p-3",
220
- children: /* @__PURE__ */ E("p", {
220
+ children: /* @__PURE__ */ O("p", {
221
221
  className: "text-sm text-status-error-text",
222
222
  children: A
223
223
  })
224
224
  }),
225
- !X && J.length === 0 ? /* @__PURE__ */ E(O, {
225
+ !X && J.length === 0 ? /* @__PURE__ */ O(C, {
226
226
  illustration: z !== "all" || U ? "empty-search" : "empty-files",
227
227
  title: t("billing.invoices.noInvoicesFound", "No invoices found"),
228
228
  description: z !== "all" || U ? t("billing.invoices.noInvoicesFiltered", "No invoices match your filters.") : t("billing.invoices.noInvoicesYet", "You don't have any invoices yet.")
229
- }) : /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ E("div", {
229
+ }) : /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ O("div", {
230
230
  className: "border border-border-seam rounded-card bg-bg-surface shadow-elevation-1 overflow-hidden",
231
- children: /* @__PURE__ */ D("table", {
231
+ children: /* @__PURE__ */ k("table", {
232
232
  className: "w-full",
233
- children: [/* @__PURE__ */ E("thead", {
233
+ children: [/* @__PURE__ */ O("thead", {
234
234
  className: "bg-bg-sunken",
235
- children: /* @__PURE__ */ D("tr", { children: [
236
- /* @__PURE__ */ E("th", {
235
+ children: /* @__PURE__ */ k("tr", { children: [
236
+ /* @__PURE__ */ O("th", {
237
237
  className: "text-left px-4 py-3 text-xs font-medium uppercase tracking-wide text-text-muted",
238
238
  children: t("billing.invoices.invoice", "Invoice")
239
239
  }),
240
- /* @__PURE__ */ E("th", {
240
+ /* @__PURE__ */ O("th", {
241
241
  className: "text-left px-4 py-3 text-xs font-medium uppercase tracking-wide text-text-muted",
242
242
  children: t("billing.common.status", "Status")
243
243
  }),
244
- !R && p.length > 1 && /* @__PURE__ */ E("th", {
244
+ !R && p.length > 1 && /* @__PURE__ */ O("th", {
245
245
  className: "text-left px-4 py-3 text-xs font-medium uppercase tracking-wide text-text-muted hidden lg:table-cell",
246
246
  children: t("billing.common.account", "Account")
247
247
  }),
248
- /* @__PURE__ */ E("th", {
248
+ /* @__PURE__ */ O("th", {
249
249
  className: "text-left px-4 py-3 text-xs font-medium uppercase tracking-wide text-text-muted hidden sm:table-cell",
250
250
  children: t("billing.common.date", "Date")
251
251
  }),
252
- /* @__PURE__ */ E("th", {
252
+ /* @__PURE__ */ O("th", {
253
253
  className: "text-left px-4 py-3 text-xs font-medium uppercase tracking-wide text-text-muted hidden md:table-cell",
254
254
  children: t("billing.common.dueDate", "Due Date")
255
255
  }),
256
- /* @__PURE__ */ E("th", {
256
+ /* @__PURE__ */ O("th", {
257
257
  className: "text-right px-4 py-3 text-xs font-medium uppercase tracking-wide text-text-muted",
258
258
  children: t("billing.common.amount", "Amount")
259
259
  }),
260
- /* @__PURE__ */ E("th", {
260
+ /* @__PURE__ */ O("th", {
261
261
  className: "text-right px-4 py-3 text-xs font-medium uppercase tracking-wide text-text-muted",
262
262
  children: t("billing.common.actions", "Actions")
263
263
  })
264
264
  ] })
265
- }), /* @__PURE__ */ E("tbody", {
265
+ }), /* @__PURE__ */ O("tbody", {
266
266
  className: "divide-y divide-border-subtle",
267
- children: J.map((e) => /* @__PURE__ */ E(j, {
267
+ children: J.map((e) => /* @__PURE__ */ O(j, {
268
268
  invoice: e,
269
269
  onView: () => i(d(`/invoices/${e.id}`, e.billingAccountId)),
270
270
  canPay: s.canPayInvoice,
@@ -278,23 +278,23 @@ var A = () => {
278
278
  }, e.id))
279
279
  })]
280
280
  })
281
- }), Y > 1 && /* @__PURE__ */ D("div", {
281
+ }), Y > 1 && /* @__PURE__ */ k("div", {
282
282
  className: "flex items-center justify-between pt-2",
283
- children: [/* @__PURE__ */ E("p", {
283
+ children: [/* @__PURE__ */ O("p", {
284
284
  className: "text-sm text-text-secondary",
285
285
  children: t("billing.common.pageOf", "Page {{page}} of {{totalPages}}", {
286
286
  page: G,
287
287
  totalPages: Y
288
288
  })
289
- }), /* @__PURE__ */ D("div", {
289
+ }), /* @__PURE__ */ k("div", {
290
290
  className: "flex items-center gap-2",
291
- children: [/* @__PURE__ */ E("button", {
291
+ children: [/* @__PURE__ */ O("button", {
292
292
  type: "button",
293
293
  onClick: () => K((e) => Math.max(1, e - 1)),
294
294
  disabled: G <= 1,
295
295
  className: "px-3 py-1.5 text-sm font-medium border border-border-subtle rounded-button bg-bg-surface text-text-primary hover:bg-bg-sunken disabled:opacity-40 disabled:cursor-not-allowed transition-colors",
296
296
  children: t("billing.common.previous", "Previous")
297
- }), /* @__PURE__ */ E("button", {
297
+ }), /* @__PURE__ */ O("button", {
298
298
  type: "button",
299
299
  onClick: () => K((e) => Math.min(Y, e + 1)),
300
300
  disabled: G >= Y,
@@ -304,19 +304,19 @@ var A = () => {
304
304
  })]
305
305
  })] })
306
306
  ]
307
- }) : /* @__PURE__ */ E("div", {
307
+ }) : /* @__PURE__ */ O("div", {
308
308
  className: "flex items-center justify-center h-full min-h-[400px]",
309
- children: /* @__PURE__ */ D("div", {
309
+ children: /* @__PURE__ */ k("div", {
310
310
  className: "text-center space-y-2",
311
311
  children: [
312
- /* @__PURE__ */ E("div", {
312
+ /* @__PURE__ */ O("div", {
313
313
  className: "size-12 mx-auto rounded-full bg-bg-sunken flex items-center justify-center",
314
- children: /* @__PURE__ */ E("svg", {
314
+ children: /* @__PURE__ */ O("svg", {
315
315
  className: "size-6 text-text-secondary",
316
316
  fill: "none",
317
317
  viewBox: "0 0 24 24",
318
318
  stroke: "currentColor",
319
- children: /* @__PURE__ */ E("path", {
319
+ children: /* @__PURE__ */ O("path", {
320
320
  strokeLinecap: "round",
321
321
  strokeLinejoin: "round",
322
322
  strokeWidth: 2,
@@ -324,11 +324,11 @@ var A = () => {
324
324
  })
325
325
  })
326
326
  }),
327
- /* @__PURE__ */ E("h2", {
327
+ /* @__PURE__ */ O("h2", {
328
328
  className: "text-lg font-semibold text-text-primary",
329
329
  children: t("billing.accessDenied.title", "Access Denied")
330
330
  }),
331
- /* @__PURE__ */ E("p", {
331
+ /* @__PURE__ */ O("p", {
332
332
  className: "text-sm text-text-secondary max-w-sm",
333
333
  children: t("billing.invoices.noViewPermission", "You don't have permission to view invoices.")
334
334
  })
@@ -336,7 +336,7 @@ var A = () => {
336
336
  })
337
337
  });
338
338
  }, j = ({ invoice: e, onView: n, onPay: r, onVoid: a, canPay: o, canVoid: d, isProcessing: _, processingAction: v, showAccount: y = !1, accountName: b }) => {
339
- let x = m(), C = p(), [w, T] = S(!1), [O, k] = S(!1), A = f(e.status), j = e.status === "OPEN", M = e.status === "DRAFT", N = async () => {
339
+ let x = m(), C = p(), [w, T] = S(!1), [E, D] = S(!1), A = f(e.status), j = e.status === "OPEN", M = e.status === "DRAFT", N = async () => {
340
340
  g("medium");
341
341
  let t = await h({
342
342
  title: "Void invoice",
@@ -346,103 +346,103 @@ var A = () => {
346
346
  });
347
347
  t === !0 ? await a(e) : t === null && T(!0);
348
348
  }, P = () => {
349
- C ? k(!0) : r(e);
349
+ C ? D(!0) : r(e);
350
350
  }, F = async () => {
351
- await r(e), k(!1);
351
+ await r(e), D(!1);
352
352
  }, I = async () => {
353
353
  await a(e), T(!1);
354
354
  }, L = e.metadata?.invoicePdfBackupUrl;
355
- return /* @__PURE__ */ D("tr", {
355
+ return /* @__PURE__ */ k("tr", {
356
356
  className: "hover:bg-bg-sunken transition-colors",
357
357
  children: [
358
- /* @__PURE__ */ D("td", {
358
+ /* @__PURE__ */ k("td", {
359
359
  className: "p-4",
360
- children: [e.invoiceUrl ? /* @__PURE__ */ E("a", {
360
+ children: [e.invoiceUrl ? /* @__PURE__ */ O("a", {
361
361
  href: e.invoiceUrl,
362
362
  target: "_blank",
363
363
  rel: "noopener noreferrer",
364
364
  className: "font-medium text-text-primary hover:text-text-link transition-colors",
365
365
  children: l(e.invoiceNumber)
366
- }) : /* @__PURE__ */ E("button", {
366
+ }) : /* @__PURE__ */ O("button", {
367
367
  type: "button",
368
368
  onClick: n,
369
369
  className: "font-medium text-text-primary hover:text-text-link transition-colors",
370
370
  children: l(e.invoiceNumber)
371
- }), (e.itemDescription ?? e.subscription?.plan?.name) && /* @__PURE__ */ E("p", {
371
+ }), (e.itemDescription ?? e.subscription?.plan?.name) && /* @__PURE__ */ O("p", {
372
372
  className: "text-sm text-text-secondary mt-0.5",
373
373
  children: e.itemDescription ?? e.subscription?.plan?.name
374
374
  })]
375
375
  }),
376
- /* @__PURE__ */ E("td", {
376
+ /* @__PURE__ */ O("td", {
377
377
  className: "p-4",
378
- children: /* @__PURE__ */ E(t, {
378
+ children: /* @__PURE__ */ O(t, {
379
379
  status: A,
380
380
  dot: !0,
381
381
  children: u(e.status)
382
382
  })
383
383
  }),
384
- y && /* @__PURE__ */ E("td", {
384
+ y && /* @__PURE__ */ O("td", {
385
385
  className: "p-4 hidden lg:table-cell",
386
- children: b ? /* @__PURE__ */ E("span", {
386
+ children: b ? /* @__PURE__ */ O("span", {
387
387
  className: "inline-flex items-center px-2 py-0.5 text-xs font-medium rounded-full bg-bg-sunken text-text-secondary border border-border-subtle",
388
388
  children: b
389
- }) : /* @__PURE__ */ E("span", {
389
+ }) : /* @__PURE__ */ O("span", {
390
390
  className: "text-sm text-text-secondary",
391
391
  children: ", "
392
392
  })
393
393
  }),
394
- /* @__PURE__ */ E("td", {
394
+ /* @__PURE__ */ O("td", {
395
395
  className: "p-4 text-sm text-text-secondary hidden sm:table-cell",
396
396
  children: c(e.createdAt, "short")
397
397
  }),
398
- /* @__PURE__ */ E("td", {
398
+ /* @__PURE__ */ O("td", {
399
399
  className: "p-4 text-sm text-text-secondary hidden md:table-cell",
400
400
  children: e.dueDate ? c(e.dueDate, "short") : "—"
401
401
  }),
402
- /* @__PURE__ */ E("td", {
402
+ /* @__PURE__ */ O("td", {
403
403
  className: "p-4 text-right font-medium text-text-primary",
404
404
  children: s(e.total, e.currency)
405
405
  }),
406
- /* @__PURE__ */ E("td", {
406
+ /* @__PURE__ */ O("td", {
407
407
  className: "p-4 text-right",
408
- children: /* @__PURE__ */ D("div", {
408
+ children: /* @__PURE__ */ k("div", {
409
409
  className: "relative flex items-center justify-end gap-2",
410
410
  children: [
411
- e.invoiceUrl ? /* @__PURE__ */ E("a", {
411
+ e.invoiceUrl ? /* @__PURE__ */ O("a", {
412
412
  href: e.invoiceUrl,
413
413
  target: "_blank",
414
414
  rel: "noopener noreferrer",
415
415
  className: "px-3 py-1.5 text-sm font-medium text-text-primary hover:bg-bg-sunken rounded-button transition-colors duration-200",
416
416
  children: x("billing.common.view", "View")
417
- }) : /* @__PURE__ */ E("button", {
417
+ }) : /* @__PURE__ */ O("button", {
418
418
  type: "button",
419
419
  onClick: n,
420
420
  className: "px-3 py-1.5 text-sm font-medium text-text-primary hover:bg-bg-sunken rounded-button transition-colors duration-200",
421
421
  children: x("billing.common.view", "View")
422
422
  }),
423
- e.pdfUrl && /* @__PURE__ */ E("a", {
423
+ e.pdfUrl && /* @__PURE__ */ O("a", {
424
424
  href: e.pdfUrl,
425
425
  target: "_blank",
426
426
  rel: "noopener noreferrer",
427
427
  className: "px-3 py-1.5 text-sm font-medium text-text-link hover:bg-[var(--color-accent-softHover)] rounded-button transition-colors duration-200",
428
428
  children: x("billing.common.pdf", "PDF")
429
429
  }),
430
- L && /* @__PURE__ */ E("a", {
430
+ L && /* @__PURE__ */ O("a", {
431
431
  href: L,
432
432
  target: "_blank",
433
433
  rel: "noopener noreferrer",
434
434
  className: "px-3 py-1.5 text-sm font-medium text-text-link hover:bg-[var(--color-accent-softHover)] rounded-button transition-colors duration-200",
435
435
  children: x("billing.common.pdfBackup", "PDF (backup)")
436
436
  }),
437
- j && o && /* @__PURE__ */ E("button", {
437
+ j && o && /* @__PURE__ */ O("button", {
438
438
  type: "button",
439
439
  onClick: P,
440
440
  disabled: _,
441
441
  className: "px-3 py-1.5 text-sm font-medium bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover transition-colors duration-200 disabled:cursor-not-allowed disabled:opacity-50",
442
442
  children: _ && v === "pay" ? x("billing.common.paying", "Paying…") : x("billing.common.pay", "Pay")
443
443
  }),
444
- C && /* @__PURE__ */ E(i, {
445
- open: O,
444
+ C && /* @__PURE__ */ O(i, {
445
+ open: E,
446
446
  title: x("billing.invoices.payReview.title", "Review and pay"),
447
447
  description: x("billing.invoices.payReview.description", "Your default card is charged as soon as you confirm."),
448
448
  details: [
@@ -467,28 +467,28 @@ var A = () => {
467
467
  busyLabel: x("billing.common.paying", "Paying…"),
468
468
  isBusy: _ && v === "pay",
469
469
  onConfirm: () => void F(),
470
- onCancel: () => k(!1)
470
+ onCancel: () => D(!1)
471
471
  }),
472
- (j || M) && d && /* @__PURE__ */ E("button", {
472
+ (j || M) && d && /* @__PURE__ */ O("button", {
473
473
  type: "button",
474
474
  onClick: () => void N(),
475
475
  disabled: _,
476
476
  className: "px-3 py-1.5 text-sm font-medium text-status-error-text hover:bg-status-error-bg-subtle rounded-button transition-colors duration-200 disabled:cursor-not-allowed disabled:opacity-50",
477
477
  children: _ && v === "void" ? x("billing.common.voiding", "Voiding…") : x("billing.common.void", "Void")
478
478
  }),
479
- w && /* @__PURE__ */ D("div", {
479
+ w && /* @__PURE__ */ k("div", {
480
480
  className: "absolute right-4 mt-12 z-10 w-64 rounded-card border border-status-error-border bg-bg-elevated p-3 text-left shadow-elevation-2",
481
- children: [/* @__PURE__ */ E("p", {
481
+ children: [/* @__PURE__ */ O("p", {
482
482
  className: "text-sm font-medium text-text-primary",
483
483
  children: "Void this invoice?"
484
- }), /* @__PURE__ */ D("div", {
484
+ }), /* @__PURE__ */ k("div", {
485
485
  className: "mt-3 flex justify-end gap-2",
486
- children: [/* @__PURE__ */ E("button", {
486
+ children: [/* @__PURE__ */ O("button", {
487
487
  type: "button",
488
488
  onClick: () => T(!1),
489
489
  className: "rounded-button border border-border-subtle bg-bg-surface px-2.5 py-1.5 text-xs font-medium text-text-primary hover:bg-bg-sunken",
490
490
  children: "Cancel"
491
- }), /* @__PURE__ */ E("button", {
491
+ }), /* @__PURE__ */ O("button", {
492
492
  type: "button",
493
493
  onClick: () => void I(),
494
494
  disabled: _,