@openrails/billing-ui 0.280.0 → 0.282.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (236) hide show
  1. package/dist/account/format.d.ts +1 -1
  2. package/dist/admin/lib/duration.d.ts +4 -0
  3. package/dist/{admin-attempts-CP5CWyNR.js → admin-attempts-Cs2u-BLY.js} +71 -72
  4. package/dist/admin-attempts-Cs2u-BLY.js.map +1 -0
  5. package/dist/{admin-auth-DlIOmwPo.js → admin-auth-CTLBqp7N.js} +3 -4
  6. package/dist/admin-auth-CTLBqp7N.js.map +1 -0
  7. package/dist/{admin-badge-DR_8AhdC.js → admin-badge-3zABrSBc.js} +3 -4
  8. package/dist/admin-badge-3zABrSBc.js.map +1 -0
  9. package/dist/{admin-button-DBzTD6By.js → admin-button-FRNl7_Yf.js} +3 -4
  10. package/dist/admin-button-FRNl7_Yf.js.map +1 -0
  11. package/dist/{admin-capabilities-CZdT1Pxe.js → admin-capabilities-uSi2Pb2h.js} +3 -4
  12. package/dist/admin-capabilities-uSi2Pb2h.js.map +1 -0
  13. package/dist/{admin-card-mZl4-s5d.js → admin-card-YKPGmx5w.js} +3 -4
  14. package/dist/admin-card-YKPGmx5w.js.map +1 -0
  15. package/dist/admin-catalog-DB5lr46V.js +1096 -0
  16. package/dist/admin-catalog-DB5lr46V.js.map +1 -0
  17. package/dist/{admin-confirm-katGq0Qo.js → admin-confirm-DWq-edDC.js} +2 -3
  18. package/dist/admin-confirm-DWq-edDC.js.map +1 -0
  19. package/dist/{admin-csv-CPoNZj2D.js → admin-csv-CRrmaR6a.js} +2 -3
  20. package/dist/admin-csv-CRrmaR6a.js.map +1 -0
  21. package/dist/{admin-cursor-pager-C-KjCIy9.js → admin-cursor-pager-BGgOOq7s.js} +6 -8
  22. package/dist/admin-cursor-pager-BGgOOq7s.js.map +1 -0
  23. package/dist/{admin-customers-BE3N839X.js → admin-customers-DFQ75ZBi.js} +21 -22
  24. package/dist/admin-customers-DFQ75ZBi.js.map +1 -0
  25. package/dist/{admin-dashboard-BxjkV15J.js → admin-dashboard-Q_4-OFsE.js} +150 -153
  26. package/dist/admin-dashboard-Q_4-OFsE.js.map +1 -0
  27. package/dist/{admin-data-table-D89AwWz_.js → admin-data-table-DyYm4h_Y.js} +19 -26
  28. package/dist/admin-data-table-DyYm4h_Y.js.map +1 -0
  29. package/dist/{admin-detail-Ln56otK0.js → admin-detail-BytmF-e3.js} +74 -75
  30. package/dist/admin-detail-BytmF-e3.js.map +1 -0
  31. package/dist/{admin-detail-D6zD085K.js → admin-detail-CG3kLIDS.js} +92 -94
  32. package/dist/admin-detail-CG3kLIDS.js.map +1 -0
  33. package/dist/admin-detail-RS0o4-Cq.js +1351 -0
  34. package/dist/{admin-detail-P-UnNvXJ.js.map → admin-detail-RS0o4-Cq.js.map} +1 -1
  35. package/dist/{admin-detail-C8lD7U2t.js → admin-detail-SLijWf4F.js} +199 -202
  36. package/dist/admin-detail-SLijWf4F.js.map +1 -0
  37. package/dist/admin-detail-wttCvrxI.js +337 -0
  38. package/dist/admin-detail-wttCvrxI.js.map +1 -0
  39. package/dist/{admin-dialog-Dn2FRJu4.js → admin-dialog-BVx92baz.js} +4 -5
  40. package/dist/admin-dialog-BVx92baz.js.map +1 -0
  41. package/dist/{admin-dialog-width-CC7QHT1p.js → admin-dialog-width-C_WFpow0.js} +2 -3
  42. package/dist/admin-dialog-width-C_WFpow0.js.map +1 -0
  43. package/dist/{admin-dom-C7Y7A6Wa.js → admin-dom-BP9QROfy.js} +2 -3
  44. package/dist/admin-dom-BP9QROfy.js.map +1 -0
  45. package/dist/{admin-dropdown-menu-DLUn6Uj3.js → admin-dropdown-menu-BV7vxYr9.js} +3 -4
  46. package/dist/admin-dropdown-menu-BV7vxYr9.js.map +1 -0
  47. package/dist/{admin-dunning-COaHzrmN.js → admin-dunning-D8lAP7OA.js} +3 -4
  48. package/dist/admin-dunning-D8lAP7OA.js.map +1 -0
  49. package/dist/{admin-fact-card-DKvBnUXB.js → admin-fact-card-CTQyFmQY.js} +3 -4
  50. package/dist/admin-fact-card-CTQyFmQY.js.map +1 -0
  51. package/dist/{admin-form-field-errors-hbUMIriS.js → admin-form-field-errors-Cuhy38F1.js} +2 -3
  52. package/dist/admin-form-field-errors-Cuhy38F1.js.map +1 -0
  53. package/dist/{admin-format-BbiTCqUG.js → admin-format-D9Ablh0P.js} +3 -5
  54. package/dist/admin-format-D9Ablh0P.js.map +1 -0
  55. package/dist/{admin-health-DmnI4e8K.js → admin-health-DWpONa-7.js} +91 -93
  56. package/dist/admin-health-DWpONa-7.js.map +1 -0
  57. package/dist/{admin-imports-C0aMP6sj.js → admin-imports-Dsd5QmAe.js} +92 -93
  58. package/dist/admin-imports-Dsd5QmAe.js.map +1 -0
  59. package/dist/{admin-input-JKrQIGfD.js → admin-input-DhYEd7Yp.js} +3 -4
  60. package/dist/admin-input-DhYEd7Yp.js.map +1 -0
  61. package/dist/{admin-invoice-profile-model-Cgjy3zV8.js → admin-invoice-profile-model-CNsvK89v.js} +2 -3
  62. package/dist/admin-invoice-profile-model-CNsvK89v.js.map +1 -0
  63. package/dist/{admin-label-CHWsVIZC.js → admin-label-DwUfUVm6.js} +3 -4
  64. package/dist/admin-label-DwUfUVm6.js.map +1 -0
  65. package/dist/{admin-linked-table-row-BMZYYsuk.js → admin-linked-table-row-CqG_aCwd.js} +5 -6
  66. package/dist/admin-linked-table-row-CqG_aCwd.js.map +1 -0
  67. package/dist/{admin-map-dialog-BHUGdCcv.js → admin-map-dialog-DZuPq4UA.js} +26 -27
  68. package/dist/admin-map-dialog-DZuPq4UA.js.map +1 -0
  69. package/dist/{admin-mapping-csv-FtkyTBmk.js → admin-mapping-csv-DzpB9HQn.js} +1 -2
  70. package/dist/admin-mapping-csv-DzpB9HQn.js.map +1 -0
  71. package/dist/admin-metering-kGrQIiEX.js +1717 -0
  72. package/dist/admin-metering-kGrQIiEX.js.map +1 -0
  73. package/dist/{admin-missing-record-BPFs3MmO.js → admin-missing-record-CjIQEv9L.js} +3 -4
  74. package/dist/admin-missing-record-CjIQEv9L.js.map +1 -0
  75. package/dist/{admin-ops-CL2kjDwi.js → admin-ops-B1Gwrsq6.js} +99 -100
  76. package/dist/admin-ops-B1Gwrsq6.js.map +1 -0
  77. package/dist/{admin-orders-C1Sf2qhc.js → admin-orders-DRpUMK7N.js} +41 -42
  78. package/dist/admin-orders-DRpUMK7N.js.map +1 -0
  79. package/dist/{admin-parked-a0tB5bhG.js → admin-parked-uH5dSPjL.js} +47 -48
  80. package/dist/admin-parked-uH5dSPjL.js.map +1 -0
  81. package/dist/{admin-payments-DJcjwRA4.js → admin-payments-DFW5O19Q.js} +36 -37
  82. package/dist/admin-payments-DFW5O19Q.js.map +1 -0
  83. package/dist/{admin-price-detail-BOmeWw15.js → admin-price-detail-CaUekDWP.js} +88 -90
  84. package/dist/admin-price-detail-CaUekDWP.js.map +1 -0
  85. package/dist/{admin-price-format-CqOmHrIn.js → admin-price-format-BrXm8J1w.js} +15 -8
  86. package/dist/admin-price-format-BrXm8J1w.js.map +1 -0
  87. package/dist/admin-price-wizard-CCejN6lZ.js +355 -0
  88. package/dist/admin-price-wizard-CCejN6lZ.js.map +1 -0
  89. package/dist/{admin-proposals-DVrl-ym4.js → admin-proposals-BuPBTbX7.js} +114 -116
  90. package/dist/admin-proposals-BuPBTbX7.js.map +1 -0
  91. package/dist/{admin-provider-prices-BVVogH7Q.js → admin-provider-prices-BtyrGlSd.js} +74 -75
  92. package/dist/admin-provider-prices-BtyrGlSd.js.map +1 -0
  93. package/dist/{admin-range-picker-C6BtSm2B.js → admin-range-picker-B1C1R9Yh.js} +8 -11
  94. package/dist/admin-range-picker-B1C1R9Yh.js.map +1 -0
  95. package/dist/admin-records-CZ_Q1j7i.js +390 -0
  96. package/dist/admin-records-CZ_Q1j7i.js.map +1 -0
  97. package/dist/{admin-reports-CtPoiceH.js → admin-reports-ZDEVF7aC.js} +59 -60
  98. package/dist/admin-reports-ZDEVF7aC.js.map +1 -0
  99. package/dist/{admin-select-6Yuh5M1Q.js → admin-select-CCliJ9d-.js} +3 -4
  100. package/dist/admin-select-CCliJ9d-.js.map +1 -0
  101. package/dist/{admin-settings-DscHu4ww.js → admin-settings-HBiilJTI.js} +640 -645
  102. package/dist/admin-settings-HBiilJTI.js.map +1 -0
  103. package/dist/{admin-shared-BywM-MMp.js → admin-shared-Bozlh9cy.js} +23 -25
  104. package/dist/admin-shared-Bozlh9cy.js.map +1 -0
  105. package/dist/{admin-skeleton-lndmw89u.js → admin-skeleton-CKxohm-g.js} +3 -4
  106. package/dist/admin-skeleton-CKxohm-g.js.map +1 -0
  107. package/dist/{admin-status-badge-IL8ofZ_6.js → admin-status-badge-BhHyBG8J.js} +6 -7
  108. package/dist/{admin-status-badge-IL8ofZ_6.js.map → admin-status-badge-BhHyBG8J.js.map} +1 -1
  109. package/dist/{admin-subscriptions-Cd5CGrue.js → admin-subscriptions-VwEbVACW.js} +38 -39
  110. package/dist/admin-subscriptions-VwEbVACW.js.map +1 -0
  111. package/dist/{admin-switch-DpwQSzEm.js → admin-switch-CE0N-HwZ.js} +3 -4
  112. package/dist/admin-switch-CE0N-HwZ.js.map +1 -0
  113. package/dist/{admin-table-D-GdGM1m.js → admin-table-Ce6xyiwJ.js} +3 -4
  114. package/dist/admin-table-Ce6xyiwJ.js.map +1 -0
  115. package/dist/{admin-tabs-B--1flzO.js → admin-tabs-BPfOyBa6.js} +8 -10
  116. package/dist/admin-tabs-BPfOyBa6.js.map +1 -0
  117. package/dist/{admin-textarea-xsp5V9xM.js → admin-textarea-CBAshts8.js} +3 -4
  118. package/dist/admin-textarea-CBAshts8.js.map +1 -0
  119. package/dist/{admin-tile-grids-CzGpidd9.js → admin-tile-grids-Gc67MtA6.js} +2 -3
  120. package/dist/admin-tile-grids-Gc67MtA6.js.map +1 -0
  121. package/dist/{admin-typed-confirm-dialog-NiEDwX_0.js → admin-typed-confirm-dialog-C1kHdYgH.js} +13 -14
  122. package/dist/admin-typed-confirm-dialog-C1kHdYgH.js.map +1 -0
  123. package/dist/{admin-utils-wuPUD0uh.js → admin-utils-CuwG3SAt.js} +27 -47
  124. package/dist/admin-utils-CuwG3SAt.js.map +1 -0
  125. package/dist/{admin-widget-viz-kHHVmDEx.js → admin-widget-viz-Dd1Fjd_j.js} +21 -24
  126. package/dist/admin-widget-viz-Dd1Fjd_j.js.map +1 -0
  127. package/dist/admin.js +60 -84
  128. package/dist/admin.js.map +1 -1
  129. package/dist/client/generated/wire.d.ts +6 -0
  130. package/dist/client/types.d.ts +6 -2
  131. package/dist/{client-ctrbivyN.js → client-BrURpRWz.js} +8 -11
  132. package/dist/client-BrURpRWz.js.map +1 -0
  133. package/dist/client.js +1 -2
  134. package/dist/{create-card-BEILS1VB-DeyyfyFD.js → create-card-BEILS1VB-B1MQg0iK.js} +3 -4
  135. package/dist/create-card-BEILS1VB-B1MQg0iK.js.map +1 -0
  136. package/dist/{create-card-display-Dv5pcpzc-BWB6vzo2.js → create-card-display-Dv5pcpzc-DotrmqWH.js} +5 -9
  137. package/dist/create-card-display-Dv5pcpzc-DotrmqWH.js.map +1 -0
  138. package/dist/{create-copy-button-CAYmfugS-qNapojfj.js → create-copy-button-CAYmfugS-CAgco7FO.js} +3 -4
  139. package/dist/create-copy-button-CAYmfugS-CAgco7FO.js.map +1 -0
  140. package/dist/{dist-CslWupfi.js → dist-BPWQ2tCx.js} +6 -7
  141. package/dist/dist-BPWQ2tCx.js.map +1 -0
  142. package/dist/{hooks-KpTetx6F.js → hooks-Bbp1RWgw.js} +13 -22
  143. package/dist/hooks-Bbp1RWgw.js.map +1 -0
  144. package/dist/{index-rGw83t5v-BE6naeQR.js → index-rGw83t5v-ydBZxXI_.js} +10 -24
  145. package/dist/index-rGw83t5v-ydBZxXI_.js.map +1 -0
  146. package/dist/index.js +78 -130
  147. package/dist/index.js.map +1 -1
  148. package/dist/lib/price-label.d.ts +1 -1
  149. package/dist/locales/de.js +1 -2
  150. package/dist/locales/de.js.map +1 -1
  151. package/dist/locales/en.d.ts +4 -0
  152. package/dist/locales/en.js +5 -2
  153. package/dist/locales/en.js.map +1 -1
  154. package/dist/locales/es.js +1 -2
  155. package/dist/locales/es.js.map +1 -1
  156. package/dist/locales/ja.js +1 -2
  157. package/dist/locales/ja.js.map +1 -1
  158. package/dist/locales/ko.js +1 -2
  159. package/dist/locales/ko.js.map +1 -1
  160. package/dist/locales/zh.js +1 -2
  161. package/dist/locales/zh.js.map +1 -1
  162. package/dist/react.js +1 -2
  163. package/package.json +2 -2
  164. package/dist/admin-attempts-CP5CWyNR.js.map +0 -1
  165. package/dist/admin-auth-DlIOmwPo.js.map +0 -1
  166. package/dist/admin-badge-DR_8AhdC.js.map +0 -1
  167. package/dist/admin-button-DBzTD6By.js.map +0 -1
  168. package/dist/admin-capabilities-CZdT1Pxe.js.map +0 -1
  169. package/dist/admin-card-mZl4-s5d.js.map +0 -1
  170. package/dist/admin-catalog-DpTjS0Yo.js +0 -1099
  171. package/dist/admin-catalog-DpTjS0Yo.js.map +0 -1
  172. package/dist/admin-confirm-katGq0Qo.js.map +0 -1
  173. package/dist/admin-csv-CPoNZj2D.js.map +0 -1
  174. package/dist/admin-cursor-pager-C-KjCIy9.js.map +0 -1
  175. package/dist/admin-customers-BE3N839X.js.map +0 -1
  176. package/dist/admin-dashboard-BxjkV15J.js.map +0 -1
  177. package/dist/admin-data-table-D89AwWz_.js.map +0 -1
  178. package/dist/admin-detail-BKe9xqPd.js +0 -338
  179. package/dist/admin-detail-BKe9xqPd.js.map +0 -1
  180. package/dist/admin-detail-C8lD7U2t.js.map +0 -1
  181. package/dist/admin-detail-D6zD085K.js.map +0 -1
  182. package/dist/admin-detail-Ln56otK0.js.map +0 -1
  183. package/dist/admin-detail-P-UnNvXJ.js +0 -1357
  184. package/dist/admin-dialog-Dn2FRJu4.js.map +0 -1
  185. package/dist/admin-dialog-width-CC7QHT1p.js.map +0 -1
  186. package/dist/admin-dom-C7Y7A6Wa.js.map +0 -1
  187. package/dist/admin-dropdown-menu-DLUn6Uj3.js.map +0 -1
  188. package/dist/admin-dunning-COaHzrmN.js.map +0 -1
  189. package/dist/admin-fact-card-DKvBnUXB.js.map +0 -1
  190. package/dist/admin-form-field-errors-hbUMIriS.js.map +0 -1
  191. package/dist/admin-format-BbiTCqUG.js.map +0 -1
  192. package/dist/admin-health-DmnI4e8K.js.map +0 -1
  193. package/dist/admin-imports-C0aMP6sj.js.map +0 -1
  194. package/dist/admin-input-JKrQIGfD.js.map +0 -1
  195. package/dist/admin-invoice-profile-model-Cgjy3zV8.js.map +0 -1
  196. package/dist/admin-label-CHWsVIZC.js.map +0 -1
  197. package/dist/admin-linked-table-row-BMZYYsuk.js.map +0 -1
  198. package/dist/admin-map-dialog-BHUGdCcv.js.map +0 -1
  199. package/dist/admin-mapping-csv-FtkyTBmk.js.map +0 -1
  200. package/dist/admin-metering-CDqueHUh.js +0 -1721
  201. package/dist/admin-metering-CDqueHUh.js.map +0 -1
  202. package/dist/admin-missing-record-BPFs3MmO.js.map +0 -1
  203. package/dist/admin-ops-CL2kjDwi.js.map +0 -1
  204. package/dist/admin-orders-C1Sf2qhc.js.map +0 -1
  205. package/dist/admin-parked-a0tB5bhG.js.map +0 -1
  206. package/dist/admin-payments-DJcjwRA4.js.map +0 -1
  207. package/dist/admin-price-detail-BOmeWw15.js.map +0 -1
  208. package/dist/admin-price-format-CqOmHrIn.js.map +0 -1
  209. package/dist/admin-price-wizard-B6s5OJeO.js +0 -356
  210. package/dist/admin-price-wizard-B6s5OJeO.js.map +0 -1
  211. package/dist/admin-proposals-DVrl-ym4.js.map +0 -1
  212. package/dist/admin-provider-prices-BVVogH7Q.js.map +0 -1
  213. package/dist/admin-range-picker-C6BtSm2B.js.map +0 -1
  214. package/dist/admin-records-DKtcgN11.js +0 -391
  215. package/dist/admin-records-DKtcgN11.js.map +0 -1
  216. package/dist/admin-reports-CtPoiceH.js.map +0 -1
  217. package/dist/admin-select-6Yuh5M1Q.js.map +0 -1
  218. package/dist/admin-settings-DscHu4ww.js.map +0 -1
  219. package/dist/admin-shared-BywM-MMp.js.map +0 -1
  220. package/dist/admin-skeleton-lndmw89u.js.map +0 -1
  221. package/dist/admin-subscriptions-Cd5CGrue.js.map +0 -1
  222. package/dist/admin-switch-DpwQSzEm.js.map +0 -1
  223. package/dist/admin-table-D-GdGM1m.js.map +0 -1
  224. package/dist/admin-tabs-B--1flzO.js.map +0 -1
  225. package/dist/admin-textarea-xsp5V9xM.js.map +0 -1
  226. package/dist/admin-tile-grids-CzGpidd9.js.map +0 -1
  227. package/dist/admin-typed-confirm-dialog-NiEDwX_0.js.map +0 -1
  228. package/dist/admin-utils-wuPUD0uh.js.map +0 -1
  229. package/dist/admin-widget-viz-kHHVmDEx.js.map +0 -1
  230. package/dist/client-ctrbivyN.js.map +0 -1
  231. package/dist/create-card-BEILS1VB-DeyyfyFD.js.map +0 -1
  232. package/dist/create-card-display-Dv5pcpzc-BWB6vzo2.js.map +0 -1
  233. package/dist/create-copy-button-CAYmfugS-qNapojfj.js.map +0 -1
  234. package/dist/dist-CslWupfi.js.map +0 -1
  235. package/dist/hooks-KpTetx6F.js.map +0 -1
  236. package/dist/index-rGw83t5v-BE6naeQR.js.map +0 -1
