@burdenoff/microfe-headshotmarketing 2026.1201.1 → 2026.1202.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 (161) hide show
  1. package/dist/headshotmarketing/components/ActionMenu.js +1 -1
  2. package/dist/headshotmarketing/components/ActionMenu.js.map +1 -1
  3. package/dist/headshotmarketing/components/AssetUploadButton.js +35 -23
  4. package/dist/headshotmarketing/components/AssetUploadButton.js.map +1 -1
  5. package/dist/headshotmarketing/components/DataTable.js +33 -33
  6. package/dist/headshotmarketing/components/DataTable.js.map +1 -1
  7. package/dist/headshotmarketing/components/EmptyState.d.ts +15 -0
  8. package/dist/headshotmarketing/components/EmptyState.js +35 -15
  9. package/dist/headshotmarketing/components/EmptyState.js.map +1 -1
  10. package/dist/headshotmarketing/components/FilterBar.js +2 -2
  11. package/dist/headshotmarketing/components/FilterBar.js.map +1 -1
  12. package/dist/headshotmarketing/components/InfluencerModals.js +96 -95
  13. package/dist/headshotmarketing/components/InfluencerModals.js.map +1 -1
  14. package/dist/headshotmarketing/components/Pagination.js +38 -37
  15. package/dist/headshotmarketing/components/Pagination.js.map +1 -1
  16. package/dist/headshotmarketing/components/TagChipsInput.js +1 -1
  17. package/dist/headshotmarketing/components/TagChipsInput.js.map +1 -1
  18. package/dist/headshotmarketing/components/Toast.js +1 -1
  19. package/dist/headshotmarketing/components/Toast.js.map +1 -1
  20. package/dist/headshotmarketing/components/UploadAudienceSelect.d.ts +7 -0
  21. package/dist/headshotmarketing/components/UploadAudienceSelect.js +40 -0
  22. package/dist/headshotmarketing/components/UploadAudienceSelect.js.map +1 -0
  23. package/dist/headshotmarketing/hooks/useAssetUpload.d.ts +2 -19
  24. package/dist/headshotmarketing/hooks/useAssetUpload.js +38 -32
  25. package/dist/headshotmarketing/hooks/useAssetUpload.js.map +1 -1
  26. package/dist/headshotmarketing/pages/HomeMonthlyGoals.js.map +1 -1
  27. package/dist/headshotmarketing/pages/HomePage.js +10 -10
  28. package/dist/headshotmarketing/pages/HomePage.js.map +1 -1
  29. package/dist/headshotmarketing/pages/ads/AdCampaignDetailsPage.js +203 -203
  30. package/dist/headshotmarketing/pages/ads/AdCampaignDetailsPage.js.map +1 -1
  31. package/dist/headshotmarketing/pages/ads/AdCampaignsPage.js +148 -148
  32. package/dist/headshotmarketing/pages/ads/AdCampaignsPage.js.map +1 -1
  33. package/dist/headshotmarketing/pages/ads/AdCreativeTestsSection.js +74 -73
  34. package/dist/headshotmarketing/pages/ads/AdCreativeTestsSection.js.map +1 -1
  35. package/dist/headshotmarketing/pages/ads/AdCreativesPage.js +427 -412
  36. package/dist/headshotmarketing/pages/ads/AdCreativesPage.js.map +1 -1
  37. package/dist/headshotmarketing/pages/ads/AdPlatformConnectionsSection.js +111 -110
  38. package/dist/headshotmarketing/pages/ads/AdPlatformConnectionsSection.js.map +1 -1
  39. package/dist/headshotmarketing/pages/ads/AdPlatformSyncPanel.js +1 -1
  40. package/dist/headshotmarketing/pages/ads/AdPlatformSyncPanel.js.map +1 -1
  41. package/dist/headshotmarketing/pages/ads/AdsPage.js +6 -6
  42. package/dist/headshotmarketing/pages/ads/AdsPage.js.map +1 -1
  43. package/dist/headshotmarketing/pages/ads/AudiencesPage.js +49 -49
  44. package/dist/headshotmarketing/pages/ads/AudiencesPage.js.map +1 -1
  45. package/dist/headshotmarketing/pages/ads/CreateAdCampaignPage.js +112 -112
  46. package/dist/headshotmarketing/pages/ads/CreateAdCampaignPage.js.map +1 -1
  47. package/dist/headshotmarketing/pages/ads/CreateAudiencePage.js +57 -57
  48. package/dist/headshotmarketing/pages/ads/CreateAudiencePage.js.map +1 -1
  49. package/dist/headshotmarketing/pages/ai/AiOperationsPage.js +175 -174
  50. package/dist/headshotmarketing/pages/ai/AiOperationsPage.js.map +1 -1
  51. package/dist/headshotmarketing/pages/analytics/AdAnalyticsPage.js +1 -1
  52. package/dist/headshotmarketing/pages/analytics/AdAnalyticsPage.js.map +1 -1
  53. package/dist/headshotmarketing/pages/analytics/AttributionPage.js +129 -129
  54. package/dist/headshotmarketing/pages/analytics/AttributionPage.js.map +1 -1
  55. package/dist/headshotmarketing/pages/analytics/CampaignAnalyticsPage.js +9 -9
  56. package/dist/headshotmarketing/pages/analytics/CampaignAnalyticsPage.js.map +1 -1
  57. package/dist/headshotmarketing/pages/analytics/ReportScheduleDialog.js +95 -94
  58. package/dist/headshotmarketing/pages/analytics/ReportScheduleDialog.js.map +1 -1
  59. package/dist/headshotmarketing/pages/analytics/ReportsPage.js +4 -4
  60. package/dist/headshotmarketing/pages/analytics/ReportsPage.js.map +1 -1
  61. package/dist/headshotmarketing/pages/analytics/TouchpointLedgerCard.js +42 -41
  62. package/dist/headshotmarketing/pages/analytics/TouchpointLedgerCard.js.map +1 -1
  63. package/dist/headshotmarketing/pages/analytics/analyticsWidgets.js +132 -131
  64. package/dist/headshotmarketing/pages/analytics/analyticsWidgets.js.map +1 -1
  65. package/dist/headshotmarketing/pages/automation/AutomationPage.js +8 -8
  66. package/dist/headshotmarketing/pages/automation/AutomationPage.js.map +1 -1
  67. package/dist/headshotmarketing/pages/automation/TriggersPage.js +48 -48
  68. package/dist/headshotmarketing/pages/automation/TriggersPage.js.map +1 -1
  69. package/dist/headshotmarketing/pages/automation/WorkflowBuilderPage.js +4 -3
  70. package/dist/headshotmarketing/pages/automation/WorkflowBuilderPage.js.map +1 -1
  71. package/dist/headshotmarketing/pages/automation/WorkflowNodeConfigPanel.js +143 -142
  72. package/dist/headshotmarketing/pages/automation/WorkflowNodeConfigPanel.js.map +1 -1
  73. package/dist/headshotmarketing/pages/automation/WorkflowRunsPanel.js +79 -78
  74. package/dist/headshotmarketing/pages/automation/WorkflowRunsPanel.js.map +1 -1
  75. package/dist/headshotmarketing/pages/automation/WorkflowsPage.js +92 -92
  76. package/dist/headshotmarketing/pages/automation/WorkflowsPage.js.map +1 -1
  77. package/dist/headshotmarketing/pages/builder/LandingPageBuilderPage.js +143 -143
  78. package/dist/headshotmarketing/pages/builder/LandingPageBuilderPage.js.map +1 -1
  79. package/dist/headshotmarketing/pages/builder/SectionCanvasBlock.js +3 -3
  80. package/dist/headshotmarketing/pages/builder/SectionCanvasBlock.js.map +1 -1
  81. package/dist/headshotmarketing/pages/builder/SectionInspector.js +24 -23
  82. package/dist/headshotmarketing/pages/builder/SectionInspector.js.map +1 -1
  83. package/dist/headshotmarketing/pages/campaigns/CampaignDetailsPage.js +198 -193
  84. package/dist/headshotmarketing/pages/campaigns/CampaignDetailsPage.js.map +1 -1
  85. package/dist/headshotmarketing/pages/campaigns/CampaignTemplatesPage.js +41 -41
  86. package/dist/headshotmarketing/pages/campaigns/CampaignTemplatesPage.js.map +1 -1
  87. package/dist/headshotmarketing/pages/campaigns/CampaignsPage.js +234 -229
  88. package/dist/headshotmarketing/pages/campaigns/CampaignsPage.js.map +1 -1
  89. package/dist/headshotmarketing/pages/campaigns/CreateCampaignPage.js +199 -187
  90. package/dist/headshotmarketing/pages/campaigns/CreateCampaignPage.js.map +1 -1
  91. package/dist/headshotmarketing/pages/campaigns/CreateTemplateModal.js +46 -46
  92. package/dist/headshotmarketing/pages/campaigns/CreateTemplateModal.js.map +1 -1
  93. package/dist/headshotmarketing/pages/content/AIExecutionLedger.js +29 -29
  94. package/dist/headshotmarketing/pages/content/AIExecutionLedger.js.map +1 -1
  95. package/dist/headshotmarketing/pages/content/AIToolsPage.js +3 -3
  96. package/dist/headshotmarketing/pages/content/AIToolsPage.js.map +1 -1
  97. package/dist/headshotmarketing/pages/content/AssetLibraryPage.js +230 -220
  98. package/dist/headshotmarketing/pages/content/AssetLibraryPage.js.map +1 -1
  99. package/dist/headshotmarketing/pages/content/ContentCreationPage.js +431 -420
  100. package/dist/headshotmarketing/pages/content/ContentCreationPage.js.map +1 -1
  101. package/dist/headshotmarketing/pages/content/ContentDetailsPage.js +7 -7
  102. package/dist/headshotmarketing/pages/content/ContentDetailsPage.js.map +1 -1
  103. package/dist/headshotmarketing/pages/content/ContentLibraryCard.js +2 -2
  104. package/dist/headshotmarketing/pages/content/ContentLibraryCard.js.map +1 -1
  105. package/dist/headshotmarketing/pages/content/ContentPage.js +88 -88
  106. package/dist/headshotmarketing/pages/content/ContentPage.js.map +1 -1
  107. package/dist/headshotmarketing/pages/crm/ContactsPage.js +111 -111
  108. package/dist/headshotmarketing/pages/crm/ContactsPage.js.map +1 -1
  109. package/dist/headshotmarketing/pages/crm/CreateContactPage.js +59 -59
  110. package/dist/headshotmarketing/pages/crm/CreateContactPage.js.map +1 -1
  111. package/dist/headshotmarketing/pages/crm/CreateDealPage.js +86 -86
  112. package/dist/headshotmarketing/pages/crm/CreateDealPage.js.map +1 -1
  113. package/dist/headshotmarketing/pages/crm/CrmActions.js +93 -92
  114. package/dist/headshotmarketing/pages/crm/CrmActions.js.map +1 -1
  115. package/dist/headshotmarketing/pages/crm/CrmPage.js +4 -4
  116. package/dist/headshotmarketing/pages/crm/CrmPage.js.map +1 -1
  117. package/dist/headshotmarketing/pages/crm/LeadCreateModal.js +63 -62
  118. package/dist/headshotmarketing/pages/crm/LeadCreateModal.js.map +1 -1
  119. package/dist/headshotmarketing/pages/crm/LeadsPage.js +68 -68
  120. package/dist/headshotmarketing/pages/crm/LeadsPage.js.map +1 -1
  121. package/dist/headshotmarketing/pages/crm/PipelinePage.js +2 -2
  122. package/dist/headshotmarketing/pages/crm/PipelinePage.js.map +1 -1
  123. package/dist/headshotmarketing/pages/events/CreateEventPage.js +165 -165
  124. package/dist/headshotmarketing/pages/events/CreateEventPage.js.map +1 -1
  125. package/dist/headshotmarketing/pages/events/EventDetailsPage.js +255 -250
  126. package/dist/headshotmarketing/pages/events/EventDetailsPage.js.map +1 -1
  127. package/dist/headshotmarketing/pages/events/EventImageUpload.js +8 -2
  128. package/dist/headshotmarketing/pages/events/EventImageUpload.js.map +1 -1
  129. package/dist/headshotmarketing/pages/events/EventPagePreview.js +2 -2
  130. package/dist/headshotmarketing/pages/events/EventPagePreview.js.map +1 -1
  131. package/dist/headshotmarketing/pages/events/EventsPage.js +70 -70
  132. package/dist/headshotmarketing/pages/events/EventsPage.js.map +1 -1
  133. package/dist/headshotmarketing/pages/influencers/InfluencerCampaignsPage.js +7 -7
  134. package/dist/headshotmarketing/pages/influencers/InfluencerCampaignsPage.js.map +1 -1
  135. package/dist/headshotmarketing/pages/influencers/InfluencerDiscoveryPage.js +98 -98
  136. package/dist/headshotmarketing/pages/influencers/InfluencerDiscoveryPage.js.map +1 -1
  137. package/dist/headshotmarketing/pages/influencers/InfluencersPage.js +1 -1
  138. package/dist/headshotmarketing/pages/influencers/InfluencersPage.js.map +1 -1
  139. package/dist/headshotmarketing/pages/influencers/RelationshipsPage.js +145 -140
  140. package/dist/headshotmarketing/pages/influencers/RelationshipsPage.js.map +1 -1
  141. package/dist/headshotmarketing/pages/seo/SeoScorePanel.js +1 -1
  142. package/dist/headshotmarketing/pages/seo/SeoScorePanel.js.map +1 -1
  143. package/dist/headshotmarketing/pages/seo/SeoToolsPage.js +286 -286
  144. package/dist/headshotmarketing/pages/seo/SeoToolsPage.js.map +1 -1
  145. package/dist/headshotmarketing/pages/social-media/AccountsPage.js +171 -166
  146. package/dist/headshotmarketing/pages/social-media/AccountsPage.js.map +1 -1
  147. package/dist/headshotmarketing/pages/social-media/ContentCalendarPage.js +1 -1
  148. package/dist/headshotmarketing/pages/social-media/ContentCalendarPage.js.map +1 -1
  149. package/dist/headshotmarketing/pages/social-media/CreateAccountPage.js +1 -1
  150. package/dist/headshotmarketing/pages/social-media/CreateAccountPage.js.map +1 -1
  151. package/dist/headshotmarketing/pages/social-media/MediaDropZone.js +3 -3
  152. package/dist/headshotmarketing/pages/social-media/MediaDropZone.js.map +1 -1
  153. package/dist/headshotmarketing/pages/social-media/PostsPage.js +257 -252
  154. package/dist/headshotmarketing/pages/social-media/PostsPage.js.map +1 -1
  155. package/dist/headshotmarketing/pages/social-media/SocialComposerPreview.js +2 -2
  156. package/dist/headshotmarketing/pages/social-media/SocialComposerPreview.js.map +1 -1
  157. package/dist/headshotmarketing/pages/social-media/SocialMediaComposePage.js +4 -4
  158. package/dist/headshotmarketing/pages/social-media/SocialMediaComposePage.js.map +1 -1
  159. package/dist/headshotmarketing/pages/social-media/SocialMediaPage.js +115 -115
  160. package/dist/headshotmarketing/pages/social-media/SocialMediaPage.js.map +1 -1
  161. package/package.json +6 -4
