@carlonicora/nextjs-jsonapi 3.28.2 → 4.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (213) hide show
  1. package/dist/{BlockNoteEditor-36VL2TNM.js → BlockNoteEditor-BXMTGKDV.js} +21 -20
  2. package/dist/BlockNoteEditor-BXMTGKDV.js.map +1 -0
  3. package/dist/{BlockNoteEditor-4IDXT6ZU.mjs → BlockNoteEditor-FGVQP35E.mjs} +9 -8
  4. package/dist/{BlockNoteEditor-4IDXT6ZU.mjs.map → BlockNoteEditor-FGVQP35E.mjs.map} +1 -1
  5. package/dist/{BlockNoteViewer-KRTAFTUX.mjs → BlockNoteViewer-DQYT6IJW.mjs} +3 -3
  6. package/dist/{BlockNoteViewer-7BFNTN4E.js → BlockNoteViewer-YH7G66PS.js} +4 -4
  7. package/dist/{BlockNoteViewer-7BFNTN4E.js.map → BlockNoteViewer-YH7G66PS.js.map} +1 -1
  8. package/dist/{HandbookSectionInterface-DgYH--Ik.d.mts → HandbookSectionInterface-BYsmnPEz.d.mts} +1 -1
  9. package/dist/{HandbookSectionInterface-Ck1wZJ81.d.ts → HandbookSectionInterface-OePKPbqN.d.ts} +1 -1
  10. package/dist/{JsonApiRequest-UHOWNI3O.mjs → JsonApiRequest-MEP6AXDT.mjs} +2 -2
  11. package/dist/JsonApiRequest-OB6WL4LA.js +26 -0
  12. package/dist/{JsonApiRequest-TE5WD3WS.js.map → JsonApiRequest-OB6WL4LA.js.map} +1 -1
  13. package/dist/ServerSession-DFNNNkg7.d.ts +29 -0
  14. package/dist/ServerSession-DK1z0_Ql.d.mts +29 -0
  15. package/dist/{analytics.modules-CfczU12P.d.ts → analytics.modules-Bsacu6ik.d.ts} +1 -1
  16. package/dist/{analytics.modules-pzGwMASI.d.mts → analytics.modules-txdCLNG-.d.mts} +1 -1
  17. package/dist/billing/index.js +404 -402
  18. package/dist/billing/index.js.map +1 -1
  19. package/dist/billing/index.mjs +10 -8
  20. package/dist/billing/index.mjs.map +1 -1
  21. package/dist/{chunk-7B4E42R5.mjs → chunk-3CZ2GK5R.mjs} +33 -9
  22. package/dist/chunk-3CZ2GK5R.mjs.map +1 -0
  23. package/dist/{chunk-4Z45NYPR.js → chunk-5W5MN7JP.js} +14 -83
  24. package/dist/chunk-5W5MN7JP.js.map +1 -0
  25. package/dist/{chunk-CAKOFJZD.js → chunk-6OFANJTE.js} +195 -142
  26. package/dist/chunk-6OFANJTE.js.map +1 -0
  27. package/dist/{chunk-5TRFNKJS.js → chunk-6TUB7Y6T.js} +23 -25
  28. package/dist/chunk-6TUB7Y6T.js.map +1 -0
  29. package/dist/{chunk-37DMFVLN.mjs → chunk-7SCREMTX.mjs} +4 -3
  30. package/dist/{chunk-37DMFVLN.mjs.map → chunk-7SCREMTX.mjs.map} +1 -1
  31. package/dist/{chunk-Q6J2ICKO.mjs → chunk-ADZSH3MG.mjs} +3 -72
  32. package/dist/chunk-ADZSH3MG.mjs.map +1 -0
  33. package/dist/{chunk-E3I4MT53.mjs → chunk-AQZ3T4BR.mjs} +71 -18
  34. package/dist/chunk-AQZ3T4BR.mjs.map +1 -0
  35. package/dist/{chunk-SJLXPHK5.mjs → chunk-E2LENTUH.mjs} +22 -24
  36. package/dist/chunk-E2LENTUH.mjs.map +1 -0
  37. package/dist/chunk-EBEXWN3I.mjs +17 -0
  38. package/dist/chunk-EBEXWN3I.mjs.map +1 -0
  39. package/dist/chunk-G4JR3SFV.js +28 -0
  40. package/dist/chunk-G4JR3SFV.js.map +1 -0
  41. package/dist/chunk-IK65TDQH.js +15 -0
  42. package/dist/chunk-IK65TDQH.js.map +1 -0
  43. package/dist/{chunk-GHFMKH3M.js → chunk-JEQ34Z5E.js} +62 -38
  44. package/dist/chunk-JEQ34Z5E.js.map +1 -0
  45. package/dist/{chunk-KOTKKBJT.js → chunk-NFCXUAE6.js} +1328 -1183
  46. package/dist/chunk-NFCXUAE6.js.map +1 -0
  47. package/dist/chunk-OEOK6A3P.js +17 -0
  48. package/dist/chunk-OEOK6A3P.js.map +1 -0
  49. package/dist/chunk-PW42LRSL.mjs +28 -0
  50. package/dist/chunk-PW42LRSL.mjs.map +1 -0
  51. package/dist/{chunk-U65JPKO3.mjs → chunk-R6ZYB4VN.mjs} +2 -2
  52. package/dist/chunk-T7SAW3UW.mjs +15 -0
  53. package/dist/chunk-T7SAW3UW.mjs.map +1 -0
  54. package/dist/{chunk-GKDHYB2R.js → chunk-TWBZ2GSX.js} +3 -3
  55. package/dist/{chunk-GKDHYB2R.js.map → chunk-TWBZ2GSX.js.map} +1 -1
  56. package/dist/{chunk-26MQIJNB.js → chunk-WGVNJXZO.js} +4 -3
  57. package/dist/chunk-WGVNJXZO.js.map +1 -0
  58. package/dist/{chunk-HPUV6FBW.mjs → chunk-WJC4SYRL.mjs} +2131 -1986
  59. package/dist/chunk-WJC4SYRL.mjs.map +1 -0
  60. package/dist/client/index.d.mts +3 -3
  61. package/dist/client/index.d.ts +3 -3
  62. package/dist/client/index.js +6 -5
  63. package/dist/client/index.js.map +1 -1
  64. package/dist/client/index.mjs +13 -12
  65. package/dist/components/index.d.mts +16 -6
  66. package/dist/components/index.d.ts +16 -6
  67. package/dist/components/index.js +8 -5
  68. package/dist/components/index.js.map +1 -1
  69. package/dist/components/index.mjs +9 -6
  70. package/dist/{config-3N1LSrcC.d.ts → config-B6UB7j69.d.ts} +1 -1
  71. package/dist/{config-BmufyEj6.d.mts → config-CEAq4Ozy.d.mts} +10 -1
  72. package/dist/{config-AVtuvfM1.d.ts → config-DydDHCfb.d.ts} +10 -1
  73. package/dist/{config-BSKTYDoh.d.mts → config-n-ZpPmOL.d.mts} +1 -1
  74. package/dist/contexts/index.d.mts +28 -4
  75. package/dist/contexts/index.d.ts +28 -4
  76. package/dist/contexts/index.js +10 -5
  77. package/dist/contexts/index.js.map +1 -1
  78. package/dist/contexts/index.mjs +9 -4
  79. package/dist/core/index.d.mts +6 -6
  80. package/dist/core/index.d.ts +6 -6
  81. package/dist/core/index.js +5 -5
  82. package/dist/core/index.js.map +1 -1
  83. package/dist/core/index.mjs +4 -4
  84. package/dist/features/analytics/index.d.mts +2 -2
  85. package/dist/features/analytics/index.d.ts +2 -2
  86. package/dist/features/analytics/index.js +124 -123
  87. package/dist/features/analytics/index.js.map +1 -1
  88. package/dist/features/analytics/index.mjs +6 -5
  89. package/dist/features/analytics/index.mjs.map +1 -1
  90. package/dist/features/analytics/server.d.mts +10 -2
  91. package/dist/features/analytics/server.d.ts +10 -2
  92. package/dist/features/analytics/server.js +8 -6
  93. package/dist/features/analytics/server.js.map +1 -1
  94. package/dist/features/analytics/server.mjs +6 -4
  95. package/dist/features/analytics/server.mjs.map +1 -1
  96. package/dist/features/help/index.d.mts +2 -2
  97. package/dist/features/help/index.d.ts +2 -2
  98. package/dist/features/help/index.js +39 -38
  99. package/dist/features/help/index.js.map +1 -1
  100. package/dist/features/help/index.mjs +5 -4
  101. package/dist/features/help/index.mjs.map +1 -1
  102. package/dist/features/tokenusage/index.d.mts +2 -2
  103. package/dist/features/tokenusage/index.d.ts +2 -2
  104. package/dist/features/tokenusage/index.js +127 -126
  105. package/dist/features/tokenusage/index.js.map +1 -1
  106. package/dist/features/tokenusage/index.mjs +6 -5
  107. package/dist/features/tokenusage/index.mjs.map +1 -1
  108. package/dist/index.d.mts +5 -5
  109. package/dist/index.d.ts +5 -5
  110. package/dist/index.js +8 -6
  111. package/dist/index.js.map +1 -1
  112. package/dist/index.mjs +11 -9
  113. package/dist/next-config/index.d.mts +43 -0
  114. package/dist/next-config/index.d.ts +43 -0
  115. package/dist/next-config/index.js +230 -0
  116. package/dist/next-config/index.js.map +1 -0
  117. package/dist/next-config/index.mjs +230 -0
  118. package/dist/next-config/index.mjs.map +1 -0
  119. package/dist/{request-FXF63NSQ.mjs → request-3IUMNVOS.mjs} +2 -2
  120. package/dist/request-LZBAOT3Y.js +8 -0
  121. package/dist/request-LZBAOT3Y.js.map +1 -0
  122. package/dist/server/cachedGet.d.mts +28 -0
  123. package/dist/server/cachedGet.d.ts +28 -0
  124. package/dist/server/cachedGet.js +60 -0
  125. package/dist/server/cachedGet.js.map +1 -0
  126. package/dist/server/cachedGet.mjs +60 -0
  127. package/dist/server/cachedGet.mjs.map +1 -0
  128. package/dist/server/cachedGet.stub.d.mts +7 -0
  129. package/dist/server/cachedGet.stub.d.ts +7 -0
  130. package/dist/server/cachedGet.stub.js +17 -0
  131. package/dist/server/cachedGet.stub.js.map +1 -0
  132. package/dist/server/cachedGet.stub.mjs +17 -0
  133. package/dist/server/cachedGet.stub.mjs.map +1 -0
  134. package/dist/server/index.d.mts +27 -25
  135. package/dist/server/index.d.ts +27 -25
  136. package/dist/server/index.js +13 -6
  137. package/dist/server/index.js.map +1 -1
  138. package/dist/server/index.mjs +15 -8
  139. package/dist/testing/index.js.map +1 -1
  140. package/dist/testing/index.mjs.map +1 -1
  141. package/dist/{types-D0uLYV2P.d.mts → types-Bq_UA8Lg.d.mts} +1 -1
  142. package/dist/{types-Cn153-mH.d.ts → types-bsm8Fp55.d.ts} +1 -1
  143. package/dist/{usePageUrlGenerator-B-3FRKBD.d.ts → usePageUrlGenerator-J_ECv-oQ.d.ts} +1 -1
  144. package/dist/{usePageUrlGenerator-CCJ_cdQy.d.mts → usePageUrlGenerator-uKBjAKqC.d.mts} +1 -1
  145. package/package.json +12 -1
  146. package/src/components/forms/__tests__/EditorSheet.test.tsx +25 -1
  147. package/src/components/forms/__tests__/useEditorDialog.test.ts +164 -1
  148. package/src/components/forms/useEditorDialog.ts +69 -2
  149. package/src/contexts/SessionContext.tsx +20 -0
  150. package/src/contexts/SocketContext.tsx +30 -3
  151. package/src/contexts/ViewportContext.tsx +17 -2
  152. package/src/contexts/__tests__/SessionContext.test.tsx +58 -0
  153. package/src/contexts/__tests__/SocketContext.session.test.tsx +77 -0
  154. package/src/contexts/index.ts +1 -0
  155. package/src/core/abstracts/AbstractService.ts +4 -6
  156. package/src/core/abstracts/__tests__/AbstractService.locale.test.ts +64 -0
  157. package/src/features/analytics/components/server/AnalyticsAdminPage.tsx +5 -1
  158. package/src/features/analytics/components/server/AnalyticsJourneyPage.tsx +5 -1
  159. package/src/features/notification/contexts/NotificationContext.tsx +5 -2
  160. package/src/features/notification/contexts/__tests__/NotificationContext.spec.tsx +22 -0
  161. package/src/features/user/contexts/CurrentUserContext.tsx +7 -5
  162. package/src/features/user/contexts/__tests__/CurrentUserContext.spec.tsx +63 -3
  163. package/src/hooks/__tests__/useSocket.render.test.ts +22 -0
  164. package/src/hooks/useSocket.ts +0 -1
  165. package/src/i18n/__tests__/config.test.ts +27 -0
  166. package/src/i18n/config.ts +17 -0
  167. package/src/i18n/index.ts +2 -0
  168. package/src/next-config/__tests__/createNextConfig.test.ts +268 -0
  169. package/src/next-config/csp.ts +128 -0
  170. package/src/next-config/headers.ts +61 -0
  171. package/src/next-config/index.ts +114 -0
  172. package/src/server/JsonApiServer.ts +3 -1
  173. package/src/server/ServerSession.ts +29 -1
  174. package/src/server/__tests__/JsonApiServer.test.ts +41 -0
  175. package/src/server/__tests__/ServerSession.read.test.ts +67 -0
  176. package/src/server/__tests__/cache.test.ts +48 -0
  177. package/src/server/__tests__/cachedGet.test.ts +125 -0
  178. package/src/server/__tests__/request.test.ts +96 -1
  179. package/src/server/cache.ts +21 -4
  180. package/src/server/cacheDigest.ts +10 -0
  181. package/src/server/cacheProfiles.ts +15 -0
  182. package/src/server/cachedGet.stub.ts +15 -0
  183. package/src/server/cachedGet.ts +80 -0
  184. package/src/server/request.ts +33 -32
  185. package/src/shadcnui/ui/__tests__/sidebar.menu-skeleton.test.tsx +50 -0
  186. package/src/shadcnui/ui/__tests__/sidebar.session.test.tsx +133 -0
  187. package/src/shadcnui/ui/sidebar.tsx +121 -18
  188. package/src/testing/matchers/jsonApiMatchers.ts +1 -0
  189. package/src/unified/JsonApiRequest.ts +4 -1
  190. package/src/unified/__tests__/JsonApiGet.cache.test.ts +51 -0
  191. package/src/utils/__tests__/map-thenable.test.ts +29 -0
  192. package/src/utils/__tests__/use-mobile.test.tsx +102 -1
  193. package/src/utils/map-thenable.ts +15 -0
  194. package/src/utils/use-mobile.tsx +13 -4
  195. package/dist/BlockNoteEditor-36VL2TNM.js.map +0 -1
  196. package/dist/JsonApiRequest-TE5WD3WS.js +0 -26
  197. package/dist/chunk-26MQIJNB.js.map +0 -1
  198. package/dist/chunk-4Z45NYPR.js.map +0 -1
  199. package/dist/chunk-5TRFNKJS.js.map +0 -1
  200. package/dist/chunk-7B4E42R5.mjs.map +0 -1
  201. package/dist/chunk-CAKOFJZD.js.map +0 -1
  202. package/dist/chunk-E3I4MT53.mjs.map +0 -1
  203. package/dist/chunk-GHFMKH3M.js.map +0 -1
  204. package/dist/chunk-HPUV6FBW.mjs.map +0 -1
  205. package/dist/chunk-KOTKKBJT.js.map +0 -1
  206. package/dist/chunk-Q6J2ICKO.mjs.map +0 -1
  207. package/dist/chunk-SJLXPHK5.mjs.map +0 -1
  208. package/dist/request-ZTX6I63X.js +0 -8
  209. package/dist/request-ZTX6I63X.js.map +0 -1
  210. /package/dist/{BlockNoteViewer-KRTAFTUX.mjs.map → BlockNoteViewer-DQYT6IJW.mjs.map} +0 -0
  211. /package/dist/{JsonApiRequest-UHOWNI3O.mjs.map → JsonApiRequest-MEP6AXDT.mjs.map} +0 -0
  212. /package/dist/{chunk-U65JPKO3.mjs.map → chunk-R6ZYB4VN.mjs.map} +0 -0
  213. /package/dist/{request-FXF63NSQ.mjs.map → request-3IUMNVOS.mjs.map} +0 -0
@@ -62,12 +62,13 @@
62
62
 
63
63
 
64
64
 
65
- var _chunkKOTKKBJTjs = require('../chunk-KOTKKBJT.js');
65
+ var _chunkNFCXUAE6js = require('../chunk-NFCXUAE6.js');
66
66
 
67
67
 
68
+ var _chunk5W5MN7JPjs = require('../chunk-5W5MN7JP.js');
68
69
 
69
70
 
70
- var _chunk4Z45NYPRjs = require('../chunk-4Z45NYPR.js');
71
+ var _chunkG4JR3SFVjs = require('../chunk-G4JR3SFV.js');
71
72
 
72
73
 
73
74
 
@@ -81,10 +82,11 @@ var _chunk4Z45NYPRjs = require('../chunk-4Z45NYPR.js');
81
82
 
82
83
 
83
84
 
84
- var _chunkCAKOFJZDjs = require('../chunk-CAKOFJZD.js');
85
- require('../chunk-26MQIJNB.js');
85
+
86
+ var _chunk6OFANJTEjs = require('../chunk-6OFANJTE.js');
86
87
  require('../chunk-LXKSUWAV.js');
87
88
  require('../chunk-JTPRJNT2.js');
89
+ require('../chunk-WGVNJXZO.js');
88
90
  require('../chunk-3EPNHTMH.js');
89
91
 
90
92
 
@@ -132,41 +134,41 @@ function SubscriptionSummaryCard({
132
134
  onManageClick
133
135
  }) {
134
136
  if (loading) {
135
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.Card, { children: [
136
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
137
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.CardTitle, { children: "Subscriptions" }),
137
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.Card, { children: [
138
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
139
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.CardTitle, { children: "Subscriptions" }),
138
140
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CreditCard, { className: "h-4 w-4 text-muted-foreground" })
139
141
  ] }),
140
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.CardContent, { children: [
141
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.Skeleton, { className: "h-6 w-32 mb-2" }),
142
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.Skeleton, { className: "h-4 w-24 mb-1" }),
143
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.Skeleton, { className: "h-4 w-40" })
142
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.CardContent, { children: [
143
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Skeleton, { className: "h-6 w-32 mb-2" }),
144
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Skeleton, { className: "h-4 w-24 mb-1" }),
145
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Skeleton, { className: "h-4 w-40" })
144
146
  ] })
145
147
  ] });
146
148
  }
147
149
  if (error) {
148
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.Card, { children: [
149
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
150
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.CardTitle, { children: "Subscriptions" }),
150
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.Card, { children: [
151
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
152
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.CardTitle, { children: "Subscriptions" }),
151
153
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CreditCard, { className: "h-4 w-4 text-muted-foreground" })
152
154
  ] }),
153
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) })
155
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) })
154
156
  ] });
155
157
  }
156
158
  const activeSubscriptions = subscriptions.filter(
157
159
  (sub) => sub.status === "active" /* ACTIVE */ || sub.status === "trialing" /* TRIALING */
158
160
  );
