@burdenoff/microfe-billing 2026.1120.1 → 2026.1123.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.
@@ -2,30 +2,31 @@ import { useBillingNavigate as e } from "../../../hooks/useBillingNavigate.js";
2
2
  import { ServerError as t } from "../../../shared/components/ServerError.js";
3
3
  import { useBilling as n } from "../../../providers/BillingProvider.js";
4
4
  import "../hooks/index.js";
5
- import { useDefaultBillingAccount as r } from "../../subscriptions/hooks/useSubscriptions.js";
6
- import { useIsFluidgridsVariant as i } from "../../../hooks/useBillingVariant.js";
7
- import { formatCurrency as a, formatPlanDuration as o, formatPlanDurationLabel as s } from "../../../shared/utils/format.js";
8
- import { isServerError as c } from "../../../shared/utils/error.js";
9
- import { getPlanFeatureQuantity as l } from "../../../shared/utils/planFeatureQuantity.js";
10
- import { activeProductSubscriptions as u, resolvePlanAction as d } from "../utils/planAction.js";
5
+ import { PlanQuotaTermsNote as r } from "../../../shared/components/PlanQuotaTermsNote.js";
6
+ import { useDefaultBillingAccount as i } from "../../subscriptions/hooks/useSubscriptions.js";
7
+ import { useIsFluidgridsVariant as a } from "../../../hooks/useBillingVariant.js";
8
+ import { formatCurrency as o, formatPlanDuration as s, formatPlanDurationLabel as c } from "../../../shared/utils/format.js";
9
+ import { isServerError as l } from "../../../shared/utils/error.js";
10
+ import { getPlanFeatureQuantity as u } from "../../../shared/utils/planFeatureQuantity.js";
11
+ import { activeProductSubscriptions as d, resolvePlanAction as f } from "../utils/planAction.js";
11
12
  import "../../../shared/components/index.js";
12
- import { usePlans as f } from "../hooks/usePlans.js";
13
+ import { usePlans as p } from "../hooks/usePlans.js";
13
14
  import "../../../shared/utils/index.js";
14
- import { PlanDuration as p } from "../../../shared/types/graphql.js";
15
- import { getDisplayPrice as m, useDefaultBillingCurrency as h } from "../../../hooks/useDefaultBillingCurrency.js";
16
- import { FEATURED_QUOTA_LABELS as g, FEATURED_QUOTA_NAMES as _, formatFeaturedQuotaValue as v } from "../constants/featuredQuotas.js";
17
- import { enterpriseMailto as y, getEnterpriseOffer as b } from "../constants/enterprise.js";
18
- import { useState as x } from "react";
19
- import { IllustratedEmptyState as S, PagePurpose as C } from "@burdenoff/fe-libs/ui";
20
- import { ArrowRight as w, Check as T, Sparkles as E } from "lucide-react";
21
- import { jsx as D, jsxs as O } from "react/jsx-runtime";
22
- import { useI18n as k } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
15
+ import { PlanDuration as m } from "../../../shared/types/graphql.js";
16
+ import { getDisplayPrice as h, useDefaultBillingCurrency as g } from "../../../hooks/useDefaultBillingCurrency.js";
17
+ import { FEATURED_QUOTA_LABELS as _, FEATURED_QUOTA_NAMES as v, formatFeaturedQuotaValue as y } from "../constants/featuredQuotas.js";
18
+ import { enterpriseMailto as b, getEnterpriseOffer as x } from "../constants/enterprise.js";
19
+ import { useState as S } from "react";
20
+ import { IllustratedEmptyState as C, PagePurpose as w } from "@burdenoff/fe-libs/ui";
21
+ import { ArrowRight as T, Check as E, Sparkles as D } from "lucide-react";
22
+ import { jsx as O, jsxs as k } from "react/jsx-runtime";
23
+ import { useI18n as A } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
23
24
  // src/billing/modules/plans/pages/PlansBrowsePage.tsx