@@ -1,36 +1,36 @@
1
- import { E as e, O as t, _ as n, c as r, p as i, r as a, s as o, w as s } from "./admin-utils-wuPUD0uh.js";
2
- import { t as c } from "./admin-button-DBzTD6By.js";
3
- import { t as l } from "./admin-input-JKrQIGfD.js";
4
- import { a as u } from "./admin-capabilities-CZdT1Pxe.js";
5
- import { d, i as f, o as p, r as m, s as h } from "./admin-format-BbiTCqUG.js";
6
- import { t as g } from "./admin-badge-DR_8AhdC.js";
7
- import { t as _ } from "./admin-status-badge-IL8ofZ_6.js";
8
- import { t as v } from "./admin-form-field-errors-hbUMIriS.js";
9
- import { a as y, i as ee, n as b, r as x, t as te } from "./admin-select-6Yuh5M1Q.js";
10
- import { a as S, n as C, o as w, r as T, s as ne, t as re } from "./admin-table-D-GdGM1m.js";
11
- import { a as E, i as ie, n as D, o as O, r as ae, s as k, t as A } from "./admin-dialog-Dn2FRJu4.js";
12
- import { t as j } from "./admin-label-CHWsVIZC.js";
13
- import { i as oe, r as se } from "./admin-dialog-width-CC7QHT1p.js";
14
- import { n as ce } from "./admin-price-format-CqOmHrIn.js";
15
- import { a as M, o as N, r as le, t as ue } from "./admin-card-mZl4-s5d.js";
16
- import { t as P } from "./admin-fact-card-DKvBnUXB.js";
17
- import { t as F } from "./admin-tile-grids-CzGpidd9.js";
18
- import { t as I } from "./admin-dunning-COaHzrmN.js";
19
- import { t as de } from "./admin-missing-record-BPFs3MmO.js";
20
- import { t as L } from "./admin-typed-confirm-dialog-NiEDwX_0.js";
1
+ import { E as e, O as t, _ as n, c as r, p as i, r as a, s as o, w as s } from "./admin-utils-CuwG3SAt.js";
2
+ import { t as c } from "./admin-tile-grids-Gc67MtA6.js";
3
+ import { t as l } from "./admin-fact-card-CTQyFmQY.js";
4
+ import { t as u } from "./admin-missing-record-CjIQEv9L.js";
5
+ import { t as d } from "./admin-form-field-errors-Cuhy38F1.js";
6
+ import { t as f } from "./admin-status-badge-BhHyBG8J.js";
7
+ import { t as p } from "./admin-typed-confirm-dialog-C1kHdYgH.js";
8
+ import { t as m } from "./admin-badge-3zABrSBc.js";
9
+ import { t as h } from "./admin-button-FRNl7_Yf.js";
10
+ import { a as g, o as _, r as v, t as y } from "./admin-card-YKPGmx5w.js";
11
+ import { a as b, i as x, n as S, o as ee, r as te, s as C, t as ne } from "./admin-dialog-BVx92baz.js";
12
+ import { t as w } from "./admin-input-DhYEd7Yp.js";
13
+ import { t as T } from "./admin-label-DwUfUVm6.js";
14
+ import { a as re, i as ie, n as ae, r as E, t as oe } from "./admin-select-CCliJ9d-.js";
15
+ import { a as D, n as se, o as ce, r as O, s as k, t as A } from "./admin-table-Ce6xyiwJ.js";
16
+ import { i as le, r as ue } from "./admin-dialog-width-C_WFpow0.js";
17
+ import { d as j, i as M, o as N, r as P, s as F } from "./admin-format-D9Ablh0P.js";
18
+ import { n as I } from "./admin-price-format-BrXm8J1w.js";
19
+ import { t as de } from "./admin-dunning-D8lAP7OA.js";
20
+ import { a as L } from "./admin-capabilities-uSi2Pb2h.js";
21
21
  import * as R from "react";
