@carlonicora/nextjs-jsonapi 6.29.1 → 6.31.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/dist/{BlockNoteEditor-K4HWQLPJ.js → BlockNoteEditor-ICGGCW6N.js} +24 -24
  2. package/dist/{BlockNoteEditor-K4HWQLPJ.js.map → BlockNoteEditor-ICGGCW6N.js.map} +1 -1
  3. package/dist/{BlockNoteEditor-TDX2RC7I.mjs → BlockNoteEditor-O4E67ECL.mjs} +4 -4
  4. package/dist/{BlockNoteViewer-76CKL6W5.mjs → BlockNoteViewer-BNZEXGVT.mjs} +2 -2
  5. package/dist/{BlockNoteViewer-B25WKYQP.js → BlockNoteViewer-YONLBNXW.js} +3 -3
  6. package/dist/{BlockNoteViewer-B25WKYQP.js.map → BlockNoteViewer-YONLBNXW.js.map} +1 -1
  7. package/dist/billing/index.js +465 -465
  8. package/dist/billing/index.mjs +3 -3
  9. package/dist/{chunk-77JC2UCF.js → chunk-5XP5G45B.js} +23 -10
  10. package/dist/chunk-5XP5G45B.js.map +1 -0
  11. package/dist/{chunk-OVSR72CZ.mjs → chunk-BT3VFB3I.mjs} +333 -299
  12. package/dist/chunk-BT3VFB3I.mjs.map +1 -0
  13. package/dist/{chunk-7MGXQIEP.mjs → chunk-FDKAVSZ6.mjs} +2 -2
  14. package/dist/{chunk-FJUKLVVX.mjs → chunk-HNK2O6YE.mjs} +23 -10
  15. package/dist/chunk-HNK2O6YE.mjs.map +1 -0
  16. package/dist/{chunk-M7YK5CCE.mjs → chunk-JL6XL5NK.mjs} +9 -2
  17. package/dist/chunk-JL6XL5NK.mjs.map +1 -0
  18. package/dist/{chunk-QI4SCGPB.js → chunk-M7FA63QE.js} +803 -769
  19. package/dist/chunk-M7FA63QE.js.map +1 -0
  20. package/dist/{chunk-F3EVYBMA.js → chunk-NQL2NDKH.js} +4 -4
  21. package/dist/{chunk-F3EVYBMA.js.map → chunk-NQL2NDKH.js.map} +1 -1
  22. package/dist/{chunk-ONU4WCDG.js → chunk-Q5SMFSE4.js} +11 -4
  23. package/dist/chunk-Q5SMFSE4.js.map +1 -0
  24. package/dist/client/index.js +4 -4
  25. package/dist/client/index.mjs +3 -3
  26. package/dist/components/forms/CommonEditorButtons.d.ts.map +1 -1
  27. package/dist/components/index.js +4 -4
  28. package/dist/components/index.mjs +3 -3
  29. package/dist/contexts/index.js +4 -4
  30. package/dist/contexts/index.mjs +3 -3
  31. package/dist/core/index.js +2 -2
  32. package/dist/core/index.mjs +1 -1
  33. package/dist/email-automations/index.js +105 -105
  34. package/dist/email-automations/index.mjs +3 -3
  35. package/dist/features/analytics/index.js +114 -114
  36. package/dist/features/analytics/index.mjs +3 -3
  37. package/dist/features/analytics/server.js +4 -4
  38. package/dist/features/analytics/server.mjs +2 -2
  39. package/dist/features/auth/components/GdprConsentSection.d.ts +2 -1
  40. package/dist/features/auth/components/GdprConsentSection.d.ts.map +1 -1
  41. package/dist/features/auth/components/forms/Login.d.ts.map +1 -1
  42. package/dist/features/auth/components/forms/Register.d.ts.map +1 -1
  43. package/dist/features/auth/data/auth.service.d.ts +8 -3
  44. package/dist/features/auth/data/auth.service.d.ts.map +1 -1
  45. package/dist/features/auth/data/pending-registration.d.ts +2 -0
  46. package/dist/features/auth/data/pending-registration.d.ts.map +1 -1
  47. package/dist/features/auth/data/pending-registration.interface.d.ts +1 -0
  48. package/dist/features/auth/data/pending-registration.interface.d.ts.map +1 -1
  49. package/dist/features/auth/hooks/useCompleteLogin.d.ts +9 -0
  50. package/dist/features/auth/hooks/useCompleteLogin.d.ts.map +1 -0
  51. package/dist/features/blog/index.js +129 -129
  52. package/dist/features/blog/index.mjs +3 -3
  53. package/dist/features/blog/server.js +7 -7
  54. package/dist/features/blog/server.mjs +1 -1
  55. package/dist/features/help/index.js +37 -37
  56. package/dist/features/help/index.mjs +3 -3
  57. package/dist/features/tokenusage/index.js +114 -114
  58. package/dist/features/tokenusage/index.mjs +3 -3
  59. package/dist/index.js +3 -3
  60. package/dist/index.mjs +2 -2
  61. package/dist/login/config.d.ts +3 -0
  62. package/dist/login/config.d.ts.map +1 -1
  63. package/dist/login/index.d.ts +1 -1
  64. package/dist/login/index.d.ts.map +1 -1
  65. package/dist/server/index.js +3 -3
  66. package/dist/server/index.mjs +2 -2
  67. package/messages/en.json +1 -0
  68. package/messages/it.json +1 -0
  69. package/package.json +1 -1
  70. package/src/components/forms/CommonEditorButtons.tsx +16 -2
  71. package/src/features/auth/components/GdprConsentSection.tsx +3 -1
  72. package/src/features/auth/components/forms/Login.tsx +4 -32
  73. package/src/features/auth/components/forms/Register.tsx +66 -36
  74. package/src/features/auth/data/__tests__/auth.oauth-completion.spec.ts +44 -0
  75. package/src/features/auth/data/__tests__/pending-registration.spec.ts +8 -0
  76. package/src/features/auth/data/auth.service.ts +21 -15
  77. package/src/features/auth/data/pending-registration.interface.ts +1 -0
  78. package/src/features/auth/data/pending-registration.ts +6 -0
  79. package/src/features/auth/hooks/__tests__/useCompleteLogin.spec.tsx +85 -0
  80. package/src/features/auth/hooks/useCompleteLogin.ts +47 -0
  81. package/src/login/__tests__/config.spec.ts +21 -0
  82. package/src/login/config.ts +8 -0
  83. package/src/login/index.ts +1 -0
  84. package/dist/chunk-77JC2UCF.js.map +0 -1
  85. package/dist/chunk-FJUKLVVX.mjs.map +0 -1
  86. package/dist/chunk-M7YK5CCE.mjs.map +0 -1
  87. package/dist/chunk-ONU4WCDG.js.map +0 -1
  88. package/dist/chunk-OVSR72CZ.mjs.map +0 -1
  89. package/dist/chunk-QI4SCGPB.js.map +0 -1
  90. /package/dist/{BlockNoteEditor-TDX2RC7I.mjs.map → BlockNoteEditor-O4E67ECL.mjs.map} +0 -0
  91. /package/dist/{BlockNoteViewer-76CKL6W5.mjs.map → BlockNoteViewer-BNZEXGVT.mjs.map} +0 -0
  92. /package/dist/{chunk-7MGXQIEP.mjs.map → chunk-FDKAVSZ6.mjs.map} +0 -0
@@ -81,12 +81,12 @@
81
81
 
82
82
 
83
83
 
84
- var _chunkQI4SCGPBjs = require('../chunk-QI4SCGPB.js');
84
+ var _chunkM7FA63QEjs = require('../chunk-M7FA63QE.js');
85
85
  require('../chunk-SYMI4IDW.js');
86
86
  require('../chunk-3EPNHTMH.js');
87
87
 
88
88
 
89
- var _chunkONU4WCDGjs = require('../chunk-ONU4WCDG.js');
89
+ var _chunkQ5SMFSE4js = require('../chunk-Q5SMFSE4.js');
90
90
 
91
91
 
92
92
  var _chunkG4JR3SFVjs = require('../chunk-G4JR3SFV.js');
@@ -112,7 +112,7 @@ var _chunkG4JR3SFVjs = require('../chunk-G4JR3SFV.js');
112
112
 
113
113
 
114
114
 
115
- var _chunk77JC2UCFjs = require('../chunk-77JC2UCF.js');
115
+ var _chunk5XP5G45Bjs = require('../chunk-5XP5G45B.js');
116
116
 
117
117
 
118
118
  var _chunkHROKKUBQjs = require('../chunk-HROKKUBQ.js');
@@ -137,7 +137,7 @@ var _chunk7QVYU63Ejs = require('../chunk-7QVYU63E.js');
137
137
  var _nextintl = require('next-intl');
138
138
  var _lucidereact = require('lucide-react');
139
139
  var _jsxruntime = require('react/jsx-runtime');
140
- var SUBSCRIPTION_STATUSES = Object.values(_chunk77JC2UCFjs.SubscriptionStatus);
140
+ var SUBSCRIPTION_STATUSES = Object.values(_chunk5XP5G45Bjs.SubscriptionStatus);
141
141
  function getStatusBadgeVariant(status) {
142
142
  switch (status) {
143
143
  case "active" /* ACTIVE */:
@@ -169,43 +169,43 @@ function SubscriptionSummaryCard({
169
169
  onManageClick
170
170
  }) {
171
171
  const t = _nextintl.useTranslations.call(void 0, );
172
- const fmt = _chunkQI4SCGPBjs.useBillingFormatOptions.call(void 0, );
172
+ const fmt = _chunkM7FA63QEjs.useBillingFormatOptions.call(void 0, );
173
173
  if (loading) {
174
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.Card, { children: [
175
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
176
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.CardTitle, { children: t("billing.ui.subscriptions.title") }),
174
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.Card, { children: [
175
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
176
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.CardTitle, { children: t("billing.ui.subscriptions.title") }),
177
177
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CreditCard, { className: "h-4 w-4 text-muted-foreground" })
178
178
  ] }),
179
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.CardContent, { children: [
180
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Skeleton, { className: "h-6 w-32 mb-2" }),
181
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Skeleton, { className: "h-4 w-24 mb-1" }),
182
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Skeleton, { className: "h-4 w-40" })
179
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.CardContent, { children: [
180
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Skeleton, { className: "h-6 w-32 mb-2" }),
181
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Skeleton, { className: "h-4 w-24 mb-1" }),
182
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Skeleton, { className: "h-4 w-40" })
183
183
  ] })
184
184
  ] });
185
185
  }
186
186
  if (error) {
187
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.Card, { children: [
188
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
189
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.CardTitle, { children: t("billing.ui.subscriptions.title") }),
187
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.Card, { children: [
188
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
189
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.CardTitle, { children: t("billing.ui.subscriptions.title") }),
190
190
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CreditCard, { className: "h-4 w-4 text-muted-foreground" })
191
191
  ] }),
192
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) })
192
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) })
193
193
  ] });
194
194
  }
195
195
  const activeSubscriptions = subscriptions.filter(
196
196
  (sub) => sub.status === "active" /* ACTIVE */ || sub.status === "trialing" /* TRIALING */ || sub.status === "past_due" /* PAST_DUE */
197
197
  );
198
198
  const primarySubscription = activeSubscriptions[0];
199
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.Card, { className: "cursor-pointer hover:bg-accent/50 transition-colors", onClick: onManageClick, children: [
200
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
201
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.CardTitle, { children: t("billing.ui.subscriptions.title") }),
199
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.Card, { className: "cursor-pointer hover:bg-accent/50 transition-colors", onClick: onManageClick, children: [
200
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
201
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.CardTitle, { children: t("billing.ui.subscriptions.title") }),
202
202
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CreditCard, { className: "h-4 w-4 text-muted-foreground" })
203
203
  ] }),
204
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.CardContent, { children: !primarySubscription ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
204
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.CardContent, { children: !primarySubscription ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
205
205
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xl font-bold text-muted-foreground", children: t("billing.ui.cards.subscriptions.empty_title") }),
206
206
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs text-muted-foreground", children: t("billing.ui.cards.subscriptions.empty_description") }),
207
207
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
208
- _chunkQI4SCGPBjs.Button,
208
+ _chunkM7FA63QEjs.Button,
209
209
  {
210
210
  variant: "outline",
211
211
  size: "sm",
@@ -223,8 +223,8 @@ function SubscriptionSummaryCard({
223
223
  ] }) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
224
224
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2", children: [
225
225
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xl font-bold", children: formatPlanName(primarySubscription, t("billing.ui.cards.subscriptions.fallback_name")) }),
226
- primarySubscription.status === "past_due" /* PAST_DUE */ ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Badge, { variant: "softRed", children: t("billing.ui.cards.subscriptions.payment_failing") }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
227
- _chunkQI4SCGPBjs.Badge,
226
+ primarySubscription.status === "past_due" /* PAST_DUE */ ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Badge, { variant: "softRed", children: t("billing.ui.cards.subscriptions.payment_failing") }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
227
+ _chunkM7FA63QEjs.Badge,
228
228
  {
229
229
  variant: primarySubscription.cancelAtPeriodEnd ? "secondary" : getStatusBadgeVariant(primarySubscription.status),
230
230
  children: primarySubscription.cancelAtPeriodEnd ? t("billing.ui.cards.subscriptions.canceling") : SUBSCRIPTION_STATUSES.includes(primarySubscription.status) ? t(`billing.ui.subscription_status.${primarySubscription.status}`) : primarySubscription.status
@@ -232,11 +232,11 @@ function SubscriptionSummaryCard({
232
232
  )
233
233
  ] }),
234
234
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs text-muted-foreground", children: !_optionalChain([primarySubscription, 'access', _8 => _8.price, 'optionalAccess', _9 => _9.isTrial]) ? t("billing.ui.cards.subscriptions.ends_on", {
235
- date: _chunkQI4SCGPBjs.formatDate.call(void 0, primarySubscription.currentPeriodEnd, fmt)
235
+ date: _chunkM7FA63QEjs.formatDate.call(void 0, primarySubscription.currentPeriodEnd, fmt)
236
236
  }) : primarySubscription.cancelAtPeriodEnd ? t("billing.ui.cards.subscriptions.cancels_on", {
237
- date: _chunkQI4SCGPBjs.formatDate.call(void 0, primarySubscription.currentPeriodEnd, fmt)
237
+ date: _chunkM7FA63QEjs.formatDate.call(void 0, primarySubscription.currentPeriodEnd, fmt)
238
238
  }) : t("billing.ui.cards.subscriptions.renews_on", {
239
- date: _chunkQI4SCGPBjs.formatDate.call(void 0, primarySubscription.currentPeriodEnd, fmt)
239
+ date: _chunkM7FA63QEjs.formatDate.call(void 0, primarySubscription.currentPeriodEnd, fmt)
240
240
  }) }),
241
241
  activeSubscriptions.length > 1 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs text-muted-foreground", children: t("billing.ui.cards.subscriptions.more", { count: activeSubscriptions.length - 1 }) })
242
242
  ] }) })
@@ -270,37 +270,37 @@ function PaymentMethodSummaryCard({
270
270
  }) {
271
271
  const t = _nextintl.useTranslations.call(void 0, );
272
272
  if (loading) {
273
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.Card, { children: [
274
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
275
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.CardTitle, { children: t("billing.ui.payment_method.title") }),
273
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.Card, { children: [
274
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
275
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.CardTitle, { children: t("billing.ui.payment_method.title") }),
276
276
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Wallet, { className: "h-4 w-4 text-muted-foreground" })
277
277
  ] }),
278
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.CardContent, { children: [
279
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Skeleton, { className: "h-6 w-32 mb-2" }),
280
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Skeleton, { className: "h-4 w-24" })
278
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.CardContent, { children: [
279
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Skeleton, { className: "h-6 w-32 mb-2" }),
280
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Skeleton, { className: "h-4 w-24" })
281
281
  ] })
282
282
  ] });
283
283
  }
284
284
  if (error) {
285
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.Card, { children: [
286
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
287
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.CardTitle, { children: t("billing.ui.payment_method.title") }),
285
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.Card, { children: [
286
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
287
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.CardTitle, { children: t("billing.ui.payment_method.title") }),
288
288
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Wallet, { className: "h-4 w-4 text-muted-foreground" })
289
289
  ] }),
290
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) })
290
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) })
291
291
  ] });
292
292
  }
293
293
  const defaultMethod = paymentMethods.find((pm) => pm.id === defaultPaymentMethodId) || paymentMethods[0];
294
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.Card, { className: "cursor-pointer hover:bg-accent/50 transition-colors", onClick: onManageClick, children: [
295
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
296
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.CardTitle, { children: t("billing.ui.payment_method.title") }),
294
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.Card, { className: "cursor-pointer hover:bg-accent/50 transition-colors", onClick: onManageClick, children: [
295
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
296
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.CardTitle, { children: t("billing.ui.payment_method.title") }),
297
297
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Wallet, { className: "h-4 w-4 text-muted-foreground" })
298
298
  ] }),
299
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.CardContent, { children: paymentMethods.length === 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
299
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.CardContent, { children: paymentMethods.length === 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
300
300
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xl font-bold text-muted-foreground", children: t("billing.ui.cards.payment_method.empty_title") }),
301
301
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs text-muted-foreground", children: t("billing.ui.cards.payment_method.empty_description") }),
302
302
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
303
- _chunkQI4SCGPBjs.Button,
303
+ _chunkM7FA63QEjs.Button,
304
304
  {
305
305
  variant: "outline",
306
306
  size: "sm",
@@ -355,7 +355,7 @@ function CustomerInfoCard({ customer, loading, error }) {
355
355
  e.stopPropagation();
356
356
  setPortalLoading(true);
357
357
  try {
358
- const { url } = await _chunk77JC2UCFjs.StripeCustomerService.createPortalSession();
358
+ const { url } = await _chunk5XP5G45Bjs.StripeCustomerService.createPortalSession();
359
359
  window.open(url, "_blank");
360
360
  } catch (err) {
361
361
  console.error("[CustomerInfoCard] Failed to create portal session:", err);
@@ -364,45 +364,45 @@ function CustomerInfoCard({ customer, loading, error }) {
364
364
  }
365
365
  }, "handlePortalClick");
366
366
  if (loading) {
367
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.Card, { children: [
368
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
369
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.CardTitle, { children: t("billing.ui.cards.customer.title") }),
367
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.Card, { children: [
368
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
369
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.CardTitle, { children: t("billing.ui.cards.customer.title") }),
370
370
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.User, { className: "h-4 w-4 text-muted-foreground" })
371
371
  ] }),
372
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.CardContent, { children: [
373
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Skeleton, { className: "h-6 w-32 mb-2" }),
374
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Skeleton, { className: "h-4 w-48 mb-1" }),
375
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Skeleton, { className: "h-4 w-24" })
372
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.CardContent, { children: [
373
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Skeleton, { className: "h-6 w-32 mb-2" }),
374
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Skeleton, { className: "h-4 w-48 mb-1" }),
375
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Skeleton, { className: "h-4 w-24" })
376
376
  ] })
377
377
  ] });
378
378
  }
379
379
  if (error) {
380
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.Card, { children: [
381
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
382
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.CardTitle, { children: t("billing.ui.cards.customer.title") }),
380
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.Card, { children: [
381
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
382
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.CardTitle, { children: t("billing.ui.cards.customer.title") }),
383
383
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.User, { className: "h-4 w-4 text-muted-foreground" })
384
384
  ] }),
385
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) })
385
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) })
386
386
  ] });
387
387
  }
388
388
  if (!customer) {
389
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.Card, { children: [
390
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
391
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.CardTitle, { children: t("billing.ui.cards.customer.title") }),
389
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.Card, { children: [
390
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
391
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.CardTitle, { children: t("billing.ui.cards.customer.title") }),
392
392
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.User, { className: "h-4 w-4 text-muted-foreground" })
393
393
  ] }),
394
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.CardContent, { children: [
394
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.CardContent, { children: [
395
395
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xl font-bold text-muted-foreground", children: t("billing.ui.cards.customer.not_set_up") }),
396
396
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs text-muted-foreground", children: t("billing.ui.cards.customer.not_set_up_description") })
397
397
  ] })
398
398
  ] });
399
399
  }
400
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.Card, { children: [
401
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
402
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.CardTitle, { children: t("billing.ui.cards.customer.title") }),
400
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.Card, { children: [
401
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
402
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.CardTitle, { children: t("billing.ui.cards.customer.title") }),
403
403
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.User, { className: "h-4 w-4 text-muted-foreground" })
404
404
  ] }),
405
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
405
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
406
406
  customer.name && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xl font-bold", children: customer.name }),
407
407
  customer.email && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-muted-foreground", children: customer.email }),
408
408
  customer.balance !== void 0 && customer.balance !== 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "p", { className: "text-sm", children: [
@@ -412,7 +412,7 @@ function CustomerInfoCard({ customer, loading, error }) {
412
412
  ] }),
413
413
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: customer.balance < 0 ? "text-success" : "text-destructive", children: formatBalance(customer.balance, customer.currency, locale) })
414
414
  ] }),
415
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.Button, { variant: "outline", size: "sm", className: "mt-2", onClick: handlePortalClick, disabled: portalLoading, children: [
415
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.Button, { variant: "outline", size: "sm", className: "mt-2", onClick: handlePortalClick, disabled: portalLoading, children: [
416
416
  portalLoading ? t("common.loading") : t("billing.ui.cards.customer.manage_portal"),
417
417
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ExternalLink, { className: "h-4 w-4 ms-1" })
418
418
  ] })
@@ -425,7 +425,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, CustomerInfoCard, "CustomerInfoCard");
425
425
 
426
426
 
427
427
 
428
- var INVOICE_STATUSES = Object.values(_chunk77JC2UCFjs.InvoiceStatus);
428
+ var INVOICE_STATUSES = Object.values(_chunk5XP5G45Bjs.InvoiceStatus);
429
429
  function getStatusBadgeVariant2(status) {
430
430
  switch (status) {
431
431
  case "paid" /* PAID */:
@@ -450,46 +450,46 @@ function formatAmount(amount, currency, locale) {
450
450
  _chunk7QVYU63Ejs.__name.call(void 0, formatAmount, "formatAmount");
451
451
  function InvoicesSummaryCard({ invoices, loading, error, onViewAllClick }) {
452
452
  const t = _nextintl.useTranslations.call(void 0, );
453
- const fmt = _chunkQI4SCGPBjs.useBillingFormatOptions.call(void 0, );
453
+ const fmt = _chunkM7FA63QEjs.useBillingFormatOptions.call(void 0, );
454
454
  if (loading) {
455
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.Card, { children: [
456
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
457
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.CardTitle, { children: t("billing.ui.cards.invoices.title") }),
455
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.Card, { children: [
456
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
457
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.CardTitle, { children: t("billing.ui.cards.invoices.title") }),
458
458
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ReceiptIcon, { className: "h-4 w-4 text-muted-foreground" })
459
459
  ] }),
460
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.CardContent, { children: [
461
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Skeleton, { className: "h-6 w-24 mb-2" }),
462
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Skeleton, { className: "h-4 w-32 mb-1" }),
463
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Skeleton, { className: "h-4 w-20" })
460
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.CardContent, { children: [
461
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Skeleton, { className: "h-6 w-24 mb-2" }),
462
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Skeleton, { className: "h-4 w-32 mb-1" }),
463
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Skeleton, { className: "h-4 w-20" })
464
464
  ] })
465
465
  ] });
466
466
  }
467
467
  if (error) {
468
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.Card, { children: [
469
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
470
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.CardTitle, { children: t("billing.ui.cards.invoices.title") }),
468
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.Card, { children: [
469
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
470
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.CardTitle, { children: t("billing.ui.cards.invoices.title") }),
471
471
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ReceiptIcon, { className: "h-4 w-4 text-muted-foreground" })
472
472
  ] }),
473
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) })
473
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) })
474
474
  ] });
475
475
  }
476
476
  const latestInvoice = _nullishCoalesce(invoices.find((inv) => inv.status !== "void" /* VOID */), () => ( invoices[0]));
477
477
  const paidInvoices = invoices.filter((inv) => inv.status === "paid" /* PAID */);
478
478
  const openInvoices = invoices.filter((inv) => inv.status === "open" /* OPEN */);
