@burdenoff/microfe-headshotmarketing 2026.1205.1 → 2026.1206.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (144) hide show
  1. package/dist/generated/global-types.d.ts +3589 -380
  2. package/dist/generated/wspace-operations.d.ts +101 -3
  3. package/dist/generated/wspace-operations.js.map +1 -1
  4. package/dist/generated/wspace-types.d.ts +61782 -2332
  5. package/dist/generated/wspace-types.js.map +1 -1
  6. package/dist/headshotmarketing/components/EntityTagPicker.js +29 -28
  7. package/dist/headshotmarketing/components/EntityTagPicker.js.map +1 -1
  8. package/dist/headshotmarketing/components/InfluencerModals.js +264 -263
  9. package/dist/headshotmarketing/components/InfluencerModals.js.map +1 -1
  10. package/dist/headshotmarketing/components/QueryStateBoundary.js +31 -22
  11. package/dist/headshotmarketing/components/QueryStateBoundary.js.map +1 -1
  12. package/dist/headshotmarketing/components/StatusBadge.js +1 -1
  13. package/dist/headshotmarketing/components/StatusBadge.js.map +1 -1
  14. package/dist/headshotmarketing/components/Toast.js +3 -3
  15. package/dist/headshotmarketing/components/Toast.js.map +1 -1
  16. package/dist/headshotmarketing/components/TrackedLinksPanel.js +97 -96
  17. package/dist/headshotmarketing/components/TrackedLinksPanel.js.map +1 -1
  18. package/dist/headshotmarketing/hooks/useAssetUpload.js +41 -40
  19. package/dist/headshotmarketing/hooks/useAssetUpload.js.map +1 -1
  20. package/dist/headshotmarketing/pages/HomePage.js +6 -6
  21. package/dist/headshotmarketing/pages/HomePage.js.map +1 -1
  22. package/dist/headshotmarketing/pages/ads/AdBudgetAiPanel.js +47 -46
  23. package/dist/headshotmarketing/pages/ads/AdBudgetAiPanel.js.map +1 -1
  24. package/dist/headshotmarketing/pages/ads/AdCampaignDetailsPage.js +66 -65
  25. package/dist/headshotmarketing/pages/ads/AdCampaignDetailsPage.js.map +1 -1
  26. package/dist/headshotmarketing/pages/ads/AdCampaignsPage.js +273 -272
  27. package/dist/headshotmarketing/pages/ads/AdCampaignsPage.js.map +1 -1
  28. package/dist/headshotmarketing/pages/ads/AdCreativeTestsSection.js +3 -3
  29. package/dist/headshotmarketing/pages/ads/AdCreativeTestsSection.js.map +1 -1
  30. package/dist/headshotmarketing/pages/ads/AdCreativesPage.js +125 -124
  31. package/dist/headshotmarketing/pages/ads/AdCreativesPage.js.map +1 -1
  32. package/dist/headshotmarketing/pages/ads/AdPlatformConnectionsSection.js +33 -32
  33. package/dist/headshotmarketing/pages/ads/AdPlatformConnectionsSection.js.map +1 -1
  34. package/dist/headshotmarketing/pages/ads/AdPlatformSyncPanel.js +108 -107
  35. package/dist/headshotmarketing/pages/ads/AdPlatformSyncPanel.js.map +1 -1
  36. package/dist/headshotmarketing/pages/ads/AdReachEstimatePanel.js +65 -60
  37. package/dist/headshotmarketing/pages/ads/AdReachEstimatePanel.js.map +1 -1
  38. package/dist/headshotmarketing/pages/ads/AdsPage.js +4 -4
  39. package/dist/headshotmarketing/pages/ads/AdsPage.js.map +1 -1
  40. package/dist/headshotmarketing/pages/ads/AudiencesPage.js +287 -286
  41. package/dist/headshotmarketing/pages/ads/AudiencesPage.js.map +1 -1
  42. package/dist/headshotmarketing/pages/ads/CreateAdCampaignPage.js +59 -54
  43. package/dist/headshotmarketing/pages/ads/CreateAdCampaignPage.js.map +1 -1
  44. package/dist/headshotmarketing/pages/ads/CreateAudiencePage.js +96 -95
  45. package/dist/headshotmarketing/pages/ads/CreateAudiencePage.js.map +1 -1
  46. package/dist/headshotmarketing/pages/ai/AiDecisionCard.js +5 -5
  47. package/dist/headshotmarketing/pages/ai/AiDecisionCard.js.map +1 -1
  48. package/dist/headshotmarketing/pages/ai/AiOperationsPage.js +179 -178
  49. package/dist/headshotmarketing/pages/ai/AiOperationsPage.js.map +1 -1
  50. package/dist/headshotmarketing/pages/analytics/ReportScheduleDialog.js +156 -151
  51. package/dist/headshotmarketing/pages/analytics/ReportScheduleDialog.js.map +1 -1
  52. package/dist/headshotmarketing/pages/analytics/ReportsPage.js +222 -217
  53. package/dist/headshotmarketing/pages/analytics/ReportsPage.js.map +1 -1
  54. package/dist/headshotmarketing/pages/analytics/TouchpointLedgerCard.js +59 -58
  55. package/dist/headshotmarketing/pages/analytics/TouchpointLedgerCard.js.map +1 -1
  56. package/dist/headshotmarketing/pages/analytics/analyticsWidgets.js +152 -151
  57. package/dist/headshotmarketing/pages/analytics/analyticsWidgets.js.map +1 -1
  58. package/dist/headshotmarketing/pages/automation/AutomationPage.js +34 -33
  59. package/dist/headshotmarketing/pages/automation/AutomationPage.js.map +1 -1
  60. package/dist/headshotmarketing/pages/automation/TriggersPage.js +6 -6
  61. package/dist/headshotmarketing/pages/automation/TriggersPage.js.map +1 -1
  62. package/dist/headshotmarketing/pages/automation/WorkflowActions.js +1 -1
  63. package/dist/headshotmarketing/pages/automation/WorkflowActions.js.map +1 -1
  64. package/dist/headshotmarketing/pages/automation/WorkflowBuilderPage.js +235 -234
  65. package/dist/headshotmarketing/pages/automation/WorkflowBuilderPage.js.map +1 -1
  66. package/dist/headshotmarketing/pages/automation/WorkflowRunsPanel.js +24 -23
  67. package/dist/headshotmarketing/pages/automation/WorkflowRunsPanel.js.map +1 -1
  68. package/dist/headshotmarketing/pages/automation/WorkflowsPage.js +1 -1
  69. package/dist/headshotmarketing/pages/automation/WorkflowsPage.js.map +1 -1
  70. package/dist/headshotmarketing/pages/automation/workflowBuilderModel.js +4 -4
  71. package/dist/headshotmarketing/pages/automation/workflowBuilderModel.js.map +1 -1
  72. package/dist/headshotmarketing/pages/builder/LandingPageBuilderPage.js +339 -338
  73. package/dist/headshotmarketing/pages/builder/LandingPageBuilderPage.js.map +1 -1
  74. package/dist/headshotmarketing/pages/campaigns/CampaignAiPanel.js +95 -94
  75. package/dist/headshotmarketing/pages/campaigns/CampaignAiPanel.js.map +1 -1
  76. package/dist/headshotmarketing/pages/campaigns/CampaignDetailsPage.js +82 -81
  77. package/dist/headshotmarketing/pages/campaigns/CampaignDetailsPage.js.map +1 -1
  78. package/dist/headshotmarketing/pages/campaigns/CampaignTemplatesPage.js +107 -106
  79. package/dist/headshotmarketing/pages/campaigns/CampaignTemplatesPage.js.map +1 -1
  80. package/dist/headshotmarketing/pages/campaigns/CampaignsPage.js +104 -103
  81. package/dist/headshotmarketing/pages/campaigns/CampaignsPage.js.map +1 -1
  82. package/dist/headshotmarketing/pages/campaigns/CreateCampaignPage.js +262 -261
  83. package/dist/headshotmarketing/pages/campaigns/CreateCampaignPage.js.map +1 -1
  84. package/dist/headshotmarketing/pages/campaigns/CreateTemplateModal.js +68 -67
  85. package/dist/headshotmarketing/pages/campaigns/CreateTemplateModal.js.map +1 -1
  86. package/dist/headshotmarketing/pages/content/AIToolsPage.js +204 -203
  87. package/dist/headshotmarketing/pages/content/AIToolsPage.js.map +1 -1
  88. package/dist/headshotmarketing/pages/content/AssetLibraryPage.js +177 -176
  89. package/dist/headshotmarketing/pages/content/AssetLibraryPage.js.map +1 -1
  90. package/dist/headshotmarketing/pages/content/ContentCreationPage.js +373 -372
  91. package/dist/headshotmarketing/pages/content/ContentCreationPage.js.map +1 -1
  92. package/dist/headshotmarketing/pages/content/ContentDetailsPage.js +1 -1
  93. package/dist/headshotmarketing/pages/content/ContentDetailsPage.js.map +1 -1
  94. package/dist/headshotmarketing/pages/content/ContentLibraryCard.js +4 -4
  95. package/dist/headshotmarketing/pages/content/ContentLibraryCard.js.map +1 -1
  96. package/dist/headshotmarketing/pages/crm/ConvertLeadButton.js +51 -50
  97. package/dist/headshotmarketing/pages/crm/ConvertLeadButton.js.map +1 -1
  98. package/dist/headshotmarketing/pages/crm/CreateContactPage.js +100 -99
  99. package/dist/headshotmarketing/pages/crm/CreateContactPage.js.map +1 -1
  100. package/dist/headshotmarketing/pages/crm/CreateDealPage.js +134 -133
  101. package/dist/headshotmarketing/pages/crm/CreateDealPage.js.map +1 -1
  102. package/dist/headshotmarketing/pages/crm/CreatePipelineModal.js +66 -65
  103. package/dist/headshotmarketing/pages/crm/CreatePipelineModal.js.map +1 -1
  104. package/dist/headshotmarketing/pages/crm/CrmActions.js +229 -228
  105. package/dist/headshotmarketing/pages/crm/CrmActions.js.map +1 -1
  106. package/dist/headshotmarketing/pages/crm/DealNextActionPanel.js +62 -61
  107. package/dist/headshotmarketing/pages/crm/DealNextActionPanel.js.map +1 -1
  108. package/dist/headshotmarketing/pages/crm/LeadAiDecisionPanel.js +126 -125
  109. package/dist/headshotmarketing/pages/crm/LeadAiDecisionPanel.js.map +1 -1
  110. package/dist/headshotmarketing/pages/crm/LeadCreateModal.js +93 -92
  111. package/dist/headshotmarketing/pages/crm/LeadCreateModal.js.map +1 -1
  112. package/dist/headshotmarketing/pages/crm/PipelinePage.js +5 -5
  113. package/dist/headshotmarketing/pages/crm/PipelinePage.js.map +1 -1
  114. package/dist/headshotmarketing/pages/events/CreateEventPage.js +127 -126
  115. package/dist/headshotmarketing/pages/events/CreateEventPage.js.map +1 -1
  116. package/dist/headshotmarketing/pages/events/EventDetailsPage.js +76 -75
  117. package/dist/headshotmarketing/pages/events/EventDetailsPage.js.map +1 -1
  118. package/dist/headshotmarketing/pages/influencers/InfluencerDiscoveryPage.js +8 -8
  119. package/dist/headshotmarketing/pages/influencers/InfluencerDiscoveryPage.js.map +1 -1
  120. package/dist/headshotmarketing/pages/influencers/InfluencersPage.js +4 -4
  121. package/dist/headshotmarketing/pages/influencers/InfluencersPage.js.map +1 -1
  122. package/dist/headshotmarketing/pages/influencers/RelationshipsPage.js +4 -4
  123. package/dist/headshotmarketing/pages/influencers/RelationshipsPage.js.map +1 -1
  124. package/dist/headshotmarketing/pages/seo/SeoScorePanel.js +1 -1
  125. package/dist/headshotmarketing/pages/seo/SeoScorePanel.js.map +1 -1
  126. package/dist/headshotmarketing/pages/seo/SeoToolsPage.js +104 -103
  127. package/dist/headshotmarketing/pages/seo/SeoToolsPage.js.map +1 -1
  128. package/dist/headshotmarketing/pages/social-media/AccountsPage.js +102 -101
  129. package/dist/headshotmarketing/pages/social-media/AccountsPage.js.map +1 -1
  130. package/dist/headshotmarketing/pages/social-media/CreateAccountPage.js +59 -58
  131. package/dist/headshotmarketing/pages/social-media/CreateAccountPage.js.map +1 -1
  132. package/dist/headshotmarketing/pages/social-media/MediaDropZone.js +1 -1
  133. package/dist/headshotmarketing/pages/social-media/MediaDropZone.js.map +1 -1
  134. package/dist/headshotmarketing/pages/social-media/PostsPage.js +103 -102
  135. package/dist/headshotmarketing/pages/social-media/PostsPage.js.map +1 -1
  136. package/dist/headshotmarketing/pages/social-media/SocialMediaComposePage.js +123 -122
  137. package/dist/headshotmarketing/pages/social-media/SocialMediaComposePage.js.map +1 -1
  138. package/dist/headshotmarketing/pages/social-media/SocialMediaPage.js +4 -4
  139. package/dist/headshotmarketing/pages/social-media/SocialMediaPage.js.map +1 -1
  140. package/dist/headshotmarketing/utils/index.d.ts +1 -0
  141. package/dist/headshotmarketing/utils/readableError.d.ts +16 -0
  142. package/dist/headshotmarketing/utils/readableError.js +12 -0
  143. package/dist/headshotmarketing/utils/readableError.js.map +1 -0
  144. package/package.json +5 -3