159
161
  const primarySubscription = activeSubscriptions[0];
160
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.Card, { className: "cursor-pointer hover:bg-accent/50 transition-colors", onClick: onManageClick, children: [
161
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
162
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.CardTitle, { children: "Subscriptions" }),
162
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.Card, { className: "cursor-pointer hover:bg-accent/50 transition-colors", onClick: onManageClick, children: [
163
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
164
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.CardTitle, { children: "Subscriptions" }),
163
165
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CreditCard, { className: "h-4 w-4 text-muted-foreground" })
164
166
  ] }),
165
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.CardContent, { children: subscriptions.length === 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
167
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.CardContent, { children: subscriptions.length === 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
166
168
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xl font-bold text-muted-foreground", children: "No active plan" }),
167
169
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs text-muted-foreground", children: "Subscribe to get started" }),
168
170
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
169
- _chunkKOTKKBJTjs.Button,
171
+ _chunkNFCXUAE6js.Button,
170
172
  {
171
173
  variant: "outline",
172
174
  size: "sm",
@@ -185,7 +187,7 @@ function SubscriptionSummaryCard({
185
187
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2", children: [
186
188
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xl font-bold", children: formatPlanName(primarySubscription) }),
187
189
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
188
- _chunkKOTKKBJTjs.Badge,
190
+ _chunkNFCXUAE6js.Badge,
189
191
  {
190
192
  variant: primarySubscription.cancelAtPeriodEnd ? "secondary" : getStatusBadgeVariant(primarySubscription.status),
191
193
  children: primarySubscription.cancelAtPeriodEnd ? "Canceling" : primarySubscription.status
@@ -227,37 +229,37 @@ function PaymentMethodSummaryCard({
227
229
  onManageClick
228
230
  }) {
229
231
  if (loading) {
230
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.Card, { children: [
231
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
232
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.CardTitle, { children: "Payment Method" }),
232
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.Card, { children: [
233
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
234
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.CardTitle, { children: "Payment Method" }),
233
235
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Wallet, { className: "h-4 w-4 text-muted-foreground" })
234
236
  ] }),
235
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.CardContent, { children: [
236
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.Skeleton, { className: "h-6 w-32 mb-2" }),
237
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.Skeleton, { className: "h-4 w-24" })
237
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.CardContent, { children: [
238
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Skeleton, { className: "h-6 w-32 mb-2" }),
239
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Skeleton, { className: "h-4 w-24" })
238
240
  ] })
239
241
  ] });
240
242
  }
241
243
  if (error) {
242
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.Card, { children: [
243
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
244
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.CardTitle, { children: "Payment Method" }),
244
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.Card, { children: [
245
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
246
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.CardTitle, { children: "Payment Method" }),
245
247
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Wallet, { className: "h-4 w-4 text-muted-foreground" })
246
248
  ] }),
247
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) })
249
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) })
248
250
  ] });
249
251
  }
250
252
  const defaultMethod = paymentMethods.find((pm) => pm.id === defaultPaymentMethodId) || paymentMethods[0];
251
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.Card, { className: "cursor-pointer hover:bg-accent/50 transition-colors", onClick: onManageClick, children: [
252
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
253
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.CardTitle, { children: "Payment Method" }),
253
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.Card, { className: "cursor-pointer hover:bg-accent/50 transition-colors", onClick: onManageClick, children: [
254
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
255
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.CardTitle, { children: "Payment Method" }),
254
256
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Wallet, { className: "h-4 w-4 text-muted-foreground" })
255
257
  ] }),
256
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.CardContent, { children: paymentMethods.length === 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
258
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.CardContent, { children: paymentMethods.length === 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
257
259
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xl font-bold text-muted-foreground", children: "No payment method" }),
258
260
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs text-muted-foreground", children: "Add a card to enable subscriptions" }),
259
261
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
260
- _chunkKOTKKBJTjs.Button,
262
+ _chunkNFCXUAE6js.Button,
261
263
  {
262
264
  variant: "outline",
263
265
  size: "sm",
@@ -321,7 +323,7 @@ function CustomerInfoCard({ customer, loading, error }) {
321
323
  e.stopPropagation();
322
324
  setPortalLoading(true);
323
325
  try {
324
- const { url } = await _chunkCAKOFJZDjs.StripeCustomerService.createPortalSession();
326
+ const { url } = await _chunk6OFANJTEjs.StripeCustomerService.createPortalSession();
325
327
  window.open(url, "_blank");
326
328
  } catch (err) {
327
329
  console.error("[CustomerInfoCard] Failed to create portal session:", err);
@@ -330,52 +332,52 @@ function CustomerInfoCard({ customer, loading, error }) {
330
332
  }
331
333
  }, "handlePortalClick");
332
334
  if (loading) {
333
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.Card, { children: [
334
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
335
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.CardTitle, { children: "Billing Account" }),
335
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.Card, { children: [
336
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
337
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.CardTitle, { children: "Billing Account" }),
336
338
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.User, { className: "h-4 w-4 text-muted-foreground" })
337
339
  ] }),
338
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.CardContent, { children: [
339
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.Skeleton, { className: "h-6 w-32 mb-2" }),
340
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.Skeleton, { className: "h-4 w-48 mb-1" }),
341
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.Skeleton, { className: "h-4 w-24" })
340
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.CardContent, { children: [
341
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Skeleton, { className: "h-6 w-32 mb-2" }),
342
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Skeleton, { className: "h-4 w-48 mb-1" }),
343
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Skeleton, { className: "h-4 w-24" })
342
344
  ] })
343
345
  ] });
344
346
  }
345
347
  if (error) {
346
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.Card, { children: [
347
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
348
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.CardTitle, { children: "Billing Account" }),
348
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.Card, { children: [
349
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
350
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.CardTitle, { children: "Billing Account" }),
349
351
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.User, { className: "h-4 w-4 text-muted-foreground" })
350
352
  ] }),
351
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) })
353
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) })
352
354
  ] });
353
355
  }
354
356
  if (!customer) {
355
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.Card, { children: [
356
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
357
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.CardTitle, { children: "Billing Account" }),
357
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.Card, { children: [
358
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
359
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.CardTitle, { children: "Billing Account" }),
358
360
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.User, { className: "h-4 w-4 text-muted-foreground" })
359
361
  ] }),
360
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.CardContent, { children: [
362
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.CardContent, { children: [
361
363
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xl font-bold text-muted-foreground", children: "Not set up" }),
362
364
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs text-muted-foreground", children: "Billing account will be created when you subscribe" })
363
365
  ] })
364
366
  ] });
365
367
  }
366
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.Card, { children: [
367
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
368
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.CardTitle, { children: "Billing Account" }),
368
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.Card, { children: [
369
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
370
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.CardTitle, { children: "Billing Account" }),
369
371
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.User, { className: "h-4 w-4 text-muted-foreground" })
370
372
  ] }),
371
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
373
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
372
374
  customer.name && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xl font-bold", children: customer.name }),
373
375
  customer.email && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-muted-foreground", children: customer.email }),
374
376
  customer.balance !== void 0 && customer.balance !== 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "p", { className: "text-sm", children: [
375
377
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground", children: "Credit Balance: " }),
376
378
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: customer.balance < 0 ? "text-success" : "text-destructive", children: formatBalance(customer.balance, customer.currency) })
377
379
  ] }),
378
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.Button, { variant: "outline", size: "sm", className: "mt-2", onClick: handlePortalClick, disabled: portalLoading, children: [
380
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.Button, { variant: "outline", size: "sm", className: "mt-2", onClick: handlePortalClick, disabled: portalLoading, children: [
379
381
  portalLoading ? "Loading..." : "Manage in Stripe Portal",
380
382
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ExternalLink, { className: "h-4 w-4 ms-1" })
381
383
  ] })
@@ -419,42 +421,42 @@ function formatAmount(amount, currency) {
419
421
  _chunk7QVYU63Ejs.__name.call(void 0, formatAmount, "formatAmount");
420
422
  function InvoicesSummaryCard({ invoices, loading, error, onViewAllClick }) {
421
423
  if (loading) {
422
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.Card, { children: [
423
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
424
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.CardTitle, { children: "Recent Invoices" }),
424
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.Card, { children: [
425
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
426
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.CardTitle, { children: "Recent Invoices" }),
425
427
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ReceiptIcon, { className: "h-4 w-4 text-muted-foreground" })
426
428
  ] }),
427
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.CardContent, { children: [
428
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.Skeleton, { className: "h-6 w-24 mb-2" }),
429
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.Skeleton, { className: "h-4 w-32 mb-1" }),
430
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.Skeleton, { className: "h-4 w-20" })
429
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.CardContent, { children: [
430
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Skeleton, { className: "h-6 w-24 mb-2" }),
431
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Skeleton, { className: "h-4 w-32 mb-1" }),
432
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Skeleton, { className: "h-4 w-20" })
431
433
  ] })
432
434
  ] });
433
435
  }
434
436
  if (error) {
435
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.Card, { children: [
436
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
437
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.CardTitle, { children: "Recent Invoices" }),
437
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.Card, { children: [
438
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
439
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.CardTitle, { children: "Recent Invoices" }),
438
440
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ReceiptIcon, { className: "h-4 w-4 text-muted-foreground" })
439
441
  ] }),
440
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) })
442
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) })
441
443
  ] });
442
444
  }
443
445
  const latestInvoice = invoices[0];
444
446
  const paidInvoices = invoices.filter((inv) => inv.status === "paid" /* PAID */);
445
447
  const openInvoices = invoices.filter((inv) => inv.status === "open" /* OPEN */);
446
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.Card, { className: "cursor-pointer hover:bg-accent/50 transition-colors", onClick: onViewAllClick, children: [
447
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
448
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.CardTitle, { children: "Recent Invoices" }),
448
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.Card, { className: "cursor-pointer hover:bg-accent/50 transition-colors", onClick: onViewAllClick, children: [
449
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
450
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.CardTitle, { children: "Recent Invoices" }),
449
451
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ReceiptIcon, { className: "h-4 w-4 text-muted-foreground" })
450
452
  ] }),
451
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.CardContent, { children: invoices.length === 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
453
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.CardContent, { children: invoices.length === 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
452
454
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xl font-bold text-muted-foreground", children: "No invoices yet" }),
453
455
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs text-muted-foreground", children: "Invoices will appear after your first billing cycle" })
454
456
  ] }) : latestInvoice ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
455
457
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2", children: [
456
458
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xl font-bold", children: formatAmount(latestInvoice.total, latestInvoice.currency) }),
457
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.Badge, { variant: getStatusBadgeVariant2(latestInvoice.status), children: latestInvoice.status })
459
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Badge, { variant: getStatusBadgeVariant2(latestInvoice.status), children: latestInvoice.status })
458
460
  ] }),
459
461
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-muted-foreground", children: latestInvoice.stripeInvoiceNumber || `Invoice from ${formatDate2(latestInvoice.periodStart)}` }),
460
462
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-4 text-xs text-muted-foreground", children: [
@@ -494,24 +496,24 @@ function BillingUsageSummaryCard({
494
496
  onViewDetailsClick
495
497
  }) {
496
498
  if (loading) {
497
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.Card, { children: [
498
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
499
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.CardTitle, { children: "Usage This Month" }),
499
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.Card, { children: [
500
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
501
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.CardTitle, { children: "Usage This Month" }),
500
502
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Activity, { className: "h-4 w-4 text-muted-foreground" })
501
503
  ] }),
502
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.CardContent, { children: [
503
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.Skeleton, { className: "h-6 w-24 mb-2" }),
504
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.Skeleton, { className: "h-4 w-32" })
504
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.CardContent, { children: [
505
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Skeleton, { className: "h-6 w-24 mb-2" }),
506
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Skeleton, { className: "h-4 w-32" })
505
507
  ] })
506
508
  ] });
507
509
  }
508
510
  if (error) {
509
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.Card, { children: [
510
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
511
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.CardTitle, { children: "Usage This Month" }),
511
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.Card, { children: [
512
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
513
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.CardTitle, { children: "Usage This Month" }),
512
514
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Activity, { className: "h-4 w-4 text-muted-foreground" })
513
515
  ] }),
514
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) })
516
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) })
515
517
  ] });
516
518
  }
517
519
  const totalUsage = Object.values(summaries).reduce((acc, summary) => {
@@ -519,12 +521,12 @@ function BillingUsageSummaryCard({
519
521
  }, 0);
520
522
  const primaryMeter = meters.find((m) => _optionalChain([summaries, 'access', _17 => _17[m.id], 'optionalAccess', _18 => _18.aggregatedValue]));
521
523
  const primarySummary = primaryMeter ? summaries[primaryMeter.id] : null;
522
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.Card, { className: "cursor-pointer hover:bg-accent/50 transition-colors", onClick: onViewDetailsClick, children: [
523
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
524
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.CardTitle, { children: "Usage This Month" }),
524
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.Card, { className: "cursor-pointer hover:bg-accent/50 transition-colors", onClick: onViewDetailsClick, children: [
525
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
526
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.CardTitle, { children: "Usage This Month" }),
525
527
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Activity, { className: "h-4 w-4 text-muted-foreground" })
526
528
  ] }),
527
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.CardContent, { children: meters.length === 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
529
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.CardContent, { children: meters.length === 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
528
530
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xl font-bold text-muted-foreground", children: "No meters" }),
529
531
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs text-muted-foreground", children: "No usage meters are configured" })
530
532
  ] }) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
@@ -576,7 +578,7 @@ function PaymentMethodForm({ onSuccess, onCancel, isLoading = false }) {
576
578
  const fetchSetupIntent = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
577
579
  setLoading(true);
578
580
  try {
579
- const intent = await _chunkCAKOFJZDjs.StripeCustomerService.createSetupIntent();
581
+ const intent = await _chunk6OFANJTEjs.StripeCustomerService.createSetupIntent();
580
582
  setSetupIntent(intent);
581
583
  } catch (err) {
582
584
  console.error("[PaymentMethodForm] Failed to create setup intent:", err);
@@ -614,7 +616,7 @@ function PaymentMethodForm({ onSuccess, onCancel, isLoading = false }) {
614
616
  return;
615
617
  }
616
618
  if (setAsDefault && _optionalChain([confirmedSetupIntent, 'optionalAccess', _19 => _19.payment_method])) {
617
- await _chunkCAKOFJZDjs.StripeCustomerService.setDefaultPaymentMethod({
619
+ await _chunk6OFANJTEjs.StripeCustomerService.setDefaultPaymentMethod({
618
620
  paymentMethodId: typeof confirmedSetupIntent.payment_method === "string" ? confirmedSetupIntent.payment_method : confirmedSetupIntent.payment_method.id
619
621
  });
620
622
  }
@@ -630,7 +632,7 @@ function PaymentMethodForm({ onSuccess, onCancel, isLoading = false }) {
630
632
  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: "Loading payment form..." }) });
631
633
  }
632
634
  if (!setupIntent && error) {
633
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.Alert, { variant: "destructive", className: "bg-red-50 border-red-200", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.AlertDescription, { children: error }) });
635
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Alert, { variant: "destructive", className: "bg-red-50 border-red-200", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.AlertDescription, { children: error }) });
634
636
  }
635
637
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: handleSubmit, className: "flex flex-col gap-y-4", children: [
636
638
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rounded-md border border-gray-300 p-3", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -653,13 +655,13 @@ function PaymentMethodForm({ onSuccess, onCancel, isLoading = false }) {
653
655
  }
654
656
  ) }),
655
657
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-x-2", children: [
656
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.Checkbox, { id: "setAsDefault", checked: setAsDefault, onCheckedChange: (checked) => setSetAsDefault(!!checked) }),
657
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.Label, { htmlFor: "setAsDefault", className: "cursor-pointer font-normal", children: "Set as default payment method" })
658
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Checkbox, { id: "setAsDefault", checked: setAsDefault, onCheckedChange: (checked) => setSetAsDefault(!!checked) }),
659
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Label, { htmlFor: "setAsDefault", className: "cursor-pointer font-normal", children: "Set as default payment method" })
658
660
  ] }),
659
- error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.Alert, { variant: "destructive", className: "bg-red-50 border-red-200", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.AlertDescription, { children: error }) }),
661
+ error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Alert, { variant: "destructive", className: "bg-red-50 border-red-200", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.AlertDescription, { children: error }) }),
660
662
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-end gap-x-2", children: [
661
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.Button, { type: "button", variant: "outline", onClick: onCancel, disabled: isSubmitting || isLoading, children: "Cancel" }),
662
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.Button, { type: "submit", disabled: !stripe || isSubmitting || isLoading, children: isSubmitting ? "Processing..." : "Add Card" })
663
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Button, { type: "button", variant: "outline", onClick: onCancel, disabled: isSubmitting || isLoading, children: "Cancel" }),
664
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Button, { type: "submit", disabled: !stripe || isSubmitting || isLoading, children: isSubmitting ? "Processing..." : "Add Card" })
663
665
  ] })
664
666
  ] });
665
667
  }
@@ -675,10 +677,10 @@ function PaymentMethodEditor({ open, onOpenChange, onSuccess }) {
675
677
  const handleCancel = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
676
678
  onOpenChange(false);
677
679
  }, "handleCancel");
678
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.DialogContent, { className: "max-w-md", children: [
679
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.DialogHeader, { children: [
680
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.DialogTitle, { children: "Add Payment Method" }),
681
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.DialogDescription, { children: "Add a new payment method to your account. Your card information is securely processed by Stripe." })
680
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.DialogContent, { className: "max-w-md", children: [
681
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.DialogHeader, { children: [
682
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.DialogTitle, { children: "Add Payment Method" }),
683
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.DialogDescription, { children: "Add a new payment method to your account. Your card information is securely processed by Stripe." })
682
684
  ] }),
683
685
  open && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PaymentMethodForm, { onSuccess: handleSuccess, onCancel: handleCancel })
684
686
  ] }) });