479
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.Card, { className: "cursor-pointer hover:bg-accent/50 transition-colors", onClick: onViewAllClick, children: [
480
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
481
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.CardTitle, { children: t("billing.ui.cards.invoices.title") }),
479
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.Card, { className: "cursor-pointer hover:bg-accent/50 transition-colors", onClick: onViewAllClick, children: [
480
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
481
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.CardTitle, { children: t("billing.ui.cards.invoices.title") }),
482
482
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ReceiptIcon, { className: "h-4 w-4 text-muted-foreground" })
483
483
  ] }),
484
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.CardContent, { children: invoices.length === 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
484
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.CardContent, { children: invoices.length === 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
485
485
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xl font-bold text-muted-foreground", children: t("billing.ui.invoices.empty_title") }),
486
486
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs text-muted-foreground", children: t("billing.ui.cards.invoices.empty_description") })
487
487
  ] }) : latestInvoice ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
488
488
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2", children: [
489
489
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xl font-bold", children: formatAmount(latestInvoice.total, latestInvoice.currency, fmt.locale) }),
490
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Badge, { variant: getStatusBadgeVariant2(latestInvoice.status), children: INVOICE_STATUSES.includes(latestInvoice.status) ? t(`billing.ui.invoice_status.${latestInvoice.status}`) : latestInvoice.status })
490
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Badge, { variant: getStatusBadgeVariant2(latestInvoice.status), children: INVOICE_STATUSES.includes(latestInvoice.status) ? t(`billing.ui.invoice_status.${latestInvoice.status}`) : latestInvoice.status })
491
491
  ] }),
492
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-muted-foreground", children: latestInvoice.stripeInvoiceNumber || t("billing.ui.cards.invoices.invoice_from", { date: _chunkQI4SCGPBjs.formatDate.call(void 0, latestInvoice.periodStart, fmt) }) }),
492
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-muted-foreground", children: latestInvoice.stripeInvoiceNumber || t("billing.ui.cards.invoices.invoice_from", { date: _chunkM7FA63QEjs.formatDate.call(void 0, latestInvoice.periodStart, fmt) }) }),
493
493
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-4 text-xs text-muted-foreground", children: [
494
494
  paidInvoices.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: t("billing.ui.cards.invoices.paid_count", { count: paidInvoices.length }) }),
495
495
  openInvoices.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-warning", children: t("billing.ui.cards.invoices.open_count", { count: openInvoices.length }) }),
@@ -524,24 +524,24 @@ function BillingUsageSummaryCard({
524
524
  const t = _nextintl.useTranslations.call(void 0, );
525
525
  const locale = _chunkNP3AFULUjs.useI18nLocale.call(void 0, );
526
526
  if (loading) {
527
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.Card, { children: [
528
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
529
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.CardTitle, { children: t("billing.ui.cards.usage.title") }),
527
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.Card, { children: [
528
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
529
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.CardTitle, { children: t("billing.ui.cards.usage.title") }),
530
530
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Activity, { className: "h-4 w-4 text-muted-foreground" })
531
531
  ] }),
532
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.CardContent, { children: [
533
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Skeleton, { className: "h-6 w-24 mb-2" }),
534
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Skeleton, { className: "h-4 w-32" })
532
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.CardContent, { children: [
533
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Skeleton, { className: "h-6 w-24 mb-2" }),
534
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Skeleton, { className: "h-4 w-32" })
535
535
  ] })
536
536
  ] });
537
537
  }
538
538
  if (error) {
539
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.Card, { children: [
540
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
541
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.CardTitle, { children: t("billing.ui.cards.usage.title") }),
539
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.Card, { children: [
540
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
541
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.CardTitle, { children: t("billing.ui.cards.usage.title") }),
542
542
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Activity, { className: "h-4 w-4 text-muted-foreground" })
543
543
  ] }),
544
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) })
544
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) })
545
545
  ] });
546
546
  }
547
547
  const totalUsage = Object.values(summaries).reduce((acc, summary) => {
@@ -549,12 +549,12 @@ function BillingUsageSummaryCard({
549
549
  }, 0);
550
550
  const primaryMeter = meters.find((m) => _optionalChain([summaries, 'access', _17 => _17[m.id], 'optionalAccess', _18 => _18.aggregatedValue]));
551
551
  const primarySummary = primaryMeter ? summaries[primaryMeter.id] : null;
552
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.Card, { className: "cursor-pointer hover:bg-accent/50 transition-colors", onClick: onViewDetailsClick, children: [
553
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
554
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.CardTitle, { children: t("billing.ui.cards.usage.title") }),
552
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.Card, { className: "cursor-pointer hover:bg-accent/50 transition-colors", onClick: onViewDetailsClick, children: [
553
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
554
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.CardTitle, { children: t("billing.ui.cards.usage.title") }),
555
555
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Activity, { className: "h-4 w-4 text-muted-foreground" })
556
556
  ] }),
557
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.CardContent, { children: meters.length === 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
557
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.CardContent, { children: meters.length === 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
558
558
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xl font-bold text-muted-foreground", children: t("billing.ui.cards.usage.no_meters") }),
559
559
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs text-muted-foreground", children: t("billing.ui.cards.usage.no_meters_description") })
560
560
  ] }) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
@@ -611,7 +611,7 @@ function PaymentMethodForm({
611
611
  const fetchSetupIntent = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
612
612
  setLoading(true);
613
613
  try {
614
- const intent = await _chunk77JC2UCFjs.StripeCustomerService.createSetupIntent();
614
+ const intent = await _chunk5XP5G45Bjs.StripeCustomerService.createSetupIntent();
615
615
  setSetupIntent(intent);
616
616
  } catch (err) {
617
617
  console.error("[PaymentMethodForm] Failed to create setup intent:", err);
@@ -649,7 +649,7 @@ function PaymentMethodForm({
649
649
  return;
650
650
  }
651
651
  if ((alwaysSetDefault || setAsDefault) && _optionalChain([confirmedSetupIntent, 'optionalAccess', _19 => _19.payment_method])) {
652
- await _chunk77JC2UCFjs.StripeCustomerService.setDefaultPaymentMethod({
652
+ await _chunk5XP5G45Bjs.StripeCustomerService.setDefaultPaymentMethod({
653
653
  paymentMethodId: typeof confirmedSetupIntent.payment_method === "string" ? confirmedSetupIntent.payment_method : confirmedSetupIntent.payment_method.id
654
654
  });
655
655
  }
@@ -665,7 +665,7 @@ function PaymentMethodForm({
665
665
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex items-center justify-center py-8", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground", children: t("billing.ui.payment_form.loading") }) });
666
666
  }
667
667
  if (!setupIntent && error) {
668
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Alert, { variant: "destructive", className: "bg-red-50 border-red-200", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.AlertDescription, { children: error }) });
668
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Alert, { variant: "destructive", className: "bg-red-50 border-red-200", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.AlertDescription, { children: error }) });
669
669
  }
670
670
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: handleSubmit, className: "flex flex-col gap-y-4", children: [
671
671
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rounded-md border border-gray-300 p-3", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -689,19 +689,19 @@ function PaymentMethodForm({
689
689
  ) }),
690
690
  !alwaysSetDefault && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-x-2", children: [
691
691
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
692
- _chunkQI4SCGPBjs.Checkbox,
692
+ _chunkM7FA63QEjs.Checkbox,
693
693
  {
694
694
  id: "setAsDefault",
695
695
  checked: setAsDefault,
696
696
  onCheckedChange: (checked) => setSetAsDefault(!!checked)
697
697
  }
698
698
  ),
699
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Label, { htmlFor: "setAsDefault", className: "cursor-pointer font-normal", children: t("billing.ui.payment_form.set_default") })
699
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Label, { htmlFor: "setAsDefault", className: "cursor-pointer font-normal", children: t("billing.ui.payment_form.set_default") })
700
700
  ] }),
701
- error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Alert, { variant: "destructive", className: "bg-red-50 border-red-200", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.AlertDescription, { children: error }) }),
701
+ error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Alert, { variant: "destructive", className: "bg-red-50 border-red-200", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.AlertDescription, { children: error }) }),
702
702
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-end gap-x-2", children: [
703
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Button, { type: "button", variant: "outline", onClick: onCancel, disabled: isSubmitting || isLoading, children: t("ui.buttons.cancel") }),
704
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Button, { type: "submit", disabled: !stripe || isSubmitting || isLoading, children: isSubmitting ? t("billing.ui.wizard.review.processing") : t("billing.ui.cards.payment_method.add_card") })
703
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Button, { type: "button", variant: "outline", onClick: onCancel, disabled: isSubmitting || isLoading, children: t("ui.buttons.cancel") }),
704
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Button, { type: "submit", disabled: !stripe || isSubmitting || isLoading, children: isSubmitting ? t("billing.ui.wizard.review.processing") : t("billing.ui.cards.payment_method.add_card") })
705
705
  ] })
706
706
  ] });
707
707
  }
@@ -718,10 +718,10 @@ function PaymentMethodEditor({ open, onOpenChange, onSuccess }) {
718
718
  const handleCancel = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
719
719
  onOpenChange(false);
720
720
  }, "handleCancel");
721
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.DialogContent, { className: "max-w-md", children: [
722
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.DialogHeader, { children: [
723
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.DialogTitle, { children: t("billing.ui.payment_methods.add") }),
724
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.DialogDescription, { children: t("billing.ui.payment_methods.add_description") })
721
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.DialogContent, { className: "max-w-md", children: [
722
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.DialogHeader, { children: [
723
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.DialogTitle, { children: t("billing.ui.payment_methods.add") }),
724
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.DialogDescription, { children: t("billing.ui.payment_methods.add_description") })
725
725
  ] }),
726
726
  open && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PaymentMethodForm, { onSuccess: handleSuccess, onCancel: handleCancel })
727
727
  ] }) });
@@ -747,7 +747,7 @@ function PaymentMethodCard({ paymentMethod, onUpdate }) {
747
747
  _react.useEffect.call(void 0, () => {
748
748
  const loadCustomer = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
749
749
  try {
750
- const fetchedCustomer = await _chunk77JC2UCFjs.StripeCustomerService.getCustomer();
750
+ const fetchedCustomer = await _chunk5XP5G45Bjs.StripeCustomerService.getCustomer();
751
751
  setCustomer(fetchedCustomer);
752
752
  } catch (error) {
753
753
  console.error("[PaymentMethodCard] Failed to load customer:", error);
@@ -764,7 +764,7 @@ function PaymentMethodCard({ paymentMethod, onUpdate }) {
764
764
  const handleSetDefault = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
765
765
  setLoading(true);
766
766
  try {
767
- await _chunk77JC2UCFjs.StripeCustomerService.setDefaultPaymentMethod({ paymentMethodId: paymentMethod.id });
767
+ await _chunk5XP5G45Bjs.StripeCustomerService.setDefaultPaymentMethod({ paymentMethodId: paymentMethod.id });
768
768
  onUpdate();
769
769
  } catch (error) {
770
770
  console.error("[PaymentMethodCard] Failed to set as default:", error);
@@ -775,7 +775,7 @@ function PaymentMethodCard({ paymentMethod, onUpdate }) {
775
775
  const handleRemove = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
776
776
  setLoading(true);
777
777
  try {
778
- await _chunk77JC2UCFjs.StripeCustomerService.removePaymentMethod({ paymentMethodId: paymentMethod.id });
778
+ await _chunk5XP5G45Bjs.StripeCustomerService.removePaymentMethod({ paymentMethodId: paymentMethod.id });
779
779
  setShowRemoveDialog(false);
780
780
  onUpdate();
781
781
  } catch (error) {
@@ -784,16 +784,16 @@ function PaymentMethodCard({ paymentMethod, onUpdate }) {
784
784
  }
785
785
  }, "handleRemove");
786
786
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
787
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.Card, { className: "relative", children: [
788
- isDefault && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Badge, { variant: "softGreen", className: "absolute end-2 top-2", children: t("billing.ui.payment_methods.default") }),
789
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.CardHeader, { className: "flex flex-row items-center justify-between pb-2", children: [
787
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.Card, { className: "relative", children: [
788
+ isDefault && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Badge, { variant: "softGreen", className: "absolute end-2 top-2", children: t("billing.ui.payment_methods.default") }),
789
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.CardHeader, { className: "flex flex-row items-center justify-between pb-2", children: [
790
790
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-x-2", children: [
791
791
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-2xl", children: brandIcon }),
792
792
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm font-medium capitalize", children: brand })
793
793
  ] }),
794
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.DropdownMenu, { children: [
795
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.DropdownMenuTrigger, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
796
- _chunkQI4SCGPBjs.Button,
794
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.DropdownMenu, { children: [
795
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.DropdownMenuTrigger, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
796
+ _chunkM7FA63QEjs.Button,
797
797
  {
798
798
  render: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", {}),
799
799
  nativeButton: false,
@@ -804,10 +804,10 @@ function PaymentMethodCard({ paymentMethod, onUpdate }) {
804
804
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.MoreVertical, { className: "h-4 w-4" })
805
805
  }
806
806
  ) }),
807
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.DropdownMenuContent, { align: "end", children: [
808
- !isDefault && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.DropdownMenuItem, { onClick: handleSetDefault, disabled: loading, children: t("billing.ui.payment_methods.set_default") }),
807
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.DropdownMenuContent, { align: "end", children: [
808
+ !isDefault && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.DropdownMenuItem, { onClick: handleSetDefault, disabled: loading, children: t("billing.ui.payment_methods.set_default") }),
809
809
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
810
- _chunkQI4SCGPBjs.DropdownMenuItem,
810
+ _chunkM7FA63QEjs.DropdownMenuItem,
811
811
  {
812
812
  onClick: () => setShowRemoveDialog(true),
813
813
  disabled: loading,
@@ -818,7 +818,7 @@ function PaymentMethodCard({ paymentMethod, onUpdate }) {
818
818
  ] })
819
819
  ] })
820
820
  ] }),
821
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-y-1", children: [
821
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-y-1", children: [
822
822
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "p", { className: "text-lg font-semibold", children: [
823
823
  "\u2022\u2022\u2022\u2022 ",
824
824
  last4
@@ -826,17 +826,17 @@ function PaymentMethodCard({ paymentMethod, onUpdate }) {
826
826
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-muted-foreground", children: t("billing.ui.payment_method.expires", { date: `${String(expMonth).padStart(2, "0")}/${expYear}` }) })
827
827
  ] }) })
828
828
  ] }),
829
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.AlertDialog, { open: showRemoveDialog, onOpenChange: setShowRemoveDialog, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.AlertDialogContent, { children: [
830
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.AlertDialogHeader, { children: [
831
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.AlertDialogTitle, { children: t("billing.ui.payment_methods.remove_title") }),
832
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.AlertDialogDescription, { children: [
829
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.AlertDialog, { open: showRemoveDialog, onOpenChange: setShowRemoveDialog, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.AlertDialogContent, { children: [
830
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.AlertDialogHeader, { children: [
831
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.AlertDialogTitle, { children: t("billing.ui.payment_methods.remove_title") }),
832
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.AlertDialogDescription, { children: [
833
833
  t("billing.ui.payment_methods.remove_description"),
834
834
  isDefault && ` ${t("billing.ui.payment_methods.remove_default_warning")}`
835
835
  ] })
836
836
  ] }),
837
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.AlertDialogFooter, { children: [
838
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.AlertDialogCancel, { disabled: loading, children: t("ui.buttons.cancel") }),
839
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.AlertDialogAction, { onClick: handleRemove, disabled: loading, className: "bg-red-600 hover:bg-red-700", children: loading ? t("billing.ui.payment_methods.removing") : t("ui.buttons.remove") })
837
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.AlertDialogFooter, { children: [
838
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.AlertDialogCancel, { disabled: loading, children: t("ui.buttons.cancel") }),
839
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.AlertDialogAction, { onClick: handleRemove, disabled: loading, className: "bg-red-600 hover:bg-red-700", children: loading ? t("billing.ui.payment_methods.removing") : t("ui.buttons.remove") })
840
840
  ] })
841
841
  ] }) })
842
842
  ] });
@@ -860,7 +860,7 @@ function PaymentMethodsContainer() {
860
860
  const loadPaymentMethods = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
861
861
  setLoading(true);
862
862
  try {
863
- const fetchedPaymentMethods = await _chunk77JC2UCFjs.StripeCustomerService.listPaymentMethods();
863
+ const fetchedPaymentMethods = await _chunk5XP5G45Bjs.StripeCustomerService.listPaymentMethods();
864
864
  setPaymentMethods(fetchedPaymentMethods);
865
865
  } catch (error) {
866
866
  console.error("[PaymentMethodsContainer] Failed to load payment methods:", error);
@@ -880,14 +880,14 @@ function PaymentMethodsContainer() {
880
880
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CreditCard, { className: "h-8 w-8" }),
881
881
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h1", { className: "text-primary text-3xl font-semibold", children: t("billing.ui.payment_methods.title") })
882
882
  ] }),
883
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Button, { onClick: () => setShowAddPaymentMethod(true), children: t("billing.ui.payment_methods.add") })
883
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Button, { onClick: () => setShowAddPaymentMethod(true), children: t("billing.ui.payment_methods.add") })
884
884
  ] }),
885
885
  paymentMethods.length === 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col items-center justify-center gap-y-4 rounded-lg border-2 border-dashed border-gray-300 bg-muted/50 p-12", children: [
886
886
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CreditCard, { className: "h-16 w-16 text-muted-foreground" }),
887
887
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-center", children: [
888
888
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "mb-2 text-sm font-medium", children: t("billing.ui.payment_methods.empty_title") }),
889
889
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "mb-4 text-muted-foreground", children: t("billing.ui.payment_methods.empty_description") }),
890
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Button, { onClick: () => setShowAddPaymentMethod(true), children: t("billing.ui.payment_methods.add_first") })
890
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Button, { onClick: () => setShowAddPaymentMethod(true), children: t("billing.ui.payment_methods.add_first") })
891
891
  ] })
892
892
  ] }),
893
893
  paymentMethods.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PaymentMethodsList, { paymentMethods, onUpdate: loadPaymentMethods }),
@@ -943,7 +943,7 @@ var statusConfig = {
943
943
  function InvoiceStatusBadge({ status }) {
944
944
  const t = _nextintl.useTranslations.call(void 0, );
945
945
  const config = statusConfig[status] || statusConfig["draft" /* DRAFT */];
946
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Badge, { variant: config.variant, children: t(config.label) });
946
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Badge, { variant: config.variant, children: t(config.label) });
947
947
  }
948
948
  _chunk7QVYU63Ejs.__name.call(void 0, InvoiceStatusBadge, "InvoiceStatusBadge");
949
949
 
@@ -956,7 +956,7 @@ function InvoiceDetails({
956
956
  onInvoiceChange: _onInvoiceChange
957
957
  }) {
958
958
  const t = _nextintl.useTranslations.call(void 0, );
959
- const fmt = _chunkQI4SCGPBjs.useBillingFormatOptions.call(void 0, );
959
+ const fmt = _chunkM7FA63QEjs.useBillingFormatOptions.call(void 0, );
960
960
  const handleDownloadPDF = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
961
961
  if (invoice.stripePdfUrl) {
962
962
  window.open(invoice.stripePdfUrl, "_blank");
@@ -976,10 +976,10 @@ function InvoiceDetails({
976
976
  return invoice.stripeInvoiceId.slice(-8);
977
977
  }, "getInvoiceNumber");
978
978
  const productName = _optionalChain([invoice, 'access', _29 => _29.subscription, 'optionalAccess', _30 => _30.price, 'optionalAccess', _31 => _31.product, 'optionalAccess', _32 => _32.name]) || t("billing.ui.cards.subscriptions.fallback_name");
979
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.DialogContent, { className: "max-w-2xl", children: [
980
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.DialogHeader, { children: [
981
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.DialogTitle, { children: t("billing.ui.invoice.title", { number: getInvoiceNumber() }) }),
982
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.DialogDescription, { children: _chunkQI4SCGPBjs.formatDate.call(void 0, invoice.periodStart, fmt) })
979
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.DialogContent, { className: "max-w-2xl", children: [
980
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.DialogHeader, { children: [
981
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.DialogTitle, { children: t("billing.ui.invoice.title", { number: getInvoiceNumber() }) }),
982
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.DialogDescription, { children: _chunkM7FA63QEjs.formatDate.call(void 0, invoice.periodStart, fmt) })
983
983
  ] }),
984
984
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-6", children: [
985
985
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-x-3", children: [
@@ -990,18 +990,18 @@ function InvoiceDetails({
990
990
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { children: [
991
991
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: t("billing.ui.invoice.billing_period") }),
992
992
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "p", { className: "text-sm", children: [
993
- _chunkQI4SCGPBjs.formatDate.call(void 0, invoice.periodStart, fmt),
993
+ _chunkM7FA63QEjs.formatDate.call(void 0, invoice.periodStart, fmt),
994
994
  " - ",
995
- _chunkQI4SCGPBjs.formatDate.call(void 0, invoice.periodEnd, fmt)
995
+ _chunkM7FA63QEjs.formatDate.call(void 0, invoice.periodEnd, fmt)
996
996
  ] })
997
997
  ] }),
998
998
  invoice.dueDate && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { children: [
999
999
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: t("billing.ui.invoice.due_date") }),
1000
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm", children: _chunkQI4SCGPBjs.formatDate.call(void 0, invoice.dueDate, fmt) })
1000
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm", children: _chunkM7FA63QEjs.formatDate.call(void 0, invoice.dueDate, fmt) })
1001
1001
  ] }),
1002
1002
  invoice.paidAt && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { children: [
1003
1003
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: t("billing.ui.invoice.paid_date") }),
1004
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm", children: _chunkQI4SCGPBjs.formatDate.call(void 0, invoice.paidAt, fmt) })
1004
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm", children: _chunkM7FA63QEjs.formatDate.call(void 0, invoice.paidAt, fmt) })
1005
1005
  ] }),
1006
1006
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { children: [
1007
1007
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: t("billing.ui.invoice.attempt_count") }),
@@ -1017,42 +1017,42 @@ function InvoiceDetails({
1017
1017
  ] }) }),
1018
1018
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tbody", { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "tr", { className: "border-t", children: [
1019
1019
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "p-3", children: productName }),
1020
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "p-3 text-end", children: _chunk77JC2UCFjs.formatCurrency.call(void 0, invoice.subtotal, invoice.currency, fmt) })
1020
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "p-3 text-end", children: _chunk5XP5G45Bjs.formatCurrency.call(void 0, invoice.subtotal, invoice.currency, fmt) })
1021
1021
  ] }) })
1022
1022
  ] }) })
1023
1023
  ] }),
1024
1024
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2 border-t pt-4", children: [
1025
1025
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-between", children: [
1026
1026
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: t("billing.ui.invoice.subtotal") }),
1027
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm", children: _chunk77JC2UCFjs.formatCurrency.call(void 0, invoice.subtotal, invoice.currency, fmt) })
1027
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm", children: _chunk5XP5G45Bjs.formatCurrency.call(void 0, invoice.subtotal, invoice.currency, fmt) })
1028
1028
  ] }),
1029
1029
  invoice.tax !== void 0 && invoice.tax > 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-between", children: [
1030
1030
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: t("billing.ui.invoice.tax") }),
1031
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm", children: _chunk77JC2UCFjs.formatCurrency.call(void 0, invoice.tax, invoice.currency, fmt) })
1031
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm", children: _chunk5XP5G45Bjs.formatCurrency.call(void 0, invoice.tax, invoice.currency, fmt) })
1032
1032
  ] }),
1033
1033
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-between text-lg font-semibold border-t pt-2", children: [
1034
1034
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: t("billing.ui.invoice.total") }),
1035
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: _chunk77JC2UCFjs.formatCurrency.call(void 0, invoice.total, invoice.currency, fmt) })
1035
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: _chunk5XP5G45Bjs.formatCurrency.call(void 0, invoice.total, invoice.currency, fmt) })
1036
1036
  ] }),
1037
1037
  invoice.amountPaid > 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-between", children: [
