@burdenoff/microfe-headshotmarketing 2026.1109.2 → 2026.1114.2

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 (32) hide show
  1. package/dist/generated/wspace-operations.d.ts +239 -0
  2. package/dist/generated/wspace-operations.js +360 -241
  3. package/dist/generated/wspace-operations.js.map +1 -1
  4. package/dist/headshotmarketing/components/CrmRecordSelection.d.ts +4 -0
  5. package/dist/headshotmarketing/components/CrmRecordSelection.js +93 -0
  6. package/dist/headshotmarketing/components/CrmRecordSelection.js.map +1 -0
  7. package/dist/headshotmarketing/hooks/useRecordSelection.d.ts +6 -0
  8. package/dist/headshotmarketing/hooks/useRecordSelection.js +14 -0
  9. package/dist/headshotmarketing/hooks/useRecordSelection.js.map +1 -0
  10. package/dist/headshotmarketing/hooks/useRefreshCrmSelection.d.ts +8 -0
  11. package/dist/headshotmarketing/hooks/useRefreshCrmSelection.js +25 -0
  12. package/dist/headshotmarketing/hooks/useRefreshCrmSelection.js.map +1 -0
  13. package/dist/headshotmarketing/pages/ads/AudiencesPage.js +169 -140
  14. package/dist/headshotmarketing/pages/ads/AudiencesPage.js.map +1 -1
  15. package/dist/headshotmarketing/pages/builder/LandingPageBuilderPage.js +330 -236
  16. package/dist/headshotmarketing/pages/builder/LandingPageBuilderPage.js.map +1 -1
  17. package/dist/headshotmarketing/pages/crm/ContactsPage.js +165 -157
  18. package/dist/headshotmarketing/pages/crm/ContactsPage.js.map +1 -1
  19. package/dist/headshotmarketing/pages/crm/LeadsPage.js +119 -113
  20. package/dist/headshotmarketing/pages/crm/LeadsPage.js.map +1 -1
  21. package/dist/headshotmarketing/pages/crm/PipelinePage.js +107 -101
  22. package/dist/headshotmarketing/pages/crm/PipelinePage.js.map +1 -1
  23. package/dist/headshotmarketing/utils/crmMapper.d.ts +1 -1
  24. package/dist/headshotmarketing/utils/crmMapper.js +1 -1
  25. package/dist/headshotmarketing/utils/crmMapper.js.map +1 -1
  26. package/dist/utils/pageContext.d.ts +1 -1
  27. package/dist/utils/pageContext.js +79 -39
  28. package/dist/utils/pageContext.js.map +1 -1
  29. package/dist/utils/recordSelection.d.ts +4 -0
  30. package/dist/utils/recordSelection.js +12 -0
  31. package/dist/utils/recordSelection.js.map +1 -0
  32. package/package.json +1 -1
@@ -3,23 +3,24 @@ import { Pie as t } from "../../../node_modules/recharts/es6/polar/Pie.js";
3
3
  import { Cell as n } from "../../../node_modules/recharts/es6/component/Cell.js";
4
4
  import { ResponsiveContainer as r } from "../../../node_modules/recharts/es6/component/ResponsiveContainer.js";
5
5
  import { Tooltip as i } from "../../../node_modules/recharts/es6/component/Tooltip.js";