@@ -702,7 +704,7 @@ function PaymentMethodCard({ paymentMethod, onUpdate }) {
702
704
  _react.useEffect.call(void 0, () => {
703
705
  const loadCustomer = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
704
706
  try {
705
- const fetchedCustomer = await _chunkCAKOFJZDjs.StripeCustomerService.getCustomer();
707
+ const fetchedCustomer = await _chunk6OFANJTEjs.StripeCustomerService.getCustomer();
706
708
  setCustomer(fetchedCustomer);
707
709
  } catch (error) {
708
710
  console.error("[PaymentMethodCard] Failed to load customer:", error);
@@ -719,7 +721,7 @@ function PaymentMethodCard({ paymentMethod, onUpdate }) {
719
721
  const handleSetDefault = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
720
722
  setLoading(true);
721
723
  try {
722
- await _chunkCAKOFJZDjs.StripeCustomerService.setDefaultPaymentMethod({ paymentMethodId: paymentMethod.id });
724
+ await _chunk6OFANJTEjs.StripeCustomerService.setDefaultPaymentMethod({ paymentMethodId: paymentMethod.id });
723
725
  onUpdate();
724
726
  } catch (error) {
725
727
  console.error("[PaymentMethodCard] Failed to set as default:", error);
@@ -730,7 +732,7 @@ function PaymentMethodCard({ paymentMethod, onUpdate }) {
730
732
  const handleRemove = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
731
733
  setLoading(true);
732
734
  try {
733
- await _chunkCAKOFJZDjs.StripeCustomerService.removePaymentMethod({ paymentMethodId: paymentMethod.id });
735
+ await _chunk6OFANJTEjs.StripeCustomerService.removePaymentMethod({ paymentMethodId: paymentMethod.id });
734
736
  setShowRemoveDialog(false);
735
737
  onUpdate();
736
738
  } catch (error) {
@@ -739,16 +741,16 @@ function PaymentMethodCard({ paymentMethod, onUpdate }) {
739
741
  }
740
742
  }, "handleRemove");
741
743
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
742
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.Card, { className: "relative", children: [
743
- isDefault && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.Badge, { variant: "softGreen", className: "absolute end-2 top-2", children: "Default" }),
744
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.CardHeader, { className: "flex flex-row items-center justify-between pb-2", children: [
744
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.Card, { className: "relative", children: [
745
+ isDefault && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Badge, { variant: "softGreen", className: "absolute end-2 top-2", children: "Default" }),
746
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.CardHeader, { className: "flex flex-row items-center justify-between pb-2", children: [
745
747
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-x-2", children: [
746
748
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-2xl", children: brandIcon }),
747
749
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm font-medium capitalize", children: brand })
748
750
  ] }),
749
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.DropdownMenu, { children: [
750
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.DropdownMenuTrigger, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
751
- _chunkKOTKKBJTjs.Button,
751
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.DropdownMenu, { children: [
752
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.DropdownMenuTrigger, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
753
+ _chunkNFCXUAE6js.Button,
752
754
  {
753
755
  render: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", {}),
754
756
  nativeButton: false,
@@ -759,10 +761,10 @@ function PaymentMethodCard({ paymentMethod, onUpdate }) {
759
761
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.MoreVertical, { className: "h-4 w-4" })
760
762
  }
761
763
  ) }),
762
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.DropdownMenuContent, { align: "end", children: [
763
- !isDefault && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.DropdownMenuItem, { onClick: handleSetDefault, disabled: loading, children: "Set as Default" }),
764
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.DropdownMenuContent, { align: "end", children: [
765
+ !isDefault && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.DropdownMenuItem, { onClick: handleSetDefault, disabled: loading, children: "Set as Default" }),
764
766
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
765
- _chunkKOTKKBJTjs.DropdownMenuItem,
767
+ _chunkNFCXUAE6js.DropdownMenuItem,
766
768
  {
767
769
  onClick: () => setShowRemoveDialog(true),
768
770
  disabled: loading,
@@ -773,7 +775,7 @@ function PaymentMethodCard({ paymentMethod, onUpdate }) {
773
775
  ] })
774
776
  ] })
775
777
  ] }),
776
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-y-1", children: [
778
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-y-1", children: [
777
779
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "p", { className: "text-lg font-semibold", children: [
778
780
  "\u2022\u2022\u2022\u2022 ",
779
781
  last4
@@ -786,17 +788,17 @@ function PaymentMethodCard({ paymentMethod, onUpdate }) {
786
788
  ] })
787
789
  ] }) })
788
790
  ] }),
789
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.AlertDialog, { open: showRemoveDialog, onOpenChange: setShowRemoveDialog, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.AlertDialogContent, { children: [
790
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.AlertDialogHeader, { children: [
791
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.AlertDialogTitle, { children: "Remove Payment Method" }),
792
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.AlertDialogDescription, { children: [
791
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.AlertDialog, { open: showRemoveDialog, onOpenChange: setShowRemoveDialog, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.AlertDialogContent, { children: [
792
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.AlertDialogHeader, { children: [
793
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.AlertDialogTitle, { children: "Remove Payment Method" }),
794
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.AlertDialogDescription, { children: [
793
795
  "Are you sure you want to remove this payment method? This action cannot be undone.",
794
796
  isDefault && " This is your default payment method."
795
797
  ] })
796
798
  ] }),
797
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.AlertDialogFooter, { children: [
798
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.AlertDialogCancel, { disabled: loading, children: "Cancel" }),
799
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.AlertDialogAction, { onClick: handleRemove, disabled: loading, className: "bg-red-600 hover:bg-red-700", children: loading ? "Removing..." : "Remove" })
799
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.AlertDialogFooter, { children: [
800
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.AlertDialogCancel, { disabled: loading, children: "Cancel" }),
801
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.AlertDialogAction, { onClick: handleRemove, disabled: loading, className: "bg-red-600 hover:bg-red-700", children: loading ? "Removing..." : "Remove" })
800
802
  ] })
801
803
  ] }) })
802
804
  ] });
@@ -819,7 +821,7 @@ function PaymentMethodsContainer() {
819
821
  const loadPaymentMethods = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
820
822
  setLoading(true);
821
823
  try {
822
- const fetchedPaymentMethods = await _chunkCAKOFJZDjs.StripeCustomerService.listPaymentMethods();
824
+ const fetchedPaymentMethods = await _chunk6OFANJTEjs.StripeCustomerService.listPaymentMethods();
823
825
  setPaymentMethods(fetchedPaymentMethods);
824
826
  } catch (error) {
825
827
  console.error("[PaymentMethodsContainer] Failed to load payment methods:", error);
@@ -839,14 +841,14 @@ function PaymentMethodsContainer() {
839
841
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CreditCard, { className: "h-8 w-8" }),
840
842
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h1", { className: "text-primary text-3xl font-semibold", children: "Payment Methods" })
841
843
  ] }),
842
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.Button, { onClick: () => setShowAddPaymentMethod(true), children: "Add Payment Method" })
844
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Button, { onClick: () => setShowAddPaymentMethod(true), children: "Add Payment Method" })
843
845
  ] }),
844
846
  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: [
845
847
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CreditCard, { className: "h-16 w-16 text-muted-foreground" }),
846
848
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-center", children: [
847
849
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "mb-2 text-sm font-medium", children: "No payment methods" }),
848
850
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "mb-4 text-muted-foreground", children: "Add a payment method to enable subscriptions and secure checkout." }),
849
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.Button, { onClick: () => setShowAddPaymentMethod(true), children: "Add Your First Card" })
851
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Button, { onClick: () => setShowAddPaymentMethod(true), children: "Add Your First Card" })
850
852
  ] })
851
853
  ] }),
852
854
  paymentMethods.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PaymentMethodsList, { paymentMethods, onUpdate: loadPaymentMethods }),
@@ -914,7 +916,7 @@ var statusConfig = {
914
916
  };
915
917
  function InvoiceStatusBadge({ status }) {
916
918
  const config = statusConfig[status] || statusConfig["draft" /* DRAFT */];
917
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.Badge, { variant: config.variant, children: config.label });
919
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Badge, { variant: config.variant, children: config.label });
918
920
  }
919
921
  _chunk7QVYU63Ejs.__name.call(void 0, InvoiceStatusBadge, "InvoiceStatusBadge");
920
922
 
@@ -945,13 +947,13 @@ function InvoiceDetails({
945
947
  return invoice.stripeInvoiceId.slice(-8);
946
948
  }, "getInvoiceNumber");
947
949
  const productName = _optionalChain([invoice, 'access', _29 => _29.subscription, 'optionalAccess', _30 => _30.price, 'optionalAccess', _31 => _31.product, 'optionalAccess', _32 => _32.name]) || "Subscription";
948
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.DialogContent, { className: "max-w-2xl", children: [
949
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.DialogHeader, { children: [
950
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.DialogTitle, { children: [
950
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.DialogContent, { className: "max-w-2xl", children: [
951
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.DialogHeader, { children: [
952
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.DialogTitle, { children: [
951
953
  "Invoice ",
952
954
  getInvoiceNumber()
953
955
  ] }),
954
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.DialogDescription, { children: formatDate3(invoice.periodStart) })
956
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.DialogDescription, { children: formatDate3(invoice.periodStart) })
955
957
  ] }),
956
958
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-6", children: [
957
959
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-x-3", children: [
@@ -989,42 +991,42 @@ function InvoiceDetails({
989
991
  ] }) }),
990
992
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tbody", { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "tr", { className: "border-t", children: [
991
993
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "p-3", children: productName }),
992
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "p-3 text-end", children: _chunkKOTKKBJTjs.formatCurrency.call(void 0, invoice.subtotal, invoice.currency) })
994
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "p-3 text-end", children: _chunkNFCXUAE6js.formatCurrency.call(void 0, invoice.subtotal, invoice.currency) })
993
995
  ] }) })
994
996
  ] }) })
995
997
  ] }),
996
998
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2 border-t pt-4", children: [
997
999
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-between", children: [
998
1000
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: "Subtotal:" }),
999
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm", children: _chunkKOTKKBJTjs.formatCurrency.call(void 0, invoice.subtotal, invoice.currency) })
1001
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm", children: _chunkNFCXUAE6js.formatCurrency.call(void 0, invoice.subtotal, invoice.currency) })
1000
1002
  ] }),
1001
1003
  invoice.tax !== void 0 && invoice.tax > 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-between", children: [
1002
1004
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: "Tax:" }),
1003
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm", children: _chunkKOTKKBJTjs.formatCurrency.call(void 0, invoice.tax, invoice.currency) })
1005
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm", children: _chunkNFCXUAE6js.formatCurrency.call(void 0, invoice.tax, invoice.currency) })
1004
1006
  ] }),
1005
1007
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-between text-lg font-semibold border-t pt-2", children: [
1006
1008
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Total:" }),
1007
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: _chunkKOTKKBJTjs.formatCurrency.call(void 0, invoice.total, invoice.currency) })
1009
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: _chunkNFCXUAE6js.formatCurrency.call(void 0, invoice.total, invoice.currency) })
1008
1010
  ] }),
1009
1011
  invoice.amountPaid > 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-between", children: [
1010
1012
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: "Amount Paid:" }),
1011
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm text-success", children: _chunkKOTKKBJTjs.formatCurrency.call(void 0, invoice.amountPaid, invoice.currency) })
1013
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm text-success", children: _chunkNFCXUAE6js.formatCurrency.call(void 0, invoice.amountPaid, invoice.currency) })
1012
1014
  ] }),
1013
1015
  invoice.amountRemaining > 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-between", children: [
1014
1016
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: "Amount Due:" }),
1015
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm text-destructive", children: _chunkKOTKKBJTjs.formatCurrency.call(void 0, invoice.amountRemaining, invoice.currency) })
1017
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm text-destructive", children: _chunkNFCXUAE6js.formatCurrency.call(void 0, invoice.amountRemaining, invoice.currency) })
1016
1018
  ] })
1017
1019
  ] }),
1018
1020
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-wrap gap-2 pt-4 border-t", children: [
1019
- invoice.stripePdfUrl && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.Button, { variant: "outline", onClick: handleDownloadPDF, children: [
1021
+ invoice.stripePdfUrl && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.Button, { variant: "outline", onClick: handleDownloadPDF, children: [
1020
1022
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Download, { className: "me-2 h-4 w-4" }),
1021
1023
  "Download PDF"
1022
1024
  ] }),
1023
- invoice.status === "open" /* OPEN */ && invoice.attempted && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.Button, { variant: "default", onClick: handleRetryPayment, children: [
1025
+ invoice.status === "open" /* OPEN */ && invoice.attempted && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.Button, { variant: "default", onClick: handleRetryPayment, children: [
1024
1026
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.RefreshCw, { className: "me-2 h-4 w-4" }),
1025
1027
  "Retry Payment"
1026
1028
  ] }),
1027
- invoice.stripeHostedInvoiceUrl && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.Button, { variant: "outline", onClick: handleViewInStripe, children: [
1029
+ invoice.stripeHostedInvoiceUrl && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.Button, { variant: "outline", onClick: handleViewInStripe, children: [
1028
1030
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ExternalLink, { className: "me-2 h-4 w-4" }),
1029
1031
  "View in Stripe"
1030
1032
  ] })
@@ -1048,30 +1050,30 @@ function InvoicesList({ invoices, onInvoicesChange }) {
1048
1050
  return invoice.stripeInvoiceId.slice(-8);
1049
1051
  }, "getInvoiceNumber");
1050
1052
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
1051
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "border rounded-lg overflow-clip", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.Table, { children: [
1052
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.TableHeader, { className: "bg-muted", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.TableRow, { children: [
1053
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.TableHead, { children: "Invoice #" }),
1054
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.TableHead, { children: "Date" }),
1055
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.TableHead, { children: "Status" }),
1056
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.TableHead, { className: "text-end", children: "Amount" }),
1057
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.TableHead, { children: "Period" })
1053
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "border rounded-lg overflow-clip", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.Table, { children: [
1054
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TableHeader, { className: "bg-muted", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.TableRow, { children: [
1055
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TableHead, { children: "Invoice #" }),
1056
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TableHead, { children: "Date" }),
1057
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TableHead, { children: "Status" }),
1058
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TableHead, { className: "text-end", children: "Amount" }),
1059
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TableHead, { children: "Period" })
1058
1060
  ] }) }),
1059
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.TableBody, { children: invoices.map((invoice) => {
1061
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TableBody, { children: invoices.map((invoice) => {
1060
1062
  const invoiceNumber = getInvoiceNumber(invoice);
1061
1063
  const date = formatDate3(invoice.periodStart);
1062
- const amount = _chunkKOTKKBJTjs.formatCurrency.call(void 0, invoice.total, invoice.currency);
1064
+ const amount = _chunkNFCXUAE6js.formatCurrency.call(void 0, invoice.total, invoice.currency);
1063
1065
  const period = `${formatDate3(invoice.periodStart)} - ${formatDate3(invoice.periodEnd)}`;
1064
1066
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1065
- _chunkKOTKKBJTjs.TableRow,
1067
+ _chunkNFCXUAE6js.TableRow,
1066
1068
  {
1067
1069
  onClick: () => handleRowClick(invoice),
1068
1070
  className: "cursor-pointer hover:bg-muted/50",
1069
1071
  children: [
1070
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.TableCell, { className: "font-medium", children: invoiceNumber }),
1071
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.TableCell, { className: "text-muted-foreground text-xs", children: date }),
1072
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.TableCell, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, InvoiceStatusBadge, { status: invoice.status }) }),
1073
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.TableCell, { className: "text-end font-medium", children: amount }),
1074
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.TableCell, { className: "text-muted-foreground text-xs", children: period })
1072
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TableCell, { className: "font-medium", children: invoiceNumber }),
1073
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TableCell, { className: "text-muted-foreground text-xs", children: date }),
1074
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TableCell, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, InvoiceStatusBadge, { status: invoice.status }) }),
1075
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TableCell, { className: "text-end font-medium", children: amount }),
1076
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TableCell, { className: "text-muted-foreground text-xs", children: period })
1075
1077
  ]
1076
1078
  },
1077
1079
  invoice.id
@@ -1104,7 +1106,7 @@ function InvoicesContainer() {
1104
1106
  setLoading(true);
1105
1107
  try {
1106
1108
  const params = statusFilter !== "all" ? { status: statusFilter } : void 0;
1107
- const data = await _chunkCAKOFJZDjs.StripeInvoiceService.listInvoices(params);
1109
+ const data = await _chunk6OFANJTEjs.StripeInvoiceService.listInvoices(params);
1108
1110
  setInvoices(data);
1109
1111
  } catch (error) {
1110
1112
  console.error("[InvoicesContainer] Failed to load invoices:", error);
@@ -1120,12 +1122,12 @@ function InvoicesContainer() {
1120
1122
  setStatusFilter(value);
1121
1123
  }, "handleFilterChange");
1122
1124
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-4", children: [
1123
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.Tabs, { value: statusFilter, onValueChange: handleFilterChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.TabsList, { children: [
1124
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.TabsTrigger, { value: "all", children: "All" }),
1125
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.TabsTrigger, { value: "paid" /* PAID */, children: "Paid" }),
1126
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.TabsTrigger, { value: "open" /* OPEN */, children: "Open" }),
1127
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.TabsTrigger, { value: "void" /* VOID */, children: "Void" }),
1128
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.TabsTrigger, { value: "uncollectible" /* UNCOLLECTIBLE */, children: "Uncollectible" })
1125
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Tabs, { value: statusFilter, onValueChange: handleFilterChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.TabsList, { children: [
1126
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TabsTrigger, { value: "all", children: "All" }),
1127
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TabsTrigger, { value: "paid" /* PAID */, children: "Paid" }),
1128
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TabsTrigger, { value: "open" /* OPEN */, children: "Open" }),
1129
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TabsTrigger, { value: "void" /* VOID */, children: "Void" }),
1130
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TabsTrigger, { value: "uncollectible" /* UNCOLLECTIBLE */, children: "Uncollectible" })
1129
1131
  ] }) }),
1130
1132
  loading && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-center py-8 text-muted-foreground", children: "Loading invoices..." }),
1131
1133
  !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: [
@@ -1172,7 +1174,7 @@ function CancelSubscriptionDialog({
1172
1174
  const onSubmit = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async (_values) => {
1173
1175
  setIsSubmitting(true);
1174
1176
  try {
1175
- await _chunkCAKOFJZDjs.StripeSubscriptionService.cancelSubscription({
1177
+ await _chunk6OFANJTEjs.StripeSubscriptionService.cancelSubscription({
1176
1178
  id: subscription.id,
1177
1179
  cancelImmediately: false
1178
1180
  });
@@ -1185,19 +1187,19 @@ function CancelSubscriptionDialog({
1185
1187
  }
1186
1188
  }, "onSubmit");
1187
1189
  const periodEndDate = formatDate3(subscription.currentPeriodEnd);
1188
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.DialogContent, { className: "max-w-md", children: [
1189
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.DialogHeader, { children: [
1190
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.DialogTitle, { children: "Cancel Subscription" }),
1191
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.DialogDescription, { children: "Are you sure you want to cancel this subscription? This action cannot be undone." })
1190
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.DialogContent, { className: "max-w-md", children: [
1191
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.DialogHeader, { children: [
1192
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.DialogTitle, { children: "Cancel Subscription" }),
1193
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.DialogDescription, { children: "Are you sure you want to cancel this subscription? This action cannot be undone." })
1192
1194
  ] }),
1193
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.Form, { ...form, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: form.handleSubmit(onSubmit), className: "flex flex-col gap-y-4", children: [
1195
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Form, { ...form, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: form.handleSubmit(onSubmit), className: "flex flex-col gap-y-4", children: [
1194
1196
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "bg-primary/10 border-primary/30 text-foreground rounded-lg border p-3 text-sm", children: [
1195
1197
  "Your subscription will remain active until ",
1196
1198
  periodEndDate,
1197
1199
  ". You can continue using the service until then."
1198
1200
  ] }),
1199
1201
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1200
- _chunkKOTKKBJTjs.FormTextarea,
1202
+ _chunkNFCXUAE6js.FormTextarea,
1201
1203
  {
1202
1204
  form,
1203
1205
  id: "reason",
@@ -1207,8 +1209,8 @@ function CancelSubscriptionDialog({
1207
1209
  }
1208
1210
  ),
1209
1211
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex gap-x-2 justify-end pt-2", children: [
1210
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.Button, { type: "button", variant: "outline", onClick: () => onOpenChange(false), disabled: isSubmitting, children: "Keep Subscription" }),
1211
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.Button, { type: "submit", variant: "destructive", disabled: isSubmitting, children: isSubmitting ? "Canceling..." : "Confirm Cancellation" })
1212
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Button, { type: "button", variant: "outline", onClick: () => onOpenChange(false), disabled: isSubmitting, children: "Keep Subscription" }),
1213
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Button, { type: "submit", variant: "destructive", disabled: isSubmitting, children: isSubmitting ? "Canceling..." : "Confirm Cancellation" })
1212
1214
  ] })
1213
1215
  ] }) })
1214
1216
  ] }) });
@@ -1257,7 +1259,7 @@ var cancelingConfig = {
1257
1259
  };