1038
1038
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: t("billing.ui.invoice.amount_paid") }),
1039
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm text-success", children: _chunk77JC2UCFjs.formatCurrency.call(void 0, invoice.amountPaid, invoice.currency, fmt) })
1039
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm text-success", children: _chunk5XP5G45Bjs.formatCurrency.call(void 0, invoice.amountPaid, invoice.currency, fmt) })
1040
1040
  ] }),
1041
1041
  invoice.amountRemaining > 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-between", children: [
1042
1042
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: t("billing.ui.invoice.amount_due") }),
1043
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm text-destructive", children: _chunk77JC2UCFjs.formatCurrency.call(void 0, invoice.amountRemaining, invoice.currency, fmt) })
1043
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm text-destructive", children: _chunk5XP5G45Bjs.formatCurrency.call(void 0, invoice.amountRemaining, invoice.currency, fmt) })
1044
1044
  ] })
1045
1045
  ] }),
1046
1046
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-wrap gap-2 pt-4 border-t", children: [
1047
- invoice.stripePdfUrl && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.Button, { variant: "outline", onClick: handleDownloadPDF, children: [
1047
+ invoice.stripePdfUrl && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.Button, { variant: "outline", onClick: handleDownloadPDF, children: [
1048
1048
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Download, { className: "me-2 h-4 w-4" }),
1049
1049
  t("billing.ui.invoice.download_pdf")
1050
1050
  ] }),
1051
- invoice.status === "open" /* OPEN */ && invoice.attempted && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.Button, { variant: "default", onClick: handleRetryPayment, children: [
1051
+ invoice.status === "open" /* OPEN */ && invoice.attempted && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.Button, { variant: "default", onClick: handleRetryPayment, children: [
1052
1052
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.RefreshCw, { className: "me-2 h-4 w-4" }),
1053
1053
  t("billing.ui.invoice.retry_payment")
1054
1054
  ] }),
1055
- invoice.stripeHostedInvoiceUrl && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.Button, { variant: "outline", onClick: handleViewInStripe, children: [
1055
+ invoice.stripeHostedInvoiceUrl && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.Button, { variant: "outline", onClick: handleViewInStripe, children: [
1056
1056
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ExternalLink, { className: "me-2 h-4 w-4" }),
1057
1057
  t("billing.ui.invoice.view_in_stripe")
1058
1058
  ] })
@@ -1066,7 +1066,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, InvoiceDetails, "InvoiceDetails");
1066
1066
 
1067
1067
  function InvoicesList({ invoices, onInvoicesChange }) {
1068
1068
  const t = _nextintl.useTranslations.call(void 0, );
1069
- const fmt = _chunkQI4SCGPBjs.useBillingFormatOptions.call(void 0, );
1069
+ const fmt = _chunkM7FA63QEjs.useBillingFormatOptions.call(void 0, );
1070
1070
  const [selectedInvoice, setSelectedInvoice] = _react.useState.call(void 0, null);
1071
1071
  const handleRowClick = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (invoice) => {
1072
1072
  setSelectedInvoice(invoice);
@@ -1078,30 +1078,30 @@ function InvoicesList({ invoices, onInvoicesChange }) {
1078
1078
  return invoice.stripeInvoiceId.slice(-8);
1079
1079
  }, "getInvoiceNumber");
1080
1080
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
1081
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "border rounded-lg overflow-clip", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.Table, { children: [
1082
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.TableHeader, { className: "bg-muted", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.TableRow, { children: [
1083
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.TableHead, { children: t("billing.ui.columns.invoice_number") }),
1084
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.TableHead, { children: t("billing.ui.columns.date") }),
1085
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.TableHead, { children: t("billing.ui.columns.status") }),
1086
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.TableHead, { className: "text-end", children: t("billing.ui.columns.amount") }),
1087
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.TableHead, { children: t("billing.ui.columns.period") })
1081
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "border rounded-lg overflow-clip", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.Table, { children: [
1082
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.TableHeader, { className: "bg-muted", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.TableRow, { children: [
1083
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.TableHead, { children: t("billing.ui.columns.invoice_number") }),
1084
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.TableHead, { children: t("billing.ui.columns.date") }),
1085
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.TableHead, { children: t("billing.ui.columns.status") }),
1086
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.TableHead, { className: "text-end", children: t("billing.ui.columns.amount") }),
1087
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.TableHead, { children: t("billing.ui.columns.period") })
1088
1088
  ] }) }),
1089
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.TableBody, { children: invoices.map((invoice) => {
1089
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.TableBody, { children: invoices.map((invoice) => {
1090
1090
  const invoiceNumber = getInvoiceNumber(invoice);
1091
- const date = _chunkQI4SCGPBjs.formatDate.call(void 0, invoice.periodStart, fmt);
1092
- const amount = _chunk77JC2UCFjs.formatCurrency.call(void 0, invoice.total, invoice.currency, fmt);
1093
- const period = `${_chunkQI4SCGPBjs.formatDate.call(void 0, invoice.periodStart, fmt)} - ${_chunkQI4SCGPBjs.formatDate.call(void 0, invoice.periodEnd, fmt)}`;
1091
+ const date = _chunkM7FA63QEjs.formatDate.call(void 0, invoice.periodStart, fmt);
1092
+ const amount = _chunk5XP5G45Bjs.formatCurrency.call(void 0, invoice.total, invoice.currency, fmt);
1093
+ const period = `${_chunkM7FA63QEjs.formatDate.call(void 0, invoice.periodStart, fmt)} - ${_chunkM7FA63QEjs.formatDate.call(void 0, invoice.periodEnd, fmt)}`;
1094
1094
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1095
- _chunkQI4SCGPBjs.TableRow,
1095
+ _chunkM7FA63QEjs.TableRow,
1096
1096
  {
1097
1097
  onClick: () => handleRowClick(invoice),
1098
1098
  className: "cursor-pointer hover:bg-muted/50",
1099
1099
  children: [
1100
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.TableCell, { className: "font-medium", children: invoiceNumber }),
1101
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.TableCell, { className: "text-muted-foreground text-xs", children: date }),
1102
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.TableCell, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, InvoiceStatusBadge, { status: invoice.status }) }),
1103
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.TableCell, { className: "text-end font-medium", children: amount }),
1104
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.TableCell, { className: "text-muted-foreground text-xs", children: period })
1100
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.TableCell, { className: "font-medium", children: invoiceNumber }),
1101
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.TableCell, { className: "text-muted-foreground text-xs", children: date }),
1102
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.TableCell, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, InvoiceStatusBadge, { status: invoice.status }) }),
1103
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.TableCell, { className: "text-end font-medium", children: amount }),
1104
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.TableCell, { className: "text-muted-foreground text-xs", children: period })
1105
1105
  ]
1106
1106
  },
1107
1107
  invoice.id
@@ -1135,7 +1135,7 @@ function InvoicesContainer() {
1135
1135
  setLoading(true);
1136
1136
  try {
1137
1137
  const params = statusFilter !== "all" ? { status: statusFilter } : void 0;
1138
- const data = await _chunk77JC2UCFjs.StripeInvoiceService.listInvoices(params);
1138
+ const data = await _chunk5XP5G45Bjs.StripeInvoiceService.listInvoices(params);
1139
1139
  setInvoices(data);
1140
1140
  } catch (error) {
1141
1141
  console.error("[InvoicesContainer] Failed to load invoices:", error);
@@ -1151,12 +1151,12 @@ function InvoicesContainer() {
1151
1151
  setStatusFilter(value);
1152
1152
  }, "handleFilterChange");
1153
1153
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-4", children: [
1154
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Tabs, { value: statusFilter, onValueChange: handleFilterChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.TabsList, { children: [
1155
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.TabsTrigger, { value: "all", children: t("billing.ui.invoices.filter_all") }),
1156
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.TabsTrigger, { value: "paid" /* PAID */, children: t("billing.ui.invoice_status.paid") }),
1157
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.TabsTrigger, { value: "open" /* OPEN */, children: t("billing.ui.invoice_status.open") }),
1158
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.TabsTrigger, { value: "void" /* VOID */, children: t("billing.ui.invoice_status.void") }),
1159
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.TabsTrigger, { value: "uncollectible" /* UNCOLLECTIBLE */, children: t("billing.ui.invoice_status.uncollectible") })
1154
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Tabs, { value: statusFilter, onValueChange: handleFilterChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.TabsList, { children: [
1155
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.TabsTrigger, { value: "all", children: t("billing.ui.invoices.filter_all") }),
1156
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.TabsTrigger, { value: "paid" /* PAID */, children: t("billing.ui.invoice_status.paid") }),
1157
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.TabsTrigger, { value: "open" /* OPEN */, children: t("billing.ui.invoice_status.open") }),
1158
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.TabsTrigger, { value: "void" /* VOID */, children: t("billing.ui.invoice_status.void") }),
1159
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.TabsTrigger, { value: "uncollectible" /* UNCOLLECTIBLE */, children: t("billing.ui.invoice_status.uncollectible") })
1160
1160
  ] }) }),
1161
1161
  loading && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-center py-8 text-muted-foreground", children: t("billing.ui.invoices.loading") }),
1162
1162
  !loading && invoices.length === 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "border border-dashed border-gray-300 rounded-lg p-8 text-center", children: [
@@ -1198,7 +1198,7 @@ function CancelSubscriptionDialog({
1198
1198
  onSuccess
1199
1199
  }) {
1200
1200
  const t = _nextintl.useTranslations.call(void 0, );
1201
- const fmt = _chunkQI4SCGPBjs.useBillingFormatOptions.call(void 0, );
1201
+ const fmt = _chunkM7FA63QEjs.useBillingFormatOptions.call(void 0, );
1202
1202
  const [isSubmitting, setIsSubmitting] = _react.useState.call(void 0, false);
1203
1203
  const form = _reacthookform.useForm.call(void 0, {
1204
1204
  resolver: _zod.zodResolver.call(void 0, formSchema),
@@ -1209,7 +1209,7 @@ function CancelSubscriptionDialog({
1209
1209
  const onSubmit = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async (_values) => {
1210
1210
  setIsSubmitting(true);
1211
1211
  try {
1212
- await _chunk77JC2UCFjs.StripeSubscriptionService.cancelSubscription({
1212
+ await _chunk5XP5G45Bjs.StripeSubscriptionService.cancelSubscription({
1213
1213
  id: subscription.id,
1214
1214
  cancelImmediately: false
1215
1215
  });
@@ -1221,16 +1221,16 @@ function CancelSubscriptionDialog({
1221
1221
  setIsSubmitting(false);
1222
1222
  }
1223
1223
  }, "onSubmit");
1224
- const periodEndDate = _chunkQI4SCGPBjs.formatDate.call(void 0, subscription.currentPeriodEnd, fmt);
1225
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.DialogContent, { className: "max-w-md", children: [
1226
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.DialogHeader, { children: [
1227
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.DialogTitle, { children: t("billing.ui.subscription.cancel.title") }),
1228
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.DialogDescription, { children: t("billing.ui.subscription.cancel.description") })
1224
+ const periodEndDate = _chunkM7FA63QEjs.formatDate.call(void 0, subscription.currentPeriodEnd, fmt);
1225
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.DialogContent, { className: "max-w-md", children: [
1226
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.DialogHeader, { children: [
1227
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.DialogTitle, { children: t("billing.ui.subscription.cancel.title") }),
1228
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.DialogDescription, { children: t("billing.ui.subscription.cancel.description") })
1229
1229
  ] }),
1230
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Form, { ...form, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: form.handleSubmit(onSubmit), className: "flex flex-col gap-y-4", children: [
1230
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Form, { ...form, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: form.handleSubmit(onSubmit), className: "flex flex-col gap-y-4", children: [
1231
1231
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "bg-primary/10 border-primary/30 text-foreground rounded-lg border p-3 text-sm", children: t("billing.ui.subscription.cancel.remains_active", { date: periodEndDate }) }),
1232
1232
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1233
- _chunkQI4SCGPBjs.FormTextarea,
1233
+ _chunkM7FA63QEjs.FormTextarea,
1234
1234
  {
1235
1235
  form,
1236
1236
  id: "reason",
@@ -1240,8 +1240,8 @@ function CancelSubscriptionDialog({
1240
1240
  }
1241
1241
  ),
1242
1242
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex gap-x-2 justify-end pt-2", children: [
1243
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Button, { type: "button", variant: "outline", onClick: () => onOpenChange(false), disabled: isSubmitting, children: t("billing.ui.subscription.cancel.keep") }),
1244
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Button, { type: "submit", variant: "destructive", disabled: isSubmitting, children: isSubmitting ? t("billing.ui.subscription.cancel.canceling") : t("billing.ui.subscription.cancel.confirm") })
1243
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Button, { type: "button", variant: "outline", onClick: () => onOpenChange(false), disabled: isSubmitting, children: t("billing.ui.subscription.cancel.keep") }),
1244
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Button, { type: "submit", variant: "destructive", disabled: isSubmitting, children: isSubmitting ? t("billing.ui.subscription.cancel.canceling") : t("billing.ui.subscription.cancel.confirm") })
1245
1245
  ] })
1246
1246
  ] }) })
1247
1247
  ] }) });
@@ -1292,7 +1292,7 @@ var cancelingConfig = {
1292
1292
  function SubscriptionStatusBadge({ status, cancelAtPeriodEnd }) {
1293
1293
  const t = _nextintl.useTranslations.call(void 0, );
1294
1294
  const config = cancelAtPeriodEnd ? cancelingConfig : statusConfig2[status] || statusConfig2["canceled" /* CANCELED */];
1295
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Badge, { variant: config.variant, children: t(config.label) });
1295
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Badge, { variant: config.variant, children: t(config.label) });
1296
1296
  }
1297
1297
  _chunk7QVYU63Ejs.__name.call(void 0, SubscriptionStatusBadge, "SubscriptionStatusBadge");
1298
1298
 
@@ -1319,7 +1319,7 @@ function formatPlanName2(price, t) {
1319
1319
  _chunk7QVYU63Ejs.__name.call(void 0, formatPlanName2, "formatPlanName");
1320
1320
  function formatBillingAmount(price, notAvailable, fmt) {
1321
1321
  if (!_optionalChain([price, 'optionalAccess', _37 => _37.unitAmount])) return notAvailable;
1322
- return _chunk77JC2UCFjs.formatCurrency.call(void 0, price.unitAmount, price.currency, fmt);
1322
+ return _chunk5XP5G45Bjs.formatCurrency.call(void 0, price.unitAmount, price.currency, fmt);
1323
1323
  }
1324
1324
  _chunk7QVYU63Ejs.__name.call(void 0, formatBillingAmount, "formatBillingAmount");
1325
1325
  function SubscriptionDetails({
@@ -1331,11 +1331,11 @@ function SubscriptionDetails({
1331
1331
  renderCancelDialog
1332
1332
  }) {
1333
1333
  const t = _nextintl.useTranslations.call(void 0, );
1334
- const fmt = _chunkQI4SCGPBjs.useBillingFormatOptions.call(void 0, );
1334
+ const fmt = _chunkM7FA63QEjs.useBillingFormatOptions.call(void 0, );
1335
1335
  const [showCancel, setShowCancel] = _react.useState.call(void 0, false);
1336
1336
  const handleManageViaPortal = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
1337
1337
  try {
1338
- const { url } = await _chunk77JC2UCFjs.StripeCustomerService.createPortalSession();
1338
+ const { url } = await _chunk5XP5G45Bjs.StripeCustomerService.createPortalSession();
1339
1339
  window.open(url, "_blank");
1340
1340
  } catch (error) {
1341
1341
  console.error("[SubscriptionDetails] Failed to create portal session:", error);
@@ -1343,10 +1343,10 @@ function SubscriptionDetails({
1343
1343
  }, "handleManageViaPortal");
1344
1344
  const canCancel = subscription.status === "active" /* ACTIVE */ || subscription.status === "trialing" /* TRIALING */ || subscription.status === "paused" /* PAUSED */;
1345
1345
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
1346
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.DialogContent, { className: "max-w-2xl", children: [
1347
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.DialogHeader, { children: [
1348
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.DialogTitle, { children: t("billing.ui.subscription.details_title") }),
1349
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.DialogDescription, { children: t("billing.ui.subscription.details_description") })
1346
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.DialogContent, { className: "max-w-2xl", children: [
1347
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.DialogHeader, { children: [
1348
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.DialogTitle, { children: t("billing.ui.subscription.details_title") }),
1349
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.DialogDescription, { children: t("billing.ui.subscription.details_description") })
1350
1350
  ] }),
1351
1351
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-6", children: [
1352
1352
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-x-3", children: [
@@ -1372,22 +1372,22 @@ function SubscriptionDetails({
1372
1372
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "space-y-2", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-between", children: [
1373
1373
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: t("billing.ui.subscription.current_period") }),
1374
1374
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "text-sm", children: [
1375
- _chunkQI4SCGPBjs.formatDate.call(void 0, subscription.currentPeriodStart, fmt),
1375
+ _chunkM7FA63QEjs.formatDate.call(void 0, subscription.currentPeriodStart, fmt),
1376
1376
  " - ",
1377
- _chunkQI4SCGPBjs.formatDate.call(void 0, subscription.currentPeriodEnd, fmt)
1377
+ _chunkM7FA63QEjs.formatDate.call(void 0, subscription.currentPeriodEnd, fmt)
1378
1378
  ] })
1379
1379
  ] }) }),
1380
1380
  subscription.trialEnd && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-between", children: [
1381
1381
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: t("billing.ui.subscription.trial_ends") }),
1382
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm", children: _chunkQI4SCGPBjs.formatDate.call(void 0, subscription.trialEnd, fmt) })
1382
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm", children: _chunkM7FA63QEjs.formatDate.call(void 0, subscription.trialEnd, fmt) })
1383
1383
  ] }),
1384
1384
  subscription.cancelAtPeriodEnd && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "bg-warning/15 border-warning/30 rounded-lg border p-3", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-warning text-xs/relaxed", children: t("billing.ui.subscription.cancel_at_period_end", {
1385
- date: _chunkQI4SCGPBjs.formatDate.call(void 0, subscription.currentPeriodEnd, fmt)
1385
+ date: _chunkM7FA63QEjs.formatDate.call(void 0, subscription.currentPeriodEnd, fmt)
1386
1386
  }) }) }),
1387
1387
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-wrap gap-2 pt-4 border-t", children: [
1388
- onChangePlan && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Button, { variant: "default", onClick: () => onChangePlan(subscription), children: t("billing.ui.subscription.change_plan") }),
1389
- canCancel && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Button, { variant: "destructive", onClick: () => setShowCancel(true), children: t("ui.buttons.cancel") }),
1390
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Button, { variant: "outline", onClick: handleManageViaPortal, children: t("billing.ui.subscription.manage_portal") })
1388
+ onChangePlan && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Button, { variant: "default", onClick: () => onChangePlan(subscription), children: t("billing.ui.subscription.change_plan") }),
1389
+ canCancel && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Button, { variant: "destructive", onClick: () => setShowCancel(true), children: t("ui.buttons.cancel") }),
1390
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Button, { variant: "outline", onClick: handleManageViaPortal, children: t("billing.ui.subscription.manage_portal") })
1391
1391
  ] })
1392
1392
  ] })
1393
1393
  ] }) }),
@@ -1447,46 +1447,46 @@ function SubscriptionsList({
1447
1447
  renderCancelDialog
1448
1448
  }) {
1449
1449
  const t = _nextintl.useTranslations.call(void 0, );
1450
- const fmt = _chunkQI4SCGPBjs.useBillingFormatOptions.call(void 0, );
1450
+ const fmt = _chunkM7FA63QEjs.useBillingFormatOptions.call(void 0, );
1451
1451
  const [selectedSub, setSelectedSub] = _react.useState.call(void 0, null);
1452
1452
  const handleRowClick = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (subscription) => {
1453
1453
  setSelectedSub(subscription);
1454
1454
  }, "handleRowClick");
1455
1455
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
1456
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "border rounded-lg overflow-clip", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.Table, { children: [
1457
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.TableHeader, { className: "bg-muted", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.TableRow, { children: [
1458
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.TableHead, { children: t("billing.ui.columns.status") }),
1459
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.TableHead, { children: t("billing.ui.columns.plan") }),
1460
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.TableHead, { children: t("billing.ui.columns.period") }),
1461
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.TableHead, { className: "text-end", children: t("billing.ui.columns.amount") }),
1462
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.TableHead, { className: "text-end", children: t("billing.ui.columns.actions") })
1456
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "border rounded-lg overflow-clip", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.Table, { children: [
1457
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.TableHeader, { className: "bg-muted", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.TableRow, { children: [
1458
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.TableHead, { children: t("billing.ui.columns.status") }),
1459
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.TableHead, { children: t("billing.ui.columns.plan") }),
1460
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.TableHead, { children: t("billing.ui.columns.period") }),
1461
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.TableHead, { className: "text-end", children: t("billing.ui.columns.amount") }),
1462
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.TableHead, { className: "text-end", children: t("billing.ui.columns.actions") })
1463
1463
  ] }) }),
1464
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.TableBody, { children: subscriptions.map((subscription) => {
1464
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.TableBody, { children: subscriptions.map((subscription) => {
1465
1465
  const price = subscription.price;
1466
- const amount = _optionalChain([price, 'optionalAccess', _42 => _42.unitAmount]) ? _chunk77JC2UCFjs.formatCurrency.call(void 0, price.unitAmount, price.currency, fmt) : "0";
1467
- const discountedAmount = price ? _chunkQI4SCGPBjs.applyDiscount.call(void 0, price.unitAmount, _chunkQI4SCGPBjs.subscriptionDiscount.call(void 0, subscription)) : null;
1468
- const period = `${_chunkQI4SCGPBjs.formatDate.call(void 0, subscription.currentPeriodStart, fmt)} - ${_chunkQI4SCGPBjs.formatDate.call(void 0, subscription.currentPeriodEnd, fmt)}`;
1466
+ const amount = _optionalChain([price, 'optionalAccess', _42 => _42.unitAmount]) ? _chunk5XP5G45Bjs.formatCurrency.call(void 0, price.unitAmount, price.currency, fmt) : "0";
1467
+ const discountedAmount = price ? _chunkM7FA63QEjs.applyDiscount.call(void 0, price.unitAmount, _chunkM7FA63QEjs.subscriptionDiscount.call(void 0, subscription)) : null;
1468
+ const period = `${_chunkM7FA63QEjs.formatDate.call(void 0, subscription.currentPeriodStart, fmt)} - ${_chunkM7FA63QEjs.formatDate.call(void 0, subscription.currentPeriodEnd, fmt)}`;
1469
1469
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1470
- _chunkQI4SCGPBjs.TableRow,
1470
+ _chunkM7FA63QEjs.TableRow,
1471
1471
  {
1472
1472
  onClick: () => handleRowClick(subscription),
1473
1473
  className: "cursor-pointer hover:bg-muted/50",
1474
1474
  children: [
1475
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.TableCell, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1475
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.TableCell, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1476
1476
  SubscriptionStatusBadge,
1477
1477
  {
1478
1478
  status: subscription.status,
1479
1479
  cancelAtPeriodEnd: subscription.cancelAtPeriodEnd
1480
1480
  }
1481
1481
  ) }),
1482
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.TableCell, { className: "font-medium", children: formatPlanName3(price, t) }),
1483
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.TableCell, { className: "text-muted-foreground text-sm", children: period }),
1484
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.TableCell, { className: "text-end font-medium", children: discountedAmount !== null && price ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
1482
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.TableCell, { className: "font-medium", children: formatPlanName3(price, t) }),
1483
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.TableCell, { className: "text-muted-foreground text-sm", children: period }),
1484
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.TableCell, { className: "text-end font-medium", children: discountedAmount !== null && price ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
1485
1485
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "line-through text-muted-foreground me-2", children: amount }),
1486
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-success", children: _chunk77JC2UCFjs.formatCurrency.call(void 0, discountedAmount, price.currency, fmt) })
1486
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-success", children: _chunk5XP5G45Bjs.formatCurrency.call(void 0, discountedAmount, price.currency, fmt) })
1487
1487
  ] }) : amount }),