@@ -2,17 +2,18 @@ import { HeadshotmarketingCampaignByIdDocument as e, HeadshotmarketingCampaignsL
2
2
  import { cn as a } from "../../utils/helpers.js";
3
3
  import { toCampaignModel as ee } from "../../utils/campaignMapper.js";
4
4
  import "../../components/index.js";
5
- import { useHeadshotMarketing as te } from "../../context/HeadshotMarketingContext.js";
5
+ import { UploadAudienceSelect as te } from "../../components/UploadAudienceSelect.js";
6
6
  import { PageLayout as o } from "../../components/PageLayout.js";
7
+ import { useHeadshotMarketing as ne } from "../../context/HeadshotMarketingContext.js";
7
8
  import { HeadshotmarketingCampaignStatus as s, HeadshotmarketingCampaignType as c } from "../../../generated/wspace-types.js";
8
- import { useEffect as ne, useState as l } from "react";
9
- import { ArrowLeft as u, FileText as d, Image as re, Rocket as ie, Save as f, Upload as p, Video as m, X as h } from "lucide-react";
10
- import { useParams as ae } from "react-router";
9
+ import { useEffect as re, useRef as ie, useState as l } from "react";
10
+ import { ArrowLeft as u, FileText as d, Image as f, Rocket as p, Save as ae, Upload as oe, Video as se, X as m } from "lucide-react";
11
+ import { useParams as h } from "react-router";
11
12
  import { jsx as g, jsxs as _ } from "react/jsx-runtime";
12
- import { EmphasisPanel as oe, PagePurpose as se } from "@burdenoff/fe-libs/ui";
13
- import { useSaveToFiles as ce } from "@burdenoff/fe-libs/storage";
13
+ import { EmphasisPanel as ce, PagePurpose as le, ThemedSelect as v } from "@burdenoff/fe-libs/ui";
14
+ import { fileUploadVisibility as ue, useSaveToFiles as de } from "@burdenoff/fe-libs/storage";
14
15
  // src/headshotmarketing/pages/campaigns/CreateCampaignPage.tsx
15
- var le = /\.(jpe?g|png|gif|webp|svg|avif|bmp)$/i, ue = /\.(mp4|webm|mov|avi|mkv)$/i, de = /\.(pdf|docx?|xlsx?|pptx?|txt|csv|rtf|odt|ods)$/i, fe = [
16
+ var fe = /\.(jpe?g|png|gif|webp|svg|avif|bmp)$/i, pe = /\.(mp4|webm|mov|avi|mkv)$/i, me = /\.(pdf|docx?|xlsx?|pptx?|txt|csv|rtf|odt|ods)$/i, he = [
16
17
  "Brand Awareness",
17
18
  "Lead Generation",
18
19
  "Sales Conversion",
@@ -21,7 +22,7 @@ var le = /\.(jpe?g|png|gif|webp|svg|avif|bmp)$/i, ue = /\.(mp4|webm|mov|avi|mkv)
21
22
  "Engagement",
22
23
  "Product Launch",
23
24
  "Market Research"
24
- ], pe = [
25
+ ], ge = [
25
26
  "Google Ads",
26
27
  "Facebook",
27
28
  "Instagram",
@@ -32,7 +33,7 @@ var le = /\.(jpe?g|png|gif|webp|svg|avif|bmp)$/i, ue = /\.(mp4|webm|mov|avi|mkv)
32
33
  "Email",
33
34
  "Blog",
34
35
  "Display Network"
35
- ], me = [
36
+ ], _e = [
36
37
  "Impressions",
37
38
  "Clicks",
38
39
  "CTR",
@@ -43,7 +44,7 @@ var le = /\.(jpe?g|png|gif|webp|svg|avif|bmp)$/i, ue = /\.(mp4|webm|mov|avi|mkv)
43
44
  "Revenue",
44
45
  "Engagement Rate",
45
46
  "Reach"
46
- ], he = [
47
+ ], y = [
47
48
  {
48
49
  value: "email",
49
50
  label: "Email"
@@ -72,20 +73,20 @@ var le = /\.(jpe?g|png|gif|webp|svg|avif|bmp)$/i, ue = /\.(mp4|webm|mov|avi|mkv)
72
73
  value: "content",
73
74
  label: "Content"
74
75
  }
75
- ], v = [
76
+ ], ve = [
76
77
  "USD",
77
78
  "EUR",
78
79
  "GBP",
79
80
  "CAD",
80
81
  "AUD"
81
- ], ge = [
82
+ ], ye = [
82
83
  "Urban Professionals",
83
84
  "College Students",
84
85
  "Parents",
85
86
  "Retirees",
86
87
  "Tech Enthusiasts",
87
88
  "Small Business Owners"
88
- ], _e = [
89
+ ], be = [
89
90
  {
90
91
  key: "basics",
91
92
  label: "Basics"
@@ -107,96 +108,101 @@ var le = /\.(jpe?g|png|gif|webp|svg|avif|bmp)$/i, ue = /\.(mp4|webm|mov|avi|mkv)
107
108
  label: "Tracking"
108
109
  }
109
110
  ];
110
- function y(e) {
111
+ function b(e) {
111
112
  return typeof e == "object" && e && !Array.isArray(e) ? e : {};
112
113
  }
113
- function b(e) {
114
+ function x(e) {
114
115
  return Array.isArray(e) ? e.filter((e) => typeof e == "string") : [];
115
116
  }
116
- function x(e, t) {
117
+ function S(e, t) {
117
118
  let n = Number(e);
118
119
  return Number.isFinite(n) ? String(n) : t;
119
120
  }
120
- function S(e, t) {
121
- let n = y(t.ageRange);
121
+ function C(e, t) {
122
+ let n = b(t.ageRange);
122
123
  return {
123
124
  name: e?.name ?? "",
124
125
  description: e?.description ?? "",
125
126
  type: e?.type ?? "",
126
- objectives: b(t.objectives),
127
+ objectives: x(t.objectives),
127
128
  channels: e?.channels ?? [],
128
129
  budget: e ? String(e.budget.total) : "",
129
130
  currency: String(t.currency ?? e?.budget.currency ?? "USD"),
130
131
  startDate: e?.timeline.startDate ?? "",
131
132
  endDate: e?.timeline.endDate ?? "",
132
- kpis: b(t.kpis),
133
+ kpis: x(t.kpis),
133
134
  tags: e?.tags ?? [],
134
- ageMin: x(n.min, "18"),
135
- ageMax: x(n.max, "65"),
135
+ ageMin: S(n.min, "18"),
136
+ ageMax: S(n.max, "65"),
136
137
  demographics: e?.targeting.demographics ?? [],
137
138
  assets: e?.assets ?? []
138
139
  };
139
140
  }
140
- var C = () => {
141
- let { navigate: b, basePath: x } = te(), { campaignId: C } = ae(), { data: ve, loading: w, error: ye } = r({
142
- skip: !C,
143
- variables: C ? { id: C } : void 0
144
- }), T = ve?.headshotmarketingCampaign, E = T ? ee(T) : null, D = y(T?.goals), O = !!C, [k, { loading: A, error: j }] = n(), [M, { loading: N, error: P }] = i(), [F, be] = l("basics"), [I, L] = l(""), [R, z] = l(""), [xe, B] = l(null), [V, H] = l(() => S(E, D));
145
- ne(() => {
146
- E && H(S(E, D));
147
- }, [T?.id, T?.updatedAt]);
148
- let U = (e, t) => {
149
- H((n) => ({
141
+ var w = () => {
142
+ let { navigate: x, basePath: S } = ne(), { campaignId: w } = h(), { data: xe, loading: T, error: Se } = r({
143
+ skip: !w,
144
+ variables: w ? { id: w } : void 0
145
+ }), E = xe?.headshotmarketingCampaign, D = E ? ee(E) : null, O = b(E?.goals), k = !!w, [A, { loading: j, error: Ce }] = n(), [we, { loading: Te, error: Ee }] = i(), [M, De] = l("basics"), [N, P] = l(""), [F, I] = l(""), [Oe, L] = l(null), [R, z] = l(() => C(D, O));
146
+ re(() => {
147
+ D && z(C(D, O));
148
+ }, [E?.id, E?.updatedAt]);
149
+ let B = (e, t) => {
150
+ z((n) => ({
150
151
  ...n,
151
152
  [e]: t
152
153
  }));
153
- }, W = (e, t) => {
154
- H((n) => ({
154
+ }, V = (e, t) => {
155
+ z((n) => ({
155
156
  ...n,
156
157
  [e]: n[e].includes(t) ? n[e].filter((e) => e !== t) : [...n[e], t]
157
158
  }));
158
- }, G = () => {
159
- let e = I.trim();
160
- e && !V.tags.includes(e) && U("tags", [...V.tags, e]), L("");
161
- }, Se = (e) => {
162
- U("tags", V.tags.filter((t) => t !== e));
163
- }, K = (e) => {
164
- let t = (e || R).trim();
165
- t && !V.demographics.includes(t) && U("demographics", [...V.demographics, t]), z("");
166
- }, Ce = (e) => {
167
- U("demographics", V.demographics.filter((t) => t !== e));
168
- }, { save: we, isPending: q } = ce(), [J, Y] = l(null), Te = async (e) => {
169
- if (!e || e.length === 0) return;
170
- Y(null);
171
- let t = V.name.trim() || "Untitled Campaign";
159
+ }, H = () => {
160
+ let e = N.trim();
161
+ e && !R.tags.includes(e) && B("tags", [...R.tags, e]), P("");
162
+ }, ke = (e) => {
163
+ B("tags", R.tags.filter((t) => t !== e));
164
+ }, U = (e) => {
165
+ let t = (e || F).trim();
166
+ t && !R.demographics.includes(t) && B("demographics", [...R.demographics, t]), I("");
167
+ }, Ae = (e) => {
168
+ B("demographics", R.demographics.filter((t) => t !== e));
169
+ }, { save: je, isPending: Me } = de(), [W, G] = l(null), [K, Ne] = l("PRIVATE"), [Pe, q] = l(!1), J = ie(!1), Y = Me || Pe, Fe = async (e) => {
170
+ if (!e || e.length === 0 || J.current) return;
171
+ G(null);
172
+ let t = R.name.trim() || "Untitled Campaign";
172
173
  try {
173
- let n = [];
174
- for (let r of Array.from(e)) {
175
- let e = r.type || "application/octet-stream", i = await we({
174
+ let n = ue(K);
175
+ J.current = !0, q(!0);
176
+ let r = [];
177
+ for (let i of Array.from(e)) {
178
+ let e = i.type || "application/octet-stream", a = await je({
176
179
  source: {
177
180
  kind: "blob",
178
181
  getBlob: async () => ({
179
- blob: r,
180
- filename: r.name,
182
+ blob: i,
183
+ filename: i.name,
181
184
  mimeType: e
182
185
  }),
183
- filename: r.name,
186
+ filename: i.name,
184
187
  mimeType: e
185
188
  },
186
- folderPath: `Marketing/Campaigns/${t}`
189
+ folderPath: `Marketing/Campaigns/${t}`,
190
+ visibility: n
187
191
  });
188
- n.push(i.name);
192
+ r.push(a.name);
189
193
  }
190
- H((e) => ({
194
+ z((e) => ({
191
195
  ...e,
192
- assets: Array.from(/* @__PURE__ */ new Set([...e.assets, ...n]))
196
+ assets: Array.from(/* @__PURE__ */ new Set([...e.assets, ...r]))
193
197
  }));
194
198
  } catch (e) {
195
- Y(e instanceof Error ? e.message : "Failed to upload file(s).");
199
+ G(e instanceof Error ? e.message : "Failed to upload file(s).");
200
+ } finally {
201
+ J.current = !1, q(!1);
196
202
  }
197
- }, Ee = (e) => {
198
- U("assets", V.assets.filter((t) => t !== e));
199
- }, De = (e) => {
203
+ }, Ie = (e) => {
204
+ B("assets", R.assets.filter((t) => t !== e));
205
+ }, Le = (e) => {
200
206
  switch (e) {
201
207
  case "email": return c.Email;
202
208
  case "social": return c.Social;
@@ -206,66 +212,67 @@ var C = () => {
206
212
  case "influencer": return c.Influencer;
207
213
  default: return c.Content;
208
214
  }
209
- }, Oe = (e) => {
215
+ }, Re = (e) => {
210
216
  if (e === "draft") return s.Draft;
211
- if (V.startDate) {
212
- let e = new Date(V.startDate).getTime();
217
+ if (R.startDate) {
218
+ let e = new Date(R.startDate).getTime();
213
219
  if (Number.isFinite(e) && e > Date.now()) return s.Scheduled;
214
220
  }
215
221
  return s.Active;
216
- }, ke = () => {
217
- if (!V.name.trim()) return "Campaign name is required.";
218
- if (!V.type) return "Campaign type is required.";
219
- if (V.budget) {
220
- let e = Number(V.budget);
222
+ }, ze = () => {
223
+ if (!R.name.trim()) return "Campaign name is required.";
224
+ if (!R.type) return "Campaign type is required.";
225
+ if (R.budget) {
226
+ let e = Number(R.budget);
221
227
  if (!Number.isFinite(e) || e < 0) return "Budget must be a valid non-negative number.";
222
228
  }
223
- let e = Number(V.ageMin), t = Number(V.ageMax);
229
+ let e = Number(R.ageMin), t = Number(R.ageMax);
224
230
  if (!Number.isFinite(e) || !Number.isFinite(t) || e > t) return "Age range is invalid.";
225
- if (V.startDate && V.endDate) {
226
- let e = new Date(V.startDate).getTime(), t = new Date(V.endDate).getTime();
231
+ if (R.startDate && R.endDate) {
232
+ let e = new Date(R.startDate).getTime(), t = new Date(R.endDate).getTime();
227
233
  if (Number.isFinite(e) && Number.isFinite(t) && t < e) return "End date must be on or after start date.";
228
234
  }
229
235
  return null;
230
236
  }, X = (e) => {
231
- let t = V.type ? De(V.type) : c.Content;
237
+ let t = R.type ? Le(R.type) : c.Content;
232
238
  return {
233
- name: V.name,
234
- description: V.description || null,
239
+ name: R.name,
240
+ description: R.description || null,
235
241
  type: t,
236
- status: Oe(e),
237
- budget: V.budget ? Number(V.budget) : null,
238
- startDate: V.startDate || null,
239
- endDate: V.endDate || null,
240
- tags: V.tags,
241
- metadata: { currency: V.currency },
242
+ status: Re(e),
243
+ budget: R.budget ? Number(R.budget) : null,
244
+ startDate: R.startDate || null,
245
+ endDate: R.endDate || null,
246
+ tags: R.tags,
247
+ metadata: { currency: R.currency },
242
248
  goals: {
243
- currency: V.currency,
244
- objectives: V.objectives,
245
- channels: V.channels,
246
- kpis: V.kpis,
247
- demographics: V.demographics,
248
- assets: V.assets,
249
+ currency: R.currency,
250
+ objectives: R.objectives,
251
+ channels: R.channels,
252
+ kpis: R.kpis,
253
+ demographics: R.demographics,
254
+ assets: R.assets,
249
255
  ageRange: {
250
- min: Number(V.ageMin || "18"),
251
- max: Number(V.ageMax || "65")
256
+ min: Number(R.ageMin || "18"),
257
+ max: Number(R.ageMax || "65")
252
258
  }
253
259
  }
254
260
  };
255
261
  }, Z = async (n) => {
256
- let r = ke();
257
- if (r) B(r);
262
+ if (J.current) return;
263
+ let r = ze();
264
+ if (r) L(r);
258
265
  else {
259
- B(null);
266
+ L(null);
260
267
  try {
261
- O && C ? await M({
268
+ k && w ? await we({
262
269
  variables: {
263
- id: C,
270
+ id: w,
264
271
  input: X(n)
265
272
  },
266
273
  refetchQueries: [{
267
274
  query: e,
268
- variables: { id: C }
275
+ variables: { id: w }
269
276
  }, {
270
277
  query: t,
271
278
  variables: {
@@ -274,7 +281,7 @@ var C = () => {
274
281
  }
275
282
  }],
276
283
  awaitRefetchQueries: !0
277
- }) : await k({
284
+ }) : await A({
278
285
  variables: { input: X(n) },
279
286
  refetchQueries: [{
280
287
  query: t,
@@ -284,19 +291,19 @@ var C = () => {
284
291
  }
285
292
  }],
286
293
  awaitRefetchQueries: !0
287
- }), b(x + "/campaigns");
294
+ }), x(S + "/campaigns");
288
295
  } catch (e) {
289
- B(e instanceof Error ? e.message : "Failed to save campaign.");
296
+ L(e instanceof Error ? e.message : "Failed to save campaign.");
290
297
  }
291
298
  }
292
- }, Q = A || N, $ = xe ?? j?.message ?? P?.message ?? null;
293
- return O && w && !E ? /* @__PURE__ */ g(o, {
299
+ }, Q = j || Te, $ = Oe ?? Ce?.message ?? Ee?.message ?? null;
300
+ return k && T && !D ? /* @__PURE__ */ g(o, {
294
301
  title: "Edit Campaign",
295
302
  children: /* @__PURE__ */ g("div", {
296
303
  className: "rounded-lg border border-border-seam bg-gloss-card shadow-pop p-6 text-sm text-text-secondary",
297
304
  children: "Loading campaign details..."
298
305
  })
299
- }) : O && !w && !E ? /* @__PURE__ */ g(o, {
306
+ }) : k && !T && !D ? /* @__PURE__ */ g(o, {
300
307
  title: "Edit Campaign",
301
308
  children: /* @__PURE__ */ _("div", {
302
309
  className: "rounded-lg border border-border-seam bg-gloss-card shadow-pop p-6",
@@ -307,39 +314,39 @@ var C = () => {
307
314
  }),
308
315
  /* @__PURE__ */ g("p", {
309
316
  className: "text-xs text-text-secondary mt-1",
310
- children: ye?.message ?? "The requested campaign could not be loaded."
317
+ children: Se?.message ?? "The requested campaign could not be loaded."
311
318
  }),
312
319
  /* @__PURE__ */ _("button", {
313
- onClick: () => b(x + "/campaigns"),
320
+ onClick: () => x(S + "/campaigns"),
314
321
  className: "mt-4 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",
315
322
  children: [/* @__PURE__ */ g(u, { className: "h-4 w-4" }), "Back to Campaigns"]
316
323
  })
317
324
  ]
318
325
  })
319
326
  }) : /* @__PURE__ */ _(o, {
320
- title: O ? "Edit Campaign" : "Create Campaign",
327
+ title: k ? "Edit Campaign" : "Create Campaign",
321
328
  actions: /* @__PURE__ */ _("button", {
322
- onClick: () => b(x + "/campaigns"),
329
+ onClick: () => x(S + "/campaigns"),
323
330
  className: "inline-flex items-center gap-2 rounded-md border border-border-seam bg-gloss-card shadow-pop px-3 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
324
331
  children: [/* @__PURE__ */ g(u, { className: "h-4 w-4" }), "Back to Campaigns"]
325
332
  }),
326
333
  children: [
327
- /* @__PURE__ */ g(se, { children: O ? "Refine this campaign's setup — its goals, audience targeting, creative, budget and the KPIs you'll track. Changes apply the next time the campaign runs." : "Set up a new campaign step by step: name it and pick a type, define who you're targeting, attach creative, set a budget and timeline, then choose the KPIs you want to measure. Save as a draft anytime or launch when ready." }),
334
+ /* @__PURE__ */ g(le, { children: k ? "Refine this campaign's setup — its goals, audience targeting, creative, budget and the KPIs you'll track. Changes apply the next time the campaign runs." : "Set up a new campaign step by step: name it and pick a type, define who you're targeting, attach creative, set a budget and timeline, then choose the KPIs you want to measure. Save as a draft anytime or launch when ready." }),
328
335
  /* @__PURE__ */ g("div", {
329
336
  className: "flex flex-nowrap items-center gap-1 overflow-x-auto border-b border-border-subtle",
330
- children: _e.map((e, t) => /* @__PURE__ */ _("button", {
331
- onClick: () => be(e.key),
332
- className: a("px-4 py-2 text-sm font-medium border-b-2 transition-colors -mb-px", F === e.key ? "border-primary text-text-primary" : "border-transparent text-text-secondary hover:text-text-primary"),
337
+ children: be.map((e, t) => /* @__PURE__ */ _("button", {
338
+ onClick: () => De(e.key),
339
+ className: a("px-4 py-2 text-sm font-medium border-b-2 transition-colors -mb-px", M === e.key ? "border-primary text-text-primary" : "border-transparent text-text-secondary hover:text-text-primary"),
333
340
  children: [/* @__PURE__ */ _("span", {
334
- className: "mr-1.5 text-xs text-text-secondary",
341
+ className: "me-1.5 text-xs text-text-secondary",
335
342
  children: [t + 1, "."]
336
343
  }), e.label]
337
344
  }, e.key))
338
345
  }),
339
- /* @__PURE__ */ _(oe, {
346
+ /* @__PURE__ */ _(ce, {
340
347
  className: "p-6",
341
348
  children: [
342
- F === "basics" && /* @__PURE__ */ _("div", {
349
+ M === "basics" && /* @__PURE__ */ _("div", {
343
350
  className: "space-y-6 max-w-2xl",
344
351
  children: [
345
352
  /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
@@ -347,22 +354,22 @@ var C = () => {
347
354
  children: "Campaign Name"
348
355
  }), /* @__PURE__ */ g("input", {
349
356
  type: "text",
350
- value: V.name,
351
- onChange: (e) => U("name", e.target.value),
357
+ value: R.name,
358
+ onChange: (e) => B("name", e.target.value),
352
359
  placeholder: "Enter campaign name...",
353
360
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
354
361
  })] }),
355
362
  /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
356
363
  className: "block text-sm font-medium text-text-primary mb-1.5",
357
364
  children: "Campaign Type"
358
- }), /* @__PURE__ */ _("select", {
359
- value: V.type,
360
- onChange: (e) => U("type", e.target.value),
365
+ }), /* @__PURE__ */ _(v, {
366
+ value: R.type,
367
+ onChange: (e) => B("type", e.target.value),
361
368
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
362
369
  children: [/* @__PURE__ */ g("option", {
363
370
  value: "",
364
371
  children: "Select type..."
365
- }), he.map((e) => /* @__PURE__ */ g("option", {
372
+ }), y.map((e) => /* @__PURE__ */ g("option", {
366
373
  value: e.value,
367
374
  children: e.label
368
375
  }, e.value))]
@@ -371,8 +378,8 @@ var C = () => {
371
378
  className: "block text-sm font-medium text-text-primary mb-1.5",
372
379
  children: "Description"
373
380
  }), /* @__PURE__ */ g("textarea", {
374
- value: V.description,
375
- onChange: (e) => U("description", e.target.value),
381
+ value: R.description,
382
+ onChange: (e) => B("description", e.target.value),
376
383
  placeholder: "Describe the campaign goals and strategy...",
377
384
  rows: 4,
378
385
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] resize-none"
@@ -382,15 +389,15 @@ var C = () => {
382
389
  children: "Objectives"
383
390
  }), /* @__PURE__ */ g("div", {
384
391
  className: "flex flex-wrap gap-2",
385
- children: fe.map((e) => /* @__PURE__ */ g("button", {
386
- onClick: () => W("objectives", e),
387
- className: a("rounded-full px-3 py-1.5 text-xs font-medium border transition-colors", V.objectives.includes(e) ? "border-primary bg-action-primary-bg text-action-primary-text" : "border-border-subtle bg-bg-surface text-text-primary hover:bg-bg-sunken"),
392
+ children: he.map((e) => /* @__PURE__ */ g("button", {
393
+ onClick: () => V("objectives", e),
394
+ className: a("rounded-full px-3 py-1.5 text-xs font-medium border transition-colors", R.objectives.includes(e) ? "border-primary bg-action-primary-bg text-action-primary-text" : "border-border-subtle bg-bg-surface text-text-primary hover:bg-bg-sunken"),
388
395
  children: e
389
396
  }, e))
390
397
  })] })
391
398
  ]
392
399
  }),
393
- F === "targeting" && /* @__PURE__ */ _("div", {
400
+ M === "targeting" && /* @__PURE__ */ _("div", {
394
401
  className: "space-y-6 max-w-2xl",
395
402
  children: [
396
403
  /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
@@ -401,8 +408,8 @@ var C = () => {
401
408
  children: [
402
409
  /* @__PURE__ */ g("input", {
403
410
  type: "number",
404
- value: V.ageMin,
405
- onChange: (e) => U("ageMin", e.target.value),
411
+ value: R.ageMin,
412
+ onChange: (e) => B("ageMin", e.target.value),
406
413
  min: 13,
407
414
  max: 100,
408
415
  className: "w-24 rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
@@ -413,8 +420,8 @@ var C = () => {
413
420
  }),
414
421
  /* @__PURE__ */ g("input", {
415
422
  type: "number",
416
- value: V.ageMax,
417
- onChange: (e) => U("ageMax", e.target.value),
423
+ value: R.ageMax,
424
+ onChange: (e) => B("ageMax", e.target.value),
418
425
  min: 13,
419
426
  max: 100,
420
427
  className: "w-24 rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
@@ -428,12 +435,12 @@ var C = () => {
428
435
  }),
429
436
  /* @__PURE__ */ g("div", {
430
437
  className: "flex flex-wrap gap-2 mb-2",
431
- children: V.demographics.map((e) => /* @__PURE__ */ _("span", {
438
+ children: R.demographics.map((e) => /* @__PURE__ */ _("span", {
432
439
  className: "inline-flex items-center gap-1 rounded-full border border-border-subtle bg-bg-sunken px-2.5 py-1 text-xs font-medium text-text-primary",
433
440
  children: [e, /* @__PURE__ */ g("button", {
434
- onClick: () => Ce(e),
441
+ onClick: () => Ae(e),
435
442
  className: "text-text-secondary hover:text-text-primary",
436
- children: /* @__PURE__ */ g(h, { className: "h-3 w-3" })
443
+ children: /* @__PURE__ */ g(m, { className: "h-3 w-3" })
437
444
  })]
438
445
  }, e))
439
446
  }),
@@ -441,21 +448,21 @@ var C = () => {
441
448
  className: "flex items-center gap-2 mb-2",
442
449
  children: [/* @__PURE__ */ g("input", {
443
450
  type: "text",
444
- value: R,
445
- onChange: (e) => z(e.target.value),
446
- onKeyDown: (e) => e.key === "Enter" && (e.preventDefault(), K()),
451
+ value: F,
452
+ onChange: (e) => I(e.target.value),
453
+ onKeyDown: (e) => e.key === "Enter" && (e.preventDefault(), U()),
447
454
  placeholder: "Add demographic...",
448
455
  className: "flex-1 rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
449
456
  }), /* @__PURE__ */ g("button", {
450
- onClick: () => K(),
457
+ onClick: () => U(),
451
458
  className: "rounded-md bg-action-primary-bg px-3 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
452
459
  children: "Add"
453
460
  })]
454
461
  }),
455
462
  /* @__PURE__ */ g("div", {
456
463
  className: "flex flex-wrap gap-1.5",
457
- children: ge.filter((e) => !V.demographics.includes(e)).map((e) => /* @__PURE__ */ _("button", {
458
- onClick: () => K(e),
464
+ children: ye.filter((e) => !R.demographics.includes(e)).map((e) => /* @__PURE__ */ _("button", {
465
+ onClick: () => U(e),
459
466
  className: "rounded-full border border-dashed border-border-subtle px-2.5 py-1 text-xs text-text-secondary hover:text-text-primary hover:border-foreground transition-colors",
460
467
  children: ["+ ", e]
461
468
  }, e))
@@ -466,17 +473,22 @@ var C = () => {
466
473
  children: "Channels"
467
474
  }), /* @__PURE__ */ g("div", {
468
475
  className: "flex flex-wrap gap-2",
469
- children: pe.map((e) => /* @__PURE__ */ g("button", {
470
- onClick: () => W("channels", e),
471
- className: a("rounded-full px-3 py-1.5 text-xs font-medium border transition-colors", V.channels.includes(e) ? "border-primary bg-action-primary-bg text-action-primary-text" : "border-border-subtle bg-bg-surface text-text-primary hover:bg-bg-sunken"),
476
+ children: ge.map((e) => /* @__PURE__ */ g("button", {
477
+ onClick: () => V("channels", e),
478
+ className: a("rounded-full px-3 py-1.5 text-xs font-medium border transition-colors", R.channels.includes(e) ? "border-primary bg-action-primary-bg text-action-primary-text" : "border-border-subtle bg-bg-surface text-text-primary hover:bg-bg-sunken"),
472
479
  children: e
473
480
  }, e))
474
481
  })] })
475
482
  ]
476
483
  }),
477
- F === "content" && /* @__PURE__ */ _("div", {
484
+ M === "content" && /* @__PURE__ */ _("div", {
478
485
  className: "space-y-6",
479
486
  children: [
487
+ /* @__PURE__ */ g(te, {
488
+ value: K,
489
+ onChange: Ne,
490
+ disabled: Y || Q
491
+ }),
480
492
  /* @__PURE__ */ g("p", {
481
493
  className: "text-sm text-text-secondary",
482
494
  children: "Upload creative assets for your campaign. Files are stored in your workspace Files and attached to this campaign."
@@ -486,35 +498,35 @@ var C = () => {
486
498
  children: [
487
499
  {
488
500
  label: "Images",
489
- icon: re,
501
+ icon: f,
490
502
  accept: "image/*",
491
- match: le
503
+ match: fe
492
504
  },
493
505
  {
494
506
  label: "Videos",
495
- icon: m,
507
+ icon: se,
496
508
  accept: "video/*",
497
- match: ue
509
+ match: pe
498
510
  },
499
511
  {
500
512
  label: "Documents",
501
513
  icon: d,
502
514
  accept: ".pdf,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.txt,.csv",
503
- match: de
515
+ match: me
504
516
  }
505
517
  ].map((e) => {
506
- let t = V.assets.filter((t) => e.match.test(t)).length;
518
+ let t = R.assets.filter((t) => e.match.test(t)).length;
507
519
  return /* @__PURE__ */ _("label", {
508
- className: a("flex flex-col items-center justify-center rounded-lg border-2 border-dashed border-border-subtle bg-bg-sunken/30 p-8 text-center transition-colors", q ? "cursor-progress opacity-70" : "cursor-pointer hover:border-primary/50 hover:bg-bg-sunken/50"),
520
+ className: a("flex flex-col items-center justify-center rounded-lg border-2 border-dashed border-border-subtle bg-bg-sunken/30 p-8 text-center transition-colors", Y ? "cursor-progress opacity-70" : "cursor-pointer hover:border-primary/50 hover:bg-bg-sunken/50"),
509
521
  children: [
510
522
  /* @__PURE__ */ g("input", {
511
523
  type: "file",
512
524
  accept: e.accept,
513
525
  multiple: !0,
514
- disabled: q,
526
+ disabled: Y || Q,
515
527
  className: "sr-only",
516
528
  onChange: (e) => {
517
- Te(e.currentTarget.files), e.currentTarget.value = "";
529
+ Fe(e.currentTarget.files), e.currentTarget.value = "";
518
530
  }
519
531
  }),
520
532
  /* @__PURE__ */ g(e.icon, { className: "h-10 w-10 text-text-secondary mb-3" }),
@@ -533,26 +545,26 @@ var C = () => {
533
545
  }),
534
546
  /* @__PURE__ */ _("span", {
535
547
  className: "mt-3 inline-flex items-center gap-1.5 rounded-md border border-border-subtle px-3 py-1.5 text-xs font-medium text-text-primary",
536
- children: [/* @__PURE__ */ g(p, { className: "h-3 w-3" }), q ? "Uploading..." : "Upload"]
548
+ children: [/* @__PURE__ */ g(oe, { className: "h-3 w-3" }), Y ? "Uploading..." : "Upload"]
537
549
  })
538
550
  ]
539
551
  }, e.label);
540
552
  })
541
553
  }),
542
- J && /* @__PURE__ */ g("div", {
554
+ W && /* @__PURE__ */ g("div", {
543
555
  className: "rounded-lg border border-status-error-border/30 bg-status-error-bg/10 px-4 py-3 text-sm text-status-error-text",
544
- children: J
556
+ children: W
545
557
  }),
546
- V.assets.length > 0 && /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ _("label", {
558
+ R.assets.length > 0 && /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ _("label", {
547
559
  className: "block text-sm font-medium text-text-primary mb-2",
548
560
  children: [
549
561
  "Attached Assets (",
550
- V.assets.length,
562
+ R.assets.length,
551
563
  ")"
552
564
  ]
553
565
  }), /* @__PURE__ */ g("div", {
554
566
  className: "space-y-2",
555
- children: V.assets.map((e) => /* @__PURE__ */ _("div", {
567
+ children: R.assets.map((e) => /* @__PURE__ */ _("div", {
556
568
  className: "flex items-center justify-between gap-3 rounded-md border border-border-subtle bg-bg-surface px-3 py-2",
557
569
  children: [/* @__PURE__ */ _("div", {
558
570
  className: "flex min-w-0 items-center gap-2",
@@ -562,16 +574,16 @@ var C = () => {
562
574
  })]
563
575
  }), /* @__PURE__ */ g("button", {
564
576
  type: "button",
565
- onClick: () => Ee(e),
577
+ onClick: () => Ie(e),
566
578
  className: "flex-shrink-0 rounded-md p-1 text-text-secondary hover:bg-bg-sunken hover:text-text-primary",
567
579
  "aria-label": `Remove ${e}`,
568
- children: /* @__PURE__ */ g(h, { className: "h-4 w-4" })
580
+ children: /* @__PURE__ */ g(m, { className: "h-4 w-4" })
569
581
  })]
570
582
  }, e))
571
583
  })] })
572
584
  ]
573
585
  }),
574
- F === "budget" && /* @__PURE__ */ _("div", {
586
+ M === "budget" && /* @__PURE__ */ _("div", {
575
587
  className: "space-y-6 max-w-2xl",
576
588
  children: [/* @__PURE__ */ _("div", {
577
589
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
@@ -580,19 +592,19 @@ var C = () => {
580
592
  children: "Budget"
581
593
  }), /* @__PURE__ */ g("input", {
582
594
  type: "number",
583
- value: V.budget,
584
- onChange: (e) => U("budget", e.target.value),
595
+ value: R.budget,
596
+ onChange: (e) => B("budget", e.target.value),
585
597
  placeholder: "0",
586
598
  min: 0,
587
599
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
588
600
  })] }), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
589
601
  className: "block text-sm font-medium text-text-primary mb-1.5",
590
602
  children: "Currency"
591
- }), /* @__PURE__ */ g("select", {
592
- value: V.currency,
593
- onChange: (e) => U("currency", e.target.value),
603
+ }), /* @__PURE__ */ g(v, {
604
+ value: R.currency,
605
+ onChange: (e) => B("currency", e.target.value),
594
606
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
595
- children: v.map((e) => /* @__PURE__ */ g("option", {
607
+ children: ve.map((e) => /* @__PURE__ */ g("option", {
596
608
  value: e,
597
609
  children: e
598
610
  }, e))
@@ -604,30 +616,30 @@ var C = () => {
604
616
  children: "Start Date"
605
617
  }), /* @__PURE__ */ g("input", {
606
618
  type: "date",
607
- value: V.startDate,
608
- onChange: (e) => U("startDate", e.target.value),
619
+ value: R.startDate,
620
+ onChange: (e) => B("startDate", e.target.value),
609
621
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
610
622
  })] }), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
611
623
  className: "block text-sm font-medium text-text-primary mb-1.5",
612
624
  children: "End Date"
613
625
  }), /* @__PURE__ */ g("input", {
614
626
  type: "date",
615
- value: V.endDate,
616
- onChange: (e) => U("endDate", e.target.value),
627
+ value: R.endDate,
628
+ onChange: (e) => B("endDate", e.target.value),
617
629
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
618
630
  })] })]
619
631
  })]
620
632
  }),
621
- F === "tracking" && /* @__PURE__ */ _("div", {
633
+ M === "tracking" && /* @__PURE__ */ _("div", {
622
634
  className: "space-y-6 max-w-2xl",
623
635
  children: [/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
624
636
  className: "block text-sm font-medium text-text-primary mb-2",
625
637
  children: "Key Performance Indicators"
626
638
  }), /* @__PURE__ */ g("div", {
627
639
  className: "flex flex-wrap gap-2",
628
- children: me.map((e) => /* @__PURE__ */ g("button", {
629
- onClick: () => W("kpis", e),
630
- className: a("rounded-full px-3 py-1.5 text-xs font-medium border transition-colors", V.kpis.includes(e) ? "border-primary bg-action-primary-bg text-action-primary-text" : "border-border-subtle bg-bg-surface text-text-primary hover:bg-bg-sunken"),
640
+ children: _e.map((e) => /* @__PURE__ */ g("button", {
641
+ onClick: () => V("kpis", e),
642
+ className: a("rounded-full px-3 py-1.5 text-xs font-medium border transition-colors", R.kpis.includes(e) ? "border-primary bg-action-primary-bg text-action-primary-text" : "border-border-subtle bg-bg-surface text-text-primary hover:bg-bg-sunken"),
631
643
  children: e
632
644
  }, e))
633
645
  })] }), /* @__PURE__ */ _("div", { children: [
@@ -637,12 +649,12 @@ var C = () => {
637
649
  }),
638
650
  /* @__PURE__ */ g("div", {
639
651
  className: "flex flex-wrap gap-2 mb-2",
640
- children: V.tags.map((e) => /* @__PURE__ */ _("span", {
652
+ children: R.tags.map((e) => /* @__PURE__ */ _("span", {
641
653
  className: "inline-flex items-center gap-1 rounded-full border border-border-subtle bg-bg-sunken px-2.5 py-1 text-xs font-medium text-text-primary",
642
654
  children: [e, /* @__PURE__ */ g("button", {
643
- onClick: () => Se(e),
655
+ onClick: () => ke(e),
644
656
  className: "text-text-secondary hover:text-text-primary",
645
- children: /* @__PURE__ */ g(h, { className: "h-3 w-3" })
657
+ children: /* @__PURE__ */ g(m, { className: "h-3 w-3" })
646
658
  })]
647
659
  }, e))
648
660
  }),
@@ -650,13 +662,13 @@ var C = () => {
650
662
  className: "flex items-center gap-2",
651
663
  children: [/* @__PURE__ */ g("input", {
652
664
  type: "text",
653
- value: I,
654
- onChange: (e) => L(e.target.value),
655
- onKeyDown: (e) => e.key === "Enter" && (e.preventDefault(), G()),
665
+ value: N,
666
+ onChange: (e) => P(e.target.value),
667
+ onKeyDown: (e) => e.key === "Enter" && (e.preventDefault(), H()),
656
668
  placeholder: "Add a tag...",
657
669
  className: "flex-1 rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
658
670
  }), /* @__PURE__ */ g("button", {
659
- onClick: G,
671
+ onClick: H,
660
672
  className: "rounded-md bg-action-primary-bg px-3 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
661
673
  children: "Add"
662
674
  })]
@@ -673,27 +685,27 @@ var C = () => {
673
685
  className: "flex flex-wrap items-center justify-end gap-3 rounded-lg border border-border-seam bg-gloss-card p-4 shadow-pop",
674
686
  children: [
675
687
  /* @__PURE__ */ g("button", {
676
- onClick: () => b(x + "/campaigns"),
688
+ onClick: () => x(S + "/campaigns"),
677
689
  className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
678
690
  children: "Cancel"
679
691
  }),
680
692
  /* @__PURE__ */ _("button", {
681
693
  onClick: () => Z("draft"),
682
- disabled: Q,
694
+ disabled: Q || Y,
683
695
  className: "inline-flex items-center gap-2 rounded-md border border-border-seam bg-gloss-card shadow-pop px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken disabled:opacity-60",
684
- children: [/* @__PURE__ */ g(f, { className: "h-4 w-4" }), "Save Draft"]
696
+ children: [/* @__PURE__ */ g(ae, { className: "h-4 w-4" }), "Save Draft"]
685
697
  }),
686
698
  /* @__PURE__ */ _("button", {
687
699
  onClick: () => Z("launch"),
688
- disabled: Q,
700
+ disabled: Q || Y,
689
701
  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 disabled:opacity-60",
690
- children: [/* @__PURE__ */ g(ie, { className: "h-4 w-4" }), O ? "Update Campaign" : "Create Campaign"]
702
+ children: [/* @__PURE__ */ g(p, { className: "h-4 w-4" }), k ? "Update Campaign" : "Create Campaign"]
691
703
  })
692
704
  ]
693
705
  })
694
706
  ]
695
707
  });
696
708
  };
697
- export { C as CreateCampaignPage };
709
+ export { w as CreateCampaignPage };
698
710
 
699
711
  //# sourceMappingURL=CreateCampaignPage.js.map