@oomol-lab/open-flow 0.1.0-beta.2 → 0.1.0-beta.4

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 (38) hide show
  1. package/dist/browser/DesignerIcon-DdfuH2jW.js +2066 -0
  2. package/dist/browser/createResourceDialog-4YQKl8lG.js +505 -0
  3. package/dist/browser/dist-CP0883sY.js +4 -0
  4. package/dist/browser/{esm-B_PbUobB.js → esm-C9jQK70n.js} +1 -1
  5. package/dist/browser/flow-authoring-node.d.ts +3 -0
  6. package/dist/browser/flow-authoring.d.ts +1 -1
  7. package/dist/browser/flow-authoring.js +66 -46
  8. package/dist/browser/flow-change.d.ts +14 -1
  9. package/dist/browser/flow-notifications.d.ts +5 -0
  10. package/dist/browser/{diagnostics-giPSzyMo.js → flowChanges-Bs-ZcJV8.js} +6027 -3367
  11. package/dist/browser/{flowRunInputEditorStore-BeyUSWpO.js → flowRunInputEditorStore-BYa8zFLC.js} +719 -718
  12. package/dist/browser/{flowWorkspace-DAMLVMcF.js → flowWorkspace-BewofPeU.js} +40337 -42346
  13. package/dist/browser/{getPseudoElementBounds-ESJExRFX.js → getPseudoElementBounds-qDxSDwzN.js} +1813 -2328
  14. package/dist/browser/icons-DRoMXL5h.js +521 -0
  15. package/dist/browser/{markdownContent-DdlIRN3_.js → markdownContent-DUfLdnUt.js} +1 -1
  16. package/dist/browser/{typeScriptSession-mPCiA9sV.js → typeScriptSession-CwMPjseS.js} +1 -1
  17. package/dist/browser/waitNotificationInputs-DtrPBwA1.js +26 -0
  18. package/dist/browser/workbench.css +1 -1
  19. package/dist/browser/workbench.d.ts +1 -0
  20. package/dist/browser/workbench.js +612 -537
  21. package/dist/browser/{workbenchSelect-B2s1HV-Y.js → workbenchSelect-CX8KtT7L.js} +483 -482
  22. package/dist/common/control-api-conformance.d.ts +1 -0
  23. package/dist/common/control-api-conformance.js +59 -0
  24. package/dist/common/control-api-errors.d.ts +4 -0
  25. package/dist/common/control-api.d.ts +22 -3
  26. package/dist/common/control-api.js +134 -73
  27. package/dist/common/flow-encoding.js +20 -8
  28. package/dist/common/flow-notifications.d.ts +5 -0
  29. package/dist/common/flow-semantics.d.ts +1 -0
  30. package/dist/common/flow-semantics.js +3464 -1104
  31. package/dist/common/run-events.js +2 -1
  32. package/dist/common/run-lifecycle.d.ts +17 -2
  33. package/dist/common/run-lifecycle.js +53 -2
  34. package/dist/common/scheduler.d.ts +64 -3
  35. package/dist/common/scheduler.js +417 -142
  36. package/dist/index.d.ts +1 -0
  37. package/package.json +1 -1
  38. package/dist/browser/createResourceDialog-BkZns-oZ.js +0 -504
@@ -1,13 +1,14 @@
1
1
  import { a as e, f as t, i as n } from "./dist-C46JByB-.js";
2
2
  import { a as r, i, s as a, t as o } from "./main-DmjVyuWr.js";
3
- import { At as s, It as c, Jn as l, Kn as u, Mt as d, Ot as f, Qn as p, Xn as m, Yn as h, Zn as g, er as _, jt as v } from "./getPseudoElementBounds-ESJExRFX.js";
4
- import { A as y, At as b, B as x, C as S, Ct as C, D as w, Dt as ee, E as T, Et as te, Ft as E, G as ne, H as D, I as O, K as re, Lt as k, M as A, Mt as ie, N as j, Nt as ae, O as M, Ot as oe, P as se, Pt as ce, R as N, Rt as P, S as le, Tt as ue, U as de, V as fe, W as pe, _ as me, a as F, b as he, c as ge, d as I, f as _e, g as ve, h as ye, i as be, j as L, jt as R, kt as xe, l as Se, m as Ce, n as we, p as Te, q as Ee, s as De, t as Oe, u as ke, v as Ae, w as je, wt as z, x as Me, y as Ne, z as B } from "./diagnostics-giPSzyMo.js";
5
- import { t as Pe } from "./workbenchSelect-B2s1HV-Y.js";
6
- import { a as V, i as Fe, n as Ie, r as Le } from "./languages-DgJehE1g.js";
7
- import { Suspense as Re, lazy as ze, useEffect as H, useRef as Be, useState as U } from "react";
8
- import { Fragment as Ve, jsx as W, jsxs as G } from "react/jsx-runtime";
3
+ import { At as s, Bn as c, Hn as l } from "./getPseudoElementBounds-qDxSDwzN.js";
4
+ import { a as u, d, f, i as p, l as m, r as h, s as g, t as _, u as v } from "./icons-DRoMXL5h.js";
5
+ import { t as y } from "./workbenchSelect-CX8KtT7L.js";
6
+ import { $ as b, A as x, C as S, D as C, E as w, F as T, G as E, H as D, I as O, J as ee, M as k, N as A, O as j, P as M, Q as N, S as P, U as F, V as I, W as te, X as ne, Y as re, Z as ie, _ as ae, a as oe, at as se, b as ce, c as le, ct as ue, d as de, dt as fe, et as pe, f as me, ft as L, g as he, h as ge, i as _e, it as ve, j as R, l as ye, lt as be, m as xe, mt as z, n as B, nt as Se, o as Ce, ot as we, p as Te, pt as Ee, q as De, rt as Oe, s as ke, st as Ae, t as je, tt as V, u as Me, ut as Ne, v as Pe, w as Fe, x as Ie, y as Le, z as Re } from "./flowChanges-Bs-ZcJV8.js";
7
+ import { a as ze, i as Be, n as Ve, r as He } from "./languages-DgJehE1g.js";
8
+ import { Suspense as Ue, lazy as We, useEffect as H, useRef as Ge, useState as U } from "react";
9
+ import { Fragment as Ke, jsx as W, jsxs as G } from "react/jsx-runtime";
9
10
  //#region src/workbench/browser/runtime/navigation.ts