1488
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.TableCell, { className: "text-end", children: (subscription.status === "active" /* ACTIVE */ || subscription.status === "trialing" /* TRIALING */) && onChangePlan && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1489
- _chunkQI4SCGPBjs.Button,
1488
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.TableCell, { className: "text-end", children: (subscription.status === "active" /* ACTIVE */ || subscription.status === "trialing" /* TRIALING */) && onChangePlan && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1489
+ _chunkM7FA63QEjs.Button,
1490
1490
  {
1491
1491
  size: "sm",
1492
1492
  variant: "outline",
@@ -1546,7 +1546,7 @@ function SubscriptionsContainer({
1546
1546
  }
1547
1547
  setLoading(true);
1548
1548
  try {
1549
- const fetchedSubscriptions = await _chunk77JC2UCFjs.StripeSubscriptionService.listSubscriptions();
1549
+ const fetchedSubscriptions = await _chunk5XP5G45Bjs.StripeSubscriptionService.listSubscriptions();
1550
1550
  setSubscriptions(fetchedSubscriptions);
1551
1551
  } catch (error) {
1552
1552
  console.error("[SubscriptionsContainer] Failed to load subscriptions:", error);
@@ -1569,7 +1569,7 @@ function SubscriptionsContainer({
1569
1569
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CreditCard, { className: "h-8 w-8" }),
1570
1570
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h1", { className: "text-primary text-3xl font-semibold", children: t("billing.ui.subscriptions.title") })
1571
1571
  ] }),
1572
- subscriptions.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Button, { onClick: () => _optionalChain([onOpenWizard, 'optionalCall', _44 => _44()]), children: hasActiveRecurringSubscription ? t("billing.ui.subscriptions.purchase_addons") : t("billing.ui.subscriptions.subscribe") })
1572
+ subscriptions.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Button, { onClick: () => _optionalChain([onOpenWizard, 'optionalCall', _44 => _44()]), children: hasActiveRecurringSubscription ? t("billing.ui.subscriptions.purchase_addons") : t("billing.ui.subscriptions.subscribe") })
1573
1573
  ] }),
1574
1574
  criticalSubscriptions.map((subscription) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BillingAlertBanner, { subscription }, subscription.id)),
1575
1575
  subscriptions.length === 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col items-center justify-center py-12 space-y-4", children: [
@@ -1577,7 +1577,7 @@ function SubscriptionsContainer({
1577
1577
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-center", children: [
1578
1578
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "text-sm font-medium mb-2", children: t("billing.ui.subscriptions.empty_title") }),
1579
1579
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground mb-6", children: t("billing.ui.subscriptions.empty_description") }),
1580
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Button, { onClick: () => _optionalChain([onOpenWizard, 'optionalCall', _45 => _45()]), children: t("billing.ui.subscriptions.subscribe") })
1580
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Button, { onClick: () => _optionalChain([onOpenWizard, 'optionalCall', _45 => _45()]), children: t("billing.ui.subscriptions.subscribe") })
1581
1581
  ] })
1582
1582
  ] }),
1583
1583
  subscriptions.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -1601,9 +1601,9 @@ function IntervalToggle({ value, onChange, hasMonthly, hasYearly }) {
1601
1601
  if (!hasMonthly || !hasYearly) {
1602
1602
  return null;
1603
1603
  }
1604
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Tabs, { value, onValueChange: (v) => onChange(v), children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.TabsList, { children: [
1605
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.TabsTrigger, { value: "month", children: t("billing.admin.prices.interval.month") }),
1606
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.TabsTrigger, { value: "year", children: t("billing.admin.prices.interval.year") })
1604
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Tabs, { value, onValueChange: (v) => onChange(v), children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.TabsList, { children: [
1605
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.TabsTrigger, { value: "month", children: t("billing.admin.prices.interval.month") }),
1606
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.TabsTrigger, { value: "year", children: t("billing.admin.prices.interval.year") })
1607
1607
  ] }) });
1608
1608
  }
1609
1609
  _chunk7QVYU63Ejs.__name.call(void 0, IntervalToggle, "IntervalToggle");
@@ -1621,11 +1621,11 @@ function PricingCard({
1621
1621
  onSelect
1622
1622
  }) {
1623
1623
  const t = _nextintl.useTranslations.call(void 0, );
1624
- const fmt = _chunkQI4SCGPBjs.useBillingFormatOptions.call(void 0, );
1624
+ const fmt = _chunkM7FA63QEjs.useBillingFormatOptions.call(void 0, );
1625
1625
  const description = price.description || price.nickname || t("billing.ui.pricing.standard");
1626
1626
  const features = price.features || [];
1627
- const formattedPrice = _chunk77JC2UCFjs.formatCurrency.call(void 0, price.unitAmount, price.currency, fmt);
1628
- const interval = _chunk77JC2UCFjs.formatInterval.call(void 0, price, fmt);
1627
+ const formattedPrice = _chunk5XP5G45Bjs.formatCurrency.call(void 0, price.unitAmount, price.currency, fmt);
1628
+ const interval = _chunk5XP5G45Bjs.formatInterval.call(void 0, price, fmt);
1629
1629
  const handleKeyDown = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (e) => {
1630
1630
  if ((e.key === "Enter" || e.key === " ") && !isDisabled && !isCurrentPlan) {
1631
1631
  e.preventDefault();
@@ -1638,7 +1638,7 @@ function PricingCard({
1638
1638
  }
1639
1639
  }, "handleClick");
1640
1640
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1641
- _chunkQI4SCGPBjs.Card,
1641
+ _chunkM7FA63QEjs.Card,
1642
1642
  {
1643
1643
  role: "radio",
1644
1644
  "aria-checked": isSelected,
@@ -1646,7 +1646,7 @@ function PricingCard({
1646
1646
  tabIndex: isDisabled ? -1 : 0,
1647
1647
  onKeyDown: handleKeyDown,
1648
1648
  onClick: handleClick,
1649
- className: _chunk77JC2UCFjs.cn.call(void 0,
1649
+ className: _chunk5XP5G45Bjs.cn.call(void 0,
1650
1650
  "relative cursor-pointer transition-all duration-200 flex flex-col h-full",
1651
1651
  "focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
1652
1652
  isCurrentPlan && "bg-muted/30",
@@ -1656,9 +1656,9 @@ function PricingCard({
1656
1656
  isLoading && "pointer-events-none"
1657
1657
  ),
1658
1658
  children: [
1659
- isCurrentPlan && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Badge, { variant: "secondary", className: "absolute top-2 end-2", children: t("billing.ui.pricing.current") }),
1660
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.CardHeader, { className: "pb-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "text-sm font-medium", children: description }) }),
1661
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.CardContent, { className: "pb-4 grow", children: [
1659
+ isCurrentPlan && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Badge, { variant: "secondary", className: "absolute top-2 end-2", children: t("billing.ui.pricing.current") }),
1660
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.CardHeader, { className: "pb-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "text-sm font-medium", children: description }) }),
1661
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.CardContent, { className: "pb-4 grow", children: [
1662
1662
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mb-4", children: [
1663
1663
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-3xl font-bold", children: formattedPrice }),
1664
1664
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground ms-1", children: interval })
@@ -1668,8 +1668,8 @@ function PricingCard({
1668
1668
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm text-muted-foreground", children: feature })
1669
1669
  ] }, index)) })
1670
1670
  ] }),
1671
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.CardFooter, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1672
- _chunkQI4SCGPBjs.Button,
1671
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.CardFooter, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1672
+ _chunkM7FA63QEjs.Button,
1673
1673
  {
1674
1674
  variant: isCurrentPlan ? "secondary" : isSelected ? "default" : "outline",
1675
1675
  className: "w-full",
@@ -1702,7 +1702,7 @@ function ProductPricingRow({
1702
1702
  return null;
1703
1703
  }
1704
1704
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-3", children: [
1705
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.SectionHeader, { children: product.name }),
1705
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.SectionHeader, { children: product.name }),
1706
1706
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1707
1707
  "div",
1708
1708
  {
@@ -1803,15 +1803,15 @@ function ProductPricingList({
1803
1803
  _chunk7QVYU63Ejs.__name.call(void 0, ProductPricingList, "ProductPricingList");
1804
1804
  function ProductPricingListSkeleton() {
1805
1805
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "space-y-6", children: [1, 2].map((rowIndex) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-3", children: [
1806
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Skeleton, { className: "h-6 w-32" }),
1806
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Skeleton, { className: "h-6 w-32" }),
1807
1807
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4", children: [1, 2, 3].map((cardIndex) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "p-4 rounded-lg border animate-pulse space-y-3", children: [
1808
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Skeleton, { className: "h-6 w-24" }),
1809
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Skeleton, { className: "h-8 w-32" }),
1808
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Skeleton, { className: "h-6 w-24" }),
1809
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Skeleton, { className: "h-8 w-32" }),
1810
1810
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
1811
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Skeleton, { className: "h-4 w-full" }),
1812
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Skeleton, { className: "h-4 w-3/4" })
1811
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Skeleton, { className: "h-4 w-full" }),
1812
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Skeleton, { className: "h-4 w-3/4" })
1813
1813
  ] }),
1814
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Skeleton, { className: "h-10 w-full" })
1814
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Skeleton, { className: "h-10 w-full" })
1815
1815
  ] }, cardIndex)) })
1816
1816
  ] }, rowIndex)) });
1817
1817
  }
@@ -1822,20 +1822,20 @@ _chunk7QVYU63Ejs.__name.call(void 0, ProductPricingListSkeleton, "ProductPricing
1822
1822
 
1823
1823
  function ProrationPreview({ preview }) {
1824
1824
  const t = _nextintl.useTranslations.call(void 0, );
1825
- const fmt = _chunkQI4SCGPBjs.useBillingFormatOptions.call(void 0, );
1825
+ const fmt = _chunkM7FA63QEjs.useBillingFormatOptions.call(void 0, );
1826
1826
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "bg-primary/10 border-primary/30 rounded-lg border p-4", children: [
1827
1827
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h4", { className: "text-primary mb-3 font-semibold", children: t("billing.ui.proration.title") }),
1828
1828
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
1829
1829
  preview.lineItems.map((item, index) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-between text-sm", children: [
1830
1830
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground", children: item.description }),
1831
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: `font-medium ${item.amount < 0 ? "text-success" : "text-foreground"}`, children: _chunk77JC2UCFjs.formatCurrency.call(void 0, item.amount, preview.currency, fmt) })
1831
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: `font-medium ${item.amount < 0 ? "text-success" : "text-foreground"}`, children: _chunk5XP5G45Bjs.formatCurrency.call(void 0, item.amount, preview.currency, fmt) })
1832
1832
  ] }, index)),
1833
1833
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "border-primary/30 mt-2 border-t pt-2", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-between font-semibold", children: [
1834
1834
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-foreground", children: t("billing.ui.proration.net_due_today") }),
1835
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-foreground", children: _chunk77JC2UCFjs.formatCurrency.call(void 0, preview.immediateCharge, preview.currency, fmt) })
1835
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-foreground", children: _chunk5XP5G45Bjs.formatCurrency.call(void 0, preview.immediateCharge, preview.currency, fmt) })
1836
1836
  ] }) }),
1837
1837
  preview.lineItems.length > 0 && preview.lineItems[0].period && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-muted-foreground mt-2 text-xs", children: t("billing.ui.proration.next_invoice", {
1838
- amount: _chunk77JC2UCFjs.formatCurrency.call(void 0, preview.amountDue, preview.currency, fmt)
1838
+ amount: _chunk5XP5G45Bjs.formatCurrency.call(void 0, preview.amountDue, preview.currency, fmt)
1839
1839
  }) })
1840
1840
  ] })
1841
1841
  ] });
@@ -1848,7 +1848,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, ProrationPreview, "ProrationPreview");
1848
1848
 
1849
1849
  function SubscriptionConfirmation({ price, isLoading, onConfirm, onCancel }) {
1850
1850
  const t = _nextintl.useTranslations.call(void 0, );
1851
- const fmt = _chunkQI4SCGPBjs.useBillingFormatOptions.call(void 0, );
1851
+ const fmt = _chunkM7FA63QEjs.useBillingFormatOptions.call(void 0, );
1852
1852
  const productName = _optionalChain([price, 'access', _51 => _51.product, 'optionalAccess', _52 => _52.name]) || price.nickname || t("billing.ui.wizard.review.selected_plan");
1853
1853
  const productDescription = _optionalChain([price, 'access', _53 => _53.product, 'optionalAccess', _54 => _54.description]) || price.description;
1854
1854
  const features = price.features || [];
@@ -1860,16 +1860,16 @@ function SubscriptionConfirmation({ price, isLoading, onConfirm, onCancel }) {
1860
1860
  productDescription && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-sm text-muted-foreground", children: productDescription })
1861
1861
  ] }),
1862
1862
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-lg font-semibold", children: [
1863
- _chunk77JC2UCFjs.formatCurrency.call(void 0, price.unitAmount, price.currency, fmt),
1864
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm font-normal text-muted-foreground", children: _chunk77JC2UCFjs.formatInterval.call(void 0, price, fmt) })
1863
+ _chunk5XP5G45Bjs.formatCurrency.call(void 0, price.unitAmount, price.currency, fmt),
1864
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm font-normal text-muted-foreground", children: _chunk5XP5G45Bjs.formatInterval.call(void 0, price, fmt) })
1865
1865
  ] }),
1866
1866
  features.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "space-y-1", children: features.map((feature, index) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2 text-sm ", children: [
1867
1867
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Check, { className: "h-4 w-4 text-primary" }),
1868
1868
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: feature })
1869
1869
  ] }, index)) }),
1870
1870
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-end gap-3 pt-2 border-t border-accent/30", children: [
1871
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Button, { variant: "outline", onClick: onCancel, disabled: isLoading, children: t("ui.buttons.cancel") }),
1872
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Button, { onClick: onConfirm, disabled: isLoading, children: isLoading ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
1871
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Button, { variant: "outline", onClick: onCancel, disabled: isLoading, children: t("ui.buttons.cancel") }),
1872
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Button, { onClick: onConfirm, disabled: isLoading, children: isLoading ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
1873
1873
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Loader2, { className: "h-4 w-4 animate-spin me-2" }),
1874
1874
  t("billing.ui.wizard.review.processing")
1875
1875
  ] }) : t("billing.ui.confirmation.subscribe") })
@@ -2060,7 +2060,7 @@ function useSubscriptionWizard({ subscription, onSuccess, onClose }) {
2060
2060
  onCloseRef.current = onClose;
2061
2061
  const checkPaymentMethod = _react.useCallback.call(void 0, async () => {
2062
2062
  try {
2063
- const methods = await _chunk77JC2UCFjs.StripeCustomerService.listPaymentMethods();
2063
+ const methods = await _chunk5XP5G45Bjs.StripeCustomerService.listPaymentMethods();
2064
2064
  dispatch({ type: "SET_HAS_PAYMENT_METHOD", hasMethod: methods.length > 0 });
2065
2065
  } catch (error) {
2066
2066
  console.error("[useSubscriptionWizard] Failed to check payment methods:", error);
@@ -2078,10 +2078,10 @@ function useSubscriptionWizard({ subscription, onSuccess, onClose }) {
2078
2078
  }, []);
2079
2079
  const lookUpAutomaticCode = _react.useCallback.call(void 0, async (priceId) => {
2080
2080
  try {
2081
- const automaticCode = await _chunk77JC2UCFjs.StripeCouponCodeService.findAutomatic({ priceId });
2081
+ const automaticCode = await _chunk5XP5G45Bjs.StripeCouponCodeService.findAutomatic({ priceId });
2082
2082
  dispatch({
2083
2083
  type: "SET_PROMOTION_CODE",
2084
- code: automaticCode ? _chunk77JC2UCFjs.toPromotionCodeResult.call(void 0, automaticCode) : null
2084
+ code: automaticCode ? _chunk5XP5G45Bjs.toPromotionCodeResult.call(void 0, automaticCode) : null
2085
2085
  });
2086
2086
  return true;
2087
2087
  } catch (error) {
@@ -2108,7 +2108,7 @@ function useSubscriptionWizard({ subscription, onSuccess, onClose }) {
2108
2108
  const isTrialUpgrade = _optionalChain([subscription, 'optionalAccess', _61 => _61.status]) === "trialing" /* TRIALING */;
2109
2109
  dispatch({ type: "SET_IS_TRIAL_SUBSCRIPTION", isTrial: isTrialUpgrade });
2110
2110
  if (isTrialUpgrade && !state.hasPaymentMethod) {
2111
- const methods = await _chunk77JC2UCFjs.StripeCustomerService.listPaymentMethods();
2111
+ const methods = await _chunk5XP5G45Bjs.StripeCustomerService.listPaymentMethods();
2112
2112
  if (methods.length === 0) {
2113
2113
  dispatch({ type: "SET_STEP", step: "payment-method" });
2114
2114
  dispatch({
@@ -2126,7 +2126,7 @@ function useSubscriptionWizard({ subscription, onSuccess, onClose }) {
2126
2126
  }
2127
2127
  }
2128
2128
  if (subscription && state.selectedPrice.id !== _optionalChain([subscription, 'access', _62 => _62.price, 'optionalAccess', _63 => _63.id])) {
2129
- const preview = await _chunk77JC2UCFjs.StripeSubscriptionService.getProrationPreview({
2129
+ const preview = await _chunk5XP5G45Bjs.StripeSubscriptionService.getProrationPreview({
2130
2130
  subscriptionId: subscription.id,
2131
2131
  newPriceId: state.selectedPrice.id
2132
2132
  });
@@ -2160,14 +2160,14 @@ function useSubscriptionWizard({ subscription, onSuccess, onClose }) {
2160
2160
  newPriceId: state.selectedPrice.id,
2161
2161
  promotionCode: promotionCodeToSend(state.promotionCode)
2162
2162
  };
2163
- result = await _chunk77JC2UCFjs.StripeSubscriptionService.changePlanWithMeta(changePlanParams);
2163
+ result = await _chunk5XP5G45Bjs.StripeSubscriptionService.changePlanWithMeta(changePlanParams);
2164
2164
  } else {
2165
2165
  const createParams = {
2166
2166
  id: _uuid.v4.call(void 0, ),
2167
2167
  priceId: state.selectedPrice.id,
2168
2168
  promotionCode: promotionCodeToSend(state.promotionCode)
2169
2169
  };
2170
- result = await _chunk77JC2UCFjs.StripeSubscriptionService.createSubscription(createParams);
2170
+ result = await _chunk5XP5G45Bjs.StripeSubscriptionService.createSubscription(createParams);
2171
2171
  }
2172
2172
  const clientSecret = clientSecretToConfirm(result.meta);
2173
2173
  if (clientSecret) {
@@ -2183,7 +2183,7 @@ function useSubscriptionWizard({ subscription, onSuccess, onClose }) {
2183
2183
  const subscriptionId = subscriptionIdToSync(result.subscription, subscription);
2184
2184
  if (subscriptionId) {
2185
2185
  try {
2186
- await _chunk77JC2UCFjs.StripeSubscriptionService.syncSubscription({ subscriptionId });
2186
+ await _chunk5XP5G45Bjs.StripeSubscriptionService.syncSubscription({ subscriptionId });
2187
2187
  } catch (syncError) {
2188
2188
  console.error("[useSubscriptionWizard] Subscription sync after payment failed:", syncError);
2189
2189
  }
@@ -2231,7 +2231,7 @@ function useSubscriptionWizard({ subscription, onSuccess, onClose }) {
2231
2231
  dispatch({ type: "SET_VALIDATING_PROMO_CODE", isValidating: true });
2232
2232
  dispatch({ type: "SET_PROMO_CODE_ERROR", error: null });
2233
2233
  try {
2234
- const result = await _chunk77JC2UCFjs.StripePromotionCodeService.validatePromotionCode({
2234
+ const result = await _chunk5XP5G45Bjs.StripePromotionCodeService.validatePromotionCode({
2235
2235
  code,
2236
2236
  stripePriceId: _optionalChain([state, 'access', _72 => _72.selectedPrice, 'optionalAccess', _73 => _73.id]),
2237
2237
  language: locale
@@ -2356,7 +2356,7 @@ function WizardStepPlanSelection({
2356
2356
  _react.useEffect.call(void 0, () => {
2357
2357
  const loadProducts = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
2358
2358
  try {
2359
- const fetchedProducts = await _chunk77JC2UCFjs.StripeProductService.listProducts({ active: true });
2359
+ const fetchedProducts = await _chunk5XP5G45Bjs.StripeProductService.listProducts({ active: true });
2360
2360
  setProducts(fetchedProducts);
2361
2361
  } catch (error) {
2362
2362
  console.error("[WizardStepPlanSelection] Failed to load products:", error);
@@ -2407,7 +2407,7 @@ function WizardStepPlanSelection({
2407
2407
  onSelectPrice: handleSelectPrice
2408
2408
  }
2409
2409
  ),
2410
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex justify-end pt-4 border-t", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Button, { onClick: onNext, disabled: !selectedPrice || isProcessing, children: isProcessing ? t("common.loading") : t("billing.ui.wizard.next_review") }) })
2410
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex justify-end pt-4 border-t", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Button, { onClick: onNext, disabled: !selectedPrice || isProcessing, children: isProcessing ? t("common.loading") : t("billing.ui.wizard.next_review") }) })
2411
2411
  ] });
2412
2412
  }
2413
2413
  _chunk7QVYU63Ejs.__name.call(void 0, WizardStepPlanSelection, "WizardStepPlanSelection");
@@ -2460,7 +2460,7 @@ function PromoCodeInput({
2460
2460
  }
2461
2461
  const amount = (result.discountValue || 0) / 100;
2462
2462
  const currency = _optionalChain([result, 'access', _83 => _83.currency, 'optionalAccess', _84 => _84.toUpperCase, 'call', _85 => _85()]) || "USD";
2463
- return t("billing.ui.wizard.review.amount_off", { amount: `${currency} ${_chunk77JC2UCFjs.formatFixed.call(void 0, amount, locale, 2)}` });
2463
+ return t("billing.ui.wizard.review.amount_off", { amount: `${currency} ${_chunk5XP5G45Bjs.formatFixed.call(void 0, amount, locale, 2)}` });
2464
2464
  }, "formatDiscount");
2465
2465
  const formatDuration = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (result) => {
2466
2466
  switch (result.duration) {
@@ -2477,7 +2477,7 @@ function PromoCodeInput({
2477
2477
  const codeInput = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
2478
2478
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex gap-2", children: [
2479
2479
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2480
- _chunkQI4SCGPBjs.Input,
2480
+ _chunkM7FA63QEjs.Input,
2481
2481
  {
2482
2482
  placeholder: t("billing.ui.promo_code.placeholder"),
2483
2483
  value: code,
@@ -2487,7 +2487,7 @@ function PromoCodeInput({
2487
2487
  className: "flex-1"
2488
2488
  }
2489
2489
  ),
2490
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Button, { variant: "outline", onClick: handleApply, disabled: disabled || isValidating || !code.trim(), children: isValidating ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Loader2, { className: "h-4 w-4 animate-spin" }) : t("billing.ui.promo_code.apply") })
2490
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Button, { variant: "outline", onClick: handleApply, disabled: disabled || isValidating || !code.trim(), children: isValidating ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Loader2, { className: "h-4 w-4 animate-spin" }) : t("billing.ui.promo_code.apply") })
2491
2491
  ] }),
2492
2492
  error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error })
2493
2493
  ] });
@@ -2516,7 +2516,7 @@ function PromoCodeInput({
2516
2516
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-success text-sm", children: formatDiscount(appliedCode) })
2517
2517
  ] }),
2518
2518
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2519
- _chunkQI4SCGPBjs.Button,
2519
+ _chunkM7FA63QEjs.Button,
2520
2520
  {
2521
2521
  variant: "ghost",
2522
2522
  size: "sm",
@@ -2564,7 +2564,7 @@ function WizardStepReview({
2564
2564
  isTrialUpgrade
2565
2565
  }) {
2566
2566
  const t = _nextintl.useTranslations.call(void 0, );
2567
- const fmt = _chunkQI4SCGPBjs.useBillingFormatOptions.call(void 0, );
2567
+ const fmt = _chunkM7FA63QEjs.useBillingFormatOptions.call(void 0, );
2568
2568
  const [card, setCard] = _react.useState.call(void 0, null);
2569
2569
  _react.useEffect.call(void 0, () => {
2570
2570
  if (!hasPaymentMethod) {
@@ -2572,7 +2572,7 @@ function WizardStepReview({
2572
2572
  return;
2573
2573
  }
2574
2574
  let cancelled = false;
2575
- Promise.all([_chunk77JC2UCFjs.StripeCustomerService.listPaymentMethods(), _chunk77JC2UCFjs.StripeCustomerService.getCustomer()]).then(([methods, customer]) => {
2575
+ Promise.all([_chunk5XP5G45Bjs.StripeCustomerService.listPaymentMethods(), _chunk5XP5G45Bjs.StripeCustomerService.getCustomer()]).then(([methods, customer]) => {
2576
2576
  if (!cancelled) setCard(reviewCard(methods, _optionalChain([customer, 'optionalAccess', _90 => _90.defaultPaymentMethodId])));
2577
2577
  }).catch((err) => {
2578
2578
  console.error("[WizardStepReview] Failed to load the card on file:", err);
@@ -2591,11 +2591,11 @@ function WizardStepReview({
2591
2591
  const interval = _optionalChain([price, 'access', _93 => _93.recurring, 'optionalAccess', _94 => _94.interval]) || "month";
2592
2592
  return interval === "year" ? t("billing.ui.wizard.review.interval_yearly") : t("billing.ui.wizard.review.interval_monthly");
2593
2593
  }, "formatInterval");
2594
- const codeDiscount = _chunkQI4SCGPBjs.promotionCodeDiscount.call(void 0, promotionCode);
2595
- const carriedDiscount = isChangingPlan && !codeDiscount ? _chunkQI4SCGPBjs.subscriptionDiscount.call(void 0, subscription) : null;
2594
+ const codeDiscount = _chunkM7FA63QEjs.promotionCodeDiscount.call(void 0, promotionCode);
2595
+ const carriedDiscount = isChangingPlan && !codeDiscount ? _chunkM7FA63QEjs.subscriptionDiscount.call(void 0, subscription) : null;
2596
2596
  const discount = _nullishCoalesce(codeDiscount, () => ( carriedDiscount));
2597
- const discountedPrice = _chunkQI4SCGPBjs.applyDiscount.call(void 0, selectedPrice.unitAmount, discount);
2598
- const discountedImmediateCharge = _chunkQI4SCGPBjs.applyDiscount.call(void 0, _optionalChain([prorationPreview, 'optionalAccess', _95 => _95.immediateCharge]), discount);
2597
+ const discountedPrice = _chunkM7FA63QEjs.applyDiscount.call(void 0, selectedPrice.unitAmount, discount);
2598
+ const discountedImmediateCharge = _chunkM7FA63QEjs.applyDiscount.call(void 0, _optionalChain([prorationPreview, 'optionalAccess', _95 => _95.immediateCharge]), discount);
2599
2599
  const isProrationCredit = !isTrialUpgrade && (_nullishCoalesce(_nullishCoalesce(discountedImmediateCharge, () => ( _optionalChain([prorationPreview, 'optionalAccess', _96 => _96.immediateCharge]))), () => ( 0))) < 0;
2600
2600
  const prorationAmount = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (amount) => isProrationCredit ? Math.abs(amount) : amount, "prorationAmount");
2601
2601
  const getDiscountDescription = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
@@ -2604,13 +2604,13 @@ function WizardStepReview({
2604
2604
  return t("billing.ui.wizard.review.percent_off", { value: discount.discountValue });
2605
2605
  }
2606
2606
  return t("billing.ui.wizard.review.amount_off", {
2607
- amount: _chunk77JC2UCFjs.formatCurrency.call(void 0, discount.discountValue, discount.currency || selectedPrice.currency, fmt)
2607
+ amount: _chunk5XP5G45Bjs.formatCurrency.call(void 0, discount.discountValue, discount.currency || selectedPrice.currency, fmt)
2608
2608
  });
2609
2609
  }, "getDiscountDescription");
2610
2610
  const discountDescription = getDiscountDescription();
2611
2611
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-6", children: [
2612
2612
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "bg-muted/50 rounded-lg p-4 space-y-3", children: [
2613
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.SectionHeader, { children: t("billing.ui.wizard.review.selected_plan") }),
2613
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.SectionHeader, { children: t("billing.ui.wizard.review.selected_plan") }),
2614
2614
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-between items-center", children: [
2615
2615
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { children: [
2616
2616
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "font-medium", children: _optionalChain([selectedPrice, 'access', _97 => _97.product, 'optionalAccess', _98 => _98.name]) }),
@@ -2618,11 +2618,11 @@ function WizardStepReview({
2618
2618
  ] }),
2619
2619
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-end", children: [
2620
2620
  discountedPrice !== null ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
2621
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-muted-foreground line-through", children: _chunk77JC2UCFjs.formatCurrency.call(void 0, selectedPrice.unitAmount || 0, selectedPrice.currency, fmt) }),
2622
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-success text-lg font-semibold", children: _chunk77JC2UCFjs.formatCurrency.call(void 0, discountedPrice, selectedPrice.currency, fmt) }),
2623
- discountDescription && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Badge, { variant: "softGreen", children: discountDescription }),
2621
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-muted-foreground line-through", children: _chunk5XP5G45Bjs.formatCurrency.call(void 0, selectedPrice.unitAmount || 0, selectedPrice.currency, fmt) }),
2622
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-success text-lg font-semibold", children: _chunk5XP5G45Bjs.formatCurrency.call(void 0, discountedPrice, selectedPrice.currency, fmt) }),
2623
+ discountDescription && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Badge, { variant: "softGreen", children: discountDescription }),
2624
2624
  carriedDiscount && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-muted-foreground", children: t("billing.ui.wizard.review.discount_carries_over") })
2625
- ] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "font-semibold text-lg", children: _chunk77JC2UCFjs.formatCurrency.call(void 0, selectedPrice.unitAmount || 0, selectedPrice.currency, fmt) }),
2625
+ ] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "font-semibold text-lg", children: _chunk5XP5G45Bjs.formatCurrency.call(void 0, selectedPrice.unitAmount || 0, selectedPrice.currency, fmt) }),
2626
2626
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-muted-foreground", children: formatInterval2(selectedPrice) })
2627
2627
  ] })
2628
2628
  ] })
@@ -2637,9 +2637,9 @@ function WizardStepReview({
2637
2637
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-between text-sm", children: [
2638
2638
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: `${isTrialUpgrade ? "text-warning" : "text-muted-foreground"}`, children: isTrialUpgrade ? t("billing.ui.wizard.review.charge_now") : isProrationCredit ? t("billing.ui.wizard.review.credit_now") : t("billing.ui.wizard.review.due_now") }),
2639
2639
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: `font-medium ${isTrialUpgrade ? "text-warning" : "text-foreground"}`, children: discountedImmediateCharge !== null ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
2640
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "line-through text-muted-foreground me-2", children: _chunk77JC2UCFjs.formatCurrency.call(void 0, prorationAmount(prorationPreview.immediateCharge), prorationPreview.currency, fmt) }),
2641
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-success", children: _chunk77JC2UCFjs.formatCurrency.call(void 0, prorationAmount(discountedImmediateCharge), prorationPreview.currency, fmt) })
2642
- ] }) : _chunk77JC2UCFjs.formatCurrency.call(void 0, prorationAmount(prorationPreview.immediateCharge), prorationPreview.currency, fmt) })
2640
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "line-through text-muted-foreground me-2", children: _chunk5XP5G45Bjs.formatCurrency.call(void 0, prorationAmount(prorationPreview.immediateCharge), prorationPreview.currency, fmt) }),
2641
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-success", children: _chunk5XP5G45Bjs.formatCurrency.call(void 0, prorationAmount(discountedImmediateCharge), prorationPreview.currency, fmt) })
2642
+ ] }) : _chunk5XP5G45Bjs.formatCurrency.call(void 0, prorationAmount(prorationPreview.immediateCharge), prorationPreview.currency, fmt) })
2643
2643
  ] })