22
22
  import { useMutation as z, useQuery as B, useQueryClient as V } from "@tanstack/react-query";
23
23
  import { Fragment as H, jsx as U, jsxs as W } from "react/jsx-runtime";
24
24
  import { HugeiconsIcon as G } from "@hugeicons/react";
25
25
  import { ArrowLeft01Icon as K } from "@hugeicons/core-free-icons";
26
26
  import { useForm as q, useStore as J } from "@tanstack/react-form";
27
- //#region src/admin/pages/subscriptions/subscription-change-options.ts
27
+ // src/admin/pages/subscriptions/subscription-change-options.ts
28
28
  function fe(e) {
29
- let t = e.price, n = `${h(t.unit_amount, t.currency)}${t.quantity ? " per seat" : ""}`;
29
+ let t = e.price, n = `${F(t.unit_amount, t.currency)}${t.quantity ? " per seat" : ""}`;
30
30
  return [
31
31
  e.product.display_name,
32
32
  e.direction,
33
- `${n} ${ce(t)}`,
33
+ `${n} ${I(t)}`,
34
34
  t.key
35
35
  ].join(" · ");
36
36
  }
@@ -49,66 +49,65 @@ function me({ product: e, price: t, scheduledChange: n, targets: r }) {
49
49
  product: t.product
50
50
  })));
