@burdenoff/microfe-subscriberbot 2026.1107.7 → 2026.1110.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 (186) hide show
  1. package/dist/node_modules/clsx/dist/clsx.js +8 -7
  2. package/dist/node_modules/clsx/dist/clsx.js.map +1 -1
  3. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +134 -151
  4. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -1
  5. package/dist/subscriberbot/SubscriberBotRoot.js +10 -7
  6. package/dist/subscriberbot/SubscriberBotRoot.js.map +1 -1
  7. package/dist/subscriberbot/SubscriberBotRoutes.js +1 -2
  8. package/dist/subscriberbot/SubscriberBotRoutes.js.map +1 -1
  9. package/dist/subscriberbot/admin/AdminDashboardPage.js +9 -10
  10. package/dist/subscriberbot/admin/AdminDashboardPage.js.map +1 -1
  11. package/dist/subscriberbot/admin/AdminRoot.js +2 -3
  12. package/dist/subscriberbot/admin/AdminRoot.js.map +1 -1
  13. package/dist/subscriberbot/admin/NegotiationDeskPanel.js +56 -57
  14. package/dist/subscriberbot/admin/NegotiationDeskPanel.js.map +1 -1
  15. package/dist/subscriberbot/admin/ProcurementDeskPanel.js +107 -108
  16. package/dist/subscriberbot/admin/ProcurementDeskPanel.js.map +1 -1
  17. package/dist/subscriberbot/admin/index.js +1 -1
  18. package/dist/subscriberbot/components/EmptyState.js +1 -2
  19. package/dist/subscriberbot/components/EmptyState.js.map +1 -1
  20. package/dist/subscriberbot/components/MetricsCard.js +1 -2
  21. package/dist/subscriberbot/components/MetricsCard.js.map +1 -1
  22. package/dist/subscriberbot/components/Modal.js +2 -3
  23. package/dist/subscriberbot/components/Modal.js.map +1 -1
  24. package/dist/subscriberbot/components/PageLayout.js +1 -2
  25. package/dist/subscriberbot/components/PageLayout.js.map +1 -1
  26. package/dist/subscriberbot/components/PostureOptions.js +7 -8
  27. package/dist/subscriberbot/components/PostureOptions.js.map +1 -1
  28. package/dist/subscriberbot/components/StateViews.js +1 -2
  29. package/dist/subscriberbot/components/StateViews.js.map +1 -1
  30. package/dist/subscriberbot/components/StatusBadge.js +2 -3
  31. package/dist/subscriberbot/components/StatusBadge.js.map +1 -1
  32. package/dist/subscriberbot/components/decisions/DecisionBanners.js +7 -8
  33. package/dist/subscriberbot/components/decisions/DecisionBanners.js.map +1 -1
  34. package/dist/subscriberbot/components/decisions/DecisionCard.js +65 -66
  35. package/dist/subscriberbot/components/decisions/DecisionCard.js.map +1 -1
  36. package/dist/subscriberbot/components/decisions/decisionModel.js +2 -3
  37. package/dist/subscriberbot/components/decisions/decisionModel.js.map +1 -1
  38. package/dist/subscriberbot/components/decisions/index.js +4 -3
  39. package/dist/subscriberbot/components/index.js +8 -7
  40. package/dist/subscriberbot/components/mobile/MobileDashboard.js +23 -24
  41. package/dist/subscriberbot/components/mobile/MobileDashboard.js.map +1 -1
  42. package/dist/subscriberbot/components/mobile/MobileRelationshipList.js +40 -49
  43. package/dist/subscriberbot/components/mobile/MobileRelationshipList.js.map +1 -1
  44. package/dist/subscriberbot/components/mobile/MobileScreen.js +1 -2
  45. package/dist/subscriberbot/components/mobile/MobileScreen.js.map +1 -1
  46. package/dist/subscriberbot/components/mobile/RelationshipGlyph.js +1 -2
  47. package/dist/subscriberbot/components/mobile/RelationshipGlyph.js.map +1 -1
  48. package/dist/subscriberbot/components/mobile/index.js +4 -3
  49. package/dist/subscriberbot/components/negotiations/NegotiationStatusPill.js +1 -2
  50. package/dist/subscriberbot/components/negotiations/NegotiationStatusPill.js.map +1 -1
  51. package/dist/subscriberbot/components/negotiations/NegotiationTimeline.js +4 -5
  52. package/dist/subscriberbot/components/negotiations/NegotiationTimeline.js.map +1 -1
  53. package/dist/subscriberbot/components/negotiations/OutcomeForm.js +4 -5
  54. package/dist/subscriberbot/components/negotiations/OutcomeForm.js.map +1 -1
  55. package/dist/subscriberbot/components/negotiations/index.js +5 -4
  56. package/dist/subscriberbot/components/negotiations/labels.js +1 -2
  57. package/dist/subscriberbot/components/negotiations/labels.js.map +1 -1
  58. package/dist/subscriberbot/components/procurement/ProcurementOutcomeForm.js +4 -5
  59. package/dist/subscriberbot/components/procurement/ProcurementOutcomeForm.js.map +1 -1
  60. package/dist/subscriberbot/components/procurement/ProcurementStatusPill.js +1 -2
  61. package/dist/subscriberbot/components/procurement/ProcurementStatusPill.js.map +1 -1
  62. package/dist/subscriberbot/components/procurement/ProcurementThread.js +4 -5
  63. package/dist/subscriberbot/components/procurement/ProcurementThread.js.map +1 -1
  64. package/dist/subscriberbot/components/procurement/index.js +5 -4
  65. package/dist/subscriberbot/components/procurement/labels.js +1 -2
  66. package/dist/subscriberbot/components/procurement/labels.js.map +1 -1
  67. package/dist/subscriberbot/components/savings/SavingsCards.js +90 -91
  68. package/dist/subscriberbot/components/savings/SavingsCards.js.map +1 -1
  69. package/dist/subscriberbot/components/savings/index.js +3 -2
  70. package/dist/subscriberbot/components/savings/savingsModel.js +2 -3
  71. package/dist/subscriberbot/components/savings/savingsModel.js.map +1 -1
  72. package/dist/subscriberbot/components/viz.js +2 -3
  73. package/dist/subscriberbot/components/viz.js.map +1 -1
  74. package/dist/subscriberbot/context/SubscriberBotContext.js +3 -3
  75. package/dist/subscriberbot/context/SubscriberBotContext.js.map +1 -1
  76. package/dist/subscriberbot/context/index.js +1 -1
  77. package/dist/subscriberbot/hooks/index.js +2 -2
  78. package/dist/subscriberbot/hooks/useAutonomousAgentMode.js +2 -3
  79. package/dist/subscriberbot/hooks/useAutonomousAgentMode.js.map +1 -1
  80. package/dist/subscriberbot/hooks/useBankingApi.js +2 -3
  81. package/dist/subscriberbot/hooks/useBankingApi.js.map +1 -1
  82. package/dist/subscriberbot/hooks/useCompactViewport.js +1 -2
  83. package/dist/subscriberbot/hooks/useCompactViewport.js.map +1 -1
  84. package/dist/subscriberbot/hooks/useFormError.js +1 -2
  85. package/dist/subscriberbot/hooks/useFormError.js.map +1 -1
  86. package/dist/subscriberbot/hooks/useFormatters.js +1 -2
  87. package/dist/subscriberbot/hooks/useFormatters.js.map +1 -1
  88. package/dist/subscriberbot/hooks/useNegotiationApi.js +2 -3
  89. package/dist/subscriberbot/hooks/useNegotiationApi.js.map +1 -1
  90. package/dist/subscriberbot/hooks/useProcurementApi.js +2 -3
  91. package/dist/subscriberbot/hooks/useProcurementApi.js.map +1 -1
  92. package/dist/subscriberbot/hooks/useRouteSelection.js +3 -3
  93. package/dist/subscriberbot/hooks/useRouteSelection.js.map +1 -1
  94. package/dist/subscriberbot/hooks/useSubscriberBotApi.js +1 -2
  95. package/dist/subscriberbot/hooks/useSubscriberBotApi.js.map +1 -1
  96. package/dist/subscriberbot/hooks/useTr.js +1 -2
  97. package/dist/subscriberbot/hooks/useTr.js.map +1 -1
  98. package/dist/subscriberbot/index.js +9 -8
  99. package/dist/subscriberbot/pages/AssetVaultPage.js +34 -35
  100. package/dist/subscriberbot/pages/AssetVaultPage.js.map +1 -1
  101. package/dist/subscriberbot/pages/DashboardPage.js +86 -87
  102. package/dist/subscriberbot/pages/DashboardPage.js.map +1 -1
  103. package/dist/subscriberbot/pages/InboxPage.js +194 -199
  104. package/dist/subscriberbot/pages/InboxPage.js.map +1 -1
  105. package/dist/subscriberbot/pages/InsightsPage.js +28 -29
  106. package/dist/subscriberbot/pages/InsightsPage.js.map +1 -1
  107. package/dist/subscriberbot/pages/InvoicesPage.js +179 -188
  108. package/dist/subscriberbot/pages/InvoicesPage.js.map +1 -1
  109. package/dist/subscriberbot/pages/RenewalsPage.js +293 -298
  110. package/dist/subscriberbot/pages/RenewalsPage.js.map +1 -1
  111. package/dist/subscriberbot/pages/SavingsPage.js +25 -26
  112. package/dist/subscriberbot/pages/SavingsPage.js.map +1 -1
  113. package/dist/subscriberbot/pages/WorkflowsPage.js +67 -68
  114. package/dist/subscriberbot/pages/WorkflowsPage.js.map +1 -1
  115. package/dist/subscriberbot/pages/agents/AgentDetailPage.js +126 -127
  116. package/dist/subscriberbot/pages/agents/AgentDetailPage.js.map +1 -1
  117. package/dist/subscriberbot/pages/agents/AgentNewPage.js +10 -11
  118. package/dist/subscriberbot/pages/agents/AgentNewPage.js.map +1 -1
  119. package/dist/subscriberbot/pages/agents/AgentsListPage.js +23 -24
  120. package/dist/subscriberbot/pages/agents/AgentsListPage.js.map +1 -1
  121. package/dist/subscriberbot/pages/banking/BankConnectionsPage.js +337 -359
  122. package/dist/subscriberbot/pages/banking/BankConnectionsPage.js.map +1 -1
  123. package/dist/subscriberbot/pages/banking/ConnectBankModal.js +22 -27
  124. package/dist/subscriberbot/pages/banking/ConnectBankModal.js.map +1 -1
  125. package/dist/subscriberbot/pages/decisions/DecisionDetailPage.js +25 -26
  126. package/dist/subscriberbot/pages/decisions/DecisionDetailPage.js.map +1 -1
  127. package/dist/subscriberbot/pages/decisions/DecisionsPage.js +34 -35
  128. package/dist/subscriberbot/pages/decisions/DecisionsPage.js.map +1 -1
  129. package/dist/subscriberbot/pages/enterprise/EnterpriseSpendPage.js +125 -130
  130. package/dist/subscriberbot/pages/enterprise/EnterpriseSpendPage.js.map +1 -1
  131. package/dist/subscriberbot/pages/negotiations/NegotiationDetailPage.js +94 -95
  132. package/dist/subscriberbot/pages/negotiations/NegotiationDetailPage.js.map +1 -1
  133. package/dist/subscriberbot/pages/negotiations/NegotiationNewPage.js +15 -16
  134. package/dist/subscriberbot/pages/negotiations/NegotiationNewPage.js.map +1 -1
  135. package/dist/subscriberbot/pages/negotiations/NegotiationsPage.js +20 -21
  136. package/dist/subscriberbot/pages/negotiations/NegotiationsPage.js.map +1 -1
  137. package/dist/subscriberbot/pages/procurement/ProcurementDetailPage.js +86 -87
  138. package/dist/subscriberbot/pages/procurement/ProcurementDetailPage.js.map +1 -1
  139. package/dist/subscriberbot/pages/procurement/ProcurementNewPage.js +164 -165
  140. package/dist/subscriberbot/pages/procurement/ProcurementNewPage.js.map +1 -1
  141. package/dist/subscriberbot/pages/procurement/ProcurementPage.js +20 -21
  142. package/dist/subscriberbot/pages/procurement/ProcurementPage.js.map +1 -1
  143. package/dist/subscriberbot/pages/providers/ProviderDetailPage.js +350 -351
  144. package/dist/subscriberbot/pages/providers/ProviderDetailPage.js.map +1 -1
  145. package/dist/subscriberbot/pages/providers/ProviderInsights.js +95 -96
  146. package/dist/subscriberbot/pages/providers/ProviderInsights.js.map +1 -1
  147. package/dist/subscriberbot/pages/providers/ProviderNewPage.js +11 -12
  148. package/dist/subscriberbot/pages/providers/ProviderNewPage.js.map +1 -1
  149. package/dist/subscriberbot/pages/providers/ProvidersListPage.js +62 -63
  150. package/dist/subscriberbot/pages/providers/ProvidersListPage.js.map +1 -1
  151. package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js +166 -172
  152. package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js.map +1 -1
  153. package/dist/subscriberbot/pages/relationships/RelationshipNewPage.js +12 -13
  154. package/dist/subscriberbot/pages/relationships/RelationshipNewPage.js.map +1 -1
  155. package/dist/subscriberbot/pages/relationships/RelationshipsListPage.js +21 -22
  156. package/dist/subscriberbot/pages/relationships/RelationshipsListPage.js.map +1 -1
  157. package/dist/subscriberbot/pages/workflows/WorkflowBuilderPage.js +242 -255
  158. package/dist/subscriberbot/pages/workflows/WorkflowBuilderPage.js.map +1 -1
  159. package/dist/subscriberbot/pages/workflows/workflowBuilderGraph.js +2 -3
  160. package/dist/subscriberbot/pages/workflows/workflowBuilderGraph.js.map +1 -1
  161. package/dist/subscriberbot/services/createSandboxAssistantTransport.js +1 -2
  162. package/dist/subscriberbot/services/createSandboxAssistantTransport.js.map +1 -1
  163. package/dist/subscriberbot/store/index.js +1 -1
  164. package/dist/subscriberbot/store/subscriberbotStore.js +1 -2
  165. package/dist/subscriberbot/store/subscriberbotStore.js.map +1 -1
  166. package/dist/subscriberbot/utils/bankRedirectLink.js +18 -19
  167. package/dist/subscriberbot/utils/bankRedirectLink.js.map +1 -1
  168. package/dist/subscriberbot/utils/chartScale.js +1 -2
  169. package/dist/subscriberbot/utils/chartScale.js.map +1 -1
  170. package/dist/subscriberbot/utils/cn.js +2 -3
  171. package/dist/subscriberbot/utils/cn.js.map +1 -1
  172. package/dist/subscriberbot/utils/formatters.js +4 -5
  173. package/dist/subscriberbot/utils/formatters.js.map +1 -1
  174. package/dist/subscriberbot/utils/navigation.js +1 -2
  175. package/dist/subscriberbot/utils/navigation.js.map +1 -1
  176. package/dist/subscriberbot/utils/pageContext.js +3 -4
  177. package/dist/subscriberbot/utils/pageContext.js.map +1 -1
  178. package/dist/subscriberbot/utils/plaidLink.js +21 -22
  179. package/dist/subscriberbot/utils/plaidLink.js.map +1 -1
  180. package/dist/subscriberbot/utils/portfolio.d.ts +4 -3
  181. package/dist/subscriberbot/utils/portfolio.d.ts.map +1 -1
  182. package/dist/subscriberbot/utils/portfolio.js +10 -11
  183. package/dist/subscriberbot/utils/portfolio.js.map +1 -1
  184. package/dist/subscriberbot/utils/renewals.js +1 -2
  185. package/dist/subscriberbot/utils/renewals.js.map +1 -1
  186. package/package.json +2 -2