2644
2644
  ]
2645
2645
  }
@@ -2663,15 +2663,15 @@ function WizardStepReview({
2663
2663
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h4", { className: "font-medium", children: t("billing.ui.payment_method.title") }),
2664
2664
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-muted-foreground", children: hasPaymentMethod ? card ? t("billing.ui.wizard.review.card_on_file", { brand: card.brand, last4: card.last4 }) : t("billing.ui.wizard.review.payment_on_file") : t("billing.ui.wizard.review.no_payment_on_file") })
2665
2665
  ] }),
2666
- hasPaymentMethod ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Button, { variant: "outline", onClick: onAddPaymentMethod, disabled: isProcessing, children: t("billing.ui.wizard.review.use_another_card") }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Button, { variant: "outline", onClick: onAddPaymentMethod, children: t("billing.ui.payment_methods.add") })
2666
+ hasPaymentMethod ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Button, { variant: "outline", onClick: onAddPaymentMethod, disabled: isProcessing, children: t("billing.ui.wizard.review.use_another_card") }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Button, { variant: "outline", onClick: onAddPaymentMethod, children: t("billing.ui.payment_methods.add") })
2667
2667
  ] }) }),
2668
- error && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.Alert, { variant: "destructive", children: [
2668
+ error && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.Alert, { variant: "destructive", children: [
2669
2669
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.AlertCircle, { className: "h-4 w-4" }),
2670
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.AlertDescription, { children: error })
2670
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.AlertDescription, { children: error })
2671
2671
  ] }),
2672
2672
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-between pt-4 border-t", children: [
2673
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Button, { variant: "outline", onClick: onBack, disabled: isProcessing, children: t("billing.ui.wizard.back") }),
2674
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Button, { onClick: hasPaymentMethod ? onConfirm : onAddPaymentMethod, disabled: isProcessing, children: isProcessing ? t("billing.ui.wizard.review.processing") : hasPaymentMethod ? isChangingPlan ? t("billing.ui.wizard.review.confirm_change") : t("billing.ui.wizard.review.subscribe_now") : t("billing.ui.payment_methods.add") })
2673
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Button, { variant: "outline", onClick: onBack, disabled: isProcessing, children: t("billing.ui.wizard.back") }),
2674
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Button, { onClick: hasPaymentMethod ? onConfirm : onAddPaymentMethod, disabled: isProcessing, children: isProcessing ? t("billing.ui.wizard.review.processing") : hasPaymentMethod ? isChangingPlan ? t("billing.ui.wizard.review.confirm_change") : t("billing.ui.wizard.review.subscribe_now") : t("billing.ui.payment_methods.add") })
2675
2675
  ] })
2676
2676
  ] });
2677
2677
  }
@@ -2684,7 +2684,7 @@ function WizardStepPaymentMethod({ onBack, onSuccess, isProcessing }) {
2684
2684
  const t = _nextintl.useTranslations.call(void 0, );
2685
2685
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-6", children: [
2686
2686
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-center", children: [
2687
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.SectionHeader, { children: t("billing.ui.payment_methods.add") }),
2687
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.SectionHeader, { children: t("billing.ui.payment_methods.add") }),
2688
2688
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-muted-foreground", children: t("billing.ui.wizard.payment_description") })
2689
2689
  ] }),
2690
2690
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PaymentMethodForm, { onSuccess, onCancel: onBack, isLoading: isProcessing, alwaysSetDefault: true })
@@ -2727,10 +2727,10 @@ function SubscriptionWizard({
2727
2727
  const isChangePlanMode = !!subscription;
2728
2728
  const dialogTitle = subscription ? t("billing.ui.wizard.change_title") : isPurchasingAddons ? t("billing.ui.subscriptions.purchase_addons") : t("billing.ui.subscriptions.subscribe");
2729
2729
  const dialogDescription = subscription ? t("billing.ui.wizard.change_description") : isPurchasingAddons ? t("billing.ui.wizard.addons_description") : t("billing.ui.wizard.subscribe_description");
2730
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.DialogContent, { className: "max-w-2xl max-h-[90vh] overflow-y-auto", children: [
2731
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.DialogHeader, { children: [
2732
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.DialogTitle, { children: dialogTitle }),
2733
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.DialogDescription, { children: dialogDescription })
2730
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.DialogContent, { className: "max-w-2xl max-h-[90vh] overflow-y-auto", children: [
2731
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.DialogHeader, { children: [
2732
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.DialogTitle, { children: dialogTitle }),
2733
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.DialogDescription, { children: dialogDescription })
2734
2734
  ] }),
2735
2735
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, WizardProgressIndicator, { currentStep: state.step }),
2736
2736
  state.step === "plan-selection" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -2802,7 +2802,7 @@ function formatDate2(date, { dateLocale, t }) {
2802
2802
  _chunk7QVYU63Ejs.__name.call(void 0, formatDate2, "formatDate");
2803
2803
  function UsageSummaryCard({ meter, summary }) {
2804
2804
  const t = _nextintl.useTranslations.call(void 0, );
2805
- const fmt = _chunkQI4SCGPBjs.useBillingFormatOptions.call(void 0, );
2805
+ const fmt = _chunkM7FA63QEjs.useBillingFormatOptions.call(void 0, );
2806
2806
  const currentUsage = _nullishCoalesce(_optionalChain([summary, 'optionalAccess', _101 => _101.aggregatedValue]), () => ( 0));
2807
2807
  const limit = meter.limit;
2808
2808
  const percentage = limit && limit > 0 ? currentUsage / limit * 100 : null;
@@ -2810,15 +2810,15 @@ function UsageSummaryCard({ meter, summary }) {
2810
2810
  const progressWidth = percentage !== null ? Math.min(percentage, 100) : 0;
2811
2811
  const displayName = meter.displayName || meter.eventName;
2812
2812
  const hasLimit = limit !== null && limit !== void 0;
2813
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.Card, { children: [
2814
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.CardHeader, { className: "flex flex-row items-center gap-x-3 pb-3", children: [
2813
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.Card, { children: [
2814
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.CardHeader, { className: "flex flex-row items-center gap-x-3 pb-3", children: [
2815
2815
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex h-10 w-10 items-center justify-center rounded-lg bg-blue-100 text-blue-600", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Activity, { className: "h-5 w-5" }) }),
2816
2816
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col", children: [
2817
2817
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "text-sm font-medium", children: displayName }),
2818
2818
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground text-xs", children: meter.id })
2819
2819
  ] })
2820
2820
  ] }),
2821
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.CardContent, { className: "flex flex-col gap-y-4", children: [
2821
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.CardContent, { className: "flex flex-col gap-y-4", children: [
2822
2822
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { children: [
2823
2823
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-3xl font-bold", children: currentUsage.toLocaleString(fmt.locale) }),
2824
2824
  hasLimit && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground text-sm", children: t("billing.ui.usage.of_limit_used", { limit: limit.toLocaleString(fmt.locale) }) })
@@ -2826,7 +2826,7 @@ function UsageSummaryCard({ meter, summary }) {
2826
2826
  hasLimit ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-y-2", children: [
2827
2827
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-2 w-full overflow-hidden rounded-full bg-gray-200", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: `h-full transition-all ${progressColor}`, style: { width: `${progressWidth}%` } }) }),
2828
2828
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground text-sm", children: t("billing.ui.usage.percent_used", {
2829
- value: percentage !== null ? _chunk77JC2UCFjs.formatFixed.call(void 0, percentage, fmt.locale, 1) : ""
2829
+ value: percentage !== null ? _chunk5XP5G45Bjs.formatFixed.call(void 0, percentage, fmt.locale, 1) : ""
2830
2830
  }) })
2831
2831
  ] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground text-sm", children: t("billing.ui.usage.no_limit") }),
2832
2832
  summary && summary.start && summary.end && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "border-t pt-3", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground text-xs", children: t("billing.ui.usage.period", {
@@ -2859,14 +2859,14 @@ function UsageContainer() {
2859
2859
  const loadUsageData = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
2860
2860
  setLoading(true);
2861
2861
  try {
2862
- const fetchedSubscriptions = await _chunk77JC2UCFjs.StripeSubscriptionService.listSubscriptions();
2862
+ const fetchedSubscriptions = await _chunk5XP5G45Bjs.StripeSubscriptionService.listSubscriptions();
2863
2863
  setSubscriptions(fetchedSubscriptions);
2864
2864
  const hasMeteredSubscriptions2 = fetchedSubscriptions.some((sub) => _optionalChain([sub, 'access', _102 => _102.price, 'optionalAccess', _103 => _103.recurring, 'optionalAccess', _104 => _104.usageType]) === "metered");
2865
2865
  if (!hasMeteredSubscriptions2) {
2866
2866
  setLoading(false);
2867
2867
  return;
2868
2868
  }
2869
- const fetchedMeters = await _chunk77JC2UCFjs.StripeUsageService.listMeters();
2869
+ const fetchedMeters = await _chunk5XP5G45Bjs.StripeUsageService.listMeters();
2870
2870
  setMeters(fetchedMeters);
2871
2871
  const summariesMap = {};
2872
2872
  const now = /* @__PURE__ */ new Date();
@@ -2874,7 +2874,7 @@ function UsageContainer() {
2874
2874
  const endOfMonth = new Date(now.getFullYear(), now.getMonth() + 1, 0, 23, 59, 59, 999);
2875
2875
  for (const meter of fetchedMeters) {
2876
2876
  try {
2877
- const meterSummaries = await _chunk77JC2UCFjs.StripeUsageService.getMeterSummaries({
2877
+ const meterSummaries = await _chunk5XP5G45Bjs.StripeUsageService.getMeterSummaries({
2878
2878
  meterId: meter.id,
2879
2879
  startTime: startOfMonth,
2880
2880
  endTime: endOfMonth
@@ -2926,27 +2926,27 @@ function formatDateTime(date, { dateLocale, t }) {
2926
2926
  _chunk7QVYU63Ejs.__name.call(void 0, formatDateTime, "formatDateTime");
2927
2927
  function UsageHistoryTable({ usageRecords }) {
2928
2928
  const t = _nextintl.useTranslations.call(void 0, );
2929
- const fmt = _chunkQI4SCGPBjs.useBillingFormatOptions.call(void 0, );
2929
+ const fmt = _chunkM7FA63QEjs.useBillingFormatOptions.call(void 0, );
2930
2930
  if (usageRecords.length === 0) {
2931
2931
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rounded-lg border p-8 text-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground", children: t("billing.ui.usage.history_empty") }) });
2932
2932
  }
2933
2933
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-y-4", children: [
2934
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.SectionHeader, { level: 2, children: t("billing.ui.usage.history_title") }),
2935
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "overflow-clip rounded-lg border", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.Table, { children: [
2936
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.TableHeader, { className: "bg-muted", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.TableRow, { children: [
2937
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.TableHead, { children: t("billing.ui.columns.date_time") }),
2938
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.TableHead, { children: t("billing.ui.columns.meter_event") }),
2939
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.TableHead, { className: "text-end", children: t("billing.ui.columns.quantity") }),
2940
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.TableHead, { children: t("billing.ui.columns.event_id") })
2934
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.SectionHeader, { level: 2, children: t("billing.ui.usage.history_title") }),
2935
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "overflow-clip rounded-lg border", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.Table, { children: [
2936
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.TableHeader, { className: "bg-muted", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.TableRow, { children: [
2937
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.TableHead, { children: t("billing.ui.columns.date_time") }),
2938
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.TableHead, { children: t("billing.ui.columns.meter_event") }),
2939
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.TableHead, { className: "text-end", children: t("billing.ui.columns.quantity") }),
2940
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.TableHead, { children: t("billing.ui.columns.event_id") })
2941
2941
  ] }) }),
2942
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.TableBody, { children: usageRecords.map((record) => {
2942
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.TableBody, { children: usageRecords.map((record) => {
2943
2943
  const dateTime = formatDateTime(record.timestamp, fmt);
2944
2944
  const quantity = record.quantity.toLocaleString(fmt.locale);
2945
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.TableRow, { children: [
2946
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.TableCell, { className: "font-medium", children: dateTime }),
2947
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.TableCell, { className: "text-muted-foreground", children: record.meterEventName }),
2948
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.TableCell, { className: "text-end font-medium", children: quantity }),
2949
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.TableCell, { className: "text-muted-foreground text-sm tabular-nums", children: record.stripeEventId })
2945
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.TableRow, { children: [
2946
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.TableCell, { className: "font-medium", children: dateTime }),
2947
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.TableCell, { className: "text-muted-foreground", children: record.meterEventName }),
2948
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.TableCell, { className: "text-end font-medium", children: quantity }),
2949
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.TableCell, { className: "text-muted-foreground text-sm tabular-nums", children: record.stripeEventId })
2950
2950
  ] }, record.id);
2951
2951
  }) })
2952
2952
  ] }) })
@@ -2957,8 +2957,8 @@ _chunk7QVYU63Ejs.__name.call(void 0, UsageHistoryTable, "UsageHistoryTable");
2957
2957
  // src/features/billing/components/modals/BillingDetailModal.tsx
2958
2958
 
2959
2959
  function BillingDetailModal({ open, onOpenChange, title, children, className }) {
2960
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.DialogContent, { className: _nullishCoalesce(className, () => ( "max-w-4xl max-h-[90vh] overflow-y-auto")), children: [
2961
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.DialogHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.DialogTitle, { children: title }) }),
2960
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.DialogContent, { className: _nullishCoalesce(className, () => ( "max-w-4xl max-h-[90vh] overflow-y-auto")), children: [
2961
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.DialogHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.DialogTitle, { children: title }) }),
2962
2962
  children
2963
2963
  ] }) });
2964
2964
  }
@@ -2986,7 +2986,7 @@ function BillingAlertBanner({ subscription, onUpdatePayment, onAddPayment }) {
2986
2986
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "text-destructive text-sm font-medium", children: t("billing.ui.alert.payment_failed_title") }),
2987
2987
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive mt-1 text-sm", children: t("billing.ui.alert.payment_failed_description") })
2988
2988
  ] }),
2989
- onUpdatePayment && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Button, { variant: "outline", size: "sm", onClick: onUpdatePayment, className: "text-destructive border-red-300", children: t("billing.ui.alert.update_payment_method") })
2989
+ onUpdatePayment && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Button, { variant: "outline", size: "sm", onClick: onUpdatePayment, className: "text-destructive border-red-300", children: t("billing.ui.alert.update_payment_method") })
2990
2990
  ] });
2991
2991
  }
2992
2992
  if (subscription.status === "trialing" /* TRIALING */ && subscription.trialEnd) {
@@ -3000,7 +3000,7 @@ function BillingAlertBanner({ subscription, onUpdatePayment, onAddPayment }) {
3000
3000
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "text-warning text-sm font-medium", children: t("billing.ui.alert.trial_ending_title") }),
3001
3001
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-warning mt-1 text-sm", children: t("billing.ui.alert.trial_ending_description", { count: daysRemaining }) })
3002
3002
  ] }),
3003
- onAddPayment && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Button, { variant: "outline", size: "sm", onClick: onAddPayment, className: "text-warning border-yellow-300", children: t("billing.ui.payment_methods.add") })
3003
+ onAddPayment && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Button, { variant: "outline", size: "sm", onClick: onAddPayment, className: "text-warning border-yellow-300", children: t("billing.ui.payment_methods.add") })
3004
3004
  ] });
3005
3005
  }
3006
3006
  }
