@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
@@ -5,38 +5,39 @@ import { PageLayout as a } from "../../components/PageLayout.js";
5
5
  import { StatusBadge as o } from "../../components/StatusBadge.js";
6
6
  import { ToastContainer as s } from "../../components/Toast.js";
7
7
  import { useHeadshotMarketing as c } from "../../context/HeadshotMarketingContext.js";
8
- import { ACTION_TYPES as l, CHIP_TONE as u, TRIGGER_TYPES as ee, actionMeta as te, defaultConfig as ne, inPort as d, isConditionNode as f, nodeSubtitle as re, outPort as ie } from "./workflowBuilderModel.js";
9
- import { WorkflowCompileError as ae, compileGraph as oe, decompileWorkflow as se, layoutGraph as ce, seedGraph as p } from "./workflowCompiler.js";
10
- import { WorkflowCanvasNode as le } from "./WorkflowCanvasNode.js";
11
- import { WorkflowConfigEmpty as ue, WorkflowNodeConfigPanel as de } from "./WorkflowNodeConfigPanel.js";
12
- import { WorkflowRunsPanel as fe } from "./WorkflowRunsPanel.js";
13
- import { useCallback as m, useEffect as pe, useMemo as me, useRef as h, useState as g } from "react";
14
- import { ChevronRight as he, Maximize2 as ge, Minus as _e, Move as ve, Play as ye, Plus as be, Save as xe } from "lucide-react";
15
- import { useSearchParams as Se } from "react-router";
16
- import { jsx as _, jsxs as v } from "react/jsx-runtime";
17
- import { PagePurpose as Ce } from "@burdenoff/fe-libs/ui";
8
+ import { ACTION_TYPES as l, CHIP_TONE as u, TRIGGER_TYPES as ee, actionMeta as te, defaultConfig as ne, inPort as re, isConditionNode as d, nodeSubtitle as ie, outPort as f } from "./workflowBuilderModel.js";
9
+ import { WorkflowCompileError as ae, compileGraph as oe, decompileWorkflow as se, layoutGraph as ce, seedGraph as le } from "./workflowCompiler.js";
10
+ import { WorkflowCanvasNode as ue } from "./WorkflowCanvasNode.js";
11
+ import { WorkflowConfigEmpty as de, WorkflowNodeConfigPanel as fe } from "./WorkflowNodeConfigPanel.js";
12
+ import { WorkflowRunsPanel as pe } from "./WorkflowRunsPanel.js";
13
+ import { readableErrorOrNull as me } from "../../utils/readableError.js";
14
+ import { useCallback as p, useEffect as he, useMemo as ge, useRef as m, useState as h } from "react";
15
+ import { ChevronRight as _e, Maximize2 as ve, Minus as ye, Move as be, Play as xe, Plus as Se, Save as Ce } from "lucide-react";
16
+ import { useSearchParams as we } from "react-router";
17
+ import { jsx as g, jsxs as _ } from "react/jsx-runtime";
18
+ import { PagePurpose as Te } from "@burdenoff/fe-libs/ui";
18
19
  // src/headshotmarketing/pages/automation/WorkflowBuilderPage.tsx
