@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
@@ -4,37 +4,38 @@ import "../../components/index.js";
4
4
  import { cn as u, formatDate as ee, joinPath as te } from "../../utils/helpers.js";
5
5
  import { PageLayout as ne } from "../../components/PageLayout.js";
6
6
  import { Modal as re } from "../../components/Modal.js";
7
- import { QueryStateBoundary as ie } from "../../components/QueryStateBoundary.js";
8
- import { metadataWithoutLayout as ae, planSectionSync as oe, sectionFromRow as se, sectionsFromLegacyLayout as ce, sectionsFromRows as d, toBuilderTemplateModel as le } from "../../utils/builderMapper.js";
9
- import { useHeadshotmarketingBootstrap as ue } from "../../hooks/useHeadshotmarketingBootstrap.js";
10
- import { useHeadshotMarketing as de } from "../../context/HeadshotMarketingContext.js";
7
+ import { metadataWithoutLayout as ie, planSectionSync as ae, sectionFromRow as oe, sectionsFromLegacyLayout as se, sectionsFromRows as d, toBuilderTemplateModel as ce } from "../../utils/builderMapper.js";
8
+ import { QueryStateBoundary as le } from "../../components/QueryStateBoundary.js";
9
+ import { useHeadshotMarketing as ue } from "../../context/HeadshotMarketingContext.js";
10
+ import { useHeadshotmarketingBootstrap as de } from "../../hooks/useHeadshotmarketingBootstrap.js";
11
11
  import "../../hooks/index.js";
12
12
  import { SECTION_CATALOG as fe, SectionThumbnail as pe, defaultConfig as f, sectionLabelFor as p } from "./builderCatalog.js";
13
13
  import { SectionCanvasBlock as me } from "./SectionCanvasBlock.js";
14
14
  import { SectionInspector as he } from "./SectionInspector.js";
15
15
  import { SectionContent as ge } from "./SectionContent.js";
16
16
  import { starterContent as m } from "./sectionSchema.js";
17
- import { useRecordSelection as _e } from "../../hooks/useRecordSelection.js";
18
- import { useEffect as ve, useLayoutEffect as ye, useMemo as be, useRef as h, useState as g } from "react";
19
- import { ArrowLeft as xe, BarChart3 as Se, Edit3 as Ce, ExternalLink as _, Eye as we, Globe as Te, Layers as v, LayoutTemplate as Ee, Monitor as De, MousePointerClick as Oe, Plus as ke, RefreshCw as Ae, Save as je, Smartphone as Me, Tablet as Ne, UserCheck as Pe } from "lucide-react";
17
+ import { useRecordSelection as h } from "../../hooks/useRecordSelection.js";
18
+ import { readableError as _e } from "../../utils/readableError.js";
19
+ import { useEffect as ve, useLayoutEffect as ye, useMemo as be, useRef as g, useState as _ } from "react";
20
+ import { ArrowLeft as xe, BarChart3 as Se, Edit3 as Ce, ExternalLink as v, Eye as we, Globe as Te, Layers as y, LayoutTemplate as Ee, Monitor as De, MousePointerClick as Oe, Plus as ke, RefreshCw as Ae, Save as je, Smartphone as Me, Tablet as Ne, UserCheck as Pe } from "lucide-react";
20
21
  import { useBeforeUnload as Fe } from "react-router";
21
- import { Fragment as Ie, jsx as y, jsxs as b } from "react/jsx-runtime";
22
+ import { Fragment as Ie, jsx as b, jsxs as x } from "react/jsx-runtime";
22
23
  import { PagePurpose as Le, ThemedSelect as Re } from "@burdenoff/fe-libs/ui";
23
24
  // src/headshotmarketing/pages/builder/LandingPageBuilderPage.tsx