@@ -3053,7 +3053,7 @@ function BillingDashboardContainer({ renderCancelDialog } = {}) {
3053
3053
  setNoCustomerExists(false);
3054
3054
  let customer = null;
3055
3055
  try {
3056
- customer = await _chunk77JC2UCFjs.StripeCustomerService.getCustomer();
3056
+ customer = await _chunk5XP5G45Bjs.StripeCustomerService.getCustomer();
3057
3057
  setData((prev) => ({ ...prev, customer }));
3058
3058
  setErrors((prev) => ({ ...prev, customer: null }));
3059
3059
  setNoCustomerExists(false);
@@ -3079,7 +3079,7 @@ function BillingDashboardContainer({ renderCancelDialog } = {}) {
3079
3079
  }
3080
3080
  const fetchSubscriptions = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
3081
3081
  try {
3082
- const subscriptions2 = await _chunk77JC2UCFjs.StripeSubscriptionService.listSubscriptions();
3082
+ const subscriptions2 = await _chunk5XP5G45Bjs.StripeSubscriptionService.listSubscriptions();
3083
3083
  setData((prev) => ({ ...prev, subscriptions: subscriptions2 }));
3084
3084
  setErrors((prev) => ({ ...prev, subscriptions: null }));
3085
3085
  return subscriptions2;
@@ -3093,7 +3093,7 @@ function BillingDashboardContainer({ renderCancelDialog } = {}) {
3093
3093
  }, "fetchSubscriptions");
3094
3094
  const fetchPaymentMethods = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
3095
3095
  try {
3096
- const paymentMethods = await _chunk77JC2UCFjs.StripeCustomerService.listPaymentMethods();
3096
+ const paymentMethods = await _chunk5XP5G45Bjs.StripeCustomerService.listPaymentMethods();
3097
3097
  setData((prev) => ({ ...prev, paymentMethods }));
3098
3098
  setErrors((prev) => ({ ...prev, paymentMethods: null }));
3099
3099
  } catch (error) {
@@ -3105,7 +3105,7 @@ function BillingDashboardContainer({ renderCancelDialog } = {}) {
3105
3105
  }, "fetchPaymentMethods");
3106
3106
  const fetchInvoices = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
3107
3107
  try {
3108
- const invoices = await _chunk77JC2UCFjs.StripeInvoiceService.listInvoices();
3108
+ const invoices = await _chunk5XP5G45Bjs.StripeInvoiceService.listInvoices();
3109
3109
  setData((prev) => ({ ...prev, invoices }));
3110
3110
  setErrors((prev) => ({ ...prev, invoices: null }));
3111
3111
  } catch (error) {
@@ -3128,7 +3128,7 @@ function BillingDashboardContainer({ renderCancelDialog } = {}) {
3128
3128
  const handleCreateCustomer = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
3129
3129
  setCreatingCustomer(true);
3130
3130
  try {
3131
- await _chunk77JC2UCFjs.StripeCustomerService.createCustomer();
3131
+ await _chunk5XP5G45Bjs.StripeCustomerService.createCustomer();
3132
3132
  setNoCustomerExists(false);
3133
3133
  await fetchAllData();
3134
3134
  } catch (error) {
@@ -3140,7 +3140,7 @@ function BillingDashboardContainer({ renderCancelDialog } = {}) {
3140
3140
  }, "handleCreateCustomer");
3141
3141
  const fetchUsageData = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
3142
3142
  try {
3143
- const meters = await _chunk77JC2UCFjs.StripeUsageService.listMeters();
3143
+ const meters = await _chunk5XP5G45Bjs.StripeUsageService.listMeters();
3144
3144
  setData((prev) => ({ ...prev, meters }));
3145
3145
  const summariesMap = {};
3146
3146
  const now = /* @__PURE__ */ new Date();
@@ -3148,7 +3148,7 @@ function BillingDashboardContainer({ renderCancelDialog } = {}) {
3148
3148
  const endOfMonth = new Date(now.getFullYear(), now.getMonth() + 1, 0, 23, 59, 59, 999);
3149
3149
  for (const meter of meters) {
3150
3150
  try {
3151
- const meterSummaries = await _chunk77JC2UCFjs.StripeUsageService.getMeterSummaries({
3151
+ const meterSummaries = await _chunk5XP5G45Bjs.StripeUsageService.getMeterSummaries({
3152
3152
  meterId: meter.id,
3153
3153
  startTime: startOfMonth,
3154
3154
  endTime: endOfMonth
@@ -3210,7 +3210,7 @@ function BillingDashboardContainer({ renderCancelDialog } = {}) {
3210
3210
  _react.useEffect.call(void 0, () => {
3211
3211
  if (!pendingChangePlan || loading.subscriptions) return;
3212
3212
  setPendingChangePlan(false);
3213
- handleOpenWizard(_chunk77JC2UCFjs.resolveChangePlanTarget.call(void 0, data.subscriptions));
3213
+ handleOpenWizard(_chunk5XP5G45Bjs.resolveChangePlanTarget.call(void 0, data.subscriptions));
3214
3214
  }, [pendingChangePlan, loading.subscriptions, data.subscriptions, handleOpenWizard]);
3215
3215
  const criticalSubscriptions = data.subscriptions.filter(
3216
3216
  (sub) => sub.status === "past_due" /* PAST_DUE */ || sub.status === "trialing" /* TRIALING */ && sub.trialEnd && new Date(sub.trialEnd).getTime() - (/* @__PURE__ */ new Date()).getTime() <= 7 * 24 * 60 * 60 * 1e3
@@ -3241,18 +3241,18 @@ function BillingDashboardContainer({ renderCancelDialog } = {}) {
3241
3241
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Wallet, { className: "h-8 w-8" }),
3242
3242
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h1", { className: "text-primary text-3xl font-semibold", children: t("billing.title") })
3243
3243
  ] }),
3244
- isInitialLoading && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Card, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.CardContent, { className: "flex items-center justify-center py-12", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Loader2, { className: "h-8 w-8 animate-spin text-muted-foreground" }) }) }),
3245
- noCustomerExists && !isInitialLoading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.Card, { children: [
3246
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.CardHeader, { className: "text-center", children: [
3244
+ isInitialLoading && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Card, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.CardContent, { className: "flex items-center justify-center py-12", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Loader2, { className: "h-8 w-8 animate-spin text-muted-foreground" }) }) }),
3245
+ noCustomerExists && !isInitialLoading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.Card, { children: [
3246
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.CardHeader, { className: "text-center", children: [
3247
3247
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mx-auto mb-4 flex h-16 w-16 items-center justify-center rounded-full bg-primary/10", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CreditCard, { className: "h-8 w-8 text-primary" }) }),
3248
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.CardTitle, { children: t("billing.ui.dashboard.setup_title") }),
3249
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.CardDescription, { children: t("billing.ui.dashboard.setup_description") })
3248
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.CardTitle, { children: t("billing.ui.dashboard.setup_title") }),
3249
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.CardDescription, { children: t("billing.ui.dashboard.setup_description") })
3250
3250
  ] }),
3251
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.CardContent, { className: "flex justify-center pb-8", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Button, { onClick: handleCreateCustomer, disabled: creatingCustomer, size: "lg", children: creatingCustomer ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
3251
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.CardContent, { className: "flex justify-center pb-8", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Button, { onClick: handleCreateCustomer, disabled: creatingCustomer, size: "lg", children: creatingCustomer ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
3252
3252
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Loader2, { className: "me-2 h-4 w-4 animate-spin" }),
3253
3253
  t("billing.ui.dashboard.setting_up")
3254
3254
  ] }) : t("billing.ui.dashboard.setup_button") }) }),
3255
- errors.customer && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.CardContent, { className: "pt-0", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-center text-destructive text-xs/relaxed", children: t(errors.customer) }) })
3255
+ errors.customer && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.CardContent, { className: "pt-0", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-center text-destructive text-xs/relaxed", children: t(errors.customer) }) })
3256
3256
  ] }),
3257
3257
  !noCustomerExists && !isInitialLoading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
3258
3258
  criticalSubscriptions.map((subscription) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -3397,7 +3397,7 @@ function getStripePromise(publishableKey) {
3397
3397
  }
3398
3398
  _chunk7QVYU63Ejs.__name.call(void 0, getStripePromise, "getStripePromise");
3399
3399
  function StripeProvider({ children }) {
3400
- const publishableKey = _chunkONU4WCDGjs.getStripePublishableKey.call(void 0, );
3400
+ const publishableKey = _chunkQ5SMFSE4js.getStripePublishableKey.call(void 0, );
3401
3401
  const stripePromise = _react.useMemo.call(void 0, () => getStripePromise(publishableKey), [publishableKey]);
3402
3402
  const options = _react.useMemo.call(void 0, () => ({}), []);
3403
3403
  if (!publishableKey) {
@@ -3407,7 +3407,7 @@ function StripeProvider({ children }) {
3407
3407
  }
3408
3408
  _chunk7QVYU63Ejs.__name.call(void 0, StripeProvider, "StripeProvider");
3409
3409
  function isStripeConfigured() {
3410
- return !!_chunkONU4WCDGjs.getStripePublishableKey.call(void 0, );
3410
+ return !!_chunkQ5SMFSE4js.getStripePublishableKey.call(void 0, );
3411
3411
  }
3412
3412
  _chunk7QVYU63Ejs.__name.call(void 0, isStripeConfigured, "isStripeConfigured");
3413
3413
 
@@ -3422,18 +3422,18 @@ _chunk7QVYU63Ejs.__name.call(void 0, isStripeConfigured, "isStripeConfigured");
3422
3422
 
3423
3423
  function PriceArchiver({ price }) {
3424
3424
  const t = _nextintl.useTranslations.call(void 0, );
3425
- const fmt = _chunkQI4SCGPBjs.useBillingFormatOptions.call(void 0, );
3425
+ const fmt = _chunkM7FA63QEjs.useBillingFormatOptions.call(void 0, );
3426
3426
  const { archivePrice, restorePrice } = usePriceContext();
3427
3427
  const [open, setOpen] = _react.useState.call(void 0, false);
3428
3428
  const isArchived = !price.active;
3429
3429
  const scope = isArchived ? "restore" : "archive";
3430
3430
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
3431
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.Button, { variant: "outline", size: "sm", onClick: () => setOpen(true), children: [
3431
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.Button, { variant: "outline", size: "sm", onClick: () => setOpen(true), children: [
3432
3432
  isArchived ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.RotateCcwIcon, {}) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ArchiveIcon, {}),
3433
3433
  t(`billing.admin.prices.${scope}.confirm`)
3434
3434
  ] }),
3435
3435
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3436
- _chunkQI4SCGPBjs.ConfirmDialog,
3436
+ _chunkM7FA63QEjs.ConfirmDialog,
3437
3437
  {
3438
3438
  open,
3439
3439
  onOpenChange: setOpen,
@@ -3447,7 +3447,7 @@ function PriceArchiver({ price }) {
3447
3447
  if (isArchived) await restorePrice(price.id);
3448
3448
  else await archivePrice(price.id);
3449
3449
  } catch (error) {
3450
- _chunkQI4SCGPBjs.errorToast.call(void 0, { title: t(`billing.admin.prices.${scope}.title`), error });
3450
+ _chunkM7FA63QEjs.errorToast.call(void 0, { title: t(`billing.admin.prices.${scope}.title`), error });
3451
3451
  throw error;
3452
3452
  }
3453
3453
  }
@@ -3479,7 +3479,7 @@ function PriceEditorInternal({
3479
3479
  onDialogOpenChange
3480
3480
  }) {
3481
3481
  const t = _nextintl.useTranslations.call(void 0, );
3482
- const fmt = _chunkQI4SCGPBjs.useBillingFormatOptions.call(void 0, );
3482
+ const fmt = _chunkM7FA63QEjs.useBillingFormatOptions.call(void 0, );
3483
3483
  const router = _chunkNP3AFULUjs.useI18nRouter.call(void 0, );
3484
3484
  const { createPrice, updatePrice, productId: contextProductId } = usePriceContext();
3485
3485
  const [allFeatures, setAllFeatures] = _react.useState.call(void 0, []);
@@ -3487,7 +3487,7 @@ function PriceEditorInternal({
3487
3487
  const targetProductId = _nullishCoalesce(_nullishCoalesce(productId, () => ( _optionalChain([price, 'optionalAccess', _120 => _120.product, 'optionalAccess', _121 => _121.id]))), () => ( contextProductId));
3488
3488
  _react.useEffect.call(void 0, () => {
3489
3489
  const fetchFeatures = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
3490
- setAllFeatures(await _chunk77JC2UCFjs.FeatureService.findMany({}));
3490
+ setAllFeatures(await _chunk5XP5G45Bjs.FeatureService.findMany({}));
3491
3491
  }, "fetchFeatures");
3492
3492
  void fetchFeatures();
3493
3493
  }, []);
@@ -3600,7 +3600,7 @@ function PriceEditorInternal({
3600
3600
  warnedUnknownFor.current = fingerprint;
3601
3601
  const { unknown } = resolvePlatformFeatures(seed.platformFeatures);
3602
3602
  if (unknown.length > 0)
3603
- _chunk77JC2UCFjs.showToast.call(void 0, t("billing.admin.prices.import.warnings.unknownFeatures", { features: unknown.join(", ") }));
3603
+ _chunk5XP5G45Bjs.showToast.call(void 0, t("billing.admin.prices.import.warnings.unknownFeatures", { features: unknown.join(", ") }));
3604
3604
  }, [seed, isEdit, allFeatures, resolvePlatformFeatures, t]);
3605
3605
  const watchInterval = form.watch("interval");
3606
3606
  const isRecurring = watchInterval !== "one_time";
@@ -3621,7 +3621,7 @@ function PriceEditorInternal({
3621
3621
  { id: "metered", text: t("billing.admin.prices.usage.metered") }
3622
3622
  ];
3623
3623
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3624
- _chunkQI4SCGPBjs.EditorSheet,
3624
+ _chunkM7FA63QEjs.EditorSheet,
3625
3625
  {
3626
3626
  form,
3627
3627
  entityType: t("billing.admin.prices.entity"),
@@ -3676,13 +3676,13 @@ function PriceEditorInternal({
3676
3676
  dialogOpen,
3677
3677
  onDialogOpenChange,
3678
3678
  children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-y-4", children: [
3679
- isEdit && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.Alert, { children: [
3680
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.AlertTitle, { children: t("billing.admin.prices.immutability.title") }),
3681
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.AlertDescription, { children: t("billing.admin.prices.immutability.description") })
3679
+ isEdit && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.Alert, { children: [
3680
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.AlertTitle, { children: t("billing.admin.prices.immutability.title") }),
3681
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.AlertDescription, { children: t("billing.admin.prices.immutability.description") })
3682
3682
  ] }),
3683
3683
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid grid-cols-2 gap-x-4", children: [
3684
3684
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3685
- _chunkQI4SCGPBjs.FormInput,
3685
+ _chunkM7FA63QEjs.FormInput,
3686
3686
  {
3687
3687
  form,
3688
3688
  id: "unitAmount",
@@ -3694,7 +3694,7 @@ function PriceEditorInternal({
3694
3694
  }
3695
3695
  ),
3696
3696
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3697
- _chunkQI4SCGPBjs.FormSelect,
3697
+ _chunkM7FA63QEjs.FormSelect,
3698
3698
  {
3699
3699
  form,
3700
3700
  id: "currency",
@@ -3705,7 +3705,7 @@ function PriceEditorInternal({
3705
3705
  )
3706
3706
  ] }),
3707
3707
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3708
- _chunkQI4SCGPBjs.FormSelect,
3708
+ _chunkM7FA63QEjs.FormSelect,
3709
3709
  {
3710
3710
  form,
3711
3711
  id: "interval",
@@ -3716,7 +3716,7 @@ function PriceEditorInternal({
3716
3716
  ),
3717
3717
  isRecurring && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid grid-cols-2 gap-x-4", children: [
3718
3718
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3719
- _chunkQI4SCGPBjs.FormInput,
3719
+ _chunkM7FA63QEjs.FormInput,
3720
3720
  {
3721
3721
  form,
3722
3722
  id: "intervalCount",
@@ -3727,7 +3727,7 @@ function PriceEditorInternal({
3727
3727
  }
3728
3728
  ),
3729
3729
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3730
- _chunkQI4SCGPBjs.FormSelect,
3730
+ _chunkM7FA63QEjs.FormSelect,
3731
3731
  {
3732
3732
  form,
3733
3733
  id: "usageType",
@@ -3738,7 +3738,7 @@ function PriceEditorInternal({
3738
3738
  )
3739
3739
  ] }),
3740
3740
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3741
- _chunkQI4SCGPBjs.FormInput,
3741
+ _chunkM7FA63QEjs.FormInput,
3742
3742
  {
3743
3743
  form,
3744
3744
  id: "nickname",
@@ -3747,7 +3747,7 @@ function PriceEditorInternal({
3747
3747
  }
3748
3748
  ),
3749
3749
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3750
- _chunkQI4SCGPBjs.FormTextarea,
3750
+ _chunkM7FA63QEjs.FormTextarea,
3751
3751
  {
3752
3752
  form,
3753
3753
  id: "description",
@@ -3757,7 +3757,7 @@ function PriceEditorInternal({
3757
3757
  }
3758
3758
  ),
3759
3759
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3760
- _chunkQI4SCGPBjs.FormInput,
3760
+ _chunkM7FA63QEjs.FormInput,
3761
3761
  {
3762
3762
  form,
3763
3763
  id: "token",
@@ -3767,10 +3767,10 @@ function PriceEditorInternal({
3767
3767
  }
3768
3768
  ),
3769
3769
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-y-2", children: [
3770
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.FieldLabel, { children: t("billing.admin.prices.fields.features") }),
3770
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.FieldLabel, { children: t("billing.admin.prices.fields.features") }),
3771
3771
  form.watch("features").map((_, index) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex gap-2", children: [
3772
3772
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3773
- _chunkQI4SCGPBjs.Input,
3773
+ _chunkM7FA63QEjs.Input,
3774
3774
  {
3775
3775
  ...form.register(`features.${index}`),
3776
3776
  placeholder: t("billing.admin.prices.placeholders.feature", { index: index + 1 }),
@@ -3778,7 +3778,7 @@ function PriceEditorInternal({
3778
3778
  }
3779
3779
  ),
3780
3780
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3781
- _chunkQI4SCGPBjs.Button,
3781
+ _chunkM7FA63QEjs.Button,
3782
3782
  {
3783
3783
  type: "button",
3784
3784
  variant: "outline",
@@ -3793,7 +3793,7 @@ function PriceEditorInternal({
3793
3793
  )
3794
3794
  ] }, index)),
3795
3795
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
3796
- _chunkQI4SCGPBjs.Button,
3796
+ _chunkM7FA63QEjs.Button,
3797
3797
  {
3798
3798
  type: "button",
3799
3799
  variant: "outline",
@@ -3808,12 +3808,12 @@ function PriceEditorInternal({
3808
3808
  )
3809
3809
  ] }),
3810
3810
  isRecurring && allFeatures.length > 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-y-2", children: [
3811
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.FieldLabel, { children: t("billing.admin.prices.fields.platformFeatures") }),
3811
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.FieldLabel, { children: t("billing.admin.prices.fields.platformFeatures") }),
3812
3812
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex max-h-48 flex-col gap-y-2 overflow-y-auto rounded-md border p-4", children: allFeatures.map((feature) => {
3813
3813
  const isChecked = form.watch("featureIds").includes(feature.id);
3814
3814
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-x-2", children: [
3815
3815
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3816
- _chunkQI4SCGPBjs.Checkbox,
3816
+ _chunkM7FA63QEjs.Checkbox,
3817
3817
  {
3818
3818
  id: `feature-${feature.id}`,
3819
3819
  checked: isChecked,
@@ -3829,13 +3829,13 @@ function PriceEditorInternal({
3829
3829
  }
3830
3830
  }
3831
3831
  ),
3832
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.FieldLabel, { htmlFor: `feature-${feature.id}`, children: feature.name }),
3832
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.FieldLabel, { htmlFor: `feature-${feature.id}`, children: feature.name }),
3833
3833
  feature.isCore && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: t("billing.admin.prices.help.core") })
3834
3834
  ] }, feature.id);
3835
3835
  }) })
3836
3836
  ] }),
3837
3837
  isRecurring && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3838