@@ -3,45 +3,46 @@ 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, 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";
6
+ import { useCreateHeadshotmarketingAudienceMutation as a, useDeleteHeadshotmarketingAudienceMutation as o, useHeadshotmarketingAudiencesListQuery as s, useHeadshotmarketingSelectedAudienceQuery as ee, 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 te } from "../../components/EmptyState.js";
12
+ import { Modal as _ } from "../../components/Modal.js";
15
13
  import "../../components/index.js";
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 { EntityTagPicker as b } from "../../components/EntityTagPicker.js";
21
- import { useEffect as x, useMemo as oe, useState as S } from "react";
22
- import { Megaphone as C, Pencil as w, Plus as T, Trash2 as E, X as D } from "lucide-react";
23
- import { Fragment as O, jsx as k, jsxs as A } from "react/jsx-runtime";
24
- import { PagePurpose as se, ThemedSelect as j } from "@burdenoff/fe-libs/ui";
14
+ import { QueryStateBoundary as ne } from "../../components/QueryStateBoundary.js";
15
+ import { Pagination as re } from "../../components/Pagination.js";
16
+ import { useHeadshotMarketing as ie } from "../../context/HeadshotMarketingContext.js";
17
+ import { useHeadshotmarketingBootstrap as ae } from "../../hooks/useHeadshotmarketingBootstrap.js";
18
+ import { usePagination as oe } from "../../hooks/usePagination.js";
19
+ import { useRecordSelection as se } from "../../hooks/useRecordSelection.js";
20
+ import { EntityTagPicker as v } from "../../components/EntityTagPicker.js";
21
+ import { readableError as y } from "../../utils/readableError.js";
22
+ import { useEffect as b, useMemo as ce, useState as x } from "react";
23
+ import { Megaphone as S, Pencil as C, Plus as w, Trash2 as T, X as E } from "lucide-react";
24
+ import { Fragment as D, jsx as O, jsxs as k } from "react/jsx-runtime";
25
+ import { PagePurpose as le, ThemedSelect as A } from "@burdenoff/fe-libs/ui";
25
26
  // src/headshotmarketing/pages/ads/AudiencesPage.tsx