19
- var we = 1600, Te = 1400, Ee = .5, De = 1.4, Oe = .82, y = {
20
+ var Ee = 1600, De = 1400, v = .5, y = 1.4, b = .82, x = {
20
21
  x: 12,
21
22
  y: 12
22
23
  };
23
- function b(e) {
24
+ function S(e) {
24
25
  return e === "yes" ? "var(--color-status-success-text)" : e === "no" ? "var(--color-status-error-text)" : "var(--color-action-primary-bg)";
25
26
  }
26
- function ke(e) {
27
+ function Oe(e) {
27
28
  return e === "yes" ? "wf-arrow-yes" : e === "no" ? "wf-arrow-no" : "wf-arrow-accent";
28
29
  }
29
- function x(e, t) {
30
+ function C(e, t) {
30
31
  return e instanceof Error && e.message ? e.message : t;
31
32
  }
32
- function S(e, t, n) {
33
+ function w(e, t, n) {
33
34
  let r = e.find((e) => e.id === n);
34
35
  if (!r || r.kind === "trigger") return {
35
36
  nodes: e,
36
37
  edges: t
37
38
  };
38
39
  let i = t.filter((e) => e.target === n), a = t.filter((e) => e.source === n), o = i.find((e) => e.branch !== "no") ?? i[0], s = t.filter((e) => e.source !== n && e.target !== n), c = a.length === 1 ? a[0] : void 0;
39
- return o && c && !f(r) && s.push({
40
+ return o && c && !d(r) && s.push({
40
41
  id: `edge-${o.source}-${c.target}-${Date.now()}`,
41
42
  source: o.source,
42
43
  target: c.target,
@@ -46,11 +47,11 @@ function S(e, t, n) {
46
47
  edges: s
47
48
  };
48
49
  }
49
- function Ae(e, t, n, r, i) {
50
+ function T(e, t, n, r, i) {
50
51
  let a = e.find((e) => e.id === n);
51
52
  if (!a) return { error: "Select the step to add after." };
52
53
  let o = t.filter((e) => e.source === n);
53
- if (f(a)) {
54
+ if (d(a)) {
54
55
  let a = o.some((e) => e.branch === "yes"), s = o.some((e) => e.branch === "no");
55
56
  return a && s ? { error: "This condition already has a Yes and a No path — select a step on one of them to add after it." } : {
56
57
  nodes: [...e, r],
@@ -72,69 +73,69 @@ function Ae(e, t, n, r, i) {
72
73
  id: `edge-${i}-next`,
73
74
  source: r.id,
74
75
  target: s.target,
75
- branch: f(r) ? "yes" : null
76
+ branch: d(r) ? "yes" : null
76
77
  }), {
77
78
  nodes: [...e, r],
78
79
  edges: [...c, ...l]
79
80
  };
80
81
  }
81
- var C = () => {
82
- let { navigate: f, basePath: C } = c(), [je, Me] = Se(), w = je.get("id"), { data: Ne, loading: Pe, error: Fe } = n({
83
- variables: { id: w ?? "" },
84
- skip: !w,
82
+ var E = () => {
83
+ let { navigate: d, basePath: E } = c(), [ke, Ae] = we(), D = ke.get("id"), { data: je, loading: Me, error: Ne } = n({
84
+ variables: { id: D ?? "" },
85
+ skip: !D,
85
86
  fetchPolicy: "network-only"
86
- }), [Ie] = t(), [Le] = r(), [Re] = e(), [T, E] = g("New Workflow"), [D, O] = g(null), [k, A] = g(() => p().nodes), [j, M] = g(() => p().edges), [N, P] = g(null), [ze, Be] = g(null), [F, I] = g(null), [L, R] = g(null), [z, B] = g(!1), [Ve, V] = g([]), H = h(null), U = Ne?.headshotmarketingAutomationWorkflow ?? null;
87
- pe(() => {
88
- if (!U || H.current === U.id) return;
89
- H.current = U.id;
90
- let e = se(U);
91
- A(e.nodes), M(e.edges), E(U.name), O(U), P(null);
92
- }, [U]);
93
- let [W, He] = g(Oe), [G, Ue] = g(y), K = h(null), We = h(null), q = me(() => {
87
+ }), [Pe] = t(), [Fe] = r(), [Ie] = e(), [O, Le] = h("New Workflow"), [k, A] = h(null), [j, M] = h(() => le().nodes), [N, P] = h(() => le().edges), [F, I] = h(null), [Re, ze] = h(null), [Be, L] = h(null), [R, z] = h(null), [Ve, He] = h(!1), [Ue, We] = h([]), B = m(null), V = je?.headshotmarketingAutomationWorkflow ?? null;
88
+ he(() => {
89
+ if (!V || B.current === V.id) return;
90
+ B.current = V.id;
91
+ let e = se(V);
92
+ M(e.nodes), P(e.edges), Le(V.name), A(V), I(null);
93
+ }, [V]);
94
+ let [H, Ge] = h(b), [U, Ke] = h(x), W = m(null), qe = m(null), G = ge(() => {
94
95
  let e = /* @__PURE__ */ new Map();
95
- for (let t of k) e.set(t.id, t);
96
+ for (let t of j) e.set(t.id, t);
96
97
  return e;
97
- }, [k]), J = N ? q.get(N) ?? null : null, Y = me(() => k.find((e) => e.kind === "trigger") ?? null, [k]), X = m((e) => {
98
- V((t) => t.filter((t) => t.id !== e));
99
- }, []), Z = m((e) => {
98
+ }, [j]), K = F ? G.get(F) ?? null : null, q = ge(() => j.find((e) => e.kind === "trigger") ?? null, [j]), J = p((e) => {
99
+ We((t) => t.filter((t) => t.id !== e));
100
+ }, []), Y = p((e) => {
100
101
  let t = `toast-${Date.now()}-${Math.round(performance.now())}`;
101
- V((n) => [...n, {
102
+ We((n) => [...n, {
102
103
  ...e,
103
104
  id: t
104
- }]), window.setTimeout(() => X(t), 5e3);
105
- }, [X]), Q = () => {
106
- Be(null), I(null);
107
- }, Ge = m((e, t, n) => {
108
- A((r) => r.map((r) => r.id === e ? {
105
+ }]), window.setTimeout(() => J(t), 5e3);
106
+ }, [J]), X = () => {
107
+ ze(null), L(null);
108
+ }, Je = p((e, t, n) => {
109
+ M((r) => r.map((r) => r.id === e ? {
109
110
  ...r,
110
111
  x: t,
111
112
  y: n
112
113
  } : r));
113
- }, []), Ke = m((e, t) => {
114
- A((n) => n.map((n) => n.id === e ? {
114
+ }, []), Ye = p((e, t) => {
115
+ M((n) => n.map((n) => n.id === e ? {
115
116
  ...n,
116
117
  label: t
117
118
  } : n));
118
- }, []), qe = m((e, t) => {
119
- A((n) => n.map((n) => n.id === e ? {
119
+ }, []), Xe = p((e, t) => {
120
+ M((n) => n.map((n) => n.id === e ? {
120
121
  ...n,
121
122
  config: {
122
123
  ...n.config,
123
124
  ...t
124
125
  }
125
126
  } : n));
126
- }, []), Je = m((e) => {
127
- A((t) => t.map((t) => t.kind === "trigger" ? {
127
+ }, []), Ze = p((e) => {
128
+ M((t) => t.map((t) => t.kind === "trigger" ? {
128
129
  ...t,
129
130
  actionType: e
130
131
  } : t));
131
- }, []), Ye = m((e) => {
132
- let t = S(k, j, e);
133
- A(ce(t.nodes, t.edges)), M(t.edges), P((t) => t === e ? null : t), Q();
134
- }, [k, j]), Xe = m((e) => {
132
+ }, []), Qe = p((e) => {
133
+ let t = w(j, N, e);
134
+ M(ce(t.nodes, t.edges)), P(t.edges), I((t) => t === e ? null : t), X();
135
+ }, [j, N]), $e = p((e) => {
135
136
  let t = te(e);
136
137
  if (!t) return;
137
- let n = J?.id ?? Y?.id ?? null;
138
+ let n = K?.id ?? q?.id ?? null;
138
139
  if (!n) return;
139
140
  let r = Date.now(), i = {
140
141
  id: `node-${r}`,
@@ -144,304 +145,304 @@ var C = () => {
144
145
  x: 0,
145
146
  y: 0,
146
147
  config: ne(e)
147
- }, a = Ae(k, j, n, i, r);
148
- "error" in a ? I(a.error) : (A(ce(a.nodes, a.edges)), M(a.edges), P(i.id), Q());
148
+ }, a = T(j, N, n, i, r);
149
+ "error" in a ? L(a.error) : (M(ce(a.nodes, a.edges)), P(a.edges), I(i.id), X());
149
150
  }, [
150
- J,
151
- Y,
152
- k,
153
- j
151
+ K,
152
+ q,
153
+ j,
154
+ N
154
155
  ]);
155
- pe(() => {
156
- N && typeof window < "u" && window.innerWidth < 1280 && We.current?.scrollIntoView({
156
+ he(() => {
157
+ F && typeof window < "u" && window.innerWidth < 1280 && qe.current?.scrollIntoView({
157
158
  behavior: "smooth",
158
159
  block: "nearest"
159
160
  });
160
- }, [N]);
161
- let Ze = (e) => He((t) => Math.min(De, Math.max(Ee, Math.round((t + e) * 100) / 100))), Qe = () => {
162
- He(Oe), Ue(y);
163
- }, $e = (e) => {
164
- K.current = {
161
+ }, [F]);
162
+ let Z = (e) => Ge((t) => Math.min(y, Math.max(v, Math.round((t + e) * 100) / 100))), et = () => {
163
+ Ge(b), Ke(x);
164
+ }, tt = (e) => {
165
+ W.current = {
165
166
  startX: e.clientX,
166
167
  startY: e.clientY,
167
- originX: G.x,
168
- originY: G.y,
168
+ originX: U.x,
169
+ originY: U.y,
169
170
  moved: !1
170
171
  }, e.currentTarget.setPointerCapture(e.pointerId);
171
- }, et = (e) => {
172
- let t = K.current;
172
+ }, nt = (e) => {
173
+ let t = W.current;
173
174
  if (!t) return;
174
175
  let n = e.clientX - t.startX, r = e.clientY - t.startY;
175
- !t.moved && Math.hypot(n, r) < 3 || (t.moved = !0, Ue({
176
+ !t.moved && Math.hypot(n, r) < 3 || (t.moved = !0, Ke({
176
177
  x: t.originX + n,
177
178
  y: t.originY + r
178
179
  }));
179
- }, tt = (e) => {
180
- let t = K.current;
181
- K.current = null, e.currentTarget.releasePointerCapture?.(e.pointerId), t && !t.moved && P(null);
182
- }, $ = () => {
183
- if (!T.trim()) return I("Give the workflow a name."), null;
180
+ }, rt = (e) => {
181
+ let t = W.current;
182
+ W.current = null, e.currentTarget.releasePointerCapture?.(e.pointerId), t && !t.moved && I(null);
183
+ }, Q = () => {
184
+ if (!O.trim()) return L("Give the workflow a name."), null;
184
185
  try {
185
- let e = oe(k, j);
186
- return Q(), e;
186
+ let e = oe(j, N);
187
+ return X(), e;
187
188
  } catch (e) {
188
- if (e instanceof ae) return I(e.message), Be(e.nodeId), e.nodeId && P(e.nodeId), null;
189
+ if (e instanceof ae) return L(e.message), ze(e.nodeId), e.nodeId && I(e.nodeId), null;
189
190
  throw e;
190
191
  }
191
- }, nt = async (e) => {
192
- let t = e.triggerType, n = D?.description ?? null;
193
- if (D) return (await Le({ variables: {
194
- id: D.id,
192
+ }, it = async (e) => {
193
+ let t = e.triggerType, n = k?.description ?? null;
194
+ if (k) return (await Fe({ variables: {
195
+ id: k.id,
195
196
  input: {
196
- name: T.trim(),
197
+ name: O.trim(),
197
198
  description: n,
198
199
  triggerType: t,
199
200
  triggerConfig: e.triggerConfig,
200
201
  steps: e.steps
201
202
  }
202
203
  } })).data?.updateHeadshotmarketingAutomationWorkflow ?? null;
203
- let r = (await Ie({ variables: { input: {
204
- name: T.trim(),
204
+ let r = (await Pe({ variables: { input: {
205
+ name: O.trim(),
205
206
  description: n,
206
207
  triggerType: t,
207
208
  triggerConfig: e.triggerConfig,
208
209
  steps: e.steps
209
210
  } } })).data?.createHeadshotmarketingAutomationWorkflow ?? null;
210
- return r && (H.current = r.id, Me({ id: r.id }, { replace: !0 })), r;
211
- }, rt = async () => {
212
- let e = $();
211
+ return r && (B.current = r.id, Ae({ id: r.id }, { replace: !0 })), r;
212
+ }, at = async () => {
213
+ let e = Q();
213
214
  if (e) {
214
- R("save");
215
+ z("save");
215
216
  try {
216
- let t = await nt(e);
217
- t && (O(t), Z({
217
+ let t = await it(e);
218
+ t && (A(t), Y({
218
219
  title: "Workflow saved",
219
220
  description: t.status === "ACTIVE" ? "Changes are live for new runs." : "Saved as a draft. Publish it to start running.",
220
221
  variant: "success"
221
222
  }));
222
223
  } catch (e) {
223
- let t = x(e, "Failed to save the workflow.");
224
- I(t), Z({
224
+ let t = C(e, "Failed to save the workflow.");
225
+ L(t), Y({
225
226
  title: "Save failed",
226
227
  description: t,
227
228
  variant: "error"
228
229
  });
229
230
  } finally {
230
- R(null);
231
+ z(null);
231
232
  }
232
233
  }
233
- }, it = async () => {
234
- let e = $();
234
+ }, ot = async () => {
235
+ let e = Q();
235
236
  if (e) {
236
- R("publish");
237
+ z("publish");
237
238
  try {
238
- let t = await nt(e);
239
- t && t.status !== "ACTIVE" && (t = (await Re({ variables: { id: t.id } })).data?.activateHeadshotmarketingAutomationWorkflow ?? t), t && O(t), f(C + "/automation/workflows");
239
+ let t = await it(e);
240
+ t && t.status !== "ACTIVE" && (t = (await Ie({ variables: { id: t.id } })).data?.activateHeadshotmarketingAutomationWorkflow ?? t), t && A(t), d(E + "/automation/workflows");
240
241
  } catch (e) {
241
- let t = x(e, "Failed to publish the workflow.");
242
- I(t), Z({
242
+ let t = C(e, "Failed to publish the workflow.");
243
+ L(t), Y({
243
244
  title: "Publish failed",
244
245
  description: t,
245
246
  variant: "error"
246
247
  });
247
248
  } finally {
248
- R(null);
249
+ z(null);
249
250
  }
250
251
  }
251
- }, at = () => {
252
- let e = $();
253
- e && (D?.status === "ACTIVE" ? B(!0) : Z({
252
+ }, st = () => {
253
+ let e = Q();
254
+ e && (k?.status === "ACTIVE" ? He(!0) : Y({
254
255
  title: "Workflow is valid",
255
256
  description: `${e.steps.length} engine step${e.steps.length === 1 ? "" : "s"}. Publish it to run it for a lead.`,
256
257
  variant: "success"
257
258
  }));
258
- }, ot = Math.round(W * 100), st = Y?.actionType ?? "LEAD_CREATED";
259
- return w && Pe && !D ? /* @__PURE__ */ _(a, {
259
+ }, ct = Math.round(H * 100), $ = q?.actionType ?? "LEAD_CREATED";
260
+ return D && Me && !k ? /* @__PURE__ */ g(a, {
260
261
  title: "Workflow Builder",
261
- children: /* @__PURE__ */ _("p", {
262
+ children: /* @__PURE__ */ g("p", {
262
263
  className: "text-sm text-text-secondary",
263
264
  children: "Loading workflow…"
264
265
  })
265
- }) : w && !Pe && !U && !D ? /* @__PURE__ */ v(a, {
266
+ }) : D && !Me && !V && !k ? /* @__PURE__ */ _(a, {
266
267
  title: "Workflow Builder",
267
- children: [/* @__PURE__ */ _("div", {
268
- className: "rounded-lg border border-status-error-border bg-status-error-bg px-4 py-3 text-sm text-status-error-text",
269
- children: Fe ? `Could not load this workflow: ${Fe.message}` : "This workflow does not exist or was deleted."
270
- }), /* @__PURE__ */ _("button", {
268
+ children: [/* @__PURE__ */ g("div", {
269
+ className: "rounded-lg border border-status-error-border bg-status-error-bg-subtle px-4 py-3 text-sm text-status-error-text",
270
+ children: Ne ? `Could not load this workflow: ${me(Ne)}` : "This workflow does not exist or was deleted."
271
+ }), /* @__PURE__ */ g("button", {
271
272
  type: "button",
272
- onClick: () => f(C + "/automation/workflows"),
273
+ onClick: () => d(E + "/automation/workflows"),
273
274
  className: "inline-flex min-h-10 w-fit 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",
274
275
  children: "Back to workflows"
275
276
  })]
276
- }) : /* @__PURE__ */ v(a, {
277
+ }) : /* @__PURE__ */ _(a, {
277
278
  title: "Workflow Builder",
278
- header: /* @__PURE__ */ v("nav", {
279
+ header: /* @__PURE__ */ _("nav", {
279
280
  "aria-label": "Breadcrumb",
280
281
  className: "flex min-w-0 items-center gap-1.5 text-base font-normal sm:text-lg",
281
282
  children: [
282
- /* @__PURE__ */ _("button", {
283
+ /* @__PURE__ */ g("button", {
283
284
  type: "button",
284
- onClick: () => f(C + "/automation/workflows"),
285
+ onClick: () => d(E + "/automation/workflows"),
285
286
  className: "text-text-secondary hover:text-text-primary",
286
287
  children: "Automation"
287
288
  }),
288
- /* @__PURE__ */ _(he, {
289
+ /* @__PURE__ */ g(_e, {
289
290
  className: "h-4 w-4 flex-shrink-0 text-text-secondary",
290
291
  "aria-hidden": !0
291
292
  }),
292
- /* @__PURE__ */ _("input", {
293
+ /* @__PURE__ */ g("input", {
293
294
  type: "text",
294
- value: T,
295
- onChange: (e) => E(e.target.value),
295
+ value: O,
296
+ onChange: (e) => Le(e.target.value),
296
297
  "aria-label": "Workflow name",
297
298
  className: "min-w-0 flex-1 rounded-md border border-transparent bg-transparent px-1 py-0.5 font-semibold text-text-primary outline-none hover:border-border-subtle focus:border-border-strong",
298
299
  placeholder: "Workflow name"
299
300
  }),
300
- D && /* @__PURE__ */ _(o, {
301
- status: D.status.toLowerCase(),
301
+ k && /* @__PURE__ */ g(o, {
302
+ status: k.status.toLowerCase(),
302
303
  className: "ms-1"
303
304
  })
304
305
  ]
305
306
  }),
306
- actions: /* @__PURE__ */ v("div", {
307
+ actions: /* @__PURE__ */ _("div", {
307
308
  className: "flex flex-wrap items-center gap-2",
308
309
  children: [
309
- /* @__PURE__ */ v("button", {
310
- onClick: at,
311
- disabled: L !== null,
310
+ /* @__PURE__ */ _("button", {
311
+ onClick: st,
312
+ disabled: R !== null,
312
313
  className: "inline-flex min-h-10 items-center gap-2 rounded-md border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken disabled:opacity-60",
313
- children: [/* @__PURE__ */ _(ye, { className: "h-4 w-4" }), "Test"]
314
+ children: [/* @__PURE__ */ g(xe, { className: "h-4 w-4" }), "Test"]
314
315
  }),
315
- /* @__PURE__ */ v("button", {
316
- onClick: () => void rt(),
317
- disabled: L !== null,
316
+ /* @__PURE__ */ _("button", {
317
+ onClick: () => void at(),
318
+ disabled: R !== null,
318
319
  className: "inline-flex min-h-10 items-center gap-2 rounded-md border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken disabled:opacity-60",
319
- children: [/* @__PURE__ */ _(xe, { className: "h-4 w-4" }), L === "save" ? "Saving…" : "Save draft"]
320
+ children: [/* @__PURE__ */ g(Ce, { className: "h-4 w-4" }), R === "save" ? "Saving…" : "Save draft"]
320
321
  }),
321
- /* @__PURE__ */ _("button", {
322
- onClick: () => void it(),
323
- disabled: L !== null,
322
+ /* @__PURE__ */ g("button", {
323
+ onClick: () => void ot(),
324
+ disabled: R !== null,
324
325
  className: "inline-flex min-h-10 items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-semibold text-action-primary-text transition-colors hover:bg-action-primary-bgHover disabled:opacity-60",
325
- children: L === "publish" ? "Publishing…" : D?.status === "ACTIVE" ? "Publish changes" : "Publish"
326
+ children: R === "publish" ? "Publishing…" : k?.status === "ACTIVE" ? "Publish changes" : "Publish"
326
327
  })
327
328
  ]
328
329
  }),
329
330
  children: [
330
- /* @__PURE__ */ _(Ce, { children: "Design an automation visually. Pick the trigger that starts it, add the steps it should run — email, notify your team, wait, branch on a condition, tag, update a field, call a webhook — and Publish to put it to work on every new lead or contact. Save a draft while you iterate." }),
331
- F && /* @__PURE__ */ _("div", {
331
+ /* @__PURE__ */ g(Te, { children: "Design an automation visually. Pick the trigger that starts it, add the steps it should run — email, notify your team, wait, branch on a condition, tag, update a field, call a webhook — and Publish to put it to work on every new lead or contact. Save a draft while you iterate." }),
332
+ Be && /* @__PURE__ */ g("div", {
332
333
  role: "alert",
333
- className: "rounded-lg border border-status-error-border bg-status-error-bg px-4 py-3 text-sm text-status-error-text",
334
- children: F
334
+ className: "rounded-lg border border-status-error-border bg-status-error-bg-subtle px-4 py-3 text-sm text-status-error-text",
335
+ children: Be
335
336
  }),
336
- /* @__PURE__ */ v("div", {
337
+ /* @__PURE__ */ _("div", {
337
338
  className: "overflow-hidden rounded-card border border-border-seam bg-gloss-card shadow-pop",
338
- children: [/* @__PURE__ */ v("div", {
339
+ children: [/* @__PURE__ */ _("div", {
339
340
  className: "flex items-center justify-between gap-3 border-b border-border-subtle px-4 py-3",
340
- children: [/* @__PURE__ */ v("div", {
341
+ children: [/* @__PURE__ */ _("div", {
341
342
  className: "min-w-0",
342
- children: [/* @__PURE__ */ _("h3", {
343
+ children: [/* @__PURE__ */ g("h3", {
343
344
  className: "text-sm font-semibold uppercase tracking-wide text-text-primary",
344
345
  children: "Workflow Builder"
345
- }), /* @__PURE__ */ v("p", {
346
+ }), /* @__PURE__ */ _("p", {
346
347
  className: "text-xs text-text-secondary",
347
348
  children: [
348
- k.length - 1,
349
+ j.length - 1,
349
350
  " step",
350
- k.length === 2 ? "" : "s",
351
+ j.length === 2 ? "" : "s",
351
352
  " ·",
352
353
  " ",
353
- /* @__PURE__ */ v("span", {
354
+ /* @__PURE__ */ _("span", {
354
355
  className: "hidden sm:inline",
355
- children: [/* @__PURE__ */ _(ve, { className: "me-1 inline h-3.5 w-3.5" }), "drag nodes · drag the canvas to pan"]
356
+ children: [/* @__PURE__ */ g(be, { className: "me-1 inline h-3.5 w-3.5" }), "drag nodes · drag the canvas to pan"]
356
357
  })
357
358
  ]
358
359
  })]
359
- }), /* @__PURE__ */ v("div", {
360
+ }), /* @__PURE__ */ _("div", {
360
361
  className: "flex items-center gap-0.5 rounded-lg border border-border-seam bg-gloss-card p-1",
361
362
  children: [
362
- /* @__PURE__ */ _("button", {
363
+ /* @__PURE__ */ g("button", {
363
364
  type: "button",
364
- onClick: () => Ze(-.1),
365
- disabled: W <= Ee,
365
+ onClick: () => Z(-.1),
366
+ disabled: H <= v,
366
367
  "aria-label": "Zoom out",
367
368
  className: "flex h-8 w-8 items-center justify-center rounded-md text-text-secondary transition-colors hover:bg-bg-sunken hover:text-text-primary disabled:opacity-40",
368
- children: /* @__PURE__ */ _(_e, { className: "h-4 w-4" })
369
+ children: /* @__PURE__ */ g(ye, { className: "h-4 w-4" })
369
370
  }),
370
- /* @__PURE__ */ v("span", {
371
+ /* @__PURE__ */ _("span", {
371
372
  className: "min-w-11 text-center text-xs font-medium tabular-nums text-text-secondary",
372
- children: [ot, "%"]
373
+ children: [ct, "%"]
373
374
  }),
374
- /* @__PURE__ */ _("button", {
375
+ /* @__PURE__ */ g("button", {
375
376
  type: "button",
376
- onClick: () => Ze(.1),
377
- disabled: W >= De,
377
+ onClick: () => Z(.1),
378
+ disabled: H >= y,
378
379
  "aria-label": "Zoom in",
379
380
  className: "flex h-8 w-8 items-center justify-center rounded-md text-text-secondary transition-colors hover:bg-bg-sunken hover:text-text-primary disabled:opacity-40",
380
- children: /* @__PURE__ */ _(be, { className: "h-4 w-4" })
381
+ children: /* @__PURE__ */ g(Se, { className: "h-4 w-4" })
381
382
  }),
382
- /* @__PURE__ */ _("span", {
383
+ /* @__PURE__ */ g("span", {
383
384
  className: "mx-0.5 h-5 w-px bg-border-subtle",
384
385
  "aria-hidden": !0
385
386
  }),
386
- /* @__PURE__ */ _("button", {
387
+ /* @__PURE__ */ g("button", {
387
388
  type: "button",
388
- onClick: Qe,
389
+ onClick: et,
389
390
  "aria-label": "Reset view",
390
391
  className: "flex h-8 w-8 items-center justify-center rounded-md text-text-secondary transition-colors hover:bg-bg-sunken hover:text-text-primary",
391
- children: /* @__PURE__ */ _(ge, { className: "h-4 w-4" })
392
+ children: /* @__PURE__ */ g(ve, { className: "h-4 w-4" })
392
393
  })
393
394
  ]
394
395
  })]
395
- }), /* @__PURE__ */ v("div", {
396
+ }), /* @__PURE__ */ _("div", {
396
397
  className: "grid grid-cols-1 lg:grid-cols-[104px_minmax(0,1fr)]",
397
- children: [/* @__PURE__ */ _("div", {
398
+ children: [/* @__PURE__ */ g("div", {
398
399
  className: "flex gap-2 overflow-x-auto border-b border-border-subtle p-3 lg:flex-col lg:overflow-visible lg:border-b-0 lg:border-e",
399
400
  "aria-label": "Add a step",
400
401
  children: l.map((e) => {
401
402
  let t = e.icon;
402
- return /* @__PURE__ */ v("button", {
403
+ return /* @__PURE__ */ _("button", {
403
404
  type: "button",
404
- onClick: () => Xe(e.type),
405
+ onClick: () => $e(e.type),
405
406
  title: `Add ${e.label} after the selected step`,
406
407
  className: "flex min-w-[76px] flex-col items-center gap-1 rounded-lg border border-border-subtle bg-bg-surface px-2 py-2 text-[11px] font-medium text-text-primary transition-colors hover:border-border-strong hover:bg-bg-sunken",
407
- children: [/* @__PURE__ */ _("span", {
408
+ children: [/* @__PURE__ */ g("span", {
408
409
  className: i("flex h-7 w-7 items-center justify-center rounded-md ring-1 ring-inset", u[e.tone]),
409
- children: /* @__PURE__ */ _(t, { className: "h-3.5 w-3.5" })
410
- }), /* @__PURE__ */ _("span", {
410
+ children: /* @__PURE__ */ g(t, { className: "h-3.5 w-3.5" })
411
+ }), /* @__PURE__ */ g("span", {
411
412
  className: "text-center leading-tight",
412
413
  children: e.shortLabel
413
414
  })]
414
415
  }, e.type);
415
416
  })
416
- }), /* @__PURE__ */ _("div", {
417
+ }), /* @__PURE__ */ g("div", {
417
418
  dir: "ltr",
418
- onPointerDown: $e,
419
- onPointerMove: et,
420
- onPointerUp: tt,
421
- onPointerCancel: tt,
419
+ onPointerDown: tt,
420
+ onPointerMove: nt,
421
+ onPointerUp: rt,
422
+ onPointerCancel: rt,
422
423
  "data-testid": "workflow-canvas",
423
424
  className: "relative h-[520px] w-full cursor-grab overflow-hidden bg-bg-sunken active:cursor-grabbing sm:h-[600px]",
424
425
  style: {
425
426
  touchAction: "none",
426
427
  backgroundImage: "radial-gradient(var(--color-border-subtle) 1px, transparent 1px)",
427
- backgroundSize: `${20 * W}px ${20 * W}px`,
428
- backgroundPosition: `${G.x}px ${G.y}px`
428
+ backgroundSize: `${20 * H}px ${20 * H}px`,
429
+ backgroundPosition: `${U.x}px ${U.y}px`
429
430
  },
430
- children: /* @__PURE__ */ v("div", {
431
+ children: /* @__PURE__ */ _("div", {
431
432
  className: "absolute start-0 top-0 origin-top-left",
432
- style: { transform: `translate(${G.x}px, ${G.y}px) scale(${W})` },
433
+ style: { transform: `translate(${U.x}px, ${U.y}px) scale(${H})` },
433
434
  children: [
434
- /* @__PURE__ */ v("svg", {
435
- width: we,
436
- height: Te,
435
+ /* @__PURE__ */ _("svg", {
436
+ width: Ee,
437
+ height: De,
437
438
  className: "pointer-events-none absolute start-0 top-0 overflow-visible",
438
- children: [/* @__PURE__ */ _("defs", { children: [
439
+ children: [/* @__PURE__ */ g("defs", { children: [
439
440
  "accent",
440
441
  "yes",
441
442
  "no"
442
443
  ].map((e) => {
443
444
  let t = e === "yes" ? "yes" : e === "no" ? "no" : null;
444
- return /* @__PURE__ */ _("marker", {
445
+ return /* @__PURE__ */ g("marker", {
445
446
  id: `wf-arrow-${e}`,
446
447
  viewBox: "0 0 10 10",
447
448
  refX: "8",
@@ -449,30 +450,30 @@ var C = () => {
449
450
  markerWidth: "7",
450
451
  markerHeight: "7",
451
452
  orient: "auto-start-reverse",
452
- children: /* @__PURE__ */ _("path", {
453
+ children: /* @__PURE__ */ g("path", {
453
454
  d: "M0,0 L10,5 L0,10 z",
454
- style: { fill: b(t) }
455
+ style: { fill: S(t) }
455
456
  })
456
457
  }, e);
457
- }) }), j.map((e) => {
458
- let t = q.get(e.source), n = q.get(e.target);
458
+ }) }), N.map((e) => {
459
+ let t = G.get(e.source), n = G.get(e.target);
459
460
  if (!t || !n) return null;
460
- let r = ie(t, e.branch), i = d(n), a = (r.y + i.y) / 2, o = `M ${r.x} ${r.y} C ${r.x} ${a} ${i.x} ${a} ${i.x} ${i.y}`;
461
- return /* @__PURE__ */ _("path", {
461
+ let r = f(t, e.branch), i = re(n), a = (r.y + i.y) / 2, o = `M ${r.x} ${r.y} C ${r.x} ${a} ${i.x} ${a} ${i.x} ${i.y}`;
462
+ return /* @__PURE__ */ g("path", {
462
463
  d: o,
463
464
  fill: "none",
464
465
  strokeWidth: 2,
465
466
  strokeLinecap: "round",
466
- style: { stroke: b(e.branch) },
467
- markerEnd: `url(#${ke(e.branch)})`
467
+ style: { stroke: S(e.branch) },
468
+ markerEnd: `url(#${Oe(e.branch)})`
468
469
  }, e.id);
469
470
  })]
470
471
  }),
471
- j.filter((e) => e.branch).map((e) => {
472
- let t = q.get(e.source), n = q.get(e.target);
472
+ N.filter((e) => e.branch).map((e) => {
473
+ let t = G.get(e.source), n = G.get(e.target);
473
474
  if (!t || !n) return null;
474
- let r = ie(t, e.branch), a = d(n);
475
- return /* @__PURE__ */ _("span", {
475
+ let r = f(t, e.branch), a = re(n);
476
+ return /* @__PURE__ */ g("span", {
476
477
  style: {
477
478
  left: (r.x + a.x) / 2,
478
479
  top: (r.y + a.y) / 2
@@ -481,76 +482,76 @@ var C = () => {
481
482
  children: e.branch
482
483
  }, `label-${e.id}`);
483
484
  }),
484
- k.map((e) => /* @__PURE__ */ _(le, {
485
+ j.map((e) => /* @__PURE__ */ g(ue, {
485
486
  node: e,
486
- selected: N === e.id,
487
- invalid: ze === e.id,
488
- scale: W,
489
- subtitle: re(e),
490
- onSelect: P,
491
- onConfigure: P,
492
- onDelete: Ye,
493
- onPositionChange: Ge
487
+ selected: F === e.id,
488
+ invalid: Re === e.id,
489
+ scale: H,
490
+ subtitle: ie(e),
491
+ onSelect: I,
492
+ onConfigure: I,
493
+ onDelete: Qe,
494
+ onPositionChange: Je
494
495
  }, e.id))
495
496
  ]
496
497
  })
497
498
  })]
498
499
  })]
499
500
  }),
500
- /* @__PURE__ */ v("div", {
501
+ /* @__PURE__ */ _("div", {
501
502
  className: "grid grid-cols-1 gap-4 lg:grid-cols-2",
502
- children: [/* @__PURE__ */ _("div", {
503
- ref: We,
504
- children: J ? /* @__PURE__ */ _(de, {
505
- node: J,
506
- onLabelChange: (e) => Ke(J.id, e),
507
- onConfigChange: (e) => qe(J.id, e),
508
- onTriggerChange: Je,
509
- onClose: () => P(null)
510
- }) : /* @__PURE__ */ _(ue, {})
511
- }), /* @__PURE__ */ v("div", {
503
+ children: [/* @__PURE__ */ g("div", {
504
+ ref: qe,
505
+ children: K ? /* @__PURE__ */ g(fe, {
506
+ node: K,
507
+ onLabelChange: (e) => Ye(K.id, e),
508
+ onConfigChange: (e) => Xe(K.id, e),
509
+ onTriggerChange: Ze,
510
+ onClose: () => I(null)
511
+ }) : /* @__PURE__ */ g(de, {})
512
+ }), /* @__PURE__ */ _("div", {
512
513
  className: "rounded-card border border-border-seam bg-gloss-card p-4 shadow-pop",
513
514
  children: [
514
- /* @__PURE__ */ _("h4", {
515
+ /* @__PURE__ */ g("h4", {
515
516
  className: "mb-2 text-sm font-semibold text-text-primary",
516
517
  children: "Trigger"
517
518
  }),
518
- /* @__PURE__ */ _("div", {
519
+ /* @__PURE__ */ g("div", {
519
520
  className: "grid grid-cols-1 gap-1.5 sm:grid-cols-2",
520
- children: ee.map((e) => /* @__PURE__ */ v("button", {
521
+ children: ee.map((e) => /* @__PURE__ */ _("button", {
521
522
  type: "button",
522
- onClick: () => Je(e.type),
523
- "aria-pressed": st === e.type,
524
- className: i("rounded-md border px-3 py-2 text-start text-sm transition-colors", st === e.type ? "border-[color-mix(in_oklab,var(--color-action-primary-bg)_40%,transparent)] bg-[var(--color-accent-soft)] text-text-primary" : "border-border-subtle text-text-primary hover:bg-bg-sunken"),
525
- children: [/* @__PURE__ */ _("span", {
523
+ onClick: () => Ze(e.type),
524
+ "aria-pressed": $ === e.type,
525
+ className: i("rounded-md border px-3 py-2 text-start text-sm transition-colors", $ === e.type ? "border-[color-mix(in_oklab,var(--color-action-primary-bg)_40%,transparent)] bg-[var(--color-accent-soft)] text-text-primary" : "border-border-subtle text-text-primary hover:bg-bg-sunken"),
526
+ children: [/* @__PURE__ */ g("span", {
526
527
  className: "block font-medium",
527
528
  children: e.label
528
- }), /* @__PURE__ */ _("span", {
529
+ }), /* @__PURE__ */ g("span", {
529
530
  className: "block text-xs text-text-secondary",
530
531
  children: e.description
531
532
  })]
532
533
  }, e.type))
533
534
  }),
534
- /* @__PURE__ */ _("p", {
535
+ /* @__PURE__ */ g("p", {
535
536
  className: "mt-3 text-xs text-text-secondary",
536
537
  children: "Steps are added after the selected node. A Condition continues on its Yes path; give its No path steps of its own, or leave it empty to stop there."
537
538
  })
538
539
  ]
539
540
  })]
540
541
  }),
541
- D && z && /* @__PURE__ */ _(fe, {
542
- workflow: D,
543
- open: z,
544
- onClose: () => B(!1),
542
+ k && Ve && /* @__PURE__ */ g(pe, {
543
+ workflow: k,
544
+ open: Ve,
545
+ onClose: () => He(!1),
545
546
  onChanged: () => void 0
546
547
  }),
547
- /* @__PURE__ */ _(s, { toasts: Ve.map((e) => ({
548
+ /* @__PURE__ */ g(s, { toasts: Ue.map((e) => ({
548
549
  ...e,
549
- onDismiss: X
550
+ onDismiss: J
550
551
  })) })
551
552
  ]
552
553
  });
553
554
  };
554
- export { C as WorkflowBuilderPage, Ae as insertAction, S as removeNode };
555
+ export { E as WorkflowBuilderPage, T as insertAction, w as removeNode };
555
556
 
556
557
  //# sourceMappingURL=WorkflowBuilderPage.js.map