1258
1260
  function SubscriptionStatusBadge({ status, cancelAtPeriodEnd }) {
1259
1261
  const config = cancelAtPeriodEnd ? cancelingConfig : statusConfig2[status] || statusConfig2["canceled" /* CANCELED */];
1260
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.Badge, { variant: config.variant, children: config.label });
1262
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Badge, { variant: config.variant, children: config.label });
1261
1263
  }
1262
1264
  _chunk7QVYU63Ejs.__name.call(void 0, SubscriptionStatusBadge, "SubscriptionStatusBadge");
1263
1265
 
@@ -1284,7 +1286,7 @@ function formatPlanName2(price) {
1284
1286
  _chunk7QVYU63Ejs.__name.call(void 0, formatPlanName2, "formatPlanName");
1285
1287
  function formatBillingAmount(price) {
1286
1288
  if (!_optionalChain([price, 'optionalAccess', _37 => _37.unitAmount])) return "N/A";
1287
- return _chunkKOTKKBJTjs.formatCurrency.call(void 0, price.unitAmount, price.currency);
1289
+ return _chunkNFCXUAE6js.formatCurrency.call(void 0, price.unitAmount, price.currency);
1288
1290
  }
1289
1291
  _chunk7QVYU63Ejs.__name.call(void 0, formatBillingAmount, "formatBillingAmount");
1290
1292
  function SubscriptionDetails({
@@ -1299,7 +1301,7 @@ function SubscriptionDetails({
1299
1301
  const handlePause = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
1300
1302
  setIsProcessing(true);
1301
1303
  try {
1302
- await _chunkCAKOFJZDjs.StripeSubscriptionService.pauseSubscription({ subscriptionId: subscription.id });
1304
+ await _chunk6OFANJTEjs.StripeSubscriptionService.pauseSubscription({ subscriptionId: subscription.id });
1303
1305
  onSubscriptionChange();
1304
1306
  } catch (error) {
1305
1307
  console.error("[SubscriptionDetails] Failed to pause subscription:", error);
@@ -1310,7 +1312,7 @@ function SubscriptionDetails({
1310
1312
  const handleResume = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
1311
1313
  setIsProcessing(true);
1312
1314
  try {
1313
- await _chunkCAKOFJZDjs.StripeSubscriptionService.resumeSubscription({ subscriptionId: subscription.id });
1315
+ await _chunk6OFANJTEjs.StripeSubscriptionService.resumeSubscription({ subscriptionId: subscription.id });
1314
1316
  onSubscriptionChange();
1315
1317
  } catch (error) {
1316
1318
  console.error("[SubscriptionDetails] Failed to resume subscription:", error);
@@ -1320,7 +1322,7 @@ function SubscriptionDetails({
1320
1322
  }, "handleResume");
1321
1323
  const handleManageViaPortal = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
1322
1324
  try {
1323
- const { url } = await _chunkCAKOFJZDjs.StripeCustomerService.createPortalSession();
1325
+ const { url } = await _chunk6OFANJTEjs.StripeCustomerService.createPortalSession();
1324
1326
  window.open(url, "_blank");
1325
1327
  } catch (error) {
1326
1328
  console.error("[SubscriptionDetails] Failed to create portal session:", error);
@@ -1330,10 +1332,10 @@ function SubscriptionDetails({
1330
1332
  const canResume = subscription.status === "paused" /* PAUSED */;
1331
1333
  const canCancel = subscription.status === "active" /* ACTIVE */ || subscription.status === "trialing" /* TRIALING */ || subscription.status === "paused" /* PAUSED */;
1332
1334
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
1333
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.DialogContent, { className: "max-w-2xl", children: [
1334
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.DialogHeader, { children: [
1335
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.DialogTitle, { children: "Subscription Details" }),
1336
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.DialogDescription, { children: "View and manage your subscription" })
1335
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.DialogContent, { className: "max-w-2xl", children: [
1336
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.DialogHeader, { children: [
1337
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.DialogTitle, { children: "Subscription Details" }),
1338
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.DialogDescription, { children: "View and manage your subscription" })
1337
1339
  ] }),
1338
1340
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-6", children: [
1339
1341
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-x-3", children: [
@@ -1375,11 +1377,11 @@ function SubscriptionDetails({
1375
1377
  "."
1376
1378
  ] }) }),
1377
1379
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-wrap gap-2 pt-4 border-t", children: [
1378
- onChangePlan && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.Button, { variant: "default", onClick: () => onChangePlan(subscription), children: "Change Plan" }),
1379
- canPause && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.Button, { variant: "outline", onClick: handlePause, disabled: isProcessing, children: isProcessing ? "Pausing..." : "Pause" }),
1380
- canResume && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.Button, { variant: "outline", onClick: handleResume, disabled: isProcessing, children: isProcessing ? "Resuming..." : "Resume" }),
1381
- canCancel && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.Button, { variant: "destructive", onClick: () => setShowCancel(true), children: "Cancel" }),
1382
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.Button, { variant: "outline", onClick: handleManageViaPortal, children: "Manage via Portal" })
1380
+ onChangePlan && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Button, { variant: "default", onClick: () => onChangePlan(subscription), children: "Change Plan" }),
1381
+ canPause && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Button, { variant: "outline", onClick: handlePause, disabled: isProcessing, children: isProcessing ? "Pausing..." : "Pause" }),
1382
+ canResume && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Button, { variant: "outline", onClick: handleResume, disabled: isProcessing, children: isProcessing ? "Resuming..." : "Resume" }),
1383
+ canCancel && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Button, { variant: "destructive", onClick: () => setShowCancel(true), children: "Cancel" }),
1384
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Button, { variant: "outline", onClick: handleManageViaPortal, children: "Manage via Portal" })
1383
1385
  ] })
1384
1386
  ] })
1385
1387
  ] }) }),
@@ -1426,36 +1428,36 @@ function SubscriptionsList({ subscriptions, onSubscriptionsChange, onChangePlan
1426
1428
  setSelectedSub(subscription);
1427
1429
  }, "handleRowClick");
1428
1430
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
1429
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "border rounded-lg overflow-clip", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.Table, { children: [
1430
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.TableHeader, { className: "bg-muted", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.TableRow, { children: [
1431
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.TableHead, { children: "Status" }),
1432
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.TableHead, { children: "Plan" }),
1433
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.TableHead, { children: "Period" }),
1434
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.TableHead, { className: "text-end", children: "Amount" }),
1435
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.TableHead, { className: "text-end", children: "Actions" })
1431
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "border rounded-lg overflow-clip", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.Table, { children: [
1432
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TableHeader, { className: "bg-muted", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.TableRow, { children: [
1433
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TableHead, { children: "Status" }),
1434
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TableHead, { children: "Plan" }),
1435
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TableHead, { children: "Period" }),
1436
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TableHead, { className: "text-end", children: "Amount" }),
1437
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TableHead, { className: "text-end", children: "Actions" })
1436
1438
  ] }) }),
1437
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.TableBody, { children: subscriptions.map((subscription) => {
1439
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TableBody, { children: subscriptions.map((subscription) => {
1438
1440
  const price = subscription.price;
1439
- const amount = _optionalChain([price, 'optionalAccess', _42 => _42.unitAmount]) ? _chunkKOTKKBJTjs.formatCurrency.call(void 0, price.unitAmount, price.currency) : "0";
1441
+ const amount = _optionalChain([price, 'optionalAccess', _42 => _42.unitAmount]) ? _chunkNFCXUAE6js.formatCurrency.call(void 0, price.unitAmount, price.currency) : "0";
1440
1442
  const period = `${formatDate3(subscription.currentPeriodStart)} - ${formatDate3(subscription.currentPeriodEnd)}`;
1441
1443
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1442
- _chunkKOTKKBJTjs.TableRow,
1444
+ _chunkNFCXUAE6js.TableRow,
1443
1445
  {
1444
1446
  onClick: () => handleRowClick(subscription),
1445
1447
  className: "cursor-pointer hover:bg-muted/50",
1446
1448
  children: [
1447
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.TableCell, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1449
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TableCell, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1448
1450
  SubscriptionStatusBadge,
1449
1451
  {
1450
1452
  status: subscription.status,
1451
1453
  cancelAtPeriodEnd: subscription.cancelAtPeriodEnd
1452
1454
  }
1453
1455
  ) }),
1454
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.TableCell, { className: "font-medium", children: formatPlanName3(price) }),
1455
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.TableCell, { className: "text-muted-foreground text-sm", children: period }),
1456
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.TableCell, { className: "text-end font-medium", children: amount }),
1457
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.TableCell, { className: "text-end", children: (subscription.status === "active" /* ACTIVE */ || subscription.status === "trialing" /* TRIALING */) && onChangePlan && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1458
- _chunkKOTKKBJTjs.Button,
1456
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TableCell, { className: "font-medium", children: formatPlanName3(price) }),
1457
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TableCell, { className: "text-muted-foreground text-sm", children: period }),
1458
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TableCell, { className: "text-end font-medium", children: amount }),
1459
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TableCell, { className: "text-end", children: (subscription.status === "active" /* ACTIVE */ || subscription.status === "trialing" /* TRIALING */) && onChangePlan && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1460
+ _chunkNFCXUAE6js.Button,
1459
1461
  {
1460
1462
  size: "sm",
1461
1463
  variant: "outline",
@@ -1500,7 +1502,7 @@ function SubscriptionsContainer({ onOpenWizard, hasActiveRecurringSubscription }
1500
1502
  const loadSubscriptions = _react.useCallback.call(void 0, async () => {
1501
1503
  setLoading(true);
1502
1504
  try {
1503
- const fetchedSubscriptions = await _chunkCAKOFJZDjs.StripeSubscriptionService.listSubscriptions();
1505
+ const fetchedSubscriptions = await _chunk6OFANJTEjs.StripeSubscriptionService.listSubscriptions();
1504
1506
  setSubscriptions(fetchedSubscriptions);
1505
1507
  } catch (error) {
1506
1508
  console.error("[SubscriptionsContainer] Failed to load subscriptions:", error);
@@ -1523,7 +1525,7 @@ function SubscriptionsContainer({ onOpenWizard, hasActiveRecurringSubscription }
1523
1525
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CreditCard, { className: "h-8 w-8" }),
1524
1526
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h1", { className: "text-primary text-3xl font-semibold", children: "Subscriptions" })
1525
1527
  ] }),
1526
- subscriptions.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.Button, { onClick: () => _optionalChain([onOpenWizard, 'optionalCall', _43 => _43()]), children: hasActiveRecurringSubscription ? "Purchase Add-ons" : "Subscribe to a Plan" })
1528
+ subscriptions.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Button, { onClick: () => _optionalChain([onOpenWizard, 'optionalCall', _43 => _43()]), children: hasActiveRecurringSubscription ? "Purchase Add-ons" : "Subscribe to a Plan" })
1527
1529
  ] }),
1528
1530
  criticalSubscriptions.map((subscription) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BillingAlertBanner, { subscription }, subscription.id)),
1529
1531
  subscriptions.length === 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col items-center justify-center py-12 space-y-4", children: [
@@ -1531,7 +1533,7 @@ function SubscriptionsContainer({ onOpenWizard, hasActiveRecurringSubscription }
1531
1533
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-center", children: [
1532
1534
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "text-sm font-medium mb-2", children: "No Active Subscriptions" }),
1533
1535
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground mb-6", children: "Choose a subscription plan to get started with our services." }),
1534
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.Button, { onClick: () => _optionalChain([onOpenWizard, 'optionalCall', _44 => _44()]), children: "Subscribe to a Plan" })
1536
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Button, { onClick: () => _optionalChain([onOpenWizard, 'optionalCall', _44 => _44()]), children: "Subscribe to a Plan" })
1535
1537
  ] })
1536
1538
  ] }),
1537
1539
  subscriptions.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -1552,9 +1554,9 @@ function IntervalToggle({ value, onChange, hasMonthly, hasYearly }) {
1552
1554
  if (!hasMonthly || !hasYearly) {
1553
1555
  return null;
1554
1556
  }
1555
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.Tabs, { value, onValueChange: (v) => onChange(v), children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.TabsList, { children: [
1556
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.TabsTrigger, { value: "month", children: "Monthly" }),
1557
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.TabsTrigger, { value: "year", children: "Yearly" })
1557
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Tabs, { value, onValueChange: (v) => onChange(v), children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.TabsList, { children: [
1558
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TabsTrigger, { value: "month", children: "Monthly" }),
1559
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TabsTrigger, { value: "year", children: "Yearly" })
1558
1560
  ] }) });
1559
1561
  }
1560
1562
  _chunk7QVYU63Ejs.__name.call(void 0, IntervalToggle, "IntervalToggle");