@@ -1,51 +1,51 @@
1
- import { useSubscriberBot as e } from "../../context/SubscriberBotContext.js";
2
- import { useTr as t } from "../../hooks/useTr.js";
3
- import { PageLayout as n } from "../../components/PageLayout.js";
4
- import { StatusBadge as r } from "../../components/StatusBadge.js";
5
- import { EmptyState as i } from "../../components/EmptyState.js";
6
- import { ErrorView as a, LoadingView as o } from "../../components/StateViews.js";
7
1
  import "../../components/index.js";
8
- import { useActivateWorkflow as s, usePauseWorkflow as c, useSaveWorkflowGraph as l, useWorkflow as u } from "../../hooks/useSubscriberBotApi.js";
9
- import { ACTION_KINDS as d, NODE_KINDS as f, canAddKind as p, configSummary as ee, connectionError as te, defaultLabel as m, fromServerGraph as h, initialConfig as g, nextNodePosition as ne, removeNode as _, toSaveInput as re } from "./workflowBuilderGraph.js";
10
- import { useCallback as v, useMemo as y, useState as b } from "react";
11
- import { AlertTriangle as x, ArrowLeft as S, CheckCircle2 as C, Clock as w, GitBranch as T, GitFork as E, Pause as D, Play as ie, Save as ae, Sparkles as O, Trash2 as k, Zap as A } from "lucide-react";
12
- import { useParams as j } from "react-router";
13
- import { Fragment as M, jsx as N, jsxs as P } from "react/jsx-runtime";
14
- import { GlassCard as F } from "@burdenoff/fe-libs/ui";
15
- import { Background as I, Controls as L, Handle as R, MarkerType as oe, Position as z, ReactFlow as se, applyNodeChanges as ce } from "@xyflow/react";
2
+ import { useActivateWorkflow as e, usePauseWorkflow as t, useSaveWorkflowGraph as n, useWorkflow as r } from "../../hooks/useSubscriberBotApi.js";
3
+ import { PageLayout as i } from "../../components/PageLayout.js";
4
+ import { StatusBadge as a } from "../../components/StatusBadge.js";
5
+ import { EmptyState as o } from "../../components/EmptyState.js";
6
+ import { ErrorView as s, LoadingView as c } from "../../components/StateViews.js";
7
+ import { useTr as l } from "../../hooks/useTr.js";
8
+ import { useSubscriberBot as u } from "../../context/SubscriberBotContext.js";
9
+ import { ACTION_KINDS as d, NODE_KINDS as f, canAddKind as p, configSummary as ee, connectionError as te, defaultLabel as m, fromServerGraph as h, initialConfig as g, nextNodePosition as _, removeNode as v, toSaveInput as ne } from "./workflowBuilderGraph.js";
10
+ import { useCallback as y, useMemo as b, useState as x } from "react";
11
+ import { AlertTriangle as S, ArrowLeft as C, CheckCircle2 as w, Clock as T, GitBranch as E, GitFork as D, Pause as O, Play as k, Save as re, Sparkles as A, Trash2 as j, Zap as M } from "lucide-react";
12
+ import { useParams as N } from "react-router";
13
+ import { Fragment as P, jsx as F, jsxs as I } from "react/jsx-runtime";
14
+ import { GlassCard as L } from "@burdenoff/fe-libs/ui";
15
+ import { Background as ie, Controls as ae, Handle as R, MarkerType as oe, Position as z, ReactFlow as se, applyNodeChanges as ce } from "@xyflow/react";
16
16
  import "@xyflow/react/dist/style.css";