24
- var x = "application/x-hm-palette", S = "application/x-hm-reorder", ze = [
25
+ var ze = "application/x-hm-palette", Be = "application/x-hm-reorder", Ve = [
25
26
  "header",
26
27
  "hero",
27
28
  "features",
28
29
  "testimonials",
29
30
  "cta",
30
31
  "footer"
31
- ], C = 0;
32
- function Be() {
33
- return C += 1, `sec-${Date.now().toString(36)}-${C}`;
32
+ ], S = 0;
33
+ function He() {
34
+ return S += 1, `sec-${Date.now().toString(36)}-${S}`;
34
35
  }
35
- function w(e) {
36
+ function C(e) {
36
37
  return {
37
- id: Be(),
38
+ id: He(),
38
39
  type: e,
39
40
  label: p(e),
40
41
  config: {
@@ -43,12 +44,12 @@ function w(e) {
43
44
  }
44
45
  };
45
46
  }
46
- function T(e) {
47
+ function w(e) {
47
48
  return Object.values(l).find((t) => t === e) ?? l.Custom;
48
49
  }
49
- function Ve(e) {
50
+ function Ue(e) {
50
51
  return {
51
- type: T(e.type),
52
+ type: w(e.type),
52
53
  title: e.title,
53
54
  subtitle: e.subtitle,
54
55
  content: e.content,
@@ -56,56 +57,56 @@ function Ve(e) {
56
57
  metadata: e.metadata
57
58
  };
58
59
  }
59
- function He(e) {
60
+ function We(e) {
60
61
  let t = d(e?.sections);
61
62
  return t.length > 0 ? {
62
63
  saved: t,
63
64
  legacy: !1
64
65
  } : {
65
66
  saved: [],
66
- legacy: ce(e?.metadata).length > 0
67
+ legacy: se(e?.metadata).length > 0
67
68
  };
68
69
  }
69
- function Ue(e) {
70
+ function Ge(e) {
70
71
  return e.trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") || "landing-page";
71
72
  }
72
- var We = () => {
73
- let { selectedId: e, invalidSelection: t, selectRecord: n } = _e(), { workspaceId: r } = de(), i = ue().data?.headshotmarketingLandingPages.items ?? [], a = o({
73
+ var Ke = () => {
74
+ let { selectedId: e, invalidSelection: t, selectRecord: n } = h(), { workspaceId: r } = ue(), i = de().data?.headshotmarketingLandingPages.items ?? [], a = o({
74
75
  variables: { id: e ?? "" },
75
76
  skip: !e,
76
77
  fetchPolicy: "network-only"
77
- }), s = h(/* @__PURE__ */ new Map()), c = `${r}:${e ?? "new"}`, l = a.data?.headshotmarketingLandingPage;
78
- return /* @__PURE__ */ b(Ie, { children: [/* @__PURE__ */ b("label", {
78
+ }), s = g(/* @__PURE__ */ new Map()), c = `${r}:${e ?? "new"}`, l = a.data?.headshotmarketingLandingPage;
79
+ return /* @__PURE__ */ x(Ie, { children: [/* @__PURE__ */ x("label", {
79
80
  className: "block p-4 text-sm text-text-primary",
80
- children: ["Landing page", /* @__PURE__ */ b(Re, {
81
+ children: ["Landing page", /* @__PURE__ */ x(Re, {
81
82
  "aria-label": "Select landing page",
82
83
  value: e ?? "",
83
84
  onChange: (e) => n(e.target.value || null),
84
85
  className: "ms-3 rounded-md border border-border-subtle bg-bg-surface p-2",
85
86
  children: [
86
- /* @__PURE__ */ y("option", {
87
+ /* @__PURE__ */ b("option", {
87
88
  value: "",
88
89
  children: "New landing page"
89
90
  }),
90
- e && !i.some((t) => t.id === e) && /* @__PURE__ */ y("option", {
91
+ e && !i.some((t) => t.id === e) && /* @__PURE__ */ b("option", {
91
92
  value: e,
92
93
  children: l?.title ?? "Selected landing page"
93
94
  }),
94
- i.map((e) => /* @__PURE__ */ y("option", {
95
+ i.map((e) => /* @__PURE__ */ b("option", {
95
96
  value: e.id,
96
97
  children: e.title
97
98
  }, e.id))
98
99
  ]
99
100
  })]
100
- }), t || e && !a.loading && (a.error || !l || l.id !== e) ? /* @__PURE__ */ y("p", {
101
+ }), t || e && !a.loading && (a.error || !l || l.id !== e) ? /* @__PURE__ */ b("p", {
101
102
  role: "alert",
102
103
  className: "p-4",
103
104
  children: "This landing page is unavailable or you do not have access. Choose another page or start a new one."
104
- }) : e && a.loading ? /* @__PURE__ */ y("p", {
105
+ }) : e && a.loading ? /* @__PURE__ */ b("p", {
105
106
  role: "status",
106
107
  className: "p-4",
107
108
  children: "Loading landing page…"
108
- }) : /* @__PURE__ */ y(Ge, {
109
+ }) : /* @__PURE__ */ b(qe, {
109
110
  landingPage: e ? l : void 0,
110
111
  initialDraft: s.current.get(c),
111
112
  rememberDraft: (e) => {
@@ -115,62 +116,62 @@ var We = () => {
115
116
  s.current.delete(c), n(e);
116
117
  }
117
118
  }, c)] });
118
- }, Ge = ({ landingPage: o, initialDraft: l, rememberDraft: d, onCreated: f }) => {
119
- let { navigate: p, basePath: m } = de(), { data: _e, loading: Re, error: C, refetch: T } = ue(), [We, { loading: Ge }] = t(), [Ke, { loading: qe }] = s(), [Je, { loading: Ye }] = r(), [Xe] = e(), [Ze] = c(), [Qe] = i(), [$e] = a(), [et, E] = g(!1), [D, tt] = g(l?.landingPageId ?? o?.id ?? null), [O, k] = g(o?.status ?? "DRAFT"), [nt, A] = g(o?.publishedUrl ?? null), [j, M] = g(l?.pageName ?? o?.title ?? "Landing Page"), [N, rt] = g(l?.pageSlug ?? o?.slug ?? ""), [P, it] = g(l?.templateId ?? o?.templateId ?? null), [at, ot] = g("desktop"), [F, st] = g("editor"), [I, L] = g(null), [ct, R] = g(!1), [z, B] = g(null), [lt, V] = g(null), H = n({
119
+ }, qe = ({ landingPage: o, initialDraft: l, rememberDraft: d, onCreated: f }) => {
120
+ let { navigate: p, basePath: m } = ue(), { data: h, loading: Re, error: S, refetch: w } = de(), [Ke, { loading: qe }] = t(), [Je, { loading: Ye }] = s(), [Xe, { loading: Ze }] = r(), [Qe] = e(), [$e] = c(), [et] = i(), [tt] = a(), [nt, T] = _(!1), [E, rt] = _(l?.landingPageId ?? o?.id ?? null), [D, O] = _(o?.status ?? "DRAFT"), [it, k] = _(o?.publishedUrl ?? null), [A, j] = _(l?.pageName ?? o?.title ?? "Landing Page"), [M, at] = _(l?.pageSlug ?? o?.slug ?? ""), [N, ot] = _(l?.templateId ?? o?.templateId ?? null), [st, ct] = _("desktop"), [P, lt] = _("editor"), [F, I] = _(null), [ut, L] = _(!1), [R, z] = _(null), [dt, B] = _(null), V = n({
120
121
  variables: {
121
- landingPageId: D ?? void 0,
122
+ landingPageId: E ?? void 0,
122
123
  pagination: {
123
124
  limit: 50,
124
125
  offset: 0
125
126
  }
126
127
  },
127
- skip: !D,
128
+ skip: !E,
128
129
  fetchPolicy: "cache-and-network"
129
- }), U = H.data?.headshotmarketingLandingPageSubmissions.items ?? [], W = H.data?.headshotmarketingLandingPageSubmissions.total ?? o?.submissionCount ?? o?.conversionCount ?? 0, G = o?.viewCount ?? 0, ut = G > 0 ? `${(W / G * 100).toFixed(1)}%` : "—", [dt, K] = g(null), [ft, q] = g(null), [J, pt] = g(null), mt = dt !== null || ft !== null, [ht, gt] = g(() => He(o).saved), _t = be(() => {
130
- let { saved: e } = He(o);
130
+ }), H = V.data?.headshotmarketingLandingPageSubmissions.items ?? [], U = V.data?.headshotmarketingLandingPageSubmissions.total ?? o?.submissionCount ?? o?.conversionCount ?? 0, W = o?.viewCount ?? 0, ft = W > 0 ? `${(U / W * 100).toFixed(1)}%` : "—", [pt, G] = _(null), [mt, K] = _(null), [q, ht] = _(null), gt = pt !== null || mt !== null, [_t, vt] = _(() => We(o).saved), yt = be(() => {
131
+ let { saved: e } = We(o);
131
132
  if (e.length > 0) return e;
132
- let t = ce(o?.metadata);
133
- return t.length > 0 ? t : o ? [] : [w("hero")];
134
- }, [o]), [Y, X] = g(l?.sections ?? _t), [vt, yt] = g(() => ({
133
+ let t = se(o?.metadata);
134
+ return t.length > 0 ? t : o ? [] : [C("hero")];
135
+ }, [o]), [J, Y] = _(l?.sections ?? yt), [bt, xt] = _(() => ({
135
136
  landingPageId: o?.id ?? null,
136
137
  pageName: o?.title ?? "Landing Page",
137
138
  pageSlug: o?.slug ?? "",
138
139
  templateId: o?.templateId ?? null,
139
- sections: _t
140
- })), bt = {
141
- landingPageId: D,
142
- pageName: j,
143
- pageSlug: N,
144
- templateId: P,
145
- sections: Y
146
- }, Z = JSON.stringify(bt) !== JSON.stringify(vt), xt = h(Z ? bt : null), St = h(!1), Ct = h(d);
140
+ sections: yt
141
+ })), St = {
142
+ landingPageId: E,
143
+ pageName: A,
144
+ pageSlug: M,
145
+ templateId: N,
146
+ sections: J
147
+ }, X = JSON.stringify(St) !== JSON.stringify(bt), Ct = g(X ? St : null), Z = g(!1), wt = g(d);
147
148
  ye(() => {
148
- xt.current = Z ? {
149
- landingPageId: D,
150
- pageName: j,
151
- pageSlug: N,
152
- templateId: P,
153
- sections: Y
154
- } : null, Ct.current = d;
149
+ Ct.current = X ? {
150
+ landingPageId: E,
151
+ pageName: A,
152
+ pageSlug: M,
153
+ templateId: N,
154
+ sections: J
155
+ } : null, wt.current = d;
155
156
  }, [
156
- D,
157
- j,
157
+ E,
158
+ A,
159
+ M,
158
160
  N,
159
- P,
160
- Y,
161
+ J,
161
162
  d,
162
- Z
163
+ X
163
164
  ]), ve(() => () => {
164
- St.current || Ct.current(xt.current);
165
+ Z.current || wt.current(Ct.current);
165
166
  }, []), Fe((e) => {
166
- Z && (e.preventDefault(), e.returnValue = "");
167
+ X && (e.preventDefault(), e.returnValue = "");
167
168
  });
168
- let wt = (_e?.headshotmarketingCampaignTemplates.items ?? []).map((e) => le(e)), Tt = {
169
+ let Tt = (h?.headshotmarketingCampaignTemplates.items ?? []).map((e) => ce(e)), Et = {
169
170
  desktop: "w-full",
170
171
  tablet: "max-w-[768px]",
171
172
  mobile: "max-w-[390px]"
172
- }, Q = be(() => Y.find((e) => e.id === I) ?? null, [Y, I]), Et = (e, t) => {
173
- X((n) => {
173
+ }, Q = be(() => J.find((e) => e.id === F) ?? null, [J, F]), Dt = (e, t) => {
174
+ Y((n) => {
174
175
  let r = n.findIndex((t) => t.id === e);
175
176
  if (r === -1) return n;
176
177
  let i = t === "up" ? r - 1 : r + 1;
@@ -178,259 +179,259 @@ var We = () => {
178
179
  let a = [...n];
179
180
  return [a[r], a[i]] = [a[i], a[r]], a;
180
181
  });
181
- }, Dt = (e) => {
182
- X((t) => t.filter((t) => t.id !== e)), I === e && L(null);
183
182
  }, Ot = (e) => {
184
- X((t) => {
183
+ Y((t) => t.filter((t) => t.id !== e)), F === e && I(null);
184
+ }, kt = (e) => {
185
+ Y((t) => {
185
186
  let n = t.findIndex((t) => t.id === e);
186
187
  if (n === -1) return t;
187
188
  let r = {
188
189
  ...t[n],
189
- id: Be(),
190
+ id: He(),
190
191
  label: `${t[n].label} copy`,
191
192
  config: { ...t[n].config }
192
193
  }, i = [...t];
193
- return i.splice(n + 1, 0, r), L(r.id), i;
194
+ return i.splice(n + 1, 0, r), I(r.id), i;
194
195
  });
195
- }, kt = (e) => {
196
- let t = w(e);
197
- X((e) => [...e, t]), L(t.id);
198
- }, At = (e, t) => {
199
- let n = w(e);
200
- X((e) => {
196
+ }, At = (e) => {
197
+ let t = C(e);
198
+ Y((e) => [...e, t]), I(t.id);
199
+ }, jt = (e, t) => {
200
+ let n = C(e);
201
+ Y((e) => {
201
202
  let r = [...e];
202
203
  return r.splice(Math.min(Math.max(t, 0), r.length), 0, n), r;
203
- }), L(n.id);
204
- }, jt = (e, t) => {
205
- X((n) => {
204
+ }), I(n.id);
205
+ }, Mt = (e, t) => {
206
+ Y((n) => {
206
207
  let r = n.findIndex((t) => t.id === e);
207
208
  if (r === -1) return n;
208
209
  let i = [...n], [a] = i.splice(r, 1), o = r < t ? t - 1 : t;
209
210
  return i.splice(Math.min(Math.max(o, 0), i.length), 0, a), i;
210
211
  });
211
- }, Mt = (e, t) => {
212
- X((n) => n.map((n) => n.id === e ? {
212
+ }, Nt = (e, t) => {
213
+ Y((n) => n.map((n) => n.id === e ? {
213
214
  ...n,
214
215
  config: {
215
216
  ...n.config,
216
217
  ...t
217
218
  }
218
219
  } : n));
219
- }, Nt = (e, t) => {
220
- X((n) => n.map((n) => n.id === e ? {
220
+ }, Pt = (e, t) => {
221
+ Y((n) => n.map((n) => n.id === e ? {
221
222
  ...n,
222
223
  label: t
223
224
  } : n));
224
- }, Pt = (e) => (t) => {
225
- t.dataTransfer.effectAllowed = "copy", t.dataTransfer.setData(x, e), q(e), K(null);
226
225
  }, Ft = (e) => (t) => {
227
- t.dataTransfer.effectAllowed = "move", t.dataTransfer.setData(S, e), K(e), q(null);
228
- }, It = () => {
229
- K(null), q(null), pt(null);
230
- }, Lt = (e) => (t) => {
231
- let n = t.dataTransfer.types, r = n.includes(S), i = n.includes(x);
232
- (r || i) && (t.preventDefault(), t.dataTransfer.dropEffect = r ? "move" : "copy", pt(e));
226
+ t.dataTransfer.effectAllowed = "copy", t.dataTransfer.setData(ze, e), K(e), G(null);
227
+ }, It = (e) => (t) => {
228
+ t.dataTransfer.effectAllowed = "move", t.dataTransfer.setData(Be, e), G(e), K(null);
229
+ }, Lt = () => {
230
+ G(null), K(null), ht(null);
233
231
  }, Rt = (e) => (t) => {
232
+ let n = t.dataTransfer.types, r = n.includes(Be), i = n.includes(ze);
233
+ (r || i) && (t.preventDefault(), t.dataTransfer.dropEffect = r ? "move" : "copy", ht(e));
234
+ }, zt = (e) => (t) => {
234
235
  t.preventDefault();
235
- let n = t.dataTransfer.getData(x), r = t.dataTransfer.getData(S);
236
- n ? At(n, e) : r && jt(r, e), It();
237
- }, zt = (e) => {
238
- M(e.name), it(e.id), X(ze.map((e) => w(e))), L(null), V(`Applied "${e.name}" template — Save to keep it.`);
239
- }, Bt = async (e) => {
240
- let t = oe(ht, Y), n = /* @__PURE__ */ new Map();
241
- for (let e of t.removeIds) await Qe({ variables: { id: e } });
236
+ let n = t.dataTransfer.getData(ze), r = t.dataTransfer.getData(Be);
237
+ n ? jt(n, e) : r && Mt(r, e), Lt();
238
+ }, Bt = (e) => {
239
+ j(e.name), ot(e.id), Y(Ve.map((e) => C(e))), I(null), B(`Applied "${e.name}" template — Save to keep it.`);
240
+ }, Vt = async (e) => {
241
+ let t = ae(_t, J), n = /* @__PURE__ */ new Map();
242
+ for (let e of t.removeIds) await et({ variables: { id: e } });
242
243
  for (let r of t.adds) {
243
- let t = (await Xe({ variables: { input: {
244
+ let t = (await Qe({ variables: { input: {
244
245
  landingPageId: e,
245
246
  sortOrder: r.sortOrder,
246
- ...Ve(r.input)
247
+ ...Ue(r.input)
247
248
  } } })).data?.headshotmarketingAddLandingPageSection;
248
249
  if (!t) throw Error("Failed to save a section.");
249
250
  n.set(r.localId, t.id);
250
251
  }
251
- for (let e of t.updates) await Ze({ variables: {
252
+ for (let e of t.updates) await $e({ variables: {
252
253
  id: e.id,
253
- input: Ve(e.input)
254
+ input: Ue(e.input)
254
255
  } });
255
- let r = Y.map((e) => ({
256
+ let r = J.map((e) => ({
256
257
  ...e,
257
258
  id: n.get(e.id) ?? e.id
258
259
  }));
259
260
  if (t.reorder) {
260
- let t = (await $e({ variables: { input: {
261
+ let t = (await tt({ variables: { input: {
261
262
  landingPageId: e,
262
263
  sectionIds: r.map((e) => e.id)
263
264
  } } })).data?.headshotmarketingReorderLandingPageSections?.sections;
264
- gt(t ? t.map((e) => se(e)) : r);
265
- } else gt(r);
266
- return X(r), L((e) => e && (n.get(e) ?? e)), r;
267
- }, Vt = async () => {
268
- if (!j.trim()) return B("Page name is required."), null;
269
- B(null);
265
+ vt(t ? t.map((e) => oe(e)) : r);
266
+ } else vt(r);
267
+ return Y(r), I((e) => e && (n.get(e) ?? e)), r;
268
+ }, Ht = async () => {
269
+ if (!A.trim()) return z("Page name is required."), null;
270
+ z(null);
270
271
  try {
271
- if (D) {
272
+ if (E) {
272
273
  let e = {
273
- title: j.trim(),
274
- templateId: P ?? void 0,
275
- metadata: ae(o?.metadata)
276
- }, t = (await Ke({ variables: {
277
- id: D,
274
+ title: A.trim(),
275
+ templateId: N ?? void 0,
276
+ metadata: ie(o?.metadata)
277
+ }, t = (await Je({ variables: {
278
+ id: E,
278
279
  input: e
279
280
  } })).data?.headshotmarketingUpdateLandingPage;
280
- t && (k(t.status), A(t.publishedUrl ?? null)), E(!0);
281
- let n = await Bt(D);
282
- return M(j.trim()), yt({
283
- landingPageId: D,
284
- pageName: j.trim(),
285
- pageSlug: N,
286
- templateId: P,
281
+ t && (O(t.status), k(t.publishedUrl ?? null)), T(!0);
282
+ let n = await Vt(E);
283
+ return j(A.trim()), xt({
284
+ landingPageId: E,
285
+ pageName: A.trim(),
286
+ pageSlug: M,
287
+ templateId: N,
287
288
  sections: n
288
- }), D;
289
+ }), E;
289
290
  }
290
291
  let e = {
291
- title: j.trim(),
292
- slug: `${Ue(j)}-${Date.now().toString(36)}`,
293
- templateId: P ?? void 0
294
- }, t = (await We({ variables: { input: e } })).data?.headshotmarketingCreateLandingPage;
295
- if (!t) return B("Failed to create landing page."), null;
296
- tt(t.id), k(t.status), A(t.publishedUrl ?? null), rt(t.slug), E(!0);
297
- let n = await Bt(t.id);
298
- return M(j.trim()), yt({
292
+ title: A.trim(),
293
+ slug: `${Ge(A)}-${Date.now().toString(36)}`,
294
+ templateId: N ?? void 0
295
+ }, t = (await Ke({ variables: { input: e } })).data?.headshotmarketingCreateLandingPage;
296
+ if (!t) return z("Failed to create landing page."), null;
297
+ rt(t.id), O(t.status), k(t.publishedUrl ?? null), at(t.slug), T(!0);
298
+ let n = await Vt(t.id);
299
+ return j(A.trim()), xt({
299
300
  landingPageId: t.id,
300
- pageName: j.trim(),
301
+ pageName: A.trim(),
301
302
  pageSlug: t.slug,
302
- templateId: P,
303
+ templateId: N,
303
304
  sections: n
304
305
  }), t.id;
305
306
  } catch (e) {
306
- return B(e instanceof Error ? e.message : "Failed to save landing page."), null;
307
+ return z(_e(e, "Failed to save landing page.")), null;
307
308
  } finally {
308
- E(!1);
309
+ T(!1);
309
310
  }
310
- }, Ht = async () => {
311
- let e = await Vt();
312
- e && (V("Landing page saved."), o || (St.current = !0, f(e)), T());
313
311
  }, Ut = async () => {
314
- let e = await Vt();
312
+ let e = await Ht();
313
+ e && (B("Landing page saved."), o || (Z.current = !0, f(e)), w());
314
+ }, Wt = async () => {
315
+ let e = await Ht();
315
316
  if (e) try {
316
- let t = (await Je({ variables: { id: e } })).data?.headshotmarketingPublishLandingPage;
317
- t && (k(t.status), A(t.publishedUrl ?? null), V("Landing page published."), t.publishedUrl && window.open(t.publishedUrl, "_blank", "noopener,noreferrer")), o || (St.current = !0, f(e)), T();
317
+ let t = (await Xe({ variables: { id: e } })).data?.headshotmarketingPublishLandingPage;
318
+ t && (O(t.status), k(t.publishedUrl ?? null), B("Landing page published."), t.publishedUrl && window.open(t.publishedUrl, "_blank", "noopener,noreferrer")), o || (Z.current = !0, f(e)), w();
318
319
  } catch (e) {
319
- B(e instanceof Error ? e.message : "Failed to publish landing page.");
320
+ z(_e(e, "Failed to publish landing page."));
320
321
  }
321
- }, Wt = Ge || qe || et, $ = nt && O === "PUBLISHED" ? nt : null, Gt = $ ?? `/lp/${N || Ue(j)}`;
322
- return /* @__PURE__ */ b(ne, {
322
+ }, Gt = qe || Ye || nt, $ = it && D === "PUBLISHED" ? it : null, Kt = $ ?? `/lp/${M || Ge(A)}`;
323
+ return /* @__PURE__ */ x(ne, {
323
324
  title: "Landing Page Builder",
324
- actions: /* @__PURE__ */ b("div", {
325
+ actions: /* @__PURE__ */ x("div", {
325
326
  className: "flex flex-wrap items-center gap-2",
326
327
  children: [
327
- /* @__PURE__ */ b("button", {
328
+ /* @__PURE__ */ x("button", {
328
329
  onClick: () => p(m),
329
330
  className: "inline-flex items-center gap-2 rounded-md border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
330
- children: [/* @__PURE__ */ y(xe, { className: "h-4 w-4" }), "Back"]
331
+ children: [/* @__PURE__ */ b(xe, { className: "h-4 w-4" }), "Back"]
331
332
  }),
332
- $ && /* @__PURE__ */ b("a", {
333
+ $ && /* @__PURE__ */ x("a", {
333
334
  href: $,
334
335
  target: "_blank",
335
336
  rel: "noreferrer",
336
337
  "data-testid": "builder-open-live",
337
338
  className: "inline-flex items-center gap-2 rounded-md border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
338
- children: [/* @__PURE__ */ y(_, { className: "h-4 w-4" }), "View live"]
339
+ children: [/* @__PURE__ */ b(v, { className: "h-4 w-4" }), "View live"]
339
340
  }),
340
- /* @__PURE__ */ b("button", {
341
- onClick: () => R(!0),
341
+ /* @__PURE__ */ x("button", {
342
+ onClick: () => L(!0),
342
343
  className: "inline-flex items-center gap-2 rounded-md border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
343
- children: [/* @__PURE__ */ y(we, { className: "h-4 w-4" }), "Preview"]
344
+ children: [/* @__PURE__ */ b(we, { className: "h-4 w-4" }), "Preview"]
344
345
  }),
345
- /* @__PURE__ */ b("button", {
346
- onClick: () => void Ht(),
347
- disabled: Wt,
346
+ /* @__PURE__ */ x("button", {
347
+ onClick: () => void Ut(),
348
+ disabled: Gt,
348
349
  className: "inline-flex items-center gap-2 rounded-md border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken disabled:opacity-60",
349
- children: [/* @__PURE__ */ y(je, { className: "h-4 w-4" }), Wt ? "Saving…" : "Save"]
350
+ children: [/* @__PURE__ */ b(je, { className: "h-4 w-4" }), Gt ? "Saving…" : "Save"]
350
351
  }),
351
- /* @__PURE__ */ b("button", {
352
- onClick: () => void Ut(),
353
- disabled: Wt || Ye,
352
+ /* @__PURE__ */ x("button", {
353
+ onClick: () => void Wt(),
354
+ disabled: Gt || Ze,
354
355
  className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-3 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 disabled:opacity-60",
355
- children: [/* @__PURE__ */ y(Te, { className: "h-4 w-4" }), Ye ? "Publishing…" : "Publish"]
356
+ children: [/* @__PURE__ */ b(Te, { className: "h-4 w-4" }), Ze ? "Publishing…" : "Publish"]
356
357
  })
357
358
  ]
358
359
  }),
359
360
  children: [
360
- /* @__PURE__ */ y(Le, { children: "Build a campaign landing page without code. Start from a template, drag in sections (hero, features, testimonials, forms), edit the copy and style live, preview how it looks on desktop and mobile, then publish it to capture leads for the campaign you're promoting." }),
361
- z && /* @__PURE__ */ y("div", {
361
+ /* @__PURE__ */ b(Le, { children: "Build a campaign landing page without code. Start from a template, drag in sections (hero, features, testimonials, forms), edit the copy and style live, preview how it looks on desktop and mobile, then publish it to capture leads for the campaign you're promoting." }),
362
+ R && /* @__PURE__ */ b("div", {
362
363
  className: "rounded-lg border border-status-error-border/30 bg-status-error-bg/10 px-4 py-3 text-sm text-status-error-text",
363
- children: z
364
+ children: R
364
365
  }),
365
- lt && !z && /* @__PURE__ */ b("div", {
366
+ dt && !R && /* @__PURE__ */ x("div", {
366
367
  className: "flex items-center justify-between gap-3 rounded-lg border border-status-success-border/30 bg-status-success-bg/10 px-4 py-3 text-sm text-status-success-text",
367
- children: [/* @__PURE__ */ y("span", { children: lt }), $ && /* @__PURE__ */ b("a", {
368
+ children: [/* @__PURE__ */ b("span", { children: dt }), $ && /* @__PURE__ */ x("a", {
368
369
  href: $,
369
370
  target: "_blank",
370
371
  rel: "noreferrer",
371
372
  className: "inline-flex items-center gap-1 font-medium underline",
372
- children: ["View live ", /* @__PURE__ */ y(_, { className: "h-3 w-3" })]
373
+ children: ["View live ", /* @__PURE__ */ b(v, { className: "h-3 w-3" })]
373
374
  })]
374
375
  }),
375
- /* @__PURE__ */ y("div", {
376
+ /* @__PURE__ */ b("div", {
376
377
  className: "rounded-lg border border-border-seam bg-gloss-card shadow-pop p-4",
377
- children: /* @__PURE__ */ b("div", {
378
+ children: /* @__PURE__ */ x("div", {
378
379
  className: "flex flex-wrap items-center gap-3",
379
380
  children: [
380
- /* @__PURE__ */ y(Ce, { className: "h-4 w-4 text-text-secondary" }),
381
- /* @__PURE__ */ y("input", {
381
+ /* @__PURE__ */ b(Ce, { className: "h-4 w-4 text-text-secondary" }),
382
+ /* @__PURE__ */ b("input", {
382
383
  type: "text",
383
384
  "aria-label": "Page name",
384
- value: j,
385
- onChange: (e) => M(e.target.value),
385
+ value: A,
386
+ onChange: (e) => j(e.target.value),
386
387
  className: "text-lg font-semibold text-text-primary bg-transparent border-none outline-none flex-1 min-w-[12rem] placeholder:text-text-secondary",
387
388
  placeholder: "Page name"
388
389
  }),
389
- /* @__PURE__ */ b("span", {
390
+ /* @__PURE__ */ x("span", {
390
391
  className: "hidden items-center gap-1.5 text-xs text-text-secondary sm:inline-flex",
391
392
  children: [
392
- /* @__PURE__ */ y(v, { className: "h-3.5 w-3.5" }),
393
- Y.length,
393
+ /* @__PURE__ */ b(y, { className: "h-3.5 w-3.5" }),
394
+ J.length,
394
395
  " ",
395
- Y.length === 1 ? "section" : "sections"
396
+ J.length === 1 ? "section" : "sections"
396
397
  ]
397
398
  }),
398
- /* @__PURE__ */ b("span", {
399
+ /* @__PURE__ */ x("span", {
399
400
  "data-testid": "landing-page-submission-count",
400
401
  className: "inline-flex items-center gap-1.5 rounded-full border border-border-subtle bg-bg-surface px-2.5 py-0.5 text-xs font-medium text-text-primary",
401
402
  children: [
402
- /* @__PURE__ */ y(Pe, { className: "h-3.5 w-3.5 text-primary" }),
403
- W,
403
+ /* @__PURE__ */ b(Pe, { className: "h-3.5 w-3.5 text-primary" }),
404
+ U,
404
405
  " ",
405
- W === 1 ? "submission" : "submissions"
406
+ U === 1 ? "submission" : "submissions"
406
407
  ]
407
408
  }),
408
- /* @__PURE__ */ y("span", {
409
- className: u("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-medium capitalize", O === "PUBLISHED" ? "border-status-success-border bg-status-success-bg text-status-success-text" : "border-border-subtle bg-bg-sunken text-text-secondary"),
410
- children: O.toLowerCase()
409
+ /* @__PURE__ */ b("span", {
410
+ className: u("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-medium capitalize", D === "PUBLISHED" ? "border-status-success-border bg-status-success-bg-subtle text-status-success-text" : "border-border-subtle bg-bg-sunken text-text-secondary"),
411
+ children: D.toLowerCase()
411
412
  }),
412
- /* @__PURE__ */ b("div", {
413
+ /* @__PURE__ */ x("div", {
413
414
  role: "tablist",
414
415
  "aria-label": "Landing page view",
415
416
  className: "inline-flex items-center gap-0.5 rounded-lg border border-border-subtle bg-bg-surface p-0.5",
416
- children: [/* @__PURE__ */ b("button", {
417
+ children: [/* @__PURE__ */ x("button", {
417
418
  type: "button",
418
419
  role: "tab",
419
- "aria-selected": F === "editor",
420
- onClick: () => st("editor"),
421
- className: u("inline-flex items-center gap-1.5 rounded-md px-2.5 py-1 text-xs font-medium transition-colors", F === "editor" ? "bg-action-primary-bg text-action-primary-text" : "text-text-secondary hover:text-text-primary"),
422
- children: [/* @__PURE__ */ y(v, { className: "h-3.5 w-3.5" }), "Editor"]
423
- }), /* @__PURE__ */ b("button", {
420
+ "aria-selected": P === "editor",
421
+ onClick: () => lt("editor"),
422
+ className: u("inline-flex items-center gap-1.5 rounded-md px-2.5 py-1 text-xs font-medium transition-colors", P === "editor" ? "bg-action-primary-bg text-action-primary-text" : "text-text-secondary hover:text-text-primary"),
423
+ children: [/* @__PURE__ */ b(y, { className: "h-3.5 w-3.5" }), "Editor"]
424
+ }), /* @__PURE__ */ x("button", {
424
425
  type: "button",
425
426
  role: "tab",
426
427
  "data-testid": "builder-analytics-tab",
427
- "aria-selected": F === "analytics",
428
- onClick: () => st("analytics"),
429
- className: u("inline-flex items-center gap-1.5 rounded-md px-2.5 py-1 text-xs font-medium transition-colors", F === "analytics" ? "bg-action-primary-bg text-action-primary-text" : "text-text-secondary hover:text-text-primary"),
428
+ "aria-selected": P === "analytics",
429
+ onClick: () => lt("analytics"),
430
+ className: u("inline-flex items-center gap-1.5 rounded-md px-2.5 py-1 text-xs font-medium transition-colors", P === "analytics" ? "bg-action-primary-bg text-action-primary-text" : "text-text-secondary hover:text-text-primary"),
430
431
  children: [
431
- /* @__PURE__ */ y(Se, { className: "h-3.5 w-3.5" }),
432
+ /* @__PURE__ */ b(Se, { className: "h-3.5 w-3.5" }),
432
433
  "Submissions (",
433
- W,
434
+ U,
434
435
  ")"
435
436
  ]
436
437
  })]
@@ -438,137 +439,137 @@ var We = () => {
438
439
  ]
439
440
  })
440
441
  }),
441
- /* @__PURE__ */ y(ie, {
442
+ /* @__PURE__ */ b(le, {
442
443
  loading: Re,
443
- error: C,
444
- onRetry: T,
445
- hasData: !!_e,
446
- children: F === "analytics" ? /* @__PURE__ */ b("div", {
444
+ error: S,
445
+ onRetry: w,
446
+ hasData: !!h,
447
+ children: P === "analytics" ? /* @__PURE__ */ x("div", {
447
448
  "data-testid": "landing-page-analytics-panel",
448
449
  className: "space-y-4",
449
- children: [/* @__PURE__ */ b("div", {
450
+ children: [/* @__PURE__ */ x("div", {
450
451
  className: "grid grid-cols-1 gap-4 sm:grid-cols-3",
451
452
  children: [
452
- /* @__PURE__ */ b("div", {
453
+ /* @__PURE__ */ x("div", {
453
454
  className: "rounded-card border border-border-seam bg-gloss-card p-4 shadow-pop",
454
- children: [/* @__PURE__ */ y("p", {
455
+ children: [/* @__PURE__ */ b("p", {
455
456
  className: "text-xs font-medium text-text-secondary",
456
457
  children: "Form Submissions"
457
- }), /* @__PURE__ */ y("p", {
458
+ }), /* @__PURE__ */ b("p", {
458
459
  className: "mt-1 text-2xl font-bold text-text-primary",
459
- children: W
460
+ children: U
460
461
  })]
461
462
  }),
462
- /* @__PURE__ */ b("div", {
463
+ /* @__PURE__ */ x("div", {
463
464
  className: "rounded-card border border-border-seam bg-gloss-card p-4 shadow-pop",
464
- children: [/* @__PURE__ */ y("p", {
465
+ children: [/* @__PURE__ */ b("p", {
465
466
  className: "text-xs font-medium text-text-secondary",
466
467
  children: "Page Views"
467
- }), /* @__PURE__ */ y("p", {
468
+ }), /* @__PURE__ */ b("p", {
468
469
  className: "mt-1 text-2xl font-bold text-text-primary",
469
- children: G
470
+ children: W
470
471
  })]
471
472
  }),
472
- /* @__PURE__ */ b("div", {
473
+ /* @__PURE__ */ x("div", {
473
474
  className: "rounded-card border border-border-seam bg-gloss-card p-4 shadow-pop",
474
- children: [/* @__PURE__ */ y("p", {
475
+ children: [/* @__PURE__ */ b("p", {
475
476
  className: "text-xs font-medium text-text-secondary",
476
477
  children: "Conversion Rate"
477
- }), /* @__PURE__ */ y("p", {
478
+ }), /* @__PURE__ */ b("p", {
478
479
  className: "mt-1 text-2xl font-bold text-text-primary",
479
- children: ut
480
+ children: ft
480
481
  })]
481
482
  })
482
483
  ]
483
- }), /* @__PURE__ */ b("div", {
484
+ }), /* @__PURE__ */ x("div", {
484
485
  className: "rounded-card border border-border-seam bg-gloss-card p-5 shadow-pop",
485
- children: [/* @__PURE__ */ b("div", {
486
+ children: [/* @__PURE__ */ x("div", {
486
487
  className: "mb-4 flex items-center justify-between gap-3",
487
- children: [/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("h4", {
488
+ children: [/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("h4", {
488
489
  className: "text-sm font-semibold text-text-primary",
489
490
  children: "CRM-Wired Form Submissions"
490
- }), /* @__PURE__ */ y("p", {
491
+ }), /* @__PURE__ */ b("p", {
491
492
  className: "text-xs text-text-secondary",
492
493
  children: "Every submission on this published landing page creates or updates a CRM Contact in your workspace."
493
- })] }), D && /* @__PURE__ */ b("button", {
494
+ })] }), E && /* @__PURE__ */ x("button", {
494
495
  type: "button",
495
- onClick: () => void H.refetch(),
496
+ onClick: () => void V.refetch(),
496
497
  className: "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 hover:bg-bg-sunken",
497
- children: [/* @__PURE__ */ y(Ae, { className: "h-3.5 w-3.5" }), "Refresh"]
498
+ children: [/* @__PURE__ */ b(Ae, { className: "h-3.5 w-3.5" }), "Refresh"]
498
499
  })]
499
- }), D ? H.loading && U.length === 0 ? /* @__PURE__ */ y("p", {
500
+ }), E ? V.loading && H.length === 0 ? /* @__PURE__ */ b("p", {
500
501
  className: "py-6 text-center text-sm text-text-secondary",
501
502
  children: "Loading submissions…"
502
- }) : U.length === 0 ? /* @__PURE__ */ y("p", {
503
+ }) : H.length === 0 ? /* @__PURE__ */ b("p", {
503
504
  className: "py-6 text-center text-sm text-text-secondary",
504
505
  children: "No form submissions recorded for this landing page yet."
505
- }) : /* @__PURE__ */ y("div", {
506
+ }) : /* @__PURE__ */ b("div", {
506
507
  className: "overflow-x-auto",
507
- children: /* @__PURE__ */ b("table", {
508
+ children: /* @__PURE__ */ x("table", {
508
509
  className: "w-full text-sm",
509
- children: [/* @__PURE__ */ y("thead", { children: /* @__PURE__ */ b("tr", {
510
+ children: [/* @__PURE__ */ b("thead", { children: /* @__PURE__ */ x("tr", {
510
511
  className: "border-b border-border-subtle text-start text-xs text-text-secondary",
511
512
  children: [
512
- /* @__PURE__ */ y("th", {
513
+ /* @__PURE__ */ b("th", {
513
514
  className: "py-2 pe-4 font-medium",
514
515
  children: "Contact"
515
516
  }),
516
- /* @__PURE__ */ y("th", {
517
+ /* @__PURE__ */ b("th", {
517
518
  className: "py-2 pe-4 font-medium",
518
519
  children: "Company"
519
520
  }),
520
- /* @__PURE__ */ y("th", {
521
+ /* @__PURE__ */ b("th", {
521
522
  className: "py-2 pe-4 font-medium",
522
523
  children: "Source / UTM"
523
524
  }),
524
- /* @__PURE__ */ y("th", {
525
+ /* @__PURE__ */ b("th", {
525
526
  className: "py-2 pe-4 font-medium",
526
527
  children: "Submitted"
527
528
  }),
528
- /* @__PURE__ */ y("th", {
529
+ /* @__PURE__ */ b("th", {
529
530
  className: "py-2 pe-4 font-medium",
530
531
  children: "CRM"
531
532
  })
532
533
  ]
533
- }) }), /* @__PURE__ */ y("tbody", { children: U.map((e) => {
534
+ }) }), /* @__PURE__ */ b("tbody", { children: H.map((e) => {
534
535
  let t = [e.firstName, e.lastName].filter(Boolean).join(" "), n = [
535
536
  e.utmSource,
536
537
  e.utmMedium,
537
538
  e.utmCampaign
538
539
  ].filter(Boolean).join(" / ");
539
- return /* @__PURE__ */ b("tr", {
540
+ return /* @__PURE__ */ x("tr", {
540
541
  className: "border-b border-border-subtle/60 last:border-0",
541
542
  children: [
542
- /* @__PURE__ */ b("td", {
543
+ /* @__PURE__ */ x("td", {
543
544
  className: "py-2.5 pe-4",
544
- children: [/* @__PURE__ */ y("p", {
545
+ children: [/* @__PURE__ */ b("p", {
545
546
  className: "font-medium text-text-primary",
546
547
  children: t || e.email
547
- }), /* @__PURE__ */ y("p", {
548
+ }), /* @__PURE__ */ b("p", {
548
549
  className: "text-xs text-text-secondary",
549
550
  children: e.email
550
551
  })]
551
552
  }),
552
- /* @__PURE__ */ y("td", {
553
+ /* @__PURE__ */ b("td", {
553
554
  className: "py-2.5 pe-4 text-text-secondary",
554
555
  children: e.company || "—"
555
556
  }),
556
- /* @__PURE__ */ y("td", {
557
+ /* @__PURE__ */ b("td", {
557
558
  className: "py-2.5 pe-4 text-xs text-text-secondary",
558
559
  children: n || "Direct"
559
560
  }),
560
- /* @__PURE__ */ y("td", {
561
+ /* @__PURE__ */ b("td", {
561
562
  className: "py-2.5 pe-4 text-xs text-text-secondary",
562
563
  children: ee(e.createdAt)
563
564
  }),
564
- /* @__PURE__ */ y("td", {
565
+ /* @__PURE__ */ b("td", {
565
566
  className: "py-2.5 pe-4",
566
- children: e.contactId ? /* @__PURE__ */ y("button", {
567
+ children: e.contactId ? /* @__PURE__ */ b("button", {
567
568
  type: "button",
568
569
  onClick: () => p(`${te(m, "crm/contacts")}?selected=${encodeURIComponent(e.contactId)}`),
569
570
  className: "inline-flex items-center gap-1 rounded-md border border-border-subtle px-2.5 py-1 text-xs font-medium text-primary hover:bg-bg-sunken",
570
571
  children: "View contact"
571
- }) : /* @__PURE__ */ y("span", {
572
+ }) : /* @__PURE__ */ b("span", {
572
573
  className: "text-xs text-text-secondary",
573
574
  children: "—"
574
575
  })
@@ -577,45 +578,45 @@ var We = () => {
577
578
  }, e.id);
578
579
  }) })]
579
580
  })
580
- }) : /* @__PURE__ */ y("p", {
581
+ }) : /* @__PURE__ */ b("p", {
581
582
  className: "py-6 text-center text-sm text-text-secondary",
582
583
  children: "Save and publish this landing page to start collecting form submissions into CRM."
583
584
  })]
584
585
  })]
585
- }) : /* @__PURE__ */ b("div", {
586
+ }) : /* @__PURE__ */ x("div", {
586
587
  className: "grid grid-cols-1 gap-4 lg:grid-cols-12",
587
588
  children: [
588
- /* @__PURE__ */ b("aside", {
589
+ /* @__PURE__ */ x("aside", {
589
590
  className: "space-y-4 lg:col-span-3 lg:sticky lg:top-4 lg:self-start",
590
- children: [/* @__PURE__ */ b("div", {
591
+ children: [/* @__PURE__ */ x("div", {
591
592
  className: "rounded-card border border-border-seam bg-gloss-card shadow-pop p-4",
592
593
  children: [
593
- /* @__PURE__ */ b("h4", {
594
+ /* @__PURE__ */ x("h4", {
594
595
  className: "mb-1 flex items-center gap-2 text-sm font-semibold text-text-primary",
595
- children: [/* @__PURE__ */ y(v, { className: "h-4 w-4 text-text-secondary" }), "Section blocks"]
596
+ children: [/* @__PURE__ */ b(y, { className: "h-4 w-4 text-text-secondary" }), "Section blocks"]
596
597
  }),
597
- /* @__PURE__ */ y("p", {
598
+ /* @__PURE__ */ b("p", {
598
599
  className: "mb-3 text-[11px] text-text-secondary",
599
600
  children: "Click to append, or drag onto the canvas."
600
601
  }),
601
- /* @__PURE__ */ y("div", {
602
+ /* @__PURE__ */ b("div", {
602
603
  className: "grid grid-cols-2 gap-2",
603
604
  children: fe.map((e) => {
604
605
  let t = e.icon;
605
- return /* @__PURE__ */ b("button", {
606
+ return /* @__PURE__ */ x("button", {
606
607
  type: "button",
607
608
  draggable: !0,
608
- onDragStart: Pt(e.type),
609
- onDragEnd: It,
610
- onClick: () => kt(e.type),
609
+ onDragStart: Ft(e.type),
610
+ onDragEnd: Lt,
611
+ onClick: () => At(e.type),
611
612
  title: e.description,
612
613
  className: "group flex cursor-grab flex-col gap-2 rounded-lg border border-border-subtle bg-bg-surface p-2 text-start transition-all hover:border-border-strong hover:shadow-pop active:cursor-grabbing",
613
- children: [/* @__PURE__ */ y("div", {
614
+ children: [/* @__PURE__ */ b("div", {
614
615
  className: "h-12 overflow-hidden rounded-md border border-border-subtle/60 bg-bg-sunken/50 p-1.5",
615
- children: /* @__PURE__ */ y(pe, { type: e.type })
616
- }), /* @__PURE__ */ b("div", {
616
+ children: /* @__PURE__ */ b(pe, { type: e.type })
617
+ }), /* @__PURE__ */ x("div", {
617
618
  className: "flex items-center gap-1.5",
618
- children: [/* @__PURE__ */ y(t, { className: "h-3.5 w-3.5 text-text-secondary group-hover:text-primary" }), /* @__PURE__ */ y("span", {
619
+ children: [/* @__PURE__ */ b(t, { className: "h-3.5 w-3.5 text-text-secondary group-hover:text-primary" }), /* @__PURE__ */ b("span", {
619
620
  className: "text-xs font-medium text-text-primary",
620
621
  children: e.label
621
622
  })]
@@ -624,30 +625,30 @@ var We = () => {
624
625
  })
625
626
  })
626
627
  ]
627
- }), /* @__PURE__ */ b("div", {
628
+ }), /* @__PURE__ */ x("div", {
628
629
  className: "rounded-card border border-border-seam bg-gloss-card shadow-pop p-4",
629
- children: [/* @__PURE__ */ b("h4", {
630
+ children: [/* @__PURE__ */ x("h4", {
630
631
  className: "mb-3 flex items-center gap-2 text-sm font-semibold text-text-primary",
631
- children: [/* @__PURE__ */ y(Ee, { className: "h-4 w-4 text-text-secondary" }), "Templates"]
632
- }), /* @__PURE__ */ b("div", {
632
+ children: [/* @__PURE__ */ b(Ee, { className: "h-4 w-4 text-text-secondary" }), "Templates"]
633
+ }), /* @__PURE__ */ x("div", {
633
634
  className: "space-y-2",
634
- children: [wt.length === 0 && /* @__PURE__ */ y("p", {
635
+ children: [Tt.length === 0 && /* @__PURE__ */ b("p", {
635
636
  className: "text-xs text-text-secondary",
636
637
  children: "No templates yet. Create a campaign template to reuse it here."
637
- }), wt.map((e) => /* @__PURE__ */ b("button", {
638
+ }), Tt.map((e) => /* @__PURE__ */ x("button", {
638
639
  type: "button",
639
- onClick: () => zt(e),
640
- className: u("flex w-full flex-col items-start rounded-md border px-3 py-2.5 text-start transition-colors", P === e.id ? "border-primary bg-action-primary-bg/5" : "border-border-subtle hover:bg-bg-sunken"),
640
+ onClick: () => Bt(e),
641
+ className: u("flex w-full flex-col items-start rounded-md border px-3 py-2.5 text-start transition-colors", N === e.id ? "border-primary bg-action-primary-bg/5" : "border-border-subtle hover:bg-bg-sunken"),
641
642
  children: [
642
- /* @__PURE__ */ y("span", {
643
+ /* @__PURE__ */ b("span", {
643
644
  className: "text-sm font-medium text-text-primary",
644
645
  children: e.name
645
646
  }),
646
- e.description && /* @__PURE__ */ y("span", {
647
+ e.description && /* @__PURE__ */ b("span", {
647
648
  className: "mt-0.5 text-[10px] text-text-secondary",
648
649
  children: e.description
649
650
  }),
650
- /* @__PURE__ */ y("span", {
651
+ /* @__PURE__ */ b("span", {
651
652
  className: "mt-1 rounded-full bg-bg-sunken px-2 py-0.5 text-[10px] capitalize text-text-secondary",
652
653
  children: e.category
653
654
  })
@@ -656,11 +657,11 @@ var We = () => {
656
657
  })]
657
658
  })]
658
659
  }),
659
- /* @__PURE__ */ b("div", {
660
+ /* @__PURE__ */ x("div", {
660
661
  className: "min-w-0 lg:col-span-6",
661
- children: [/* @__PURE__ */ y("div", {
662
+ children: [/* @__PURE__ */ b("div", {
662
663
  className: "mb-4 flex justify-center",
663
- children: /* @__PURE__ */ y("div", {
664
+ children: /* @__PURE__ */ b("div", {
664
665
  className: "inline-flex items-center gap-0.5 rounded-lg border border-border-subtle bg-bg-surface p-0.5",
665
666
  children: [
666
667
  {
@@ -679,105 +680,105 @@ var We = () => {
679
680
  label: "Mobile"
680
681
  }
681
682
  ].map((e) => {
682
- let t = e.icon, n = at === e.key;
683
- return /* @__PURE__ */ b("button", {
684
- onClick: () => ot(e.key),
683
+ let t = e.icon, n = st === e.key;
684
+ return /* @__PURE__ */ x("button", {
685
+ onClick: () => ct(e.key),
685
686
  title: e.label,
686
687
  "aria-label": e.label,
687
688
  "aria-pressed": n,
688
689
  className: u("inline-flex items-center gap-1.5 rounded-md px-3 py-1.5 text-sm font-medium transition-colors", n ? "bg-action-primary-bg text-action-primary-text" : "text-text-secondary hover:text-text-primary"),
689
- children: [/* @__PURE__ */ y(t, { className: "h-4 w-4" }), /* @__PURE__ */ y("span", {
690
+ children: [/* @__PURE__ */ b(t, { className: "h-4 w-4" }), /* @__PURE__ */ b("span", {
690
691
  className: "hidden sm:inline",
691
692
  children: e.label
692
693
  })]
693
694
  }, e.key);
694
695
  })
695
696
  })
696
- }), /* @__PURE__ */ b("div", {
697
- className: u("mx-auto overflow-hidden rounded-card border border-border-seam bg-bg-canvas shadow-pop transition-all", Tt[at]),
698
- children: [/* @__PURE__ */ b("div", {
697
+ }), /* @__PURE__ */ x("div", {
698
+ className: u("mx-auto overflow-hidden rounded-card border border-border-seam bg-bg-canvas shadow-pop transition-all", Et[st]),
699
+ children: [/* @__PURE__ */ x("div", {
699
700
  className: "flex items-center gap-2 border-b border-border-subtle bg-bg-sunken/60 px-4 py-2.5",
700
- children: [/* @__PURE__ */ b("div", {
701
+ children: [/* @__PURE__ */ x("div", {
701
702
  className: "flex gap-1.5",
702
703
  children: [
703
- /* @__PURE__ */ y("span", { className: "h-2.5 w-2.5 rounded-full bg-status-error-bg" }),
704
- /* @__PURE__ */ y("span", { className: "h-2.5 w-2.5 rounded-full bg-status-warning-bg" }),
705
- /* @__PURE__ */ y("span", { className: "h-2.5 w-2.5 rounded-full bg-status-success-bg" })
704
+ /* @__PURE__ */ b("span", { className: "h-2.5 w-2.5 rounded-full bg-status-error-bg" }),
705
+ /* @__PURE__ */ b("span", { className: "h-2.5 w-2.5 rounded-full bg-status-warning-bg" }),
706
+ /* @__PURE__ */ b("span", { className: "h-2.5 w-2.5 rounded-full bg-status-success-bg" })
706
707
  ]
707
- }), /* @__PURE__ */ b("div", {
708
+ }), /* @__PURE__ */ x("div", {
708
709
  className: "mx-auto flex max-w-[70%] items-center gap-1.5 truncate rounded-md bg-bg-surface px-3 py-1 text-[11px] text-text-secondary",
709
- children: [/* @__PURE__ */ y(Te, { className: "h-3 w-3 shrink-0" }), /* @__PURE__ */ y("span", {
710
+ children: [/* @__PURE__ */ b(Te, { className: "h-3 w-3 shrink-0" }), /* @__PURE__ */ b("span", {
710
711
  className: "truncate",
711
- children: Gt
712
+ children: Kt
712
713
  })]
713
714
  })]
714
- }), Y.length === 0 ? /* @__PURE__ */ b("div", {
715
- onDragOver: Lt(0),
716
- onDrop: Rt(0),
717
- className: u("m-4 flex flex-col items-center justify-center gap-2 rounded-lg border-2 border-dashed p-12 text-center transition-colors", mt ? "border-primary bg-action-primary-bg/5" : "border-border-subtle"),
715
+ }), J.length === 0 ? /* @__PURE__ */ x("div", {
716
+ onDragOver: Rt(0),
717
+ onDrop: zt(0),
718
+ className: u("m-4 flex flex-col items-center justify-center gap-2 rounded-lg border-2 border-dashed p-12 text-center transition-colors", gt ? "border-primary bg-action-primary-bg/5" : "border-border-subtle"),
718
719
  children: [
719
- /* @__PURE__ */ y(ke, { className: "h-6 w-6 text-text-secondary" }),
720
- /* @__PURE__ */ y("p", {
720
+ /* @__PURE__ */ b(ke, { className: "h-6 w-6 text-text-secondary" }),
721
+ /* @__PURE__ */ b("p", {
721
722
  className: "text-sm font-medium text-text-primary",
722
723
  children: "Start building your page"
723
724
  }),
724
- /* @__PURE__ */ y("p", {
725
+ /* @__PURE__ */ b("p", {
725
726
  className: "max-w-xs text-xs text-text-secondary",
726
727
  children: "Drag a block from the left, or click one to add it here."
727
728
  })
728
729
  ]
729
- }) : /* @__PURE__ */ b("div", { children: [Y.map((e, t) => /* @__PURE__ */ y(me, {
730
+ }) : /* @__PURE__ */ x("div", { children: [J.map((e, t) => /* @__PURE__ */ b(me, {
730
731
  section: e,
731
732
  index: t,
732
- total: Y.length,
733
- selected: I === e.id,
734
- dropBefore: J === t,
735
- onSelect: () => L(e.id),
736
- onMoveUp: () => Et(e.id, "up"),
737
- onMoveDown: () => Et(e.id, "down"),
738
- onDuplicate: () => Ot(e.id),
739
- onRemove: () => Dt(e.id),
740
- onHandleDragStart: Ft(e.id),
741
- onDragEnd: It,
742
- onBlockDragOver: Lt(t),
743
- onBlockDrop: Rt(t)
744
- }, e.id)), /* @__PURE__ */ b("div", {
745
- onDragOver: Lt(Y.length),
746
- onDrop: Rt(Y.length),
747
- className: u("relative border-t border-dashed transition-colors", J === Y.length ? "border-primary bg-action-primary-bg/5" : "border-border-subtle"),
748
- children: [J === Y.length && /* @__PURE__ */ y("div", { className: "pointer-events-none absolute inset-x-0 -top-px h-0.5 bg-action-primary-bg" }), /* @__PURE__ */ b("button", {
733
+ total: J.length,
734
+ selected: F === e.id,
735
+ dropBefore: q === t,
736
+ onSelect: () => I(e.id),
737
+ onMoveUp: () => Dt(e.id, "up"),
738
+ onMoveDown: () => Dt(e.id, "down"),
739
+ onDuplicate: () => kt(e.id),
740
+ onRemove: () => Ot(e.id),
741
+ onHandleDragStart: It(e.id),
742
+ onDragEnd: Lt,
743
+ onBlockDragOver: Rt(t),
744
+ onBlockDrop: zt(t)
745
+ }, e.id)), /* @__PURE__ */ x("div", {
746
+ onDragOver: Rt(J.length),
747
+ onDrop: zt(J.length),
748
+ className: u("relative border-t border-dashed transition-colors", q === J.length ? "border-primary bg-action-primary-bg/5" : "border-border-subtle"),
749
+ children: [q === J.length && /* @__PURE__ */ b("div", { className: "pointer-events-none absolute inset-x-0 -top-px h-0.5 bg-action-primary-bg" }), /* @__PURE__ */ x("button", {
749
750
  type: "button",
750
- onClick: () => kt("features"),
751
+ onClick: () => At("features"),
751
752
  className: "flex w-full items-center justify-center gap-2 p-4 text-sm text-text-secondary transition-colors hover:bg-action-primary-bg/5 hover:text-primary",
752
- children: [/* @__PURE__ */ y(ke, { className: "h-4 w-4" }), "Add section"]
753
+ children: [/* @__PURE__ */ b(ke, { className: "h-4 w-4" }), "Add section"]
753
754
  })]
754
755
  })] })]
755
756
  })]
756
757
  }),
757
- /* @__PURE__ */ y("aside", {
758
+ /* @__PURE__ */ b("aside", {
758
759
  className: "lg:col-span-3 lg:sticky lg:top-4 lg:self-start",
759
- children: Q ? /* @__PURE__ */ y("div", {
760
+ children: Q ? /* @__PURE__ */ b("div", {
760
761
  className: "lg:max-h-[calc(100vh-2rem)]",
761
- children: /* @__PURE__ */ y(he, {
762
+ children: /* @__PURE__ */ b(he, {
762
763
  section: Q,
763
- onChangeConfig: (e) => Mt(Q.id, e),
764
- onChangeLabel: (e) => Nt(Q.id, e),
765
- onClose: () => L(null),
766
- onDuplicate: () => Ot(Q.id),
767
- onRemove: () => Dt(Q.id)
764
+ onChangeConfig: (e) => Nt(Q.id, e),
765
+ onChangeLabel: (e) => Pt(Q.id, e),
766
+ onClose: () => I(null),
767
+ onDuplicate: () => kt(Q.id),
768
+ onRemove: () => Ot(Q.id)
768
769
  })
769
- }) : /* @__PURE__ */ b("div", {
770
+ }) : /* @__PURE__ */ x("div", {
770
771
  className: "flex flex-col items-center justify-center gap-3 rounded-card border border-dashed border-border-subtle bg-bg-surface p-6 text-center",
771
772
  children: [
772
- /* @__PURE__ */ y("span", {
773
+ /* @__PURE__ */ b("span", {
773
774
  className: "flex h-11 w-11 items-center justify-center rounded-full bg-action-primary-bg/10 text-primary",
774
- children: /* @__PURE__ */ y(Oe, { className: "h-5 w-5" })
775
+ children: /* @__PURE__ */ b(Oe, { className: "h-5 w-5" })
775
776
  }),
776
- /* @__PURE__ */ y("p", {
777
+ /* @__PURE__ */ b("p", {
777
778
  className: "text-sm font-semibold text-text-primary",
778
779
  children: "No block selected"
779
780
  }),
780
- /* @__PURE__ */ y("p", {
781
+ /* @__PURE__ */ b("p", {
781
782
  className: "text-xs text-text-secondary",
782
783
  children: "Select a block on the canvas to edit its text, colors, spacing and alignment."
783
784
  })
@@ -787,35 +788,35 @@ var We = () => {
787
788
  ]
788
789
  })
789
790
  }),
790
- /* @__PURE__ */ y(re, {
791
- open: ct,
792
- onClose: () => R(!1),
793
- title: j || "Landing Page",
791
+ /* @__PURE__ */ b(re, {
792
+ open: ut,
793
+ onClose: () => L(!1),
794
+ title: A || "Landing Page",
794
795
  description: $ ? `Preview of your landing page. Published at ${$} — save and publish again to update it.` : "Preview of your landing page. Publish it to make it public.",
795
796
  size: "xl",
796
- footer: /* @__PURE__ */ b(Ie, { children: [$ && /* @__PURE__ */ b("a", {
797
+ footer: /* @__PURE__ */ x(Ie, { children: [$ && /* @__PURE__ */ x("a", {
797
798
  href: $,
798
799
  target: "_blank",
799
800
  rel: "noreferrer",
800
801
  className: "inline-flex items-center gap-2 rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
801
- children: [/* @__PURE__ */ y(_, { className: "h-4 w-4" }), "Open live page"]
802
- }), /* @__PURE__ */ y("button", {
802
+ children: [/* @__PURE__ */ b(v, { className: "h-4 w-4" }), "Open live page"]
803
+ }), /* @__PURE__ */ b("button", {
803
804
  type: "button",
804
- onClick: () => R(!1),
805
+ onClick: () => L(!1),
805
806
  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",
806
807
  children: "Close"
807
808
  })] }),
808
- children: /* @__PURE__ */ y("div", {
809
+ children: /* @__PURE__ */ b("div", {
809
810
  className: "overflow-hidden rounded-lg border border-border-subtle bg-bg-canvas",
810
- children: Y.length === 0 ? /* @__PURE__ */ y("p", {
811
+ children: J.length === 0 ? /* @__PURE__ */ b("p", {
811
812
  className: "p-8 text-center text-sm text-text-secondary",
812
813
  children: "This page has no sections yet."
813
- }) : Y.map((e) => /* @__PURE__ */ y(ge, { section: e }, e.id))
814
+ }) : J.map((e) => /* @__PURE__ */ b(ge, { section: e }, e.id))
814
815
  })
815
816
  })
816
817
  ]
817
818
  });
818
819
  };
819
- export { We as LandingPageBuilderPage };
820
+ export { Ke as LandingPageBuilderPage };
820
821
 
821
822
  //# sourceMappingURL=LandingPageBuilderPage.js.map