- _chunkQI4SCGPBjs.FormCheckbox,
3838
+ _chunkM7FA63QEjs.FormCheckbox,
3839
3839
  {
3840
3840
  form,
3841
3841
  id: "isTrial",
@@ -3878,7 +3878,7 @@ var defaultContextValue = {
3878
3878
  productId: void 0
3879
3879
  };
3880
3880
  function priceLabel(price, fmt = {}) {
3881
- return _nullishCoalesce(price.nickname, () => ( `${_chunk77JC2UCFjs.formatCurrency.call(void 0, price.unitAmount, price.currency, fmt)} ${_chunk77JC2UCFjs.formatInterval.call(void 0, price, fmt)}`.trim()));
3881
+ return _nullishCoalesce(price.nickname, () => ( `${_chunk5XP5G45Bjs.formatCurrency.call(void 0, price.unitAmount, price.currency, fmt)} ${_chunk5XP5G45Bjs.formatInterval.call(void 0, price, fmt)}`.trim()));
3882
3882
  }
3883
3883
  _chunk7QVYU63Ejs.__name.call(void 0, priceLabel, "priceLabel");
3884
3884
  var PriceProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({
@@ -3888,22 +3888,22 @@ var PriceProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({
3888
3888
  productId: productIdProp
3889
3889
  }) => {
3890
3890
  const t = _nextintl.useTranslations.call(void 0, );
3891
- const fmt = _chunkQI4SCGPBjs.useBillingFormatOptions.call(void 0, );
3892
- const generateUrl = _chunkQI4SCGPBjs.usePageUrlGenerator.call(void 0, );
3893
- const { hasRole } = _chunkQI4SCGPBjs.useCurrentUserContext.call(void 0, );
3891
+ const fmt = _chunkM7FA63QEjs.useBillingFormatOptions.call(void 0, );
3892
+ const generateUrl = _chunkM7FA63QEjs.usePageUrlGenerator.call(void 0, );
3893
+ const { hasRole } = _chunkM7FA63QEjs.useCurrentUserContext.call(void 0, );
3894
3894
  const [price, setPrice] = _react.useState.call(void 0,
3895
- dehydratedPrice ? _chunk77JC2UCFjs.rehydrate.call(void 0, _chunkZ6T2575Ajs.Modules.StripePrice, dehydratedPrice) : void 0
3895
+ dehydratedPrice ? _chunk5XP5G45Bjs.rehydrate.call(void 0, _chunkZ6T2575Ajs.Modules.StripePrice, dehydratedPrice) : void 0
3896
3896
  );
3897
3897
  const [priceVersion, setPriceVersion] = _react.useState.call(void 0, 0);
3898
3898
  const refreshPrices = _react.useCallback.call(void 0, () => setPriceVersion((value2) => value2 + 1), []);
3899
3899
  const productId = _nullishCoalesce(productIdProp, () => ( _optionalChain([price, 'optionalAccess', _144 => _144.product, 'optionalAccess', _145 => _145.id])));
3900
3900
  const reloadPrice = _react.useCallback.call(void 0, async () => {
3901
3901
  if (!_optionalChain([price, 'optionalAccess', _146 => _146.id])) return;
3902
- setPrice(await _chunk77JC2UCFjs.StripePriceService.getPrice({ id: price.id }));
3902
+ setPrice(await _chunk5XP5G45Bjs.StripePriceService.getPrice({ id: price.id }));
3903
3903
  }, [_optionalChain([price, 'optionalAccess', _147 => _147.id])]);
3904
3904
  const createPrice = _react.useCallback.call(void 0,
3905
3905
  async (input) => {
3906
- const saved = await _chunk77JC2UCFjs.StripePriceService.createPrice(input);
3906
+ const saved = await _chunk5XP5G45Bjs.StripePriceService.createPrice(input);
3907
3907
  refreshPrices();
3908
3908
  return saved;
3909
3909
  },
@@ -3911,7 +3911,7 @@ var PriceProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({
3911
3911
  );
3912
3912
  const updatePrice = _react.useCallback.call(void 0,
3913
3913
  async (input) => {
3914
- const saved = await _chunk77JC2UCFjs.StripePriceService.updatePrice(input);
3914
+ const saved = await _chunk5XP5G45Bjs.StripePriceService.updatePrice(input);
3915
3915
  setPrice(saved);
3916
3916
  refreshPrices();
3917
3917
  return saved;
@@ -3922,7 +3922,7 @@ var PriceProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({
3922
3922
  async (id) => {
3923
3923
  const target = _nullishCoalesce(id, () => ( _optionalChain([price, 'optionalAccess', _148 => _148.id])));
3924
3924
  if (!target) return;
3925
- await _chunk77JC2UCFjs.StripePriceService.archivePrice({ id: target });
3925
+ await _chunk5XP5G45Bjs.StripePriceService.archivePrice({ id: target });
3926
3926
  await reloadPrice();
3927
3927
  refreshPrices();
3928
3928
  },
@@ -3932,7 +3932,7 @@ var PriceProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({
3932
3932
  async (id) => {
3933
3933
  const target = _nullishCoalesce(id, () => ( _optionalChain([price, 'optionalAccess', _150 => _150.id])));
3934
3934
  if (!target) return;
3935
- await _chunk77JC2UCFjs.StripePriceService.reactivatePrice({ id: target });
3935
+ await _chunk5XP5G45Bjs.StripePriceService.reactivatePrice({ id: target });
3936
3936
  await reloadPrice();
3937
3937
  refreshPrices();
3938
3938
  },
@@ -3978,7 +3978,7 @@ var PriceProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({
3978
3978
  }
3979
3979
  return response;
3980
3980
  }, "title");
3981
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.SharedProvider, { value: { breadcrumbs: breadcrumb(), title: title() }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PriceContext.Provider, { value, children }) });
3981
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.SharedProvider, { value: { breadcrumbs: breadcrumb(), title: title() }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PriceContext.Provider, { value, children }) });
3982
3982
  }, "PriceProvider");
3983
3983
  var usePriceContext = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => _nullishCoalesce(_react.useContext.call(void 0, PriceContext), () => ( defaultContextValue)), "usePriceContext");
3984
3984
 
@@ -3998,12 +3998,12 @@ function ProductArchiver({ product }) {
3998
3998
  const isArchived = !product.active;
3999
3999
  const scope = isArchived ? "restore" : "archive";
4000
4000
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
4001
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.Button, { variant: "outline", size: "sm", onClick: () => setOpen(true), children: [
4001
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.Button, { variant: "outline", size: "sm", onClick: () => setOpen(true), children: [
4002
4002
  isArchived ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.RotateCcwIcon, {}) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ArchiveIcon, {}),
4003
4003
  t(`billing.admin.products.${scope}.confirm`)
4004
4004
  ] }),
4005
4005
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4006
- _chunkQI4SCGPBjs.ConfirmDialog,
4006
+ _chunkM7FA63QEjs.ConfirmDialog,
4007
4007
  {
4008
4008
  open,
4009
4009
  onOpenChange: setOpen,
@@ -4017,7 +4017,7 @@ function ProductArchiver({ product }) {
4017
4017
  if (isArchived) await restoreProduct(product.id);
4018
4018
  else await archiveProduct(product.id);
4019
4019
  } catch (error) {
4020
- _chunkQI4SCGPBjs.errorToast.call(void 0, { title: t(`billing.admin.products.${scope}.title`), error });
4020
+ _chunkM7FA63QEjs.errorToast.call(void 0, { title: t(`billing.admin.products.${scope}.title`), error });
4021
4021
  throw error;
4022
4022
  }
4023
4023
  }
@@ -4070,7 +4070,7 @@ function ProductEditorInternal({
4070
4070
  defaultValues: getDefaultValues()
4071
4071
  });
4072
4072
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4073
- _chunkQI4SCGPBjs.EditorSheet,
4073
+ _chunkM7FA63QEjs.EditorSheet,
4074
4074
  {
4075
4075
  form,
4076
4076
  entityType: t("billing.admin.products.entity"),
@@ -4093,7 +4093,7 @@ function ProductEditorInternal({
4093
4093
  onDialogOpenChange,
4094
4094
  children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-y-4", children: [
4095
4095
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4096
- _chunkQI4SCGPBjs.FormInput,
4096
+ _chunkM7FA63QEjs.FormInput,
4097
4097
  {
4098
4098
  form,
4099
4099
  id: "name",
@@ -4103,7 +4103,7 @@ function ProductEditorInternal({
4103
4103
  }
4104
4104
  ),
4105
4105
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4106
- _chunkQI4SCGPBjs.FormTextarea,
4106
+ _chunkM7FA63QEjs.FormTextarea,
4107
4107
  {
4108
4108
  form,
4109
4109
  id: "description",
@@ -4147,20 +4147,20 @@ var defaultContextValue2 = {
4147
4147
  };
4148
4148
  var ProductProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ children, dehydratedProduct, publishChrome = true }) => {
4149
4149
  const t = _nextintl.useTranslations.call(void 0, );
4150
- const generateUrl = _chunkQI4SCGPBjs.usePageUrlGenerator.call(void 0, );
4151
- const { hasRole } = _chunkQI4SCGPBjs.useCurrentUserContext.call(void 0, );
4150
+ const generateUrl = _chunkM7FA63QEjs.usePageUrlGenerator.call(void 0, );
4151
+ const { hasRole } = _chunkM7FA63QEjs.useCurrentUserContext.call(void 0, );
4152
4152
  const [product, setProduct] = _react.useState.call(void 0,
4153
- dehydratedProduct ? _chunk77JC2UCFjs.rehydrate.call(void 0, _chunkZ6T2575Ajs.Modules.StripeProduct, dehydratedProduct) : void 0
4153
+ dehydratedProduct ? _chunk5XP5G45Bjs.rehydrate.call(void 0, _chunkZ6T2575Ajs.Modules.StripeProduct, dehydratedProduct) : void 0
4154
4154
  );
4155
4155
  const [catalogueVersion, setCatalogueVersion] = _react.useState.call(void 0, 0);
4156
4156
  const refreshCatalogue = _react.useCallback.call(void 0, () => setCatalogueVersion((value2) => value2 + 1), []);
4157
4157
  const reloadProduct = _react.useCallback.call(void 0, async () => {
4158
4158
  if (!_optionalChain([product, 'optionalAccess', _157 => _157.id])) return;
4159
- setProduct(await _chunk77JC2UCFjs.StripeProductService.getProduct({ id: product.id }));
4159
+ setProduct(await _chunk5XP5G45Bjs.StripeProductService.getProduct({ id: product.id }));
4160
4160
  }, [_optionalChain([product, 'optionalAccess', _158 => _158.id])]);
4161
4161
  const createProduct = _react.useCallback.call(void 0,
4162
4162
  async (input) => {
4163
- const saved = await _chunk77JC2UCFjs.StripeProductService.createProduct(input);
4163
+ const saved = await _chunk5XP5G45Bjs.StripeProductService.createProduct(input);
4164
4164
  refreshCatalogue();
4165
4165
  return saved;
4166
4166
  },
@@ -4168,7 +4168,7 @@ var ProductProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ ch
4168
4168
  );
4169
4169
  const updateProduct = _react.useCallback.call(void 0,
4170
4170
  async (input) => {
4171
- const saved = await _chunk77JC2UCFjs.StripeProductService.updateProduct(input);
4171
+ const saved = await _chunk5XP5G45Bjs.StripeProductService.updateProduct(input);
4172
4172
  setProduct(saved);
4173
4173
  refreshCatalogue();
4174
4174
  return saved;
@@ -4179,7 +4179,7 @@ var ProductProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ ch
4179
4179
  async (id) => {
4180
4180
  const target = _nullishCoalesce(id, () => ( _optionalChain([product, 'optionalAccess', _159 => _159.id])));
4181
4181
  if (!target) return;
4182
- await _chunk77JC2UCFjs.StripeProductService.archiveProduct({ id: target });
4182
+ await _chunk5XP5G45Bjs.StripeProductService.archiveProduct({ id: target });
4183
4183
  await reloadProduct();
4184
4184
  refreshCatalogue();
4185
4185
  },
@@ -4189,7 +4189,7 @@ var ProductProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ ch
4189
4189
  async (id) => {
4190
4190
  const target = _nullishCoalesce(id, () => ( _optionalChain([product, 'optionalAccess', _161 => _161.id])));
4191
4191
  if (!target) return;
4192
- await _chunk77JC2UCFjs.StripeProductService.reactivateProduct({ id: target });
4192
+ await _chunk5XP5G45Bjs.StripeProductService.reactivateProduct({ id: target });
4193
4193
  await reloadProduct();
4194
4194
  refreshCatalogue();
4195
4195
  },
@@ -4242,7 +4242,7 @@ var ProductProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ ch
4242
4242
  }
4243
4243
  return response;
4244
4244
  }, "title");
4245
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.SharedProvider, { value: { breadcrumbs: breadcrumb(), title: title() }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ProductContext.Provider, { value, children }) });
4245
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.SharedProvider, { value: { breadcrumbs: breadcrumb(), title: title() }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ProductContext.Provider, { value, children }) });
4246
4246
  }, "ProductProvider");
4247
4247
  var useProductContext = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => _nullishCoalesce(_react.useContext.call(void 0, ProductContext), () => ( defaultContextValue2)), "useProductContext");
4248
4248
 
@@ -4251,57 +4251,57 @@ var useProductContext = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ()
4251
4251
 
4252
4252
  function PriceDetails() {
4253
4253
  const t = _nextintl.useTranslations.call(void 0, );
4254
- const fmt = _chunkQI4SCGPBjs.useBillingFormatOptions.call(void 0, );
4255
- const generateUrl = _chunkQI4SCGPBjs.usePageUrlGenerator.call(void 0, );
4254
+ const fmt = _chunkM7FA63QEjs.useBillingFormatOptions.call(void 0, );
4255
+ const generateUrl = _chunkM7FA63QEjs.usePageUrlGenerator.call(void 0, );
4256
4256
  const { price } = usePriceContext();
4257
4257
  if (!price) return null;
4258
4258
  const isRecurring = price.priceType === "recurring";
4259
4259
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-y-8", children: [
4260
4260
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-y-4", children: [
4261
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.SectionHeader, { children: t("billing.admin.prices.title") }),
4261
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.SectionHeader, { children: t("billing.admin.prices.title") }),
4262
4262
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid grid-cols-1 gap-4 md:grid-cols-2", children: [
4263
4263
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4264
- _chunkQI4SCGPBjs.DetailField,
4264
+ _chunkM7FA63QEjs.DetailField,
4265
4265
  {
4266
4266
  label: t("billing.admin.prices.fields.product"),
4267
- value: price.product ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Link, { href: generateUrl({ page: _chunkZ6T2575Ajs.Modules.StripeProduct, id: price.product.id }), children: price.product.name }) : "\u2014"
4267
+ value: price.product ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Link, { href: generateUrl({ page: _chunkZ6T2575Ajs.Modules.StripeProduct, id: price.product.id }), children: price.product.name }) : "\u2014"
4268
4268
  }
4269
4269
  ),
4270
4270
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4271
- _chunkQI4SCGPBjs.DetailField,
4271
+ _chunkM7FA63QEjs.DetailField,
4272
4272
  {
4273
4273
  label: t("billing.admin.prices.fields.status"),
4274
4274
  value: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex flex-wrap items-center gap-1", children: [
4275
- price.active ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Badge, { variant: "softGreen", children: t("billing.admin.prices.status.active") }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Badge, { variant: "softGray", children: t("billing.admin.prices.status.archived") }),
4276
- price.isTrial && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Badge, { variant: "softBlue", children: t("billing.admin.prices.badge.trial") })
4275
+ price.active ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Badge, { variant: "softGreen", children: t("billing.admin.prices.status.active") }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Badge, { variant: "softGray", children: t("billing.admin.prices.status.archived") }),
4276
+ price.isTrial && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Badge, { variant: "softBlue", children: t("billing.admin.prices.badge.trial") })
4277
4277
  ] })
4278
4278
  }
4279
4279
  ),
4280
4280
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4281
- _chunkQI4SCGPBjs.DetailField,
4281
+ _chunkM7FA63QEjs.DetailField,
4282
4282
  {
4283
4283
  label: t("billing.admin.prices.fields.amount"),
4284
- value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "tabular-nums", children: _chunk77JC2UCFjs.formatCurrency.call(void 0, price.unitAmount, price.currency, fmt) })
4284
+ value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "tabular-nums", children: _chunk5XP5G45Bjs.formatCurrency.call(void 0, price.unitAmount, price.currency, fmt) })
4285
4285
  }
4286
4286
  ),
4287
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.DetailField, { label: t("billing.admin.prices.fields.currency"), value: price.currency.toUpperCase() }),
4287
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.DetailField, { label: t("billing.admin.prices.fields.currency"), value: price.currency.toUpperCase() }),
4288
4288
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4289
- _chunkQI4SCGPBjs.DetailField,
4289
+ _chunkM7FA63QEjs.DetailField,
4290
4290
  {
4291
4291
  label: t("billing.admin.prices.fields.type"),
4292
4292
  value: isRecurring ? t("billing.admin.prices.type.recurring") : t("billing.admin.prices.type.oneTime")
4293
4293
  }
4294
4294
  ),
4295
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.DetailField, { label: t("billing.admin.prices.fields.billing"), value: _chunk77JC2UCFjs.formatInterval.call(void 0, price, fmt) }),
4295
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.DetailField, { label: t("billing.admin.prices.fields.billing"), value: _chunk5XP5G45Bjs.formatInterval.call(void 0, price, fmt) }),
4296
4296
  isRecurring && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4297
- _chunkQI4SCGPBjs.DetailField,
4297
+ _chunkM7FA63QEjs.DetailField,
4298
4298
  {
4299
4299
  label: t("billing.admin.prices.fields.intervalCount"),
4300
4300
  value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "tabular-nums", children: _nullishCoalesce(_optionalChain([price, 'access', _163 => _163.recurring, 'optionalAccess', _164 => _164.intervalCount]), () => ( 1)) })
4301
4301
  }
4302
4302
  ),
4303
4303
  isRecurring && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4304
- _chunkQI4SCGPBjs.DetailField,
4304
+ _chunkM7FA63QEjs.DetailField,
4305
4305
  {
4306
4306
  label: t("billing.admin.prices.fields.usageType"),
4307
4307
  value: _optionalChain([price, 'access', _165 => _165.recurring, 'optionalAccess', _166 => _166.usageType]) === "metered" ? t("billing.admin.prices.usage.metered") : t("billing.admin.prices.usage.licensed")
@@ -4310,24 +4310,24 @@ function PriceDetails() {
4310
4310
  ] })
4311
4311
  ] }),
4312
4312
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-y-4", children: [
4313
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.SectionHeader, { children: t("billing.admin.prices.fields.platformFeatures") }),
4313
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.SectionHeader, { children: t("billing.admin.prices.fields.platformFeatures") }),
4314
4314
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid grid-cols-1 gap-4 md:grid-cols-2", children: [
4315
4315
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4316
- _chunkQI4SCGPBjs.DetailField,
4316
+ _chunkM7FA63QEjs.DetailField,
4317
4317
  {
4318
4318
  label: t("billing.admin.prices.fields.token"),
4319
4319
  value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "tabular-nums", children: _nullishCoalesce(price.token, () => ( "\u2014")) })
4320
4320
  }
4321
4321
  ),
4322
4322
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4323
- _chunkQI4SCGPBjs.DetailField,
4323
+ _chunkM7FA63QEjs.DetailField,
4324
4324
  {
4325
4325
  label: t("billing.admin.prices.fields.stripeId"),
4326
4326
  value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "tabular-nums", children: price.stripePriceId })
4327
4327
  }
4328
4328
  ),
4329
4329
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4330
- _chunkQI4SCGPBjs.DetailField,
4330
+ _chunkM7FA63QEjs.DetailField,
4331
4331
  {
4332
4332
  label: t("billing.admin.prices.fields.description"),
4333
4333
  value: _nullishCoalesce(price.description, () => ( "\u2014")),
@@ -4335,7 +4335,7 @@ function PriceDetails() {
4335
4335
  }
4336
4336
  ),
4337
4337
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4338
- _chunkQI4SCGPBjs.DetailField,
4338
+ _chunkM7FA63QEjs.DetailField,
4339
4339
  {
4340
4340
  label: t("billing.admin.prices.fields.features"),
4341
4341
  className: "md:col-span-2",
@@ -4343,11 +4343,11 @@ function PriceDetails() {
4343
4343
  }
4344
4344
  ),
4345
4345
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4346
- _chunkQI4SCGPBjs.DetailField,
4346
+ _chunkM7FA63QEjs.DetailField,
4347
4347
  {
4348
4348
  label: t("billing.admin.prices.fields.platformFeatures"),
4349
4349
  className: "md:col-span-2",
4350
- value: price.priceFeatures.length > 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "flex flex-wrap items-center gap-1", children: price.priceFeatures.map((feature) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Badge, { variant: "softGray", children: feature.name }, feature.id)) }) : "\u2014"
4350
+ value: price.priceFeatures.length > 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "flex flex-wrap items-center gap-1", children: price.priceFeatures.map((feature) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Badge, { variant: "softGray", children: feature.name }, feature.id)) }) : "\u2014"
4351
4351
  }
4352
4352
  )
4353
4353
  ] })
@@ -4361,7 +4361,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, PriceDetails, "PriceDetails");
4361
4361
  function PriceContainer() {
4362
4362
  const { price } = usePriceContext();
4363
4363
  if (!price) return null;
4364
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.RoundPageContainer, { module: _chunkZ6T2575Ajs.Modules.StripePrice, id: price.id, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PriceDetails, {}) });
4364
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.RoundPageContainer, { module: _chunkZ6T2575Ajs.Modules.StripePrice, id: price.id, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PriceDetails, {}) });
4365
4365
  }
4366
4366
  _chunk7QVYU63Ejs.__name.call(void 0, PriceContainer, "PriceContainer");
4367
4367
 
@@ -4486,8 +4486,8 @@ function PricesList({ productId, fullWidth }) {
4486
4486
  const importInputRef = _react.useRef.call(void 0, null);
4487
4487
  const [seed, setSeed] = _react.useState.call(void 0, void 0);
4488
4488
  const [seedNonce, setSeedNonce] = _react.useState.call(void 0, 0);
4489
- const data = _chunkQI4SCGPBjs.useDataListRetriever.call(void 0, {
4490
- retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunk77JC2UCFjs.StripePriceService.listPrices({ ...params, productId }), "retriever"),
4489
+ const data = _chunkM7FA63QEjs.useDataListRetriever.call(void 0, {
4490
+ retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunk5XP5G45Bjs.StripePriceService.listPrices({ ...params, productId }), "retriever"),
4491
4491
  retrieverParams: {},
4492
4492
  module: _chunkZ6T2575Ajs.Modules.StripePrice
4493
4493
  });
@@ -4524,7 +4524,7 @@ function PricesList({ productId, fullWidth }) {
4524
4524
  openSeededEditor(transfer.price);
4525
4525
  } catch (error) {
4526
4526
  console.error("[PricesList] price import failed", error);
4527
- _chunkQI4SCGPBjs.errorToast.call(void 0, {
4527
+ _chunkM7FA63QEjs.errorToast.call(void 0, {
4528
4528
  title: t("billing.admin.prices.import.errors.title"),
4529
4529
  error: t("billing.admin.prices.import.errors.invalid")
4530
4530
  });
@@ -4543,7 +4543,7 @@ function PricesList({ productId, fullWidth }) {
4543
4543
  "create-price"
4544
4544
  ),
4545
4545
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _react.Fragment, { children: [
4546
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.Button, { variant: "outline", size: "sm", type: "button", onClick: () => _optionalChain([importInputRef, 'access', _181 => _181.current, 'optionalAccess', _182 => _182.click, 'call', _183 => _183()]), children: [
4546
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.Button, { variant: "outline", size: "sm", type: "button", onClick: () => _optionalChain([importInputRef, 'access', _181 => _181.current, 'optionalAccess', _182 => _182.click, 'call', _183 => _183()]), children: [
4547
4547
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.UploadIcon, {}),
4548
4548
  t("billing.admin.prices.actions.import")
4549
4549
  ] }),
@@ -4561,7 +4561,7 @@ function PricesList({ productId, fullWidth }) {
4561
4561
  ];
4562
4562
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
4563
4563
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4564
- _chunkQI4SCGPBjs.ContentListTable,
4564
+ _chunkM7FA63QEjs.ContentListTable,
4565
4565
  {
4566
4566
  data,
4567
4567
  fields: [
@@ -4578,7 +4578,7 @@ function PricesList({ productId, fullWidth }) {
4578
4578
  fullWidth,
4579
4579
  title: t("billing.admin.prices.title"),
4580
4580
  emptyState: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4581
- _chunkQI4SCGPBjs.EmptyState,
4581
+ _chunkM7FA63QEjs.EmptyState,
4582
4582
  {
4583
4583
  icon: _lucidereact.DollarSignIcon,
4584
4584
  title: t("billing.admin.prices.empty.title"),
@@ -4618,18 +4618,18 @@ function ProductDetails() {
4618
4618
  const { product } = useProductContext();
4619
4619
  if (!product) return null;
4620
4620
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-y-4", children: [
4621
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.SectionHeader, { children: t("billing.admin.products.tabs.details") }),
4621
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.SectionHeader, { children: t("billing.admin.products.tabs.details") }),
4622
4622
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid grid-cols-1 gap-4 md:grid-cols-2", children: [
4623
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.DetailField, { label: t("billing.admin.products.fields.name"), value: product.name }),
4623
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.DetailField, { label: t("billing.admin.products.fields.name"), value: product.name }),
4624
4624
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4625
- _chunkQI4SCGPBjs.DetailField,
4625
+ _chunkM7FA63QEjs.DetailField,
4626
4626
  {
4627
4627
  label: t("billing.admin.products.fields.status"),
4628
- value: product.active ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Badge, { variant: "softGreen", children: t("billing.admin.products.status.active") }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Badge, { variant: "softGray", children: t("billing.admin.products.status.archived") })
4628
+ value: product.active ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Badge, { variant: "softGreen", children: t("billing.admin.products.status.active") }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Badge, { variant: "softGray", children: t("billing.admin.products.status.archived") })
4629
4629
  }
4630
4630
  ),
4631
4631
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4632
- _chunkQI4SCGPBjs.DetailField,
4632
+ _chunkM7FA63QEjs.DetailField,
4633
4633
  {
4634
4634
  label: t("billing.admin.products.fields.description"),
4635
4635
  value: _nullishCoalesce(product.description, () => ( "\u2014")),
@@ -4637,14 +4637,14 @@ function ProductDetails() {
4637
4637
  }
4638
4638
  ),
4639
4639
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4640
- _chunkQI4SCGPBjs.DetailField,
4640
+ _chunkM7FA63QEjs.DetailField,
4641
4641
  {
4642
4642
  label: t("billing.admin.products.fields.prices"),
4643
4643
  value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "tabular-nums", children: product.stripePrices.length })
4644
4644
  }
4645
4645
  ),
4646
4646
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4647
- _chunkQI4SCGPBjs.DetailField,
4647
+ _chunkM7FA63QEjs.DetailField,
4648
4648
  {
4649
4649
  label: t("billing.admin.products.fields.stripeId"),
4650
4650
  value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "tabular-nums", children: product.stripeProductId })