10
- var He = class {
11
+ var qe = class {
11
12
  #e;
12
13
  #t;
13
14
  #n;
@@ -66,7 +67,7 @@ var He = class {
66
67
  this.#s = !0, await this.#n.selectFlow(void 0), e == this.#i && (this.#u("design", !1), this.#s = !1);
67
68
  }
68
69
  async apply(e) {
69
- if (Ue(e, this.#t)) return;
70
+ if (Je(e, this.#t)) return;
70
71
  this.#t = e;
71
72
  let t = ++this.#i;
72
73
  this.#s = !0;
@@ -82,19 +83,19 @@ var He = class {
82
83
  flowId: this.#n.workspace.$.flowId.value,
83
84
  view: e
84
85
  };
85
- Ue(n, this.#t) || (this.#t = n, this.#e(n, { replace: t })), this.#r.set(e);
86
+ Je(n, this.#t) || (this.#t = n, this.#e(n, { replace: t })), this.#r.set(e);
86
87
  }
87
88
  };
88
- function Ue(e, t) {
89
+ function Je(e, t) {
89
90
  return e.flowId == t.flowId && e.view == t.view;
90
91
  }
91
92
  //#endregion
92
93
  //#region src/workbench/browser/runtime/shell/resourceBrowser.tsx
93
- var We = ze(() => import("./createResourceDialog-BkZns-oZ.js")), Ge = V.map((e) => ({
94
- label: Fe[e],
94
+ var Ye = We(() => import("./createResourceDialog-4YQKl8lG.js")), Xe = ze.map((e) => ({
95
+ label: Be[e],
95
96
  value: e
96
97
  }));
97
- function Ke({ language: e, onLanguageChange: t }) {
98
+ function Ze({ language: e, onLanguageChange: t }) {
98
99
  let n = r(), [i, a] = U(null);
99
100
  return t == null ? null : /* @__PURE__ */ G("div", {
100
101
  className: "resource-language",
@@ -102,29 +103,29 @@ function Ke({ language: e, onLanguageChange: t }) {
102
103
  children: [/* @__PURE__ */ W("span", {
103
104
  className: "sr-only",
104
105
  children: n("language.label")
105
- }), /* @__PURE__ */ W(Pe, {
106
+ }), /* @__PURE__ */ W(y, {
106
107
  ariaLabel: n("language.label"),
107
108
  onValueChange: (e) => t(e),
108
- options: Ge,
109
+ options: Xe,
109
110
  portalRoot: i,
110
111
  value: e
111
112
  })]
112
113
  });
113
114
  }
114
- function qe({ badge: e, busy: t, flow: n, href: a, onSelect: o, store: s }) {
115
- let l = i(), u = r(), [d, m] = U("idle"), [h, y] = U(n.name), b = v(h);
115
+ function Qe({ badge: e, busy: t, flow: n, href: a, onSelect: o, store: u }) {
116
+ let d = i(), m = r(), [h, g] = U("idle"), [v, y] = U(n.name), b = p(v);
116
117
  async function x(e) {
117
118
  e.preventDefault();
118
- let t = h.trim();
119
- v(t) == null && await s.workspace.renameFlow(n.flowId, t) && m("idle");
119
+ let t = v.trim();
120
+ p(t) == null && await u.workspace.renameFlow(n.flowId, t) && g("idle");
120
121
  }
121
122
  async function S() {
122
- await s.workspace.deleteFlow(n.flowId) && m("idle");
123
+ await u.workspace.deleteFlow(n.flowId) && g("idle");
123
124
  }
124
125
  return /* @__PURE__ */ G("div", {
125
126
  className: "resource-item-row",
126
127
  children: [
127
- /* @__PURE__ */ G(p, {
128
+ /* @__PURE__ */ G(c, {
128
129
  "aria-disabled": n.status == "retiring",
129
130
  className: "resource-list-row flow-columns",
130
131
  nativeButton: !1,
@@ -133,7 +134,7 @@ function qe({ badge: e, busy: t, flow: n, href: a, onSelect: o, store: s }) {
133
134
  e.preventDefault();
134
135
  return;
135
136
  }
136
- C(e, () => o(n));
137
+ pe(e, () => o(n));
137
138
  },
138
139
  render: /* @__PURE__ */ W("a", { href: n.status == "retiring" ? void 0 : a }),
139
140
  tabIndex: n.status == "retiring" ? -1 : void 0,
@@ -143,13 +144,13 @@ function qe({ badge: e, busy: t, flow: n, href: a, onSelect: o, store: s }) {
143
144
  className: "resource-primary-cell",
144
145
  children: [/* @__PURE__ */ W("span", {
145
146
  className: "resource-icon",
146
- children: /* @__PURE__ */ W(f, { name: "flow" })
147
+ children: /* @__PURE__ */ W(_, { name: "flow" })
147
148
  }), /* @__PURE__ */ G("span", { children: [/* @__PURE__ */ G("span", {
148
149
  className: "flex min-w-0 items-center gap-2",
149
150
  children: [/* @__PURE__ */ W("strong", {
150
151
  className: "min-w-0 truncate",
151
152
  children: n.name
152
- }), e != null && /* @__PURE__ */ W(ce, {
153
+ }), e != null && /* @__PURE__ */ W(fe, {
153
154
  className: "min-w-0 shrink",
154
155
  title: e,
155
156
  variant: "secondary",
@@ -165,156 +166,132 @@ function qe({ badge: e, busy: t, flow: n, href: a, onSelect: o, store: s }) {
165
166
  }),
166
167
  /* @__PURE__ */ W("time", {
167
168
  dateTime: n.updatedAt,
168
- children: new Date(n.updatedAt).toLocaleString(l)
169
+ children: new Date(n.updatedAt).toLocaleString(d)
169
170
  }),
170
171
  /* @__PURE__ */ G("span", {
171
172
  className: `resource-status ${n.status == "active" ? "active" : "warning"}`,
172
173
  children: [/* @__PURE__ */ W("span", {
173
174
  "aria-hidden": "true",
174
175
  className: `status-dot ${n.status == "active" ? "success" : "running"}`
175
- }), u(n.status == "active" ? "resource.active" : "resource.retiring")]
176
+ }), m(n.status == "active" ? "resource.active" : "resource.retiring")]
176
177
  })
177
178
  ]
178
179
  }),
179
- n.status == "active" && /* @__PURE__ */ W(p, {
180
- "aria-expanded": d != "idle",
181
- "aria-label": u("sidebar.flowActions", { name: n.name }),
182
- className: _("resource-row-more", d != "idle" && "active"),
180
+ n.status == "active" && /* @__PURE__ */ W(c, {
181
+ "aria-expanded": h != "idle",
182
+ "aria-label": m("sidebar.flowActions", { name: n.name }),
183
+ className: l("resource-row-more", h != "idle" && "active"),
183
184
  disabled: t != null,
184
- onClick: () => m(d == "idle" ? "actions" : "idle"),
185
+ onClick: () => g(h == "idle" ? "actions" : "idle"),
185
186
  size: "icon-sm",
186
187
  variant: "ghost",
187
- children: /* @__PURE__ */ W(f, { name: "more" })
188
+ children: /* @__PURE__ */ W(_, { name: "more" })
188
189
  }),
189
- d == "actions" && /* @__PURE__ */ G("div", {
190
+ h == "actions" && /* @__PURE__ */ G("div", {
190
191
  className: "resource-row-actions",
191
- children: [/* @__PURE__ */ W(p, {
192
+ children: [/* @__PURE__ */ W(c, {
192
193
  onClick: () => {
193
- y(n.name), m("rename");
194
+ y(n.name), g("rename");
194
195
  },
195
196
  size: "sm",
196
197
  variant: "outline",
197
- children: u("common.rename")
198
- }), /* @__PURE__ */ W(p, {
199
- onClick: () => m("delete"),
198
+ children: m("common.rename")
199
+ }), /* @__PURE__ */ W(c, {
200
+ onClick: () => g("delete"),
200
201
  size: "sm",
201
202
  variant: "destructive",
202
- children: u("common.delete")
203
+ children: m("common.delete")
203
204
  })]
204
205
  }),
205
- d == "rename" && /* @__PURE__ */ G("form", {
206
+ h == "rename" && /* @__PURE__ */ G("form", {
206
207
  className: "resource-row-form",
207
208
  onSubmit: (e) => void x(e),
208
209
  children: [
209
- /* @__PURE__ */ W(g, {
210
+ /* @__PURE__ */ W(f, {
210
211
  htmlFor: `rename-flow-${n.flowId}`,
211
- children: u("sidebar.renameFlow", { name: n.name })
212
+ children: m("sidebar.renameFlow", { name: n.name })
212
213
  }),
213
214
  /* @__PURE__ */ G("span", {
214
215
  className: "resource-row-field",
215
- children: [/* @__PURE__ */ W(c, {
216
+ children: [/* @__PURE__ */ W(s, {
216
217
  autoComplete: "off",
217
- "aria-invalid": h.length > 0 && b != null,
218
+ "aria-invalid": v.length > 0 && b != null,
218
219
  autoFocus: !0,
219
220
  id: `rename-flow-${n.flowId}`,
220
221
  name: "flow-name",
221
222
  onChange: (e) => y(e.target.value),
222
223
  required: !0,
223
- value: h
224
- }), h.length > 0 && b != null && /* @__PURE__ */ W("small", {
224
+ value: v
225
+ }), v.length > 0 && b != null && /* @__PURE__ */ W("small", {
225
226
  className: "resource-name-message error",
226
- children: u(`resource.nameIssue.${b}`, { max: 80 })
227
+ children: m(`resource.nameIssue.${b}`, { max: 80 })
227
228
  })]
228
229
  }),
229
- /* @__PURE__ */ G("div", { children: [/* @__PURE__ */ W(p, {
230
- onClick: () => m("idle"),
230
+ /* @__PURE__ */ G("div", { children: [/* @__PURE__ */ W(c, {
231
+ onClick: () => g("idle"),
231
232
  size: "sm",
232
233
  variant: "outline",
233
- children: u("common.cancel")
234
- }), /* @__PURE__ */ W(p, {
234
+ children: m("common.cancel")
235
+ }), /* @__PURE__ */ W(c, {
235
236
  disabled: t != null || b != null,
236
237
  size: "sm",
237
238
  type: "submit",
238
- children: u("common.save")
239
+ children: m("common.save")
239
240
  })] })
240
241
  ]
241
242
  }),
242
- d == "delete" && /* @__PURE__ */ G("div", {
243
+ h == "delete" && /* @__PURE__ */ G("div", {
243
244
  className: "resource-row-confirm",
244
245
  role: "group",
245
- "aria-label": u("sidebar.deleteFlow", { name: n.name }),
246
- children: [/* @__PURE__ */ W("span", { children: /* @__PURE__ */ W("strong", { children: u("sidebar.deleteFlowConfirm", { name: n.name }) }) }), /* @__PURE__ */ G("div", { children: [/* @__PURE__ */ W(p, {
247
- onClick: () => m("idle"),
246
+ "aria-label": m("sidebar.deleteFlow", { name: n.name }),
247
+ children: [/* @__PURE__ */ W("span", { children: /* @__PURE__ */ W("strong", { children: m("sidebar.deleteFlowConfirm", { name: n.name }) }) }), /* @__PURE__ */ G("div", { children: [/* @__PURE__ */ W(c, {
248
+ onClick: () => g("idle"),
248
249
  size: "sm",
249
250
  variant: "outline",
250
- children: u("common.cancel")
251
- }), /* @__PURE__ */ W(p, {
251
+ children: m("common.cancel")
252
+ }), /* @__PURE__ */ W(c, {
252
253
  disabled: t != null,
253
254
  onClick: () => void S(),
254
255
  size: "sm",
255
256
  variant: "destructive",
256
- children: u(t == "flow" ? "common.deleting" : "common.delete")
257
+ children: m(t == "flow" ? "common.deleting" : "common.delete")
257
258
  })] })]
258
259
  })
259
260
  ]
260
261
  });
261
262
  }
262
- function Je() {
263
+ function $e() {
263
264
  return /* @__PURE__ */ G("div", {
264
265
  "aria-hidden": "true",
265
266
  className: "resource-list-row resource-skeleton-row flow-columns",
266
267
  children: [
267
268
  /* @__PURE__ */ G("span", {
268
269
  className: "resource-primary-cell",
269
- children: [/* @__PURE__ */ W(z, { className: "size-8 shrink-0" }), /* @__PURE__ */ G("span", {
270
+ children: [/* @__PURE__ */ W(V, { className: "size-8 shrink-0" }), /* @__PURE__ */ G("span", {
270
271
  className: "resource-skeleton-copy",
271
- children: [/* @__PURE__ */ W(z, { className: "h-3.5 w-36" }), /* @__PURE__ */ W(z, { className: "h-2.5 w-48 max-w-full" })]
272
+ children: [/* @__PURE__ */ W(V, { className: "h-3.5 w-36" }), /* @__PURE__ */ W(V, { className: "h-2.5 w-48 max-w-full" })]
272
273
  })]
273
274
  }),
274
- /* @__PURE__ */ W(z, { className: "h-3 w-28" }),
275
- /* @__PURE__ */ W(z, { className: "h-3 w-16" })
275
+ /* @__PURE__ */ W(V, { className: "h-3 w-28" }),
276
+ /* @__PURE__ */ W(V, { className: "h-3 w-16" })
276
277
  ]
277
278
  });
278
279
  }
279
- function Ye({ createFlowDisabled: e, createFlowField: t, flowBadges: n, hrefForFlow: i, hostAction: o, hostTitle: s, language: c, onCreateFlow: l, onHostAction: u, onLanguageChange: d, onSelectFlow: m, store: h }) {
280
- let g = r(), _ = a(h.workspace.$.busy), y = a(h.workspace.$.flowLoadFailed), x = a(h.workspace.$.flowLoadMoreFailed), S = a(h.workspace.$.flowLoading), C = a(h.workspace.$.flowLoadingMore), w = a(h.workspace.$.flowNextCursor), T = a(h.workspace.$.flows), E = a(h.workspace.$.flowTotal), [ne, D] = U(!1), [O, re] = U(""), [k, A] = U(""), j = O.trim().toLocaleLowerCase(), M = T.filter((e) => e.name.toLocaleLowerCase().includes(j));
281
- async function se(e) {
280
+ function et({ catalogWidth: e, createFlowDisabled: t, createFlowField: n, flowBadges: i, hrefForFlow: o, hostAction: s, hostTitle: u, language: d, onCreateFlow: f, onHostAction: m, onLanguageChange: h, onSelectFlow: g, store: v }) {
281
+ let y = r(), x = a(v.workspace.$.busy), S = a(v.workspace.$.flowLoadFailed), C = a(v.workspace.$.flowLoadMoreFailed), w = a(v.workspace.$.flowLoading), T = a(v.workspace.$.flowLoadingMore), E = a(v.workspace.$.flowNextCursor), D = a(v.workspace.$.flows), O = a(v.workspace.$.flowTotal), [ee, k] = U(!1), [A, j] = U(""), [M, N] = U(""), P = A.trim().toLocaleLowerCase(), F = D.filter((e) => e.name.toLocaleLowerCase().includes(P));
282
+ async function I(e) {
282
283
  e.preventDefault();
283
- let t = k.trim();
284
- v(t) != null || !await l(t) || (D(!1), A(""));
284
+ let t = M.trim();
285
+ p(t) != null || !await f(t) || (k(!1), N(""));
285
286
  }
286
287
  return /* @__PURE__ */ W("main", {
287
288
  className: "resource-browser",
288
289
  children: /* @__PURE__ */ G("div", {
289
- className: "resource-page",
290
+ className: l("resource-page", e != "default" && "resource-page-full"),
290
291
  children: [
291
- /* @__PURE__ */ G("header", {
292
- className: "resource-page-header",
293
- children: [/* @__PURE__ */ W("div", {
294
- className: "resource-heading",
295
- children: /* @__PURE__ */ W("h1", { children: g("resource.flows") })
296
- }), /* @__PURE__ */ G("div", {
297
- className: "resource-page-actions",
298
- children: [
299
- /* @__PURE__ */ W(Ke, {
300
- language: c,
301
- onLanguageChange: d
302
- }),
303
- /* @__PURE__ */ G(p, {
304
- disabled: _ != null,
305
- onClick: () => D(!0),
306
- children: [/* @__PURE__ */ W(f, {
307
- "data-icon": "inline-start",
308
- name: "plus"
309
- }), g("resource.newFlow")]
310
- }),
311
- o != null && s != null && u != null && /* @__PURE__ */ W(Ee, {
312
- action: o,
313
- onAction: u,
314
- title: s
315
- })
316
- ]
317
- })]
292
+ /* @__PURE__ */ W("h1", {
293
+ className: "sr-only",
294
+ children: y("resource.flows")
318
295
  }),
319
296
  /* @__PURE__ */ G("section", {
320
297
  "aria-labelledby": "flow-list-title",
@@ -326,117 +303,138 @@ function Ye({ createFlowDisabled: e, createFlowField: t, flowBadges: n, hrefForF
326
303
  className: "resource-list-heading",
327
304
  children: [/* @__PURE__ */ W("h2", {
328
305
  id: "flow-list-title",
329
- children: g("resource.allFlows")
330
- }), !S && /* @__PURE__ */ W("span", { children: g("resource.flowCount", { count: E ?? T.length }) })]
306
+ children: y("resource.allFlows")
307
+ }), !w && /* @__PURE__ */ W("span", { children: y("resource.flowCount", { count: O ?? D.length }) })]
331
308
  }), /* @__PURE__ */ G("div", {
332
309
  className: "resource-list-actions",
333
- children: [/* @__PURE__ */ G(ue, {
334
- className: "w-full sm:w-56",
335
- children: [/* @__PURE__ */ W(te, { children: /* @__PURE__ */ W(f, {
336
- name: "search",
337
- size: 17
338
- }) }), /* @__PURE__ */ W(ee, {
339
- autoComplete: "off",
340
- "aria-label": g("resource.searchFlows"),
341
- name: "flow-search",
342
- onChange: (e) => re(e.target.value),
343
- placeholder: g("resource.searchFlows"),
344
- value: O
345
- })]
346
- }), /* @__PURE__ */ W(p, {
347
- "aria-label": g("common.refresh"),
348
- disabled: S || _ != null,
349
- onClick: () => void h.workspace.reloadFlows(),
350
- size: "icon",
351
- title: g("common.refresh"),
352
- variant: "outline",
353
- children: /* @__PURE__ */ W(f, { name: "refresh" })
354
- })]
310
+ children: [
311
+ /* @__PURE__ */ W(Ze, {
312
+ language: d,
313
+ onLanguageChange: h
314
+ }),
315
+ /* @__PURE__ */ G(Se, {
316
+ className: "w-full sm:w-56",
317
+ children: [/* @__PURE__ */ W(Oe, { children: /* @__PURE__ */ W(_, {
318
+ name: "search",
319
+ size: 17
320
+ }) }), /* @__PURE__ */ W(ve, {
321
+ autoComplete: "off",
322
+ "aria-label": y("resource.searchFlows"),
323
+ name: "flow-search",
324
+ onChange: (e) => j(e.target.value),
325
+ placeholder: y("resource.searchFlows"),
326
+ value: A
327
+ })]
328
+ }),
329
+ /* @__PURE__ */ W(c, {
330
+ "aria-label": y("common.refresh"),
331
+ disabled: w || x != null,
332
+ onClick: () => void v.workspace.reloadFlows(),
333
+ size: "icon",
334
+ title: y("common.refresh"),
335
+ variant: "outline",
336
+ children: /* @__PURE__ */ W(_, { name: "refresh" })
337
+ }),
338
+ /* @__PURE__ */ G(c, {
339
+ className: "resource-page-primary-action",
340
+ disabled: x != null,
341
+ onClick: () => k(!0),
342
+ children: [/* @__PURE__ */ W(_, {
343
+ "data-icon": "inline-start",
344
+ name: "plus"
345
+ }), y("resource.newFlow")]
346
+ }),
347
+ s != null && u != null && m != null && /* @__PURE__ */ W(b, {
348
+ action: s,
349
+ onAction: m,
350
+ title: u
351
+ })
352
+ ]
355
353
  })]
356
354
  }),
357
355
  /* @__PURE__ */ G("div", {
358
356
  "aria-hidden": "true",
359
357
  className: "resource-list-columns flow-columns",
360
358
  children: [
361
- /* @__PURE__ */ W("span", { children: g("resource.name") }),
362
- /* @__PURE__ */ W("span", { children: g("resource.updated") }),
363
- /* @__PURE__ */ W("span", { children: g("resource.status") })
359
+ /* @__PURE__ */ W("span", { children: y("resource.name") }),
360
+ /* @__PURE__ */ W("span", { children: y("resource.updated") }),
361
+ /* @__PURE__ */ W("span", { children: y("resource.status") })
364
362
  ]
365
363
  }),
366
364
  /* @__PURE__ */ W("div", {
367
365
  className: "resource-list",
368
- children: S ? Array.from({ length: 5 }, (e, t) => /* @__PURE__ */ W(Je, {}, t)) : y ? /* @__PURE__ */ G(oe, {
366
+ children: w ? Array.from({ length: 5 }, (e, t) => /* @__PURE__ */ W($e, {}, t)) : S ? /* @__PURE__ */ G(se, {
369
367
  className: "min-h-64",
370
368
  role: "alert",
371
- children: [/* @__PURE__ */ G(R, { children: [
372
- /* @__PURE__ */ W(ie, {
369
+ children: [/* @__PURE__ */ G(ue, { children: [
370
+ /* @__PURE__ */ W(be, {
373
371
  variant: "icon",
374
- children: /* @__PURE__ */ W(f, {
372
+ children: /* @__PURE__ */ W(_, {
375
373
  name: "alert",
376
374
  size: 20
377
375
  })
378
376
  }),
379
- /* @__PURE__ */ W(ae, { children: g("resource.flowsLoadFailed") }),
380
- /* @__PURE__ */ W(b, { children: g("resource.flowsLoadFailedDescription") })
381
- ] }), /* @__PURE__ */ W(xe, { children: /* @__PURE__ */ W(p, {
382
- onClick: () => void h.retryFlows(),
377
+ /* @__PURE__ */ W(Ne, { children: y("resource.flowsLoadFailed") }),
378
+ /* @__PURE__ */ W(Ae, { children: y("resource.flowsLoadFailedDescription") })
379
+ ] }), /* @__PURE__ */ W(we, { children: /* @__PURE__ */ W(c, {
380
+ onClick: () => void v.retryFlows(),
383
381
  variant: "outline",
384
- children: g("empty.retry")
382
+ children: y("empty.retry")
385
383
  }) })]
386
- }) : M.length == 0 ? /* @__PURE__ */ G(oe, {
384
+ }) : F.length == 0 ? /* @__PURE__ */ G(se, {
387
385
  className: "min-h-64",
388
- children: [/* @__PURE__ */ G(R, { children: [
389
- /* @__PURE__ */ W(ie, {
386
+ children: [/* @__PURE__ */ G(ue, { children: [
387
+ /* @__PURE__ */ W(be, {
390
388
  variant: "icon",
391
- children: /* @__PURE__ */ W(f, {
389
+ children: /* @__PURE__ */ W(_, {
392
390
  name: "flow",
393
391
  size: 20
394
392
  })
395
393
  }),
396
- /* @__PURE__ */ W(ae, { children: g(j.length == 0 ? "resource.noFlows" : "resource.noMatchingFlows") }),
397
- /* @__PURE__ */ W(b, { children: g(j.length == 0 ? "resource.noFlowsDescription" : "resource.noMatchingDescription") })
398
- ] }), j.length == 0 && /* @__PURE__ */ W(xe, { children: /* @__PURE__ */ G(p, {
399
- onClick: () => D(!0),
394
+ /* @__PURE__ */ W(Ne, { children: y(P.length == 0 ? "resource.noFlows" : "resource.noMatchingFlows") }),
395
+ /* @__PURE__ */ W(Ae, { children: y(P.length == 0 ? "resource.noFlowsDescription" : "resource.noMatchingDescription") })
396
+ ] }), P.length == 0 && /* @__PURE__ */ W(we, { children: /* @__PURE__ */ G(c, {
397
+ onClick: () => k(!0),
400
398
  variant: "outline",
401
- children: [/* @__PURE__ */ W(f, {
399
+ children: [/* @__PURE__ */ W(_, {
402
400
  "data-icon": "inline-start",
403
401
  name: "plus"
404
- }), g("resource.newFlow")]
402
+ }), y("resource.newFlow")]
405
403
  }) })]
406
- }) : M.map((e) => /* @__PURE__ */ W(qe, {
407
- badge: n?.[e.flowId],
408
- busy: _,
404
+ }) : F.map((e) => /* @__PURE__ */ W(Qe, {
405
+ badge: i?.[e.flowId],
406
+ busy: x,
409
407
  flow: e,
410
- href: i(e),
411
- onSelect: m,
412
- store: h
408
+ href: o(e),
409
+ onSelect: g,
410
+ store: v
413
411
  }, e.flowId))
414
412
  }),
415
- w != null && /* @__PURE__ */ W("div", {
413
+ E != null && /* @__PURE__ */ W("div", {
416
414
  className: "resource-list-footer",
417
- children: /* @__PURE__ */ W(p, {
418
- disabled: C,
419
- onClick: () => void h.workspace.loadMoreFlows(),
415
+ children: /* @__PURE__ */ W(c, {
416
+ disabled: T,
417
+ onClick: () => void v.workspace.loadMoreFlows(),
420
418
  variant: "outline",
421
- children: g(C ? "resource.loadingMore" : x ? "resource.retryLoadMore" : "resource.loadMore")
419
+ children: y(T ? "resource.loadingMore" : C ? "resource.retryLoadMore" : "resource.loadMore")
422
420
  })
423
421
  })
424
422
  ]
425
423
  }),
426
- ne && /* @__PURE__ */ W(Re, {
424
+ ee && /* @__PURE__ */ W(Ue, {
427
425
  fallback: null,
428
- children: /* @__PURE__ */ W(We, {
429
- disabled: e,
430
- field: t,
426
+ children: /* @__PURE__ */ W(Ye, {
427
+ disabled: t,
428
+ field: n,
431
429
  id: "flow-name",
432
- issue: v(k),
433
- label: g("resource.flowName"),
434
- name: k,
435
- onNameChange: A,
436
- onOpenChange: D,
437
- onSubmit: (e) => void se(e),
438
- pending: _ == "flow",
439
- title: g("resource.newFlow")
430
+ issue: p(M),
431
+ label: y("resource.flowName"),
432
+ name: M,
433
+ onNameChange: N,
434
+ onOpenChange: k,
435
+ onSubmit: (e) => void I(e),
436
+ pending: x == "flow",
437
+ title: y("resource.newFlow")
440
438
  })
441
439
  })
442
440
  ]
@@ -445,7 +443,7 @@ function Ye({ createFlowDisabled: e, createFlowField: t, flowBadges: n, hrefForF
445
443
  }
446
444
  //#endregion
447
445
  //#region ../../node_modules/.bun/nanoid@6.0.1/node_modules/nanoid/index.browser.js
448
- var Xe = (e) => crypto.getRandomValues(new Uint8Array(e)), Ze = (e, t, n) => {
446
+ var tt = (e) => crypto.getRandomValues(new Uint8Array(e)), nt = (e, t, n) => {
449
447
  let r = 256 - 256 % e.length;
450
448
  if (r === 256) {
451
449
  let r = e.length - 1;
@@ -467,41 +465,41 @@ var Xe = (e) => crypto.getRandomValues(new Uint8Array(e)), Ze = (e, t, n) => {
467
465
  for (; s--;) if (t[s] < r && (o += e[t[s] % e.length], o.length >= a)) return o;
468
466
  }
469
467
  };
470
- }, Qe = (e, t = 21) => Ze(e, t | 0, Xe);
468
+ }, rt = (e, t = 21) => nt(e, t | 0, tt);
471
469
  //#endregion
472
470
  //#region src/flow/common/edgeChanges.ts
473
- function $e(e, t, n) {
471
+ function it(e, t, n) {
474
472
  let r = {
475
473
  source: n.source,
476
474
  sourceHandle: n.sourceHandle,
477
475
  target: n.target,
478
476
  targetHandle: n.targetHandle
479
- }, i = tt(e, t)?.nodes[n.target], a = i != null && "inputs" in i ? i.inputs[n.targetHandle] : void 0;
480
- return a?.kind == "sources" && a.sources.some((e) => e.kind == "node" && e.nodeId == n.source && e.output == n.sourceHandle) ? [] : fe(e, [{
477
+ }, i = ot(e, t)?.nodes[n.target], a = i != null && "inputs" in i ? i.inputs[n.targetHandle] : void 0;
478
+ return a?.kind == "sources" && a.sources.some((e) => e.kind == "node" && e.nodeId == n.source && e.output == n.sourceHandle) ? [] : De(e, [{
481
479
  edge: r,
482
480
  kind: "graph.edge.connect",
483
481
  target: t
484
482
  }]);
485
483
  }
486
- function et(e, t, n) {
484
+ function at(e, t, n) {
487
485
  let r = {
488
486
  source: n.source,
489
487
  sourceHandle: n.sourceHandle,
490
488
  target: n.target,
491
489
  targetHandle: n.targetHandle
492
- }, i = tt(e, t)?.nodes[n.target], a = i != null && "inputs" in i ? i.inputs[n.targetHandle] : void 0;
490
+ }, i = ot(e, t)?.nodes[n.target], a = i != null && "inputs" in i ? i.inputs[n.targetHandle] : void 0;
493
491
  return a?.kind != "sources" || !a.sources.some((e) => e.kind == "node" && e.nodeId == n.source && e.output == n.sourceHandle) ? [] : [{
494
492
  edge: r,
495
493
  kind: "graph.edge.disconnect",
496
494
  target: t
497
495
  }];
498
496
  }
499
- function tt(e, t) {
497
+ function ot(e, t) {
500
498
  return t.kind == "flow" ? e.document.graph : e.document.subflows[t.id]?.graph;
501
499
  }
502
500
  //#endregion
503
501
  //#region src/flow/common/moduleChanges.ts
504
- async function nt(e) {
502
+ async function st(e) {
505
503
  try {
506
504
  let { parse: t } = await import("./lib-C5Ipyfps.js").then((e) => e.t), n = t(e, {
507
505
  errorRecovery: !0,
@@ -517,7 +515,7 @@ async function nt(e) {
517
515
  return [];
518
516
  }
519
517
  }
520
- function rt(e, t, n) {
518
+ function ct(e, t, n) {
521
519
  return [{
522
520
  imports: n,
523
521
  kind: "module.source.replace",
@@ -525,7 +523,7 @@ function rt(e, t, n) {
525
523
  source: t
526
524
  }];
527
525
  }
528
- var it = Qe("23456789abcdefghjkmnpqrstuvwxyz", 10), K = {
526
+ var lt = rt("23456789abcdefghjkmnpqrstuvwxyz", 10), K = {
529
527
  activities: [],
530
528
  activitiesLoadFailed: !1,
531
529
  activitiesLoading: !1,
@@ -538,24 +536,24 @@ var it = Qe("23456789abcdefghjkmnpqrstuvwxyz", 10), K = {
538
536
  loadingMore: !1,
539
537
  publications: [],
540
538
  publishing: !1
541
- }, at = 20, ot = 50, st = 750;
539
+ }, ut = 20, dt = 50, ft = 750;
542
540
  function q(e, t) {
543
541
  return e?.flowId == t.flowId;
544
542
  }
545
- var ct = class {
543
+ var pt = class {
546
544
  #e;
547
545
  #t;
548
546
  #n;
549
- #r = new x();
550
- #i = new x();
547
+ #r = new F();
548
+ #i = new F();
551
549
  #a;
552
- #o = new x();
553
- #s = new x();
550
+ #o = new F();
551
+ #s = new F();
554
552
  #c;
555
553
  #l = t(K);
556
554
  #u;
557
555
  #d;
558
- constructor(t, n, r, i, a = () => crypto.randomUUID(), o = E()) {
556
+ constructor(t, n, r, i, a = () => crypto.randomUUID(), o = L()) {
559
557
  this.#e = t, this.#t = a, this.#n = o, this.#a = i, this.#c = r, this.#u = n, this.$ = {
560
558
  activities: e(this.#l, (e) => e.activities),
561
559
  activitiesLoadFailed: e(this.#l, (e) => e.activitiesLoadFailed),
@@ -618,7 +616,7 @@ var ct = class {
618
616
  this.#y({
619
617
  loadFailed: !0,
620
618
  loading: !1
621
- }), this.#c(B(e, this.#n.t));
619
+ }), this.#c(D(e, this.#n.t));
622
620
  }
623
621
  }
624
622
  async loadMore() {
@@ -632,7 +630,7 @@ var ct = class {
632
630
  try {
633
631
  let e = await this.#e.listPublications(n.flowId, {
634
632
  cursor: t,
635
- limit: ot
633
+ limit: dt
636
634
  });
637
635
  if (!r()) return;
638
636
  let i = new Set(this.#l.value.publications.map((e) => e.publicationId));
@@ -647,7 +645,7 @@ var ct = class {
647
645
  this.#y({
648
646
  loadMoreFailed: !0,
649
647
  loadingMore: !1
650
- }), this.#c(B(e, this.#n.t));
648
+ }), this.#c(D(e, this.#n.t));
651
649
  }
652
650
  }
653
651
  async publish() {
@@ -670,7 +668,7 @@ var ct = class {
670
668
  publishing: i.status == "pending"
671
669
  }), await this.#g(n, i, o, e.name)) : !1;
672
670
  } catch (e) {
673
- return o() ? (e instanceof P && e.code == "live.conflict" && await this.#p(n), this.#c(B(e, this.#n.t)), !1) : !1;
671
+ return o() ? (e instanceof z && e.code == "live.conflict" && await this.#p(n), this.#c(D(e, this.#n.t)), !1) : !1;
674
672
  } finally {
675
673
  o() && this.#y({ publishing: !1 });
676
674
  }
@@ -694,7 +692,7 @@ var ct = class {
694
692
  message: this.#n.t("notice.rolledBack", { revision: e.revisionId })
695
693
  }), !0);
696
694
  } catch (e) {
697
- return s() ? (e instanceof P && e.code == "live.conflict" && await this.#p(r), this.#c(B(e, this.#n.t)), !1) : !1;
695
+ return s() ? (e instanceof z && e.code == "live.conflict" && await this.#p(r), this.#c(D(e, this.#n.t)), !1) : !1;
698
696
  } finally {
699
697
  s() && this.#y({ rollingBackPublicationId: void 0 });
700
698
  }
@@ -729,13 +727,13 @@ var ct = class {
729
727
  testingTriggerId: void 0,
730
728
  testResult: void 0
731
729
  });
732
- let [r, i] = await Promise.allSettled([this.#e.getFlowTriggerBinding(t.flowId, e), this.#e.listFlowTriggerActivities(t.flowId, e, { limit: at })]);
730
+ let [r, i] = await Promise.allSettled([this.#e.getFlowTriggerBinding(t.flowId, e), this.#e.listFlowTriggerActivities(t.flowId, e, { limit: ut })]);
733
731
  if (n()) {
734
732
  if (r.status == "rejected") {
735
733
  this.#y({
736
734
  activitiesLoading: !1,
737
735
  detailLoading: !1
738
- }), this.#c(B(r.reason, this.#n.t));
736
+ }), this.#c(D(r.reason, this.#n.t));
739
737
  return;
740
738
  }
741
739
  this.#y({
@@ -749,7 +747,7 @@ var ct = class {
749
747
  }) : (this.#y({
750
748
  activitiesLoadFailed: !0,
751
749
  activitiesLoading: !1
752
- }), this.#c(B(i.reason, this.#n.t)));
750
+ }), this.#c(D(i.reason, this.#n.t)));
753
751
  }
754
752
  }
755
753
  async loadMoreTriggerActivities() {
@@ -763,7 +761,7 @@ var ct = class {
763
761
  try {
764
762
  let e = await this.#e.listFlowTriggerActivities(r.flowId, n, {
765
763
  cursor: t,
766
- limit: at
764
+ limit: ut
767
765
  });
768
766
  if (!i() || this.#l.value.selectedTriggerId != n) return;
769
767
  let a = new Set(this.#l.value.activities.map((e) => e.activityId));
@@ -778,7 +776,7 @@ var ct = class {
778
776
  this.#y({
779
777
  activitiesLoadFailed: !0,
780
778
  activitiesLoadingMore: !1
781
- }), this.#c(B(e, this.#n.t));
779
+ }), this.#c(D(e, this.#n.t));
782
780
  }
783
781
  }
784
782
  async testTrigger() {
@@ -793,7 +791,7 @@ var ct = class {
793
791
  let e = await this.#e.testFlowPollTrigger(n.flowId, t);
794
792
  return !i() || this.#l.value.selectedTriggerId != t ? !1 : (this.#y({ testResult: e }), !0);
795
793
  } catch (e) {
796
- return i() && this.#l.value.selectedTriggerId == t && this.#c(B(e, this.#n.t)), !1;
794
+ return i() && this.#l.value.selectedTriggerId == t && this.#c(D(e, this.#n.t)), !1;
797
795
  } finally {
798
796
  i() && this.#l.value.selectedTriggerId == t && this.#y({ testingTriggerId: void 0 });
799
797
  }
@@ -811,7 +809,7 @@ var ct = class {
811
809
  message: this.#n.t(e.operatorState == "active" ? "notice.triggerPaused" : "notice.triggerResumed")
812
810
  }), !0) : !1;
813
811
  } catch (e) {
814
- return n() && this.#c(B(e, this.#n.t)), !1;
812
+ return n() && this.#c(D(e, this.#n.t)), !1;
815
813
  } finally {
816
814
  n() && this.#y({ changingTriggerId: void 0 });
817
815
  }
@@ -839,7 +837,7 @@ var ct = class {
839
837
  this.#e.getLive(e.flowId),
840
838
  this.#e.listPublications(e.flowId, {
841
839
  includeTotal: !0,
842
- limit: ot
840
+ limit: dt
843
841
  }),
844
842
  this.#e.listFlowTriggerBindings(e.flowId)
845
843
  ]);
@@ -849,7 +847,7 @@ var ct = class {
849
847
  if (t != null && t != "") try {
850
848
  return await this.#e.getPublishOperation(e.flowId, t);
851
849
  } catch (t) {
852
- if (t instanceof P && t.code == "publication.operation-not-found") {
850
+ if (t instanceof z && t.code == "publication.operation-not-found") {
853
851
  this.#a.setItem(this.#_(e.flowId), "");
854
852
  return;
855
853
  }
@@ -859,16 +857,16 @@ var ct = class {
859
857
  async #g(e, t, n, r) {
860
858
  let i = t;
861
859
  for (; i.status == "pending";) {
862
- if (await new Promise((e) => setTimeout(e, st)), !n()) return !1;
860
+ if (await new Promise((e) => setTimeout(e, ft)), !n()) return !1;
863
861
  try {
864
862
  i = await this.#e.getPublishOperation(e.flowId, i.operationId);
865
863
  } catch (t) {
866
864
  if (!n()) return !1;
867
- if (t instanceof P && t.code == "publication.operation-not-found") return this.#a.setItem(this.#_(e.flowId), ""), this.#v(e, {
865
+ if (t instanceof z && t.code == "publication.operation-not-found") return this.#a.setItem(this.#_(e.flowId), ""), this.#v(e, {
868
866
  operation: void 0,
869
867
  publishing: !1
870
- }), this.#c(B(t, this.#n.t)), !1;
871
- this.#c(B(t, this.#n.t));
868
+ }), this.#c(D(t, this.#n.t)), !1;
869
+ this.#c(D(t, this.#n.t));
872
870
  continue;
873
871
  }
874
872
  if (!n()) return !1;
@@ -884,7 +882,7 @@ var ct = class {
884
882
  try {
885
883
  await this.#f(e);
886
884
  } catch (e) {
887
- return n() && this.#c(B(e, this.#n.t)), !0;
885
+ return n() && this.#c(D(e, this.#n.t)), !0;
888
886
  }
889
887
  return n() ? (this.#c({
890
888
  kind: "success",
@@ -907,24 +905,29 @@ var ct = class {
907
905
  ...e
908
906
  });
909
907
  }
910
- }, lt = { starting: !1 };
911
- function ut(e) {
908
+ }, mt = { starting: !1 };
909
+ function ht(e) {
912
910
  switch (e.kind) {
913
911
  case "condition": return { [e.node.input.handle]: e.node.input };
914
- case "subflow": return s(e.definition?.inputs ?? []);
915
- case "task": return s(e.definition?.inputs ?? []);
912
+ case "subflow": return h(e.definition?.inputs ?? []);
913
+ case "task": return h(e.definition?.inputs ?? []);
916
914
  case "value": return {};
915
+ case "wait": return { value: {
916
+ jsonSchema: {},
917
+ nullable: !0,
918
+ value: null
919
+ } };
917
920
  }
918
921
  }
919
- function dt(e) {
922
+ function gt(e) {
920
923
  return e.node.name == null ? e.kind == "task" || e.kind == "subflow" ? e.definition?.name ?? e.id : e.id : e.node.name;
921
924
  }
922
- async function ft(e, t) {
923
- let { FlowRunInputEditorStore: n } = await import("./flowRunInputEditorStore-BeyUSWpO.js").then((e) => e.n), r = N(e), i = r.graph({ kind: "flow" });
925
+ async function _t(e, t) {
926
+ let { FlowRunInputEditorStore: n } = await import("./flowRunInputEditorStore-BYa8zFLC.js").then((e) => e.r), r = I(e), i = r.graph({ kind: "flow" });
924
927
  return i == null ? [] : Object.entries(i.nodes).toSorted(([e], [t]) => e.localeCompare(t)).flatMap(([e, i]) => {
925
928
  let a = r.resolveNode(e, i);
926
929
  if (a.kind == "trigger") return [];
927
- let o = Object.entries(ut(a)).filter(([e, t]) => a.node.inputs[e] == null && !Object.hasOwn(t, "value")).toSorted(([e], [t]) => e.localeCompare(t)).map(([e, t]) => Object.assign({
930
+ let o = Object.entries(ht(a)).filter(([e, t]) => a.node.inputs[e] == null && !Object.hasOwn(t, "value")).toSorted(([e], [t]) => e.localeCompare(t)).map(([e, t]) => Object.assign({
928
931
  handle: e,
929
932
  jsonSchema: t.jsonSchema,
930
933
  nullable: t.nullable
@@ -932,21 +935,21 @@ async function ft(e, t) {
932
935
  return o.length == 0 ? [] : [{
933
936
  editor: new n(o, t),
934
937
  nodeId: e,
935
- title: dt(a)
938
+ title: gt(a)
936
939
  }];
937
940
  });
938
941
  }
939
- var pt = class {
942
+ var vt = class {
940
943
  #e;
941
944
  #t;
942
945
  #n;
943
- #r = new x();
944
- #i = new x();
946
+ #r = new F();
947
+ #i = new F();
945
948
  #a;
946
949
  #o;
947
- #s = t(lt);
950
+ #s = t(mt);
948
951
  #c;
949
- constructor(t, n, r, i = E(), a = () => crypto.randomUUID()) {
952
+ constructor(t, n, r, i = L(), a = () => crypto.randomUUID()) {
950
953
  this.#e = t, this.#a = n, this.#o = r, this.#n = i, this.#t = a, this.$ = {
951
954
  inputRequest: e(this.#s, (e) => e.inputRequest),
952
955
  starting: e(this.#s, (e) => e.starting),
@@ -961,7 +964,7 @@ var pt = class {
961
964
  reset() {
962
965
  this.#r.invalidate(), this.#i.invalidate(), this.#c = void 0;
963
966
  let e = this.#s.value.inputRequest;
964
- this.#s.set(lt), this.#d(e);
967
+ this.#s.set(mt), this.#d(e);
965
968
  }
966
969
  async requestDraft(e, t) {
967
970
  let n = this.#i.begin();
@@ -976,7 +979,7 @@ var pt = class {
976
979
  let r = await this.#e.getRevision(e.flowId, n.revisionId);
977
980
  return t() ? await this.#l("live", e, r, n.revisionId, t, n.publicationId) : "unavailable";
978
981
  } catch (e) {
979
- return t() && this.#o(B(e, this.#n.t)), "unavailable";
982
+ return t() && this.#o(D(e, this.#n.t)), "unavailable";
980
983
  } finally {
981
984
  t() && this.#f({ starting: !1 });
982
985
  }
@@ -1004,7 +1007,7 @@ var pt = class {
1004
1007
  }), this.#d(s);
1005
1008
  let c;
1006
1009
  try {
1007
- c = await ft(r, this.#n.lang$);
1010
+ c = await _t(r, this.#n.lang$);
1008
1011
  } catch (e) {
1009
1012
  throw a() && this.#f({
1010
1013
  starting: !1,
@@ -1060,7 +1063,7 @@ var pt = class {
1060
1063
  });
1061
1064
  return !a() || !o() ? !1 : (this.#c = void 0, this.#a.follow(s, o));
1062
1065
  } catch (e) {
1063
- return a() && o() && this.#o(B(e, this.#n.t)), !1;
1066
+ return a() && o() && this.#o(D(e, this.#n.t)), !1;
1064
1067
  } finally {
1065
1068
  a() && this.#f({
1066
1069
  starting: !1,
@@ -1080,11 +1083,11 @@ var pt = class {
1080
1083
  ...e
1081
1084
  });
1082
1085
  }
1083
- }, mt = {
1086
+ }, yt = {
1084
1087
  actions: {},
1085
1088
  catalogs: {}
1086
1089
  };
1087
- function ht(e) {
1090
+ function bt(e) {
1088
1091
  return Object.entries(e).map(([e, t]) => ({
1089
1092
  description: t.description,
1090
1093
  handle: e,
@@ -1099,15 +1102,15 @@ function J(e, t) {
1099
1102
  service: e.serviceName
1100
1103
  }) : e.description,
1101
1104
  group: t("addNode.connectorActions"),
1102
- icon: e.icon ?? ":carbon:connection-signal:",
1105
+ icon: T(e),
1103
1106
  id: `connector:${e.actionId}`,
1104
- inputs: ht(e.inputs),
1107
+ inputs: bt(e.inputs),
1105
1108
  kind: "connector",
1106
1109
  label: e.name,
1107
- outputs: ht(e.outputs)
1110
+ outputs: bt(e.outputs)
1108
1111
  };
1109
1112
  }
1110
- function gt(e, t) {
1113
+ function xt(e, t) {
1111
1114
  let n = /* @__PURE__ */ new Map();
1112
1115
  for (let t of e) {
1113
1116
  let e = n.get(t.serviceId) ?? [];
@@ -1126,7 +1129,7 @@ function gt(e, t) {
1126
1129
  choices: r,
1127
1130
  description: t(r.length == 1 ? "addNode.connectorActionCountOne" : "addNode.connectorActionCount", { count: r.length }),
1128
1131
  group: t("addNode.connectorActions"),
1129
- icon: n.icon ?? ":carbon:connection-signal:",
1132
+ icon: T(n),
1130
1133
  id: `connector-provider:${n.serviceId}`,
1131
1134
  inputs: [],
1132
1135
  kind: "connector-group",
@@ -1136,12 +1139,12 @@ function gt(e, t) {
1136
1139
  };
1137
1140
  });
1138
1141
  }
1139
- function _t(e, t) {
1142
+ function St(e, t) {
1140
1143
  return {
1141
1144
  choices: [],
1142
1145
  description: t("addNode.connectorBrowseActions"),
1143
1146
  group: t("addNode.connectorActions"),
1144
- icon: e.icon ?? ":carbon:connection-signal:",
1147
+ icon: T(e),
1145
1148
  id: `connector-provider:${e.serviceId}`,
1146
1149
  inputs: [],
1147
1150
  kind: "connector-group",
@@ -1150,17 +1153,39 @@ function _t(e, t) {
1150
1153
  serviceId: e.serviceId
1151
1154
  };
1152
1155
  }
1153
- function vt(e) {
1154
- if (e?.kind != "task" || e.node.task != null) return;
1155
- let t = e.definition;
1156
- if (!(t == null || !("executor" in t) || t.executor.kind != "connector")) return {
1157
- actionId: t.executor.action,
1158
- connectionId: t.executor.connectionId,
1156
+ function Ct(e, t) {
1157
+ if (e == null) return;
1158
+ let n = e.kind == "wait" ? e.node.notification?.taskId : e.kind == "task" && e.node.task == null ? e.node.taskId : void 0;
1159
+ if (n == null) return;
1160
+ let r = e.kind == "task" ? e.definition : t?.task(n);
1161
+ if (!(r == null || !("executor" in r) || r.executor.kind != "connector")) return {
1162
+ actionId: r.executor.action,
1163
+ connectionId: r.executor.connectionId,
1159
1164
  nodeId: e.id,
1160
- taskId: e.node.taskId
1165
+ taskId: n
1161
1166
  };
1162
1167
  }
1163
- var yt = class {
1168
+ function wt(e, t, n) {
1169
+ if (e == null) return [];
1170
+ let r = [];
1171
+ for (let i of [...O(e.revision.content).tasks].toSorted()) {
1172
+ let a = e.task(i);
1173
+ if (a?.executor.kind != "connector") continue;
1174
+ let o = t[a.executor.action];
1175
+ if (o?.authenticated != 1) continue;
1176
+ let s = a.executor.connectionId == null ? void 0 : n[o.serviceId]?.byId.get(a.executor.connectionId);
1177
+ s == null && o.defaultConnection?.connectionId == a.executor.connectionId && (s = o.defaultConnection), (a.executor.connectionId == null || n[o.serviceId] != null && s?.status != "active") && r.push({
1178
+ code: "task.connector-connection-required",
1179
+ column: 0,
1180
+ line: 1,
1181
+ message: `Connector Task "${i}" requires an active Connection.`,
1182
+ path: `/document/tasks/${i}/executor/connectionId`,
1183
+ values: { taskId: i }
1184
+ });
1185
+ }
1186
+ return r;
1187
+ }
1188
+ var Tt = class {
1164
1189
  #e;
1165
1190
  #t;
1166
1191
  #n;
@@ -1176,43 +1201,44 @@ var yt = class {
1176
1201
  #f;
1177
1202
  #p;
1178
1203
  #m;
1179
- constructor(r, i, a, o, s = E()) {
1180
- this.#r = /* @__PURE__ */ new Map(), this.#i = /* @__PURE__ */ new Set(), this.#a = new x(), this.#u = t(mt), this.#m = !1, this.browseAddNodeOptions = async (e) => {
1181
- if (this.#m) return;
1182
- let t = this.#d.$.flowId.value;
1204
+ #h;
1205
+ constructor(r, i, a, o, s = L()) {
1206
+ this.#r = /* @__PURE__ */ new Map(), this.#i = /* @__PURE__ */ new Set(), this.#a = new F(), this.#o = new F(), this.#d = t(yt), this.#h = !1, this.browseAddNodeOptions = async (e) => {
1207
+ if (this.#h) return;
1208
+ let t = this.#f.$.flowId.value;
1183
1209
  if (t == null) return;
1184
- let n = this.#p ?? await this.#e.listConnectorProviders(e, t);
1185
- if (!(e.aborted || this.#m || t != this.#d.$.flowId.value)) return this.#p = n, n.toSorted((e, t) => e.serviceName.localeCompare(t.serviceName)).map((e) => _t(e, this.#t.t));
1210
+ let n = this.#m ?? await this.#e.listConnectorProviders(e, t);
1211
+ if (!(e.aborted || this.#h || t != this.#f.$.flowId.value)) return this.#m = n, n.toSorted((e, t) => e.serviceName.localeCompare(t.serviceName)).map((e) => St(e, this.#t.t));
1186
1212
  }, this.provideAddNodeOptionChoices = async (e, t) => {
1187
- if (this.#m) return;
1188
- let n = this.#d.$.flowId.value, r = this.#p?.find((t) => `connector-provider:${t.serviceId}` == e);
1213
+ if (this.#h) return;
1214
+ let n = this.#f.$.flowId.value, r = this.#m?.find((t) => `connector-provider:${t.serviceId}` == e);
1189
1215
  if (n == null || r == null) return;
1190
1216
  let i = this.#r.get(r.serviceId) ?? await this.#e.listConnectorActions(r.serviceId, t, n);
1191
- if (t.aborted || this.#m || n != this.#d.$.flowId.value) return;
1217
+ if (t.aborted || this.#h || n != this.#f.$.flowId.value) return;
1192
1218
  let a = i.map((e) => Object.assign({}, e, e.icon == null && r.icon != null ? { icon: r.icon } : {}, { serviceName: r.serviceName }));
1193
- return this.#r.set(r.serviceId, a), this.#y({ actions: {
1194
- ...this.#u.value.actions,
1219
+ return this.#r.set(r.serviceId, a), this.#b({ actions: {
1220
+ ...this.#d.value.actions,
1195
1221
  ...Object.fromEntries(a.map((e) => [e.actionId, e]))
1196
1222
  } }), a.map((e) => J(e, this.#t.t));
1197
1223
  }, this.provideAddNodeOptions = async (e, t) => {
1198
- if (this.#m) return;
1199
- let n = this.#d.$.flowId.value;
1224
+ if (this.#h) return;
1225
+ let n = this.#f.$.flowId.value;
1200
1226
  if (n == null) return;
1201
- let r = e.trim(), i = r.length == 0 ? Object.values(this.#u.value.actions) : await this.#e.searchConnectorActions(r, t, n);
1202
- if (t.aborted || this.#m || n != this.#d.$.flowId.value) return;
1203
- let a = { ...this.#u.value.actions };
1227
+ let r = e.trim(), i = r.length == 0 ? Object.values(this.#d.value.actions) : await this.#e.searchConnectorActions(r, t, n);
1228
+ if (t.aborted || this.#h || n != this.#f.$.flowId.value) return;
1229
+ let a = { ...this.#d.value.actions };
1204
1230
  for (let e of i) a[e.actionId] = e;
1205
- if (this.#y({ actions: a }), r.length != 0) return i.map((e) => J(e, this.#t.t));
1231
+ if (this.#b({ actions: a }), r.length != 0) return i.map((e) => J(e, this.#t.t));
1206
1232
  let o = new Map(i.map((e) => [e.actionId, e]));
1207
- for (let e of this.#d.$.revision.value?.connectorActionIds ?? []) {
1233
+ for (let e of this.#f.$.revision.value?.connectorActionIds ?? []) {
1208
1234
  let t = a[e];
1209
1235
  t != null && o.set(e, t);
1210
1236
  }
1211
- return gt([...o.values()], this.#t.t);
1212
- }, this.#e = r, this.#n = o, this.#d = i, this.#l = a, this.#t = s;
1213
- let c = e(this.#u, (e) => e.actions), l = e(this.#u, (e) => e.catalogs);
1214
- this.#c = n((e) => {
1215
- let t = vt(e(i.$.selection)), n = e(this.#u);
1237
+ return xt([...o.values()], this.#t.t);
1238
+ }, this.#e = r, this.#n = o, this.#f = i, this.#u = a, this.#t = s;
1239
+ let c = e(this.#d, (e) => e.actions), l = e(this.#d, (e) => e.catalogs);
1240
+ this.#l = n((e) => {
1241
+ let t = Ct(e(i.$.selection), e(i.$.revision)), n = e(this.#d);
1216
1242
  if (t == null) return { authorizationPending: !1 };
1217
1243
  let r = n.actions[t.actionId], a = r == null ? void 0 : n.catalogs[r.serviceId], o = t.connectionId == null ? void 0 : a?.byId.get(t.connectionId);
1218
1244
  return o == null && r?.defaultConnection?.connectionId == t.connectionId && (o = r.defaultConnection), {
@@ -1224,156 +1250,166 @@ var yt = class {
1224
1250
  connectionError: r != null && n.connectionError?.serviceId == r.serviceId ? n.connectionError.message : void 0
1225
1251
  };
1226
1252
  }), this.$ = {
1227
- actionLoading: e(this.#u, (e) => e.actionLoading),
1253
+ actionLoading: e(this.#d, (e) => e.actionLoading),
1228
1254
  actions: c,
1229
1255
  catalogs: l,
1230
- connectionLoading: e(this.#u, (e) => e.connectionLoading),
1231
- selectedAction: e(this.#c, (e) => e.action),
1232
- selectedActionError: e(this.#c, (e) => e.actionError),
1233
- selectedActiveConnections: e(this.#c, (e) => e.activeConnections),
1234
- selectedAuthorizationPending: e(this.#c, (e) => e.authorizationPending),
1235
- selectedConnection: e(this.#c, (e) => e.connection),
1236
- selectedConnectionError: e(this.#c, (e) => e.connectionError)
1237
- }, this.#o = i.$.flowId.reaction(() => this.reset()), this.#s = i.$.revision.reaction(() => void this.#x());
1256
+ connectionLoading: e(this.#d, (e) => e.connectionLoading),
1257
+ diagnostics: n((e) => wt(e(i.$.revision), e(c), e(l))),
1258
+ selectedAction: e(this.#l, (e) => e.action),
1259
+ selectedActionError: e(this.#l, (e) => e.actionError),
1260
+ selectedActiveConnections: e(this.#l, (e) => e.activeConnections),
1261
+ selectedAuthorizationPending: e(this.#l, (e) => e.authorizationPending),
1262
+ selectedConnection: e(this.#l, (e) => e.connection),
1263
+ selectedConnectionError: e(this.#l, (e) => e.connectionError)
1264
+ }, this.#s = i.$.flowId.reaction(() => this.reset()), this.#c = i.$.revision.reaction(() => void this.#S());
1238
1265
  }
1239
1266
  dispose() {
1240
- this.#m = !0, this.#a.invalidate(), this.#o(), this.#s();
1267
+ this.#h = !0, this.#a.invalidate(), this.#o.invalidate(), this.#s(), this.#c();
1241
1268
  for (let e of Object.values(this.$)) e.dispose();
1242
- this.#c.dispose(), this.#u.dispose();
1269
+ this.#l.dispose(), this.#d.dispose();
1243
1270
  }
1244
1271
  reset() {
1245
- this.#m || (this.#a.invalidate(), this.#f = void 0, this.#r.clear(), this.#p = void 0, this.#i.clear(), this.#u.set(mt));
1272
+ this.#h || (this.#a.invalidate(), this.#o.invalidate(), this.#p = void 0, this.#r.clear(), this.#m = void 0, this.#i.clear(), this.#d.set(yt));
1246
1273
  }
1247
1274
  async refresh(e = !1) {
1248
- if (this.#m) return;
1249
- let t = this.#a.begin(), n = this.#d.$.flowId.value, r = vt(this.#d.$.selection.value);
1275
+ if (this.#h) return;
1276
+ let t = this.#o.begin(), n = this.#f.$.flowId.value, r = Ct(this.#f.$.selection.value, this.#f.$.revision.value);
1250
1277
  if (n == null || r == null) {
1251
- (this.#u.value.actionLoading != null || this.#u.value.connectionLoading != null) && this.#y({
1278
+ (this.#d.value.actionLoading != null || this.#d.value.connectionLoading != null) && this.#b({
1252
1279
  actionLoading: void 0,
1253
1280
  connectionLoading: void 0
1254
1281
  });
1255
1282
  return;
1256
1283
  }
1257
- this.#y({
1284
+ this.#b({
1258
1285
  actionError: void 0,
1259
1286
  actionLoading: r.actionId,
1260
1287
  connectionError: void 0,
1261
1288
  connectionLoading: void 0
1262
1289
  });
1263
1290
  try {
1264
- let i = await this.#h(r.actionId, e);
1265
- if (!this.#b(t, n)) return;
1266
- this.#y({ actions: {
1267
- ...this.#u.value.actions,
1291
+ let i = await this.#g(r.actionId, e);
1292
+ if (!this.#x(t, n)) return;
1293
+ this.#b({ actions: {
1294
+ ...this.#d.value.actions,
1268
1295
  [i.actionId]: i
1269
- } }), i.authenticated && await this.#g(n, r, i.serviceId, e, t);
1296
+ } }), i.authenticated && await this.#_(n, r, i.serviceId, e, t);
1270
1297
  } catch (e) {
1271
- this.#b(t, n) && this.#y({ actionError: {
1298
+ this.#x(t, n) && this.#b({ actionError: {
1272
1299
  actionId: r.actionId,
1273
- message: B(e, this.#t.t).message
1300
+ message: D(e, this.#t.t).message
1274
1301
  } });
1275
1302
  } finally {
1276
- this.#b(t, n) && this.#u.value.actionLoading == r.actionId && this.#y({ actionLoading: void 0 });
1303
+ this.#x(t, n) && this.#d.value.actionLoading == r.actionId && this.#b({ actionLoading: void 0 });
1277
1304
  }
1278
1305
  }
1279
1306
  async connect(e) {
1280
- if (this.#m) return;
1281
- let t = this.#d.$.flowId.value;
1307
+ if (this.#h) return;
1308
+ let t = this.#f.$.flowId.value;
1282
1309
  if (t == null) return;
1283
- let n = this.#u.value.catalogs[e];
1310
+ let n = this.#d.value.catalogs[e];
1284
1311
  try {
1285
1312
  if (!await this.#n.openExternalPage(() => this.#e.createConnectorConnectionPage(e, t))) {
1286
- this.#l({
1313
+ this.#u({
1287
1314
  kind: "error",
1288
1315
  message: this.#t.t("notice.connectionPopupBlocked")
1289
1316
  });
1290
1317
  return;
1291
1318
  }
1292
- if (this.#m || t != this.#d.$.flowId.value) return;
1293
- this.#f = {
1319
+ if (this.#h || t != this.#f.$.flowId.value) return;
1320
+ this.#p = {
1294
1321
  connectionIds: new Set(n?.all.map((e) => e.connectionId)),
1295
1322
  serviceId: e
1296
- }, this.#y({ authorizationServiceId: e });
1323
+ }, this.#b({ authorizationServiceId: e });
1297
1324
  } catch (e) {
1298
- this.#m || this.#l(B(e, this.#t.t));
1325
+ this.#h || this.#u(D(e, this.#t.t));
1299
1326
  }
1300
1327
  }
1301
1328
  async setConnection(e, t) {
1302
- return await this.#d.setConnectorConnection(e, t);
1329
+ return await this.#f.setConnectorConnection(e, t);
1303
1330
  }
1304
1331
  async refreshAfterAuthorization() {
1305
- if (this.#m || this.#f == null) return;
1306
- let e = this.#f.serviceId;
1307
- this.#r.delete(e), this.#y({ authorizationServiceId: void 0 }), this.$.selectedAction.value?.serviceId == e && await this.refresh(!0), !this.#m && this.#f?.serviceId == e && (this.#f = void 0);
1332
+ if (this.#h || this.#p == null) return;
1333
+ let e = this.#p.serviceId;
1334
+ this.#r.delete(e), this.#b({ authorizationServiceId: void 0 }), this.$.selectedAction.value?.serviceId == e && await this.refresh(!0), !this.#h && this.#p?.serviceId == e && (this.#p = void 0);
1308
1335
  }
1309
- async #h(e, t) {
1310
- let n = this.#u.value.actions[e];
1311
- return !t && n != null ? n : await this.#e.getConnectorAction(e, void 0, this.#d.$.flowId.value);
1336
+ async #g(e, t) {
1337
+ let n = this.#d.value.actions[e];
1338
+ return !t && n != null ? n : await this.#e.getConnectorAction(e, void 0, this.#f.$.flowId.value);
1312
1339
  }
1313
- async #g(e, t, n, r, i) {
1314
- this.#y({ connectionLoading: n });
1340
+ async #_(e, t, n, r, i) {
1341
+ this.#b({ connectionLoading: n });
1315
1342
  try {
1316
- let a = await this.#_(e, n, r, i);
1317
- if (a == null || !this.#b(i, e)) return;
1318
- await this.#v(t, n, a);
1343
+ let a = await this.#v(e, n, r, i);
1344
+ if (a == null || !this.#x(i, e)) return;
1345
+ await this.#y(t, n, a);
1319
1346
  } finally {
1320
- this.#b(i, e) && this.#u.value.connectionLoading == n && this.#y({ connectionLoading: void 0 });
1347
+ this.#x(i, e) && this.#d.value.connectionLoading == n && this.#b({ connectionLoading: void 0 });
1321
1348
  }
1322
1349
  }
1323
- async #_(e, t, n, r) {
1324
- let i = this.#u.value.catalogs[t];
1350
+ async #v(e, t, n, r) {
1351
+ let i = this.#d.value.catalogs[t];
1325
1352
  if (!n && i != null) return i;
1326
1353
  let a;
1327
1354
  try {
1328
1355
  a = await this.#e.listConnectorConnections(t, void 0, e);
1329
1356
  } catch (n) {
1330
- this.#b(r, e) && this.#y({ connectionError: {
1331
- message: B(n, this.#t.t).message,
1357
+ this.#x(r, e) && this.#b({ connectionError: {
1358
+ message: D(n, this.#t.t).message,
1332
1359
  serviceId: t
1333
1360
  } });
1334
1361
  return;
1335
1362
  }
1336
- if (!this.#b(r, e)) return;
1337
- let o = w(a);
1338
- return this.#y({ catalogs: {
1339
- ...this.#u.value.catalogs,
1363
+ if (!this.#x(r, e)) return;
1364
+ let o = C(a);
1365
+ return this.#b({ catalogs: {
1366
+ ...this.#d.value.catalogs,
1340
1367
  [t]: o
1341
1368
  } }), o;
1342
1369
  }
1343
- async #v(e, t, n) {
1344
- let r = this.#f?.serviceId == t ? this.#f : void 0, i = r == null ? [] : n.active.filter((e) => !r.connectionIds.has(e.connectionId)), a = i.length == 1 ? i[0] : n.preferred, o = this.#d.$.revision.value?.task(e.taskId);
1345
- a != null && this.#d.$.selectedNodeIds.value.includes(e.nodeId) && o != null && "executor" in o && o.executor.kind == "connector" && o.executor.connectionId == null && await this.#d.setConnectorConnection(e.taskId, a.connectionId);
1370
+ async #y(e, t, n) {
1371
+ let r = this.#p?.serviceId == t ? this.#p : void 0, i = r == null ? [] : n.active.filter((e) => !r.connectionIds.has(e.connectionId)), a = i.length == 1 ? i[0] : n.preferred, o = this.#f.$.revision.value?.task(e.taskId);
1372
+ a != null && this.#f.$.selectedNodeIds.value.includes(e.nodeId) && o != null && "executor" in o && o.executor.kind == "connector" && o.executor.connectionId == null && await this.#f.setConnectorConnection(e.taskId, a.connectionId);
1346
1373
  }
1347
- #y(e) {
1348
- this.#m || this.#u.set({
1349
- ...this.#u.value,
1374
+ #b(e) {
1375
+ this.#h || this.#d.set({
1376
+ ...this.#d.value,
1350
1377
  ...e
1351
1378
  });
1352
1379
  }
1353
- #b(e, t) {
1354
- return !this.#m && e() && t == this.#d.$.flowId.value;
1380
+ #x(e, t) {
1381
+ return !this.#h && e() && t == this.#f.$.flowId.value;
1355
1382
  }
1356
- async #x() {
1357
- if (this.#m) return;
1358
- let e = this.#a.capture(), t = this.#d.$.flowId.value, n = this.#d.$.revision.value;
1383
+ async #S() {
1384
+ if (this.#h) return;
1385
+ let e = this.#a.begin(), t = this.#f.$.flowId.value, n = this.#f.$.revision.value;
1359
1386
  if (t == null || n == null) return;
1360
- let r = [...n.connectorActionIds].filter((e) => this.#u.value.actions[e] == null && !this.#i.has(e));
1361
- if (r.length != 0) {
1387
+ let r = [...n.connectorActionIds].filter((e) => this.#d.value.actions[e] == null && !this.#i.has(e));
1388
+ if (r.length > 0) {
1362
1389
  for (let e of r) this.#i.add(e);
1363
1390
  try {
1364
1391
  let n = await Promise.all(r.map((e) => this.#e.getConnectorAction(e, void 0, t)));
1365
- if (!this.#b(e, t)) return;
1366
- let i = { ...this.#u.value.actions };
1392
+ if (!this.#x(e, t)) return;
1393
+ let i = { ...this.#d.value.actions };
1367
1394
  for (let e of n) i[e.actionId] = e;
1368
- this.#y({ actions: i });
1395
+ this.#b({ actions: i });
1369
1396
  } catch {
1370
1397
  return;
1371
1398
  } finally {
1372
1399
  for (let e of r) this.#i.delete(e);
1373
1400
  }
1374
1401
  }
1402
+ if (!this.#x(e, t)) return;
1403
+ let i = /* @__PURE__ */ new Set();
1404
+ for (let e of O(n.revision.content).tasks) {
1405
+ let t = n.task(e);
1406
+ if (t?.executor.kind != "connector") continue;
1407
+ let r = this.#d.value.actions[t.executor.action];
1408
+ r?.authenticated == 1 && i.add(r.serviceId);
1409
+ }
1410
+ await Promise.all([...i].map((n) => this.#v(t, n, !1, e)));
1375
1411
  }
1376
- }, bt = { catalogs: {} }, xt = "trigger:";
1412
+ }, Et = { catalogs: {} }, Dt = "trigger:";
1377
1413
  function Y(e, t) {
1378
1414
  if (e?.kind != "trigger") return;
1379
1415
  let n = e.trigger;
@@ -1385,11 +1421,15 @@ function Y(e, t) {
1385
1421
  triggerId: e.id
1386
1422
  };
1387
1423
  }
1388
- function St(e, t) {
1424
+ function Ot(e, t) {
1389
1425
  return {
1390
1426
  description: t.t("addNode.triggerNeedsConnection", { provider: e.provider }),
1391
1427
  group: t.t("addNode.triggers"),
1392
- id: `${xt}${e.key}`,
1428
+ icon: T({
1429
+ serviceId: e.provider,
1430
+ serviceName: e.provider
1431
+ }),
1432
+ id: `${Dt}${e.key}`,
1393
1433
  inputs: [],
1394
1434
  kind: "trigger",
1395
1435
  label: e.displayName,
@@ -1403,7 +1443,7 @@ function St(e, t) {
1403
1443
  }
1404
1444
  };
1405
1445
  }
1406
- var Ct = class {
1446
+ var kt = class {
1407
1447
  #e;
1408
1448
  #t;
1409
1449
  #n;
@@ -1415,12 +1455,12 @@ var Ct = class {
1415
1455
  #c;
1416
1456
  #l;
1417
1457
  #u;
1418
- constructor(r, i, a, o, s = E()) {
1419
- this.#t = new AbortController(), this.#a = new x(), this.#c = t(bt), this.#u = !1, this.browseAddNodeOptions = async (e) => {
1458
+ constructor(r, i, a, o, s = L()) {
1459
+ this.#t = new AbortController(), this.#a = new F(), this.#c = t(Et), this.#u = !1, this.browseAddNodeOptions = async (e) => {
1420
1460
  let t = this.#l.$.flowId.value;
1421
1461
  if (e.aborted || this.#u || t == null || this.#l.$.target.value?.kind != "flow") return [];
1422
1462
  let n = await this.#d();
1423
- if (!(e.aborted || this.#u || t != this.#l.$.flowId.value)) return [...n.values()].map((e) => St(e, this.#i));
1463
+ if (!(e.aborted || this.#u || t != this.#l.$.flowId.value)) return [...n.values()].map((e) => Ot(e, this.#i));
1424
1464
  }, this.provideAddNodeOptions = async (e, t) => {
1425
1465
  let n = this.#l.$.flowId.value;
1426
1466
  if (t.aborted || this.#u || n == null || this.#l.$.target.value?.kind != "flow") return [];
@@ -1434,7 +1474,7 @@ var Ct = class {
1434
1474
  e.name,
1435
1475
  e.provider,
1436
1476
  e.type
1437
- ].some((e) => e.toLowerCase().includes(r))).map((e) => St(e, this.#i));
1477
+ ].some((e) => e.toLowerCase().includes(r))).map((e) => Ot(e, this.#i));
1438
1478
  }, this.#n = r, this.#r = o, this.#i = s, this.#s = a, this.#l = i, this.#o = n((e) => {
1439
1479
  let t = e(i.$.selection), n = Y(t, i), r = e(this.#c);
1440
1480
  if (t?.kind != "trigger") return { authorizationPending: !1 };
@@ -1463,7 +1503,7 @@ var Ct = class {
1463
1503
  this.#o.dispose(), this.#c.dispose();
1464
1504
  }
1465
1505
  reset() {
1466
- this.#u || (this.#t.abort(), this.#t = new AbortController(), this.#e = void 0, this.#a.invalidate(), this.#c.set(bt));
1506
+ this.#u || (this.#t.abort(), this.#t = new AbortController(), this.#e = void 0, this.#a.invalidate(), this.#c.set(Et));
1467
1507
  }
1468
1508
  async refresh(e = !1) {
1469
1509
  let t = this.#a.begin(), n = this.#l.$.flowId.value, r = Y(this.#l.$.selection.value, this.#l);
@@ -1478,7 +1518,7 @@ var Ct = class {
1478
1518
  connectionLoading: r.provider
1479
1519
  });
1480
1520
  try {
1481
- let e = w(await this.#n.listConnectorConnections(r.provider, void 0, n));
1521
+ let e = C(await this.#n.listConnectorConnections(r.provider, void 0, n));
1482
1522
  if (!this.#p(t, n)) return;
1483
1523
  this.#f({ catalogs: {
1484
1524
  ...this.#c.value.catalogs,
@@ -1486,7 +1526,7 @@ var Ct = class {
1486
1526
  } });
1487
1527
  } catch (e) {
1488
1528
  this.#p(t, n) && this.#f({ connectionError: {
1489
- message: B(e, this.#i.t).message,
1529
+ message: D(e, this.#i.t).message,
1490
1530
  provider: r.provider
1491
1531
  } });
1492
1532
  } finally {
@@ -1507,7 +1547,7 @@ var Ct = class {
1507
1547
  }
1508
1548
  !this.#u && t == this.#l.$.flowId.value && this.#f({ authorizationProvider: e });
1509
1549
  } catch (e) {
1510
- this.#u || this.#s(B(e, this.#i.t));
1550
+ this.#u || this.#s(D(e, this.#i.t));
1511
1551
  }
1512
1552
  }
1513
1553
  async setConnection(e, t) {
@@ -1544,18 +1584,18 @@ var Ct = class {
1544
1584
  };
1545
1585
  //#endregion
1546
1586
  //#region src/workbench/browser/runtime/designer/remoteChangeTargets.ts
1547
- function wt(e, t) {
1587
+ function At(e, t) {
1548
1588
  return e.kind == t.kind && (e.kind != "subflow" || t.kind == "subflow" && e.id == t.id);
1549
1589
  }
1550
1590
  function X(e, t, n, r) {
1551
1591
  for (let [i, a] of Object.entries(t.graph(n)?.nodes ?? {})) r(a) && e.add(i);
1552
1592
  }
1553
- function Tt(e, t, n, r) {
1593
+ function jt(e, t, n, r) {
1554
1594
  let i = /* @__PURE__ */ new Set();
1555
1595
  for (let a of r) switch (a.kind) {
1556
1596
  case "graph.node.create":
1557
1597
  case "graph.node.replace":
1558
- wt(a.target, n) && i.add(a.nodeId);
1598
+ At(a.target, n) && i.add(a.nodeId);
1559
1599
  break;
1560
1600
  case "task.replace":
1561
1601
  X(i, e, n, (e) => e.kind == "task" && e.task == null && e.taskId == a.taskId), X(i, t, n, (e) => e.kind == "task" && e.task == null && e.taskId == a.taskId);
@@ -1569,7 +1609,7 @@ function Tt(e, t, n, r) {
1569
1609
  }
1570
1610
  //#endregion
1571
1611
  //#region src/workbench/browser/runtime/stores/draftChanges.ts
1572
- function Et(e) {
1612
+ function Mt(e) {
1573
1613
  if (e.length != 1) return;
1574
1614
  let t = e[0];
1575
1615
  switch (t.kind) {
@@ -1582,7 +1622,7 @@ function Et(e) {
1582
1622
  default: return;
1583
1623
  }
1584
1624
  }
1585
- var Dt = class {
1625
+ var Nt = class {
1586
1626
  #e;
1587
1627
  #t;
1588
1628
  #n;
@@ -1610,15 +1650,15 @@ var Dt = class {
1610
1650
  this.#a = e;
1611
1651
  }
1612
1652
  project(e) {
1613
- return this.#o.reduce((e, t) => F(e, t.changes), e);
1653
+ return this.#o.reduce((e, t) => B(e, t.changes), e);
1614
1654
  }
1615
1655
  enqueue(e) {
1616
1656
  let t = this.#s.then(e);
1617
1657
  return this.#s = t, t;
1618
1658
  }
1619
1659
  async change(e, t, n, r = !0) {
1620
- this.#t.beforeChange(r), this.#t.apply(F(t, n));
1621
- let i = Et(n), a = this.#o.at(-1), o = i != null && a != null && !a.started && Et(a.changes) == i ? a : void 0;
1660
+ this.#t.beforeChange(r), this.#t.apply(B(t, n));
1661
+ let i = Mt(n), a = this.#o.at(-1), o = i != null && a != null && !a.started && Mt(a.changes) == i ? a : void 0;
1622
1662
  if (o != null) return o.changes = n, await o.result;
1623
1663
  let s = {
1624
1664
  ...e,
@@ -1646,7 +1686,7 @@ var Dt = class {
1646
1686
  let r = this.#l(e, n, t);
1647
1687
  return this.#o.length == 0 && this.#t.check(), r;
1648
1688
  } catch (n) {
1649
- if (n instanceof P && n.code == "flow.revision-conflict") {
1689
+ if (n instanceof z && n.code == "flow.revision-conflict") {
1650
1690
  if (!t && await this.#t.recover(e)) {
1651
1691
  t = !0;
1652
1692
  continue;
@@ -1655,7 +1695,7 @@ var Dt = class {
1655
1695
  kind: "error",
1656
1696
  message: this.#n.t("notice.draftConflict")
1657
1697
  });
1658
- } else this.#u(e), this.#t.current(e) && this.#r(B(n, this.#n.t));
1698
+ } else this.#u(e), this.#t.current(e) && this.#r(D(n, this.#n.t));
1659
1699
  return;
1660
1700
  }
1661
1701
  }
@@ -1663,7 +1703,7 @@ var Dt = class {
1663
1703
  #l(e, t, n) {
1664
1704
  let r = {
1665
1705
  ...n.revision,
1666
- content: F(t, e.changes).content
1706
+ content: B(t, e.changes).content
1667
1707
  };
1668
1708
  this.#o = this.#o.filter((t) => t !== e), this.#a = r;
1669
1709
  let i = this.#t.diagnostics(), a = this.#o.length == 0 && i?.revisionId == r.revisionId;
@@ -1672,19 +1712,19 @@ var Dt = class {
1672
1712
  #u(e) {
1673
1713
  this.#o = this.#o.filter((t) => t !== e), !(!this.#t.current(e) || this.#a == null) && this.#t.apply(this.project(this.#a));
1674
1714
  }
1675
- }, Ot = 50, kt = {
1715
+ }, Pt = 50, Ft = {
1676
1716
  failed: !1,
1677
1717
  loaded: !1,
1678
1718
  loading: !0,
1679
1719
  loadingMore: !1,
1680
1720
  loadMoreFailed: !1,
1681
1721
  flows: []
1682
- }, At = class {
1722
+ }, It = class {
1683
1723
  #e;
1684
1724
  #t;
1685
- #n = new x();
1725
+ #n = new F();
1686
1726
  #r;
1687
- #i = t(kt);
1727
+ #i = t(Ft);
1688
1728
  #a = !1;
1689
1729
  constructor(t, n, r) {
1690
1730
  this.#e = t, this.#t = r, this.#r = n, this.$ = {
@@ -1726,7 +1766,7 @@ var Dt = class {
1726
1766
  try {
1727
1767
  let t = await this.#e.listFlows({
1728
1768
  includeTotal: !0,
1729
- limit: Ot
1769
+ limit: Pt
1730
1770
  });
1731
1771
  if (!e()) return;
1732
1772
  this.#o({
@@ -1741,7 +1781,7 @@ var Dt = class {
1741
1781
  this.#o({
1742
1782
  failed: !0,
1743
1783
  loading: !1
1744
- }), this.#r(B(t, this.#t.t));
1784
+ }), this.#r(D(t, this.#t.t));
1745
1785
  }
1746
1786
  }
1747
1787
  async loadMore() {
@@ -1755,7 +1795,7 @@ var Dt = class {
1755
1795
  try {
1756
1796
  let e = await this.#e.listFlows({
1757
1797
  cursor: t,
1758
- limit: Ot
1798
+ limit: Pt
1759
1799
  });
1760
1800
  if (!n()) return;
1761
1801
  let r = new Set(this.#i.value.flows.map((e) => e.flowId));
@@ -1769,7 +1809,7 @@ var Dt = class {
1769
1809
  this.#o({
1770
1810
  loadingMore: !1,
1771
1811
  loadMoreFailed: !0
1772
- }), this.#r(B(e, this.#t.t));
1812
+ }), this.#r(D(e, this.#t.t));
1773
1813
  }
1774
1814
  }
1775
1815
  async create(e) {
@@ -1811,7 +1851,7 @@ var Dt = class {
1811
1851
  ...e
1812
1852
  });
1813
1853
  }
1814
- }, jt = class {
1854
+ }, Lt = class {
1815
1855
  #e;
1816
1856
  #t;
1817
1857
  #n;
@@ -1854,7 +1894,7 @@ var Dt = class {
1854
1894
  this.#c(a, r);
1855
1895
  } catch (r) {
1856
1896
  if (this.#o || !n()) return;
1857
- if (r instanceof P && r.code == "flow.presentation-conflict") try {
1897
+ if (r instanceof z && r.code == "flow.presentation-conflict") try {
1858
1898
  let t = await this.#e.getPresentation(e);
1859
1899
  if (this.#o || !n()) return;
1860
1900
  this.#c(a, t), this.#n({
@@ -1862,9 +1902,9 @@ var Dt = class {
1862
1902
  message: this.#t.t("notice.layoutConflict")
1863
1903
  });
1864
1904
  } catch (e) {
1865
- !this.#o && n() && this.#n(B(e, this.#t.t));
1905
+ !this.#o && n() && this.#n(D(e, this.#t.t));
1866
1906
  }
1867
- else this.#c(a, t), this.#n(B(r, this.#t.t));
1907
+ else this.#c(a, t), this.#n(D(r, this.#t.t));
1868
1908
  }
1869
1909
  }), await this.#i;
1870
1910
  }
@@ -1876,13 +1916,13 @@ var Dt = class {
1876
1916
  value: n
1877
1917
  });
1878
1918
  }
1879
- }, Mt = {
1919
+ }, Rt = {
1880
1920
  checkLoading: !1,
1881
1921
  selectedNodeIds: [],
1882
1922
  workspaceLoadFailed: !1,
1883
1923
  workspaceLoading: !1
1884
1924
  };
1885
- function Nt(e) {
1925
+ function zt(e) {
1886
1926
  return e.workspaceLoading ? "loading" : e.busy == "designer" ? "saving" : e.draft == null ? "noDraft" : "saved";
1887
1927
  }
1888
1928
  function Z(e, t) {
@@ -1898,9 +1938,9 @@ function Q(e, t, n) {
1898
1938
  source: r.module.source
1899
1939
  };
1900
1940
  }
1901
- var Pt = class {
1941
+ var Bt = class {
1902
1942
  #e;
1903
- #t = t(Mt);
1943
+ #t = t(Rt);
1904
1944
  #n;
1905
1945
  constructor(t, r) {
1906
1946
  let i = e(this.#t, (e) => e.busy), a = e(this.#t, (e) => e.checkLoading), o = e(this.#t, (e) => e.diagnosticFocus), s = e(this.#t, (e) => e.diagnostics), c = e(this.#t, (e) => e.draft), l = e(this.#t, (e) => {
@@ -1910,23 +1950,23 @@ var Pt = class {
1910
1950
  ...n,
1911
1951
  status: Z(e.draft, e.moduleEditor)
1912
1952
  };
1913
- }), u = e(this.#t, (e) => e.nodeFocus), d = e(this.#t, (e) => e.presentation), f = e(this.#t, (e) => e.flowId), p = e(this.#t, (e) => e.live), m = e(this.#t, (e) => e.draft == null ? void 0 : N(e.draft)), h = e(this.#t, (e) => e.selectedNodeIds), g = e(this.#t, (e) => e.target), _ = e(this.#t, (e) => e.workspaceLoadFailed), v = e(this.#t, (e) => e.workspaceLoading);
1953
+ }), u = e(this.#t, (e) => e.nodeFocus), d = e(this.#t, (e) => e.presentation), f = e(this.#t, (e) => e.flowId), p = e(this.#t, (e) => e.live), m = e(this.#t, (e) => e.draft == null ? void 0 : I(e.draft)), h = e(this.#t, (e) => e.selectedNodeIds), g = e(this.#t, (e) => e.target), _ = e(this.#t, (e) => e.workspaceLoadFailed), v = e(this.#t, (e) => e.workspaceLoading);
1914
1954
  this.#e = e(this.#t, (e) => ({
1915
- revision: e.draft == null ? void 0 : N(e.draft),
1955
+ revision: e.draft == null ? void 0 : I(e.draft),
1916
1956
  target: e.target
1917
1957
  }), { equal: (e, t) => e.revision === t.revision && e.target === t.target });
1918
1958
  let y = e(this.#t, (e) => {
1919
- if (e.draft != null && e.target != null && e.selectedNodeIds.length == 1) return N(e.draft).selection(e.target, e.selectedNodeIds[0]);
1959
+ if (e.draft != null && e.target != null && e.selectedNodeIds.length == 1) return I(e.draft).selection(e.target, e.selectedNodeIds[0]);
1920
1960
  });
1921
1961
  this.$ = {
1922
1962
  addNodeOptions: n((e) => {
1923
1963
  let { revision: n, target: r } = e(this.#e);
1924
- return je(n?.revision, r, e(t.t$));
1964
+ return Fe(n?.revision, r, e(t.t$));
1925
1965
  }),
1926
1966
  busy: i,
1927
1967
  checkLoading: a,
1928
1968
  diagnosticFocus: o,
1929
- diagnosticItems: e(this.#t, (e) => we(e.draft == null ? void 0 : N(e.draft), e.target, e.diagnostics)),
1969
+ diagnosticItems: e(this.#t, (e) => E(e.draft == null ? void 0 : I(e.draft), e.target, e.diagnostics)),
1930
1970
  diagnostics: s,
1931
1971
  draft: c,
1932
1972
  flow: n((e) => {
@@ -1941,7 +1981,7 @@ var Pt = class {
1941
1981
  flowNextCursor: r.$.nextCursor,
1942
1982
  flowTotal: r.$.total,
1943
1983
  flows: r.$.flows,
1944
- inspectorDiagnostics: e(this.#t, (e) => Oe(e.draft == null ? void 0 : N(e.draft), e.target, e.diagnostics, y.value)),
1984
+ inspectorDiagnostics: e(this.#t, (e) => te(e.draft == null ? void 0 : I(e.draft), e.target, e.diagnostics, y.value)),
1945
1985
  live: p,
1946
1986
  moduleDiagnostics: e(this.#t, (e) => {
1947
1987
  let t = e.moduleEditor?.moduleId;
@@ -1953,11 +1993,11 @@ var Pt = class {
1953
1993
  revision: m,
1954
1994
  selection: y,
1955
1995
  selectedNodeIds: h,
1956
- status: e(this.#t, Nt),
1996
+ status: e(this.#t, zt),
1957
1997
  target: g,
1958
1998
  targetFlow: n((e) => e(g)?.kind == "flow" ? e(r.$.flows).find((t) => t.flowId == e(f)) : void 0),
1959
1999
  targetName: e(this.#t, (e) => {
1960
- if (e.target != null) return e.target.kind == "flow" ? r.flow(e.flowId ?? "")?.name : e.draft == null ? e.target.id : N(e.draft).subflow(e.target.id)?.name ?? e.target.id;
2000
+ if (e.target != null) return e.target.kind == "flow" ? r.flow(e.flowId ?? "")?.name : e.draft == null ? e.target.id : I(e.draft).subflow(e.target.id)?.name ?? e.target.id;
1961
2001
  }),
1962
2002
  workspaceLoadFailed: _,
1963
2003
  workspaceLoading: v
@@ -1976,17 +2016,17 @@ var Pt = class {
1976
2016
  for (let e of Object.values(this.$)) this.#n.has(e) || e.dispose();
1977
2017
  this.#e.dispose(), this.#t.dispose();
1978
2018
  }
1979
- }, Ft = 250;
1980
- function It(e, t) {
2019
+ }, Vt = 250;
2020
+ function Ht(e, t) {
1981
2021
  if (t != null) return t.kind == "flow" || e.subflow(t.id) != null ? t : { kind: "flow" };
1982
2022
  }
1983
2023
  function $(e, t) {
1984
2024
  return e?.kind == t?.kind ? e?.kind != "subflow" || t?.kind == "subflow" && e.id == t.id : !1;
1985
2025
  }
1986
- var Lt = class {
2026
+ var Ut = class {
1987
2027
  #e;
1988
2028
  #t;
1989
- #n = new x();
2029
+ #n = new F();
1990
2030
  #r;
1991
2031
  #i;
1992
2032
  #a;
@@ -2006,8 +2046,8 @@ var Lt = class {
2006
2046
  #y = 0;
2007
2047
  #b;
2008
2048
  #x;
2009
- constructor(e, t, n = it, r = E(), i = () => {}) {
2010
- this.#e = e, this.#c = t, this.#i = n, this.#r = r, this.#s = i, this.#o = new At(e, t, r), this.#l = new Pt(r, this.#o), this.#t = new Dt(e, t, r, {
2049
+ constructor(e, t, n = lt, r = L(), i = () => {}) {
2050
+ this.#e = e, this.#c = t, this.#i = n, this.#r = r, this.#s = i, this.#o = new It(e, t, r), this.#l = new Bt(r, this.#o), this.#t = new Nt(e, t, r, {
2011
2051
  apply: (e, t) => this.#w(e, t),
2012
2052
  beforeChange: (e) => {
2013
2053
  this.#M(), this.#h = !1, e && (this.#B({ busy: "designer" }), this.#c(void 0));
@@ -2020,7 +2060,7 @@ var Lt = class {
2020
2060
  },
2021
2061
  headChanged: (e, t) => this.#N(e, t),
2022
2062
  recover: (e) => this.#O(e, !0)
2023
- }), this.#a = new jt(e, t, (e) => this.#B({ presentation: e }), r), this.$ = this.#l.$;
2063
+ }), this.#a = new Lt(e, t, (e) => this.#B({ presentation: e }), r), this.$ = this.#l.$;
2024
2064
  }
2025
2065
  dispose() {
2026
2066
  this.#M(), this.#_ = !0, this.#n.invalidate(), this.#a.dispose(), this.#b?.(), this.#x?.(), this.#l.dispose(), this.#o.dispose();
@@ -2075,7 +2115,7 @@ var Lt = class {
2075
2115
  return t() ? (this.#B({
2076
2116
  workspaceLoadFailed: !0,
2077
2117
  workspaceLoading: !1
2078
- }), this.#c(B(e, this.#r.t)), !1) : !1;
2118
+ }), this.#c(D(e, this.#r.t)), !1) : !1;
2079
2119
  }
2080
2120
  return !0;
2081
2121
  }
@@ -2092,7 +2132,7 @@ var Lt = class {
2092
2132
  selectNodes(e) {
2093
2133
  return e.length == this.#l.value.selectedNodeIds.length && e.every((e, t) => e == this.#l.value.selectedNodeIds[t]) ? !0 : this.#F() ? (this.#M(), this.#B({
2094
2134
  diagnosticFocus: void 0,
2095
- moduleEditor: Q(this.#l.value.draft == null ? void 0 : N(this.#l.value.draft), this.#l.value.target, e),
2135
+ moduleEditor: Q(this.#l.value.draft == null ? void 0 : I(this.#l.value.draft), this.#l.value.target, e),
2096
2136
  nodeFocus: void 0,
2097
2137
  selectedNodeIds: e
2098
2138
  }), !0) : !1;
@@ -2105,7 +2145,7 @@ var Lt = class {
2105
2145
  let n = await this.#e.getFlow(await t(e));
2106
2146
  return this.#o.insert(n), n;
2107
2147
  } catch (e) {
2108
- this.#_ || this.#c(B(e, this.#r.t));
2148
+ this.#_ || this.#c(D(e, this.#r.t));
2109
2149
  } finally {
2110
2150
  this.#B({ busy: void 0 });
2111
2151
  }
@@ -2122,7 +2162,7 @@ var Lt = class {
2122
2162
  message: this.#r.t("notice.flowDeleteAccepted", { name: t.name })
2123
2163
  }), !0);
2124
2164
  } catch (e) {
2125
- return this.#_ || this.#c(B(e, this.#r.t)), !1;
2165
+ return this.#_ || this.#c(D(e, this.#r.t)), !1;
2126
2166
  } finally {
2127
2167
  this.#B({ busy: void 0 });
2128
2168
  }
@@ -2131,7 +2171,7 @@ var Lt = class {
2131
2171
  if (!this.#F() || this.#l.value.draft == null) return !1;
2132
2172
  let t = this.#i();
2133
2173
  this.#B({ busy: "resource" }), this.#c(void 0);
2134
- let n = await this.#C(ge(t, e), !1);
2174
+ let n = await this.#C(oe(t, e), !1);
2135
2175
  return this.#B({ busy: void 0 }), n != null && (this.selectTarget({
2136
2176
  id: t,
2137
2177
  kind: "subflow"
@@ -2149,7 +2189,7 @@ var Lt = class {
2149
2189
  try {
2150
2190
  i = await this.#e.renameFlow(e, r), i != null && this.#o.include(i);
2151
2191
  } catch (e) {
2152
- this.#_ || this.#c(B(e, this.#r.t));
2192
+ this.#_ || this.#c(D(e, this.#r.t));
2153
2193
  }
2154
2194
  return this.#B({ busy: void 0 }), i != null && (this.#c({
2155
2195
  kind: "success",
@@ -2162,11 +2202,11 @@ var Lt = class {
2162
2202
  if (r == null || i == null) return;
2163
2203
  let a = this.#i();
2164
2204
  if (e.kind == "comment") return await this.#S(i, a, t);
2165
- let o = N(r), s = S(e, o, i, this.#r.t);
2205
+ let o = I(r), s = S(e, o, i, this.#r.t);
2166
2206
  if (s == null) return;
2167
- let c = be(o, i, a, s, this.#i);
2207
+ let c = je(o, i, a, s, this.#i);
2168
2208
  if (c == null) return;
2169
- let l = n == null ? c : [...c, ...$e(F(r, c).content, i, n(a))], u = this.#C(l);
2209
+ let l = n == null ? c : [...c, ...it(B(r, c).content, i, n(a))], u = this.#C(l);
2170
2210
  this.selectNodes([a]);
2171
2211
  let d = this.moveNodes({ [a]: t });
2172
2212
  if (await u != null && (await d, !this.#_)) return this.#B({ nodeFocus: {
@@ -2177,20 +2217,20 @@ var Lt = class {
2177
2217
  async connect(e) {
2178
2218
  let t = this.$.revision.value, n = this.#l.value.target;
2179
2219
  if (t == null || n == null) return;
2180
- let r = $e(t.revision.content, n, e);
2220
+ let r = it(t.revision.content, n, e);
2181
2221
  r.length > 0 && await this.#C(r);
2182
2222
  }
2183
2223
  async disconnect(e) {
2184
2224
  let t = this.$.revision.value, n = this.#l.value.target;
2185
2225
  if (t == null || n == null) return;
2186
- let r = et(t.revision.content, n, e);
2226
+ let r = at(t.revision.content, n, e);
2187
2227
  r.length > 0 && await this.#C(r);
2188
2228
  }
2189
2229
  async deleteSelectedNodes() {
2190
2230
  if (!this.#F()) return;
2191
2231
  let e = this.$.revision.value, t = this.#l.value.target;
2192
2232
  if (e == null || t == null || this.#l.value.selectedNodeIds.length == 0) return;
2193
- let n = T(this.#l.value.presentation?.value ?? {}, t), r = new Set(this.#l.value.selectedNodeIds.filter((e) => n.has(e))), i = Se(e, t, this.#l.value.selectedNodeIds), a = i.length == 0 ? void 0 : this.#C(i), o = r.size == 0 ? void 0 : this.#T((e) => y(e, t, r));
2233
+ let n = w(this.#l.value.presentation?.value ?? {}, t), r = new Set(this.#l.value.selectedNodeIds.filter((e) => n.has(e))), i = Ce(e, t, this.#l.value.selectedNodeIds), a = i.length == 0 ? void 0 : this.#C(i), o = r.size == 0 ? void 0 : this.#T((e) => x(e, t, r));
2194
2234
  this.selectNodes([]), (a == null || await a != null) && await o;
2195
2235
  }
2196
2236
  copySelectedNodes() {
@@ -2204,7 +2244,7 @@ var Lt = class {
2204
2244
  sourceId: e.id,
2205
2245
  title: e.title
2206
2246
  }] : []),
2207
- nodes: De(e, t, this.#l.value.selectedNodeIds)
2247
+ nodes: _e(e, t, this.#l.value.selectedNodeIds)
2208
2248
  };
2209
2249
  }
2210
2250
  async pasteNodes(e) {
@@ -2223,8 +2263,8 @@ var Lt = class {
2223
2263
  y: (i?.y ?? 80) + 40
2224
2264
  }];
2225
2265
  })), c = this.#T((e) => {
2226
- let t = j(e, n, s);
2227
- for (let e of a) t = L(t, n, e.nodeId, {
2266
+ let t = A(e, n, s);
2267
+ for (let e of a) t = R(t, n, e.nodeId, {
2228
2268
  content: e.content,
2229
2269
  position: {
2230
2270
  x: e.position.x + 40,
@@ -2242,56 +2282,66 @@ var Lt = class {
2242
2282
  async saveNodeSettings(e, t) {
2243
2283
  let n = this.$.revision.value, r = this.#l.value.target;
2244
2284
  if (n == null || r == null) return !1;
2245
- let i = Ae(n, r, e, t);
2285
+ let i = he(n, r, e, t);
2246
2286
  return i != null && await this.#C(i) != null;
2247
2287
  }
2248
2288
  async saveNodeDescription(e, t) {
2249
2289
  let n = this.$.revision.value, r = this.#l.value.target;
2250
2290
  if (n == null || r == null) return !1;
2251
- let i = ye(n, r, e, t);
2291
+ let i = Te(n, r, e, t);
2252
2292
  return i != null && await this.#C(i) != null;
2253
2293
  }
2254
2294
  async saveNodeIcon(e, t) {
2255
2295
  let n = this.$.revision.value, r = this.#l.value.target;
2256
2296
  if (n == null || r == null) return !1;
2257
- let i = ve(n, r, e, t);
2297
+ let i = xe(n, r, e, t);
2258
2298
  return i != null && await this.#C(i) != null;
2259
2299
  }
2260
2300
  async saveNodeTitle(e, t) {
2261
2301
  let n = this.$.revision.value, r = this.#l.value.target;
2262
2302
  if (n == null || r == null) return !1;
2263
- let i = me(n, r, e, t);
2303
+ let i = ge(n, r, e, t);
2264
2304
  return i != null && await this.#C(i) != null;
2265
2305
  }
2266
2306
  async setInputValue(e, t, n) {
2267
2307
  let r = this.$.revision.value, i = this.#l.value.target;
2268
2308
  if (r == null || i == null) return !1;
2269
- let a = I(r, i, e, t, n);
2309
+ let a = le(r, i, e, t, n);
2270
2310
  return a != null && await this.#C(a) != null;
2271
2311
  }
2272
2312
  async setInputVariable(e, t, n) {
2273
2313
  let r = this.$.revision.value, i = this.#l.value.target;
2274
2314
  if (r == null || i == null) return !1;
2275
- let a = n == null ? I(r, i, e, t, void 0) : _e(r, i, e, t, n, this.#i());
2315
+ let a = n == null ? le(r, i, e, t, void 0) : ye(r, i, e, t, n, this.#i());
2276
2316
  return a != null && await this.#C(a) != null;
2277
2317
  }
2278
2318
  async saveCondition(e, t) {
2279
2319
  let n = this.$.revision.value, r = this.#l.value.target;
2280
2320
  if (n == null || r == null) return !1;
2281
- let i = Ce(n, r, e, t);
2321
+ let i = me(n, r, e, t);
2282
2322
  return i != null && await this.#C(i) != null;
2283
2323
  }
2284
2324
  async saveValue(e, t) {
2285
2325
  let n = this.$.revision.value, r = this.#l.value.target;
2286
2326
  if (n == null || r == null) return !1;
2287
- let i = Me(n, r, e, t);
2327
+ let i = ce(n, r, e, t);
2328
+ return i != null && await this.#C(i) != null;
2329
+ }
2330
+ async saveWait(e, t) {
2331
+ let n = this.$.revision.value, r = this.#l.value.target;
2332
+ if (n == null || r?.kind != "flow") return !1;
2333
+ let i = Ie(n, r, e, t);
2288
2334
  return i != null && await this.#C(i) != null;
2289
2335
  }
2336
+ async setWaitNotification(e, t) {
2337
+ let n = this.$.revision.value, r = n == null ? void 0 : Me(n, e, t, this.#i());
2338
+ return r != null && await this.#C(r) != null;
2339
+ }
2290
2340
  async saveComment(e, t) {
2291
2341
  let n = this.#l.value.target;
2292
2342
  if (n == null) return;
2293
2343
  let r = this.#P().nodes.find((t) => t.id == e)?.position;
2294
- r != null && await this.#T((i) => L(i, n, e, {
2344
+ r != null && await this.#T((i) => R(i, n, e, {
2295
2345
  ...t,
2296
2346
  position: r
2297
2347
  }));
@@ -2299,55 +2349,61 @@ var Lt = class {
2299
2349
  async saveTaskSettings(e, t) {
2300
2350
  let n = this.$.revision.value, r = this.#l.value.target;
2301
2351
  if (n == null || r == null) return !1;
2302
- let i = he(n, r, e, t);
2352
+ let i = Pe(n, r, e, t);
2303
2353
  return i != null && await this.#C(i) != null;
2304
2354
  }
2305
2355
  async saveCodeTaskPorts(e, t) {
2306
2356
  let n = this.$.revision.value, r = this.#l.value.target;
2307
2357
  if (n == null || r == null) return !1;
2308
- let i = Te(n, r, e, t);
2358
+ let i = de(n, r, e, t);
2359
+ return i != null && await this.#C(i) != null;
2360
+ }
2361
+ async saveTaskAdditionalInputs(e, t) {
2362
+ let n = this.$.revision.value, r = this.#l.value.target;
2363
+ if (n == null || r == null) return !1;
2364
+ let i = Le(n, r, e, t);
2309
2365
  return i != null && await this.#C(i) != null;
2310
2366
  }
2311
2367
  async setConnectorConnection(e, t) {
2312
2368
  let n = this.$.revision.value;
2313
2369
  if (n == null) return !1;
2314
- let r = D(n.revision.content, e, t);
2370
+ let r = ee(n.revision.content, e, t);
2315
2371
  return r != null && await this.#C(r) != null;
2316
2372
  }
2317
2373
  async saveTriggerSettings(e, t) {
2318
2374
  let n = this.$.revision.value, r = this.#l.value.target;
2319
2375
  if (n == null || r?.kind != "flow") return !1;
2320
- let i = pe(n.revision.content, r, e, t);
2376
+ let i = ne(n.revision.content, r, e, t);
2321
2377
  return i != null && await this.#C(i) != null;
2322
2378
  }
2323
2379
  async saveTriggerConfig(e, t, n) {
2324
2380
  let r = this.$.revision.value, i = this.#l.value.target;
2325
2381
  if (r == null || i?.kind != "flow") return !1;
2326
- let a = ne(r.revision.content, i, e, t, n);
2382
+ let a = ie(r.revision.content, i, e, t, n);
2327
2383
  return a != null && await this.#C(a) != null;
2328
2384
  }
2329
2385
  async saveTriggerSchedule(e, t) {
2330
2386
  let n = this.$.revision.value, r = this.#l.value.target;
2331
2387
  if (n == null || r?.kind != "flow") return !1;
2332
- let i = re(n.revision.content, r, e, t);
2388
+ let i = N(n.revision.content, r, e, t);
2333
2389
  return i != null && await this.#C(i) != null;
2334
2390
  }
2335
2391
  async saveWebhook(e, t) {
2336
2392
  let n = this.$.revision.value, r = this.#l.value.target;
2337
2393
  if (n == null || r?.kind != "flow") return !1;
2338
- let i = le(n, r, e, t);
2394
+ let i = P(n, r, e, t);
2339
2395
  return i != null && await this.#C(i) != null;
2340
2396
  }
2341
2397
  async setTriggerConnection(e, t) {
2342
2398
  let n = this.$.revision.value, r = this.#l.value.target;
2343
2399
  if (n == null || r?.kind != "flow") return !1;
2344
- let i = de(n.revision.content, r, e, t);
2400
+ let i = re(n.revision.content, r, e, t);
2345
2401
  return i != null && await this.#C(i) != null;
2346
2402
  }
2347
2403
  async saveSubflowSettings(e, t) {
2348
2404
  let n = this.$.revision.value;
2349
2405
  if (n == null) return !1;
2350
- let r = Ne(n, e, t);
2406
+ let r = ae(n, e, t);
2351
2407
  return r != null && await this.#C(r) != null;
2352
2408
  }
2353
2409
  updateModuleSource(e) {
@@ -2378,9 +2434,9 @@ var Lt = class {
2378
2434
  ...e,
2379
2435
  phase: "saving"
2380
2436
  } });
2381
- let t = await nt(e.source);
2437
+ let t = await st(e.source);
2382
2438
  if (this.#_) return !1;
2383
- let n = await this.#C(rt(e.moduleId, e.source, t));
2439
+ let n = await this.#C(ct(e.moduleId, e.source, t));
2384
2440
  return !this.#_ && this.#l.value.moduleEditor?.moduleId == e.moduleId && this.#B({ moduleEditor: {
2385
2441
  ...this.#l.value.moduleEditor,
2386
2442
  phase: n == null ? "failed" : void 0
@@ -2388,13 +2444,13 @@ var Lt = class {
2388
2444
  }
2389
2445
  async moveNodes(e, t = "detail") {
2390
2446
  let n = this.#l.value.target;
2391
- n != null && await this.#T((r) => j(r, n, e, t));
2447
+ n != null && await this.#T((r) => A(r, n, e, t));
2392
2448
  }
2393
2449
  async moveViewport(e, t = "detail") {
2394
2450
  let n = this.#l.value.target;
2395
2451
  if (n == null) return;
2396
2452
  let r = this.#P().viewport;
2397
- (r.x != e.x || r.y != e.y || r.zoom != e.zoom) && this.#M(), await this.#T((r) => A(r, n, e, t));
2453
+ (r.x != e.x || r.y != e.y || r.zoom != e.zoom) && this.#M(), await this.#T((r) => k(r, n, e, t));
2398
2454
  }
2399
2455
  async check() {
2400
2456
  await this.#E();
@@ -2424,7 +2480,7 @@ var Lt = class {
2424
2480
  if (e.kind != "comment") return [];
2425
2481
  let t = /#(\d+)$/.exec(e.title);
2426
2482
  return t == null ? [] : [Number(t[1])];
2427
- })), i = this.#T((i) => L(i, e, t, {
2483
+ })), i = this.#T((i) => R(i, e, t, {
2428
2484
  content: "",
2429
2485
  position: n,
2430
2486
  title: this.#r.t("addNode.commentName", { number: r + 1 })
@@ -2480,7 +2536,7 @@ var Lt = class {
2480
2536
  });
2481
2537
  }
2482
2538
  } catch (n) {
2483
- !this.#_ && e == this.#l.value.flowId && t.revisionId == this.#l.value.draft?.revisionId && this.#c(B(n, this.#r.t));
2539
+ !this.#_ && e == this.#l.value.flowId && t.revisionId == this.#l.value.draft?.revisionId && this.#c(D(n, this.#r.t));
2484
2540
  } finally {
2485
2541
  !this.#_ && e == this.#l.value.flowId && t.revisionId == this.#l.value.draft?.revisionId && this.#B({ checkLoading: !1 });
2486
2542
  }
@@ -2518,7 +2574,7 @@ var Lt = class {
2518
2574
  s = this.#k(a, o);
2519
2575
  }
2520
2576
  if (s.revisionId == a.revisionId) return !0;
2521
- let c = o.kind == "changes" && t != null ? Tt(N(a), N(s), t, o.revisions.flatMap((e) => e.operations)) : void 0;
2577
+ let c = o.kind == "changes" && t != null ? jt(I(a), I(s), t, o.revisions.flatMap((e) => e.operations)) : void 0;
2522
2578
  o.kind == "snapshot" && this.#M();
2523
2579
  let l = this.#L(s, !1);
2524
2580
  return this.#N(e.flowId, s.revisionId), o.kind == "changes" && o.revisions.length > 0 && t != null && c != null && i == this.#m && this.#A(e, t, c, i), n && (this.#c({
@@ -2526,7 +2582,7 @@ var Lt = class {
2526
2582
  message: this.#r.t(l ? "notice.moduleUpdated" : "notice.draftUpdated")
2527
2583
  }), this.#E()), !0;
2528
2584
  } catch (n) {
2529
- return t && this.#z(e) && this.#c(B(n, this.#r.t)), !1;
2585
+ return t && this.#z(e) && this.#c(D(n, this.#r.t)), !1;
2530
2586
  }
2531
2587
  }
2532
2588
  #k(e, t) {
@@ -2536,7 +2592,7 @@ var Lt = class {
2536
2592
  if (e.revision.parentRevisionId != n.revisionId) throw Error("Invalid Draft revision chain.");
2537
2593
  n = {
2538
2594
  ...e.revision,
2539
- content: F(n, e.operations).content
2595
+ content: B(n, e.operations).content
2540
2596
  };
2541
2597
  }
2542
2598
  return n;
@@ -2551,7 +2607,7 @@ var Lt = class {
2551
2607
  return;
2552
2608
  }
2553
2609
  for (let e of n) a.targets.add(e);
2554
- globalThis.clearTimeout(a.timer), a.timer = globalThis.setTimeout(() => this.#j(), Ft);
2610
+ globalThis.clearTimeout(a.timer), a.timer = globalThis.setTimeout(() => this.#j(), Vt);
2555
2611
  return;
2556
2612
  }
2557
2613
  n.size == 0 || i.selectedNodeIds.length > 0 || (this.#p = {
@@ -2560,7 +2616,7 @@ var Lt = class {
2560
2616
  flowId: e.flowId,
2561
2617
  target: t,
2562
2618
  targets: new Set(n),
2563
- timer: globalThis.setTimeout(() => this.#j(), Ft),
2619
+ timer: globalThis.setTimeout(() => this.#j(), Vt),
2564
2620
  viewport: this.#P().viewport
2565
2621
  });
2566
2622
  }
@@ -2571,7 +2627,7 @@ var Lt = class {
2571
2627
  if (t.flowId != e.flowId || !$(t.target, e.target) || t.selectedNodeIds.length > 0) return;
2572
2628
  let n = this.#P().viewport;
2573
2629
  if (n.x != e.viewport.x || n.y != e.viewport.y || n.zoom != e.viewport.zoom || t.draft == null) return;
2574
- let r = N(t.draft), i = [...e.targets].filter((t) => r.selection(e.target, t) != null);
2630
+ let r = I(t.draft), i = [...e.targets].filter((t) => r.selection(e.target, t) != null);
2575
2631
  i.length == 1 && this.#B({ nodeFocus: {
2576
2632
  nodeId: i[0],
2577
2633
  requestId: ++this.#y
@@ -2585,7 +2641,7 @@ var Lt = class {
2585
2641
  }
2586
2642
  #P() {
2587
2643
  let e = this.#l.value;
2588
- return M(e.draft, e.target, e.presentation?.value, e.diagnostics?.diagnostics, {}, {}, this.#r.t);
2644
+ return j(e.draft, e.target, e.presentation?.value, e.diagnostics?.diagnostics, {}, {}, this.#r.t);
2589
2645
  }
2590
2646
  #F() {
2591
2647
  let e = this.#l.value.moduleEditor;
@@ -2595,7 +2651,7 @@ var Lt = class {
2595
2651
  }), !1);
2596
2652
  }
2597
2653
  #I(e) {
2598
- let t = N(e), n = It(t, this.#l.value.target);
2654
+ let t = I(e), n = Ht(t, this.#l.value.target);
2599
2655
  return {
2600
2656
  revision: t,
2601
2657
  selectedNodeIds: this.#l.value.selectedNodeIds.filter((e) => n != null && t.selection(n, e) != null),
@@ -2629,13 +2685,13 @@ var Lt = class {
2629
2685
  };
2630
2686
  //#endregion
2631
2687
  //#region src/workbench/browser/runtime/stores/workbenchStore.ts
2632
- function Rt(e) {
2688
+ function Wt(e) {
2633
2689
  return new Map(e.nodes.map((e) => [e.id, e]));
2634
2690
  }
2635
- function zt(e, t) {
2636
- return e == null || t == null ? [] : N(e).designerInputs(t);
2691
+ function Gt(e, t) {
2692
+ return e == null || t == null ? [] : I(e).designerInputs(t);
2637
2693
  }
2638
- function Bt(e, t, n, r, i) {
2694
+ function Kt(e, t, n, r, i) {
2639
2695
  if (e == null || t?.kind != "flow" || n?.revisionId != e.revisionId || n.flowId != e.flowId) return /* @__PURE__ */ new Map();
2640
2696
  let a = r.find((t) => t.kind == "run.started" && t.payload.flowId == e.flowId)?.payload.scopeId;
2641
2697
  return typeof a == "string" ? new Map(r.flatMap((t) => {
@@ -2643,7 +2699,7 @@ function Bt(e, t, n, r, i) {
2643
2699
  return t.payload.scopeId == a && t.payload.flowId == e.flowId && typeof n == "string" && i.has(n) ? [[t.sequence, n]] : [];
2644
2700
  })) : /* @__PURE__ */ new Map();
2645
2701
  }
2646
- var Vt = { openExternalPage: async () => !1 }, Ht = class {
2702
+ var qt = { openExternalPage: async () => !1 }, Jt = class {
2647
2703
  #e;
2648
2704
  #t;
2649
2705
  #n;
@@ -2654,38 +2710,49 @@ var Vt = { openExternalPage: async () => !1 }, Ht = class {
2654
2710
  #s;
2655
2711
  #c;
2656
2712
  #l;
2657
- constructor(r, i, a = () => crypto.randomUUID(), o = E(), s = Vt, c = !0) {
2658
- this.#t = new x(), this.#r = t(), this.#a = t([]), this.#o = t(!1), this.#s = t(!1), this.#c = new x(), this.#l = !1, this.provideAddNodeOptions = async (e, t) => await this.#u([this.triggers.provideAddNodeOptions(e, t), this.connectors.provideAddNodeOptions(e, t)], t), this.browseAddNodeOptions = async (e) => await this.#u([this.triggers.browseAddNodeOptions(e), this.connectors.browseAddNodeOptions(e)], e), this.provideAddNodeOptionChoices = async (e, t) => {
2713
+ constructor(r, i, a = () => crypto.randomUUID(), o = L(), s = qt, c = !0) {
2714
+ this.#t = new F(), this.#r = t(), this.#a = t([]), this.#o = t(!1), this.#s = t(!1), this.#c = new F(), this.#l = !1, this.provideAddNodeOptions = async (e, t) => await this.#u([this.triggers.provideAddNodeOptions(e, t), this.connectors.provideAddNodeOptions(e, t)], t), this.browseAddNodeOptions = async (e) => await this.#u([this.triggers.browseAddNodeOptions(e), this.connectors.browseAddNodeOptions(e)], e), this.provideAddNodeOptionChoices = async (e, t) => {
2659
2715
  if (!e.startsWith("trigger:")) return await this.connectors.provideAddNodeOptionChoices(e, t);
2660
2716
  }, this.#e = r, this.#n = o, this.#i = c;
2661
2717
  let l = (e) => {
2662
2718
  this.#l || this.#r.set(e);
2663
2719
  };
2664
- this.runs = new O(r, l, o), this.workspace = new Lt(r, l, it, o, (e) => void this.#d(r, e)), this.connectors = new yt(r, this.workspace, l, s, o), this.triggers = new Ct(r, this.workspace, l, s, o), this.publications = new ct(r, this.workspace, l, i, a, o), this.runRequests = new pt(r, this.runs, l, o, a);
2665
- let u = /* @__PURE__ */ new Map(), d, f = n((e) => {
2720
+ this.runs = new Re(r, l, o), this.workspace = new Ut(r, l, lt, o, (e) => {
2721
+ e.kind == "run.created" ? this.#d(r, e) : this.runs.changed(e.runId);
2722
+ }), this.connectors = new Tt(r, this.workspace, l, s, o), this.triggers = new kt(r, this.workspace, l, s, o), this.publications = new pt(r, this.workspace, l, i, a, o), this.runRequests = new vt(r, this.runs, l, o, a);
2723
+ let u = n((e) => {
2724
+ let t = e(this.workspace.$.diagnostics);
2725
+ if (t == null) return;
2726
+ let n = e(this.connectors.$.diagnostics);
2727
+ return n.length == 0 ? t : {
2728
+ ...t,
2729
+ diagnostics: [...t.diagnostics, ...n],
2730
+ valid: !1
2731
+ };
2732
+ }), d = /* @__PURE__ */ new Map(), f, p = n((e) => {
2666
2733
  let t = e(this.workspace.$.draft);
2667
- d != t?.flowId && (u.clear(), d = t?.flowId);
2668
- let n = e(this.workspace.$.target), r = e(this.workspace.$.presentation)?.value, i = e(this.workspace.$.diagnostics)?.diagnostics, a = e(this.connectors.$.actions), s = e(this.connectors.$.catalogs), c = e(o.t$), l = e(this.runs.$.run), f = e(this.runs.$.events), p = e(this.#a), m = e(this.#o), h = e(this.#s), g = n == null ? "" : n.kind == "flow" ? "flow" : `subflow:${n.id}`, _ = [
2669
- ...zt(t, n),
2670
- r == null || n == null ? void 0 : se(r, n),
2734
+ f != t?.flowId && (d.clear(), f = t?.flowId);
2735
+ let n = e(this.workspace.$.target), r = e(this.workspace.$.presentation)?.value, i = e(u)?.diagnostics ?? e(this.connectors.$.diagnostics), a = e(this.connectors.$.actions), s = e(this.connectors.$.catalogs), c = e(o.t$), l = e(this.runs.$.run), p = e(this.runs.$.events), m = e(this.#a), h = e(this.#o), g = e(this.#s), _ = n == null ? "" : n.kind == "flow" ? "flow" : `subflow:${n.id}`, v = [
2736
+ ...Gt(t, n),
2737
+ r == null || n == null ? void 0 : M(r, n),
2671
2738
  i,
2672
2739
  a,
2673
2740
  s,
2674
2741
  c,
2675
2742
  l,
2676
- f,
2677
2743
  p,
2678
2744
  m,
2679
2745
  h,
2746
+ g,
2680
2747
  ...l == null ? [] : [t?.revisionId]
2681
- ], v = u.get(g);
2682
- if (v != null && v.inputs.length == _.length && v.inputs.every((e, t) => e === _[t])) return v.graph;
2683
- let y = M(t, n, r, i, a, s, c, l, f, p, m, h, this.#i);
2684
- return u.set(g, {
2685
- graph: y,
2686
- inputs: _
2687
- }), y;
2688
- }), p = e(f, Rt);
2748
+ ], y = d.get(_);
2749
+ if (y != null && y.inputs.length == v.length && y.inputs.every((e, t) => e === v[t])) return y.graph;
2750
+ let b = j(t, n, r, i, a, s, c, l, p, m, h, g, this.#i);
2751
+ return d.set(_, {
2752
+ graph: b,
2753
+ inputs: v
2754
+ }), b;
2755
+ }), m = e(p, Wt);
2689
2756
  this.$ = {
2690
2757
  busy: n((e) => {
2691
2758
  let t = e(this.workspace.$.busy);
@@ -2696,13 +2763,15 @@ var Vt = { openExternalPage: async () => !1 }, Ht = class {
2696
2763
  if (e(this.publications.$.rollingBackPublicationId) != null) return "rollback";
2697
2764
  if (e(this.publications.$.changingTriggerId) != null) return "trigger";
2698
2765
  }),
2699
- designer: f,
2700
- designerNodeById: p,
2766
+ diagnosticItems: n((e) => E(e(this.workspace.$.revision), e(this.workspace.$.target), e(u))),
2767
+ diagnostics: u,
2768
+ designer: p,
2769
+ designerNodeById: m,
2701
2770
  notice: this.#r,
2702
- runEventNodes: n((e) => Bt(e(this.workspace.$.draft), e(this.workspace.$.target), e(this.runs.$.run), e(this.runs.$.events), e(p))),
2771
+ runEventNodes: n((e) => Kt(e(this.workspace.$.draft), e(this.workspace.$.target), e(this.runs.$.run), e(this.runs.$.events), e(m))),
2703
2772
  selectedDesignerNode: n((e) => {
2704
2773
  let t = e(this.workspace.$.selectedNodeIds);
2705
- return t.length == 1 ? e(p).get(t[0]) : void 0;
2774
+ return t.length == 1 ? e(m).get(t[0]) : void 0;
2706
2775
  }),
2707
2776
  variableNames: this.#a,
2708
2777
  variableNamesLoaded: this.#o,
@@ -2732,7 +2801,7 @@ var Vt = { openExternalPage: async () => !1 }, Ht = class {
2732
2801
  if (!e() || this.#l) return;
2733
2802
  this.#a.set(t.map((e) => e.name)), this.#o.set(!0);
2734
2803
  } catch (t) {
2735
- e() && !this.#l && this.#r.set(B(t, this.#n.t));
2804
+ e() && !this.#l && this.#r.set(D(t, this.#n.t));
2736
2805
  } finally {
2737
2806
  e() && !this.#l && this.#s.set(!1);
2738
2807
  }
@@ -2758,6 +2827,10 @@ var Vt = { openExternalPage: async () => !1 }, Ht = class {
2758
2827
  let t = this.$.runEventNodes.value.get(e);
2759
2828
  return t != null && this.workspace.locateNode(t);
2760
2829
  }
2830
+ locateRunWait() {
2831
+ let e = this.runs.$.run.value;
2832
+ return e?.status == "waiting" && "waiting" in e && e.waiting != null && this.workspace.locateNode(e.waiting.nodeId);
2833
+ }
2761
2834
  async addNode(e, t, n) {
2762
2835
  if (e.kind == "trigger" && "trigger" in e && e.trigger.kind == "connect") {
2763
2836
  await this.triggers.connect(e.trigger.provider);
@@ -2771,7 +2844,7 @@ var Vt = { openExternalPage: async () => !1 }, Ht = class {
2771
2844
  if (t.aborted || this.#l) return;
2772
2845
  let r = n.filter((e) => e.status == "rejected");
2773
2846
  if (r.length > 0 && r.length == n.length) throw r[0].reason;
2774
- return r.length > 0 && this.#r.set(B(r[0].reason, this.#n.t)), n.flatMap((e) => e.status == "fulfilled" ? e.value ?? [] : []);
2847
+ return r.length > 0 && this.#r.set(D(r[0].reason, this.#n.t)), n.flatMap((e) => e.status == "fulfilled" ? e.value ?? [] : []);
2775
2848
  }
2776
2849
  async refreshSelectedConnector(e = !1) {
2777
2850
  await this.connectors.refresh(e);
@@ -2796,9 +2869,9 @@ var Vt = { openExternalPage: async () => !1 }, Ht = class {
2796
2869
  return;
2797
2870
  }
2798
2871
  }
2799
- }, Ut = ze(() => import("./flowWorkspace-DAMLVMcF.js").then((e) => e.t));
2800
- function Wt({ action: e, description: t, error: n, onSubmit: r, onTokenChange: i, pending: a = !1, title: o, token: s, tokenLabel: f }) {
2801
- let g = s != null && f != null && i != null, _ = s ?? "", v = /* @__PURE__ */ G(Ve, { children: [
2872
+ }, Yt = We(() => import("./flowWorkspace-BewofPeU.js").then((e) => e.t));
2873
+ function Xt({ action: e, description: t, error: n, onSubmit: r, onTokenChange: i, pending: a = !1, title: o, token: l, tokenLabel: f }) {
2874
+ let p = l != null && f != null && i != null, h = l ?? "", _ = /* @__PURE__ */ G(Ke, { children: [
2802
2875
  /* @__PURE__ */ W("div", {
2803
2876
  "aria-hidden": "true",
2804
2877
  className: "flex size-10 items-center justify-center rounded-lg bg-muted text-muted-foreground",
@@ -2829,21 +2902,21 @@ function Wt({ action: e, description: t, error: n, onSubmit: r, onTokenChange: i
2829
2902
  children: t
2830
2903
  })]
2831
2904
  }),
2832
- g && /* @__PURE__ */ W(h, { children: /* @__PURE__ */ G(u, {
2905
+ p && /* @__PURE__ */ W(v, { children: /* @__PURE__ */ G(g, {
2833
2906
  "data-invalid": n != null,
2834
2907
  children: [
2835
- /* @__PURE__ */ W(m, {
2908
+ /* @__PURE__ */ W(d, {
2836
2909
  htmlFor: "session-token",
2837
2910
  children: f
2838
2911
  }),
2839
- /* @__PURE__ */ W(c, {
2912
+ /* @__PURE__ */ W(s, {
2840
2913
  autoComplete: "username",
2841
2914
  name: "username",
2842
2915
  type: "hidden",
2843
2916
  value: "open-flow",
2844
2917
  readOnly: !0
2845
2918
  }),
2846
- /* @__PURE__ */ W(c, {
2919
+ /* @__PURE__ */ W(s, {
2847
2920
  autoComplete: "current-password",
2848
2921
  "aria-invalid": n != null,
2849
2922
  autoFocus: !0,
@@ -2853,21 +2926,21 @@ function Wt({ action: e, description: t, error: n, onSubmit: r, onTokenChange: i
2853
2926
  onChange: (e) => i?.(e.target.value),
2854
2927
  spellCheck: !1,
2855
2928
  type: "password",
2856
- value: _
2929
+ value: h
2857
2930
  }),
2858
- n != null && /* @__PURE__ */ W(l, { children: n })
2931
+ n != null && /* @__PURE__ */ W(m, { children: n })
2859
2932
  ]
2860
2933
  }) }),
2861
- e != null && r != null && /* @__PURE__ */ G(p, {
2862
- disabled: a || g && _.length == 0,
2934
+ e != null && r != null && /* @__PURE__ */ G(c, {
2935
+ disabled: a || p && h.length == 0,
2863
2936
  size: "lg",
2864
2937
  type: "submit",
2865
- children: [a && /* @__PURE__ */ W(d, {
2938
+ children: [a && /* @__PURE__ */ W(u, {
2866
2939
  "aria-label": e,
2867
2940
  "data-icon": "inline-start"
2868
2941
  }), e]
2869
2942
  }),
2870
- a && e == null && /* @__PURE__ */ W(d, { "aria-label": t })
2943
+ a && e == null && /* @__PURE__ */ W(u, { "aria-label": t })
2871
2944
  ] }), y = "m-auto flex w-full max-w-[420px] flex-col gap-5 rounded-xl bg-card p-6 shadow-lg shadow-black/10";
2872
2945
  return /* @__PURE__ */ W("main", {
2873
2946
  className: "open-flow-workbench",
@@ -2876,112 +2949,114 @@ function Wt({ action: e, description: t, error: n, onSubmit: r, onTokenChange: i
2876
2949
  children: r == null ? /* @__PURE__ */ W("section", {
2877
2950
  "aria-busy": a,
2878
2951
  className: y,
2879
- children: v
2952
+ children: _
2880
2953
  }) : /* @__PURE__ */ W("form", {
2881
2954
  "aria-busy": a,
2882
2955
  className: y,
2883
2956
  onSubmit: r,
2884
- children: v
2957
+ children: _
2885
2958
  })
2886
2959
  })
2887
2960
  });
2888
2961
  }
2889
- function Gt({ host: e, store: t }) {
2962
+ function Zt({ host: e, store: t }) {
2890
2963
  let n = a(t.$.notice);
2891
2964
  return H(() => e.notify(n), [e, n]), H(() => () => e.notify(void 0), [e]), null;
2892
2965
  }
2893
- function Kt({ createFlow: e, createFlowDisabled: t, createFlowField: n, flowBadges: r, hrefFor: i, hostAction: o, hostTitle: s, language: c, navigation: l, onConfigureConnector: u, onHostAction: d, onLanguageChange: f, store: p, theme: m }) {
2894
- let h = a(p.workspace.$.flowId);
2966
+ function Qt({ catalogWidth: e, createFlow: t, createFlowDisabled: n, createFlowField: r, flowBadges: i, hrefFor: o, hostAction: s, hostTitle: c, language: l, navigation: u, onConfigureConnector: d, onHostAction: f, onLanguageChange: p, store: m, theme: h }) {
2967
+ let g = a(m.workspace.$.flowId);
2895
2968
  return /* @__PURE__ */ W("div", {
2896
2969
  className: "app-shell",
2897
- children: h == null ? /* @__PURE__ */ W(Ye, {
2898
- createFlowDisabled: t,
2899
- createFlowField: n,
2900
- flowBadges: r,
2901
- hrefForFlow: (e) => i({
2970
+ children: g == null ? /* @__PURE__ */ W(et, {
2971
+ catalogWidth: e,
2972
+ createFlowDisabled: n,
2973
+ createFlowField: r,
2974
+ flowBadges: i,
2975
+ hrefForFlow: (e) => o({
2902
2976
  flowId: e.flowId,
2903
2977
  view: "design"
2904
2978
  }),
2905
- hostAction: o,
2906
- hostTitle: s,
2907
- language: c,
2908
- onCreateFlow: (t) => l.createFlow(t, e),
2909
- onHostAction: d,
2910
- onLanguageChange: f,
2911
- onSelectFlow: (e) => void l.selectFlow(e),
2912
- store: p
2913
- }) : /* @__PURE__ */ W(Re, {
2979
+ hostAction: s,
2980
+ hostTitle: c,
2981
+ language: l,
2982
+ onCreateFlow: (e) => u.createFlow(e, t),
2983
+ onHostAction: f,
2984
+ onLanguageChange: p,
2985
+ onSelectFlow: (e) => void u.selectFlow(e),
2986
+ store: m
2987
+ }) : /* @__PURE__ */ W(Ue, {
2914
2988
  fallback: /* @__PURE__ */ W("main", {
2915
2989
  "aria-busy": "true",
2916
2990
  className: "workspace"
2917
2991
  }),
2918
- children: /* @__PURE__ */ W(Ut, {
2919
- hostAction: o,
2920
- hostTitle: s,
2921
- hrefFor: i,
2922
- navigation: l,
2923
- onConfigureConnector: u,
2924
- onHostAction: d,
2925
- store: p,
2926
- theme: m
2992
+ children: /* @__PURE__ */ W(Yt, {
2993
+ hostAction: s,
2994
+ hostTitle: c,
2995
+ hrefFor: o,
2996
+ navigation: u,
2997
+ onConfigureConnector: d,
2998
+ onHostAction: f,
2999
+ store: m,
3000
+ theme: h
2927
3001
  })
2928
3002
  })
2929
3003
  });
2930
3004
  }
2931
- function qt({ createFlow: e, createFlowDisabled: t, createFlowField: n, flowBadges: r, host: i, hostAction: a, hostTitle: s, hrefFor: c, language: l, location: u, onConfigureConnector: d, onHostAction: f, onLanguageChange: p, onNavigate: m, preferences: h, theme: g, variables: _ = !0 }) {
2932
- let v = Be(m);
2933
- v.current = m;
2934
- let [{ i18n: y, navigation: b, store: x }] = U(() => {
2935
- let e = E(l), t = new Ht(new k((e, t) => i.request(e, t), (e, t) => i.subscribeFlow(e, t), (e) => i.subscribeFlowCatalog(e)), h, () => crypto.randomUUID(), e, i, _);
3005
+ function $t({ catalogWidth: e, createFlow: t, createFlowDisabled: n, createFlowField: r, flowBadges: i, host: a, hostAction: s, hostTitle: c, hrefFor: l, language: u, location: d, onConfigureConnector: f, onHostAction: p, onLanguageChange: m, onNavigate: h, preferences: g, theme: _, variables: v = !0 }) {
3006
+ let y = Ge(h);
3007
+ y.current = h;
3008
+ let [{ i18n: b, navigation: x, store: S }] = U(() => {
3009
+ let e = L(u), t = new Jt(new Ee((e, t) => a.request(e, t), (e, t) => a.subscribeFlow(e, t), (e) => a.subscribeFlowCatalog(e)), g, () => crypto.randomUUID(), e, a, v);
2936
3010
  return {
2937
3011
  i18n: e,
2938
- navigation: new He(t, u, (e, t) => v.current(e, t)),
3012
+ navigation: new qe(t, d, (e, t) => y.current(e, t)),
2939
3013
  store: t
2940
3014
  };
2941
3015
  });
2942
3016
  return H(() => {
2943
- b.start();
3017
+ x.start();
2944
3018
  let e = () => {
2945
- x.connectors.refreshAfterAuthorization(), x.triggers.refreshAfterAuthorization(), x.refreshVariableNames();
3019
+ S.connectors.refreshAfterAuthorization(), S.triggers.refreshAfterAuthorization(), S.refreshVariableNames();
2946
3020
  };
2947
3021
  return globalThis.addEventListener("focus", e), () => {
2948
- globalThis.removeEventListener("focus", e), b.dispose(), x.dispose(), y.dispose();
3022
+ globalThis.removeEventListener("focus", e), x.dispose(), S.dispose(), b.dispose();
2949
3023
  };
2950
3024
  }, [
2951
- y,
2952
3025
  b,
2953
- x
2954
- ]), H(() => void b.apply(u), [u, b]), H(() => {
2955
- y.lang != l && y.switchLang(l);
2956
- }, [y, l]), /* @__PURE__ */ W(o, {
2957
- i18n: y,
3026
+ x,
3027
+ S
3028
+ ]), H(() => void x.apply(d), [d, x]), H(() => {
3029
+ b.lang != u && b.switchLang(u);
3030
+ }, [b, u]), /* @__PURE__ */ W(o, {
3031
+ i18n: b,
2958
3032
  children: /* @__PURE__ */ G("div", {
2959
3033
  className: "open-flow-theme open-flow-workbench",
2960
- "data-theme": g,
2961
- children: [/* @__PURE__ */ W(Gt, {
2962
- host: i,
2963
- store: x
2964
- }), /* @__PURE__ */ W(Kt, {
2965
- createFlow: e,
2966
- createFlowDisabled: t,
2967
- createFlowField: n,
2968
- flowBadges: r,
2969
- hostAction: a,
2970
- hostTitle: s,
2971
- hrefFor: c,
2972
- language: l,
2973
- navigation: b,
2974
- onConfigureConnector: d,
2975
- onHostAction: f,
2976
- onLanguageChange: p,
2977
- store: x,
2978
- theme: g
3034
+ "data-theme": _,
3035
+ children: [/* @__PURE__ */ W(Zt, {
3036
+ host: a,
3037
+ store: S
3038
+ }), /* @__PURE__ */ W(Qt, {
3039
+ catalogWidth: e,
3040
+ createFlow: t,
3041
+ createFlowDisabled: n,
3042
+ createFlowField: r,
3043
+ flowBadges: i,
3044
+ hostAction: s,
3045
+ hostTitle: c,
3046
+ hrefFor: l,
3047
+ language: u,
3048
+ navigation: x,
3049
+ onConfigureConnector: f,
3050
+ onHostAction: p,
3051
+ onLanguageChange: m,
3052
+ store: S,
3053
+ theme: _
2979
3054
  })]
2980
3055
  })
2981
3056
  });
2982
3057
  }
2983
- function Jt({ sessionKey: e, ...t }) {
2984
- return /* @__PURE__ */ W(qt, { ...t }, e);
3058
+ function en({ sessionKey: e, ...t }) {
3059
+ return /* @__PURE__ */ W($t, { ...t }, e);
2985
3060
  }
2986
3061
  //#endregion
2987
- export { Wt as OpenFlowSessionGate, Jt as OpenFlowWorkbench, Ie as isWorkbenchLanguage, Le as resolveWorkbenchLanguage, Fe as workbenchLanguageNames, V as workbenchLanguages };
3062
+ export { Xt as OpenFlowSessionGate, en as OpenFlowWorkbench, Ve as isWorkbenchLanguage, He as resolveWorkbenchLanguage, Be as workbenchLanguageNames, ze as workbenchLanguages };