17
- //#region src/subscriberbot/pages/workflows/WorkflowBuilderPage.tsx
17
+ // src/subscriberbot/pages/workflows/WorkflowBuilderPage.tsx
18
18
  var B = "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] disabled:opacity-60", V = "mb-1 block text-xs font-medium text-text-secondary", H = "inline-flex items-center gap-1.5 rounded-lg border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken disabled:opacity-50", U = "inline-flex items-center gap-1.5 rounded-lg bg-action-primary-bg px-3 py-2 text-sm font-medium text-action-primary-text hover:opacity-90 disabled:opacity-50", W = {
19
19
  TRIGGER: {
20
- icon: A,
20
+ icon: M,
21
21
  bar: "bg-[var(--color-accent-indigo)]",
22
22
  labelKey: "workflows.builder.kind.trigger",
23
23
  fallback: "Trigger",
24
24
  hint: "The event that starts the workflow"
25
25
  },
26
26
  ACTION: {
27
- icon: O,
27
+ icon: A,
28
28
  bar: "bg-status-success-text",
29
29
  labelKey: "workflows.builder.kind.action",
30
30
  fallback: "Action",
31
31
  hint: "Notify, alert, create a task, update, classify or call an adapter"
32
32
  },
33
33
  CONDITION: {
34
- icon: E,
34
+ icon: D,
35
35
  bar: "bg-status-warning-text",
36
36
  labelKey: "workflows.builder.kind.condition",
37
37
  fallback: "Condition",
38
38
  hint: "Route through a true or false outlet"
39
39
  },
40
40
  DELAY: {
41
- icon: w,
41
+ icon: T,
42
42
  bar: "bg-text-secondary",
43
43
  labelKey: "workflows.builder.kind.delay",
44
44
  fallback: "Delay",
45
45
  hint: "Wait before the next step"
46
46
  },
47
47
  BRANCH: {
48
- icon: T,
48
+ icon: E,
49
49
  bar: "bg-[var(--color-accent-indigo)]",
50
50
  labelKey: "workflows.builder.kind.branch",
51
51
  fallback: "Branch",
@@ -59,186 +59,178 @@ var B = "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 t
59
59
  CLASSIFY: "Classify with AI",
60
60
  EVALUATE_POLICIES: "Evaluate agent policies",
61
61
  CALL_ADAPTER: "Call the provider adapter"
62
- }, le = [
63
- "overflow-hidden rounded-lg border border-border-subtle",
64
- "[--xy-controls-box-shadow:none]",
65
- "[--xy-controls-button-background-color:var(--color-bg-elevated)]",
66
- "[--xy-controls-button-background-color-hover:var(--color-bg-surface)]",
67
- "[--xy-controls-button-border-color:var(--color-border-subtle)]",
68
- "[--xy-controls-button-color:var(--color-text-secondary)]",
69
- "[--xy-controls-button-color-hover:var(--color-text-primary)]"
70
- ].join(" "), K = {
62
+ }, K = "overflow-hidden rounded-lg border border-border-subtle [--xy-controls-box-shadow:none] [--xy-controls-button-background-color:var(--color-bg-elevated)] [--xy-controls-button-background-color-hover:var(--color-bg-surface)] [--xy-controls-button-border-color:var(--color-border-subtle)] [--xy-controls-button-color:var(--color-text-secondary)] [--xy-controls-button-color-hover:var(--color-text-primary)]", q = {
71
63
  background: "var(--color-text-secondary)",
72
64
  width: 10,
73
65
  height: 10
74
66
  };
75
- function q({ data: e, selected: n }) {
76
- let r = t(), i = W[e.kind], a = i.icon;
77
- return /* @__PURE__ */ P("div", {
67
+ function J({ data: e, selected: t }) {
68
+ let n = l(), r = W[e.kind], i = r.icon;
69
+ return /* @__PURE__ */ I("div", {
78
70
  "data-testid": `workflow-node-${e.kind.toLowerCase()}`,
79
- className: `w-52 overflow-hidden rounded-xl border bg-bg-surface shadow-sm ${n ? "border-[var(--color-focus-ring)] ring-2 ring-[var(--color-focus-ring)]" : e.hasIssue ? "border-status-warning-text" : "border-border-subtle"}`,
71
+ className: `w-52 overflow-hidden rounded-xl border bg-bg-surface shadow-sm ${t ? "border-[var(--color-focus-ring)] ring-2 ring-[var(--color-focus-ring)]" : e.hasIssue ? "border-status-warning-text" : "border-border-subtle"}`,
80
72
  children: [
81
- e.kind !== "TRIGGER" && /* @__PURE__ */ N(R, {
73
+ e.kind !== "TRIGGER" && /* @__PURE__ */ F(R, {
82
74
  type: "target",
83
75
  position: z.Left,
84
- style: K
76
+ style: q
85
77
  }),
86
- /* @__PURE__ */ N("div", {
87
- className: `h-1 w-full ${i.bar}`,
78
+ /* @__PURE__ */ F("div", {
79
+ className: `h-1 w-full ${r.bar}`,
88
80
  "aria-hidden": !0
89
81
  }),
90
- /* @__PURE__ */ P("div", {
82
+ /* @__PURE__ */ I("div", {
91
83
  className: "p-3",
92
84
  children: [
93
- /* @__PURE__ */ P("div", {
85
+ /* @__PURE__ */ I("div", {
94
86
  className: "flex items-center gap-2",
95
87
  children: [
96
- /* @__PURE__ */ N("span", {
88
+ /* @__PURE__ */ F("span", {
97
89
  className: "flex size-8 shrink-0 items-center justify-center rounded-lg bg-[var(--color-accent-soft)] text-text-primary",
98
- children: /* @__PURE__ */ N(a, { className: "h-4 w-4" })
90
+ children: /* @__PURE__ */ F(i, { className: "h-4 w-4" })
99
91
  }),
100
- /* @__PURE__ */ N("p", {
92
+ /* @__PURE__ */ F("p", {
101
93
  className: "text-[10px] font-medium uppercase tracking-wide text-text-secondary",
102
- children: r(i.labelKey, i.fallback)
94
+ children: n(r.labelKey, r.fallback)
103
95
  }),
104
- e.hasIssue && /* @__PURE__ */ N(x, {
96
+ e.hasIssue && /* @__PURE__ */ F(S, {
105
97
  className: "ms-auto h-3.5 w-3.5 text-status-warning-text",
106
- "aria-label": r("workflows.builder.nodeHasIssue", "Needs attention")
98
+ "aria-label": n("workflows.builder.nodeHasIssue", "Needs attention")
107
99
  })
108
100
  ]
109
101
  }),
110
- /* @__PURE__ */ N("p", {
102
+ /* @__PURE__ */ F("p", {
111
103
  className: "mt-2 truncate text-sm font-semibold text-text-primary",
112
104
  title: e.label,
113
105
  children: e.label
114
106
  }),
115
- /* @__PURE__ */ N("p", {
107
+ /* @__PURE__ */ F("p", {
116
108
  className: "mt-0.5 truncate text-xs text-text-secondary",
117
109
  title: e.summary,
118
110
  children: e.summary
119
111
  })
120
112
  ]
121
113
  }),
122
- e.kind === "CONDITION" ? /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ N(R, {
114
+ e.kind === "CONDITION" ? /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ F(R, {
123
115
  id: "true",
124
116
  type: "source",
125
117
  position: z.Right,
126
118
  style: {
127
- ...K,
119
+ ...q,
128
120
  top: "35%",
129
121
  background: "var(--color-status-success-text)"
130
122
  }
131
- }), /* @__PURE__ */ N(R, {
123
+ }), /* @__PURE__ */ F(R, {
132
124
  id: "false",
133
125
  type: "source",
134
126
  position: z.Right,
135
127
  style: {
136
- ...K,
128
+ ...q,
137
129
  top: "70%",
138
130
  background: "var(--color-status-error-text)"
139
131
  }
140
- })] }) : /* @__PURE__ */ N(R, {
132
+ })] }) : /* @__PURE__ */ F(R, {
141
133
  type: "source",
142
134
  position: z.Right,
143
- style: K
135
+ style: q
144
136
  })
145
137
  ]
146
138
  });
147
139
  }
148
- var ue = { workflow: q };
149
- function de({ node: e, readOnly: n, onChange: r, onDelete: i }) {
150
- let a = t(), o = W[e.kind], s = (t) => r({ config: {
140
+ var le = { workflow: J };
141
+ function ue({ node: e, readOnly: t, onChange: n, onDelete: r }) {
142
+ let i = l(), a = W[e.kind], o = (t) => n({ config: {
151
143
  ...e.config,
152
144
  ...t
153
145
  } });
154
- return /* @__PURE__ */ P("div", {
146
+ return /* @__PURE__ */ I("div", {
155
147
  className: "space-y-4",
156
148
  "data-testid": "workflow-node-inspector",
157
149
  children: [
158
- /* @__PURE__ */ N("p", {
150
+ /* @__PURE__ */ F("p", {
159
151
  className: "text-xs font-medium uppercase tracking-wide text-text-secondary",
160
- children: a(o.labelKey, o.fallback)
152
+ children: i(a.labelKey, a.fallback)
161
153
  }),
162
- /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("label", {
154
+ /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("label", {
163
155
  htmlFor: "wfb-label",
164
156
  className: V,
165
- children: a("workflows.builder.inspector.label", "Label")
166
- }), /* @__PURE__ */ N("input", {
157
+ children: i("workflows.builder.inspector.label", "Label")
158
+ }), /* @__PURE__ */ F("input", {
167
159
  id: "wfb-label",
168
160
  className: B,
169
161
  value: e.label,
170
162
  maxLength: 120,
171
- disabled: n,
172
- onChange: (e) => r({ label: e.target.value })
163
+ disabled: t,
164
+ onChange: (e) => n({ label: e.target.value })
173
165
  })] }),
174
- e.kind === "TRIGGER" && /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("label", {
166
+ e.kind === "TRIGGER" && /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("label", {
175
167
  htmlFor: "wfb-event",
176
168
  className: V,
177
- children: a("workflows.builder.inspector.event", "Trigger event")
178
- }), /* @__PURE__ */ N("input", {
169
+ children: i("workflows.builder.inspector.event", "Trigger event")
170
+ }), /* @__PURE__ */ F("input", {
179
171
  id: "wfb-event",
180
172
  className: B,
181
173
  value: typeof e.config.event == "string" ? e.config.event : "",
182
174
  maxLength: 120,
183
- placeholder: a("workflows.form.triggerPlaceholder", "e.g. InvoiceReceived, RenewalDetected"),
184
- disabled: n,
185
- onChange: (e) => s({ event: e.target.value })
175
+ placeholder: i("workflows.form.triggerPlaceholder", "e.g. InvoiceReceived, RenewalDetected"),
176
+ disabled: t,
177
+ onChange: (e) => o({ event: e.target.value })
186
178
  })] }),
187
- e.kind === "ACTION" && /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("label", {
179
+ e.kind === "ACTION" && /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("label", {
188
180
  htmlFor: "wfb-action",
189
181
  className: V,
190
- children: a("workflows.builder.inspector.action", "Action")
191
- }), /* @__PURE__ */ P("select", {
182
+ children: i("workflows.builder.inspector.action", "Action")
183
+ }), /* @__PURE__ */ I("select", {
192
184
  id: "wfb-action",
193
185
  className: B,
194
186
  value: typeof e.config.action == "string" ? e.config.action : "",
195
- disabled: n,
196
- onChange: (e) => s({ action: e.target.value || void 0 }),
197
- children: [/* @__PURE__ */ N("option", {
187
+ disabled: t,
188
+ onChange: (e) => o({ action: e.target.value || void 0 }),
189
+ children: [/* @__PURE__ */ F("option", {
198
190
  value: "",
199
- children: a("workflows.builder.inspector.chooseAction", "Choose an action…")
200
- }), d.map((e) => /* @__PURE__ */ N("option", {
191
+ children: i("workflows.builder.inspector.chooseAction", "Choose an action…")
192
+ }), d.map((e) => /* @__PURE__ */ F("option", {
201
193
  value: e,
202
- children: a(`workflows.builder.action.${e.toLowerCase()}`, G[e])
194
+ children: i(`workflows.builder.action.${e.toLowerCase()}`, G[e])
203
195
  }, e))]
204
- })] }), /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("label", {
196
+ })] }), /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("label", {
205
197
  htmlFor: "wfb-message",
206
198
  className: V,
207
- children: a("workflows.builder.inspector.message", "Message (optional)")
208
- }), /* @__PURE__ */ N("textarea", {
199
+ children: i("workflows.builder.inspector.message", "Message (optional)")
200
+ }), /* @__PURE__ */ F("textarea", {
209
201
  id: "wfb-message",
210
202
  rows: 3,
211
203
  className: B,
212
204
  maxLength: 1e3,
213
205
  value: typeof e.config.message == "string" ? e.config.message : "",
214
- disabled: n,
215
- onChange: (e) => s({ message: e.target.value })
206
+ disabled: t,
207
+ onChange: (e) => o({ message: e.target.value })
216
208
  })] })] }),
217
- e.kind === "CONDITION" && /* @__PURE__ */ P("div", { children: [
218
- /* @__PURE__ */ N("label", {
209
+ e.kind === "CONDITION" && /* @__PURE__ */ I("div", { children: [
210
+ /* @__PURE__ */ F("label", {
219
211
  htmlFor: "wfb-expression",
220
212
  className: V,
221
- children: a("workflows.builder.inspector.expression", "Condition")
213
+ children: i("workflows.builder.inspector.expression", "Condition")
222
214
  }),
223
- /* @__PURE__ */ N("input", {
215
+ /* @__PURE__ */ F("input", {
224
216
  id: "wfb-expression",
225
217
  className: B,
226
218
  maxLength: 500,
227
- placeholder: a("workflows.builder.inspector.expressionPlaceholder", "e.g. monthlySpend > 100"),
219
+ placeholder: i("workflows.builder.inspector.expressionPlaceholder", "e.g. monthlySpend > 100"),
228
220
  value: typeof e.config.expression == "string" ? e.config.expression : "",
229
- disabled: n,
230
- onChange: (e) => s({ expression: e.target.value })
221
+ disabled: t,
222
+ onChange: (e) => o({ expression: e.target.value })
231
223
  }),
232
- /* @__PURE__ */ N("p", {
224
+ /* @__PURE__ */ F("p", {
233
225
  className: "mt-1 text-xs text-text-secondary",
234
- children: a("workflows.builder.inspector.expressionHint", "Connect the green outlet for when it holds and the red outlet for when it does not.")
226
+ children: i("workflows.builder.inspector.expressionHint", "Connect the green outlet for when it holds and the red outlet for when it does not.")
235
227
  })
236
228
  ] }),
237
- e.kind === "DELAY" && /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("label", {
229
+ e.kind === "DELAY" && /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("label", {
238
230
  htmlFor: "wfb-delay",
239
231
  className: V,
240
- children: a("workflows.builder.inspector.delay", "Wait (minutes)")
241
- }), /* @__PURE__ */ N("input", {
232
+ children: i("workflows.builder.inspector.delay", "Wait (minutes)")
233
+ }), /* @__PURE__ */ F("input", {
242
234
  id: "wfb-delay",
243
235
  type: "number",
244
236
  min: 1,
@@ -246,59 +238,59 @@ function de({ node: e, readOnly: n, onChange: r, onDelete: i }) {
246
238
  step: 1,
247
239
  className: B,
248
240
  value: typeof e.config.durationMinutes == "number" ? e.config.durationMinutes : "",
249
- disabled: n,
241
+ disabled: t,
250
242
  onChange: (e) => {
251
243
  let t = Number.parseInt(e.target.value, 10);
252
- s({ durationMinutes: Number.isFinite(t) ? t : void 0 });
244
+ o({ durationMinutes: Number.isFinite(t) ? t : void 0 });
253
245
  }
254
246
  })] }),
255
- e.kind === "BRANCH" && /* @__PURE__ */ N("p", {
247
+ e.kind === "BRANCH" && /* @__PURE__ */ F("p", {
256
248
  className: "text-xs text-text-secondary",
257
- children: a("workflows.builder.inspector.branchHint", "Connect two or more steps; they run in parallel.")
249
+ children: i("workflows.builder.inspector.branchHint", "Connect two or more steps; they run in parallel.")
258
250
  }),
259
- !n && /* @__PURE__ */ P("button", {
251
+ !t && /* @__PURE__ */ I("button", {
260
252
  type: "button",
261
- onClick: i,
253
+ onClick: r,
262
254
  className: "inline-flex items-center gap-1.5 rounded-lg border border-status-error-text/40 px-3 py-1.5 text-xs font-medium text-status-error-text hover:bg-status-error-bg-subtle",
263
255
  children: [
264
- /* @__PURE__ */ N(k, { className: "h-3.5 w-3.5" }),
256
+ /* @__PURE__ */ F(j, { className: "h-3.5 w-3.5" }),
265
257
  " ",
266
- a("workflows.builder.inspector.deleteNode", "Delete node")
258
+ i("workflows.builder.inspector.deleteNode", "Delete node")
267
259
  ]
268
260
  })
269
261
  ]
270
262
  });
271
263
  }
272
- function J({ workflow: e }) {
273
- let n = t(), a = l(), o = s(), u = c(), [d, S] = b(() => h(e.graph)), [w, T] = b(e.graph.issues), [E, O] = b(!1), [j, R] = b(null), [z, B] = b(null), [V, G] = b(null), [K, q] = b(1), J = e.status === "ACTIVE", Y = J || a.isPending, [fe, pe] = b(e.graph);
274
- fe !== e.graph && (pe(e.graph), E || (S(h(e.graph)), T(e.graph.issues)));
275
- let X = y(() => new Set(w.map((e) => e.nodeId).filter((e) => !!e)), [w]), me = y(() => d.nodes.map((e) => ({
264
+ function Y({ workflow: r }) {
265
+ let i = l(), s = n(), c = e(), u = t(), [d, C] = x(() => h(r.graph)), [T, E] = x(r.graph.issues), [D, A] = x(!1), [N, R] = x(null), [z, B] = x(null), [V, G] = x(null), [q, J] = x(1), Y = r.status === "ACTIVE", X = Y || s.isPending, [de, fe] = x(r.graph);
266
+ de !== r.graph && (fe(r.graph), D || (C(h(r.graph)), E(r.graph.issues)));
267
+ let Z = b(() => new Set(T.map((e) => e.nodeId).filter((e) => !!e)), [T]), pe = b(() => d.nodes.map((e) => ({
276
268
  id: e.id,
277
269
  type: "workflow",
278
270
  position: {
279
271
  x: e.x,
280
272
  y: e.y
281
273
  },
282
- selected: e.id === j,
274
+ selected: e.id === N,
283
275
  data: {
284
276
  kind: e.kind,
285
- label: e.label || n(`workflowBuilder.nodeLabel.${e.kind.toLowerCase()}`, m(e.kind)),
286
- summary: ee(e, n),
287
- hasIssue: !E && X.has(e.id)
277
+ label: e.label || i(`workflowBuilder.nodeLabel.${e.kind.toLowerCase()}`, m(e.kind)),
278
+ summary: ee(e, i),
279
+ hasIssue: !D && Z.has(e.id)
288
280
  }
289
281
  })), [
290
282
  d.nodes,
291
- j,
292
- E,
293
- X,
294
- n
295
- ]), Z = y(() => d.edges.map((e) => ({
283
+ N,
284
+ D,
285
+ Z,
286
+ i
287
+ ]), me = b(() => d.edges.map((e) => ({
296
288
  id: e.id,
297
289
  source: e.source,
298
290
  target: e.target,
299
291
  sourceHandle: e.handle,
300
292
  selected: e.id === z,
301
- label: e.handle === "true" ? n("workflows.builder.yes", "Yes") : e.handle === "false" ? n("workflows.builder.no", "No") : void 0,
293
+ label: e.handle === "true" ? i("workflows.builder.yes", "Yes") : e.handle === "false" ? i("workflows.builder.no", "No") : void 0,
302
294
  markerEnd: {
303
295
  type: oe.ArrowClosed,
304
296
  color: "var(--color-text-secondary)"
@@ -310,12 +302,12 @@ function J({ workflow: e }) {
310
302
  })), [
311
303
  d.edges,
312
304
  z,
313
- n
314
- ]), Q = v((e) => {
315
- S((t) => e(t)), O(!0), G(null);
316
- }, []), he = v((e) => {
305
+ i
306
+ ]), Q = y((e) => {
307
+ C((t) => e(t)), A(!0), G(null);
308
+ }, []), he = y((e) => {
317
309
  let t = e.filter((e) => e.type === "position" && e.position), n = e.filter((e) => e.type === "remove");
318
- Y || t.length === 0 && n.length === 0 || Q((e) => {
310
+ X || t.length === 0 && n.length === 0 || Q((e) => {
319
311
  let r = ce(t, e.nodes.map((e) => ({
320
312
  id: e.id,
321
313
  position: {
@@ -334,26 +326,22 @@ function J({ workflow: e }) {
334
326
  }),
335
327
  edges: e.edges
336
328
  };
337
- for (let e of n) e.type === "remove" && (i = _(i, e.id));
329
+ for (let e of n) e.type === "remove" && (i = v(i, e.id));
338
330
  return i;
339
331
  });
340
- }, [Q, Y]), ge = v((e) => {
332
+ }, [Q, X]), ge = y((e) => {
341
333
  let t = new Set(e.filter((e) => e.type === "remove").map((e) => e.id));
342
- Y || t.size === 0 || Q((e) => ({
334
+ X || t.size === 0 || Q((e) => ({
343
335
  nodes: e.nodes,
344
336
  edges: e.edges.filter((e) => !t.has(e.id))
345
337
  }));
346
- }, [Q, Y]), _e = v((e) => {
347
- if (Y) return;
348
- let t = e.sourceHandle ?? null, r = te(d, e.source, e.target, t, n);
349
- if (r) {
350
- G({
351
- tone: "error",
352
- text: r
353
- });
354
- return;
355
- }
356
- Q((n) => ({
338
+ }, [Q, X]), _e = y((e) => {
339
+ if (X) return;
340
+ let t = e.sourceHandle ?? null, n = te(d, e.source, e.target, t, i);
341
+ n ? G({
342
+ tone: "error",
343
+ text: n
344
+ }) : Q((n) => ({
357
345
  nodes: n.nodes,
358
346
  edges: [...n.edges, {
359
347
  id: `edge-${e.source}-${t ?? "out"}-${e.target}`,
@@ -366,166 +354,166 @@ function J({ workflow: e }) {
366
354
  }, [
367
355
  Q,
368
356
  d,
369
- Y,
370
- n
357
+ X,
358
+ i
371
359
  ]), ve = (e) => {
372
- let t = `new-${K}`;
373
- q((e) => e + 1);
374
- let r = ne(d.nodes);
375
- Q((i) => ({
376
- nodes: [...i.nodes, {
360
+ let t = `new-${q}`;
361
+ J((e) => e + 1);
362
+ let n = _(d.nodes);
363
+ Q((r) => ({
364
+ nodes: [...r.nodes, {
377
365
  id: t,
378
366
  kind: e,
379
- label: n(`workflowBuilder.nodeLabel.${e.toLowerCase()}`, m(e)),
367
+ label: i(`workflowBuilder.nodeLabel.${e.toLowerCase()}`, m(e)),
380
368
  config: g(e),
381
- x: r.x,
382
- y: r.y
369
+ x: n.x,
370
+ y: n.y
383
371
  }],
384
- edges: i.edges
372
+ edges: r.edges
385
373
  })), R(t), B(null);
386
- }, $ = d.nodes.find((e) => e.id === j) ?? null, ye = () => {
387
- a.mutate({
388
- workflowId: e.id,
389
- input: re(d)
374
+ }, $ = d.nodes.find((e) => e.id === N) ?? null, ye = () => {
375
+ s.mutate({
376
+ workflowId: r.id,
377
+ input: ne(d)
390
378
  }, {
391
379
  onSuccess: (e) => {
392
- S(h(e)), T(e.issues), O(!1), R(null), B(null), G({
380
+ C(h(e)), E(e.issues), A(!1), R(null), B(null), G({
393
381
  tone: "success",
394
- text: e.valid ? n("workflows.builder.savedValid", "Saved. This workflow is ready to activate.") : n("workflows.builder.savedWithIssues", "Saved as a draft. Fix the issues below before activating.")
382
+ text: e.valid ? i("workflows.builder.savedValid", "Saved. This workflow is ready to activate.") : i("workflows.builder.savedWithIssues", "Saved as a draft. Fix the issues below before activating.")
395
383
  });
396
384
  },
397
385
  onError: (e) => G({
398
386
  tone: "error",
399
- text: e instanceof Error ? e.message : n("common.error", "An error occurred")
387
+ text: e instanceof Error ? e.message : i("common.error", "An error occurred")
400
388
  })
401
389
  });
402
- }, be = () => o.mutate(e.id, {
390
+ }, be = () => c.mutate(r.id, {
403
391
  onSuccess: () => G({
404
392
  tone: "success",
405
- text: n("workflows.builder.activated", "Workflow activated.")
393
+ text: i("workflows.builder.activated", "Workflow activated.")
406
394
  }),
407
395
  onError: (e) => G({
408
396
  tone: "error",
409
- text: e instanceof Error ? e.message : n("common.error", "An error occurred")
397
+ text: e instanceof Error ? e.message : i("common.error", "An error occurred")
410
398
  })
411
- }), xe = () => u.mutate(e.id, {
399
+ }), xe = () => u.mutate(r.id, {
412
400
  onSuccess: () => G({
413
401
  tone: "success",
414
- text: n("workflows.builder.paused", "Workflow paused. You can edit it now.")
402
+ text: i("workflows.builder.paused", "Workflow paused. You can edit it now.")
415
403
  }),
416
404
  onError: (e) => G({
417
405
  tone: "error",
418
- text: e instanceof Error ? e.message : n("common.error", "An error occurred")
406
+ text: e instanceof Error ? e.message : i("common.error", "An error occurred")
419
407
  })
420
- }), Se = !J && !E && w.length === 0 && d.nodes.length > 0;
421
- return /* @__PURE__ */ P(M, { children: [
422
- /* @__PURE__ */ P("div", {
408
+ }), Se = !Y && !D && T.length === 0 && d.nodes.length > 0;
409
+ return /* @__PURE__ */ I(P, { children: [
410
+ /* @__PURE__ */ I("div", {
423
411
  className: "flex flex-wrap items-center justify-between gap-3",
424
- children: [/* @__PURE__ */ P("div", {
412
+ children: [/* @__PURE__ */ I("div", {
425
413
  className: "flex flex-wrap items-center gap-2",
426
414
  children: [
427
- /* @__PURE__ */ N(r, { status: e.status }),
428
- E && /* @__PURE__ */ N("span", {
415
+ /* @__PURE__ */ F(a, { status: r.status }),
416
+ D && /* @__PURE__ */ F("span", {
429
417
  className: "rounded-full bg-status-warning-bg-subtle px-2 py-0.5 text-xs font-medium text-status-warning-text",
430
- children: n("workflows.builder.unsaved", "Unsaved changes")
418
+ children: i("workflows.builder.unsaved", "Unsaved changes")
431
419
  }),
432
- !E && w.length === 0 && d.nodes.length > 0 && /* @__PURE__ */ P("span", {
420
+ !D && T.length === 0 && d.nodes.length > 0 && /* @__PURE__ */ I("span", {
433
421
  className: "inline-flex items-center gap-1 text-xs text-status-success-text",
434
422
  children: [
435
- /* @__PURE__ */ N(C, { className: "h-3.5 w-3.5" }),
423
+ /* @__PURE__ */ F(w, { className: "h-3.5 w-3.5" }),
436
424
  " ",
437
- n("workflows.builder.valid", "Ready to run")
425
+ i("workflows.builder.valid", "Ready to run")
438
426
  ]
439
427
  })
440
428
  ]
441
- }), /* @__PURE__ */ N("div", {
429
+ }), /* @__PURE__ */ F("div", {
442
430
  className: "flex flex-wrap items-center gap-2",
443
- children: J ? /* @__PURE__ */ P("button", {
431
+ children: Y ? /* @__PURE__ */ I("button", {
444
432
  type: "button",
445
433
  className: H,
446
434
  onClick: xe,
447
435
  disabled: u.isPending,
448
436
  children: [
449
- /* @__PURE__ */ N(D, { className: "h-4 w-4" }),
437
+ /* @__PURE__ */ F(O, { className: "h-4 w-4" }),
450
438
  " ",
451
- n("workflows.builder.pauseToEdit", "Pause to edit")
439
+ i("workflows.builder.pauseToEdit", "Pause to edit")
452
440
  ]
453
- }) : /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ P("button", {
441
+ }) : /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ I("button", {
454
442
  type: "button",
455
443
  className: H,
456
444
  onClick: ye,
457
- disabled: !E || a.isPending,
445
+ disabled: !D || s.isPending,
458
446
  children: [
459
- /* @__PURE__ */ N(ae, { className: "h-4 w-4" }),
447
+ /* @__PURE__ */ F(re, { className: "h-4 w-4" }),
460
448
  " ",
461
- a.isPending ? n("workflows.builder.saving", "Saving…") : n("workflows.builder.save", "Save")
449
+ s.isPending ? i("workflows.builder.saving", "Saving…") : i("workflows.builder.save", "Save")
462
450
  ]
463
- }), /* @__PURE__ */ P("button", {
451
+ }), /* @__PURE__ */ I("button", {
464
452
  type: "button",
465
453
  className: U,
466
454
  onClick: be,
467
- disabled: !Se || o.isPending,
468
- title: E ? n("workflows.builder.saveFirst", "Save your changes first") : w.length > 0 ? n("workflows.builder.fixIssuesFirst", "Fix the issues first") : void 0,
455
+ disabled: !Se || c.isPending,
456
+ title: D ? i("workflows.builder.saveFirst", "Save your changes first") : T.length > 0 ? i("workflows.builder.fixIssuesFirst", "Fix the issues first") : void 0,
469
457
  children: [
470
- /* @__PURE__ */ N(ie, { className: "h-4 w-4" }),
458
+ /* @__PURE__ */ F(k, { className: "h-4 w-4" }),
471
459
  " ",
472
- o.isPending ? n("common.activating", "Activating…") : n("workflows.flow.activate", "Activate workflow")
460
+ c.isPending ? i("common.activating", "Activating…") : i("workflows.flow.activate", "Activate workflow")
473
461
  ]
474
462
  })] })
475
463
  })]
476
464
  }),
477
- V && /* @__PURE__ */ N("div", {
465
+ V && /* @__PURE__ */ F("div", {
478
466
  role: V.tone === "error" ? "alert" : "status",
479
467
  className: `mt-3 rounded-lg border px-4 py-2 text-sm ${V.tone === "error" ? "border-status-error-text/30 bg-status-error-bg-subtle text-status-error-text" : "border-status-success-text/30 bg-status-success-bg-subtle text-status-success-text"}`,
480
468
  children: V.text
481
469
  }),
482
- J && /* @__PURE__ */ N("p", {
470
+ Y && /* @__PURE__ */ F("p", {
483
471
  className: "mt-3 text-sm text-text-secondary",
484
- children: n("workflows.builder.readOnlyActive", "This workflow is active, so it is shown read-only. Pause it to change its steps.")
472
+ children: i("workflows.builder.readOnlyActive", "This workflow is active, so it is shown read-only. Pause it to change its steps.")
485
473
  }),
486
- /* @__PURE__ */ P("div", {
474
+ /* @__PURE__ */ I("div", {
487
475
  className: "mt-4 grid grid-cols-1 gap-4 lg:grid-cols-[13rem_minmax(0,1fr)_18rem]",
488
476
  children: [
489
- /* @__PURE__ */ P(F, {
477
+ /* @__PURE__ */ I(L, {
490
478
  treatment: "metric",
491
479
  className: "p-3",
492
- children: [/* @__PURE__ */ N("p", {
480
+ children: [/* @__PURE__ */ F("p", {
493
481
  className: "mb-2 text-xs font-medium uppercase tracking-wide text-text-secondary",
494
- children: n("workflows.builder.palette", "Add a step")
495
- }), /* @__PURE__ */ N("div", {
482
+ children: i("workflows.builder.palette", "Add a step")
483
+ }), /* @__PURE__ */ F("div", {
496
484
  className: "grid grid-cols-2 gap-2 lg:grid-cols-1",
497
485
  role: "group",
498
- "aria-label": n("workflows.builder.palette", "Add a step"),
486
+ "aria-label": i("workflows.builder.palette", "Add a step"),
499
487
  children: f.map((e) => {
500
- let t = W[e], r = t.icon;
501
- return /* @__PURE__ */ P("button", {
488
+ let t = W[e], n = t.icon, r = X || !p(e, d.nodes);
489
+ return /* @__PURE__ */ I("button", {
502
490
  type: "button",
503
- disabled: Y || !p(e, d.nodes),
491
+ disabled: r,
504
492
  onClick: () => ve(e),
505
- title: n(`${t.labelKey}Hint`, t.hint),
493
+ title: i(`${t.labelKey}Hint`, t.hint),
506
494
  className: "flex items-center gap-2 rounded-lg border border-border-subtle bg-bg-surface px-2.5 py-2 text-start text-sm text-text-primary hover:bg-bg-sunken disabled:cursor-not-allowed disabled:opacity-50",
507
- children: [/* @__PURE__ */ N(r, { className: "h-4 w-4 shrink-0 text-text-secondary" }), /* @__PURE__ */ N("span", {
495
+ children: [/* @__PURE__ */ F(n, { className: "h-4 w-4 shrink-0 text-text-secondary" }), /* @__PURE__ */ F("span", {
508
496
  className: "truncate",
509
- children: n(t.labelKey, t.fallback)
497
+ children: i(t.labelKey, t.fallback)
510
498
  })]
511
499
  }, e);
512
500
  })
513
501
  })]
514
502
  }),
515
- /* @__PURE__ */ N("div", {
503
+ /* @__PURE__ */ F("div", {
516
504
  className: "h-[60vh] min-h-[420px] overflow-hidden rounded-xl border border-border-subtle bg-bg-sunken",
517
505
  "data-testid": "workflow-canvas",
518
- children: d.nodes.length === 0 ? /* @__PURE__ */ N("div", {
506
+ children: d.nodes.length === 0 ? /* @__PURE__ */ F("div", {
519
507
  className: "flex h-full items-center justify-center p-6",
520
- children: /* @__PURE__ */ N(i, {
521
- icon: /* @__PURE__ */ N(A, { className: "h-10 w-10" }),
522
- title: n("workflows.builder.emptyTitle", "Start with a trigger"),
523
- description: n("workflows.builder.emptyDescription", "Add a trigger from the palette, then connect the steps that should follow it.")
508
+ children: /* @__PURE__ */ F(o, {
509
+ icon: /* @__PURE__ */ F(M, { className: "h-10 w-10" }),
510
+ title: i("workflows.builder.emptyTitle", "Start with a trigger"),
511
+ description: i("workflows.builder.emptyDescription", "Add a trigger from the palette, then connect the steps that should follow it.")
524
512
  })
525
- }) : /* @__PURE__ */ P(se, {
526
- nodes: me,
527
- edges: Z,
528
- nodeTypes: ue,
513
+ }) : /* @__PURE__ */ I(se, {
514
+ nodes: pe,
515
+ edges: me,
516
+ nodeTypes: le,
529
517
  onNodesChange: he,
530
518
  onEdgesChange: ge,
531
519
  onConnect: _e,
@@ -538,32 +526,32 @@ function J({ workflow: e }) {
538
526
  onPaneClick: () => {
539
527
  R(null), B(null);
540
528
  },
541
- nodesDraggable: !Y,
542
- nodesConnectable: !Y,
543
- deleteKeyCode: Y ? null : ["Backspace", "Delete"],
529
+ nodesDraggable: !X,
530
+ nodesConnectable: !X,
531
+ deleteKeyCode: X ? null : ["Backspace", "Delete"],
544
532
  fitView: !0,
545
533
  fitViewOptions: {
546
534
  padding: .2,
547
535
  maxZoom: 1.1
548
536
  },
549
537
  proOptions: { hideAttribution: !0 },
550
- children: [/* @__PURE__ */ N(I, {
538
+ children: [/* @__PURE__ */ F(ie, {
551
539
  color: "var(--color-border-subtle)",
552
540
  gap: 20
553
- }), /* @__PURE__ */ N(L, {
541
+ }), /* @__PURE__ */ F(ae, {
554
542
  showInteractive: !1,
555
- className: le
543
+ className: K
556
544
  })]
557
545
  })
558
546
  }),
559
- /* @__PURE__ */ P("div", {
547
+ /* @__PURE__ */ I("div", {
560
548
  className: "space-y-4",
561
- children: [/* @__PURE__ */ N(F, {
549
+ children: [/* @__PURE__ */ F(L, {
562
550
  treatment: "metric",
563
551
  className: "p-4",
564
- children: $ ? /* @__PURE__ */ N(de, {
552
+ children: $ ? /* @__PURE__ */ F(ue, {
565
553
  node: $,
566
- readOnly: Y,
554
+ readOnly: X,
567
555
  onChange: (e) => Q((t) => ({
568
556
  nodes: t.nodes.map((t) => t.id === $.id ? {
569
557
  ...t,
@@ -572,14 +560,14 @@ function J({ workflow: e }) {
572
560
  edges: t.edges
573
561
  })),
574
562
  onDelete: () => {
575
- Q((e) => _(e, $.id)), R(null);
563
+ Q((e) => v(e, $.id)), R(null);
576
564
  }
577
- }) : z && !Y ? /* @__PURE__ */ P("div", {
565
+ }) : z && !X ? /* @__PURE__ */ I("div", {
578
566
  className: "space-y-3",
579
- children: [/* @__PURE__ */ N("p", {
567
+ children: [/* @__PURE__ */ F("p", {
580
568
  className: "text-sm text-text-primary",
581
- children: n("workflows.builder.edgeSelected", "Connection selected")
582
- }), /* @__PURE__ */ P("button", {
569
+ children: i("workflows.builder.edgeSelected", "Connection selected")
570
+ }), /* @__PURE__ */ I("button", {
583
571
  type: "button",
584
572
  onClick: () => {
585
573
  Q((e) => ({
@@ -589,40 +577,40 @@ function J({ workflow: e }) {
589
577
  },
590
578
  className: "inline-flex items-center gap-1.5 rounded-lg border border-status-error-text/40 px-3 py-1.5 text-xs font-medium text-status-error-text hover:bg-status-error-bg-subtle",
591
579
  children: [
592
- /* @__PURE__ */ N(k, { className: "h-3.5 w-3.5" }),
580
+ /* @__PURE__ */ F(j, { className: "h-3.5 w-3.5" }),
593
581
  " ",
594
- n("workflows.builder.deleteEdge", "Delete connection")
582
+ i("workflows.builder.deleteEdge", "Delete connection")
595
583
  ]
596
584
  })]
597
- }) : /* @__PURE__ */ N("p", {
585
+ }) : /* @__PURE__ */ F("p", {
598
586
  className: "text-sm text-text-secondary",
599
- children: n("workflows.builder.inspectorEmpty", "Select a node to edit it. Drag from a node’s right edge to another node to connect them.")
587
+ children: i("workflows.builder.inspectorEmpty", "Select a node to edit it. Drag from a node’s right edge to another node to connect them.")
600
588
  })
601
- }), /* @__PURE__ */ P(F, {
589
+ }), /* @__PURE__ */ I(L, {
602
590
  treatment: "metric",
603
591
  className: "p-4",
604
592
  "data-testid": "workflow-issues",
605
- children: [/* @__PURE__ */ N("p", {
593
+ children: [/* @__PURE__ */ F("p", {
606
594
  className: "mb-2 text-xs font-medium uppercase tracking-wide text-text-secondary",
607
- children: n("workflows.builder.issues", "Validation")
608
- }), E ? /* @__PURE__ */ N("p", {
595
+ children: i("workflows.builder.issues", "Validation")
596
+ }), D ? /* @__PURE__ */ F("p", {
609
597
  className: "text-sm text-text-secondary",
610
- children: n("workflows.builder.issuesAfterSave", "Save to check the workflow.")
611
- }) : w.length === 0 ? /* @__PURE__ */ P("p", {
598
+ children: i("workflows.builder.issuesAfterSave", "Save to check the workflow.")
599
+ }) : T.length === 0 ? /* @__PURE__ */ I("p", {
612
600
  className: "inline-flex items-center gap-1.5 text-sm text-status-success-text",
613
601
  children: [
614
- /* @__PURE__ */ N(C, { className: "h-4 w-4" }),
602
+ /* @__PURE__ */ F(w, { className: "h-4 w-4" }),
615
603
  " ",
616
- n("workflows.builder.noIssues", "No issues found")
604
+ i("workflows.builder.noIssues", "No issues found")
617
605
  ]
618
- }) : /* @__PURE__ */ N("ul", {
606
+ }) : /* @__PURE__ */ F("ul", {
619
607
  className: "space-y-2",
620
- children: w.map((e, t) => /* @__PURE__ */ N("li", { children: /* @__PURE__ */ P("button", {
608
+ children: T.map((e, t) => /* @__PURE__ */ F("li", { children: /* @__PURE__ */ I("button", {
621
609
  type: "button",
622
610
  className: "flex w-full items-start gap-2 text-start text-sm text-text-primary hover:underline disabled:no-underline",
623
611
  disabled: !e.nodeId,
624
612
  onClick: () => e.nodeId && R(e.nodeId),
625
- children: [/* @__PURE__ */ N(x, { className: "mt-0.5 h-4 w-4 shrink-0 text-status-warning-text" }), /* @__PURE__ */ N("span", { children: e.message })]
613
+ children: [/* @__PURE__ */ F(S, { className: "mt-0.5 h-4 w-4 shrink-0 text-status-warning-text" }), /* @__PURE__ */ F("span", { children: e.message })]
626
614
  }) }, `${e.code}-${e.nodeId ?? e.edgeId ?? t}`))
627
615
  })]
628
616
  })]
@@ -631,31 +619,30 @@ function J({ workflow: e }) {
631
619
  })
632
620
  ] });
633
621
  }
634
- function Y() {
635
- let { id: r } = j(), s = t(), { navigateTo: c } = e(), { data: l, isLoading: d, isError: f, refetch: p } = u(r);
636
- return /* @__PURE__ */ N(n, {
637
- title: l?.name ?? s("workflows.builder.title", "Workflow builder"),
638
- description: l ? s("workflows.builder.subtitle", "Visual builder · starts on {{trigger}}", { trigger: l.triggerEvent || "—" }) : void 0,
639
- actions: /* @__PURE__ */ P("button", {
622
+ function X() {
623
+ let { id: e } = N(), t = l(), { navigateTo: n } = u(), { data: a, isLoading: d, isError: f, refetch: p } = r(e);
624
+ return /* @__PURE__ */ F(i, {
625
+ title: a?.name ?? t("workflows.builder.title", "Workflow builder"),
626
+ description: a ? t("workflows.builder.subtitle", "Visual builder · starts on {{trigger}}", { trigger: a.triggerEvent || "—" }) : void 0,
627
+ actions: /* @__PURE__ */ I("button", {
640
628
  type: "button",
641
629
  className: H,
642
- onClick: () => c(r ? `/workflows/${r}` : "/workflows"),
630
+ onClick: () => n(e ? `/workflows/${e}` : "/workflows"),
643
631
  children: [
644
- /* @__PURE__ */ N(S, { className: "rtl:rotate-180 h-4 w-4" }),
632
+ /* @__PURE__ */ F(C, { className: "rtl:rotate-180 h-4 w-4" }),
645
633
  " ",
646
- s("workflows.builder.back", "Workflows")
634
+ t("workflows.builder.back", "Workflows")
647
635
  ]
648
636
  }),
649
- children: d ? /* @__PURE__ */ N(o, { label: s("workflows.builder.loading", "Loading workflow…") }) : f ? /* @__PURE__ */ N(a, {
650
- message: s("workflows.builder.error", "Could not load this workflow."),
637
+ children: d ? /* @__PURE__ */ F(c, { label: t("workflows.builder.loading", "Loading workflow…") }) : f ? /* @__PURE__ */ F(s, {
638
+ message: t("workflows.builder.error", "Could not load this workflow."),
651
639
  onRetry: () => void p()
652
- }) : l ? /* @__PURE__ */ N(J, { workflow: l }, l.id) : /* @__PURE__ */ N(i, {
653
- title: s("workflows.builder.notFound", "Workflow not found"),
654
- description: s("workflows.builder.notFoundDescription", "It may have been deleted, or it belongs to another workspace.")
640
+ }) : a ? /* @__PURE__ */ F(Y, { workflow: a }, a.id) : /* @__PURE__ */ F(o, {
641
+ title: t("workflows.builder.notFound", "Workflow not found"),
642
+ description: t("workflows.builder.notFoundDescription", "It may have been deleted, or it belongs to another workspace.")
655
643
  })
656
644
  });
657
645
  }
658
- //#endregion
659
- export { Y as WorkflowBuilderPage };
646
+ export { X as WorkflowBuilderPage };
660
647
 
661
648
  //# sourceMappingURL=WorkflowBuilderPage.js.map