@@ -4662,7 +4662,7 @@ function ProductContainer() {
4662
4662
  const { product } = useProductContext();
4663
4663
  if (!product) return null;
4664
4664
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4665
- _chunkQI4SCGPBjs.RoundPageContainer,
4665
+ _chunkM7FA63QEjs.RoundPageContainer,
4666
4666
  {
4667
4667
  module: _chunkZ6T2575Ajs.Modules.StripeProduct,
4668
4668
  id: product.id,
@@ -4699,18 +4699,18 @@ _chunk7QVYU63Ejs.__name.call(void 0, ProductContainer, "ProductContainer");
4699
4699
 
4700
4700
  function CouponsList({ fullWidth } = {}) {
4701
4701
  const t = _nextintl.useTranslations.call(void 0, );
4702
- const { catalogueVersion } = _chunkQI4SCGPBjs.useCouponContext.call(void 0, );
4703
- const data = _chunkQI4SCGPBjs.useDataListRetriever.call(void 0, {
4704
- retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunk77JC2UCFjs.StripeCouponService.listCoupons(params), "retriever"),
4702
+ const { catalogueVersion } = _chunkM7FA63QEjs.useCouponContext.call(void 0, );
4703
+ const data = _chunkM7FA63QEjs.useDataListRetriever.call(void 0, {
4704
+ retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunk5XP5G45Bjs.StripeCouponService.listCoupons(params), "retriever"),
4705
4705
  retrieverParams: {},
4706
4706
  module: _chunkZ6T2575Ajs.Modules.StripeCoupon
4707
4707
  });
4708
4708
  _react.useEffect.call(void 0, () => {
4709
4709
  if (catalogueVersion > 0) void data.refresh();
4710
4710
  }, [catalogueVersion]);
4711
- const functions = [/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.CouponEditor, {}, "create-coupon")];
4711
+ const functions = [/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.CouponEditor, {}, "create-coupon")];
4712
4712
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4713
- _chunkQI4SCGPBjs.ContentListTable,
4713
+ _chunkM7FA63QEjs.ContentListTable,
4714
4714
  {
4715
4715
  data,
4716
4716
  fields: [
@@ -4725,7 +4725,7 @@ function CouponsList({ fullWidth } = {}) {
4725
4725
  fullWidth,
4726
4726
  title: t("billing.admin.coupons.title"),
4727
4727
  emptyState: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4728
- _chunkQI4SCGPBjs.EmptyState,
4728
+ _chunkM7FA63QEjs.EmptyState,
4729
4729
  {
4730
4730
  icon: _lucidereact.TicketPercentIcon,
4731
4731
  title: t("billing.admin.coupons.empty.title"),
@@ -4745,8 +4745,8 @@ _chunk7QVYU63Ejs.__name.call(void 0, CouponsList, "CouponsList");
4745
4745
  function ProductsList({ fullWidth } = {}) {
4746
4746
  const t = _nextintl.useTranslations.call(void 0, );
4747
4747
  const { catalogueVersion } = useProductContext();
4748
- const data = _chunkQI4SCGPBjs.useDataListRetriever.call(void 0, {
4749
- retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunk77JC2UCFjs.StripeProductService.listProducts(params), "retriever"),
4748
+ const data = _chunkM7FA63QEjs.useDataListRetriever.call(void 0, {
4749
+ retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunk5XP5G45Bjs.StripeProductService.listProducts(params), "retriever"),
4750
4750
  retrieverParams: {},
4751
4751
  module: _chunkZ6T2575Ajs.Modules.StripeProduct
4752
4752
  });
@@ -4755,7 +4755,7 @@ function ProductsList({ fullWidth } = {}) {
4755
4755
  }, [catalogueVersion]);
4756
4756
  const functions = [/* @__PURE__ */ _jsxruntime.jsx.call(void 0, ProductEditor, {}, "create-product")];
4757
4757
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4758
- _chunkQI4SCGPBjs.ContentListTable,
4758
+ _chunkM7FA63QEjs.ContentListTable,
4759
4759
  {
4760
4760
  data,
4761
4761
  fields: ["name" /* name */, "status" /* status */, "prices" /* prices */],
@@ -4764,7 +4764,7 @@ function ProductsList({ fullWidth } = {}) {
4764
4764
  fullWidth,
4765
4765
  title: t("billing.admin.products.title"),
4766
4766
  emptyState: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4767
- _chunkQI4SCGPBjs.EmptyState,
4767
+ _chunkM7FA63QEjs.EmptyState,
4768
4768
  {
4769
4769
  icon: _lucidereact.PackageIcon,
4770
4770
  title: t("billing.admin.products.empty.title"),
@@ -4780,8 +4780,8 @@ _chunk7QVYU63Ejs.__name.call(void 0, ProductsList, "ProductsList");
4780
4780
 
4781
4781
  function ProductsListContainer() {
4782
4782
  const t = _nextintl.useTranslations.call(void 0, );
4783
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ProductProvider, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.CouponProvider, { publishChrome: false, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4784
- _chunkQI4SCGPBjs.RoundPageContainer,
4783
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ProductProvider, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.CouponProvider, { publishChrome: false, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4784
+ _chunkM7FA63QEjs.RoundPageContainer,
4785
4785
  {
4786
4786
  module: _chunkZ6T2575Ajs.Modules.StripeProduct,
4787
4787
  tabs: [
@@ -4801,30 +4801,30 @@ _chunk7QVYU63Ejs.__name.call(void 0, ProductsListContainer, "ProductsListContain
4801
4801
 
4802
4802
  function CouponDetails() {
4803
4803
  const t = _nextintl.useTranslations.call(void 0, );
4804
- const fmt = _chunkQI4SCGPBjs.useBillingFormatOptions.call(void 0, );
4805
- const { coupon } = _chunkQI4SCGPBjs.useCouponContext.call(void 0, );
4804
+ const fmt = _chunkM7FA63QEjs.useBillingFormatOptions.call(void 0, );
4805
+ const { coupon } = _chunkM7FA63QEjs.useCouponContext.call(void 0, );
4806
4806
  if (!coupon) return null;
4807
4807
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-y-4", children: [
4808
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.SectionHeader, { children: t("billing.admin.products.tabs.details") }),
4808
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.SectionHeader, { children: t("billing.admin.products.tabs.details") }),
4809
4809
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground text-xs/relaxed", children: t("billing.admin.coupons.fixed_notice") }),
4810
4810
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid grid-cols-1 gap-4 md:grid-cols-2", children: [
4811
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.DetailField, { label: t("billing.admin.coupons.fields.name"), value: coupon.name }),
4811
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.DetailField, { label: t("billing.admin.coupons.fields.name"), value: coupon.name }),
4812
4812
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4813
- _chunkQI4SCGPBjs.DetailField,
4813
+ _chunkM7FA63QEjs.DetailField,
4814
4814
  {
4815
4815
  label: t("billing.admin.coupons.fields.status"),
4816
- value: coupon.valid ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Badge, { variant: "softGreen", children: t("billing.admin.coupons.status.active") }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Badge, { variant: "softGray", children: t("billing.admin.coupons.status.ended") })
4816
+ value: coupon.valid ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Badge, { variant: "softGreen", children: t("billing.admin.coupons.status.active") }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Badge, { variant: "softGray", children: t("billing.admin.coupons.status.ended") })
4817
4817
  }
4818
4818
  ),
4819
4819
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4820
- _chunkQI4SCGPBjs.DetailField,
4820
+ _chunkM7FA63QEjs.DetailField,
4821
4821
  {
4822
4822
  label: t("billing.admin.coupons.fields.discount"),
4823
- value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "tabular-nums", children: _chunk77JC2UCFjs.formatCouponDiscount.call(void 0, coupon, t, fmt) })
4823
+ value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "tabular-nums", children: _chunk5XP5G45Bjs.formatCouponDiscount.call(void 0, coupon, t, fmt) })
4824
4824
  }
4825
4825
  ),
4826
4826
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4827
- _chunkQI4SCGPBjs.DetailField,
4827
+ _chunkM7FA63QEjs.DetailField,
4828
4828
  {
4829
4829
  label: t("billing.admin.coupons.fields.places"),
4830
4830
  value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "tabular-nums", children: coupon.maxRedemptions !== void 0 ? t("billing.admin.coupons.places.limited", {
@@ -4834,21 +4834,21 @@ function CouponDetails() {
4834
4834
  }
4835
4835
  ),
4836
4836
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4837
- _chunkQI4SCGPBjs.DetailField,
4837
+ _chunkM7FA63QEjs.DetailField,
4838
4838
  {
4839
4839
  label: t("billing.admin.coupons.fields.products"),
4840
4840
  value: coupon.stripeProductIds.length > 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "tabular-nums", children: coupon.stripeProductIds.join(", ") }) : t("billing.admin.coupons.all_products")
4841
4841
  }
4842
4842
  ),
4843
4843
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4844
- _chunkQI4SCGPBjs.DetailField,
4844
+ _chunkM7FA63QEjs.DetailField,
4845
4845
  {
4846
4846
  label: t("billing.admin.coupons.fields.redeemBy"),
4847
- value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "tabular-nums", children: coupon.redeemBy ? _chunkQI4SCGPBjs.formatDate.call(void 0, coupon.redeemBy, fmt) : "\u2014" })
4847
+ value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "tabular-nums", children: coupon.redeemBy ? _chunkM7FA63QEjs.formatDate.call(void 0, coupon.redeemBy, fmt) : "\u2014" })
4848
4848
  }
4849
4849
  ),
4850
4850
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4851
- _chunkQI4SCGPBjs.DetailField,
4851
+ _chunkM7FA63QEjs.DetailField,
4852
4852
  {
4853
4853
  label: t("billing.admin.coupons.fields.stripeId"),
4854
4854
  value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "tabular-nums", children: coupon.stripeCouponId })
@@ -4883,15 +4883,15 @@ function CouponCodeEditorInternal({
4883
4883
  }) {
4884
4884
  const t = _nextintl.useTranslations.call(void 0, );
4885
4885
  const router = _chunkNP3AFULUjs.useI18nRouter.call(void 0, );
4886
- const { createCode } = _chunkQI4SCGPBjs.useCouponContext.call(void 0, );
4887
- const formSchema2 = _react.useMemo.call(void 0, () => _zod3.z.object({ id: _zod3.z.uuidv4() }).and(_chunkQI4SCGPBjs.couponCodeSchema.call(void 0, t)), [t]);
4888
- const getDefaultValues = _react.useCallback.call(void 0, () => ({ id: _uuid.v4.call(void 0, ), ..._chunkQI4SCGPBjs.couponCodeDefaults.call(void 0, ) }), []);
4886
+ const { createCode } = _chunkM7FA63QEjs.useCouponContext.call(void 0, );
4887
+ const formSchema2 = _react.useMemo.call(void 0, () => _zod3.z.object({ id: _zod3.z.uuidv4() }).and(_chunkM7FA63QEjs.couponCodeSchema.call(void 0, t)), [t]);
4888
+ const getDefaultValues = _react.useCallback.call(void 0, () => ({ id: _uuid.v4.call(void 0, ), ..._chunkM7FA63QEjs.couponCodeDefaults.call(void 0, ) }), []);
4889
4889
  const form = _reacthookform.useForm.call(void 0, {
4890
4890
  resolver: _zod.zodResolver.call(void 0, formSchema2),
4891
4891
  defaultValues: getDefaultValues()
4892
4892
  });
4893
4893
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4894
- _chunkQI4SCGPBjs.EditorSheet,
4894
+ _chunkM7FA63QEjs.EditorSheet,
4895
4895
  {
4896
4896
  form,
4897
4897
  entityType: t("billing.admin.coupons.codes.entity"),
@@ -4901,14 +4901,14 @@ function CouponCodeEditorInternal({
4901
4901
  onSuccess: _nullishCoalesce(onSuccess, () => ( (() => {
4902
4902
  }))),
4903
4903
  onNavigate: (url) => router.push(url),
4904
- onSubmit: async (values) => await createCode({ id: values.id, couponId, ..._chunkQI4SCGPBjs.toCouponCodeInput.call(void 0, values) }),
4904
+ onSubmit: async (values) => await createCode({ id: values.id, couponId, ..._chunkM7FA63QEjs.toCouponCodeInput.call(void 0, values) }),
4905
4905
  onReset: getDefaultValues,
4906
4906
  trigger,
4907
4907
  forceShow,
4908
4908
  onClose,
4909
4909
  dialogOpen,
4910
4910
  onDialogOpenChange,
4911
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.CouponCodeFields, { form })
4911
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.CouponCodeFields, { form })
4912
4912
  }
4913
4913
  );
4914
4914
  }
@@ -4922,9 +4922,9 @@ _chunk7QVYU63Ejs.__name.call(void 0, CouponCodeEditor, "CouponCodeEditor");
4922
4922
 
4923
4923
  function CouponCodesList({ couponId }) {
4924
4924
  const t = _nextintl.useTranslations.call(void 0, );
4925
- const { catalogueVersion } = _chunkQI4SCGPBjs.useCouponContext.call(void 0, );
4926
- const data = _chunkQI4SCGPBjs.useDataListRetriever.call(void 0, {
4927
- retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunk77JC2UCFjs.StripeCouponCodeService.listByCoupon({ ...params, couponId }), "retriever"),
4925
+ const { catalogueVersion } = _chunkM7FA63QEjs.useCouponContext.call(void 0, );
4926
+ const data = _chunkM7FA63QEjs.useDataListRetriever.call(void 0, {
4927
+ retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunk5XP5G45Bjs.StripeCouponCodeService.listByCoupon({ ...params, couponId }), "retriever"),
4928
4928
  retrieverParams: {},
4929
4929
  module: _chunkZ6T2575Ajs.Modules.StripeCouponCode
4930
4930
  });
@@ -4933,7 +4933,7 @@ function CouponCodesList({ couponId }) {
4933
4933
  }, [catalogueVersion]);
4934
4934
  const functions = [/* @__PURE__ */ _jsxruntime.jsx.call(void 0, CouponCodeEditor, { couponId }, "create-code")];
4935
4935
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4936
- _chunkQI4SCGPBjs.ContentListTable,
4936
+ _chunkM7FA63QEjs.ContentListTable,
4937
4937
  {
4938
4938
  data,
4939
4939
  fields: [
@@ -4948,7 +4948,7 @@ function CouponCodesList({ couponId }) {
4948
4948
  functions,
4949
4949
  title: t("billing.admin.coupons.codes.title"),
4950
4950
  emptyState: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4951
- _chunkQI4SCGPBjs.EmptyState,
4951
+ _chunkM7FA63QEjs.EmptyState,
4952
4952
  {
4953
4953
  icon: _lucidereact.TicketIcon,
4954
4954
  title: t("billing.admin.coupons.codes.empty.title"),
@@ -4964,12 +4964,12 @@ _chunk7QVYU63Ejs.__name.call(void 0, CouponCodesList, "CouponCodesList");
4964
4964
 
4965
4965
  function CouponContainer() {
4966
4966
  const t = _nextintl.useTranslations.call(void 0, );
4967
- const { coupon } = _chunkQI4SCGPBjs.useCouponContext.call(void 0, );
4967
+ const { coupon } = _chunkM7FA63QEjs.useCouponContext.call(void 0, );
4968
4968
  if (!coupon) return null;
4969
4969
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4970
- _chunkQI4SCGPBjs.RoundPageContainer,
4970
+ _chunkM7FA63QEjs.RoundPageContainer,
4971
4971
  {
4972
- module: _chunkQI4SCGPBjs.couponPageModule.call(void 0, ),
4972
+ module: _chunkM7FA63QEjs.couponPageModule.call(void 0, ),
4973
4973
  id: coupon.id,
4974
4974
  tabs: [
4975
4975
  {
@@ -5076,5 +5076,5 @@ _chunk7QVYU63Ejs.__name.call(void 0, CouponContainer, "CouponContainer");
5076
5076
 
5077
5077
 
5078
5078
 
5079
- exports.BillingAlertBanner = BillingAlertBanner; exports.BillingDashboardContainer = BillingDashboardContainer; exports.BillingDetailModal = BillingDetailModal; exports.BillingUsageSummaryCard = BillingUsageSummaryCard; exports.CancelSubscriptionDialog = CancelSubscriptionDialog; exports.CouponCodeActions = _chunkQI4SCGPBjs.CouponCodeActions; exports.CouponCodeEditor = CouponCodeEditor; exports.CouponCodeFields = _chunkQI4SCGPBjs.CouponCodeFields; exports.CouponCodesList = CouponCodesList; exports.CouponContainer = CouponContainer; exports.CouponDetails = CouponDetails; exports.CouponEditor = _chunkQI4SCGPBjs.CouponEditor; exports.CouponProvider = _chunkQI4SCGPBjs.CouponProvider; exports.CouponRefresher = _chunkQI4SCGPBjs.CouponRefresher; exports.CouponsList = CouponsList; exports.CustomerInfoCard = CustomerInfoCard; exports.IntervalToggle = IntervalToggle; exports.InvoiceDetails = InvoiceDetails; exports.InvoiceStatusBadge = InvoiceStatusBadge; exports.InvoicesContainer = InvoicesContainer; exports.InvoicesList = InvoicesList; exports.InvoicesSummaryCard = InvoicesSummaryCard; exports.PaymentMethodCard = PaymentMethodCard; exports.PaymentMethodEditor = PaymentMethodEditor; exports.PaymentMethodForm = PaymentMethodForm; exports.PaymentMethodSummaryCard = PaymentMethodSummaryCard; exports.PaymentMethodsContainer = PaymentMethodsContainer; exports.PaymentMethodsList = PaymentMethodsList; exports.PriceArchiver = PriceArchiver; exports.PriceContainer = PriceContainer; exports.PriceDetails = PriceDetails; exports.PriceEditor = PriceEditor; exports.PriceProvider = PriceProvider; exports.PricesList = PricesList; exports.PricingCard = PricingCard; exports.ProductArchiver = ProductArchiver; exports.ProductContainer = ProductContainer; exports.ProductDetails = ProductDetails; exports.ProductEditor = ProductEditor; exports.ProductPricingList = ProductPricingList; exports.ProductPricingRow = ProductPricingRow; exports.ProductProvider = ProductProvider; exports.ProductsList = ProductsList; exports.ProductsListContainer = ProductsListContainer; exports.PromoCodeInput = PromoCodeInput; exports.ProrationPreview = ProrationPreview; exports.StripeProvider = StripeProvider; exports.SubscriptionConfirmation = SubscriptionConfirmation; exports.SubscriptionDetails = SubscriptionDetails; exports.SubscriptionStatusBadge = SubscriptionStatusBadge; exports.SubscriptionSummaryCard = SubscriptionSummaryCard; exports.SubscriptionWizard = SubscriptionWizard; exports.SubscriptionsContainer = SubscriptionsContainer; exports.SubscriptionsList = SubscriptionsList; exports.UsageContainer = UsageContainer; exports.UsageHistoryTable = UsageHistoryTable; exports.UsageSummaryCard = UsageSummaryCard; exports.UsageSummaryCards = UsageSummaryCards; exports.WizardProgressIndicator = WizardProgressIndicator; exports.WizardStepPaymentMethod = WizardStepPaymentMethod; exports.WizardStepPlanSelection = WizardStepPlanSelection; exports.WizardStepReview = WizardStepReview; exports.applyDiscount = _chunkQI4SCGPBjs.applyDiscount; exports.couponCodeDefaults = _chunkQI4SCGPBjs.couponCodeDefaults; exports.couponCodeSchema = _chunkQI4SCGPBjs.couponCodeSchema; exports.couponCurrencyOptions = _chunkQI4SCGPBjs.couponCurrencyOptions; exports.formatCurrency = _chunk77JC2UCFjs.formatCurrency; exports.formatDate = _chunkQI4SCGPBjs.formatDate; exports.formatFixed = _chunk77JC2UCFjs.formatFixed; exports.formatInterval = _chunk77JC2UCFjs.formatInterval; exports.isStripeConfigured = isStripeConfigured; exports.optionalDate = _chunkQI4SCGPBjs.optionalDate; exports.optionalDecimal = _chunkQI4SCGPBjs.optionalDecimal; exports.optionalPositiveInt = _chunkQI4SCGPBjs.optionalPositiveInt; exports.parseOptionalDecimal = _chunkQI4SCGPBjs.parseOptionalDecimal; exports.parseOptionalPositiveInt = _chunkQI4SCGPBjs.parseOptionalPositiveInt; exports.priceLabel = priceLabel; exports.promotionCodeDiscount = _chunkQI4SCGPBjs.promotionCodeDiscount; exports.subscriptionDiscount = _chunkQI4SCGPBjs.subscriptionDiscount; exports.toCouponCodeInput = _chunkQI4SCGPBjs.toCouponCodeInput; exports.useBillingFormatOptions = _chunkQI4SCGPBjs.useBillingFormatOptions; exports.useCouponContext = _chunkQI4SCGPBjs.useCouponContext; exports.usePriceContext = usePriceContext; exports.useProductContext = useProductContext;
5079
+ exports.BillingAlertBanner = BillingAlertBanner; exports.BillingDashboardContainer = BillingDashboardContainer; exports.BillingDetailModal = BillingDetailModal; exports.BillingUsageSummaryCard = BillingUsageSummaryCard; exports.CancelSubscriptionDialog = CancelSubscriptionDialog; exports.CouponCodeActions = _chunkM7FA63QEjs.CouponCodeActions; exports.CouponCodeEditor = CouponCodeEditor; exports.CouponCodeFields = _chunkM7FA63QEjs.CouponCodeFields; exports.CouponCodesList = CouponCodesList; exports.CouponContainer = CouponContainer; exports.CouponDetails = CouponDetails; exports.CouponEditor = _chunkM7FA63QEjs.CouponEditor; exports.CouponProvider = _chunkM7FA63QEjs.CouponProvider; exports.CouponRefresher = _chunkM7FA63QEjs.CouponRefresher; exports.CouponsList = CouponsList; exports.CustomerInfoCard = CustomerInfoCard; exports.IntervalToggle = IntervalToggle; exports.InvoiceDetails = InvoiceDetails; exports.InvoiceStatusBadge = InvoiceStatusBadge; exports.InvoicesContainer = InvoicesContainer; exports.InvoicesList = InvoicesList; exports.InvoicesSummaryCard = InvoicesSummaryCard; exports.PaymentMethodCard = PaymentMethodCard; exports.PaymentMethodEditor = PaymentMethodEditor; exports.PaymentMethodForm = PaymentMethodForm; exports.PaymentMethodSummaryCard = PaymentMethodSummaryCard; exports.PaymentMethodsContainer = PaymentMethodsContainer; exports.PaymentMethodsList = PaymentMethodsList; exports.PriceArchiver = PriceArchiver; exports.PriceContainer = PriceContainer; exports.PriceDetails = PriceDetails; exports.PriceEditor = PriceEditor; exports.PriceProvider = PriceProvider; exports.PricesList = PricesList; exports.PricingCard = PricingCard; exports.ProductArchiver = ProductArchiver; exports.ProductContainer = ProductContainer; exports.ProductDetails = ProductDetails; exports.ProductEditor = ProductEditor; exports.ProductPricingList = ProductPricingList; exports.ProductPricingRow = ProductPricingRow; exports.ProductProvider = ProductProvider; exports.ProductsList = ProductsList; exports.ProductsListContainer = ProductsListContainer; exports.PromoCodeInput = PromoCodeInput; exports.ProrationPreview = ProrationPreview; exports.StripeProvider = StripeProvider; exports.SubscriptionConfirmation = SubscriptionConfirmation; exports.SubscriptionDetails = SubscriptionDetails; exports.SubscriptionStatusBadge = SubscriptionStatusBadge; exports.SubscriptionSummaryCard = SubscriptionSummaryCard; exports.SubscriptionWizard = SubscriptionWizard; exports.SubscriptionsContainer = SubscriptionsContainer; exports.SubscriptionsList = SubscriptionsList; exports.UsageContainer = UsageContainer; exports.UsageHistoryTable = UsageHistoryTable; exports.UsageSummaryCard = UsageSummaryCard; exports.UsageSummaryCards = UsageSummaryCards; exports.WizardProgressIndicator = WizardProgressIndicator; exports.WizardStepPaymentMethod = WizardStepPaymentMethod; exports.WizardStepPlanSelection = WizardStepPlanSelection; exports.WizardStepReview = WizardStepReview; exports.applyDiscount = _chunkM7FA63QEjs.applyDiscount; exports.couponCodeDefaults = _chunkM7FA63QEjs.couponCodeDefaults; exports.couponCodeSchema = _chunkM7FA63QEjs.couponCodeSchema; exports.couponCurrencyOptions = _chunkM7FA63QEjs.couponCurrencyOptions; exports.formatCurrency = _chunk5XP5G45Bjs.formatCurrency; exports.formatDate = _chunkM7FA63QEjs.formatDate; exports.formatFixed = _chunk5XP5G45Bjs.formatFixed; exports.formatInterval = _chunk5XP5G45Bjs.formatInterval; exports.isStripeConfigured = isStripeConfigured; exports.optionalDate = _chunkM7FA63QEjs.optionalDate; exports.optionalDecimal = _chunkM7FA63QEjs.optionalDecimal; exports.optionalPositiveInt = _chunkM7FA63QEjs.optionalPositiveInt; exports.parseOptionalDecimal = _chunkM7FA63QEjs.parseOptionalDecimal; exports.parseOptionalPositiveInt = _chunkM7FA63QEjs.parseOptionalPositiveInt; exports.priceLabel = priceLabel; exports.promotionCodeDiscount = _chunkM7FA63QEjs.promotionCodeDiscount; exports.subscriptionDiscount = _chunkM7FA63QEjs.subscriptionDiscount; exports.toCouponCodeInput = _chunkM7FA63QEjs.toCouponCodeInput; exports.useBillingFormatOptions = _chunkM7FA63QEjs.useBillingFormatOptions; exports.useCouponContext = _chunkM7FA63QEjs.useCouponContext; exports.usePriceContext = usePriceContext; exports.useProductContext = useProductContext;
5080
5080
  //# sourceMappingURL=index.js.map