@@ -1572,8 +1574,8 @@ function PricingCard({
1572
1574
  }) {
1573
1575
  const description = price.description || price.nickname || "Standard";
1574
1576
  const features = price.features || [];
1575
- const formattedPrice = _chunkKOTKKBJTjs.formatCurrency.call(void 0, price.unitAmount, price.currency);
1576
- const interval = _chunkKOTKKBJTjs.formatInterval.call(void 0, price);
1577
+ const formattedPrice = _chunkNFCXUAE6js.formatCurrency.call(void 0, price.unitAmount, price.currency);
1578
+ const interval = _chunkNFCXUAE6js.formatInterval.call(void 0, price);
1577
1579
  const handleKeyDown = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (e) => {
1578
1580
  if ((e.key === "Enter" || e.key === " ") && !isDisabled && !isCurrentPlan) {
1579
1581
  e.preventDefault();
@@ -1586,7 +1588,7 @@ function PricingCard({
1586
1588
  }
1587
1589
  }, "handleClick");
1588
1590
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1589
- _chunkKOTKKBJTjs.Card,
1591
+ _chunkNFCXUAE6js.Card,
1590
1592
  {
1591
1593
  role: "radio",
1592
1594
  "aria-checked": isSelected,
@@ -1594,7 +1596,7 @@ function PricingCard({
1594
1596
  tabIndex: isDisabled ? -1 : 0,
1595
1597
  onKeyDown: handleKeyDown,
1596
1598
  onClick: handleClick,
1597
- className: _chunkCAKOFJZDjs.cn.call(void 0,
1599
+ className: _chunk6OFANJTEjs.cn.call(void 0,
1598
1600
  "relative cursor-pointer transition-all duration-200 flex flex-col h-full",
1599
1601
  "focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
1600
1602
  isCurrentPlan && "bg-muted/30",
@@ -1604,9 +1606,9 @@ function PricingCard({
1604
1606
  isLoading && "pointer-events-none"
1605
1607
  ),
1606
1608
  children: [
1607
- isCurrentPlan && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.Badge, { variant: "secondary", className: "absolute top-2 end-2", children: "Current" }),
1608
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.CardHeader, { className: "pb-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "text-sm font-medium", children: description }) }),
1609
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.CardContent, { className: "pb-4 grow", children: [
1609
+ isCurrentPlan && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Badge, { variant: "secondary", className: "absolute top-2 end-2", children: "Current" }),
1610
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.CardHeader, { className: "pb-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "text-sm font-medium", children: description }) }),
1611
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.CardContent, { className: "pb-4 grow", children: [
1610
1612
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mb-4", children: [
1611
1613
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-3xl font-bold", children: formattedPrice }),
1612
1614
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground ms-1", children: interval })
@@ -1616,8 +1618,8 @@ function PricingCard({
1616
1618
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm text-muted-foreground", children: feature })
1617
1619
  ] }, index)) })
1618
1620
  ] }),
1619
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.CardFooter, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1620
- _chunkKOTKKBJTjs.Button,
1621
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.CardFooter, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1622
+ _chunkNFCXUAE6js.Button,
1621
1623
  {
1622
1624
  variant: isCurrentPlan ? "secondary" : isSelected ? "default" : "outline",
1623
1625
  className: "w-full",
@@ -1645,7 +1647,7 @@ function ProductPricingRow({
1645
1647
  return null;
1646
1648
  }
1647
1649
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-3", children: [
1648
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.SectionHeader, { children: product.name }),
1650
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.SectionHeader, { children: product.name }),
1649
1651
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1650
1652
  "div",
1651
1653
  {
@@ -1745,15 +1747,15 @@ function ProductPricingList({
1745
1747
  _chunk7QVYU63Ejs.__name.call(void 0, ProductPricingList, "ProductPricingList");
1746
1748
  function ProductPricingListSkeleton() {
1747
1749
  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: [
1748
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.Skeleton, { className: "h-6 w-32" }),
1750
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Skeleton, { className: "h-6 w-32" }),
1749
1751
  /* @__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: [
1750
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.Skeleton, { className: "h-6 w-24" }),
1751
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.Skeleton, { className: "h-8 w-32" }),
1752
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Skeleton, { className: "h-6 w-24" }),
1753
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Skeleton, { className: "h-8 w-32" }),
1752
1754
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
1753
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.Skeleton, { className: "h-4 w-full" }),
1754
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.Skeleton, { className: "h-4 w-3/4" })
1755
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Skeleton, { className: "h-4 w-full" }),
1756
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Skeleton, { className: "h-4 w-3/4" })
1755
1757
  ] }),
1756
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.Skeleton, { className: "h-10 w-full" })
1758
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Skeleton, { className: "h-10 w-full" })
1757
1759
  ] }, cardIndex)) })
1758
1760
  ] }, rowIndex)) });
1759
1761
  }
@@ -1767,18 +1769,18 @@ function ProrationPreview({ preview }) {
1767
1769
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
1768
1770
  preview.lineItems.map((item, index) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-between text-sm", children: [
1769
1771
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground", children: item.description }),
1770
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: `font-medium ${item.amount < 0 ? "text-success" : "text-foreground"}`, children: _chunkKOTKKBJTjs.formatCurrency.call(void 0, item.amount, preview.currency) })
1772
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: `font-medium ${item.amount < 0 ? "text-success" : "text-foreground"}`, children: _chunkNFCXUAE6js.formatCurrency.call(void 0, item.amount, preview.currency) })
1771
1773
  ] }, index)),
1772
1774
  /* @__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: [
1773
1775
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-foreground", children: "Net Due Today" }),
1774
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-foreground", children: _chunkKOTKKBJTjs.formatCurrency.call(void 0, preview.immediateCharge, preview.currency) })
1776
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-foreground", children: _chunkNFCXUAE6js.formatCurrency.call(void 0, preview.immediateCharge, preview.currency) })
1775
1777
  ] }) }),
1776
1778
  preview.lineItems.length > 0 && preview.lineItems[0].period && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-muted-foreground mt-2 text-xs", children: [
1777
1779
  "Next invoice on ",
1778
1780
  formatDate3(preview.lineItems[0].period.end),
1779
1781
  " for",
1780
1782
  " ",
1781
- _chunkKOTKKBJTjs.formatCurrency.call(void 0, preview.amountDue, preview.currency)
1783
+ _chunkNFCXUAE6js.formatCurrency.call(void 0, preview.amountDue, preview.currency)
1782
1784
  ] })
1783
1785
  ] })
1784
1786
  ] });
@@ -1800,16 +1802,16 @@ function SubscriptionConfirmation({ price, isLoading, onConfirm, onCancel }) {
1800
1802
  productDescription && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-sm text-muted-foreground", children: productDescription })
1801
1803
  ] }),
1802
1804
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-lg font-semibold", children: [
1803
- _chunkKOTKKBJTjs.formatCurrency.call(void 0, price.unitAmount, price.currency),
1804
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm font-normal text-muted-foreground", children: _chunkKOTKKBJTjs.formatInterval.call(void 0, price) })
1805
+ _chunkNFCXUAE6js.formatCurrency.call(void 0, price.unitAmount, price.currency),
1806
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm font-normal text-muted-foreground", children: _chunkNFCXUAE6js.formatInterval.call(void 0, price) })
1805
1807
  ] }),
1806
1808
  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: [
1807
1809
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Check, { className: "h-4 w-4 text-primary" }),
1808
1810
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: feature })
1809
1811
  ] }, index)) }),
1810
1812
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-end gap-3 pt-2 border-t border-accent/30", children: [
1811
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.Button, { variant: "outline", onClick: onCancel, disabled: isLoading, children: "Cancel" }),
1812
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.Button, { onClick: onConfirm, disabled: isLoading, children: isLoading ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
1813
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Button, { variant: "outline", onClick: onCancel, disabled: isLoading, children: "Cancel" }),
1814
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Button, { onClick: onConfirm, disabled: isLoading, children: isLoading ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
1813
1815
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Loader2, { className: "h-4 w-4 animate-spin me-2" }),
1814
1816
  "Processing..."
1815
1817
  ] }) : "Subscribe" })
@@ -1880,7 +1882,7 @@ function useSubscriptionWizard({ subscription, onSuccess, onClose }) {
1880
1882
  onCloseRef.current = onClose;
1881
1883
  const checkPaymentMethod = _react.useCallback.call(void 0, async () => {
1882
1884
  try {
1883
- const methods = await _chunkCAKOFJZDjs.StripeCustomerService.listPaymentMethods();
1885
+ const methods = await _chunk6OFANJTEjs.StripeCustomerService.listPaymentMethods();
1884
1886
  dispatch({ type: "SET_HAS_PAYMENT_METHOD", hasMethod: methods.length > 0 });
1885
1887
  } catch (error) {
1886
1888
  console.error("[useSubscriptionWizard] Failed to check payment methods:", error);
@@ -1904,7 +1906,7 @@ function useSubscriptionWizard({ subscription, onSuccess, onClose }) {
1904
1906
  const isTrialUpgrade = _optionalChain([subscription, 'optionalAccess', _55 => _55.status]) === "trialing" /* TRIALING */;
1905
1907
  dispatch({ type: "SET_IS_TRIAL_SUBSCRIPTION", isTrial: isTrialUpgrade });
1906
1908
  if (isTrialUpgrade && !state.hasPaymentMethod) {
1907
- const methods = await _chunkCAKOFJZDjs.StripeCustomerService.listPaymentMethods();
1909
+ const methods = await _chunk6OFANJTEjs.StripeCustomerService.listPaymentMethods();
1908
1910
  if (methods.length === 0) {
1909
1911
  dispatch({ type: "SET_STEP", step: "payment-method" });
1910
1912
  dispatch({
@@ -1915,7 +1917,7 @@ function useSubscriptionWizard({ subscription, onSuccess, onClose }) {
1915
1917
  }
1916
1918
  }
1917
1919
  if (subscription && state.selectedPrice.id !== _optionalChain([subscription, 'access', _56 => _56.price, 'optionalAccess', _57 => _57.id])) {
1918
- const preview = await _chunkCAKOFJZDjs.StripeSubscriptionService.getProrationPreview({
1920
+ const preview = await _chunk6OFANJTEjs.StripeSubscriptionService.getProrationPreview({
1919
1921
  subscriptionId: subscription.id,
1920
1922
  newPriceId: state.selectedPrice.id
1921
1923
  });
@@ -1940,14 +1942,14 @@ function useSubscriptionWizard({ subscription, onSuccess, onClose }) {
1940
1942
  newPriceId: state.selectedPrice.id,
1941
1943
  promotionCode: _optionalChain([state, 'access', _59 => _59.promotionCode, 'optionalAccess', _60 => _60.promotionCodeId])
1942
1944
  };
1943
- await _chunkCAKOFJZDjs.StripeSubscriptionService.changePlan(changePlanParams);
1945
+ await _chunk6OFANJTEjs.StripeSubscriptionService.changePlan(changePlanParams);
1944
1946
  } else {
1945
1947
  const createParams = {
1946
1948
  id: _uuid.v4.call(void 0, ),
1947
1949
  priceId: state.selectedPrice.id,
1948
1950
  promotionCode: _optionalChain([state, 'access', _61 => _61.promotionCode, 'optionalAccess', _62 => _62.promotionCodeId])
1949
1951
  };
1950
- await _chunkCAKOFJZDjs.StripeSubscriptionService.createSubscription(createParams);
1952
+ await _chunk6OFANJTEjs.StripeSubscriptionService.createSubscription(createParams);
1951
1953
  }
1952
1954
  onSuccessRef.current();
1953
1955
  onCloseRef.current();
@@ -1981,7 +1983,7 @@ function useSubscriptionWizard({ subscription, onSuccess, onClose }) {
1981
1983
  dispatch({ type: "SET_VALIDATING_PROMO_CODE", isValidating: true });
1982
1984
  dispatch({ type: "SET_PROMO_CODE_ERROR", error: null });
1983
1985
  try {
1984
- const result = await _chunkCAKOFJZDjs.StripePromotionCodeService.validatePromotionCode({
1986
+ const result = await _chunk6OFANJTEjs.StripePromotionCodeService.validatePromotionCode({
1985
1987
  code,
1986
1988
  stripePriceId: _optionalChain([state, 'access', _70 => _70.selectedPrice, 'optionalAccess', _71 => _71.id])
1987
1989
  });
@@ -2088,7 +2090,7 @@ function WizardStepPlanSelection({
2088
2090
  _react.useEffect.call(void 0, () => {
2089
2091
  const loadProducts = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
2090
2092
  try {
2091
- const fetchedProducts = await _chunkCAKOFJZDjs.StripeProductService.listProducts({ active: true });
2093
+ const fetchedProducts = await _chunk6OFANJTEjs.StripeProductService.listProducts({ active: true });
2092
2094
  setProducts(fetchedProducts);
2093
2095
  } catch (error) {
2094
2096
  console.error("[WizardStepPlanSelection] Failed to load products:", error);
@@ -2139,7 +2141,7 @@ function WizardStepPlanSelection({
2139
2141
  onSelectPrice: handleSelectPrice
2140
2142
  }
2141
2143
  ),
2142
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex justify-end pt-4 border-t", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.Button, { onClick: onNext, disabled: !selectedPrice || isProcessing, children: isProcessing ? "Loading..." : "Next: Review" }) })
2144
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex justify-end pt-4 border-t", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Button, { onClick: onNext, disabled: !selectedPrice || isProcessing, children: isProcessing ? "Loading..." : "Next: Review" }) })
2143
2145
  ] });
2144
2146
  }
2145
2147
  _chunk7QVYU63Ejs.__name.call(void 0, WizardStepPlanSelection, "WizardStepPlanSelection");
@@ -2200,7 +2202,7 @@ function PromoCodeInput({
2200
2202
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-success text-sm", children: formatDiscount(appliedCode) })
2201
2203
  ] }),
2202
2204
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2203
- _chunkKOTKKBJTjs.Button,
2205
+ _chunkNFCXUAE6js.Button,
2204
2206
  {
2205
2207
  variant: "ghost",
2206
2208
  size: "sm",
@@ -2217,7 +2219,7 @@ function PromoCodeInput({
2217
2219
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
2218
2220
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex gap-2", children: [
2219
2221
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2220
- _chunkKOTKKBJTjs.Input,
2222
+ _chunkNFCXUAE6js.Input,
2221
2223
  {
2222
2224
  placeholder: "Enter promo code",
2223
2225
  value: code,
@@ -2227,7 +2229,7 @@ function PromoCodeInput({
2227
2229
  className: "flex-1"
2228
2230
  }
2229
2231
  ),
2230
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.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" }) : "Apply" })
2232
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.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" }) : "Apply" })
2231
2233
  ] }),
2232
2234
  error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error })
2233
2235
  ] });
@@ -2292,14 +2294,14 @@ function WizardStepReview({
2292
2294
  return `${promotionCode.discountValue}% off`;
2293
2295
  }
2294
2296
  if (promotionCode.discountType === "amount_off" && promotionCode.discountValue) {
2295
- return `${_chunkKOTKKBJTjs.formatCurrency.call(void 0, promotionCode.discountValue, promotionCode.currency || selectedPrice.currency)} off`;
2297
+ return `${_chunkNFCXUAE6js.formatCurrency.call(void 0, promotionCode.discountValue, promotionCode.currency || selectedPrice.currency)} off`;
2296
2298
  }
2297
2299
  return null;
2298
2300
  }, "getDiscountDescription");
2299
2301
  const discountDescription = getDiscountDescription();
2300
2302
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-6", children: [
2301
2303
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "bg-muted/50 rounded-lg p-4 space-y-3", children: [
2302
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.SectionHeader, { children: "Selected Plan" }),
2304
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.SectionHeader, { children: "Selected Plan" }),
2303
2305
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-between items-center", children: [
2304
2306
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { children: [
2305
2307
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "font-medium", children: _optionalChain([selectedPrice, 'access', _92 => _92.product, 'optionalAccess', _93 => _93.name]) }),
@@ -2307,10 +2309,10 @@ function WizardStepReview({
2307
2309
  ] }),
2308
2310
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-end", children: [
2309
2311
  discountedPrice !== null ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
2310
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-muted-foreground line-through", children: _chunkKOTKKBJTjs.formatCurrency.call(void 0, selectedPrice.unitAmount || 0, selectedPrice.currency) }),
2311
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-success text-lg font-semibold", children: _chunkKOTKKBJTjs.formatCurrency.call(void 0, discountedPrice, selectedPrice.currency) }),
2312
- discountDescription && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.Badge, { variant: "softGreen", children: discountDescription })
2313
- ] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "font-semibold text-lg", children: _chunkKOTKKBJTjs.formatCurrency.call(void 0, selectedPrice.unitAmount || 0, selectedPrice.currency) }),
2312
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-muted-foreground line-through", children: _chunkNFCXUAE6js.formatCurrency.call(void 0, selectedPrice.unitAmount || 0, selectedPrice.currency) }),
2313
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-success text-lg font-semibold", children: _chunkNFCXUAE6js.formatCurrency.call(void 0, discountedPrice, selectedPrice.currency) }),
2314
+ discountDescription && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Badge, { variant: "softGreen", children: discountDescription })
2315
+ ] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "font-semibold text-lg", children: _chunkNFCXUAE6js.formatCurrency.call(void 0, selectedPrice.unitAmount || 0, selectedPrice.currency) }),
2314
2316
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-muted-foreground", children: formatInterval2(selectedPrice) })
2315
2317
  ] })
2316
2318
  ] })
@@ -2325,9 +2327,9 @@ function WizardStepReview({
2325
2327
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-between text-sm", children: [
2326
2328
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: `${isTrialUpgrade ? "text-warning" : "text-muted-foreground"}`, children: isTrialUpgrade ? "Amount to charge now:" : "Amount due now:" }),
2327
2329
  /* @__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: [
2328
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "line-through text-muted-foreground me-2", children: _chunkKOTKKBJTjs.formatCurrency.call(void 0, prorationPreview.immediateCharge, prorationPreview.currency) }),
2329
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-success", children: _chunkKOTKKBJTjs.formatCurrency.call(void 0, discountedImmediateCharge, prorationPreview.currency) })
2330
- ] }) : _chunkKOTKKBJTjs.formatCurrency.call(void 0, prorationPreview.immediateCharge, prorationPreview.currency) })
2330
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "line-through text-muted-foreground me-2", children: _chunkNFCXUAE6js.formatCurrency.call(void 0, prorationPreview.immediateCharge, prorationPreview.currency) }),
2331
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-success", children: _chunkNFCXUAE6js.formatCurrency.call(void 0, discountedImmediateCharge, prorationPreview.currency) })
2332
+ ] }) : _chunkNFCXUAE6js.formatCurrency.call(void 0, prorationPreview.immediateCharge, prorationPreview.currency) })
2331
2333
  ] })
2332
2334
  ]
2333
2335
  }
@@ -2351,15 +2353,15 @@ function WizardStepReview({
2351
2353
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h4", { className: "font-medium", children: "Payment Method" }),
2352
2354
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-muted-foreground", children: hasPaymentMethod ? "A payment method is on file" : "No payment method on file" })
2353
2355
  ] }),
2354
- !hasPaymentMethod && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.Button, { variant: "outline", onClick: onAddPaymentMethod, children: "Add Payment Method" })
2356
+ !hasPaymentMethod && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Button, { variant: "outline", onClick: onAddPaymentMethod, children: "Add Payment Method" })
2355
2357
  ] }) }),
2356
- error && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.Alert, { variant: "destructive", children: [
2358
+ error && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.Alert, { variant: "destructive", children: [
2357
2359
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.AlertCircle, { className: "h-4 w-4" }),
2358
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.AlertDescription, { children: error })
2360
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.AlertDescription, { children: error })
2359
2361
  ] }),
2360
2362
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-between pt-4 border-t", children: [
2361
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.Button, { variant: "outline", onClick: onBack, disabled: isProcessing, children: "Back" }),
2362
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.Button, { onClick: hasPaymentMethod ? onConfirm : onAddPaymentMethod, disabled: isProcessing, children: isProcessing ? "Processing..." : hasPaymentMethod ? isChangingPlan ? "Confirm Plan Change" : "Subscribe Now" : "Add Payment Method" })
2363
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Button, { variant: "outline", onClick: onBack, disabled: isProcessing, children: "Back" }),
2364
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Button, { onClick: hasPaymentMethod ? onConfirm : onAddPaymentMethod, disabled: isProcessing, children: isProcessing ? "Processing..." : hasPaymentMethod ? isChangingPlan ? "Confirm Plan Change" : "Subscribe Now" : "Add Payment Method" })
2363
2365
  ] })
2364
2366
  ] });
2365
2367
  }
@@ -2370,7 +2372,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, WizardStepReview, "WizardStepReview");
2370
2372
  function WizardStepPaymentMethod({ onBack, onSuccess, isProcessing }) {
2371
2373
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-6", children: [
2372
2374
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-center", children: [
2373
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.SectionHeader, { children: "Add Payment Method" }),
2375
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.SectionHeader, { children: "Add Payment Method" }),
2374
2376
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-muted-foreground", children: "Enter your card details to complete your subscription" })
2375
2377
  ] }),
2376
2378
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PaymentMethodForm, { onSuccess, onCancel: onBack, isLoading: isProcessing })
@@ -2412,10 +2414,10 @@ function SubscriptionWizard({
2412
2414
  const isChangePlanMode = !!subscription;
2413
2415
  const dialogTitle = subscription ? "Change Subscription Plan" : isPurchasingAddons ? "Purchase Add-ons" : "Subscribe to a Plan";
2414
2416
  const dialogDescription = subscription ? "Select a new plan for your subscription" : isPurchasingAddons ? "Select one-time products to purchase" : "Choose a subscription plan to get started";
2415
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.DialogContent, { className: "max-w-2xl", children: [
2416
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.DialogHeader, { children: [
2417
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.DialogTitle, { children: dialogTitle }),
2418
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.DialogDescription, { children: dialogDescription })
2417
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.DialogContent, { className: "max-w-2xl", children: [
2418
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.DialogHeader, { children: [
2419
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.DialogTitle, { children: dialogTitle }),
2420
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.DialogDescription, { children: dialogDescription })
2419
2421
  ] }),
2420
2422
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, WizardProgressIndicator, { currentStep: state.step }),
2421
2423
  state.step === "plan-selection" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -2498,15 +2500,15 @@ function UsageSummaryCard({ meter, summary }) {
2498
2500
  const progressWidth = percentage !== null ? Math.min(percentage, 100) : 0;
2499
2501
  const displayName = meter.displayName || meter.eventName;
2500
2502
  const hasLimit = limit !== null && limit !== void 0;
2501
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.Card, { children: [
2502
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.CardHeader, { className: "flex flex-row items-center gap-x-3 pb-3", children: [
2503
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.Card, { children: [
2504
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.CardHeader, { className: "flex flex-row items-center gap-x-3 pb-3", children: [
2503
2505
  /* @__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" }) }),
2504
2506
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col", children: [
2505
2507
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "text-sm font-medium", children: displayName }),
2506
2508
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground text-xs", children: meter.id })
2507
2509
  ] })
2508
2510
  ] }),
2509
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.CardContent, { className: "flex flex-col gap-y-4", children: [
2511
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.CardContent, { className: "flex flex-col gap-y-4", children: [
2510
2512
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { children: [
2511
2513
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-3xl font-bold", children: currentUsage.toLocaleString() }),
2512
2514
  hasLimit && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "p", { className: "text-muted-foreground text-sm", children: [
@@ -2553,14 +2555,14 @@ function UsageContainer() {
2553
2555
  const loadUsageData = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
2554
2556
  setLoading(true);
2555
2557
  try {
2556
- const fetchedSubscriptions = await _chunkCAKOFJZDjs.StripeSubscriptionService.listSubscriptions();
2558
+ const fetchedSubscriptions = await _chunk6OFANJTEjs.StripeSubscriptionService.listSubscriptions();
2557
2559
  setSubscriptions(fetchedSubscriptions);
2558
2560
  const hasMeteredSubscriptions2 = fetchedSubscriptions.some((sub) => _optionalChain([sub, 'access', _99 => _99.price, 'optionalAccess', _100 => _100.recurring, 'optionalAccess', _101 => _101.usageType]) === "metered");
2559
2561
  if (!hasMeteredSubscriptions2) {
2560
2562
  setLoading(false);
2561
2563
  return;
2562
2564
  }
2563
- const fetchedMeters = await _chunkCAKOFJZDjs.StripeUsageService.listMeters();
2565
+ const fetchedMeters = await _chunk6OFANJTEjs.StripeUsageService.listMeters();
2564
2566
  setMeters(fetchedMeters);
2565
2567
  const summariesMap = {};
2566
2568
  const now = /* @__PURE__ */ new Date();
@@ -2568,7 +2570,7 @@ function UsageContainer() {
2568
2570
  const endOfMonth = new Date(now.getFullYear(), now.getMonth() + 1, 0, 23, 59, 59, 999);
2569
2571
  for (const meter of fetchedMeters) {
2570
2572
  try {
2571
- const meterSummaries = await _chunkCAKOFJZDjs.StripeUsageService.getMeterSummaries({
2573
+ const meterSummaries = await _chunk6OFANJTEjs.StripeUsageService.getMeterSummaries({
2572
2574
  meterId: meter.id,
2573
2575
  startTime: startOfMonth,
2574
2576
  endTime: endOfMonth
@@ -2633,22 +2635,22 @@ function UsageHistoryTable({ usageRecords }) {
2633
2635
  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: "No usage history available." }) });
2634
2636
  }
2635
2637
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-y-4", children: [
2636
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.SectionHeader, { level: 2, children: "Usage History" }),
2637
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "overflow-clip rounded-lg border", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.Table, { children: [
2638
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.TableHeader, { className: "bg-muted", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.TableRow, { children: [
2639
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.TableHead, { children: "Date & Time" }),
2640
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.TableHead, { children: "Meter Event" }),
2641
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.TableHead, { className: "text-end", children: "Quantity" }),
2642
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.TableHead, { children: "Event ID" })
2638
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.SectionHeader, { level: 2, children: "Usage History" }),
2639
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "overflow-clip rounded-lg border", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.Table, { children: [
2640
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TableHeader, { className: "bg-muted", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.TableRow, { children: [
2641
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TableHead, { children: "Date & Time" }),
2642
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TableHead, { children: "Meter Event" }),
2643
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TableHead, { className: "text-end", children: "Quantity" }),
2644
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TableHead, { children: "Event ID" })
2643
2645
  ] }) }),