6
- import { useCreateHeadshotmarketingAudienceMutation as a, useDeleteHeadshotmarketingAudienceMutation as o, useHeadshotmarketingAudiencesListQuery as s, useUpdateHeadshotmarketingAudienceMutation as c } from "../../../generated/wspace-operations.js";
7
- import { cn as l, formatNumber as u, formatPercentage as d } from "../../utils/helpers.js";
8
- import { audienceAgeBreakdown as f, audienceCriteriaChips as p, audienceUsageLabel as m } from "./audienceDetails.js";
9
- import { toAudienceModel as h } from "../../utils/adsMapper.js";
10
- import { PageLayout as g } from "../../components/PageLayout.js";
11
- import { EmptyState as _ } from "../../components/EmptyState.js";
12
- import { Modal as v } from "../../components/Modal.js";
13
- import { QueryStateBoundary as y } from "../../components/QueryStateBoundary.js";
14
- import { Pagination as ee } from "../../components/Pagination.js";
6
+ import { useCreateHeadshotmarketingAudienceMutation as a, useDeleteHeadshotmarketingAudienceMutation as o, useHeadshotmarketingAudiencesListQuery as s, useHeadshotmarketingSelectedAudienceQuery as c, useUpdateHeadshotmarketingAudienceMutation as l } from "../../../generated/wspace-operations.js";
7
+ import { cn as u, formatNumber as d, formatPercentage as f } from "../../utils/helpers.js";
8
+ import { audienceAgeBreakdown as p, audienceCriteriaChips as m, audienceUsageLabel as h } from "./audienceDetails.js";
9
+ import { toAudienceModel as g } from "../../utils/adsMapper.js";
10
+ import { PageLayout as _ } from "../../components/PageLayout.js";
11
+ import { EmptyState as v } from "../../components/EmptyState.js";
12
+ import { Modal as y } from "../../components/Modal.js";
13
+ import { QueryStateBoundary as ee } from "../../components/QueryStateBoundary.js";
14
+ import { Pagination as te } from "../../components/Pagination.js";
15
15
  import "../../components/index.js";
16
- import { useHeadshotMarketing as te } from "../../context/HeadshotMarketingContext.js";
17
- import { useHeadshotmarketingBootstrap as ne } from "../../hooks/useHeadshotmarketingBootstrap.js";
18
- import { usePagination as re } from "../../hooks/usePagination.js";
19
- import { useEffect as b, useMemo as ie, useState as x } from "react";
16
+ import { useHeadshotMarketing as ne } from "../../context/HeadshotMarketingContext.js";
17
+ import { useHeadshotmarketingBootstrap as re } from "../../hooks/useHeadshotmarketingBootstrap.js";
18
+ import { usePagination as ie } from "../../hooks/usePagination.js";
19
+ import { useRecordSelection as ae } from "../../hooks/useRecordSelection.js";
20
+ import { useEffect as b, useMemo as oe, useState as x } from "react";
20
21
  import { Megaphone as S, Pencil as C, Plus as w, Trash2 as T, X as E } from "lucide-react";
21
22
  import { Fragment as D, jsx as O, jsxs as k } from "react/jsx-runtime";
22
- import { PagePurpose as ae } from "@burdenoff/fe-libs/ui";
23
+ import { PagePurpose as se } from "@burdenoff/fe-libs/ui";
23
24
  // src/headshotmarketing/pages/ads/AudiencesPage.tsx
24
25
  var A = {
25
26
  google_ads: "Google Ads",
@@ -63,57 +64,65 @@ function P(e) {
63
64
  };
64
65
  }