24
- function A(e) {
25
+ function j(e) {
25
26
  let t = /* @__PURE__ */ new Map();
26
27
  for (let n of e) {
27
28
  if (!n.quota) continue;
28
- let e = n.quota.id, r = l(n), i = t.get(e);
29
+ let e = n.quota.id, r = u(n), i = t.get(e);
29
30
  i ? i.totalValue += r : t.set(e, {
30
31
  quotaId: e,
31
32
  name: n.quota.name ?? "Unknown Quota",
@@ -34,115 +35,116 @@ function A(e) {
34
35
  }
35
36
  return Array.from(t.values());
36
37
  }
37
- function j(e) {
38
- let t = A(e), n = new Map(t.map((e) => [e.name, e]));
39
- return _.flatMap((e) => {
38
+ function M(e) {
39
+ let t = j(e), n = new Map(t.map((e) => [e.name, e]));
40
+ return v.flatMap((e) => {
40
41
  let t = n.get(e);
41
42
  return t ? [t] : [];
42
43
  });
43
44
  }
44
- var M = () => {
45
- let { t: a } = k(), o = (e, t) => {
46
- let n = a(e);
45
+ var N = () => {
46
+ let { t: o } = A(), s = (e, t) => {
47
+ let n = o(e);
47
48
  return n === e ? t : n;
48
- }, s = e(), { productId: l, plansDocsUrl: m } = n(), h = b(l), { plans: g, isLoading: _, error: v, refetch: y } = f({
49
+ }, c = e(), { productId: u, plansDocsUrl: h } = n(), g = x(u), { plans: _, isLoading: v, error: y, refetch: b } = p({
49
50
  includeFree: !1,
50
- productId: l ?? void 0
51
- }), w = i(), { subscriptions: T } = r(), E = u(T, new Set(g.map((e) => e.id))), A = (e) => w ? d(e, E) : null, j = (e) => {
52
- let t = A(e);
53
- t?.kind === "change" ? s(`/subscriptions/${t.subscriptionId}/upgrade`) : s(`/checkout/${e}`);
54
- }, [M, F] = x("grid"), [R, z] = x(p.MONTHLY), B = g.filter((e) => e.isActive && e.isPurchasable !== !1 && e.duration === R), V = B.length >= 2 ? 1 : -1;
55
- return _ && g.length === 0 ? /* @__PURE__ */ O("div", {
51
+ productId: u ?? void 0
52
+ }), T = a(), { subscriptions: E } = i(), D = d(E, new Set(_.map((e) => e.id))), j = (e) => T ? f(e, D) : null, M = (e) => {
53
+ let t = j(e);
54
+ t?.kind === "change" ? c(`/subscriptions/${t.subscriptionId}/upgrade`) : c(`/checkout/${e}`);
55
+ }, [N, I] = S("grid"), [z, B] = S(m.MONTHLY), V = _.filter((e) => e.isActive && e.isPurchasable !== !1 && e.duration === z), H = V.length >= 2 ? 1 : -1;
56
+ return v && _.length === 0 ? /* @__PURE__ */ k("div", {
56
57
  className: "space-y-6 px-6 lg:px-8 py-6",
57
- children: [/* @__PURE__ */ D("div", { className: "h-8 w-48 bg-bg-sunken animate-pulse rounded-card" }), /* @__PURE__ */ D("div", {
58
+ children: [/* @__PURE__ */ O("div", { className: "h-8 w-48 bg-bg-sunken animate-pulse rounded-card" }), /* @__PURE__ */ O("div", {
58
59
  className: "grid grid-cols-1 md:grid-cols-3 gap-6",
59
60
  children: [
60
61
  1,
61
62
  2,
62
63
  3
63
- ].map((e) => /* @__PURE__ */ O("div", {
64
+ ].map((e) => /* @__PURE__ */ k("div", {
64
65
  className: "border border-border-seam rounded-card bg-bg-surface shadow-elevation-1 p-5 space-y-4",
65
66
  children: [
66
- /* @__PURE__ */ D("div", { className: "h-6 w-24 bg-bg-sunken animate-pulse rounded" }),
67
- /* @__PURE__ */ D("div", { className: "h-8 w-32 bg-bg-sunken animate-pulse rounded" }),
68
- /* @__PURE__ */ D("div", {
67
+ /* @__PURE__ */ O("div", { className: "h-6 w-24 bg-bg-sunken animate-pulse rounded" }),
68
+ /* @__PURE__ */ O("div", { className: "h-8 w-32 bg-bg-sunken animate-pulse rounded" }),
69
+ /* @__PURE__ */ O("div", {
69
70
  className: "space-y-2",
70
71
  children: [
71
72
  1,
72
73
  2,
73
74
  3
74
- ].map((e) => /* @__PURE__ */ D("div", { className: "h-4 w-full bg-bg-sunken animate-pulse rounded" }, e))
75
+ ].map((e) => /* @__PURE__ */ O("div", { className: "h-4 w-full bg-bg-sunken animate-pulse rounded" }, e))
75
76
  })
76
77
  ]
77
78
  }, e))
78
79
  })]
79
- }) : v && c(v) ? /* @__PURE__ */ D("div", {
80
+ }) : y && l(y) ? /* @__PURE__ */ O("div", {
80
81
  className: "p-6",
81
- children: /* @__PURE__ */ D(t, {
82
- title: o("billing.plans.serverUnavailable", "Server Unavailable"),
83
- message: o("billing.plans.unableToLoadPlans", "Unable to load plans."),
84
- onRetry: () => y(),
82
+ children: /* @__PURE__ */ O(t, {
83
+ title: s("billing.plans.serverUnavailable", "Server Unavailable"),
84
+ message: s("billing.plans.unableToLoadPlans", "Unable to load plans."),
85
+ onRetry: () => b(),
85
86
  showRetry: !0
86
87
  })
87
- }) : /* @__PURE__ */ O("div", {
88
+ }) : /* @__PURE__ */ k("div", {
88
89
  className: "space-y-6 px-6 lg:px-8 py-6",
89
90
  children: [
90
- /* @__PURE__ */ O("div", { children: [
91
- /* @__PURE__ */ D("h1", {
91
+ /* @__PURE__ */ k("div", { children: [
92
+ /* @__PURE__ */ O("h1", {
92
93
  className: "text-2xl md:text-3xl font-semibold tracking-tight text-text-primary",
93
- children: o("billing.plans.browsePlansTitle", "Plans")
94
+ children: s("billing.plans.browsePlansTitle", "Plans")
94
95
  }),
95
- /* @__PURE__ */ D("p", {
96
+ /* @__PURE__ */ O("p", {
96
97
  className: "text-sm text-text-secondary mt-1",
97
- children: o("billing.plans.browsePlansSubtitle", "Choose a plan that fits your needs")
98
+ children: s("billing.plans.browsePlansSubtitle", "Choose a plan that fits your needs")
98
99
  }),
99
- /* @__PURE__ */ D(C, {
100
+ /* @__PURE__ */ O(w, {
100
101
  className: "mt-3",
101
- learnMoreHref: m,
102
- learnMoreLabel: o("billing.plans.learnMore", "Learn more"),
103
- children: o("billing.plans.browsePurpose", "Compare what each plan includes — quotas, features and price — and subscribe to the one that fits your team. Switch between monthly and yearly billing to see the difference, or contact us for a custom Enterprise contract.")
104
- })
102
+ learnMoreHref: h,
103
+ learnMoreLabel: s("billing.plans.learnMore", "Learn more"),
104
+ children: s("billing.plans.browsePurpose", "Compare what each plan includes — quotas, features and price — and subscribe to the one that fits your team. Switch between monthly and yearly billing to see the difference, or contact us for a custom Enterprise contract.")
105
+ }),
106
+ /* @__PURE__ */ O(r, { className: "mt-3" })
105
107
  ] }),
106
- /* @__PURE__ */ O("div", {
108
+ /* @__PURE__ */ k("div", {
107
109
  className: "flex flex-wrap items-center gap-4 pb-4 border-b border-border-subtle",
108
- children: [/* @__PURE__ */ D("div", {
110
+ children: [/* @__PURE__ */ O("div", {
109
111
  className: "inline-flex rounded-lg border border-border-subtle p-1 bg-bg-sunken",
110
- children: [p.MONTHLY, p.YEARLY].map((e) => /* @__PURE__ */ D("button", {
112
+ children: [m.MONTHLY, m.YEARLY].map((e) => /* @__PURE__ */ O("button", {
111
113
  type: "button",
112
- onClick: () => z(e),
113
- className: `px-3 py-1.5 text-sm font-medium rounded-button transition-colors ${R === e ? "bg-bg-surface text-text-primary shadow-sm" : "text-text-secondary hover:text-text-primary"}`,
114
- children: e === p.MONTHLY ? "Monthly" : "Yearly"
114
+ onClick: () => B(e),
115
+ className: `px-3 py-1.5 text-sm font-medium rounded-button transition-colors ${z === e ? "bg-bg-surface text-text-primary shadow-sm" : "text-text-secondary hover:text-text-primary"}`,
116
+ children: e === m.MONTHLY ? "Monthly" : "Yearly"
115
117
  }, e))
116
- }), /* @__PURE__ */ O("div", {
118
+ }), /* @__PURE__ */ k("div", {
117
119
  className: "ml-auto inline-flex rounded-lg border border-border-subtle p-1 bg-bg-sunken",
118
- children: [/* @__PURE__ */ D("button", {
120
+ children: [/* @__PURE__ */ O("button", {
119
121
  type: "button",
120
- onClick: () => F("grid"),
121
- className: `p-1.5 rounded-button transition-colors ${M === "grid" ? "bg-bg-surface text-text-primary shadow-sm" : "text-text-secondary hover:text-text-primary"}`,
122
+ onClick: () => I("grid"),
123
+ className: `p-1.5 rounded-button transition-colors ${N === "grid" ? "bg-bg-surface text-text-primary shadow-sm" : "text-text-secondary hover:text-text-primary"}`,
122
124
  title: "Grid view",
123
- children: /* @__PURE__ */ D("svg", {
125
+ children: /* @__PURE__ */ O("svg", {
124
126
  className: "size-4",
125
127
  fill: "none",
126
128
  viewBox: "0 0 24 24",
127
129
  stroke: "currentColor",
128
- children: /* @__PURE__ */ D("path", {
130
+ children: /* @__PURE__ */ O("path", {
129
131
  strokeLinecap: "round",
130
132
  strokeLinejoin: "round",
131
133
  strokeWidth: 2,
132
134
  d: "M4 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2V6zM14 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V6zM4 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2v-2zM14 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z"
133
135
  })
134
136
  })
135
- }), /* @__PURE__ */ D("button", {
137
+ }), /* @__PURE__ */ O("button", {
136
138
  type: "button",
137
- onClick: () => F("list"),
138
- className: `p-1.5 rounded-button transition-colors ${M === "list" ? "bg-bg-surface text-text-primary shadow-sm" : "text-text-secondary hover:text-text-primary"}`,
139
+ onClick: () => I("list"),
140
+ className: `p-1.5 rounded-button transition-colors ${N === "list" ? "bg-bg-surface text-text-primary shadow-sm" : "text-text-secondary hover:text-text-primary"}`,
139
141
  title: "List view",
140
- children: /* @__PURE__ */ D("svg", {
142
+ children: /* @__PURE__ */ O("svg", {
141
143
  className: "size-4",
142
144
  fill: "none",
143
145
  viewBox: "0 0 24 24",
144
146
  stroke: "currentColor",
145
- children: /* @__PURE__ */ D("path", {
147
+ children: /* @__PURE__ */ O("path", {
146
148
  strokeLinecap: "round",
147
149
  strokeLinejoin: "round",
148
150
  strokeWidth: 2,
@@ -152,99 +154,99 @@ var M = () => {
152
154
  })]
153
155
  })]
154
156
  }),
155
- B.length === 0 ? /* @__PURE__ */ D(S, {
157
+ V.length === 0 ? /* @__PURE__ */ O(C, {
156
158
  illustration: "empty-data",
157
- title: o("billing.plans.noPlansAvailable", "No plans available"),
158
- description: o("billing.plans.checkBackLater", "Check back later for new plans."),
159
- kind: g.some((e) => e.isActive && e.isPurchasable !== !1) ? "filtered" : "first-use",
159
+ title: s("billing.plans.noPlansAvailable", "No plans available"),
160
+ description: s("billing.plans.checkBackLater", "Check back later for new plans."),
161
+ kind: _.some((e) => e.isActive && e.isPurchasable !== !1) ? "filtered" : "first-use",
160
162
  glassIllustration: "money"
161
- }) : M === "grid" ? /* @__PURE__ */ O("div", {
163
+ }) : N === "grid" ? /* @__PURE__ */ k("div", {
162
164
  className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 items-stretch",
163
- children: [B.map((e, t) => /* @__PURE__ */ D(I, {
165
+ children: [V.map((e, t) => /* @__PURE__ */ O(L, {
164
166
  plan: e,
165
- highlighted: t === V,
166
- onView: () => s(`/plans/${e.id}`),
167
- onSubscribe: () => j(e.id),
168
- action: A(e.id)
169
- }, e.id)), /* @__PURE__ */ D(N, { offer: h })]
170
- }) : /* @__PURE__ */ O("div", {
167
+ highlighted: t === H,
168
+ onView: () => c(`/plans/${e.id}`),
169
+ onSubscribe: () => M(e.id),
170
+ action: j(e.id)
171
+ }, e.id)), /* @__PURE__ */ O(P, { offer: g })]
172
+ }) : /* @__PURE__ */ k("div", {
171
173
  className: "space-y-3",
172
- children: [B.map((e) => /* @__PURE__ */ D(L, {
174
+ children: [V.map((e) => /* @__PURE__ */ O(R, {
173
175
  plan: e,
174
- onView: () => s(`/plans/${e.id}`),
175
- onSubscribe: () => j(e.id),
176
- action: A(e.id)
177
- }, e.id)), /* @__PURE__ */ D(P, { offer: h })]
176
+ onView: () => c(`/plans/${e.id}`),
177
+ onSubscribe: () => M(e.id),
178
+ action: j(e.id)
179
+ }, e.id)), /* @__PURE__ */ O(F, { offer: g })]
178
180
  })
179
181
  ]
180
182
  });
181
- }, N = ({ offer: e }) => /* @__PURE__ */ O("div", {
183
+ }, P = ({ offer: e }) => /* @__PURE__ */ k("div", {
182
184
  className: "border border-border-strong bg-[var(--color-accent-soft)] rounded-card shadow-elevation-1 p-5 flex flex-col h-full",
183
185
  children: [
184
- /* @__PURE__ */ O("div", {
186
+ /* @__PURE__ */ k("div", {
185
187
  className: "mb-4",
186
- children: [/* @__PURE__ */ O("div", {
188
+ children: [/* @__PURE__ */ k("div", {
187
189
  className: "flex items-center gap-2",
188
- children: [/* @__PURE__ */ D("h3", {
190
+ children: [/* @__PURE__ */ O("h3", {
189
191
  className: "text-lg font-semibold text-text-primary",
190
192
  children: "Enterprise"
191
- }), /* @__PURE__ */ D("span", {
193
+ }), /* @__PURE__ */ O("span", {
192
194
  className: "text-xs font-medium px-2 py-0.5 rounded-full bg-bg-surface text-text-link",
193
195
  children: "Contact Us"
194
196
  })]
195
- }), /* @__PURE__ */ D("span", {
197
+ }), /* @__PURE__ */ O("span", {
196
198
  className: "text-sm text-text-secondary",
197
199
  children: "Custom contract"
198
200
  })]
199
201
  }),
200
- /* @__PURE__ */ D("div", {
202
+ /* @__PURE__ */ O("div", {
201
203
  className: "flex items-baseline gap-1 mb-4",
202
- children: /* @__PURE__ */ D("span", {
204
+ children: /* @__PURE__ */ O("span", {
203
205
  className: "text-2xl font-semibold text-text-primary",
204
206
  children: "Custom pricing"
205
207
  })
206
208
  }),
207
- /* @__PURE__ */ D("ul", {
209
+ /* @__PURE__ */ O("ul", {
208
210
  className: "space-y-2 mb-4 flex-1",
209
- children: e.highlights.map((e) => /* @__PURE__ */ O("li", {
211
+ children: e.highlights.map((e) => /* @__PURE__ */ k("li", {
210
212
  className: "flex items-center gap-2 text-sm",
211
- children: [/* @__PURE__ */ D("svg", {
213
+ children: [/* @__PURE__ */ O("svg", {
212
214
  className: "size-4 text-status-success-text shrink-0",
213
215
  fill: "none",
214
216
  viewBox: "0 0 24 24",
215
217
  stroke: "currentColor",
216
- children: /* @__PURE__ */ D("path", {
218
+ children: /* @__PURE__ */ O("path", {
217
219
  strokeLinecap: "round",
218
220
  strokeLinejoin: "round",
219
221
  strokeWidth: 2,
220
222
  d: "M5 13l4 4L19 7"
221
223
  })
222
- }), /* @__PURE__ */ D("span", {
224
+ }), /* @__PURE__ */ O("span", {
223
225
  className: "text-text-primary",
224
226
  children: e
225
227
  })]
226
228
  }, e))
227
229
  }),
228
- /* @__PURE__ */ D("div", {
230
+ /* @__PURE__ */ O("div", {
229
231
  className: "space-y-2 pt-4 border-t border-border-subtle mt-auto",
230
- children: /* @__PURE__ */ D("a", {
231
- href: y(e),
232
+ children: /* @__PURE__ */ O("a", {
233
+ href: b(e),
232
234
  className: "block w-full px-4 py-2 text-sm font-medium text-center bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover transition-colors duration-200",
233
235
  children: "Contact Us"
234
236
  })
235
237
  })
236
238
  ]
237
- }), P = ({ offer: e }) => /* @__PURE__ */ O("div", {
239
+ }), F = ({ offer: e }) => /* @__PURE__ */ k("div", {
238
240
  className: "flex items-center gap-4 p-5 border border-border-strong rounded-card bg-[var(--color-accent-soft)] shadow-elevation-1 transition-all duration-200 hover:shadow-elevation-2",
239
241
  children: [
240
- /* @__PURE__ */ D("div", {
242
+ /* @__PURE__ */ O("div", {
241
243
  className: "size-10 rounded-lg bg-bg-surface flex items-center justify-center shrink-0 shadow-elevation-1",
242
- children: /* @__PURE__ */ D("svg", {
244
+ children: /* @__PURE__ */ O("svg", {
243
245
  className: "size-5 text-text-link",
244
246
  fill: "none",
245
247
  viewBox: "0 0 24 24",
246
248
  stroke: "currentColor",
247
- children: /* @__PURE__ */ D("path", {
249
+ children: /* @__PURE__ */ O("path", {
248
250
  strokeLinecap: "round",
249
251
  strokeLinejoin: "round",
250
252
  strokeWidth: 2,
@@ -252,99 +254,99 @@ var M = () => {
252
254
  })
253
255
  })
254
256
  }),
255
- /* @__PURE__ */ O("div", {
257
+ /* @__PURE__ */ k("div", {
256
258
  className: "flex-1 min-w-0",
257
- children: [/* @__PURE__ */ O("div", {
259
+ children: [/* @__PURE__ */ k("div", {
258
260
  className: "flex items-center gap-2",
259
- children: [/* @__PURE__ */ D("h3", {
261
+ children: [/* @__PURE__ */ O("h3", {
260
262
  className: "font-semibold text-text-primary",
261
263
  children: "Enterprise"
262
- }), /* @__PURE__ */ D("span", {
264
+ }), /* @__PURE__ */ O("span", {
263
265
  className: "text-xs font-medium px-2 py-0.5 rounded-full bg-bg-surface text-text-link shrink-0",
264
266
  children: "Contact Us"
265
267
  })]
266
- }), /* @__PURE__ */ D("p", {
268
+ }), /* @__PURE__ */ O("p", {
267
269
  className: "text-sm text-text-secondary",
268
270
  children: e.summary
269
271
  })]
270
272
  }),
271
- /* @__PURE__ */ O("div", {
273
+ /* @__PURE__ */ k("div", {
272
274
  className: "text-right",
273
- children: [/* @__PURE__ */ D("div", {
275
+ children: [/* @__PURE__ */ O("div", {
274
276
  className: "font-semibold text-text-primary",
275
277
  children: "Custom pricing"
276
- }), /* @__PURE__ */ D("div", {
278
+ }), /* @__PURE__ */ O("div", {
277
279
  className: "text-sm text-text-secondary",
278
280
  children: "contract-based"
279
281
  })]
280
282
  }),
281
- /* @__PURE__ */ D("a", {
282
- href: y(e),
283
+ /* @__PURE__ */ O("a", {
284
+ href: b(e),
283
285
  className: "px-3 py-1.5 text-sm font-medium bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover transition-colors duration-200 shrink-0",
284
286
  children: "Contact Us"
285
287
  })
286
288
  ]
287
289
  });
288
- function F(e) {
290
+ function I(e) {
289
291
  return e?.kind === "current" ? "Current plan" : e?.kind === "change" ? "Change to this plan" : "Subscribe";
290
292
  }
291
- var I = ({ plan: e, highlighted: t = !1, onView: n, onSubscribe: r, action: i }) => {
292
- let c = j(e.features || []), l = A(e.features || []).length - c.length, u = h(), { price: d, currency: f } = m(e.price, e.currency, e.currencyPrices, u);
293
- return /* @__PURE__ */ O("div", {
293
+ var L = ({ plan: e, highlighted: t = !1, onView: n, onSubscribe: r, action: i }) => {
294
+ let a = M(e.features || []), l = j(e.features || []).length - a.length, u = g(), { price: d, currency: f } = h(e.price, e.currency, e.currencyPrices, u);
295
+ return /* @__PURE__ */ k("div", {
294
296
  className: `relative flex flex-col h-full rounded-card bg-bg-surface p-6 transition-[border-color,box-shadow] duration-200 ${t ? "border-2 border-action-primary-bg shadow-[var(--shadow-glow)]" : "border border-border-subtle shadow-elevation-1 hover:border-border-strong hover:shadow-elevation-2"}`,
295
297
  children: [
296
- i?.kind === "current" && /* @__PURE__ */ D("span", {
298
+ i?.kind === "current" && /* @__PURE__ */ O("span", {
297
299
  className: "absolute -top-3 right-4 inline-flex items-center rounded-full bg-bg-sunken px-3 py-1 text-xs font-semibold text-text-primary border border-border-subtle",
298
300
  children: "Current plan"
299
301
  }),
300
- t && /* @__PURE__ */ O("span", {
302
+ t && /* @__PURE__ */ k("span", {
301
303
  className: "absolute -top-3 left-1/2 -translate-x-1/2 inline-flex items-center gap-1 rounded-full bg-action-primary-bg px-3 py-1 text-xs font-semibold text-action-primary-text shadow-elevation-2",
302
- children: [/* @__PURE__ */ D(E, {
304
+ children: [/* @__PURE__ */ O(D, {
303
305
  className: "size-3.5",
304
306
  "aria-hidden": "true"
305
307
  }), "Most popular"]
306
308
  }),
307
- /* @__PURE__ */ O("div", {
309
+ /* @__PURE__ */ k("div", {
308
310
  className: "mb-4",
309
- children: [/* @__PURE__ */ D("h3", {
311
+ children: [/* @__PURE__ */ O("h3", {
310
312
  className: "text-lg font-semibold text-text-primary",
311
313
  children: e.name
312
- }), /* @__PURE__ */ D("span", {
314
+ }), /* @__PURE__ */ O("span", {
313
315
  className: "text-sm text-text-secondary",
314
- children: s(e.duration)
316
+ children: c(e.duration)
315
317
  })]
316
318
  }),
317
- /* @__PURE__ */ O("div", {
319
+ /* @__PURE__ */ k("div", {
318
320
  className: "flex items-baseline gap-1.5 mb-5",
319
- children: [/* @__PURE__ */ D("span", {
321
+ children: [/* @__PURE__ */ O("span", {
320
322
  className: "text-4xl font-bold tabular-nums tracking-tight text-text-primary",
321
- children: a(d, f)
322
- }), /* @__PURE__ */ O("span", {
323
+ children: o(d, f)
324
+ }), /* @__PURE__ */ k("span", {
323
325
  className: "text-text-secondary text-sm",
324
- children: ["/ ", o(e.duration)]
326
+ children: ["/ ", s(e.duration)]
325
327
  })]
326
328
  }),
327
- c.length > 0 && /* @__PURE__ */ O("ul", {
329
+ a.length > 0 && /* @__PURE__ */ k("ul", {
328
330
  className: "space-y-2.5 mb-5 flex-1",
329
- children: [c.map((e) => /* @__PURE__ */ O("li", {
331
+ children: [a.map((e) => /* @__PURE__ */ k("li", {
330
332
  className: "flex items-center justify-between gap-2 text-sm",
331
- children: [/* @__PURE__ */ O("span", {
333
+ children: [/* @__PURE__ */ k("span", {
332
334
  className: "flex items-center gap-2 min-w-0",
333
- children: [/* @__PURE__ */ D("span", {
335
+ children: [/* @__PURE__ */ O("span", {
334
336
  className: "flex size-5 shrink-0 items-center justify-center rounded-full bg-[var(--color-accent-soft)]",
335
- children: /* @__PURE__ */ D(T, {
337
+ children: /* @__PURE__ */ O(E, {
336
338
  className: "size-3 text-action-primary-bg",
337
339
  "aria-hidden": "true"
338
340
  })
339
- }), /* @__PURE__ */ D("span", {
341
+ }), /* @__PURE__ */ O("span", {
340
342
  className: "truncate text-text-primary",
341
- children: g[e.name] ?? e.name
343
+ children: _[e.name] ?? e.name
342
344
  })]
343
- }), /* @__PURE__ */ D("span", {
345
+ }), /* @__PURE__ */ O("span", {
344
346
  className: "font-semibold text-text-primary tabular-nums shrink-0",
345
- children: v(e.name, e.totalValue)
347
+ children: y(e.name, e.totalValue)
346
348
  })]
347
- }, e.quotaId)), l > 0 && /* @__PURE__ */ O("li", {
349
+ }, e.quotaId)), l > 0 && /* @__PURE__ */ k("li", {
348
350
  className: "text-sm text-text-secondary pl-7",
349
351
  children: [
350
352
  "+",
@@ -353,19 +355,19 @@ var I = ({ plan: e, highlighted: t = !1, onView: n, onSubscribe: r, action: i })
353
355
  ]
354
356
  })]
355
357
  }),
356
- /* @__PURE__ */ O("div", {
358
+ /* @__PURE__ */ k("div", {
357
359
  className: "space-y-2 pt-4 border-t border-border-subtle mt-auto",
358
- children: [/* @__PURE__ */ O("button", {
360
+ children: [/* @__PURE__ */ k("button", {
359
361
  type: "button",
360
362
  onClick: r,
361
363
  disabled: i?.kind === "current",
362
364
  "aria-disabled": i?.kind === "current",
363
365
  className: "group disabled:cursor-not-allowed disabled:opacity-60 inline-flex w-full items-center justify-center gap-2 rounded-button bg-action-primary-bg px-4 py-2.5 text-sm font-semibold text-action-primary-text shadow-elevation-1 transition-colors duration-200 hover:bg-action-primary-bgHover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]",
364
- children: [F(i), /* @__PURE__ */ D(w, {
366
+ children: [I(i), /* @__PURE__ */ O(T, {
365
367
  className: "size-4 transition-transform duration-200",
366
368
  "aria-hidden": "true"
367
369
  })]
368
- }), /* @__PURE__ */ D("button", {
370
+ }), /* @__PURE__ */ O("button", {
369
371
  type: "button",
370
372
  onClick: n,
371
373
  className: "w-full px-4 py-2 text-sm font-medium border border-border-subtle text-text-secondary rounded-button hover:bg-bg-sunken hover:text-text-primary hover:border-border-strong transition-colors duration-200",
@@ -374,19 +376,19 @@ var I = ({ plan: e, highlighted: t = !1, onView: n, onSubscribe: r, action: i })
374
376
  })
375
377
  ]
376
378
  });
377
- }, L = ({ plan: e, onView: t, onSubscribe: n, action: r }) => {
378
- let i = j(e.features || []), s = h();
379
- return /* @__PURE__ */ O("div", {
379
+ }, R = ({ plan: e, onView: t, onSubscribe: n, action: r }) => {
380
+ let i = M(e.features || []), a = g();
381
+ return /* @__PURE__ */ k("div", {
380
382
  className: "flex items-center gap-4 p-5 border border-border-seam rounded-card bg-bg-surface shadow-elevation-1 transition-all duration-200 hover:border-border-strong hover:shadow-elevation-2",
381
383
  children: [
382
- /* @__PURE__ */ D("div", {
384
+ /* @__PURE__ */ O("div", {
383
385
  className: "size-10 rounded-lg bg-[var(--color-accent-soft)] flex items-center justify-center shrink-0",
384
- children: /* @__PURE__ */ D("svg", {
386
+ children: /* @__PURE__ */ O("svg", {
385
387
  className: "size-5 text-text-link",
386
388
  fill: "none",
387
389
  viewBox: "0 0 24 24",
388
390
  stroke: "currentColor",
389
- children: /* @__PURE__ */ D("path", {
391
+ children: /* @__PURE__ */ O("path", {
390
392
  strokeLinecap: "round",
391
393
  strokeLinejoin: "round",
392
394
  strokeWidth: 2,
@@ -394,12 +396,12 @@ var I = ({ plan: e, highlighted: t = !1, onView: n, onSubscribe: r, action: i })
394
396
  })
395
397
  })
396
398
  }),
397
- /* @__PURE__ */ O("div", {
399
+ /* @__PURE__ */ k("div", {
398
400
  className: "flex-1 min-w-0",
399
- children: [/* @__PURE__ */ D("h3", {
401
+ children: [/* @__PURE__ */ O("h3", {
400
402
  className: "font-semibold text-text-primary truncate",
401
403
  children: e.name
402
- }), /* @__PURE__ */ O("p", {
404
+ }), /* @__PURE__ */ k("p", {
403
405
  className: "text-sm text-text-secondary",
404
406
  children: [
405
407
  i.length,
@@ -409,28 +411,28 @@ var I = ({ plan: e, highlighted: t = !1, onView: n, onSubscribe: r, action: i })
409
411
  ]
410
412
  })]
411
413
  }),
412
- /* @__PURE__ */ O("div", {
414
+ /* @__PURE__ */ k("div", {
413
415
  className: "text-right",
414
- children: [/* @__PURE__ */ D("div", {
416
+ children: [/* @__PURE__ */ O("div", {
415
417
  className: "font-semibold text-text-primary",
416
418
  children: (() => {
417
- let { price: t, currency: n } = m(e.price, e.currency, e.currencyPrices, s);
418
- return a(t, n);
419
+ let { price: t, currency: n } = h(e.price, e.currency, e.currencyPrices, a);
420
+ return o(t, n);
419
421
  })()
420
- }), /* @__PURE__ */ O("div", {
422
+ }), /* @__PURE__ */ k("div", {
421
423
  className: "text-sm text-text-secondary",
422
- children: ["per ", o(e.duration)]
424
+ children: ["per ", s(e.duration)]
423
425
  })]
424
426
  }),
425
- /* @__PURE__ */ O("div", {
427
+ /* @__PURE__ */ k("div", {
426
428
  className: "flex items-center gap-2",
427
- children: [/* @__PURE__ */ D("button", {
429
+ children: [/* @__PURE__ */ O("button", {
428
430
  type: "button",
429
431
  onClick: n,
430
432
  disabled: r?.kind === "current",
431
433
  className: "disabled:cursor-not-allowed disabled:opacity-60 px-3 py-1.5 text-sm font-medium bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover transition-colors duration-200",
432
- children: F(r)
433
- }), /* @__PURE__ */ D("button", {
434
+ children: I(r)
435
+ }), /* @__PURE__ */ O("button", {
434
436
  type: "button",
435
437
  onClick: t,
436
438
  className: "px-3 py-1.5 text-sm font-medium border border-border-subtle text-text-primary rounded-button hover:bg-bg-sunken hover:border-border-strong transition-all duration-200",
@@ -440,6 +442,6 @@ var I = ({ plan: e, highlighted: t = !1, onView: n, onSubscribe: r, action: i })
440
442
  ]
441
443
  });
442
444
  };
443
- export { M as PlansBrowsePage };
445
+ export { N as PlansBrowsePage };
444
446
 
445
447
  //# sourceMappingURL=PlansBrowsePage.js.map