2644
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.TableBody, { children: usageRecords.map((record) => {
2646
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TableBody, { children: usageRecords.map((record) => {
2645
2647
  const dateTime = formatDateTime(record.timestamp);
2646
2648
  const quantity = record.quantity.toLocaleString();
2647
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.TableRow, { children: [
2648
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.TableCell, { className: "font-medium", children: dateTime }),
2649
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.TableCell, { className: "text-muted-foreground", children: record.meterEventName }),
2650
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.TableCell, { className: "text-end font-medium", children: quantity }),
2651
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.TableCell, { className: "text-muted-foreground text-sm tabular-nums", children: record.stripeEventId })
2649
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.TableRow, { children: [
2650
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TableCell, { className: "font-medium", children: dateTime }),
2651
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TableCell, { className: "text-muted-foreground", children: record.meterEventName }),
2652
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TableCell, { className: "text-end font-medium", children: quantity }),
2653
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TableCell, { className: "text-muted-foreground text-sm tabular-nums", children: record.stripeEventId })
2652
2654
  ] }, record.id);
2653
2655
  }) })
2654
2656
  ] }) })
@@ -2659,8 +2661,8 @@ _chunk7QVYU63Ejs.__name.call(void 0, UsageHistoryTable, "UsageHistoryTable");
2659
2661
  // src/features/billing/components/modals/BillingDetailModal.tsx
2660
2662
 
2661
2663
  function BillingDetailModal({ open, onOpenChange, title, children, className }) {
2662
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.DialogContent, { className: _nullishCoalesce(className, () => ( "max-w-4xl max-h-[90vh] overflow-y-auto")), children: [
2663
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.DialogHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.DialogTitle, { children: title }) }),
2664
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.DialogContent, { className: _nullishCoalesce(className, () => ( "max-w-4xl max-h-[90vh] overflow-y-auto")), children: [
2665
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.DialogHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.DialogTitle, { children: title }) }),
2664
2666
  children
2665
2667
  ] }) });
2666
2668
  }
@@ -2677,7 +2679,7 @@ function BillingAlertBanner({ subscription, onUpdatePayment, onAddPayment }) {
2677
2679
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "text-destructive text-sm font-medium", children: "Payment Failed" }),
2678
2680
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive mt-1 text-sm", children: "Your last payment failed. Please update your payment method to avoid service interruption." })
2679
2681
  ] }),
2680
- onUpdatePayment && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.Button, { variant: "outline", size: "sm", onClick: onUpdatePayment, className: "text-destructive border-red-300", children: "Update Payment Method" })
2682
+ onUpdatePayment && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Button, { variant: "outline", size: "sm", onClick: onUpdatePayment, className: "text-destructive border-red-300", children: "Update Payment Method" })
2681
2683
  ] });
2682
2684
  }
2683
2685
  if (subscription.status === "trialing" /* TRIALING */ && subscription.trialEnd) {
@@ -2697,7 +2699,7 @@ function BillingAlertBanner({ subscription, onUpdatePayment, onAddPayment }) {
2697
2699
  ". Add a payment method to continue your subscription."
2698
2700
  ] })
2699
2701
  ] }),
2700
- onAddPayment && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.Button, { variant: "outline", size: "sm", onClick: onAddPayment, className: "text-warning border-yellow-300", children: "Add Payment Method" })
2702
+ onAddPayment && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Button, { variant: "outline", size: "sm", onClick: onAddPayment, className: "text-warning border-yellow-300", children: "Add Payment Method" })
2701
2703
  ] });
2702
2704
  }
2703
2705
  }