65
66
  var F = () => {
66
- let { navigate: e, basePath: t } = te(), { refetch: n } = ne(), [r, i] = x(""), [l, u] = x(""), [d, f] = x(null), [p, m] = x(null), [S, C] = x(!1), [T, E] = x(N), [A, j] = x(null), [M, F] = x(null), [L, R] = x(null), z = re({ initialPageSize: 9 }), { limit: ce, offset: le, setPage: B, setTotal: V } = z;
67
+ let { navigate: e, basePath: t } = ne(), { refetch: n } = re(), [r, i] = x(""), [u, d] = x(""), { selectedId: f, invalidSelection: p, selectRecord: m } = ae(), h = c({
68
+ variables: { id: f ?? "" },
69
+ skip: !f,
70
+ fetchPolicy: "network-only"
71
+ }), [S, C] = x(null), [T, E] = x(!1), [A, j] = x(N), [M, F] = x(null), [L, R] = x(null), [z, B] = x(null), V = ie({ initialPageSize: 9 }), { limit: ue, offset: de, setPage: H, setTotal: U } = V;
67
72
  b(() => {
68
- let e = setTimeout(() => u(r), 300);
73
+ let e = setTimeout(() => d(r), 300);
69
74
  return () => clearTimeout(e);
70
75
  }, [r]), b(() => {
71
- B(1);
72
- }, [l, B]);
73
- let { data: H, loading: U, error: ue, refetch: W } = s({
76
+ H(1);
77
+ }, [u, H]);
78
+ let { data: W, loading: G, error: fe, refetch: K } = s({
74
79
  variables: {
75
- limit: ce,
76
- offset: le,
77
- search: l || null
80
+ limit: ue,
81
+ offset: de,
82
+ search: u || null
78
83
  },
79
84
  errorPolicy: "all",
80
85
  notifyOnNetworkStatusChange: !0
81
- }), G = H?.headshotmarketingAudiences.total ?? 0;
86
+ }), q = W?.headshotmarketingAudiences.total ?? 0;
82
87
  b(() => {
83
- V(G);
84
- }, [G, V]);
85
- let K = ie(() => (H?.headshotmarketingAudiences.items ?? []).map((e) => h(e)), [H?.headshotmarketingAudiences.items]), q = K.find((e) => e.id === d) ?? null, [de, { loading: J }] = a(), [Y, { loading: X }] = c(), [fe, { loading: Z }] = o(), Q = async () => {
86
- await Promise.all([W(), n()]);
87
- }, pe = async () => {
88
- if (!T.name.trim()) R("Audience name is required.");
88
+ U(q);
89
+ }, [q, U]);
90
+ let J = oe(() => (W?.headshotmarketingAudiences.items ?? []).map((e) => g(e)), [W?.headshotmarketingAudiences.items]), Y = h.data?.headshotmarketingAudience, X = Y?.id === f ? g(Y) : null, [pe, { loading: Z }] = a(), [me, { loading: he }] = l(), [ge, { loading: _e }] = o(), Q = async () => {
91
+ await Promise.all([
92
+ K(),
93
+ n(),
94
+ ...f ? [h.refetch()] : []
95
+ ]);
96
+ }, ve = async () => {
97
+ if (!A.name.trim()) B("Audience name is required.");
89
98
  else {
90
- R(null);
99
+ B(null);
91
100
  try {
92
- await de({ variables: { input: {
93
- name: T.name.trim(),
94
- description: T.description || null,
95
- estimatedSize: T.estimatedSize ? Number(T.estimatedSize) : null,
96
- isActive: T.isActive,
97
- targetingCriteria: P(T)
98
- } } }), C(!1), E(N), await Q();
101
+ await pe({ variables: { input: {
102
+ name: A.name.trim(),
103
+ description: A.description || null,
104
+ estimatedSize: A.estimatedSize ? Number(A.estimatedSize) : null,
105
+ isActive: A.isActive,
106
+ targetingCriteria: P(A)
107
+ } } }), E(!1), j(N), await Q();
99
108
  } catch (e) {
100
- R(e instanceof Error ? e.message : "Failed to create audience.");
109
+ B(e instanceof Error ? e.message : "Failed to create audience.");
101
110
  }
102
111
  }
103
112
  }, $ = async (e) => {
104
- R(null), m(e.id);
113
+ B(null), C(e.id);
105
114
  try {
106
- await Y({ variables: {
115
+ await me({ variables: {
107
116
  id: e.id,
108
117
  input: { isActive: e.status !== "active" }
109
118
  } }), await Q();
110
119
  } catch (e) {
111
- R(e instanceof Error ? e.message : "Failed to update audience.");
120
+ B(e instanceof Error ? e.message : "Failed to update audience.");
112
121
  } finally {
113
- m(null);
122
+ C(null);
114
123
  }
115
- }, me = (e) => {
116
- R(null), j({
124
+ }, ye = (e) => {
125
+ B(null), F({
117
126
  id: e.id,
118
127
  form: {
119
128
  name: e.name,
@@ -128,55 +137,55 @@ var F = () => {
128
137
  platform: e.platform
129
138
  }
130
139
  });
131
- }, he = async () => {
132
- if (A) {
133
- if (!A.form.name.trim()) R("Audience name is required.");
140
+ }, be = async () => {
141
+ if (M) {
142
+ if (!M.form.name.trim()) B("Audience name is required.");
134
143
  else {
135
- R(null);
144
+ B(null);
136
145
  try {
137
- await Y({ variables: {
138
- id: A.id,
146
+ await me({ variables: {
147
+ id: M.id,
139
148
  input: {
140
- name: A.form.name.trim(),
141
- description: A.form.description || null,
142
- estimatedSize: A.form.estimatedSize ? Number(A.form.estimatedSize) : null,
143
- isActive: A.form.isActive,
144
- targetingCriteria: P(A.form)
149
+ name: M.form.name.trim(),
150
+ description: M.form.description || null,
151
+ estimatedSize: M.form.estimatedSize ? Number(M.form.estimatedSize) : null,
152
+ isActive: M.form.isActive,
153
+ targetingCriteria: P(M.form)
145
154
  }
146
- } }), j(null), await Q();
155
+ } }), F(null), await Q();
147
156
  } catch (e) {
148
- R(e instanceof Error ? e.message : "Failed to save audience.");
157
+ B(e instanceof Error ? e.message : "Failed to save audience.");
149
158
  }
150
159
  }
151
160
  }
152
- }, ge = async () => {
153
- if (M) {
154
- R(null);
161
+ }, xe = async () => {
162
+ if (L) {
163
+ B(null);
155
164
  try {
156
- await fe({ variables: { id: M.id } }), d === M.id && f(null), F(null), await Q();
165
+ await ge({ variables: { id: L.id } }), f === L.id && m(null), R(null), await Q();
157
166
  } catch (e) {
158
- R(e instanceof Error ? e.message : "Failed to delete audience.");
167
+ B(e instanceof Error ? e.message : "Failed to delete audience.");
159
168
  }
160
169
  }
161
- }, _e = (n) => {
170
+ }, Se = (n) => {
162
171
  let r = new URLSearchParams({
163
172
  audienceId: n.id,
164
173
  audienceName: n.name
165
174
  });
166
175
  e(`${t}/ads/campaigns/new?${r.toString()}`);
167
176
  };
168
- return /* @__PURE__ */ k(g, {
177
+ return /* @__PURE__ */ k(_, {
169
178
  title: "Audiences",
170
179
  description: "Create and manage your target audiences",
171
180
  actions: /* @__PURE__ */ k("button", {
172
181
  onClick: () => {
173
- R(null), E(N), C(!0);
182
+ B(null), j(N), E(!0);
174
183
  },
175
184
  className: "inline-flex items-center gap-2 rounded-md bg-foreground px-4 py-2 text-sm font-medium text-background hover:bg-foreground/90",
176
185
  children: [/* @__PURE__ */ O(w, { className: "h-4 w-4" }), "New Audience"]
177
186
  }),
178
187
  children: [
179
- /* @__PURE__ */ O(ae, { children: "Define and reuse the groups of people your ads should reach — custom lists, lookalikes and retargeting audiences. Save an audience once, then target it across any campaign and track how well it matches." }),
188
+ /* @__PURE__ */ O(se, { children: "Define and reuse the groups of people your ads should reach — custom lists, lookalikes and retargeting audiences. Save an audience once, then target it across any campaign and track how well it matches." }),
180
189
  /* @__PURE__ */ O("div", {
181
190
  className: "relative max-w-md",
182
191
  children: /* @__PURE__ */ O("input", {
@@ -187,121 +196,141 @@ var F = () => {
187
196
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-4 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
188
197
  })
189
198
  }),
190
- L && !S && !A && /* @__PURE__ */ O("div", {
199
+ z && !T && !M && /* @__PURE__ */ O("div", {
191
200
  role: "alert",
192
201
  className: "rounded-lg border border-status-error-border/30 bg-status-error-bg/10 px-4 py-3 text-sm text-status-error-text",
193
- children: L
202
+ children: z
194
203
  }),
195
- /* @__PURE__ */ O(y, {
196
- loading: U,
197
- error: ue,
198
- onRetry: W,
199
- hasData: !!H,
200
- children: K.length === 0 ? /* @__PURE__ */ O(_, {
201
- illustration: G === 0 ? "empty-people" : "empty-search",
202
- title: G === 0 ? "No audiences yet" : "No audiences match your search",
203
- description: G === 0 ? "Create your first audience to target the right people in your campaigns." : "Try a different search term.",
204
- action: G === 0 ? /* @__PURE__ */ k("button", {
204
+ /* @__PURE__ */ O(ee, {
205
+ loading: G,
206
+ error: fe,
207
+ onRetry: K,
208
+ hasData: !!W,
209
+ children: J.length === 0 ? /* @__PURE__ */ O(v, {
210
+ illustration: q === 0 ? "empty-people" : "empty-search",
211
+ title: q === 0 ? "No audiences yet" : "No audiences match your search",
212
+ description: q === 0 ? "Create your first audience to target the right people in your campaigns." : "Try a different search term.",
213
+ action: q === 0 ? /* @__PURE__ */ k("button", {
205
214
  onClick: () => {
206
- R(null), E(N), C(!0);
215
+ B(null), j(N), E(!0);
207
216
  },
208
217
  className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
209
218
  children: [/* @__PURE__ */ O(w, { className: "h-4 w-4" }), "Create Audience"]
210
219
  }) : void 0
211
220
  }) : /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ O("div", {
212
221
  className: "grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",
213
- children: K.map((e) => /* @__PURE__ */ O(oe, {
222
+ children: J.map((e) => /* @__PURE__ */ O(ce, {
214
223
  audience: e,
215
- selected: d === e.id,
216
- toggling: p === e.id,
217
- onOpen: () => f(e.id),
224
+ selected: f === e.id,
225
+ toggling: S === e.id,
226
+ onOpen: () => m(e.id),
218
227
  onToggleActive: () => $(e)
219
228
  }, e.id))
220
- }), /* @__PURE__ */ O(ee, {
221
- page: z.page,
222
- pageSize: z.pageSize,
223
- total: z.total,
224
- onPageChange: z.setPage,
225
- onPageSizeChange: z.setPageSize,
229
+ }), /* @__PURE__ */ O(te, {
230
+ page: V.page,
231
+ pageSize: V.pageSize,
232
+ total: V.total,
233
+ onPageChange: V.setPage,
234
+ onPageSizeChange: V.setPageSize,
226
235
  pageSizeOptions: [
227
236
  9,
228
237
  18,
229
238
  36
230
239
  ],
231
- disabled: U,
240
+ disabled: G,
232
241
  hideWhenSinglePage: !0
233
242
  })] })
234
243
  }),
235
- q && /* @__PURE__ */ O(se, {
236
- audience: q,
237
- toggling: p === q.id,
238
- onClose: () => f(null),
239
- onToggleActive: () => $(q),
240
- onEdit: () => me(q),
241
- onUseInCampaign: () => _e(q),
242
- onDelete: () => F(q)
244
+ (f || p) && !X && /* @__PURE__ */ k("section", {
245
+ "aria-label": "Selected audience",
246
+ className: "rounded-lg border border-border-subtle bg-bg-surface p-4",
247
+ children: [
248
+ /* @__PURE__ */ O("button", {
249
+ type: "button",
250
+ onClick: () => m(null),
251
+ children: "Close selection"
252
+ }),
253
+ /* @__PURE__ */ O("p", {
254
+ role: h.loading ? "status" : "alert",
255
+ children: h.loading ? "Loading audience…" : "This audience is unavailable or you do not have access."
256
+ }),
257
+ h.error && /* @__PURE__ */ O("button", {
258
+ type: "button",
259
+ onClick: () => void h.refetch(),
260
+ children: "Retry"
261
+ })
262
+ ]
243
263
  }),
244
- /* @__PURE__ */ O(v, {
245
- open: S,
246
- onClose: () => C(!1),
264
+ X && /* @__PURE__ */ O(le, {
265
+ audience: X,
266
+ toggling: S === X.id,
267
+ onClose: () => m(null),
268
+ onToggleActive: () => $(X),
269
+ onEdit: () => ye(X),
270
+ onUseInCampaign: () => Se(X),
271
+ onDelete: () => R(X)
272
+ }),
273
+ /* @__PURE__ */ O(y, {
274
+ open: T,
275
+ onClose: () => E(!1),
247
276
  title: "Create Audience",
248
277
  description: "Define who your ads should reach",
249
278
  size: "lg",
250
279
  footer: /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ O("button", {
251
- onClick: () => C(!1),
280
+ onClick: () => E(!1),
252
281
  className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
253
282
  children: "Cancel"
254
283
  }), /* @__PURE__ */ O("button", {
255
- onClick: pe,
256
- disabled: J,
284
+ onClick: ve,
285
+ disabled: Z,
257
286
  className: "rounded-md bg-foreground px-4 py-2 text-sm font-medium text-background hover:bg-foreground/90 disabled:opacity-60",
258
- children: J ? "Creating..." : "Create Audience"
287
+ children: Z ? "Creating..." : "Create Audience"
259
288
  })] }),
260
289
  children: /* @__PURE__ */ O(I, {
261
- form: T,
262
- onChange: E,
263
- error: L
290
+ form: A,
291
+ onChange: j,
292
+ error: z
264
293
  })
265
294
  }),
266
- /* @__PURE__ */ O(v, {
267
- open: A !== null,
268
- onClose: () => j(null),
295
+ /* @__PURE__ */ O(y, {
296
+ open: M !== null,
297
+ onClose: () => F(null),
269
298
  title: "Edit Audience",
270
299
  description: "Update audience targeting",
271
300
  size: "lg",
272
301
  footer: /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ O("button", {
273
- onClick: () => j(null),
302
+ onClick: () => F(null),
274
303
  className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
275
304
  children: "Cancel"
276
305
  }), /* @__PURE__ */ O("button", {
277
- onClick: he,
278
- disabled: X,
306
+ onClick: be,
307
+ disabled: he,
279
308
  className: "rounded-md bg-foreground px-4 py-2 text-sm font-medium text-background hover:bg-foreground/90 disabled:opacity-60",
280
- children: X ? "Saving..." : "Save Changes"
309
+ children: he ? "Saving..." : "Save Changes"
281
310
  })] }),
282
- children: A && /* @__PURE__ */ O(I, {
283
- form: A.form,
284
- onChange: (e) => j({
285
- ...A,
311
+ children: M && /* @__PURE__ */ O(I, {
312
+ form: M.form,
313
+ onChange: (e) => F({
314
+ ...M,
286
315
  form: e
287
316
  }),
288
- error: L
317
+ error: z
289
318
  })
290
319
  }),
291
- /* @__PURE__ */ O(v, {
292
- open: M !== null,
293
- onClose: () => F(null),
320
+ /* @__PURE__ */ O(y, {
321
+ open: L !== null,
322
+ onClose: () => R(null),
294
323
  title: "Delete Audience",
295
324
  size: "sm",
296
325
  footer: /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ O("button", {
297
- onClick: () => F(null),
326
+ onClick: () => R(null),
298
327
  className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
299
328
  children: "Cancel"
300
329
  }), /* @__PURE__ */ O("button", {
301
- onClick: ge,
302
- disabled: Z,
330
+ onClick: xe,
331
+ disabled: _e,
303
332
  className: "rounded-md bg-status-error-text px-4 py-2 text-sm font-medium text-background hover:opacity-90 disabled:opacity-60",
304
- children: Z ? "Deleting..." : "Delete"
333
+ children: _e ? "Deleting..." : "Delete"
305
334
  })] }),
306
335
  children: /* @__PURE__ */ k("p", {
307
336
  className: "text-sm text-text-secondary",
@@ -310,7 +339,7 @@ var F = () => {
310
339
  " ",
311
340
  /* @__PURE__ */ O("span", {
312
341
  className: "font-semibold text-text-primary",
313
- children: M?.name
342
+ children: L?.name
314
343
  }),
315
344
  "? This action cannot be undone."
316
345
  ]
@@ -403,7 +432,7 @@ var F = () => {
403
432
  children: M.map((t) => /* @__PURE__ */ O("button", {
404
433
  type: "button",
405
434
  onClick: () => r(t),
406
- className: l("rounded-full border px-4 py-1.5 text-sm capitalize transition-colors", e.genders.includes(t) ? "border-foreground bg-foreground text-background" : "border-border-subtle text-text-primary hover:bg-bg-sunken"),
435
+ className: u("rounded-full border px-4 py-1.5 text-sm capitalize transition-colors", e.genders.includes(t) ? "border-foreground bg-foreground text-background" : "border-border-subtle text-text-primary hover:bg-bg-sunken"),
407
436
  children: t
408
437
  }, t))
409
438
  })] }),
@@ -497,14 +526,14 @@ var F = () => {
497
526
  onClick: (e) => {
498
527
  e.stopPropagation(), n();
499
528
  },
500
- className: l("relative inline-flex h-6 w-11 shrink-0 items-center rounded-full border transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)] disabled:opacity-60", r ? "border-action-primary-bg bg-action-primary-bg" : "border-border-subtle bg-bg-sunken"),
529
+ className: u("relative inline-flex h-6 w-11 shrink-0 items-center rounded-full border transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)] disabled:opacity-60", r ? "border-action-primary-bg bg-action-primary-bg" : "border-border-subtle bg-bg-sunken"),
501
530
  children: /* @__PURE__ */ O("span", {
502
531
  "aria-hidden": "true",
503
- className: l("inline-block h-4 w-4 rounded-full bg-bg-surface shadow transition-transform", r ? "translate-x-6" : "translate-x-1")
532
+ className: u("inline-block h-4 w-4 rounded-full bg-bg-surface shadow transition-transform", r ? "translate-x-6" : "translate-x-1")
504
533
  })
505
534
  });
506
- }, oe = ({ audience: e, selected: t, toggling: n, onOpen: r, onToggleActive: i }) => {
507
- let a = p(e), o = m(e.usedInCampaignCount);
535
+ }, ce = ({ audience: e, selected: t, toggling: n, onOpen: r, onToggleActive: i }) => {
536
+ let a = m(e), o = h(e.usedInCampaignCount);
508
537
  return /* @__PURE__ */ k("div", {
509
538
  role: "button",
510
539
  tabIndex: 0,
@@ -513,7 +542,7 @@ var F = () => {
513
542
  onKeyDown: (e) => {
514
543
  (e.key === "Enter" || e.key === " ") && (e.preventDefault(), r());
515
544
  },
516
- className: l("cursor-pointer space-y-3 rounded-lg border bg-gloss-card p-5 shadow-pop transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]", t ? "border-action-primary-bg" : "border-border-seam hover:border-foreground/30"),
545
+ className: u("cursor-pointer space-y-3 rounded-lg border bg-gloss-card p-5 shadow-pop transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]", t ? "border-action-primary-bg" : "border-border-seam hover:border-foreground/30"),
517
546
  children: [
518
547
  /* @__PURE__ */ k("div", {
519
548
  className: "flex items-start justify-between gap-3",
@@ -524,7 +553,7 @@ var F = () => {
524
553
  children: e.name
525
554
  }), /* @__PURE__ */ O("p", {
526
555
  className: "mt-1 text-2xl font-semibold tabular-nums text-text-primary",
527
- children: u(e.size)
556
+ children: d(e.size)
528
557
  })]
529
558
  }), /* @__PURE__ */ k("div", {
530
559
  className: "flex flex-col items-end gap-1",
@@ -558,8 +587,8 @@ var F = () => {
558
587
  })
559
588
  ]
560
589
  });
561
- }, se = ({ audience: a, toggling: o, onClose: s, onToggleActive: c, onEdit: l, onUseInCampaign: h, onDelete: g }) => {
562
- let _ = f(a), v = p(a), y = m(a.usedInCampaignCount);
590
+ }, le = ({ audience: a, toggling: o, onClose: s, onToggleActive: c, onEdit: l, onUseInCampaign: u, onDelete: g }) => {
591
+ let _ = p(a), v = m(a), y = h(a.usedInCampaignCount);
563
592
  return b(() => {
564
593
  let e = (e) => {
565
594
  e.key === "Escape" && s();
@@ -607,7 +636,7 @@ var F = () => {
607
636
  children: "Estimated size"
608
637
  }), /* @__PURE__ */ O("dd", {
609
638
  className: "font-semibold text-text-primary",
610
- children: u(a.size)
639
+ children: d(a.size)
611
640
  })] }),
612
641
  y !== null && /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("dt", {
613
642
  className: "text-xs text-text-secondary",
@@ -628,7 +657,7 @@ var F = () => {
628
657
  children: "Match rate"
629
658
  }), /* @__PURE__ */ O("dd", {
630
659
  className: "text-text-primary",
631
- children: a.matchRate > 0 ? d(a.matchRate, 0) : "—"
660
+ children: a.matchRate > 0 ? f(a.matchRate, 0) : "—"
632
661
  })] }),
633
662
  /* @__PURE__ */ k("div", {
634
663
  className: "col-span-2 flex items-center gap-3",
@@ -728,7 +757,7 @@ var F = () => {
728
757
  }),
729
758
  /* @__PURE__ */ k("button", {
730
759
  type: "button",
731
- onClick: h,
760
+ onClick: u,
732
761
  className: "inline-flex items-center gap-1.5 rounded-md bg-action-primary-bg px-3 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
733
762
  children: [/* @__PURE__ */ O(S, { className: "h-3.5 w-3.5" }), "Use in Campaign"]
734
763
  }),