26
- var M = {
27
+ var j = {
27
28
  google_ads: "Google Ads",
28
29
  facebook: "Facebook",
29
30
  instagram: "Instagram",
30
31
  linkedin: "LinkedIn",
31
32
  twitter: "Twitter",
32
33
  tiktok: "TikTok"
33
- }, N = [
34
+ }, M = [
34
35
  "var(--color-chart-1)",
35
36
  "var(--color-chart-2)",
36
37
  "var(--color-chart-3)",
37
38
  "var(--color-chart-4)",
38
39
  "var(--color-chart-5)",
39
40
  "var(--color-chart-6)"
40
- ], P = [
41
+ ], N = [
41
42
  "all",
42
43
  "male",
43
44
  "female"
44
- ], F = {
45
+ ], P = {
45
46
  name: "",
46
47
  description: "",
47
48
  estimatedSize: "",
@@ -53,7 +54,7 @@ var M = {
53
54
  interests: "",
54
55
  platform: "google_ads"
55
56
  };
56
- function I(e) {
57
+ function F(e) {
57
58
  let t = (e) => e.split(",").map((e) => e.trim()).filter(Boolean);
58
59
  return {
59
60
  ageMin: Number(e.ageMin) || 18,
@@ -64,66 +65,66 @@ function I(e) {
64
65
  platform: e.platform
65
66
  };
66
67
  }
67
- var L = () => {
68
- let { navigate: e, basePath: t } = ne(), { refetch: n } = re(), [r, i] = S(""), [u, d] = S(""), { selectedId: f, invalidSelection: p, selectRecord: m } = ae(), h = c({
69
- variables: { id: f ?? "" },
70
- skip: !f,
68
+ var I = () => {
69
+ let { navigate: e, basePath: t } = ie(), { refetch: n } = ae(), [r, i] = x(""), [l, u] = x(""), { selectedId: d, invalidSelection: f, selectRecord: p } = se(), m = ee({
70
+ variables: { id: d ?? "" },
71
+ skip: !d,
71
72
  fetchPolicy: "network-only"
72
- }), [b, C] = S(null), [w, E] = S(!1), [D, j] = S(F), [M, N] = S(null), [P, L] = S(null), [z, B] = S(null), V = ie({ initialPageSize: 9 }), { limit: ue, offset: de, setPage: H, setTotal: U } = V;
73
- x(() => {
74
- let e = setTimeout(() => d(r), 300);
73
+ }), [v, S] = x(null), [C, T] = x(!1), [E, A] = x(P), [j, M] = x(null), [N, I] = x(null), [R, z] = x(null), B = oe({ initialPageSize: 9 }), { limit: fe, offset: pe, setPage: V, setTotal: H } = B;
74
+ b(() => {
75
+ let e = setTimeout(() => u(r), 300);
75
76
  return () => clearTimeout(e);
76
- }, [r]), x(() => {
77
- H(1);
78
- }, [u, H]);
79
- let { data: W, loading: G, error: fe, refetch: K } = s({
77
+ }, [r]), b(() => {
78
+ V(1);
79
+ }, [l, V]);
80
+ let { data: U, loading: W, error: me, refetch: G } = s({
80
81
  variables: {
81
- limit: ue,
82
- offset: de,
83
- search: u || null
82
+ limit: fe,
83
+ offset: pe,
84
+ search: l || null
84
85
  },
85
86
  errorPolicy: "all",
86
87
  notifyOnNetworkStatusChange: !0
87
- }), q = W?.headshotmarketingAudiences.total ?? 0;
88
- x(() => {
89
- U(q);
90
- }, [q, U]);
91
- 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(), [Q, { loading: me }] = l(), [he, { loading: ge }] = o(), $ = async () => {
88
+ }), K = U?.headshotmarketingAudiences.total ?? 0;
89
+ b(() => {
90
+ H(K);
91
+ }, [K, H]);
92
+ let q = ce(() => (U?.headshotmarketingAudiences.items ?? []).map((e) => h(e)), [U?.headshotmarketingAudiences.items]), J = m.data?.headshotmarketingAudience, Y = J?.id === d ? h(J) : null, [he, { loading: X }] = a(), [ge, { loading: _e }] = c(), [ve, { loading: Z }] = o(), Q = async () => {
92
93
  await Promise.all([
93
- K(),
94
+ G(),
94
95
  n(),
95
- ...f ? [h.refetch()] : []
96
+ ...d ? [m.refetch()] : []
96
97
  ]);
97
- }, _e = async () => {
98
- if (!D.name.trim()) B("Audience name is required.");
98
+ }, ye = async () => {
99
+ if (!E.name.trim()) z("Audience name is required.");
99
100
  else {
100
- B(null);
101
+ z(null);
101
102
  try {
102
- await pe({ variables: { input: {
103
- name: D.name.trim(),
104
- description: D.description || null,
105
- estimatedSize: D.estimatedSize ? Number(D.estimatedSize) : null,
106
- isActive: D.isActive,
107
- targetingCriteria: I(D)
108
- } } }), E(!1), j(F), await $();
103
+ await he({ variables: { input: {
104
+ name: E.name.trim(),
105
+ description: E.description || null,
106
+ estimatedSize: E.estimatedSize ? Number(E.estimatedSize) : null,
107
+ isActive: E.isActive,
108
+ targetingCriteria: F(E)
109
+ } } }), T(!1), A(P), await Q();
109
110
  } catch (e) {
110
- B(e instanceof Error ? e.message : "Failed to create audience.");
111
+ z(y(e, "Failed to create audience."));
111
112
  }
112
113
  }
113
- }, ve = async (e) => {
114
- B(null), C(e.id);
114
+ }, $ = async (e) => {
115
+ z(null), S(e.id);
115
116
  try {
116
- await Q({ variables: {
117
+ await ge({ variables: {
117
118
  id: e.id,
118
119
  input: { isActive: e.status !== "active" }
119
- } }), await $();
120
+ } }), await Q();
120
121
  } catch (e) {
121
- B(e instanceof Error ? e.message : "Failed to update audience.");
122
+ z(y(e, "Failed to update audience."));
122
123
  } finally {
123
- C(null);
124
+ S(null);
124
125
  }
125
- }, ye = (e) => {
126
- B(null), N({
126
+ }, be = (e) => {
127
+ z(null), M({
127
128
  id: e.id,
128
129
  form: {
129
130
  name: e.name,
@@ -138,59 +139,59 @@ var L = () => {
138
139
  platform: e.platform
139
140
  }
140
141
  });
141
- }, be = async () => {
142
- if (M) {
143
- if (!M.form.name.trim()) B("Audience name is required.");
142
+ }, xe = async () => {
143
+ if (j) {
144
+ if (!j.form.name.trim()) z("Audience name is required.");
144
145
  else {
145
- B(null);
146
+ z(null);
146
147
  try {
147
- await Q({ variables: {
148
- id: M.id,
148
+ await ge({ variables: {
149
+ id: j.id,
149
150
  input: {
150
- name: M.form.name.trim(),
151
- description: M.form.description || null,
152
- estimatedSize: M.form.estimatedSize ? Number(M.form.estimatedSize) : null,
153
- isActive: M.form.isActive,
154
- targetingCriteria: I(M.form)
151
+ name: j.form.name.trim(),
152
+ description: j.form.description || null,
153
+ estimatedSize: j.form.estimatedSize ? Number(j.form.estimatedSize) : null,
154
+ isActive: j.form.isActive,
155
+ targetingCriteria: F(j.form)
155
156
  }
156
- } }), N(null), await $();
157
+ } }), M(null), await Q();
157
158
  } catch (e) {
158
- B(e instanceof Error ? e.message : "Failed to save audience.");
159
+ z(y(e, "Failed to save audience."));
159
160
  }
160
161
  }
161
162
  }
162
- }, xe = async () => {
163
- if (P) {
164
- B(null);
163
+ }, Se = async () => {
164
+ if (N) {
165
+ z(null);
165
166
  try {
166
- await he({ variables: { id: P.id } }), f === P.id && m(null), L(null), await $();
167
+ await ve({ variables: { id: N.id } }), d === N.id && p(null), I(null), await Q();
167
168
  } catch (e) {
168
- B(e instanceof Error ? e.message : "Failed to delete audience.");
169
+ z(y(e, "Failed to delete audience."));
169
170
  }
170
171
  }
171
- }, Se = (n) => {
172
+ }, Ce = (n) => {
172
173
  let r = new URLSearchParams({
173
174
  audienceId: n.id,
174
175
  audienceName: n.name
175
176
  });
176
177
  e(`${t}/ads/campaigns/new?${r.toString()}`);
177
178
  };
178
- return /* @__PURE__ */ A(_, {
179
+ return /* @__PURE__ */ k(g, {
179
180
  title: "Audiences",
180
181
  description: "Create and manage your target audiences",
181
- actions: /* @__PURE__ */ A("button", {
182
+ actions: /* @__PURE__ */ k("button", {
182
183
  "data-tour": "headshotmarketing-audiences-create",
183
184
  onClick: () => {
184
- B(null), j(F), E(!0);
185
+ z(null), A(P), T(!0);
185
186
  },
186
187
  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",
187
- children: [/* @__PURE__ */ k(T, { className: "h-4 w-4" }), "New Audience"]
188
+ children: [/* @__PURE__ */ O(w, { className: "h-4 w-4" }), "New Audience"]
188
189
  }),
189
190
  children: [
190
- /* @__PURE__ */ k(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." }),
191
- /* @__PURE__ */ k("div", {
191
+ /* @__PURE__ */ O(le, { 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." }),
192
+ /* @__PURE__ */ O("div", {
192
193
  className: "relative max-w-md",
193
- children: /* @__PURE__ */ k("input", {
194
+ children: /* @__PURE__ */ O("input", {
194
195
  type: "text",
195
196
  value: r,
196
197
  onChange: (e) => i(e.target.value),
@@ -198,150 +199,150 @@ var L = () => {
198
199
  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)]"
199
200
  })
200
201
  }),
201
- z && !w && !M && /* @__PURE__ */ k("div", {
202
+ R && !C && !j && /* @__PURE__ */ O("div", {
202
203
  role: "alert",
203
204
  className: "rounded-lg border border-status-error-border/30 bg-status-error-bg/10 px-4 py-3 text-sm text-status-error-text",
204
- children: z
205
+ children: R
205
206
  }),
206
- /* @__PURE__ */ k(ee, {
207
- loading: G,
208
- error: fe,
209
- onRetry: K,
210
- hasData: !!W,
211
- children: J.length === 0 ? /* @__PURE__ */ k(v, {
212
- illustration: q === 0 ? "empty-people" : "empty-search",
213
- title: q === 0 ? "No audiences yet" : "No audiences match your search",
214
- description: q === 0 ? "Create your first audience to target the right people in your campaigns." : "Try a different search term.",
215
- action: q === 0 ? /* @__PURE__ */ A("button", {
207
+ /* @__PURE__ */ O(ne, {
208
+ loading: W,
209
+ error: me,
210
+ onRetry: G,
211
+ hasData: !!U,
212
+ children: q.length === 0 ? /* @__PURE__ */ O(te, {
213
+ illustration: K === 0 ? "empty-people" : "empty-search",
214
+ title: K === 0 ? "No audiences yet" : "No audiences match your search",
215
+ description: K === 0 ? "Create your first audience to target the right people in your campaigns." : "Try a different search term.",
216
+ action: K === 0 ? /* @__PURE__ */ k("button", {
216
217
  onClick: () => {
217
- B(null), j(F), E(!0);
218
+ z(null), A(P), T(!0);
218
219
  },
219
220
  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",
220
- children: [/* @__PURE__ */ k(T, { className: "h-4 w-4" }), "Create Audience"]
221
+ children: [/* @__PURE__ */ O(w, { className: "h-4 w-4" }), "Create Audience"]
221
222
  }) : void 0
222
- }) : /* @__PURE__ */ A(O, { children: [/* @__PURE__ */ k("div", {
223
+ }) : /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ O("div", {
223
224
  className: "grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",
224
- children: J.map((e) => /* @__PURE__ */ k(ce, {
225
+ children: q.map((e) => /* @__PURE__ */ O(ue, {
225
226
  audience: e,
226
- selected: f === e.id,
227
- toggling: b === e.id,
228
- onOpen: () => m(e.id),
229
- onToggleActive: () => ve(e)
227
+ selected: d === e.id,
228
+ toggling: v === e.id,
229
+ onOpen: () => p(e.id),
230
+ onToggleActive: () => $(e)
230
231
  }, e.id))
231
- }), /* @__PURE__ */ k(te, {
232
- page: V.page,
233
- pageSize: V.pageSize,
234
- total: V.total,
235
- onPageChange: V.setPage,
236
- onPageSizeChange: V.setPageSize,
232
+ }), /* @__PURE__ */ O(re, {
233
+ page: B.page,
234
+ pageSize: B.pageSize,
235
+ total: B.total,
236
+ onPageChange: B.setPage,
237
+ onPageSizeChange: B.setPageSize,
237
238
  pageSizeOptions: [
238
239
  9,
239
240
  18,
240
241
  36
241
242
  ],
242
- disabled: G,
243
+ disabled: W,
243
244
  hideWhenSinglePage: !0
244
245
  })] })
245
246
  }),
246
- (f || p) && !X && /* @__PURE__ */ A("section", {
247
+ (d || f) && !Y && /* @__PURE__ */ k("section", {
247
248
  "aria-label": "Selected audience",
248
249
  className: "rounded-lg border border-border-subtle bg-bg-surface p-4",
249
250
  children: [
250
- /* @__PURE__ */ k("button", {
251
+ /* @__PURE__ */ O("button", {
251
252
  type: "button",
252
- onClick: () => m(null),
253
+ onClick: () => p(null),
253
254
  children: "Close selection"
254
255
  }),
255
- /* @__PURE__ */ k("p", {
256
- role: h.loading ? "status" : "alert",
257
- children: h.loading ? "Loading audience…" : "This audience is unavailable or you do not have access."
256
+ /* @__PURE__ */ O("p", {
257
+ role: m.loading ? "status" : "alert",
258
+ children: m.loading ? "Loading audience…" : "This audience is unavailable or you do not have access."
258
259
  }),
259
- h.error && /* @__PURE__ */ k("button", {
260
+ m.error && /* @__PURE__ */ O("button", {
260
261
  type: "button",
261
- onClick: () => void h.refetch(),
262
+ onClick: () => void m.refetch(),
262
263
  children: "Retry"
263
264
  })
264
265
  ]
265
266
  }),
266
- X && /* @__PURE__ */ k(le, {
267
- audience: X,
268
- toggling: b === X.id,
269
- onClose: () => m(null),
270
- onToggleActive: () => ve(X),
271
- onEdit: () => ye(X),
272
- onUseInCampaign: () => Se(X),
273
- onDelete: () => L(X)
267
+ Y && /* @__PURE__ */ O(de, {
268
+ audience: Y,
269
+ toggling: v === Y.id,
270
+ onClose: () => p(null),
271
+ onToggleActive: () => $(Y),
272
+ onEdit: () => be(Y),
273
+ onUseInCampaign: () => Ce(Y),
274
+ onDelete: () => I(Y)
274
275
  }),
275
- /* @__PURE__ */ k(y, {
276
- open: w,
277
- onClose: () => E(!1),
276
+ /* @__PURE__ */ O(_, {
277
+ open: C,
278
+ onClose: () => T(!1),
278
279
  title: "Create Audience",
279
280
  description: "Define who your ads should reach",
280
281
  size: "lg",
281
- footer: /* @__PURE__ */ A(O, { children: [/* @__PURE__ */ k("button", {
282
- onClick: () => E(!1),
282
+ footer: /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ O("button", {
283
+ onClick: () => T(!1),
283
284
  className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
284
285
  children: "Cancel"
285
- }), /* @__PURE__ */ k("button", {
286
- onClick: _e,
287
- disabled: Z,
286
+ }), /* @__PURE__ */ O("button", {
287
+ onClick: ye,
288
+ disabled: X,
288
289
  className: "rounded-md bg-foreground px-4 py-2 text-sm font-medium text-background hover:bg-foreground/90 disabled:opacity-60",
289
- children: Z ? "Creating..." : "Create Audience"
290
+ children: X ? "Creating..." : "Create Audience"
290
291
  })] }),
291
- children: /* @__PURE__ */ k(R, {
292
- form: D,
293
- onChange: j,
294
- error: z
292
+ children: /* @__PURE__ */ O(L, {
293
+ form: E,
294
+ onChange: A,
295
+ error: R
295
296
  })
296
297
  }),
297
- /* @__PURE__ */ k(y, {
298
- open: M !== null,
299
- onClose: () => N(null),
298
+ /* @__PURE__ */ O(_, {
299
+ open: j !== null,
300
+ onClose: () => M(null),
300
301
  title: "Edit Audience",
301
302
  description: "Update audience targeting",
302
303
  size: "lg",
303
- footer: /* @__PURE__ */ A(O, { children: [/* @__PURE__ */ k("button", {
304
- onClick: () => N(null),
304
+ footer: /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ O("button", {
305
+ onClick: () => M(null),
305
306
  className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
306
307
  children: "Cancel"
307
- }), /* @__PURE__ */ k("button", {
308
- onClick: be,
309
- disabled: me,
308
+ }), /* @__PURE__ */ O("button", {
309
+ onClick: xe,
310
+ disabled: _e,
310
311
  className: "rounded-md bg-foreground px-4 py-2 text-sm font-medium text-background hover:bg-foreground/90 disabled:opacity-60",
311
- children: me ? "Saving..." : "Save Changes"
312
+ children: _e ? "Saving..." : "Save Changes"
312
313
  })] }),
313
- children: M && /* @__PURE__ */ k(R, {
314
- form: M.form,
315
- onChange: (e) => N({
316
- ...M,
314
+ children: j && /* @__PURE__ */ O(L, {
315
+ form: j.form,
316
+ onChange: (e) => M({
317
+ ...j,
317
318
  form: e
318
319
  }),
319
- error: z
320
+ error: R
320
321
  })
321
322
  }),
322
- /* @__PURE__ */ k(y, {
323
- open: P !== null,
324
- onClose: () => L(null),
323
+ /* @__PURE__ */ O(_, {
324
+ open: N !== null,
325
+ onClose: () => I(null),
325
326
  title: "Delete Audience",
326
327
  size: "sm",
327
- footer: /* @__PURE__ */ A(O, { children: [/* @__PURE__ */ k("button", {
328
- onClick: () => L(null),
328
+ footer: /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ O("button", {
329
+ onClick: () => I(null),
329
330
  className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
330
331
  children: "Cancel"
331
- }), /* @__PURE__ */ k("button", {
332
- onClick: xe,
333
- disabled: ge,
332
+ }), /* @__PURE__ */ O("button", {
333
+ onClick: Se,
334
+ disabled: Z,
334
335
  className: "rounded-md bg-status-error-text px-4 py-2 text-sm font-medium text-background hover:opacity-90 disabled:opacity-60",
335
- children: ge ? "Deleting..." : "Delete"
336
+ children: Z ? "Deleting..." : "Delete"
336
337
  })] }),
337
- children: /* @__PURE__ */ A("p", {
338
+ children: /* @__PURE__ */ k("p", {
338
339
  className: "text-sm text-text-secondary",
339
340
  children: [
340
341
  "Are you sure you want to delete",
341
342
  " ",
342
- /* @__PURE__ */ k("span", {
343
+ /* @__PURE__ */ O("span", {
343
344
  className: "font-semibold text-text-primary",
344
- children: P?.name
345
+ children: N?.name
345
346
  }),
346
347
  "? This action cannot be undone."
347
348
  ]
@@ -349,7 +350,7 @@ var L = () => {
349
350
  })
350
351
  ]
351
352
  });
352
- }, R = ({ form: e, onChange: t, error: n }) => {
353
+ }, L = ({ form: e, onChange: t, error: n }) => {
353
354
  let r = (n) => {
354
355
  let r = e.genders.includes(n) ? e.genders.filter((e) => e !== n) : [...e.genders, n];
355
356
  t({
@@ -357,13 +358,13 @@ var L = () => {
357
358
  genders: r
358
359
  });
359
360
  };
360
- return /* @__PURE__ */ A("div", {
361
+ return /* @__PURE__ */ k("div", {
361
362
  className: "space-y-4",
362
363
  children: [
363
- /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("label", {
364
+ /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("label", {
364
365
  className: "mb-1.5 block text-sm font-medium text-text-primary",
365
366
  children: "Name"
366
- }), /* @__PURE__ */ k("input", {
367
+ }), /* @__PURE__ */ O("input", {
367
368
  type: "text",
368
369
  value: e.name,
369
370
  onChange: (n) => t({
@@ -373,10 +374,10 @@ var L = () => {
373
374
  placeholder: "e.g., Returning Visitors — US",
374
375
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-4 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
375
376
  })] }),
376
- /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("label", {
377
+ /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("label", {
377
378
  className: "mb-1.5 block text-sm font-medium text-text-primary",
378
379
  children: "Description"
379
- }), /* @__PURE__ */ k("textarea", {
380
+ }), /* @__PURE__ */ O("textarea", {
380
381
  value: e.description,
381
382
  onChange: (n) => t({
382
383
  ...e,
@@ -385,13 +386,13 @@ var L = () => {
385
386
  rows: 2,
386
387
  className: "w-full resize-none rounded-md border border-border-subtle bg-bg-surface px-4 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
387
388
  })] }),
388
- /* @__PURE__ */ A("div", {
389
+ /* @__PURE__ */ k("div", {
389
390
  className: "grid grid-cols-1 gap-4 sm:grid-cols-3",
390
391
  children: [
391
- /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("label", {
392
+ /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("label", {
392
393
  className: "mb-1.5 block text-sm font-medium text-text-primary",
393
394
  children: "Estimated Size"
394
- }), /* @__PURE__ */ k("input", {
395
+ }), /* @__PURE__ */ O("input", {
395
396
  type: "number",
396
397
  value: e.estimatedSize,
397
398
  onChange: (n) => t({
@@ -400,10 +401,10 @@ var L = () => {
400
401
  }),
401
402
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-4 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
402
403
  })] }),
403
- /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("label", {
404
+ /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("label", {
404
405
  className: "mb-1.5 block text-sm font-medium text-text-primary",
405
406
  children: "Age Min"
406
- }), /* @__PURE__ */ k("input", {
407
+ }), /* @__PURE__ */ O("input", {
407
408
  type: "number",
408
409
  value: e.ageMin,
409
410
  onChange: (n) => t({
@@ -412,10 +413,10 @@ var L = () => {
412
413
  }),
413
414
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-4 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
414
415
  })] }),
415
- /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("label", {
416
+ /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("label", {
416
417
  className: "mb-1.5 block text-sm font-medium text-text-primary",
417
418
  children: "Age Max"
418
- }), /* @__PURE__ */ k("input", {
419
+ }), /* @__PURE__ */ O("input", {
419
420
  type: "number",
420
421
  value: e.ageMax,
421
422
  onChange: (n) => t({
@@ -426,24 +427,24 @@ var L = () => {
426
427
  })] })
427
428
  ]
428
429
  }),
429
- /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("label", {
430
+ /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("label", {
430
431
  className: "mb-1.5 block text-sm font-medium text-text-primary",
431
432
  children: "Gender"
432
- }), /* @__PURE__ */ k("div", {
433
+ }), /* @__PURE__ */ O("div", {
433
434
  className: "flex flex-wrap gap-2",
434
- children: P.map((t) => /* @__PURE__ */ k("button", {
435
+ children: N.map((t) => /* @__PURE__ */ O("button", {
435
436
  type: "button",
436
437
  onClick: () => r(t),
437
- 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"),
438
+ 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"),
438
439
  children: t
439
440
  }, t))
440
441
  })] }),
441
- /* @__PURE__ */ A("div", {
442
+ /* @__PURE__ */ k("div", {
442
443
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
443
- children: [/* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("label", {
444
+ children: [/* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("label", {
444
445
  className: "mb-1.5 block text-sm font-medium text-text-primary",
445
446
  children: "Locations"
446
- }), /* @__PURE__ */ k("input", {
447
+ }), /* @__PURE__ */ O("input", {
447
448
  type: "text",
448
449
  value: e.locations,
449
450
  onChange: (n) => t({
@@ -452,10 +453,10 @@ var L = () => {
452
453
  }),
453
454
  placeholder: "Comma-separated",
454
455
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-4 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
455
- })] }), /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("label", {
456
+ })] }), /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("label", {
456
457
  className: "mb-1.5 block text-sm font-medium text-text-primary",
457
458
  children: "Platform"
458
- }), /* @__PURE__ */ A(j, {
459
+ }), /* @__PURE__ */ k(A, {
459
460
  value: e.platform,
460
461
  onChange: (n) => t({
461
462
  ...e,
@@ -463,33 +464,33 @@ var L = () => {
463
464
  }),
464
465
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-4 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
465
466
  children: [
466
- /* @__PURE__ */ k("option", {
467
+ /* @__PURE__ */ O("option", {
467
468
  value: "google_ads",
468
469
  children: "Google Ads"
469
470
  }),
470
- /* @__PURE__ */ k("option", {
471
+ /* @__PURE__ */ O("option", {
471
472
  value: "facebook",
472
473
  children: "Facebook"
473
474
  }),
474
- /* @__PURE__ */ k("option", {
475
+ /* @__PURE__ */ O("option", {
475
476
  value: "instagram",
476
477
  children: "Instagram"
477
478
  }),
478
- /* @__PURE__ */ k("option", {
479
+ /* @__PURE__ */ O("option", {
479
480
  value: "linkedin",
480
481
  children: "LinkedIn"
481
482
  }),
482
- /* @__PURE__ */ k("option", {
483
+ /* @__PURE__ */ O("option", {
483
484
  value: "twitter",
484
485
  children: "Twitter"
485
486
  })
486
487
  ]
487
488
  })] })]
488
489
  }),
489
- /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("label", {
490
+ /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("label", {
490
491
  className: "mb-1.5 block text-sm font-medium text-text-primary",
491
492
  children: "Interests"
492
- }), /* @__PURE__ */ k("input", {
493
+ }), /* @__PURE__ */ O("input", {
493
494
  type: "text",
494
495
  value: e.interests,
495
496
  onChange: (n) => t({
@@ -499,9 +500,9 @@ var L = () => {
499
500
  placeholder: "Comma-separated interests",
500
501
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-4 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
501
502
  })] }),
502
- /* @__PURE__ */ A("label", {
503
+ /* @__PURE__ */ k("label", {
503
504
  className: "flex items-center gap-2 text-sm text-text-primary",
504
- children: [/* @__PURE__ */ k("input", {
505
+ children: [/* @__PURE__ */ O("input", {
505
506
  type: "checkbox",
506
507
  checked: e.isActive,
507
508
  onChange: (n) => t({
@@ -511,15 +512,15 @@ var L = () => {
511
512
  className: "h-4 w-4 rounded border-border-subtle"
512
513
  }), "Active"]
513
514
  }),
514
- n && /* @__PURE__ */ k("p", {
515
+ n && /* @__PURE__ */ O("p", {
515
516
  className: "text-sm text-status-error-text",
516
517
  children: n
517
518
  })
518
519
  ]
519
520
  });
520
- }, z = ({ audience: e, disabled: t, onToggle: n }) => {
521
+ }, R = ({ audience: e, disabled: t, onToggle: n }) => {
521
522
  let r = e.status === "active";
522
- return /* @__PURE__ */ k("button", {
523
+ return /* @__PURE__ */ O("button", {
523
524
  type: "button",
524
525
  role: "switch",
525
526
  "aria-checked": r,
@@ -528,15 +529,15 @@ var L = () => {
528
529
  onClick: (e) => {
529
530
  e.stopPropagation(), n();
530
531
  },
531
- 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"),
532
- children: /* @__PURE__ */ k("span", {
532
+ 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"),
533
+ children: /* @__PURE__ */ O("span", {
533
534
  "aria-hidden": "true",
534
- className: u("inline-block h-4 w-4 rounded-full bg-bg-surface shadow transition-transform", r ? "translate-x-6" : "translate-x-1")
535
+ className: l("inline-block h-4 w-4 rounded-full bg-bg-surface shadow transition-transform", r ? "translate-x-6" : "translate-x-1")
535
536
  })
536
537
  });
537
- }, ce = ({ audience: e, selected: t, toggling: n, onOpen: r, onToggleActive: i }) => {
538
- let a = m(e), o = h(e.usedInCampaignCount);
539
- return /* @__PURE__ */ A("div", {
538
+ }, ue = ({ audience: e, selected: t, toggling: n, onOpen: r, onToggleActive: i }) => {
539
+ let a = p(e), o = m(e.usedInCampaignCount);
540
+ return /* @__PURE__ */ k("div", {
540
541
  role: "button",
541
542
  tabIndex: 0,
542
543
  "aria-label": `Open ${e.name} details`,
@@ -544,37 +545,37 @@ var L = () => {
544
545
  onKeyDown: (e) => {
545
546
  (e.key === "Enter" || e.key === " ") && (e.preventDefault(), r());
546
547
  },
547
- 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"),
548
+ 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"),
548
549
  children: [
549
- /* @__PURE__ */ A("div", {
550
+ /* @__PURE__ */ k("div", {
550
551
  className: "flex items-start justify-between gap-3",
551
- children: [/* @__PURE__ */ A("div", {
552
+ children: [/* @__PURE__ */ k("div", {
552
553
  className: "min-w-0",
553
- children: [/* @__PURE__ */ k("h3", {
554
+ children: [/* @__PURE__ */ O("h3", {
554
555
  className: "truncate text-sm font-semibold text-text-primary",
555
556
  children: e.name
556
- }), /* @__PURE__ */ k("p", {
557
+ }), /* @__PURE__ */ O("p", {
557
558
  className: "mt-1 text-2xl font-semibold tabular-nums text-text-primary",
558
- children: d(e.size)
559
+ children: u(e.size)
559
560
  })]
560
- }), /* @__PURE__ */ A("div", {
561
+ }), /* @__PURE__ */ k("div", {
561
562
  className: "flex flex-col items-end gap-1",
562
- children: [/* @__PURE__ */ k(z, {
563
+ children: [/* @__PURE__ */ O(R, {
563
564
  audience: e,
564
565
  disabled: n,
565
566
  onToggle: i
566
- }), /* @__PURE__ */ k("span", {
567
+ }), /* @__PURE__ */ O("span", {
567
568
  className: "text-xs text-text-secondary",
568
569
  children: e.status === "active" ? "Active" : "Inactive"
569
570
  })]
570
571
  })]
571
572
  }),
572
- /* @__PURE__ */ A("div", {
573
+ /* @__PURE__ */ k("div", {
573
574
  className: "flex flex-wrap gap-1.5 border-t border-border-subtle pt-3",
574
- children: [a.slice(0, 4).map((e) => /* @__PURE__ */ k("span", {
575
+ children: [a.slice(0, 4).map((e) => /* @__PURE__ */ O("span", {
575
576
  className: "rounded-full border border-border-subtle px-2 py-0.5 text-xs text-text-secondary",
576
577
  children: e
577
- }, e)), a.length > 4 && /* @__PURE__ */ A("span", {
578
+ }, e)), a.length > 4 && /* @__PURE__ */ k("span", {
578
579
  className: "px-1 py-0.5 text-xs text-text-secondary",
579
580
  children: [
580
581
  "+",
@@ -583,124 +584,124 @@ var L = () => {
583
584
  ]
584
585
  })]
585
586
  }),
586
- o !== null && /* @__PURE__ */ k("p", {
587
+ o !== null && /* @__PURE__ */ O("p", {
587
588
  className: "border-t border-border-subtle pt-3 text-xs text-text-secondary",
588
589
  children: o
589
590
  })
590
591
  ]
591
592
  });
592
- }, le = ({ audience: a, toggling: o, onClose: s, onToggleActive: c, onEdit: l, onUseInCampaign: u, onDelete: g }) => {
593
- let _ = p(a), v = m(a), y = h(a.usedInCampaignCount);
594
- return x(() => {
593
+ }, de = ({ audience: a, toggling: o, onClose: s, onToggleActive: ee, onEdit: c, onUseInCampaign: l, onDelete: h }) => {
594
+ let g = f(a), te = p(a), _ = m(a.usedInCampaignCount);
595
+ return b(() => {
595
596
  let e = (e) => {
596
597
  e.key === "Escape" && s();
597
598
  };
598
599
  return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
599
- }, [s]), /* @__PURE__ */ A("aside", {
600
+ }, [s]), /* @__PURE__ */ k("aside", {
600
601
  role: "dialog",
601
602
  "aria-modal": "false",
602
603
  "aria-labelledby": "audience-drawer-title",
603
604
  className: "fixed inset-y-0 end-0 z-40 flex w-full flex-col overflow-y-auto border-s border-border-seam bg-bg-surface shadow-2xl sm:w-[380px]",
604
- children: [/* @__PURE__ */ A("div", {
605
+ children: [/* @__PURE__ */ k("div", {
605
606
  className: "flex items-start justify-between gap-3 border-b border-border-seam p-5",
606
- children: [/* @__PURE__ */ A("div", {
607
+ children: [/* @__PURE__ */ k("div", {
607
608
  className: "min-w-0",
608
609
  children: [
609
- /* @__PURE__ */ k("p", {
610
+ /* @__PURE__ */ O("p", {
610
611
  className: "text-xs uppercase tracking-wide text-text-secondary",
611
612
  children: "Audience"
612
613
  }),
613
- /* @__PURE__ */ k("h2", {
614
+ /* @__PURE__ */ O("h2", {
614
615
  id: "audience-drawer-title",
615
616
  className: "truncate text-lg font-semibold text-text-primary",
616
617
  children: a.name
617
618
  }),
618
- a.description && /* @__PURE__ */ k("p", {
619
+ a.description && /* @__PURE__ */ O("p", {
619
620
  className: "mt-1 text-sm text-text-secondary",
620
621
  children: a.description
621
622
  })
622
623
  ]
623
- }), /* @__PURE__ */ k("button", {
624
+ }), /* @__PURE__ */ O("button", {
624
625
  type: "button",
625
626
  onClick: s,
626
627
  "aria-label": "Close audience details",
627
628
  className: "rounded-md p-1.5 text-text-secondary hover:bg-bg-sunken hover:text-text-primary",
628
- children: /* @__PURE__ */ k(D, { className: "h-5 w-5" })
629
+ children: /* @__PURE__ */ O(E, { className: "h-5 w-5" })
629
630
  })]
630
- }), /* @__PURE__ */ A("div", {
631
+ }), /* @__PURE__ */ k("div", {
631
632
  className: "space-y-6 p-5",
632
633
  children: [
633
- /* @__PURE__ */ A("dl", {
634
+ /* @__PURE__ */ k("dl", {
634
635
  className: "grid grid-cols-2 gap-3 text-sm",
635
636
  children: [
636
- /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("dt", {
637
+ /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("dt", {
637
638
  className: "text-xs text-text-secondary",
638
639
  children: "Estimated size"
639
- }), /* @__PURE__ */ k("dd", {
640
+ }), /* @__PURE__ */ O("dd", {
640
641
  className: "font-semibold text-text-primary",
641
- children: d(a.size)
642
+ children: u(a.size)
642
643
  })] }),
643
- y !== null && /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("dt", {
644
+ _ !== null && /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("dt", {
644
645
  className: "text-xs text-text-secondary",
645
646
  children: "Usage"
646
- }), /* @__PURE__ */ k("dd", {
647
+ }), /* @__PURE__ */ O("dd", {
647
648
  className: "font-semibold text-text-primary",
648
- children: y
649
+ children: _
649
650
  })] }),
650
- /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("dt", {
651
+ /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("dt", {
651
652
  className: "text-xs text-text-secondary",
652
653
  children: "Platform"
653
- }), /* @__PURE__ */ k("dd", {
654
+ }), /* @__PURE__ */ O("dd", {
654
655
  className: "text-text-primary",
655
- children: M[a.platform] ?? a.platform
656
+ children: j[a.platform] ?? a.platform
656
657
  })] }),
657
- /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("dt", {
658
+ /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("dt", {
658
659
  className: "text-xs text-text-secondary",
659
660
  children: "Match rate"
660
- }), /* @__PURE__ */ k("dd", {
661
+ }), /* @__PURE__ */ O("dd", {
661
662
  className: "text-text-primary",
662
- children: a.matchRate > 0 ? f(a.matchRate, 0) : "—"
663
+ children: a.matchRate > 0 ? d(a.matchRate, 0) : "—"
663
664
  })] }),
664
- /* @__PURE__ */ A("div", {
665
+ /* @__PURE__ */ k("div", {
665
666
  className: "col-span-2 flex items-center gap-3",
666
- children: [/* @__PURE__ */ k(z, {
667
+ children: [/* @__PURE__ */ O(R, {
667
668
  audience: a,
668
669
  disabled: o,
669
- onToggle: c
670
- }), /* @__PURE__ */ k("span", {
670
+ onToggle: ee
671
+ }), /* @__PURE__ */ O("span", {
671
672
  className: "text-sm text-text-primary",
672
673
  children: a.status === "active" ? "Active" : "Inactive"
673
674
  })]
674
675
  })
675
676
  ]
676
677
  }),
677
- /* @__PURE__ */ A("section", {
678
+ /* @__PURE__ */ k("section", {
678
679
  "aria-labelledby": "audience-demographics-title",
679
680
  children: [
680
- /* @__PURE__ */ k("h3", {
681
+ /* @__PURE__ */ O("h3", {
681
682
  id: "audience-demographics-title",
682
683
  className: "text-sm font-semibold text-text-primary",
683
684
  children: "Demographics"
684
685
  }),
685
- /* @__PURE__ */ k("p", {
686
+ /* @__PURE__ */ O("p", {
686
687
  className: "mt-0.5 text-xs text-text-secondary",
687
688
  children: "Targeted age span by bracket"
688
689
  }),
689
- _.length > 0 ? /* @__PURE__ */ A(O, { children: [/* @__PURE__ */ k("div", {
690
+ g.length > 0 ? /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ O("div", {
690
691
  className: "h-48",
691
- children: /* @__PURE__ */ k(r, {
692
+ children: /* @__PURE__ */ O(r, {
692
693
  width: "100%",
693
694
  height: "100%",
694
- children: /* @__PURE__ */ A(e, { children: [/* @__PURE__ */ k(t, {
695
- data: _,
695
+ children: /* @__PURE__ */ k(e, { children: [/* @__PURE__ */ O(t, {
696
+ data: g,
696
697
  dataKey: "percent",
697
698
  nameKey: "label",
698
699
  innerRadius: "58%",
699
700
  outerRadius: "90%",
700
701
  paddingAngle: 2,
701
702
  stroke: "var(--color-card)",
702
- children: _.map((e, t) => /* @__PURE__ */ k(n, { fill: N[t % N.length] }, e.label))
703
- }), /* @__PURE__ */ k(i, {
703
+ children: g.map((e, t) => /* @__PURE__ */ O(n, { fill: M[t % M.length] }, e.label))
704
+ }), /* @__PURE__ */ O(i, {
704
705
  formatter: (e) => `${e.toFixed(0)}%`,
705
706
  contentStyle: {
706
707
  backgroundColor: "var(--color-card)",
@@ -708,73 +709,73 @@ var L = () => {
708
709
  }
709
710
  })] })
710
711
  })
711
- }), /* @__PURE__ */ k("ul", {
712
+ }), /* @__PURE__ */ O("ul", {
712
713
  className: "grid grid-cols-2 gap-1.5 text-xs",
713
- children: _.map((e, t) => /* @__PURE__ */ A("li", {
714
+ children: g.map((e, t) => /* @__PURE__ */ k("li", {
714
715
  className: "flex items-center gap-2",
715
716
  children: [
716
- /* @__PURE__ */ k("span", {
717
+ /* @__PURE__ */ O("span", {
717
718
  "aria-hidden": "true",
718
719
  className: "h-2.5 w-2.5 rounded-full",
719
- style: { backgroundColor: N[t % N.length] }
720
+ style: { backgroundColor: M[t % M.length] }
720
721
  }),
721
- /* @__PURE__ */ k("span", {
722
+ /* @__PURE__ */ O("span", {
722
723
  className: "text-text-secondary",
723
724
  children: e.label
724
725
  }),
725
- /* @__PURE__ */ A("span", {
726
+ /* @__PURE__ */ k("span", {
726
727
  className: "ms-auto tabular-nums text-text-primary",
727
728
  children: [e.percent.toFixed(0), "%"]
728
729
  })
729
730
  ]
730
731
  }, e.label))
731
- })] }) : /* @__PURE__ */ k("p", {
732
+ })] }) : /* @__PURE__ */ O("p", {
732
733
  className: "mt-2 text-sm text-text-secondary",
733
734
  children: "No age targeting set."
734
735
  })
735
736
  ]
736
737
  }),
737
- /* @__PURE__ */ A("section", {
738
+ /* @__PURE__ */ k("section", {
738
739
  "aria-labelledby": "audience-criteria-title",
739
- children: [/* @__PURE__ */ k("h3", {
740
+ children: [/* @__PURE__ */ O("h3", {
740
741
  id: "audience-criteria-title",
741
742
  className: "border-b border-border-subtle pb-2 text-sm font-semibold text-text-primary",
742
743
  children: "Criteria"
743
- }), /* @__PURE__ */ k("ul", {
744
+ }), /* @__PURE__ */ O("ul", {
744
745
  className: "mt-3 flex flex-wrap gap-2",
745
- children: v.map((e) => /* @__PURE__ */ k("li", {
746
+ children: te.map((e) => /* @__PURE__ */ O("li", {
746
747
  className: "rounded-full border border-border-subtle bg-bg-sunken px-2.5 py-1 text-xs text-text-primary",
747
748
  children: e
748
749
  }, e))
749
750
  })]
750
751
  }),
751
- /* @__PURE__ */ k("section", {
752
+ /* @__PURE__ */ O("section", {
752
753
  className: "border-t border-border-subtle pt-4",
753
- children: /* @__PURE__ */ k(b, {
754
+ children: /* @__PURE__ */ O(v, {
754
755
  entityType: "HEADSHOTMARKETING_AUDIENCE",
755
756
  entityId: a.id
756
757
  })
757
758
  }),
758
- /* @__PURE__ */ A("div", {
759
+ /* @__PURE__ */ k("div", {
759
760
  className: "flex flex-wrap gap-2 border-t border-border-subtle pt-4",
760
761
  children: [
761
- /* @__PURE__ */ A("button", {
762
+ /* @__PURE__ */ k("button", {
762
763
  type: "button",
763
- onClick: l,
764
+ onClick: c,
764
765
  className: "inline-flex items-center gap-1.5 rounded-md border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
765
- children: [/* @__PURE__ */ k(w, { className: "h-3.5 w-3.5" }), "Edit"]
766
+ children: [/* @__PURE__ */ O(C, { className: "h-3.5 w-3.5" }), "Edit"]
766
767
  }),
767
- /* @__PURE__ */ A("button", {
768
+ /* @__PURE__ */ k("button", {
768
769
  type: "button",
769
- onClick: u,
770
+ onClick: l,
770
771
  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",
771
- children: [/* @__PURE__ */ k(C, { className: "h-3.5 w-3.5" }), "Use in Campaign"]
772
+ children: [/* @__PURE__ */ O(S, { className: "h-3.5 w-3.5" }), "Use in Campaign"]
772
773
  }),
773
- /* @__PURE__ */ A("button", {
774
+ /* @__PURE__ */ k("button", {
774
775
  type: "button",
775
- onClick: g,
776
+ onClick: h,
776
777
  className: "inline-flex items-center gap-1.5 rounded-md border border-border-subtle px-3 py-2 text-sm font-medium text-status-error-text hover:bg-bg-sunken",
777
- children: [/* @__PURE__ */ k(E, { className: "h-3.5 w-3.5" }), "Delete"]
778
+ children: [/* @__PURE__ */ O(T, { className: "h-3.5 w-3.5" }), "Delete"]
778
779
  })
779
780
  ]
780
781
  })
@@ -782,6 +783,6 @@ var L = () => {
782
783
  })]
783
784
  });
784
785
  };
785
- export { L as AudiencesPage };
786
+ export { I as AudiencesPage };
786
787
 
787
788
  //# sourceMappingURL=AudiencesPage.js.map