@@ -2748,7 +2750,7 @@ function BillingDashboardContainer() {
2748
2750
  setNoCustomerExists(false);
2749
2751
  let customer = null;
2750
2752
  try {
2751
- customer = await _chunkCAKOFJZDjs.StripeCustomerService.getCustomer();
2753
+ customer = await _chunk6OFANJTEjs.StripeCustomerService.getCustomer();
2752
2754
  setData((prev) => ({ ...prev, customer }));
2753
2755
  setErrors((prev) => ({ ...prev, customer: null }));
2754
2756
  setNoCustomerExists(false);
@@ -2774,7 +2776,7 @@ function BillingDashboardContainer() {
2774
2776
  }
2775
2777
  const fetchSubscriptions = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
2776
2778
  try {
2777
- const subscriptions2 = await _chunkCAKOFJZDjs.StripeSubscriptionService.listSubscriptions();
2779
+ const subscriptions2 = await _chunk6OFANJTEjs.StripeSubscriptionService.listSubscriptions();
2778
2780
  setData((prev) => ({ ...prev, subscriptions: subscriptions2 }));
2779
2781
  setErrors((prev) => ({ ...prev, subscriptions: null }));
2780
2782
  return subscriptions2;
@@ -2788,7 +2790,7 @@ function BillingDashboardContainer() {
2788
2790
  }, "fetchSubscriptions");
2789
2791
  const fetchPaymentMethods = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
2790
2792
  try {
2791
- const paymentMethods = await _chunkCAKOFJZDjs.StripeCustomerService.listPaymentMethods();
2793
+ const paymentMethods = await _chunk6OFANJTEjs.StripeCustomerService.listPaymentMethods();
2792
2794
  setData((prev) => ({ ...prev, paymentMethods }));
2793
2795
  setErrors((prev) => ({ ...prev, paymentMethods: null }));
2794
2796
  } catch (error) {
@@ -2800,7 +2802,7 @@ function BillingDashboardContainer() {
2800
2802
  }, "fetchPaymentMethods");
2801
2803
  const fetchInvoices = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
2802
2804
  try {
2803
- const invoices = await _chunkCAKOFJZDjs.StripeInvoiceService.listInvoices();
2805
+ const invoices = await _chunk6OFANJTEjs.StripeInvoiceService.listInvoices();
2804
2806
  setData((prev) => ({ ...prev, invoices }));
2805
2807
  setErrors((prev) => ({ ...prev, invoices: null }));
2806
2808
  } catch (error) {
@@ -2823,7 +2825,7 @@ function BillingDashboardContainer() {
2823
2825
  const handleCreateCustomer = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
2824
2826
  setCreatingCustomer(true);
2825
2827
  try {
2826
- await _chunkCAKOFJZDjs.StripeCustomerService.createCustomer();
2828
+ await _chunk6OFANJTEjs.StripeCustomerService.createCustomer();
2827
2829
  setNoCustomerExists(false);
2828
2830
  await fetchAllData();
2829
2831
  } catch (error) {
@@ -2835,7 +2837,7 @@ function BillingDashboardContainer() {
2835
2837
  }, "handleCreateCustomer");
2836
2838
  const fetchUsageData = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
2837
2839
  try {
2838
- const meters = await _chunkCAKOFJZDjs.StripeUsageService.listMeters();
2840
+ const meters = await _chunk6OFANJTEjs.StripeUsageService.listMeters();
2839
2841
  setData((prev) => ({ ...prev, meters }));
2840
2842
  const summariesMap = {};
2841
2843
  const now = /* @__PURE__ */ new Date();
@@ -2843,7 +2845,7 @@ function BillingDashboardContainer() {
2843
2845
  const endOfMonth = new Date(now.getFullYear(), now.getMonth() + 1, 0, 23, 59, 59, 999);
2844
2846
  for (const meter of meters) {
2845
2847
  try {
2846
- const meterSummaries = await _chunkCAKOFJZDjs.StripeUsageService.getMeterSummaries({
2848
+ const meterSummaries = await _chunk6OFANJTEjs.StripeUsageService.getMeterSummaries({
2847
2849
  meterId: meter.id,
2848
2850
  startTime: startOfMonth,
2849
2851
  endTime: endOfMonth
@@ -2921,18 +2923,18 @@ function BillingDashboardContainer() {
2921
2923
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Wallet, { className: "h-8 w-8" }),
2922
2924
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h1", { className: "text-primary text-3xl font-semibold", children: "Billing" })
2923
2925
  ] }),
2924
- isInitialLoading && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.Card, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.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" }) }) }),
2925
- noCustomerExists && !isInitialLoading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.Card, { children: [
2926
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.CardHeader, { className: "text-center", children: [
2926
+ isInitialLoading && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Card, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.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" }) }) }),
2927
+ noCustomerExists && !isInitialLoading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.Card, { children: [
2928
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.CardHeader, { className: "text-center", children: [
2927
2929
  /* @__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" }) }),
2928
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.CardTitle, { children: "Set Up Billing" }),
2929
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.CardDescription, { children: "Your company doesn't have a billing account yet. Set one up to manage subscriptions, payment methods, and view invoices." })
2930
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.CardTitle, { children: "Set Up Billing" }),
2931
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.CardDescription, { children: "Your company doesn't have a billing account yet. Set one up to manage subscriptions, payment methods, and view invoices." })
2930
2932
  ] }),
2931
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.CardContent, { className: "flex justify-center pb-8", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.Button, { onClick: handleCreateCustomer, disabled: creatingCustomer, size: "lg", children: creatingCustomer ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
2933
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.CardContent, { className: "flex justify-center pb-8", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Button, { onClick: handleCreateCustomer, disabled: creatingCustomer, size: "lg", children: creatingCustomer ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
2932
2934
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Loader2, { className: "me-2 h-4 w-4 animate-spin" }),
2933
2935
  "Setting up..."
2934
2936
  ] }) : "Set Up Billing Account" }) }),
2935
- errors.customer && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.CardContent, { className: "pt-0", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-center text-destructive text-xs/relaxed", children: errors.customer }) })
2937
+ errors.customer && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.CardContent, { className: "pt-0", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-center text-destructive text-xs/relaxed", children: errors.customer }) })
2936
2938
  ] }),
2937
2939
  !noCustomerExists && !isInitialLoading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
2938
2940
  criticalSubscriptions.map((subscription) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -3074,7 +3076,7 @@ function getStripePromise(publishableKey) {
3074
3076
  }
3075
3077
  _chunk7QVYU63Ejs.__name.call(void 0, getStripePromise, "getStripePromise");
3076
3078
  function StripeProvider({ children }) {
3077
- const publishableKey = _chunk4Z45NYPRjs.getStripePublishableKey.call(void 0, );
3079
+ const publishableKey = _chunk5W5MN7JPjs.getStripePublishableKey.call(void 0, );
3078
3080
  const stripePromise = _react.useMemo.call(void 0, () => getStripePromise(publishableKey), [publishableKey]);
3079
3081
  const options = _react.useMemo.call(void 0, () => ({}), []);
3080
3082
  if (!publishableKey) {
@@ -3084,7 +3086,7 @@ function StripeProvider({ children }) {
3084
3086
  }
3085
3087
  _chunk7QVYU63Ejs.__name.call(void 0, StripeProvider, "StripeProvider");
3086
3088
  function isStripeConfigured() {
3087
- return !!_chunk4Z45NYPRjs.getStripePublishableKey.call(void 0, );
3089
+ return !!_chunk5W5MN7JPjs.getStripePublishableKey.call(void 0, );
3088
3090
  }
3089
3091
  _chunk7QVYU63Ejs.__name.call(void 0, isStripeConfigured, "isStripeConfigured");
3090
3092
 
@@ -3104,12 +3106,12 @@ function PriceArchiver({ price }) {
3104
3106
  const isArchived = !price.active;
3105
3107
  const scope = isArchived ? "restore" : "archive";
3106
3108
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
3107
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.Button, { variant: "outline", size: "sm", onClick: () => setOpen(true), children: [
3109
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.Button, { variant: "outline", size: "sm", onClick: () => setOpen(true), children: [
3108
3110
  isArchived ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.RotateCcwIcon, {}) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ArchiveIcon, {}),
3109
3111
  t(`billing.admin.prices.${scope}.confirm`)
3110
3112
  ] }),
3111
3113
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3112
- _chunkKOTKKBJTjs.ConfirmDialog,
3114
+ _chunkNFCXUAE6js.ConfirmDialog,
3113
3115
  {
3114
3116
  open,
3115
3117
  onOpenChange: setOpen,
@@ -3123,7 +3125,7 @@ function PriceArchiver({ price }) {
3123
3125
  if (isArchived) await restorePrice(price.id);
3124
3126
  else await archivePrice(price.id);
3125
3127
  } catch (error) {
3126
- _chunkKOTKKBJTjs.errorToast.call(void 0, { title: t(`billing.admin.prices.${scope}.title`), error });
3128
+ _chunkNFCXUAE6js.errorToast.call(void 0, { title: t(`billing.admin.prices.${scope}.title`), error });
3127
3129
  throw error;
3128
3130
  }
3129
3131
  }
@@ -3155,14 +3157,14 @@ function PriceEditorInternal({
3155
3157
  onDialogOpenChange
3156
3158
  }) {
3157
3159
  const t = _nextintl.useTranslations.call(void 0, );
3158
- const router = _chunk4Z45NYPRjs.useI18nRouter.call(void 0, );
3160
+ const router = _chunk6OFANJTEjs.useI18nRouter.call(void 0, );
3159
3161
  const { createPrice, updatePrice, productId: contextProductId } = usePriceContext();
3160
3162
  const [allFeatures, setAllFeatures] = _react.useState.call(void 0, []);
3161
3163
  const isEdit = !!price;
3162
3164
  const targetProductId = _nullishCoalesce(_nullishCoalesce(productId, () => ( _optionalChain([price, 'optionalAccess', _117 => _117.product, 'optionalAccess', _118 => _118.id]))), () => ( contextProductId));
3163
3165
  _react.useEffect.call(void 0, () => {
3164
3166
  const fetchFeatures = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
3165
- setAllFeatures(await _chunkCAKOFJZDjs.FeatureService.findMany({}));
3167
+ setAllFeatures(await _chunk6OFANJTEjs.FeatureService.findMany({}));
3166
3168
  }, "fetchFeatures");
3167
3169
  void fetchFeatures();
3168
3170
  }, []);
@@ -3275,7 +3277,7 @@ function PriceEditorInternal({
3275
3277
  warnedUnknownFor.current = fingerprint;
3276
3278
  const { unknown } = resolvePlatformFeatures(seed.platformFeatures);
3277
3279
  if (unknown.length > 0)
3278
- _chunkCAKOFJZDjs.showToast.call(void 0, t("billing.admin.prices.import.warnings.unknownFeatures", { features: unknown.join(", ") }));
3280
+ _chunk6OFANJTEjs.showToast.call(void 0, t("billing.admin.prices.import.warnings.unknownFeatures", { features: unknown.join(", ") }));
3279
3281
  }, [seed, isEdit, allFeatures, resolvePlatformFeatures, t]);
3280
3282
  const watchInterval = form.watch("interval");
3281
3283
  const isRecurring = watchInterval !== "one_time";
@@ -3296,13 +3298,13 @@ function PriceEditorInternal({
3296
3298
  { id: "metered", text: t("billing.admin.prices.usage.metered") }
3297
3299
  ];
3298
3300
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3299
- _chunkKOTKKBJTjs.EditorSheet,
3301
+ _chunkNFCXUAE6js.EditorSheet,
3300
3302
  {
3301
3303
  form,
3302
3304
  entityType: t("billing.admin.prices.entity"),
3303
3305
  entityName: price ? priceLabel(price) : void 0,
3304
3306
  isEdit,
3305
- module: _chunkCAKOFJZDjs.Modules.StripePrice,
3307
+ module: _chunk6OFANJTEjs.Modules.StripePrice,
3306
3308
  size: "lg",
3307
3309
  propagateChanges,
3308
3310
  onSuccess,
@@ -3351,13 +3353,13 @@ function PriceEditorInternal({
3351
3353
  dialogOpen,
3352
3354
  onDialogOpenChange,
3353
3355
  children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-y-4", children: [
3354
- isEdit && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.Alert, { children: [
3355
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.AlertTitle, { children: t("billing.admin.prices.immutability.title") }),
3356
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.AlertDescription, { children: t("billing.admin.prices.immutability.description") })
3356
+ isEdit && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.Alert, { children: [
3357
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.AlertTitle, { children: t("billing.admin.prices.immutability.title") }),
3358
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.AlertDescription, { children: t("billing.admin.prices.immutability.description") })
3357
3359
  ] }),
3358
3360
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid grid-cols-2 gap-x-4", children: [
3359
3361
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3360
- _chunkKOTKKBJTjs.FormInput,
3362
+ _chunkNFCXUAE6js.FormInput,
3361
3363
  {
3362
3364
  form,
3363
3365
  id: "unitAmount",
@@ -3369,7 +3371,7 @@ function PriceEditorInternal({
3369
3371
  }
3370
3372
  ),
3371
3373
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3372
- _chunkKOTKKBJTjs.FormSelect,
3374
+ _chunkNFCXUAE6js.FormSelect,
3373
3375
  {
3374
3376
  form,
3375
3377
  id: "currency",
@@ -3380,7 +3382,7 @@ function PriceEditorInternal({
3380
3382
  )
3381
3383
  ] }),
3382
3384
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3383
- _chunkKOTKKBJTjs.FormSelect,
3385
+ _chunkNFCXUAE6js.FormSelect,
3384
3386
  {
3385
3387
  form,
3386
3388
  id: "interval",
@@ -3391,7 +3393,7 @@ function PriceEditorInternal({
3391
3393
  ),
3392
3394
  isRecurring && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid grid-cols-2 gap-x-4", children: [
3393
3395
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3394
- _chunkKOTKKBJTjs.FormInput,
3396
+ _chunkNFCXUAE6js.FormInput,
3395
3397
  {
3396
3398
  form,
3397
3399
  id: "intervalCount",
@@ -3402,7 +3404,7 @@ function PriceEditorInternal({
3402
3404
  }
3403
3405
  ),
3404
3406
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3405
- _chunkKOTKKBJTjs.FormSelect,
3407
+ _chunkNFCXUAE6js.FormSelect,
3406
3408
  {
3407
3409
  form,
3408
3410
  id: "usageType",
@@ -3413,7 +3415,7 @@ function PriceEditorInternal({
3413
3415
  )
3414
3416
  ] }),
3415
3417
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3416
- _chunkKOTKKBJTjs.FormInput,
3418
+ _chunkNFCXUAE6js.FormInput,
3417
3419
  {
3418
3420
  form,
3419
3421
  id: "nickname",
@@ -3422,7 +3424,7 @@ function PriceEditorInternal({
3422
3424
  }
3423
3425
  ),
3424
3426
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3425
- _chunkKOTKKBJTjs.FormTextarea,
3427
+ _chunkNFCXUAE6js.FormTextarea,
3426
3428
  {
3427
3429
  form,
3428
3430
  id: "description",
@@ -3432,7 +3434,7 @@ function PriceEditorInternal({
3432
3434
  }
3433
3435
  ),
3434
3436
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3435
- _chunkKOTKKBJTjs.FormInput,
3437
+ _chunkNFCXUAE6js.FormInput,
3436
3438
  {
3437
3439
  form,
3438
3440
  id: "token",
@@ -3442,10 +3444,10 @@ function PriceEditorInternal({
3442
3444
  }
3443
3445
  ),
3444
3446
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-y-2", children: [
3445
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.FieldLabel, { children: t("billing.admin.prices.fields.features") }),
3447
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.FieldLabel, { children: t("billing.admin.prices.fields.features") }),
3446
3448
  form.watch("features").map((_, index) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex gap-2", children: [
3447
3449
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3448
- _chunkKOTKKBJTjs.Input,
3450
+ _chunkNFCXUAE6js.Input,
3449
3451
  {
3450
3452
  ...form.register(`features.${index}`),
3451
3453
  placeholder: t("billing.admin.prices.placeholders.feature", { index: index + 1 }),
@@ -3453,7 +3455,7 @@ function PriceEditorInternal({
3453
3455
  }
3454
3456
  ),
3455
3457
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3456
- _chunkKOTKKBJTjs.Button,
3458
+ _chunkNFCXUAE6js.Button,
3457
3459
  {
3458
3460
  type: "button",
3459
3461
  variant: "outline",
@@ -3468,7 +3470,7 @@ function PriceEditorInternal({
3468
3470
  )
3469
3471
  ] }, index)),
3470
3472
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
3471
- _chunkKOTKKBJTjs.Button,
3473
+ _chunkNFCXUAE6js.Button,
3472
3474
  {
3473
3475
  type: "button",
3474
3476
  variant: "outline",
@@ -3483,12 +3485,12 @@ function PriceEditorInternal({
3483
3485
  )
3484
3486
  ] }),
3485
3487
  isRecurring && allFeatures.length > 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-y-2", children: [
3486
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.FieldLabel, { children: t("billing.admin.prices.fields.platformFeatures") }),
3488
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.FieldLabel, { children: t("billing.admin.prices.fields.platformFeatures") }),
3487
3489
  /* @__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) => {
3488
3490
  const isChecked = form.watch("featureIds").includes(feature.id);
3489
3491
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-x-2", children: [
3490
3492
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3491
- _chunkKOTKKBJTjs.Checkbox,
3493
+ _chunkNFCXUAE6js.Checkbox,
3492
3494
  {
3493
3495
  id: `feature-${feature.id}`,
3494
3496
  checked: isChecked,
@@ -3504,13 +3506,13 @@ function PriceEditorInternal({
3504
3506
  }
3505
3507
  }
3506
3508
  ),
3507
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.FieldLabel, { htmlFor: `feature-${feature.id}`, children: feature.name }),
3509
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.FieldLabel, { htmlFor: `feature-${feature.id}`, children: feature.name }),
3508
3510
  feature.isCore && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: t("billing.admin.prices.help.core") })
3509
3511
  ] }, feature.id);
3510
3512
  }) })
3511
3513
  ] }),
3512
3514
  isRecurring && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3513
- _chunkKOTKKBJTjs.FormCheckbox,
3515
+ _chunkNFCXUAE6js.FormCheckbox,
3514
3516
  {
3515
3517
  form,
3516
3518
  id: "isTrial",
@@ -3553,7 +3555,7 @@ var defaultContextValue = {
3553
3555
  productId: void 0
3554
3556
  };
3555
3557
  function priceLabel(price) {
3556
- return _nullishCoalesce(price.nickname, () => ( `${_chunkKOTKKBJTjs.formatCurrency.call(void 0, price.unitAmount, price.currency)} ${_chunkKOTKKBJTjs.formatInterval.call(void 0, price)}`.trim()));
3558
+ return _nullishCoalesce(price.nickname, () => ( `${_chunkNFCXUAE6js.formatCurrency.call(void 0, price.unitAmount, price.currency)} ${_chunkNFCXUAE6js.formatInterval.call(void 0, price)}`.trim()));
3557
3559
  }
3558
3560
  _chunk7QVYU63Ejs.__name.call(void 0, priceLabel, "priceLabel");
3559
3561
  var PriceProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({
@@ -3563,21 +3565,21 @@ var PriceProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({
3563
3565
  productId: productIdProp
3564
3566
  }) => {
3565
3567
  const t = _nextintl.useTranslations.call(void 0, );
3566
- const generateUrl = _chunkKOTKKBJTjs.usePageUrlGenerator.call(void 0, );
3567
- const { hasRole } = _chunkKOTKKBJTjs.useCurrentUserContext.call(void 0, );
3568
+ const generateUrl = _chunkNFCXUAE6js.usePageUrlGenerator.call(void 0, );
3569
+ const { hasRole } = _chunkNFCXUAE6js.useCurrentUserContext.call(void 0, );
3568
3570
  const [price, setPrice] = _react.useState.call(void 0,
3569
- dehydratedPrice ? _chunkCAKOFJZDjs.rehydrate.call(void 0, _chunkCAKOFJZDjs.Modules.StripePrice, dehydratedPrice) : void 0
3571
+ dehydratedPrice ? _chunk6OFANJTEjs.rehydrate.call(void 0, _chunk6OFANJTEjs.Modules.StripePrice, dehydratedPrice) : void 0
3570
3572
  );
3571
3573
  const [priceVersion, setPriceVersion] = _react.useState.call(void 0, 0);
3572
3574
  const refreshPrices = _react.useCallback.call(void 0, () => setPriceVersion((value2) => value2 + 1), []);
3573
3575
  const productId = _nullishCoalesce(productIdProp, () => ( _optionalChain([price, 'optionalAccess', _141 => _141.product, 'optionalAccess', _142 => _142.id])));
3574
3576
  const reloadPrice = _react.useCallback.call(void 0, async () => {
3575
3577
  if (!_optionalChain([price, 'optionalAccess', _143 => _143.id])) return;
3576
- setPrice(await _chunkCAKOFJZDjs.StripePriceService.getPrice({ id: price.id }));
3578
+ setPrice(await _chunk6OFANJTEjs.StripePriceService.getPrice({ id: price.id }));
3577
3579
  }, [_optionalChain([price, 'optionalAccess', _144 => _144.id])]);
3578
3580
  const createPrice = _react.useCallback.call(void 0,
3579
3581
  async (input) => {
3580
- const saved = await _chunkCAKOFJZDjs.StripePriceService.createPrice(input);
3582
+ const saved = await _chunk6OFANJTEjs.StripePriceService.createPrice(input);
3581
3583
  refreshPrices();
3582
3584
  return saved;
3583
3585
  },
@@ -3585,7 +3587,7 @@ var PriceProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({
3585
3587
  );
3586
3588
  const updatePrice = _react.useCallback.call(void 0,
3587
3589
  async (input) => {
3588
- const saved = await _chunkCAKOFJZDjs.StripePriceService.updatePrice(input);
3590
+ const saved = await _chunk6OFANJTEjs.StripePriceService.updatePrice(input);
3589
3591
  setPrice(saved);
3590
3592
  refreshPrices();
3591
3593
  return saved;
@@ -3596,7 +3598,7 @@ var PriceProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({
3596
3598
  async (id) => {
3597
3599
  const target = _nullishCoalesce(id, () => ( _optionalChain([price, 'optionalAccess', _145 => _145.id])));
3598
3600
  if (!target) return;
3599
- await _chunkCAKOFJZDjs.StripePriceService.archivePrice({ id: target });
3601
+ await _chunk6OFANJTEjs.StripePriceService.archivePrice({ id: target });
3600
3602
  await reloadPrice();
3601
3603
  refreshPrices();
3602
3604
  },
@@ -3606,7 +3608,7 @@ var PriceProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({
3606
3608
  async (id) => {
3607
3609
  const target = _nullishCoalesce(id, () => ( _optionalChain([price, 'optionalAccess', _147 => _147.id])));
3608
3610
  if (!target) return;
3609
- await _chunkCAKOFJZDjs.StripePriceService.reactivatePrice({ id: target });
3611
+ await _chunk6OFANJTEjs.StripePriceService.reactivatePrice({ id: target });
3610
3612
  await reloadPrice();
3611
3613
  refreshPrices();
3612
3614
  },
@@ -3630,12 +3632,12 @@ var PriceProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({
3630
3632
  if (!publishChrome) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PriceContext.Provider, { value, children });
3631
3633
  const breadcrumb = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
3632
3634
  const items = [
3633
- { name: t("billing.admin.products.title"), href: generateUrl({ page: _chunkCAKOFJZDjs.Modules.StripeProduct }) }
3635
+ { name: t("billing.admin.products.title"), href: generateUrl({ page: _chunk6OFANJTEjs.Modules.StripeProduct }) }
3634
3636
  ];
3635
3637
  if (_optionalChain([price, 'optionalAccess', _149 => _149.product]))
3636
3638
  items.push({
3637
3639
  name: price.product.name,
3638
- href: generateUrl({ page: _chunkCAKOFJZDjs.Modules.StripeProduct, id: price.product.id })
3640
+ href: generateUrl({ page: _chunk6OFANJTEjs.Modules.StripeProduct, id: price.product.id })
3639
3641
  });
3640
3642
  if (price) items.push({ name: priceLabel(price) });
3641
3643
  return items;
@@ -3644,7 +3646,7 @@ var PriceProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({
3644
3646
  const response = { type: t("billing.admin.prices.title") };
3645
3647
  if (!price) return response;
3646
3648
  response.element = priceLabel(price);
3647
- if (hasRole(_chunk4Z45NYPRjs.getRoleId.call(void 0, ).Administrator)) {
3649
+ if (hasRole(_chunkG4JR3SFVjs.getRoleId.call(void 0, ).Administrator)) {
3648
3650
  response.functions = [
3649
3651
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PriceArchiver, { price }, "priceArchiver"),
3650
3652
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PriceEditor, { price, propagateChanges: setPrice }, "priceEditor")
@@ -3652,7 +3654,7 @@ var PriceProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({
3652
3654
  }
3653
3655
  return response;
3654
3656
  }, "title");
3655
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.SharedProvider, { value: { breadcrumbs: breadcrumb(), title: title() }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PriceContext.Provider, { value, children }) });
3657
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.SharedProvider, { value: { breadcrumbs: breadcrumb(), title: title() }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PriceContext.Provider, { value, children }) });
3656
3658
  }, "PriceProvider");
3657
3659
  var usePriceContext = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => _nullishCoalesce(_react.useContext.call(void 0, PriceContext), () => ( defaultContextValue)), "usePriceContext");
3658
3660
 
@@ -3672,12 +3674,12 @@ function ProductArchiver({ product }) {
3672
3674
  const isArchived = !product.active;
3673
3675
  const scope = isArchived ? "restore" : "archive";
3674
3676
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
3675
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.Button, { variant: "outline", size: "sm", onClick: () => setOpen(true), children: [
3677
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.Button, { variant: "outline", size: "sm", onClick: () => setOpen(true), children: [
3676
3678
  isArchived ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.RotateCcwIcon, {}) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ArchiveIcon, {}),
3677
3679
  t(`billing.admin.products.${scope}.confirm`)
3678
3680
  ] }),
3679
3681
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3680
- _chunkKOTKKBJTjs.ConfirmDialog,
3682
+ _chunkNFCXUAE6js.ConfirmDialog,
3681
3683
  {
3682
3684
  open,
3683
3685
  onOpenChange: setOpen,
@@ -3691,7 +3693,7 @@ function ProductArchiver({ product }) {
3691
3693
  if (isArchived) await restoreProduct(product.id);
3692
3694
  else await archiveProduct(product.id);
3693
3695
  } catch (error) {
3694
- _chunkKOTKKBJTjs.errorToast.call(void 0, { title: t(`billing.admin.products.${scope}.title`), error });
3696
+ _chunkNFCXUAE6js.errorToast.call(void 0, { title: t(`billing.admin.products.${scope}.title`), error });
3695
3697
  throw error;
3696
3698
  }
3697
3699
  }
@@ -3720,7 +3722,7 @@ function ProductEditorInternal({
3720
3722
  onDialogOpenChange
3721
3723
  }) {
3722
3724
  const t = _nextintl.useTranslations.call(void 0, );
3723
- const router = _chunk4Z45NYPRjs.useI18nRouter.call(void 0, );
3725
+ const router = _chunk6OFANJTEjs.useI18nRouter.call(void 0, );
3724
3726
  const { createProduct, updateProduct } = useProductContext();
3725
3727
  const isEdit = !!product;
3726
3728
  const formSchema2 = _react.useMemo.call(void 0,
@@ -3744,13 +3746,13 @@ function ProductEditorInternal({
3744
3746
  defaultValues: getDefaultValues()
3745
3747
  });
3746
3748
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3747
- _chunkKOTKKBJTjs.EditorSheet,
3749
+ _chunkNFCXUAE6js.EditorSheet,
3748
3750
  {
3749
3751
  form,
3750
3752
  entityType: t("billing.admin.products.entity"),
3751
3753
  entityName: _optionalChain([product, 'optionalAccess', _153 => _153.name]),
3752
3754
  isEdit,
3753
- module: _chunkCAKOFJZDjs.Modules.StripeProduct,
3755
+ module: _chunk6OFANJTEjs.Modules.StripeProduct,
3754
3756
  size: "md",
3755
3757
  propagateChanges,
3756
3758
  onSuccess,
@@ -3767,7 +3769,7 @@ function ProductEditorInternal({
3767
3769
  onDialogOpenChange,
3768
3770
  children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-y-4", children: [
3769
3771
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3770
- _chunkKOTKKBJTjs.FormInput,
3772
+ _chunkNFCXUAE6js.FormInput,
3771
3773
  {
3772
3774
  form,
3773
3775
  id: "name",
@@ -3777,7 +3779,7 @@ function ProductEditorInternal({
3777
3779
  }
3778
3780
  ),
3779
3781
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3780
- _chunkKOTKKBJTjs.FormTextarea,
3782
+ _chunkNFCXUAE6js.FormTextarea,
3781
3783
  {
3782
3784
  form,
3783
3785
  id: "description",
@@ -3821,20 +3823,20 @@ var defaultContextValue2 = {
3821
3823
  };
3822
3824
  var ProductProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ children, dehydratedProduct, publishChrome = true }) => {
3823
3825
  const t = _nextintl.useTranslations.call(void 0, );
3824
- const generateUrl = _chunkKOTKKBJTjs.usePageUrlGenerator.call(void 0, );
3825
- const { hasRole } = _chunkKOTKKBJTjs.useCurrentUserContext.call(void 0, );
3826
+ const generateUrl = _chunkNFCXUAE6js.usePageUrlGenerator.call(void 0, );
3827
+ const { hasRole } = _chunkNFCXUAE6js.useCurrentUserContext.call(void 0, );
3826
3828
  const [product, setProduct] = _react.useState.call(void 0,
3827
- dehydratedProduct ? _chunkCAKOFJZDjs.rehydrate.call(void 0, _chunkCAKOFJZDjs.Modules.StripeProduct, dehydratedProduct) : void 0
3829
+ dehydratedProduct ? _chunk6OFANJTEjs.rehydrate.call(void 0, _chunk6OFANJTEjs.Modules.StripeProduct, dehydratedProduct) : void 0
3828
3830
  );
3829
3831
  const [catalogueVersion, setCatalogueVersion] = _react.useState.call(void 0, 0);
3830
3832
  const refreshCatalogue = _react.useCallback.call(void 0, () => setCatalogueVersion((value2) => value2 + 1), []);
3831
3833
  const reloadProduct = _react.useCallback.call(void 0, async () => {
3832
3834
  if (!_optionalChain([product, 'optionalAccess', _154 => _154.id])) return;
3833
- setProduct(await _chunkCAKOFJZDjs.StripeProductService.getProduct({ id: product.id }));
3835
+ setProduct(await _chunk6OFANJTEjs.StripeProductService.getProduct({ id: product.id }));
3834
3836
  }, [_optionalChain([product, 'optionalAccess', _155 => _155.id])]);
3835
3837
  const createProduct = _react.useCallback.call(void 0,
3836
3838
  async (input) => {
3837
- const saved = await _chunkCAKOFJZDjs.StripeProductService.createProduct(input);
3839
+ const saved = await _chunk6OFANJTEjs.StripeProductService.createProduct(input);
3838
3840
  refreshCatalogue();
3839
3841
  return saved;
3840
3842
  },
@@ -3842,7 +3844,7 @@ var ProductProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ ch
3842
3844
  );
3843
3845
  const updateProduct = _react.useCallback.call(void 0,
3844
3846
  async (input) => {
3845
- const saved = await _chunkCAKOFJZDjs.StripeProductService.updateProduct(input);
3847
+ const saved = await _chunk6OFANJTEjs.StripeProductService.updateProduct(input);
3846
3848
  setProduct(saved);
3847
3849
  refreshCatalogue();
3848
3850
  return saved;
@@ -3853,7 +3855,7 @@ var ProductProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ ch
3853
3855
  async (id) => {
3854
3856
  const target = _nullishCoalesce(id, () => ( _optionalChain([product, 'optionalAccess', _156 => _156.id])));
3855
3857
  if (!target) return;
3856
- await _chunkCAKOFJZDjs.StripeProductService.archiveProduct({ id: target });
3858
+ await _chunk6OFANJTEjs.StripeProductService.archiveProduct({ id: target });
3857
3859
  await reloadProduct();
3858
3860
  refreshCatalogue();
3859
3861
  },
@@ -3863,7 +3865,7 @@ var ProductProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ ch
3863
3865
  async (id) => {
3864
3866
  const target = _nullishCoalesce(id, () => ( _optionalChain([product, 'optionalAccess', _158 => _158.id])));
3865
3867
  if (!target) return;
3866
- await _chunkCAKOFJZDjs.StripeProductService.reactivateProduct({ id: target });
3868
+ await _chunk6OFANJTEjs.StripeProductService.reactivateProduct({ id: target });
3867
3869
  await reloadProduct();
3868
3870
  refreshCatalogue();
3869
3871
  },
@@ -3898,7 +3900,7 @@ var ProductProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ ch
3898
3900
  {
3899
3901
  name: t("billing.admin.products.title"),
3900
3902
  // Linked only when it is NOT the current page.
3901
- ...product ? { href: generateUrl({ page: _chunkCAKOFJZDjs.Modules.StripeProduct }) } : {}
3903
+ ...product ? { href: generateUrl({ page: _chunk6OFANJTEjs.Modules.StripeProduct }) } : {}
3902
3904
  }
3903
3905
  ];
3904
3906
  if (product) items.push({ name: product.name });
@@ -3908,7 +3910,7 @@ var ProductProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ ch
3908
3910
  const response = { type: t("billing.admin.products.title") };
3909
3911
  if (!product) return response;
3910
3912
  response.element = product.name;
3911
- if (hasRole(_chunk4Z45NYPRjs.getRoleId.call(void 0, ).Administrator)) {
3913
+ if (hasRole(_chunkG4JR3SFVjs.getRoleId.call(void 0, ).Administrator)) {
3912
3914
  response.functions = [
3913
3915
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ProductArchiver, { product }, "productArchiver"),
3914
3916
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ProductEditor, { product, propagateChanges: setProduct }, "productEditor")
@@ -3916,7 +3918,7 @@ var ProductProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ ch
3916
3918
  }
3917
3919
  return response;
3918
3920
  }, "title");
3919
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.SharedProvider, { value: { breadcrumbs: breadcrumb(), title: title() }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ProductContext.Provider, { value, children }) });
3921
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.SharedProvider, { value: { breadcrumbs: breadcrumb(), title: title() }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ProductContext.Provider, { value, children }) });
3920
3922
  }, "ProductProvider");
3921
3923
  var useProductContext = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => _nullishCoalesce(_react.useContext.call(void 0, ProductContext), () => ( defaultContextValue2)), "useProductContext");
3922
3924
 
@@ -3925,56 +3927,56 @@ var useProductContext = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ()
3925
3927
 
3926
3928
  function PriceDetails() {
3927
3929
  const t = _nextintl.useTranslations.call(void 0, );
3928
- const generateUrl = _chunkKOTKKBJTjs.usePageUrlGenerator.call(void 0, );
3930
+ const generateUrl = _chunkNFCXUAE6js.usePageUrlGenerator.call(void 0, );
3929
3931
  const { price } = usePriceContext();
3930
3932
  if (!price) return null;
3931
3933
  const isRecurring = price.priceType === "recurring";
3932
3934
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-y-8", children: [
3933
3935
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-y-4", children: [
3934
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.SectionHeader, { children: t("billing.admin.prices.title") }),
3936
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.SectionHeader, { children: t("billing.admin.prices.title") }),
3935
3937
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid grid-cols-1 gap-4 md:grid-cols-2", children: [
3936
3938
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3937
- _chunkKOTKKBJTjs.DetailField,
3939
+ _chunkNFCXUAE6js.DetailField,
3938
3940
  {
3939
3941
  label: t("billing.admin.prices.fields.product"),
3940
- value: price.product ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.Link, { href: generateUrl({ page: _chunkCAKOFJZDjs.Modules.StripeProduct, id: price.product.id }), children: price.product.name }) : "\u2014"
3942
+ value: price.product ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Link, { href: generateUrl({ page: _chunk6OFANJTEjs.Modules.StripeProduct, id: price.product.id }), children: price.product.name }) : "\u2014"
3941
3943
  }
3942
3944
  ),
3943
3945
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3944
- _chunkKOTKKBJTjs.DetailField,
3946
+ _chunkNFCXUAE6js.DetailField,
3945
3947
  {
3946
3948
  label: t("billing.admin.prices.fields.status"),
3947
3949
  value: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex flex-wrap items-center gap-1", children: [
3948
- price.active ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.Badge, { variant: "softGreen", children: t("billing.admin.prices.status.active") }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.Badge, { variant: "softGray", children: t("billing.admin.prices.status.archived") }),
3949
- price.isTrial && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.Badge, { variant: "softBlue", children: t("billing.admin.prices.badge.trial") })
3950
+ price.active ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Badge, { variant: "softGreen", children: t("billing.admin.prices.status.active") }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Badge, { variant: "softGray", children: t("billing.admin.prices.status.archived") }),
3951
+ price.isTrial && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Badge, { variant: "softBlue", children: t("billing.admin.prices.badge.trial") })
3950
3952
  ] })
3951
3953
  }
3952
3954
  ),
3953
3955
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3954
- _chunkKOTKKBJTjs.DetailField,
3956
+ _chunkNFCXUAE6js.DetailField,
3955
3957
  {
3956
3958
  label: t("billing.admin.prices.fields.amount"),
3957
- value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "tabular-nums", children: _chunkKOTKKBJTjs.formatCurrency.call(void 0, price.unitAmount, price.currency) })
3959
+ value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "tabular-nums", children: _chunkNFCXUAE6js.formatCurrency.call(void 0, price.unitAmount, price.currency) })
3958
3960
  }
3959
3961
  ),
3960
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.DetailField, { label: t("billing.admin.prices.fields.currency"), value: price.currency.toUpperCase() }),
3962
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.DetailField, { label: t("billing.admin.prices.fields.currency"), value: price.currency.toUpperCase() }),
3961
3963
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3962
- _chunkKOTKKBJTjs.DetailField,
3964
+ _chunkNFCXUAE6js.DetailField,
3963
3965
  {
3964
3966
  label: t("billing.admin.prices.fields.type"),
3965
3967
  value: isRecurring ? t("billing.admin.prices.type.recurring") : t("billing.admin.prices.type.oneTime")
3966
3968
  }
3967
3969
  ),
3968
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.DetailField, { label: t("billing.admin.prices.fields.billing"), value: _chunkKOTKKBJTjs.formatInterval.call(void 0, price) }),
3970
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.DetailField, { label: t("billing.admin.prices.fields.billing"), value: _chunkNFCXUAE6js.formatInterval.call(void 0, price) }),
3969
3971
  isRecurring && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3970
- _chunkKOTKKBJTjs.DetailField,
3972
+ _chunkNFCXUAE6js.DetailField,
3971
3973
  {
3972
3974
  label: t("billing.admin.prices.fields.intervalCount"),
3973
3975
  value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "tabular-nums", children: _nullishCoalesce(_optionalChain([price, 'access', _160 => _160.recurring, 'optionalAccess', _161 => _161.intervalCount]), () => ( 1)) })
3974
3976
  }
3975
3977
  ),
3976
3978
  isRecurring && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3977
- _chunkKOTKKBJTjs.DetailField,
3979
+ _chunkNFCXUAE6js.DetailField,
3978
3980
  {
3979
3981
  label: t("billing.admin.prices.fields.usageType"),
3980
3982
  value: _optionalChain([price, 'access', _162 => _162.recurring, 'optionalAccess', _163 => _163.usageType]) === "metered" ? t("billing.admin.prices.usage.metered") : t("billing.admin.prices.usage.licensed")
@@ -3983,24 +3985,24 @@ function PriceDetails() {
3983
3985
  ] })
3984
3986
  ] }),
3985
3987
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-y-4", children: [
3986
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.SectionHeader, { children: t("billing.admin.prices.fields.platformFeatures") }),
3988
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.SectionHeader, { children: t("billing.admin.prices.fields.platformFeatures") }),
3987
3989
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid grid-cols-1 gap-4 md:grid-cols-2", children: [
3988
3990
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3989
- _chunkKOTKKBJTjs.DetailField,
3991
+ _chunkNFCXUAE6js.DetailField,
3990
3992
  {
3991
3993
  label: t("billing.admin.prices.fields.token"),
3992
3994
  value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "tabular-nums", children: _nullishCoalesce(price.token, () => ( "\u2014")) })
3993
3995
  }
3994
3996
  ),
3995
3997
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3996
- _chunkKOTKKBJTjs.DetailField,
3998
+ _chunkNFCXUAE6js.DetailField,
3997
3999
  {
3998
4000
  label: t("billing.admin.prices.fields.stripeId"),
3999
4001
  value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "tabular-nums", children: price.stripePriceId })
4000
4002
  }
4001
4003
  ),
4002
4004
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4003
- _chunkKOTKKBJTjs.DetailField,
4005
+ _chunkNFCXUAE6js.DetailField,
4004
4006
  {
4005
4007
  label: t("billing.admin.prices.fields.description"),
4006
4008
  value: _nullishCoalesce(price.description, () => ( "\u2014")),
@@ -4008,7 +4010,7 @@ function PriceDetails() {
4008
4010
  }
4009
4011
  ),
4010
4012
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4011
- _chunkKOTKKBJTjs.DetailField,
4013
+ _chunkNFCXUAE6js.DetailField,
4012
4014
  {
4013
4015
  label: t("billing.admin.prices.fields.features"),
4014
4016
  className: "md:col-span-2",
@@ -4016,11 +4018,11 @@ function PriceDetails() {
4016
4018
  }
4017
4019
  ),
4018
4020
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4019
- _chunkKOTKKBJTjs.DetailField,
4021
+ _chunkNFCXUAE6js.DetailField,
4020
4022
  {
4021
4023
  label: t("billing.admin.prices.fields.platformFeatures"),
4022
4024
  className: "md:col-span-2",
4023
- 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, _chunkKOTKKBJTjs.Badge, { variant: "softGray", children: feature.name }, feature.id)) }) : "\u2014"
4025
+ 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, _chunkNFCXUAE6js.Badge, { variant: "softGray", children: feature.name }, feature.id)) }) : "\u2014"
4024
4026
  }
4025
4027
  )
4026
4028
  ] })
@@ -4034,7 +4036,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, PriceDetails, "PriceDetails");
4034
4036
  function PriceContainer() {
4035
4037
  const { price } = usePriceContext();
4036
4038
  if (!price) return null;
4037
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.RoundPageContainer, { module: _chunkCAKOFJZDjs.Modules.StripePrice, id: price.id, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PriceDetails, {}) });
4039
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.RoundPageContainer, { module: _chunk6OFANJTEjs.Modules.StripePrice, id: price.id, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PriceDetails, {}) });
4038
4040
  }
4039
4041
  _chunk7QVYU63Ejs.__name.call(void 0, PriceContainer, "PriceContainer");
4040
4042
 
@@ -4159,10 +4161,10 @@ function PricesList({ productId, fullWidth }) {
4159
4161
  const importInputRef = _react.useRef.call(void 0, null);
4160
4162
  const [seed, setSeed] = _react.useState.call(void 0, void 0);
4161
4163
  const [seedNonce, setSeedNonce] = _react.useState.call(void 0, 0);
4162
- const data = _chunkKOTKKBJTjs.useDataListRetriever.call(void 0, {
4163
- retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunkCAKOFJZDjs.StripePriceService.listPrices({ ...params, productId }), "retriever"),
4164
+ const data = _chunkNFCXUAE6js.useDataListRetriever.call(void 0, {
4165
+ retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunk6OFANJTEjs.StripePriceService.listPrices({ ...params, productId }), "retriever"),
4164
4166
  retrieverParams: {},
4165
- module: _chunkCAKOFJZDjs.Modules.StripePrice
4167
+ module: _chunk6OFANJTEjs.Modules.StripePrice
4166
4168
  });
4167
4169
  _react.useEffect.call(void 0, () => {
4168
4170
  if (priceVersion > 0) void data.refresh();
@@ -4197,7 +4199,7 @@ function PricesList({ productId, fullWidth }) {
4197
4199
  openSeededEditor(transfer.price);
4198
4200
  } catch (error) {
4199
4201
  console.error("[PricesList] price import failed", error);
4200
- _chunkKOTKKBJTjs.errorToast.call(void 0, {
4202
+ _chunkNFCXUAE6js.errorToast.call(void 0, {
4201
4203
  title: t("billing.admin.prices.import.errors.title"),
4202
4204
  error: t("billing.admin.prices.import.errors.invalid")
4203
4205
  });
@@ -4216,7 +4218,7 @@ function PricesList({ productId, fullWidth }) {
4216
4218
  "create-price"
4217
4219
  ),
4218
4220
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _react.Fragment, { children: [
4219
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkKOTKKBJTjs.Button, { variant: "outline", size: "sm", type: "button", onClick: () => _optionalChain([importInputRef, 'access', _178 => _178.current, 'optionalAccess', _179 => _179.click, 'call', _180 => _180()]), children: [
4221
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.Button, { variant: "outline", size: "sm", type: "button", onClick: () => _optionalChain([importInputRef, 'access', _178 => _178.current, 'optionalAccess', _179 => _179.click, 'call', _180 => _180()]), children: [
4220
4222
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.UploadIcon, {}),
4221
4223
  t("billing.admin.prices.actions.import")
4222
4224
  ] }),
@@ -4234,7 +4236,7 @@ function PricesList({ productId, fullWidth }) {
4234
4236
  ];
4235
4237
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
4236
4238
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4237
- _chunkKOTKKBJTjs.ContentListTable,
4239
+ _chunkNFCXUAE6js.ContentListTable,
4238
4240
  {
4239
4241
  data,
4240
4242
  fields: [
@@ -4245,13 +4247,13 @@ function PricesList({ productId, fullWidth }) {
4245
4247
  "status" /* status */,
4246
4248
  "actions" /* actions */
4247
4249
  ],
4248
- tableGeneratorType: _chunkCAKOFJZDjs.Modules.StripePrice,
4250
+ tableGeneratorType: _chunk6OFANJTEjs.Modules.StripePrice,
4249
4251
  functions,
4250
4252
  context: tableContext,
4251
4253
  fullWidth,
4252
4254
  title: t("billing.admin.prices.title"),
4253
4255
  emptyState: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4254
- _chunkKOTKKBJTjs.EmptyState,
4256
+ _chunkNFCXUAE6js.EmptyState,
4255
4257
  {
4256
4258
  icon: _lucidereact.DollarSignIcon,
4257
4259
  title: t("billing.admin.prices.empty.title"),
@@ -4291,18 +4293,18 @@ function ProductDetails() {
4291
4293
  const { product } = useProductContext();
4292
4294
  if (!product) return null;
4293
4295
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-y-4", children: [
4294
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.SectionHeader, { children: t("billing.admin.products.tabs.details") }),
4296
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.SectionHeader, { children: t("billing.admin.products.tabs.details") }),
4295
4297
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid grid-cols-1 gap-4 md:grid-cols-2", children: [
4296
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.DetailField, { label: t("billing.admin.products.fields.name"), value: product.name }),
4298
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.DetailField, { label: t("billing.admin.products.fields.name"), value: product.name }),
4297
4299
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4298
- _chunkKOTKKBJTjs.DetailField,
4300
+ _chunkNFCXUAE6js.DetailField,
4299
4301
  {
4300
4302
  label: t("billing.admin.products.fields.status"),
4301
- value: product.active ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.Badge, { variant: "softGreen", children: t("billing.admin.products.status.active") }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.Badge, { variant: "softGray", children: t("billing.admin.products.status.archived") })
4303
+ value: product.active ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Badge, { variant: "softGreen", children: t("billing.admin.products.status.active") }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Badge, { variant: "softGray", children: t("billing.admin.products.status.archived") })
4302
4304
  }
4303
4305
  ),
4304
4306
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4305
- _chunkKOTKKBJTjs.DetailField,
4307
+ _chunkNFCXUAE6js.DetailField,
4306
4308
  {
4307
4309
  label: t("billing.admin.products.fields.description"),
4308
4310
  value: _nullishCoalesce(product.description, () => ( "\u2014")),
@@ -4310,14 +4312,14 @@ function ProductDetails() {
4310
4312
  }
4311
4313
  ),
4312
4314
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4313
- _chunkKOTKKBJTjs.DetailField,
4315
+ _chunkNFCXUAE6js.DetailField,
4314
4316
  {
4315
4317
  label: t("billing.admin.products.fields.prices"),
4316
4318
  value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "tabular-nums", children: product.stripePrices.length })
4317
4319
  }
4318
4320
  ),
4319
4321
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4320
- _chunkKOTKKBJTjs.DetailField,
4322
+ _chunkNFCXUAE6js.DetailField,
4321
4323
  {
4322
4324
  label: t("billing.admin.products.fields.stripeId"),
4323
4325
  value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "tabular-nums", children: product.stripeProductId })
@@ -4335,9 +4337,9 @@ function ProductContainer() {
4335
4337
  const { product } = useProductContext();
4336
4338
  if (!product) return null;
4337
4339
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4338
- _chunkKOTKKBJTjs.RoundPageContainer,
4340
+ _chunkNFCXUAE6js.RoundPageContainer,
4339
4341
  {
4340
- module: _chunkCAKOFJZDjs.Modules.StripeProduct,
4342
+ module: _chunk6OFANJTEjs.Modules.StripeProduct,
4341
4343
  id: product.id,
4342
4344
  tabs: [
4343
4345
  {
@@ -4346,7 +4348,7 @@ function ProductContainer() {
4346
4348
  content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ProductDetails, {})
4347
4349
  },
4348
4350
  {
4349
- key: _chunkCAKOFJZDjs.Modules.StripePrice,
4351
+ key: _chunk6OFANJTEjs.Modules.StripePrice,
4350
4352
  label: t("billing.admin.prices.title"),
4351
4353
  // publishChrome={false}: SharedProvider REPLACES its value for the
4352
4354
  // subtree (SharedContext.tsx:35-37), so a nested provider publishing
@@ -4370,26 +4372,26 @@ _chunk7QVYU63Ejs.__name.call(void 0, ProductContainer, "ProductContainer");
4370
4372
  function ProductsList({ fullWidth } = {}) {
4371
4373
  const t = _nextintl.useTranslations.call(void 0, );
4372
4374
  const { catalogueVersion } = useProductContext();
4373
- const data = _chunkKOTKKBJTjs.useDataListRetriever.call(void 0, {
4374
- retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunkCAKOFJZDjs.StripeProductService.listProducts(params), "retriever"),
4375
+ const data = _chunkNFCXUAE6js.useDataListRetriever.call(void 0, {
4376
+ retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunk6OFANJTEjs.StripeProductService.listProducts(params), "retriever"),
4375
4377
  retrieverParams: {},
4376
- module: _chunkCAKOFJZDjs.Modules.StripeProduct
4378
+ module: _chunk6OFANJTEjs.Modules.StripeProduct
4377
4379
  });
4378
4380
  _react.useEffect.call(void 0, () => {
4379
4381
  if (catalogueVersion > 0) void data.refresh();
4380
4382
  }, [catalogueVersion]);
4381
4383
  const functions = [/* @__PURE__ */ _jsxruntime.jsx.call(void 0, ProductEditor, {}, "create-product")];
4382
4384
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4383
- _chunkKOTKKBJTjs.ContentListTable,
4385
+ _chunkNFCXUAE6js.ContentListTable,
4384
4386
  {
4385
4387
  data,
4386
4388
  fields: ["name" /* name */, "status" /* status */, "prices" /* prices */],
4387
- tableGeneratorType: _chunkCAKOFJZDjs.Modules.StripeProduct,
4389
+ tableGeneratorType: _chunk6OFANJTEjs.Modules.StripeProduct,
4388
4390
  functions,
4389
4391
  fullWidth,
4390
4392
  title: t("billing.admin.products.title"),
4391
4393
  emptyState: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4392
- _chunkKOTKKBJTjs.EmptyState,
4394
+ _chunkNFCXUAE6js.EmptyState,
4393
4395
  {
4394
4396
  icon: _lucidereact.PackageIcon,
4395
4397
  title: t("billing.admin.products.empty.title"),
@@ -4404,7 +4406,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, ProductsList, "ProductsList");
4404
4406
  // src/features/billing/stripe-product/components/containers/ProductsListContainer.tsx
4405
4407
 
4406
4408
  function ProductsListContainer() {
4407
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ProductProvider, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKOTKKBJTjs.RoundPageContainer, { module: _chunkCAKOFJZDjs.Modules.StripeProduct, fullWidth: true, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ProductsList, { fullWidth: true }) }) });
4409
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ProductProvider, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.RoundPageContainer, { module: _chunk6OFANJTEjs.Modules.StripeProduct, fullWidth: true, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ProductsList, { fullWidth: true }) }) });
4408
4410
  }
4409
4411
  _chunk7QVYU63Ejs.__name.call(void 0, ProductsListContainer, "ProductsListContainer");
4410
4412
 
@@ -4467,5 +4469,5 @@ _chunk7QVYU63Ejs.__name.call(void 0, ProductsListContainer, "ProductsListContain
4467
4469
 
4468
4470
 
4469
4471
 
4470
- exports.BillingAlertBanner = BillingAlertBanner; exports.BillingDashboardContainer = BillingDashboardContainer; exports.BillingDetailModal = BillingDetailModal; exports.BillingUsageSummaryCard = BillingUsageSummaryCard; exports.CancelSubscriptionDialog = CancelSubscriptionDialog; 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.formatCurrency = _chunkKOTKKBJTjs.formatCurrency; exports.formatDate = formatDate3; exports.formatInterval = _chunkKOTKKBJTjs.formatInterval; exports.isStripeConfigured = isStripeConfigured; exports.priceLabel = priceLabel; exports.usePriceContext = usePriceContext; exports.useProductContext = useProductContext;
4472
+ exports.BillingAlertBanner = BillingAlertBanner; exports.BillingDashboardContainer = BillingDashboardContainer; exports.BillingDetailModal = BillingDetailModal; exports.BillingUsageSummaryCard = BillingUsageSummaryCard; exports.CancelSubscriptionDialog = CancelSubscriptionDialog; 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.formatCurrency = _chunkNFCXUAE6js.formatCurrency; exports.formatDate = formatDate3; exports.formatInterval = _chunkNFCXUAE6js.formatInterval; exports.isStripeConfigured = isStripeConfigured; exports.priceLabel = priceLabel; exports.usePriceContext = usePriceContext; exports.useProductContext = useProductContext;
4471
4473
  //# sourceMappingURL=index.js.map