51
51
  }
52
- //#endregion
53
- //#region src/admin/pages/subscriptions/change-subscription-dialog.tsx
52
+ // src/admin/pages/subscriptions/change-subscription-dialog.tsx
54
53
  function Y(e) {
55
54
  let { selectedMerchant: t } = i();
56
55
  return /* @__PURE__ */ U(he, { ...e }, `${t() ?? ""}:${e.subscriptionId}`);
57
56
  }
58
- function he({ subscriptionId: r, customerId: a, product: o, price: u, quantity: d, scheduledChange: f }) {
59
- let { toast: m, toastApiError: _, adminMutations: v, adminQueries: S } = i(), { id: C, text: w } = t(), [T, ne] = R.useState(!1), [re, se] = R.useState(""), [ce, M] = R.useState(""), [N, le] = R.useState(""), [ue, P] = R.useState(""), F = R.useRef(/* @__PURE__ */ new Map()), I = R.useRef(0);
57
+ function he({ subscriptionId: r, customerId: a, product: o, price: c, quantity: l, scheduledChange: u }) {
58
+ let { toast: d, toastApiError: f, adminMutations: p, adminQueries: g } = i(), { id: _, text: v } = t(), [y, D] = R.useState(!1), [se, ce] = R.useState(""), [O, k] = R.useState(""), [A, ue] = R.useState(""), [j, M] = R.useState(""), P = R.useRef(/* @__PURE__ */ new Map()), I = R.useRef(0);
60
59
  R.useEffect(() => () => {
61
60
  I.current++;
62
61
  }, []);
63
- let de = V(), L = z(v.previewSubscriptionChange(r)), H = z(v.changeSubscription(de, r, a)), G = B(S.subscriptionChangeOptions(r)), K = me({
62
+ let de = V(), L = z(p.previewSubscriptionChange(r)), H = z(p.changeSubscription(de, r, a)), G = B(g.subscriptionChangeOptions(r)), K = me({
64
63
  product: o,
65
- price: u,
66
- scheduledChange: f,
64
+ price: c,
65
+ scheduledChange: u,
67
66
  targets: G.data?.data ?? []
68
- }), q = K.find((e) => e.price.id === re), J = q?.price.quantity, Y = Number(ce), he = !J || Number.isInteger(Y) && Y >= J.min && Y <= J.max, X = q && he ? {
67
+ }), q = K.find((e) => e.price.id === se), J = q?.price.quantity, Y = Number(O), he = !J || Number.isInteger(Y) && Y >= J.min && Y <= J.max, X = q && he ? {
69
68
  price_id: q.price.id,
70
69
  ...J ? { quantity: Y } : {}
71
- } : void 0, ge = q?.direction === "current" && !f && (!J || Y === d), Z = X ? JSON.stringify(X) : "", Q = Z && ue === Z ? L.data : void 0, _e = G.isPending ? w("Loading plans…") : G.isError ? n(G.error).text : K.length === 0 ? w("No eligible recurring plans share this tier group and currency.") : void 0, $ = (e) => {
72
- I.current++, ne(e);
70
+ } : void 0, ge = q?.direction === "current" && !u && (!J || Y === l), Z = X ? JSON.stringify(X) : "", Q = Z && j === Z ? L.data : void 0, _e = G.isPending ? v("Loading plans…") : G.isError ? n(G.error).text : K.length === 0 ? v("No eligible recurring plans share this tier group and currency.") : void 0, $ = (e) => {
71
+ I.current++, D(e);
73
72
  }, ve = (e) => {
74
73
  I.current++;
75
74
  let t = K.find((t) => t.price.id === e)?.price;
76
- se(e ?? ""), M(String(t ? pe(t, d) ?? "" : "")), P(""), L.reset(), H.reset();
75
+ ce(e ?? ""), k(String(t ? pe(t, l) ?? "" : "")), M(""), L.reset(), H.reset();
77
76
  }, ye = (e) => {
78
- I.current++, M(e), P(""), L.reset(), H.reset();
77
+ I.current++, k(e), M(""), L.reset(), H.reset();
79
78
  }, be = L.error instanceof Error ? L.error.message : "", xe = H.error instanceof Error ? H.error.message : "", Se = H.data?.message, Ce = H.data?.next_action?.url ?? void 0;
80
- return /* @__PURE__ */ W(A, {
81
- open: T,
79
+ return /* @__PURE__ */ W(ne, {
80
+ open: y,
82
81
  onOpenChange: $,
83
- children: [/* @__PURE__ */ U(k, { render: /* @__PURE__ */ U(c, {
82
+ children: [/* @__PURE__ */ U(C, { render: /* @__PURE__ */ U(h, {
84
83
  variant: "outline",
85
84
  size: "sm",
86
85
  disabled: !!_e && !H.variables,
87
86
  title: _e,
88
87
  children: /* @__PURE__ */ U(e, { id: "Change subscription" })
89
- }) }), /* @__PURE__ */ W(D, {
90
- className: oe,
88
+ }) }), /* @__PURE__ */ W(S, {
89
+ className: le,
91
90
  children: [
92
- /* @__PURE__ */ W(E, { children: [/* @__PURE__ */ U(O, { children: /* @__PURE__ */ U(e, { id: "Change subscription" }) }), /* @__PURE__ */ U(ae, { children: /* @__PURE__ */ U(e, { id: "Schedule the customer's plan or seats for the next renewal. No card is charged now. Choosing the current plan and seats clears a pending change. The customer is told." }) })] }),
91
+ /* @__PURE__ */ W(b, { children: [/* @__PURE__ */ U(ee, { children: /* @__PURE__ */ U(e, { id: "Change subscription" }) }), /* @__PURE__ */ U(te, { children: /* @__PURE__ */ U(e, { id: "Schedule the customer's plan or seats for the next renewal. No card is charged now. Choosing the current plan and seats clears a pending change. The customer is told." }) })] }),
93
92
  /* @__PURE__ */ W("div", {
94
93
  className: "grid gap-5",
95
94
  children: [
96
95
  /* @__PURE__ */ W("div", {
97
96
  className: "grid gap-1.5",
98
97
  children: [
99
- /* @__PURE__ */ U(j, {
100
- htmlFor: C("subscription-tier"),
98
+ /* @__PURE__ */ U(T, {
99
+ htmlFor: _("subscription-tier"),
101
100
  children: /* @__PURE__ */ U(e, { id: "New plan" })
102
101
  }),
103
- /* @__PURE__ */ W(te, {
104
- value: re,
102
+ /* @__PURE__ */ W(oe, {
103
+ value: se,
105
104
  onValueChange: ve,
106
- children: [/* @__PURE__ */ U(ee, {
107
- id: C("subscription-tier"),
105
+ children: [/* @__PURE__ */ U(ie, {
106
+ id: _("subscription-tier"),
108
107
  className: "w-full",
109
108
  disabled: G.isPending,
110
- children: /* @__PURE__ */ U(y, { placeholder: G.isPending ? "Loading plans…" : "Choose a plan" })
111
- }), /* @__PURE__ */ U(b, { children: K.map((e) => /* @__PURE__ */ U(x, {
109
+ children: /* @__PURE__ */ U(re, { placeholder: G.isPending ? "Loading plans…" : "Choose a plan" })
110
+ }), /* @__PURE__ */ U(ae, { children: K.map((e) => /* @__PURE__ */ U(E, {
112
111
  value: e.price.id,
113
112
  children: fe(e)
114
113
  }, e.price.id)) })]
@@ -127,17 +126,17 @@ function he({ subscriptionId: r, customerId: a, product: o, price: u, quantity:
127
126
  J && /* @__PURE__ */ W("div", {
128
127
  className: "grid gap-1.5",
129
128
  children: [
130
- /* @__PURE__ */ U(j, {
131
- htmlFor: C("subscription-seats"),
129
+ /* @__PURE__ */ U(T, {
130
+ htmlFor: _("subscription-seats"),
132
131
  children: /* @__PURE__ */ U(e, { id: "Seats" })
133
132
  }),
134
- /* @__PURE__ */ U(l, {
135
- id: C("subscription-seats"),
133
+ /* @__PURE__ */ U(w, {
134
+ id: _("subscription-seats"),
136
135
  type: "number",
137
136
  inputMode: "numeric",
138
137
  min: J.min,
139
138
  max: J.max,
140
- value: ce,
139
+ value: O,
141
140
  onChange: (e) => ye(e.target.value)
142
141
  }),
143
142
  /* @__PURE__ */ W("p", {
@@ -154,16 +153,16 @@ function he({ subscriptionId: r, customerId: a, product: o, price: u, quantity:
154
153
  /* @__PURE__ */ W("div", {
155
154
  className: "grid gap-1.5",
156
155
  children: [
157
- /* @__PURE__ */ U(j, {
158
- htmlFor: C("subscription-change-reason"),
156
+ /* @__PURE__ */ U(T, {
157
+ htmlFor: _("subscription-change-reason"),
159
158
  children: /* @__PURE__ */ U(e, { id: "Reason" })
160
159
  }),
161
- /* @__PURE__ */ U(l, {
162
- id: C("subscription-change-reason"),
163
- value: N,
160
+ /* @__PURE__ */ U(w, {
161
+ id: _("subscription-change-reason"),
162
+ value: A,
164
163
  maxLength: 500,
165
- placeholder: w("What the customer asked for"),
166
- onChange: (e) => le(e.target.value)
164
+ placeholder: v("What the customer asked for"),
165
+ onChange: (e) => ue(e.target.value)
167
166
  }),
168
167
  /* @__PURE__ */ U("p", {
169
168
  className: "text-xs text-muted-foreground",
@@ -180,7 +179,7 @@ function he({ subscriptionId: r, customerId: a, product: o, price: u, quantity:
180
179
  children: [/* @__PURE__ */ U("span", {
181
180
  className: "text-sm font-medium",
182
181
  children: /* @__PURE__ */ U(e, { id: "Review" })
183
- }), /* @__PURE__ */ U(g, {
182
+ }), /* @__PURE__ */ U(m, {
184
183
  variant: "secondary",
185
184
  children: Q.effective === "now" ? "Immediate" : "At renewal"
186
185
  })]
@@ -205,7 +204,7 @@ function he({ subscriptionId: r, customerId: a, product: o, price: u, quantity:
205
204
  children: /* @__PURE__ */ U(e, { id: "Due now" })
206
205
  }), /* @__PURE__ */ U("dd", {
207
206
  className: "font-medium tabular-nums",
208
- children: h(Q.amount_due_now, Q.currency)
207
+ children: F(Q.amount_due_now, Q.currency)
209
208
  })]
210
209
  }),
211
210
  /* @__PURE__ */ W("div", {
@@ -215,7 +214,7 @@ function he({ subscriptionId: r, customerId: a, product: o, price: u, quantity:
215
214
  children: /* @__PURE__ */ U(e, { id: "Next charge" })
216
215
  }), /* @__PURE__ */ U("dd", {
217
216
  className: "font-medium tabular-nums",
218
- children: h(Q.next_charge_amount, Q.currency)
217
+ children: F(Q.next_charge_amount, Q.currency)
219
218
  })]
220
219
  }),
221
220
  /* @__PURE__ */ W("div", {
@@ -225,7 +224,7 @@ function he({ subscriptionId: r, customerId: a, product: o, price: u, quantity:
225
224
  children: /* @__PURE__ */ U(e, { id: "Effective" })
226
225
  }), /* @__PURE__ */ U("dd", {
227
226
  className: "font-medium",
228
- children: Q.effective === "now" ? "Immediately" : p(Q.next_charge_date)
227
+ children: Q.effective === "now" ? "Immediately" : N(Q.next_charge_date)
229
228
  })]
230
229
  }),
231
230
  /* @__PURE__ */ W("div", {
@@ -235,7 +234,7 @@ function he({ subscriptionId: r, customerId: a, product: o, price: u, quantity:
235
234
  children: /* @__PURE__ */ U(e, { id: "Next billing date" })
236
235
  }), /* @__PURE__ */ U("dd", {
237
236
  className: "font-medium tabular-nums",
238
- children: p(Q.next_charge_date)
237
+ children: N(Q.next_charge_date)
239
238
  })]
240
239
  })
241
240
  ]
@@ -264,37 +263,37 @@ function he({ subscriptionId: r, customerId: a, product: o, price: u, quantity:
264
263
  })
265
264
  ]
266
265
  }),
267
- /* @__PURE__ */ W(ie, { children: [/* @__PURE__ */ U(c, {
266
+ /* @__PURE__ */ W(x, { children: [/* @__PURE__ */ U(h, {
268
267
  type: "button",
269
268
  variant: "outline",
270
269
  onClick: () => $(!1),
271
270
  children: /* @__PURE__ */ U(e, { id: "Cancel" })
272
- }), Q ? /* @__PURE__ */ U(c, {
271
+ }), Q ? /* @__PURE__ */ U(h, {
273
272
  type: "button",
274
- disabled: H.isPending || !N.trim() || !!H.data && H.data?.status !== "processing",
273
+ disabled: H.isPending || !A.trim() || !!H.data && H.data?.status !== "processing",
275
274
  onClick: async () => {
276
275
  if (!X) return;
277
- let e = I.current, t = F.current.get(Z) ?? crypto.randomUUID();
278
- F.current.set(Z, t);
276
+ let e = I.current, t = P.current.get(Z) ?? crypto.randomUUID();
277
+ P.current.set(Z, t);
279
278
  let n = () => {
280
- F.current.get(Z) === t && F.current.delete(Z);
279
+ P.current.get(Z) === t && P.current.delete(Z);
281
280
  };
282
281
  try {
283
282
  let r = await H.mutateAsync({
284
283
  change: {
285
284
  ...X,
286
- reason: N.trim()
285
+ reason: A.trim()
287
286
  },
288
287
  idempotencyKey: t
289
288
  });
290
289
  if ((r.status === "succeeded" || r.status === "blocked") && n(), I.current !== e) return;
291
- r.status === "succeeded" && (m.success(r.effective === "now" ? "Subscription changed" : "Change scheduled for the next renewal"), $(!1), se(""), M(""), le(""), P(""), L.reset(), H.reset()), r.status === "processing" && m.info("The provider is still confirming this change. Check again to read the result.");
290
+ r.status === "succeeded" && (d.success(r.effective === "now" ? "Subscription changed" : "Change scheduled for the next renewal"), $(!1), ce(""), k(""), ue(""), M(""), L.reset(), H.reset()), r.status === "processing" && d.info("The provider is still confirming this change. Check again to read the result.");
292
291
  } catch (t) {
293
- t instanceof s && (t.status === 402 || t.status === 409 && (t.code === "subscription_change_refused" || t.code === "subscription_change_idempotency_conflict")) && n(), I.current === e && _(t, "Change subscription");
292
+ t instanceof s && (t.status === 402 || t.status === 409 && (t.code === "subscription_change_refused" || t.code === "subscription_change_idempotency_conflict")) && n(), I.current === e && f(t, "Change subscription");
294
293
  }
295
294
  },
296
295
  children: H.isPending ? "Applying…" : H.data ? H.data.status === "processing" ? "Check result" : H.data.status === "blocked" ? "Change blocked" : "Action required" : "Confirm change"
297
- }) : /* @__PURE__ */ U(c, {
296
+ }) : /* @__PURE__ */ U(h, {
298
297
  type: "button",
299
298
  disabled: !X || ge || L.isPending,
300
299
  onClick: async () => {
@@ -302,9 +301,9 @@ function he({ subscriptionId: r, customerId: a, product: o, price: u, quantity:
302
301
  let e = I.current;
303
302
  try {
304
303
  if (await L.mutateAsync(X), I.current !== e) return;
305
- P(Z);
304
+ M(Z);
306
305
  } catch (t) {
307
- I.current === e && _(t, "Preview subscription change");
306
+ I.current === e && f(t, "Preview subscription change");
308
307
  }
309
308
  },
310
309
  children: L.isPending ? "Reviewing…" : "Review change"
@@ -313,32 +312,31 @@ function he({ subscriptionId: r, customerId: a, product: o, price: u, quantity:
313
312
  })]
314
313
  });
315
314
  }
316
- //#endregion
317
- //#region src/admin/pages/subscriptions/detail.tsx
315
+ // src/admin/pages/subscriptions/detail.tsx
318
316
  var X = (e) => new Date(e).toLocaleDateString(void 0, { dateStyle: "medium" });
319
317
  function ge() {
320
- let { text: n } = t(), { adminQueries: s } = i(), l = u(), { id: f = "" } = r(), v = o(), { data: y, isPending: ee, error: b } = B(s.subscription(f)), { data: x } = B(s.payments({ subscription_id: f }, 20)), te = x?.data ?? [], { data: E } = B(s.customer(y?.customer_id ?? ""));
321
- if (ee) return /* @__PURE__ */ U("p", {
318
+ let { text: n } = t(), { adminQueries: s } = i(), d = L(), { id: p = "" } = r(), b = o(), { data: x, isPending: S, error: ee } = B(s.subscription(p)), { data: te } = B(s.payments({ subscription_id: p }, 20)), C = te?.data ?? [], { data: ne } = B(s.customer(x?.customer_id ?? ""));
319
+ if (S) return /* @__PURE__ */ U("p", {
322
320
  className: "text-sm text-muted-foreground",
323
321
  children: /* @__PURE__ */ U(e, { id: "Loading…" })
324
322
  });
325
- if (!y) return /* @__PURE__ */ U(de, {
323
+ if (!x) return /* @__PURE__ */ U(u, {
326
324
  title: "Subscription not found",
327
- error: b,
325
+ error: ee,
328
326
  back: "/subscriptions",
329
327
  backLabel: "Subscriptions"
330
328
  });
331
- let ie = y.status === "active" || y.status === "past_due" || y.status === "awaiting_method" || y.status === "unverified", D = y.status === "active" || y.status === "past_due", O = D || y.status === "awaiting_method", ae = y.collection_policy === "engine" ? (y.rail === "nmi" || y.rail === "stripe") && (O || y.resumable) : y.rail === "nmi" && O, k = E ? m(E) : void 0, A = y.product?.display_name;
329
+ let w = x.status === "active" || x.status === "past_due" || x.status === "awaiting_method" || x.status === "unverified", T = x.status === "active" || x.status === "past_due", re = T || x.status === "awaiting_method", ie = x.collection_policy === "engine" ? (x.rail === "nmi" || x.rail === "stripe") && (re || x.resumable) : x.rail === "nmi" && re, ae = ne ? P(ne) : void 0, E = x.product?.display_name;
332
330
  return /* @__PURE__ */ W("div", {
333
331
  className: "flex flex-col gap-4",
334
332
  children: [
335
333
  /* @__PURE__ */ W("div", {
336
334
  className: "flex flex-wrap items-center gap-3",
337
335
  children: [
338
- /* @__PURE__ */ U(c, {
336
+ /* @__PURE__ */ U(h, {
339
337
  variant: "ghost",
340
338
  size: "icon",
341
- onClick: () => v(-1),
339
+ onClick: () => b(-1),
342
340
  "aria-label": n("Back"),
343
341
  children: /* @__PURE__ */ U(G, {
344
342
  icon: K,
@@ -349,168 +347,168 @@ function ge() {
349
347
  className: "min-w-0",
350
348
  children: [/* @__PURE__ */ W("h1", {
351
349
  className: "flex flex-wrap items-center gap-2 text-2xl font-semibold tracking-tight",
352
- children: [A ?? n("Subscription"), /* @__PURE__ */ U(_, { status: y.status })]
350
+ children: [E ?? n("Subscription"), /* @__PURE__ */ U(f, { status: x.status })]
353
351
  }), /* @__PURE__ */ W("p", {
354
352
  className: "text-xs [overflow-wrap:anywhere] text-muted-foreground",
355
353
  children: [
356
- y.id,
354
+ x.id,
357
355
  " · ",
358
- y.rail,
359
- y.rail_subscription_id ? ` · ${y.rail_subscription_id}` : ""
356
+ x.rail,
357
+ x.rail_subscription_id ? ` · ${x.rail_subscription_id}` : ""
360
358
  ]
361
359
  })]
362
360
  }),
363
361
  /* @__PURE__ */ W("div", {
364
362
  className: "flex flex-wrap gap-2 sm:ml-auto",
365
363
  children: [
366
- l && y.resumable && /* @__PURE__ */ U(_e, {
367
- id: y.id,
368
- customerId: y.customer_id
364
+ d && x.resumable && /* @__PURE__ */ U(_e, {
365
+ id: x.id,
366
+ customerId: x.customer_id
369
367
  }),
370
- l && D && /* @__PURE__ */ U(Y, {
371
- subscriptionId: y.id,
372
- customerId: y.customer_id,
373
- product: y.product,
374
- price: y.price,
375
- quantity: y.quantity,
376
- scheduledChange: y.scheduled_change
368
+ d && T && /* @__PURE__ */ U(Y, {
369
+ subscriptionId: x.id,
370
+ customerId: x.customer_id,
371
+ product: x.product,
372
+ price: x.price,
373
+ quantity: x.quantity,
374
+ scheduledChange: x.scheduled_change
377
375
  }),
378
- l && ae && /* @__PURE__ */ U(ve, {
379
- subscriptionId: y.id,
380
- customerId: y.customer_id,
381
- rail: y.rail
376
+ d && ie && /* @__PURE__ */ U(ve, {
377
+ subscriptionId: x.id,
378
+ customerId: x.customer_id,
379
+ rail: x.rail
382
380
  }),
383
- l && ie && /* @__PURE__ */ U(Q, {
384
- id: y.id,
385
- customerId: y.customer_id,
386
- customer: k,
387
- plan: A,
388
- periodEnd: y.current_period_ends_at
381
+ d && w && /* @__PURE__ */ U(Q, {
382
+ id: x.id,
383
+ customerId: x.customer_id,
384
+ customer: ae,
385
+ plan: E,
386
+ periodEnd: x.current_period_ends_at
389
387
  })
390
388
  ]
391
389
  })
392
390
  ]
393
391
  }),
394
392
  /* @__PURE__ */ W("div", {
395
- className: F,
393
+ className: c,
396
394
  children: [
397
- /* @__PURE__ */ U(P, {
395
+ /* @__PURE__ */ U(l, {
398
396
  label: n("Customer"),
399
- children: y.customer_id ? /* @__PURE__ */ U(a, {
397
+ children: x.customer_id ? /* @__PURE__ */ U(a, {
400
398
  className: "text-xs underline-offset-2 hover:underline",
401
- to: `/customers/${y.customer_id}`,
402
- children: k ?? d(y.customer_id, 13)
399
+ to: `/customers/${x.customer_id}`,
400
+ children: ae ?? j(x.customer_id, 13)
403
401
  }) : "—"
404
402
  }),
405
- /* @__PURE__ */ U(P, {
403
+ /* @__PURE__ */ U(l, {
406
404
  label: n("Started"),
407
- children: p(y.started_at)
405
+ children: N(x.started_at)
408
406
  }),
409
- /* @__PURE__ */ W(P, {
407
+ /* @__PURE__ */ W(l, {
410
408
  label: n("Current period"),
411
409
  children: [
412
- p(y.current_period_starts_at),
410
+ N(x.current_period_starts_at),
413
411
  " →",
414
412
  " ",
415
- p(y.current_period_ends_at)
413
+ N(x.current_period_ends_at)
416
414
  ]
417
415
  }),
418
- /* @__PURE__ */ U(P, {
416
+ /* @__PURE__ */ U(l, {
419
417
  label: n("Price"),
420
418
  children: /* @__PURE__ */ W("div", {
421
419
  className: "flex flex-col gap-1",
422
420
  children: [
423
421
  /* @__PURE__ */ W("span", {
424
422
  className: "flex items-center gap-2",
425
- children: [y.price?.unit_amount !== void 0 && y.price?.currency ? /* @__PURE__ */ U(a, {
423
+ children: [x.price?.unit_amount !== void 0 && x.price?.currency ? /* @__PURE__ */ U(a, {
426
424
  className: "underline-offset-2 hover:underline",
427
- to: `/catalog/prices/${encodeURIComponent(y.price_id)}`,
428
- children: h(y.price.unit_amount, y.price.currency)
425
+ to: `/catalog/prices/${encodeURIComponent(x.price_id)}`,
426
+ children: F(x.price.unit_amount, x.price.currency)
429
427
  }) : /* @__PURE__ */ U(a, {
430
428
  className: "text-xs underline-offset-2 hover:underline",
431
- to: `/catalog/prices/${encodeURIComponent(y.price_id)}`,
432
- children: d(y.price_id ?? "—", 13)
433
- }), y.price?.archived && /* @__PURE__ */ U(g, {
429
+ to: `/catalog/prices/${encodeURIComponent(x.price_id)}`,
430
+ children: j(x.price_id ?? "—", 13)
431
+ }), x.price?.archived && /* @__PURE__ */ U(m, {
434
432
  variant: "secondary",
435
433
  title: n("Pinned to an archived (prior) version"),
436
434
  children: /* @__PURE__ */ U(e, { id: "prior version" })
437
435
  })]
438
436
  }),
439
- y.price?.key && /* @__PURE__ */ U("span", {
437
+ x.price?.key && /* @__PURE__ */ U("span", {
440
438
  className: "text-xs text-muted-foreground",
441
- children: y.price.key
439
+ children: x.price.key
442
440
  }),
443
- y.scheduled_change && /* @__PURE__ */ U(ye, { change: y.scheduled_change })
441
+ x.scheduled_change && /* @__PURE__ */ U(ye, { change: x.scheduled_change })
444
442
  ]
445
443
  })
446
444
  }),
447
- y.quantity !== null && /* @__PURE__ */ W(P, {
445
+ x.quantity !== null && /* @__PURE__ */ W(l, {
448
446
  label: n("Seats"),
449
- children: [y.quantity, y.scheduled_change?.quantity != null && ` → ${y.scheduled_change.quantity} at renewal`]
447
+ children: [x.quantity, x.scheduled_change?.quantity != null && ` → ${x.scheduled_change.quantity} at renewal`]
450
448
  }),
451
- /* @__PURE__ */ U(P, {
449
+ /* @__PURE__ */ U(l, {
452
450
  label: n("Dunning"),
453
- children: y.dunning ? I(y.dunning) : "—"
451
+ children: x.dunning ? de(x.dunning) : "—"
454
452
  }),
455
- /* @__PURE__ */ U(P, {
456
- label: y.dunning?.waiting_for_new_card ? "Card deadline" : "Final retry",
457
- children: p(y.dunning?.final_retry_at)
453
+ /* @__PURE__ */ U(l, {
454
+ label: x.dunning?.waiting_for_new_card ? "Card deadline" : "Final retry",
455
+ children: N(x.dunning?.final_retry_at)
458
456
  }),
459
- /* @__PURE__ */ U(P, {
457
+ /* @__PURE__ */ U(l, {
460
458
  label: n("Last decline"),
461
- children: y.dunning?.last_failure_reason ?? "—"
459
+ children: x.dunning?.last_failure_reason ?? "—"
462
460
  }),
463
- /* @__PURE__ */ U(P, {
461
+ /* @__PURE__ */ U(l, {
464
462
  label: n("Canceled"),
465
- children: y.canceled_at ? /* @__PURE__ */ W(H, { children: [p(y.canceled_at), y.cancel_type && /* @__PURE__ */ U("span", {
463
+ children: x.canceled_at ? /* @__PURE__ */ W(H, { children: [N(x.canceled_at), x.cancel_type && /* @__PURE__ */ U("span", {
466
464
  className: "block text-xs text-muted-foreground",
467
- children: n(Z[y.cancel_type] ?? y.cancel_type)
465
+ children: n(Z[x.cancel_type] ?? x.cancel_type)
468
466
  })] }) : "—"
469
467
  })
470
468
  ]
471
469
  }),
472
- /* @__PURE__ */ W(ue, { children: [/* @__PURE__ */ U(M, { children: /* @__PURE__ */ U(N, {
470
+ /* @__PURE__ */ W(y, { children: [/* @__PURE__ */ U(g, { children: /* @__PURE__ */ U(_, {
473
471
  className: "text-sm",
474
472
  children: /* @__PURE__ */ U(e, { id: "Payments" })
475
- }) }), /* @__PURE__ */ U(le, { children: te.length ? /* @__PURE__ */ W(re, { children: [/* @__PURE__ */ U(w, { children: /* @__PURE__ */ W(ne, {
473
+ }) }), /* @__PURE__ */ U(v, { children: C.length ? /* @__PURE__ */ W(A, { children: [/* @__PURE__ */ U(ce, { children: /* @__PURE__ */ W(k, {
476
474
  className: "hover:bg-transparent",
477
475
  children: [
478
- /* @__PURE__ */ U(S, {
476
+ /* @__PURE__ */ U(D, {
479
477
  className: "text-muted-foreground",
480
478
  children: /* @__PURE__ */ U(e, { id: "Payment" })
481
479
  }),
482
- /* @__PURE__ */ U(S, {
480
+ /* @__PURE__ */ U(D, {
483
481
  className: "text-muted-foreground",
484
482
  children: /* @__PURE__ */ U(e, { id: "Status" })
485
483
  }),
486
- /* @__PURE__ */ U(S, {
484
+ /* @__PURE__ */ U(D, {
487
485
  className: "text-muted-foreground @max-[36rem]/page:hidden",
488
486
  children: /* @__PURE__ */ U(e, { id: "Kind" })
489
487
  }),
490
- /* @__PURE__ */ U(S, {
488
+ /* @__PURE__ */ U(D, {
491
489
  className: "text-muted-foreground",
492
490
  children: /* @__PURE__ */ U(e, { id: "Amount" })
493
491
  }),
494
- /* @__PURE__ */ U(S, {
492
+ /* @__PURE__ */ U(D, {
495
493
  className: "text-muted-foreground @max-[36rem]/page:hidden",
496
494
  children: /* @__PURE__ */ U(e, { id: "Created" })
497
495
  })
498
496
  ]
499
- }) }), /* @__PURE__ */ U(C, { children: te.map((e) => /* @__PURE__ */ W(ne, { children: [
500
- /* @__PURE__ */ U(T, { children: /* @__PURE__ */ U(a, {
497
+ }) }), /* @__PURE__ */ U(se, { children: C.map((e) => /* @__PURE__ */ W(k, { children: [
498
+ /* @__PURE__ */ U(O, { children: /* @__PURE__ */ U(a, {
501
499
  className: "text-xs underline-offset-2 hover:underline",
502
500
  to: `/payments/${e.id}`,
503
- children: d(e.id, 13)
501
+ children: j(e.id, 13)
504
502
  }) }),
505
- /* @__PURE__ */ U(T, { children: /* @__PURE__ */ U(_, { status: e.status }) }),
506
- /* @__PURE__ */ U(T, {
503
+ /* @__PURE__ */ U(O, { children: /* @__PURE__ */ U(f, { status: e.status }) }),
504
+ /* @__PURE__ */ U(O, {
507
505
  className: "@max-[36rem]/page:hidden",
508
506
  children: e.kind
509
507
  }),
510
- /* @__PURE__ */ U(T, { children: h(e.amount, e.currency) }),
511
- /* @__PURE__ */ U(T, {
508
+ /* @__PURE__ */ U(O, { children: F(e.amount, e.currency) }),
509
+ /* @__PURE__ */ U(O, {
512
510
  className: "@max-[36rem]/page:hidden",
513
- children: p(e.created_at)
511
+ children: N(e.created_at)
514
512
  })
515
513
  ] }, e.id)) })] }) : /* @__PURE__ */ U("p", {
516
514
  className: "text-sm text-muted-foreground",
@@ -527,29 +525,29 @@ var Z = {
527
525
  upgrade: "Replaced by an upgrade"
528
526
  };
529
527
  function Q({ id: n, customerId: r, customer: a, plan: o, periodEnd: s }) {
530
- let { toast: u, toastApiError: d, adminMutations: f } = i(), { text: p, id: m } = t(), [h, g] = R.useState(!1), _ = V(), v = z(f.cancelSubscription(_, n, r)), y = q({ defaultValues: {
528
+ let { toast: c, toastApiError: l, adminMutations: u } = i(), { text: d, id: f } = t(), [m, g] = R.useState(!1), _ = V(), v = z(u.cancelSubscription(_, n, r)), y = q({ defaultValues: {
531
529
  reason: "",
532
530
  revokeAccess: !1
533
- } }), ee = J(y.store, (e) => e.values.revokeAccess), b = a ?? p("The customer"), x = o ?? p("their access");
534
- return /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(c, {
531
+ } }), b = J(y.store, (e) => e.values.revokeAccess), x = a ?? d("The customer"), S = o ?? d("their access");
532
+ return /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(h, {
535
533
  variant: "destructive",
536
534
  size: "sm",
537
535
  onClick: () => g(!0),
538
536
  children: /* @__PURE__ */ U(e, { id: "Cancel membership" })
539
- }), /* @__PURE__ */ U(L, {
540
- open: h,
537
+ }), /* @__PURE__ */ U(p, {
538
+ open: m,
541
539
  onOpenChange: (e) => {
542
540
  g(e), e || (y.reset(), v.reset());
543
541
  },
544
- title: p("Cancel this membership?"),
545
- description: `${p("Renewal stops now and can't be restarted from here.")} ${ee ? `${b} ${p("loses")} ${x} ${p("now. No refund is made.")}` : `${b} ${p("keeps")} ${x} ${s ? `${p("until")} ${X(s)}.` : p("until the current period ends.")}`}`,
542
+ title: d("Cancel this membership?"),
543
+ description: `${d("Renewal stops now and can't be restarted from here.")} ${b ? `${x} ${d("loses")} ${S} ${d("now. No refund is made.")}` : `${x} ${d("keeps")} ${S} ${s ? `${d("until")} ${X(s)}.` : d("until the current period ends.")}`}`,
546
544
  confirmationWord: "CANCEL",
547
- actionLabel: p("Cancel membership"),
545
+ actionLabel: d("Cancel membership"),
548
546
  onConfirm: async () => {
549
547
  try {
550
- await v.mutateAsync(y.state.values), u.success("Subscription canceled");
548
+ await v.mutateAsync(y.state.values), c.success("Subscription canceled");
551
549
  } catch (e) {
552
- throw d(e, "Cancel subscription"), e;
550
+ throw l(e, "Cancel subscription"), e;
553
551
  }
554
552
  },
555
553
  children: /* @__PURE__ */ W("div", {
@@ -558,20 +556,20 @@ function Q({ id: n, customerId: r, customer: a, plan: o, periodEnd: s }) {
558
556
  name: "reason",
559
557
  children: (t) => /* @__PURE__ */ W("div", {
560
558
  className: "grid gap-1.5",
561
- children: [/* @__PURE__ */ U(j, {
562
- htmlFor: m("cancel-reason"),
559
+ children: [/* @__PURE__ */ U(T, {
560
+ htmlFor: f("cancel-reason"),
563
561
  children: /* @__PURE__ */ U(e, { id: "Reason" })
564
- }), /* @__PURE__ */ U(l, {
565
- id: m("cancel-reason"),
562
+ }), /* @__PURE__ */ U(w, {
563
+ id: f("cancel-reason"),
566
564
  value: t.state.value,
567
565
  onBlur: t.handleBlur,
568
566
  onChange: (e) => t.handleChange(e.target.value),
569
- placeholder: p("why is this being canceled?")
567
+ placeholder: d("why is this being canceled?")
570
568
  })]
571
569
  })
572
570
  }), /* @__PURE__ */ U(y.Field, {
573
571
  name: "revokeAccess",
574
- children: (t) => /* @__PURE__ */ W(j, {
572
+ children: (t) => /* @__PURE__ */ W(T, {
575
573
  className: "flex min-h-10 items-center gap-2 font-normal",
576
574
  children: [/* @__PURE__ */ U("input", {
577
575
  type: "checkbox",
@@ -586,7 +584,7 @@ function Q({ id: n, customerId: r, customer: a, plan: o, periodEnd: s }) {
586
584
  }
587
585
  function _e({ id: e, customerId: t }) {
588
586
  let { toast: n, toastApiError: r, adminMutations: a } = i(), o = V(), s = z(a.resumeSubscription(o, e, t));
589
- return /* @__PURE__ */ U(c, {
587
+ return /* @__PURE__ */ U(h, {
590
588
  variant: "outline",
591
589
  size: "sm",
592
590
  disabled: s.isPending,
@@ -602,7 +600,7 @@ function _e({ id: e, customerId: t }) {
602
600
  }
603
601
  var $ = "default";
604
602
  function ve({ subscriptionId: n, customerId: r, rail: a }) {
605
- let { toast: o, toastApiError: s, adminMutations: l, adminQueries: u } = i(), { id: d, text: p } = t(), [m, h] = R.useState(!1), g = V(), _ = z(l.changeSubscriptionPaymentMethod(g, n, r)), { data: S } = B(u.customerPaymentMethods(m ? r : void 0)), C = q({
603
+ let { toast: o, toastApiError: s, adminMutations: c, adminQueries: l } = i(), { id: u, text: f } = t(), [p, m] = R.useState(!1), g = V(), _ = z(c.changeSubscriptionPaymentMethod(g, n, r)), { data: v } = B(l.customerPaymentMethods(p ? r : void 0)), y = q({
606
604
  defaultValues: { paymentMethodId: "" },
607
605
  onSubmit: async ({ value: e }) => {
608
606
  try {
@@ -612,63 +610,63 @@ function ve({ subscriptionId: n, customerId: r, rail: a }) {
612
610
  }
613
611
  }
614
612
  }), w = (e) => {
615
- h(e), e || (C.reset(), _.reset());
613
+ m(e), e || (y.reset(), _.reset());
616
614
  };
617
- return /* @__PURE__ */ W(A, {
618
- open: m,
615
+ return /* @__PURE__ */ W(ne, {
616
+ open: p,
619
617
  onOpenChange: w,
620
- children: [/* @__PURE__ */ U(k, { render: /* @__PURE__ */ U(c, {
618
+ children: [/* @__PURE__ */ U(C, { render: /* @__PURE__ */ U(h, {
621
619
  variant: "outline",
622
620
  size: "sm",
623
621
  children: /* @__PURE__ */ U(e, { id: "Change payment method" })
624
- }) }), /* @__PURE__ */ W(D, {
625
- className: se,
626
- children: [/* @__PURE__ */ W(E, { children: [/* @__PURE__ */ U(O, { children: /* @__PURE__ */ U(e, { id: "Change payment method" }) }), /* @__PURE__ */ U(ae, { children: /* @__PURE__ */ U(e, { id: "Points future renewals of this subscription at another of the customer's stored cards (same rail), or back at their default card for its currency." }) })] }), /* @__PURE__ */ W("form", {
622
+ }) }), /* @__PURE__ */ W(S, {
623
+ className: ue,
624
+ children: [/* @__PURE__ */ W(b, { children: [/* @__PURE__ */ U(ee, { children: /* @__PURE__ */ U(e, { id: "Change payment method" }) }), /* @__PURE__ */ U(te, { children: /* @__PURE__ */ U(e, { id: "Points future renewals of this subscription at another of the customer's stored cards (same rail), or back at their default card for its currency." }) })] }), /* @__PURE__ */ W("form", {
627
625
  onSubmit: (e) => {
628
- e.preventDefault(), e.stopPropagation(), C.handleSubmit();
626
+ e.preventDefault(), e.stopPropagation(), y.handleSubmit();
629
627
  },
630
628
  className: "grid gap-4",
631
- children: [/* @__PURE__ */ U(C.Field, {
629
+ children: [/* @__PURE__ */ U(y.Field, {
632
630
  name: "paymentMethodId",
633
631
  validators: { onChange: ({ value: e }) => e ? void 0 : "Pick a stored payment method" },
634
632
  children: (t) => /* @__PURE__ */ W("div", {
635
633
  className: "grid gap-1.5",
636
634
  children: [
637
- /* @__PURE__ */ U(j, {
638
- htmlFor: d("subscription-payment-method"),
635
+ /* @__PURE__ */ U(T, {
636
+ htmlFor: u("subscription-payment-method"),
639
637
  children: /* @__PURE__ */ U(e, { id: "Payment method" })
640
638
  }),
641
- /* @__PURE__ */ W(te, {
639
+ /* @__PURE__ */ W(oe, {
642
640
  value: t.state.value,
643
641
  onValueChange: (e) => t.handleChange(e ?? ""),
644
- children: [/* @__PURE__ */ U(ee, {
642
+ children: [/* @__PURE__ */ U(ie, {
645
643
  className: "w-full",
646
- id: d("subscription-payment-method"),
644
+ id: u("subscription-payment-method"),
647
645
  "aria-invalid": t.state.meta.errors.length > 0,
648
- children: /* @__PURE__ */ U(y, { placeholder: p("Pick a stored payment method") })
649
- }), /* @__PURE__ */ W(b, { children: [/* @__PURE__ */ U(x, {
646
+ children: /* @__PURE__ */ U(re, { placeholder: f("Pick a stored payment method") })
647
+ }), /* @__PURE__ */ W(ae, { children: [/* @__PURE__ */ U(E, {
650
648
  value: $,
651
649
  children: /* @__PURE__ */ U(e, { id: "The customer's default card" })
652
- }), (S ?? []).filter((e) => e.rail === a).map((e) => /* @__PURE__ */ W(x, {
650
+ }), (v ?? []).filter((e) => e.rail === a).map((e) => /* @__PURE__ */ W(E, {
653
651
  value: e.id,
654
652
  children: [
655
- f(e.card),
653
+ M(e.card),
656
654
  " (",
657
655
  e.rail,
658
656
  ")"
659
657
  ]
660
658
  }, e.id))] })]
661
659
  }),
662
- /* @__PURE__ */ U(v, { errors: t.state.meta.errors })
660
+ /* @__PURE__ */ U(d, { errors: t.state.meta.errors })
663
661
  ]
664
662
  })
665
- }), /* @__PURE__ */ U(ie, { children: /* @__PURE__ */ U(C.Subscribe, {
663
+ }), /* @__PURE__ */ U(x, { children: /* @__PURE__ */ U(y.Subscribe, {
666
664
  selector: (e) => [
667
665
  e.values.paymentMethodId,
668
666
  e.canSubmit,
669
667
  e.isSubmitting
670
668
  ],
671
- children: ([e, t, n]) => /* @__PURE__ */ U(c, {
669
+ children: ([e, t, n]) => /* @__PURE__ */ U(h, {
672
670
  type: "submit",
673
671
  disabled: !e || !t || n,
674
672
  children: n ? "Updating…" : "Update"
@@ -680,20 +678,19 @@ function ve({ subscriptionId: n, customerId: r, rail: a }) {
680
678
  }
681
679
  function ye({ change: t }) {
682
680
  let { adminQueries: n } = i(), { data: r } = B(n.price(t.price_id));
683
- return /* @__PURE__ */ W(g, {
681
+ return /* @__PURE__ */ W(m, {
684
682
  className: "bg-held-surface text-held",
685
683
  children: [
686
684
  t.source === "migration" ? "migrates" : "changes",
687
685
  /* @__PURE__ */ U(e, { id: " to" }),
688
686
  " ",
689
- r ? h(r.unit_amount, r.currency) : d(t.price_id, 9),
687
+ r ? F(r.unit_amount, r.currency) : j(t.price_id, 9),
690
688
  " ",
691
689
  /* @__PURE__ */ U(e, { id: "at the first renewal from " }),
692
- p(t.effective_at)
690
+ N(t.effective_at)
693
691
  ]
694
692
  });
695
693
  }
696
- //#endregion
697
694
  export { ge as SubscriptionDetailPage };
698
695
 
699
- //# sourceMappingURL=admin-detail-C8lD7U2t.js.map
696
+ //# sourceMappingURL=admin-detail-SLijWf4F.js.map