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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,13 +1,13 @@
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
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 _e, f as ve, g as ye, h as be, i as xe, j as I, jt as Se, kt as Ce, l as we, m as Te, n as Ee, p as De, q as Oe, s as ke, t as Ae, u as je, v as Me, w as Ne, wt as L, x as Pe, y as Fe, z as R } from "./diagnostics-BGoGFvHA.js";
5
- import { t as Ie } from "./workbenchSelect-B2s1HV-Y.js";
6
- import { a as Le, i as Re, n as ze, r as Be } from "./languages-DgJehE1g.js";
7
- import { Suspense as Ve, lazy as He, useEffect as z, useRef as Ue, useState as B } from "react";
8
- import { Fragment as We, jsx as V, jsxs as H } from "react/jsx-runtime";
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";
9
9
  //#region src/workbench/browser/runtime/navigation.ts
10
- var Ge = class {
10
+ var He = class {
11
11
  #e;
12
12
  #t;
13
13
  #n;
@@ -66,7 +66,7 @@ var Ge = class {
66
66
  this.#s = !0, await this.#n.selectFlow(void 0), e == this.#i && (this.#u("design", !1), this.#s = !1);
67
67
  }
68
68
  async apply(e) {
69
- if (Ke(e, this.#t)) return;
69
+ if (Ue(e, this.#t)) return;
70
70
  this.#t = e;
71
71
  let t = ++this.#i;
72
72
  this.#s = !0;
@@ -82,37 +82,37 @@ var Ge = class {
82
82
  flowId: this.#n.workspace.$.flowId.value,
83
83
  view: e
84
84
  };
85
- Ke(n, this.#t) || (this.#t = n, this.#e(n, { replace: t })), this.#r.set(e);
85
+ Ue(n, this.#t) || (this.#t = n, this.#e(n, { replace: t })), this.#r.set(e);
86
86
  }
87
87
  };
88
- function Ke(e, t) {
88
+ function Ue(e, t) {
89
89
  return e.flowId == t.flowId && e.view == t.view;
90
90
  }
91
91
  //#endregion
92
92
  //#region src/workbench/browser/runtime/shell/resourceBrowser.tsx
93
- var qe = He(() => import("./createResourceDialog-DXQz0thK.js")), Je = Le.map((e) => ({
94
- label: Re[e],
93
+ var We = ze(() => import("./createResourceDialog-BkZns-oZ.js")), Ge = V.map((e) => ({
94
+ label: Fe[e],
95
95
  value: e
96
96
  }));
97
- function Ye({ language: e, onLanguageChange: t }) {
98
- let n = r(), [i, a] = B(null);
99
- return t == null ? null : /* @__PURE__ */ H("div", {
97
+ function Ke({ language: e, onLanguageChange: t }) {
98
+ let n = r(), [i, a] = U(null);
99
+ return t == null ? null : /* @__PURE__ */ G("div", {
100
100
  className: "resource-language",
101
101
  ref: a,
102
- children: [/* @__PURE__ */ V("span", {
102
+ children: [/* @__PURE__ */ W("span", {
103
103
  className: "sr-only",
104
104
  children: n("language.label")
105
- }), /* @__PURE__ */ V(Ie, {
105
+ }), /* @__PURE__ */ W(Pe, {
106
106
  ariaLabel: n("language.label"),
107
107
  onValueChange: (e) => t(e),
108
- options: Je,
108
+ options: Ge,
109
109
  portalRoot: i,
110
110
  value: e
111
111
  })]
112
112
  });
113
113
  }
114
- function Xe({ badge: e, busy: t, flow: n, href: a, onSelect: o, store: s }) {
115
- let l = i(), u = r(), [d, m] = B("idle"), [h, y] = B(n.name), b = v(h);
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);
116
116
  async function x(e) {
117
117
  e.preventDefault();
118
118
  let t = h.trim();
@@ -121,10 +121,10 @@ function Xe({ badge: e, busy: t, flow: n, href: a, onSelect: o, store: s }) {
121
121
  async function S() {
122
122
  await s.workspace.deleteFlow(n.flowId) && m("idle");
123
123
  }
124
- return /* @__PURE__ */ H("div", {
124
+ return /* @__PURE__ */ G("div", {
125
125
  className: "resource-item-row",
126
126
  children: [
127
- /* @__PURE__ */ H(p, {
127
+ /* @__PURE__ */ G(p, {
128
128
  "aria-disabled": n.status == "retiring",
129
129
  className: "resource-list-row flow-columns",
130
130
  nativeButton: !1,
@@ -135,48 +135,48 @@ function Xe({ badge: e, busy: t, flow: n, href: a, onSelect: o, store: s }) {
135
135
  }
136
136
  C(e, () => o(n));
137
137
  },
138
- render: /* @__PURE__ */ V("a", { href: n.status == "retiring" ? void 0 : a }),
138
+ render: /* @__PURE__ */ W("a", { href: n.status == "retiring" ? void 0 : a }),
139
139
  tabIndex: n.status == "retiring" ? -1 : void 0,
140
140
  variant: "ghost",
141
141
  children: [
142
- /* @__PURE__ */ H("span", {
142
+ /* @__PURE__ */ G("span", {
143
143
  className: "resource-primary-cell",
144
- children: [/* @__PURE__ */ V("span", {
144
+ children: [/* @__PURE__ */ W("span", {
145
145
  className: "resource-icon",
146
- children: /* @__PURE__ */ V(f, { name: "flow" })
147
- }), /* @__PURE__ */ H("span", { children: [/* @__PURE__ */ H("span", {
146
+ children: /* @__PURE__ */ W(f, { name: "flow" })
147
+ }), /* @__PURE__ */ G("span", { children: [/* @__PURE__ */ G("span", {
148
148
  className: "flex min-w-0 items-center gap-2",
149
- children: [/* @__PURE__ */ V("strong", {
149
+ children: [/* @__PURE__ */ W("strong", {
150
150
  className: "min-w-0 truncate",
151
151
  children: n.name
152
- }), e != null && /* @__PURE__ */ V(ce, {
152
+ }), e != null && /* @__PURE__ */ W(ce, {
153
153
  className: "min-w-0 shrink",
154
154
  title: e,
155
155
  variant: "secondary",
156
- children: /* @__PURE__ */ V("span", {
156
+ children: /* @__PURE__ */ W("span", {
157
157
  className: "truncate",
158
158
  children: e
159
159
  })
160
160
  })]
161
- }), /* @__PURE__ */ V("code", {
161
+ }), /* @__PURE__ */ W("code", {
162
162
  translate: "no",
163
163
  children: n.flowId
164
164
  })] })]
165
165
  }),
166
- /* @__PURE__ */ V("time", {
166
+ /* @__PURE__ */ W("time", {
167
167
  dateTime: n.updatedAt,
168
168
  children: new Date(n.updatedAt).toLocaleString(l)
169
169
  }),
170
- /* @__PURE__ */ H("span", {
170
+ /* @__PURE__ */ G("span", {
171
171
  className: `resource-status ${n.status == "active" ? "active" : "warning"}`,
172
- children: [/* @__PURE__ */ V("span", {
172
+ children: [/* @__PURE__ */ W("span", {
173
173
  "aria-hidden": "true",
174
174
  className: `status-dot ${n.status == "active" ? "success" : "running"}`
175
175
  }), u(n.status == "active" ? "resource.active" : "resource.retiring")]
176
176
  })
177
177
  ]
178
178
  }),
179
- n.status == "active" && /* @__PURE__ */ V(p, {
179
+ n.status == "active" && /* @__PURE__ */ W(p, {
180
180
  "aria-expanded": d != "idle",
181
181
  "aria-label": u("sidebar.flowActions", { name: n.name }),
182
182
  className: _("resource-row-more", d != "idle" && "active"),
@@ -184,35 +184,35 @@ function Xe({ badge: e, busy: t, flow: n, href: a, onSelect: o, store: s }) {
184
184
  onClick: () => m(d == "idle" ? "actions" : "idle"),
185
185
  size: "icon-sm",
186
186
  variant: "ghost",
187
- children: /* @__PURE__ */ V(f, { name: "more" })
187
+ children: /* @__PURE__ */ W(f, { name: "more" })
188
188
  }),
189
- d == "actions" && /* @__PURE__ */ H("div", {
189
+ d == "actions" && /* @__PURE__ */ G("div", {
190
190
  className: "resource-row-actions",
191
- children: [/* @__PURE__ */ V(p, {
191
+ children: [/* @__PURE__ */ W(p, {
192
192
  onClick: () => {
193
193
  y(n.name), m("rename");
194
194
  },
195
195
  size: "sm",
196
196
  variant: "outline",
197
197
  children: u("common.rename")
198
- }), /* @__PURE__ */ V(p, {
198
+ }), /* @__PURE__ */ W(p, {
199
199
  onClick: () => m("delete"),
200
200
  size: "sm",
201
201
  variant: "destructive",
202
202
  children: u("common.delete")
203
203
  })]
204
204
  }),
205
- d == "rename" && /* @__PURE__ */ H("form", {
205
+ d == "rename" && /* @__PURE__ */ G("form", {
206
206
  className: "resource-row-form",
207
207
  onSubmit: (e) => void x(e),
208
208
  children: [
209
- /* @__PURE__ */ V(g, {
209
+ /* @__PURE__ */ W(g, {
210
210
  htmlFor: `rename-flow-${n.flowId}`,
211
211
  children: u("sidebar.renameFlow", { name: n.name })
212
212
  }),
213
- /* @__PURE__ */ H("span", {
213
+ /* @__PURE__ */ G("span", {
214
214
  className: "resource-row-field",
215
- children: [/* @__PURE__ */ V(c, {
215
+ children: [/* @__PURE__ */ W(c, {
216
216
  autoComplete: "off",
217
217
  "aria-invalid": h.length > 0 && b != null,
218
218
  autoFocus: !0,
@@ -221,17 +221,17 @@ function Xe({ badge: e, busy: t, flow: n, href: a, onSelect: o, store: s }) {
221
221
  onChange: (e) => y(e.target.value),
222
222
  required: !0,
223
223
  value: h
224
- }), h.length > 0 && b != null && /* @__PURE__ */ V("small", {
224
+ }), h.length > 0 && b != null && /* @__PURE__ */ W("small", {
225
225
  className: "resource-name-message error",
226
226
  children: u(`resource.nameIssue.${b}`, { max: 80 })
227
227
  })]
228
228
  }),
229
- /* @__PURE__ */ H("div", { children: [/* @__PURE__ */ V(p, {
229
+ /* @__PURE__ */ G("div", { children: [/* @__PURE__ */ W(p, {
230
230
  onClick: () => m("idle"),
231
231
  size: "sm",
232
232
  variant: "outline",
233
233
  children: u("common.cancel")
234
- }), /* @__PURE__ */ V(p, {
234
+ }), /* @__PURE__ */ W(p, {
235
235
  disabled: t != null || b != null,
236
236
  size: "sm",
237
237
  type: "submit",
@@ -239,16 +239,16 @@ function Xe({ badge: e, busy: t, flow: n, href: a, onSelect: o, store: s }) {
239
239
  })] })
240
240
  ]
241
241
  }),
242
- d == "delete" && /* @__PURE__ */ H("div", {
242
+ d == "delete" && /* @__PURE__ */ G("div", {
243
243
  className: "resource-row-confirm",
244
244
  role: "group",
245
245
  "aria-label": u("sidebar.deleteFlow", { name: n.name }),
246
- children: [/* @__PURE__ */ V("span", { children: /* @__PURE__ */ V("strong", { children: u("sidebar.deleteFlowConfirm", { name: n.name }) }) }), /* @__PURE__ */ H("div", { children: [/* @__PURE__ */ V(p, {
246
+ children: [/* @__PURE__ */ W("span", { children: /* @__PURE__ */ W("strong", { children: u("sidebar.deleteFlowConfirm", { name: n.name }) }) }), /* @__PURE__ */ G("div", { children: [/* @__PURE__ */ W(p, {
247
247
  onClick: () => m("idle"),
248
248
  size: "sm",
249
249
  variant: "outline",
250
250
  children: u("common.cancel")
251
- }), /* @__PURE__ */ V(p, {
251
+ }), /* @__PURE__ */ W(p, {
252
252
  disabled: t != null,
253
253
  onClick: () => void S(),
254
254
  size: "sm",
@@ -259,56 +259,56 @@ function Xe({ badge: e, busy: t, flow: n, href: a, onSelect: o, store: s }) {
259
259
  ]
260
260
  });
261
261
  }
262
- function Ze() {
263
- return /* @__PURE__ */ H("div", {
262
+ function Je() {
263
+ return /* @__PURE__ */ G("div", {
264
264
  "aria-hidden": "true",
265
265
  className: "resource-list-row resource-skeleton-row flow-columns",
266
266
  children: [
267
- /* @__PURE__ */ H("span", {
267
+ /* @__PURE__ */ G("span", {
268
268
  className: "resource-primary-cell",
269
- children: [/* @__PURE__ */ V(L, { className: "size-8 shrink-0" }), /* @__PURE__ */ H("span", {
269
+ children: [/* @__PURE__ */ W(z, { className: "size-8 shrink-0" }), /* @__PURE__ */ G("span", {
270
270
  className: "resource-skeleton-copy",
271
- children: [/* @__PURE__ */ V(L, { className: "h-3.5 w-36" }), /* @__PURE__ */ V(L, { className: "h-2.5 w-48 max-w-full" })]
271
+ children: [/* @__PURE__ */ W(z, { className: "h-3.5 w-36" }), /* @__PURE__ */ W(z, { className: "h-2.5 w-48 max-w-full" })]
272
272
  })]
273
273
  }),
274
- /* @__PURE__ */ V(L, { className: "h-3 w-28" }),
275
- /* @__PURE__ */ V(L, { className: "h-3 w-16" })
274
+ /* @__PURE__ */ W(z, { className: "h-3 w-28" }),
275
+ /* @__PURE__ */ W(z, { className: "h-3 w-16" })
276
276
  ]
277
277
  });
278
278
  }
279
- function Qe({ 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] = B(!1), [O, re] = B(""), [k, A] = B(""), j = O.trim().toLocaleLowerCase(), M = T.filter((e) => e.name.toLocaleLowerCase().includes(j));
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
281
  async function se(e) {
282
282
  e.preventDefault();
283
283
  let t = k.trim();
284
284
  v(t) != null || !await l(t) || (D(!1), A(""));
285
285
  }
286
- return /* @__PURE__ */ V("main", {
286
+ return /* @__PURE__ */ W("main", {
287
287
  className: "resource-browser",
288
- children: /* @__PURE__ */ H("div", {
288
+ children: /* @__PURE__ */ G("div", {
289
289
  className: "resource-page",
290
290
  children: [
291
- /* @__PURE__ */ H("header", {
291
+ /* @__PURE__ */ G("header", {
292
292
  className: "resource-page-header",
293
- children: [/* @__PURE__ */ V("div", {
293
+ children: [/* @__PURE__ */ W("div", {
294
294
  className: "resource-heading",
295
- children: /* @__PURE__ */ V("h1", { children: g("resource.flows") })
296
- }), /* @__PURE__ */ H("div", {
295
+ children: /* @__PURE__ */ W("h1", { children: g("resource.flows") })
296
+ }), /* @__PURE__ */ G("div", {
297
297
  className: "resource-page-actions",
298
298
  children: [
299
- /* @__PURE__ */ V(Ye, {
299
+ /* @__PURE__ */ W(Ke, {
300
300
  language: c,
301
301
  onLanguageChange: d
302
302
  }),
303
- /* @__PURE__ */ H(p, {
303
+ /* @__PURE__ */ G(p, {
304
304
  disabled: _ != null,
305
305
  onClick: () => D(!0),
306
- children: [/* @__PURE__ */ V(f, {
306
+ children: [/* @__PURE__ */ W(f, {
307
307
  "data-icon": "inline-start",
308
308
  name: "plus"
309
309
  }), g("resource.newFlow")]
310
310
  }),
311
- o != null && s != null && u != null && /* @__PURE__ */ V(Oe, {
311
+ o != null && s != null && u != null && /* @__PURE__ */ W(Ee, {
312
312
  action: o,
313
313
  onAction: u,
314
314
  title: s
@@ -316,26 +316,26 @@ function Qe({ createFlowDisabled: e, createFlowField: t, flowBadges: n, hrefForF
316
316
  ]
317
317
  })]
318
318
  }),
319
- /* @__PURE__ */ H("section", {
319
+ /* @__PURE__ */ G("section", {
320
320
  "aria-labelledby": "flow-list-title",
321
321
  className: "resource-list-section",
322
322
  children: [
323
- /* @__PURE__ */ H("div", {
323
+ /* @__PURE__ */ G("div", {
324
324
  className: "resource-list-title",
325
- children: [/* @__PURE__ */ H("div", {
325
+ children: [/* @__PURE__ */ G("div", {
326
326
  className: "resource-list-heading",
327
- children: [/* @__PURE__ */ V("h2", {
327
+ children: [/* @__PURE__ */ W("h2", {
328
328
  id: "flow-list-title",
329
329
  children: g("resource.allFlows")
330
- }), !S && /* @__PURE__ */ V("span", { children: g("resource.flowCount", { count: E ?? T.length }) })]
331
- }), /* @__PURE__ */ H("div", {
330
+ }), !S && /* @__PURE__ */ W("span", { children: g("resource.flowCount", { count: E ?? T.length }) })]
331
+ }), /* @__PURE__ */ G("div", {
332
332
  className: "resource-list-actions",
333
- children: [/* @__PURE__ */ H(ue, {
333
+ children: [/* @__PURE__ */ G(ue, {
334
334
  className: "w-full sm:w-56",
335
- children: [/* @__PURE__ */ V(te, { children: /* @__PURE__ */ V(f, {
335
+ children: [/* @__PURE__ */ W(te, { children: /* @__PURE__ */ W(f, {
336
336
  name: "search",
337
337
  size: 17
338
- }) }), /* @__PURE__ */ V(ee, {
338
+ }) }), /* @__PURE__ */ W(ee, {
339
339
  autoComplete: "off",
340
340
  "aria-label": g("resource.searchFlows"),
341
341
  name: "flow-search",
@@ -343,67 +343,67 @@ function Qe({ createFlowDisabled: e, createFlowField: t, flowBadges: n, hrefForF
343
343
  placeholder: g("resource.searchFlows"),
344
344
  value: O
345
345
  })]
346
- }), /* @__PURE__ */ V(p, {
346
+ }), /* @__PURE__ */ W(p, {
347
347
  "aria-label": g("common.refresh"),
348
348
  disabled: S || _ != null,
349
349
  onClick: () => void h.workspace.reloadFlows(),
350
350
  size: "icon",
351
351
  title: g("common.refresh"),
352
352
  variant: "outline",
353
- children: /* @__PURE__ */ V(f, { name: "refresh" })
353
+ children: /* @__PURE__ */ W(f, { name: "refresh" })
354
354
  })]
355
355
  })]
356
356
  }),
357
- /* @__PURE__ */ H("div", {
357
+ /* @__PURE__ */ G("div", {
358
358
  "aria-hidden": "true",
359
359
  className: "resource-list-columns flow-columns",
360
360
  children: [
361
- /* @__PURE__ */ V("span", { children: g("resource.name") }),
362
- /* @__PURE__ */ V("span", { children: g("resource.updated") }),
363
- /* @__PURE__ */ V("span", { children: g("resource.status") })
361
+ /* @__PURE__ */ W("span", { children: g("resource.name") }),
362
+ /* @__PURE__ */ W("span", { children: g("resource.updated") }),
363
+ /* @__PURE__ */ W("span", { children: g("resource.status") })
364
364
  ]
365
365
  }),
366
- /* @__PURE__ */ V("div", {
366
+ /* @__PURE__ */ W("div", {
367
367
  className: "resource-list",
368
- children: S ? Array.from({ length: 5 }, (e, t) => /* @__PURE__ */ V(Ze, {}, t)) : y ? /* @__PURE__ */ H(oe, {
368
+ children: S ? Array.from({ length: 5 }, (e, t) => /* @__PURE__ */ W(Je, {}, t)) : y ? /* @__PURE__ */ G(oe, {
369
369
  className: "min-h-64",
370
370
  role: "alert",
371
- children: [/* @__PURE__ */ H(Se, { children: [
372
- /* @__PURE__ */ V(ie, {
371
+ children: [/* @__PURE__ */ G(R, { children: [
372
+ /* @__PURE__ */ W(ie, {
373
373
  variant: "icon",
374
- children: /* @__PURE__ */ V(f, {
374
+ children: /* @__PURE__ */ W(f, {
375
375
  name: "alert",
376
376
  size: 20
377
377
  })
378
378
  }),
379
- /* @__PURE__ */ V(ae, { children: g("resource.flowsLoadFailed") }),
380
- /* @__PURE__ */ V(b, { children: g("resource.flowsLoadFailedDescription") })
381
- ] }), /* @__PURE__ */ V(Ce, { children: /* @__PURE__ */ V(p, {
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
382
  onClick: () => void h.retryFlows(),
383
383
  variant: "outline",
384
384
  children: g("empty.retry")
385
385
  }) })]
386
- }) : M.length == 0 ? /* @__PURE__ */ H(oe, {
386
+ }) : M.length == 0 ? /* @__PURE__ */ G(oe, {
387
387
  className: "min-h-64",
388
- children: [/* @__PURE__ */ H(Se, { children: [
389
- /* @__PURE__ */ V(ie, {
388
+ children: [/* @__PURE__ */ G(R, { children: [
389
+ /* @__PURE__ */ W(ie, {
390
390
  variant: "icon",
391
- children: /* @__PURE__ */ V(f, {
391
+ children: /* @__PURE__ */ W(f, {
392
392
  name: "flow",
393
393
  size: 20
394
394
  })
395
395
  }),
396
- /* @__PURE__ */ V(ae, { children: g(j.length == 0 ? "resource.noFlows" : "resource.noMatchingFlows") }),
397
- /* @__PURE__ */ V(b, { children: g(j.length == 0 ? "resource.noFlowsDescription" : "resource.noMatchingDescription") })
398
- ] }), j.length == 0 && /* @__PURE__ */ V(Ce, { children: /* @__PURE__ */ H(p, {
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
399
  onClick: () => D(!0),
400
400
  variant: "outline",
401
- children: [/* @__PURE__ */ V(f, {
401
+ children: [/* @__PURE__ */ W(f, {
402
402
  "data-icon": "inline-start",
403
403
  name: "plus"
404
404
  }), g("resource.newFlow")]
405
405
  }) })]
406
- }) : M.map((e) => /* @__PURE__ */ V(Xe, {
406
+ }) : M.map((e) => /* @__PURE__ */ W(qe, {
407
407
  badge: n?.[e.flowId],
408
408
  busy: _,
409
409
  flow: e,
@@ -412,9 +412,9 @@ function Qe({ createFlowDisabled: e, createFlowField: t, flowBadges: n, hrefForF
412
412
  store: h
413
413
  }, e.flowId))
414
414
  }),
415
- w != null && /* @__PURE__ */ V("div", {
415
+ w != null && /* @__PURE__ */ W("div", {
416
416
  className: "resource-list-footer",
417
- children: /* @__PURE__ */ V(p, {
417
+ children: /* @__PURE__ */ W(p, {
418
418
  disabled: C,
419
419
  onClick: () => void h.workspace.loadMoreFlows(),
420
420
  variant: "outline",
@@ -423,9 +423,9 @@ function Qe({ createFlowDisabled: e, createFlowField: t, flowBadges: n, hrefForF
423
423
  })
424
424
  ]
425
425
  }),
426
- ne && /* @__PURE__ */ V(Ve, {
426
+ ne && /* @__PURE__ */ W(Re, {
427
427
  fallback: null,
428
- children: /* @__PURE__ */ V(qe, {
428
+ children: /* @__PURE__ */ W(We, {
429
429
  disabled: e,
430
430
  field: t,
431
431
  id: "flow-name",
@@ -445,7 +445,7 @@ function Qe({ createFlowDisabled: e, createFlowField: t, flowBadges: n, hrefForF
445
445
  }
446
446
  //#endregion
447
447
  //#region ../../node_modules/.bun/nanoid@6.0.1/node_modules/nanoid/index.browser.js
448
- var $e = (e) => crypto.getRandomValues(new Uint8Array(e)), et = (e, t, n) => {
448
+ var Xe = (e) => crypto.getRandomValues(new Uint8Array(e)), Ze = (e, t, n) => {
449
449
  let r = 256 - 256 % e.length;
450
450
  if (r === 256) {
451
451
  let r = e.length - 1;
@@ -467,41 +467,41 @@ var $e = (e) => crypto.getRandomValues(new Uint8Array(e)), et = (e, t, n) => {
467
467
  for (; s--;) if (t[s] < r && (o += e[t[s] % e.length], o.length >= a)) return o;
468
468
  }
469
469
  };
470
- }, tt = (e, t = 21) => et(e, t | 0, $e);
470
+ }, Qe = (e, t = 21) => Ze(e, t | 0, Xe);
471
471
  //#endregion
472
472
  //#region src/flow/common/edgeChanges.ts
473
- function nt(e, t, n) {
473
+ function $e(e, t, n) {
474
474
  let r = {
475
475
  source: n.source,
476
476
  sourceHandle: n.sourceHandle,
477
477
  target: n.target,
478
478
  targetHandle: n.targetHandle
479
- }, i = it(e, t)?.nodes[n.target], a = i != null && "inputs" in i ? i.inputs[n.targetHandle] : void 0;
479
+ }, i = tt(e, t)?.nodes[n.target], a = i != null && "inputs" in i ? i.inputs[n.targetHandle] : void 0;
480
480
  return a?.kind == "sources" && a.sources.some((e) => e.kind == "node" && e.nodeId == n.source && e.output == n.sourceHandle) ? [] : fe(e, [{
481
481
  edge: r,
482
482
  kind: "graph.edge.connect",
483
483
  target: t
484
484
  }]);
485
485
  }
486
- function rt(e, t, n) {
486
+ function et(e, t, n) {
487
487
  let r = {
488
488
  source: n.source,
489
489
  sourceHandle: n.sourceHandle,
490
490
  target: n.target,
491
491
  targetHandle: n.targetHandle
492
- }, i = it(e, t)?.nodes[n.target], a = i != null && "inputs" in i ? i.inputs[n.targetHandle] : void 0;
492
+ }, i = tt(e, t)?.nodes[n.target], a = i != null && "inputs" in i ? i.inputs[n.targetHandle] : void 0;
493
493
  return a?.kind != "sources" || !a.sources.some((e) => e.kind == "node" && e.nodeId == n.source && e.output == n.sourceHandle) ? [] : [{
494
494
  edge: r,
495
495
  kind: "graph.edge.disconnect",
496
496
  target: t
497
497
  }];
498
498
  }
499
- function it(e, t) {
499
+ function tt(e, t) {
500
500
  return t.kind == "flow" ? e.document.graph : e.document.subflows[t.id]?.graph;
501
501
  }
502
502
  //#endregion
503
503
  //#region src/flow/common/moduleChanges.ts
504
- async function at(e) {
504
+ async function nt(e) {
505
505
  try {
506
506
  let { parse: t } = await import("./lib-C5Ipyfps.js").then((e) => e.t), n = t(e, {
507
507
  errorRecovery: !0,
@@ -517,7 +517,7 @@ async function at(e) {
517
517
  return [];
518
518
  }
519
519
  }
520
- function ot(e, t, n) {
520
+ function rt(e, t, n) {
521
521
  return [{
522
522
  imports: n,
523
523
  kind: "module.source.replace",
@@ -525,7 +525,7 @@ function ot(e, t, n) {
525
525
  source: t
526
526
  }];
527
527
  }
528
- var st = tt("23456789abcdefghjkmnpqrstuvwxyz", 10), U = {
528
+ var it = Qe("23456789abcdefghjkmnpqrstuvwxyz", 10), K = {
529
529
  activities: [],
530
530
  activitiesLoadFailed: !1,
531
531
  activitiesLoading: !1,
@@ -538,161 +538,169 @@ var st = tt("23456789abcdefghjkmnpqrstuvwxyz", 10), U = {
538
538
  loadingMore: !1,
539
539
  publications: [],
540
540
  publishing: !1
541
- }, ct = 20, lt = 50;
542
- function W(e, t) {
541
+ }, at = 20, ot = 50, st = 750;
542
+ function q(e, t) {
543
543
  return e?.flowId == t.flowId;
544
544
  }
545
- var ut = class {
545
+ var ct = class {
546
546
  #e;
547
547
  #t;
548
548
  #n;
549
549
  #r = new x();
550
550
  #i = new x();
551
- #a = new x();
551
+ #a;
552
552
  #o = new x();
553
- #s;
554
- #c = t(U);
555
- #l;
553
+ #s = new x();
554
+ #c;
555
+ #l = t(K);
556
556
  #u;
557
- constructor(t, n, r, i = () => crypto.randomUUID(), a = E()) {
558
- this.#e = t, this.#t = i, this.#n = a, this.#s = r, this.#l = n, this.$ = {
559
- activities: e(this.#c, (e) => e.activities),
560
- activitiesLoadFailed: e(this.#c, (e) => e.activitiesLoadFailed),
561
- activitiesLoading: e(this.#c, (e) => e.activitiesLoading),
562
- activitiesLoadingMore: e(this.#c, (e) => e.activitiesLoadingMore),
563
- activitiesNextCursor: e(this.#c, (e) => e.activitiesNextCursor),
564
- bindings: e(this.#c, (e) => e.bindings),
565
- changingTriggerId: e(this.#c, (e) => e.changingTriggerId),
566
- detail: e(this.#c, (e) => e.detail),
567
- detailLoading: e(this.#c, (e) => e.detailLoading),
568
- live: e(this.#c, (e) => e.live),
569
- loadFailed: e(this.#c, (e) => e.loadFailed),
570
- loading: e(this.#c, (e) => e.loading),
571
- loadMoreFailed: e(this.#c, (e) => e.loadMoreFailed),
572
- loadingMore: e(this.#c, (e) => e.loadingMore),
573
- nextCursor: e(this.#c, (e) => e.nextCursor),
574
- publications: e(this.#c, (e) => e.publications),
575
- publishing: e(this.#c, (e) => e.publishing),
576
- rollingBackPublicationId: e(this.#c, (e) => e.rollingBackPublicationId),
577
- selectedTriggerId: e(this.#c, (e) => e.selectedTriggerId),
578
- testingTriggerId: e(this.#c, (e) => e.testingTriggerId),
579
- testResult: e(this.#c, (e) => e.testResult),
580
- total: e(this.#c, (e) => e.total)
557
+ #d;
558
+ constructor(t, n, r, i, a = () => crypto.randomUUID(), o = E()) {
559
+ this.#e = t, this.#t = a, this.#n = o, this.#a = i, this.#c = r, this.#u = n, this.$ = {
560
+ activities: e(this.#l, (e) => e.activities),
561
+ activitiesLoadFailed: e(this.#l, (e) => e.activitiesLoadFailed),
562
+ activitiesLoading: e(this.#l, (e) => e.activitiesLoading),
563
+ activitiesLoadingMore: e(this.#l, (e) => e.activitiesLoadingMore),
564
+ activitiesNextCursor: e(this.#l, (e) => e.activitiesNextCursor),
565
+ bindings: e(this.#l, (e) => e.bindings),
566
+ changingTriggerId: e(this.#l, (e) => e.changingTriggerId),
567
+ detail: e(this.#l, (e) => e.detail),
568
+ detailLoading: e(this.#l, (e) => e.detailLoading),
569
+ live: e(this.#l, (e) => e.live),
570
+ loadFailed: e(this.#l, (e) => e.loadFailed),
571
+ loading: e(this.#l, (e) => e.loading),
572
+ loadMoreFailed: e(this.#l, (e) => e.loadMoreFailed),
573
+ loadingMore: e(this.#l, (e) => e.loadingMore),
574
+ nextCursor: e(this.#l, (e) => e.nextCursor),
575
+ operation: e(this.#l, (e) => e.operation),
576
+ publications: e(this.#l, (e) => e.publications),
577
+ publishing: e(this.#l, (e) => e.publishing),
578
+ rollingBackPublicationId: e(this.#l, (e) => e.rollingBackPublicationId),
579
+ selectedTriggerId: e(this.#l, (e) => e.selectedTriggerId),
580
+ testingTriggerId: e(this.#l, (e) => e.testingTriggerId),
581
+ testResult: e(this.#l, (e) => e.testResult),
582
+ total: e(this.#l, (e) => e.total)
581
583
  };
582
584
  }
583
585
  dispose() {
584
- this.#r.invalidate(), this.#i.invalidate(), this.#a.invalidate(), this.#o.invalidate();
586
+ this.#r.invalidate(), this.#i.invalidate(), this.#o.invalidate(), this.#s.invalidate();
585
587
  for (let e of Object.values(this.$)) e.dispose();
586
- this.#c.dispose();
588
+ this.#l.dispose();
587
589
  }
588
590
  reset() {
589
- this.#r.invalidate(), this.#i.invalidate(), this.#a.invalidate(), this.#o.invalidate(), this.#u = void 0, this.#c.set(U);
591
+ this.#r.invalidate(), this.#i.invalidate(), this.#o.invalidate(), this.#s.invalidate(), this.#d = void 0, this.#l.set(K);
590
592
  }
591
593
  async load(e) {
592
594
  let t = { flowId: e }, n = this.#r.begin();
593
- W(this.#c.value.target, t) || (this.#u = void 0), this.#s(void 0), this.#c.set({
594
- ...U,
595
+ q(this.#l.value.target, t) || (this.#i.invalidate(), this.#d = void 0), this.#c(void 0), this.#l.set({
596
+ ...K,
595
597
  loading: !0,
596
598
  target: t
597
599
  });
598
600
  try {
599
- let [e, r, i] = await this.#p(t);
601
+ let e = await this.#h(t), [r, i, a] = await this.#m(t);
600
602
  if (!n()) return;
601
- this.#h({
602
- bindings: i,
603
- live: e,
603
+ if (this.#y({
604
+ bindings: a,
605
+ live: r,
604
606
  loading: !1,
605
- nextCursor: r.nextCursor,
606
- publications: r.publications,
607
- total: r.total
608
- });
607
+ nextCursor: i.nextCursor,
608
+ operation: e,
609
+ publications: i.publications,
610
+ publishing: e?.status == "pending",
611
+ total: i.total
612
+ }), e?.status == "pending") {
613
+ let n = this.#u.$.targetFlow.value;
614
+ this.#g(t, e, this.#i.begin(), n?.flowId == t.flowId ? n.name : t.flowId);
615
+ }
609
616
  } catch (e) {
610
617
  if (!n()) return;
611
- this.#h({
618
+ this.#y({
612
619
  loadFailed: !0,
613
620
  loading: !1
614
- }), this.#s(R(e, this.#n.t));
621
+ }), this.#c(B(e, this.#n.t));
615
622
  }
616
623
  }
617
624
  async loadMore() {
618
- let { loadingMore: e, nextCursor: t, target: n } = this.#c.value;
625
+ let { loadingMore: e, nextCursor: t, target: n } = this.#l.value;
619
626
  if (e || t == null || n == null) return;
620
627
  let r = this.#r.capture();
621
- this.#h({
628
+ this.#y({
622
629
  loadMoreFailed: !1,
623
630
  loadingMore: !0
624
631
  });
625
632
  try {
626
633
  let e = await this.#e.listPublications(n.flowId, {
627
634
  cursor: t,
628
- limit: lt
635
+ limit: ot
629
636
  });
630
637
  if (!r()) return;
631
- let i = new Set(this.#c.value.publications.map((e) => e.publicationId));
632
- this.#h({
638
+ let i = new Set(this.#l.value.publications.map((e) => e.publicationId));
639
+ this.#y({
633
640
  loadingMore: !1,
634
641
  loadMoreFailed: !1,
635
642
  nextCursor: e.nextCursor,
636
- publications: [...this.#c.value.publications, ...e.publications.filter((e) => !i.has(e.publicationId))]
643
+ publications: [...this.#l.value.publications, ...e.publications.filter((e) => !i.has(e.publicationId))]
637
644
  });
638
645
  } catch (e) {
639
646
  if (!r()) return;
640
- this.#h({
647
+ this.#y({
641
648
  loadMoreFailed: !0,
642
649
  loadingMore: !1
643
- }), this.#s(R(e, this.#n.t));
650
+ }), this.#c(B(e, this.#n.t));
644
651
  }
645
652
  }
646
653
  async publish() {
647
- let e = this.#l.$.targetFlow.value, t = this.#l.$.draft.value;
648
- if (e == null || t == null || this.#c.value.changingTriggerId != null || this.#c.value.publishing || this.#c.value.rollingBackPublicationId != null) return !1;
649
- let n = { flowId: e.flowId }, r = this.#l.$.live.value?.publication?.publicationId ?? null, i = JSON.stringify({
654
+ let e = this.#u.$.targetFlow.value, t = this.#u.$.draft.value;
655
+ if (e == null || t == null || this.#l.value.changingTriggerId != null || this.#l.value.publishing || this.#l.value.rollingBackPublicationId != null) return !1;
656
+ let n = { flowId: e.flowId }, r = this.#u.$.live.value?.publication?.publicationId ?? null, i = JSON.stringify({
650
657
  expectedLivePublicationId: r,
651
658
  flowId: e.flowId,
652
659
  kind: "publish",
653
660
  revisionId: t.revisionId
654
- }), a = this.#u?.signature == i ? this.#u : {
661
+ }), a = this.#d?.signature == i ? this.#d : {
655
662
  key: this.#t(),
656
663
  signature: i
657
664
  }, o = this.#i.begin();
658
- this.#u = a, this.#s(void 0), this.#m(n, { publishing: !0 });
665
+ this.#d = a, this.#c(void 0), this.#v(n, { publishing: !0 });
659
666
  try {
660
- return await this.#e.publishFlow(e.flowId, t.revisionId, r, { idempotencyKey: a.key }), !o() || (await this.#d(n), !o()) ? !1 : (this.#u = void 0, this.#s({
661
- kind: "success",
662
- message: this.#n.t("notice.published", { name: e.name })
663
- }), !0);
667
+ let i = await this.#e.publishFlow(e.flowId, t.revisionId, r, { idempotencyKey: a.key });
668
+ return o() ? (this.#a.setItem(this.#_(n.flowId), i.operationId), this.#y({
669
+ operation: i,
670
+ publishing: i.status == "pending"
671
+ }), await this.#g(n, i, o, e.name)) : !1;
664
672
  } catch (e) {
665
- return o() ? (e instanceof P && e.code == "live.conflict" && await this.#f(n), this.#s(R(e, this.#n.t)), !1) : !1;
673
+ return o() ? (e instanceof P && e.code == "live.conflict" && await this.#p(n), this.#c(B(e, this.#n.t)), !1) : !1;
666
674
  } finally {
667
- o() && this.#h({ publishing: !1 });
675
+ o() && this.#y({ publishing: !1 });
668
676
  }
669
677
  }
670
678
  async rollback(e) {
671
- let { live: t, rollingBackPublicationId: n, target: r } = this.#c.value, i = t?.publication?.publicationId;
672
- if (r == null || i == null || this.#c.value.changingTriggerId != null || n != null || this.#c.value.publishing || e.flowId != r.flowId) return !1;
679
+ let { live: t, rollingBackPublicationId: n, target: r } = this.#l.value, i = t?.publication?.publicationId;
680
+ if (r == null || i == null || this.#l.value.changingTriggerId != null || n != null || this.#l.value.publishing || e.flowId != r.flowId) return !1;
673
681
  let a = JSON.stringify({
674
682
  currentPublicationId: i,
675
683
  flowId: r.flowId,
676
684
  kind: "rollback",
677
685
  targetPublicationId: e.publicationId
678
- }), o = this.#u?.signature == a ? this.#u : {
686
+ }), o = this.#d?.signature == a ? this.#d : {
679
687
  key: this.#t(),
680
688
  signature: a
681
689
  }, s = this.#i.begin();
682
- this.#u = o, this.#s(void 0), this.#h({ rollingBackPublicationId: e.publicationId });
690
+ this.#d = o, this.#c(void 0), this.#y({ rollingBackPublicationId: e.publicationId });
683
691
  try {
684
- return await this.#e.rollbackFlow(r.flowId, e.publicationId, i, { idempotencyKey: o.key }), !s() || (await this.#d(r), !s()) ? !1 : (this.#u = void 0, this.#s({
692
+ return await this.#e.rollbackFlow(r.flowId, e.publicationId, i, { idempotencyKey: o.key }), !s() || (await this.#f(r), !s()) ? !1 : (this.#d = void 0, this.#c({
685
693
  kind: "success",
686
694
  message: this.#n.t("notice.rolledBack", { revision: e.revisionId })
687
695
  }), !0);
688
696
  } catch (e) {
689
- return s() ? (e instanceof P && e.code == "live.conflict" && await this.#f(r), this.#s(R(e, this.#n.t)), !1) : !1;
697
+ return s() ? (e instanceof P && e.code == "live.conflict" && await this.#p(r), this.#c(B(e, this.#n.t)), !1) : !1;
690
698
  } finally {
691
- s() && this.#h({ rollingBackPublicationId: void 0 });
699
+ s() && this.#y({ rollingBackPublicationId: void 0 });
692
700
  }
693
701
  }
694
702
  closeTrigger() {
695
- this.#a.invalidate(), this.#o.invalidate(), this.#h({
703
+ this.#o.invalidate(), this.#s.invalidate(), this.#y({
696
704
  activities: [],
697
705
  activitiesLoadFailed: !1,
698
706
  activitiesLoading: !1,
@@ -706,10 +714,10 @@ var ut = class {
706
714
  });
707
715
  }
708
716
  async openTrigger(e) {
709
- let t = this.#c.value.target;
717
+ let t = this.#l.value.target;
710
718
  if (t == null) return;
711
- let n = this.#a.begin();
712
- this.#o.invalidate(), this.#h({
719
+ let n = this.#o.begin();
720
+ this.#s.invalidate(), this.#y({
713
721
  activities: [],
714
722
  activitiesLoadFailed: !1,
715
723
  activitiesLoading: !0,
@@ -721,96 +729,96 @@ var ut = class {
721
729
  testingTriggerId: void 0,
722
730
  testResult: void 0
723
731
  });
724
- let [r, i] = await Promise.allSettled([this.#e.getFlowTriggerBinding(t.flowId, e), this.#e.listFlowTriggerActivities(t.flowId, e, { limit: ct })]);
732
+ let [r, i] = await Promise.allSettled([this.#e.getFlowTriggerBinding(t.flowId, e), this.#e.listFlowTriggerActivities(t.flowId, e, { limit: at })]);
725
733
  if (n()) {
726
734
  if (r.status == "rejected") {
727
- this.#h({
735
+ this.#y({
728
736
  activitiesLoading: !1,
729
737
  detailLoading: !1
730
- }), this.#s(R(r.reason, this.#n.t));
738
+ }), this.#c(B(r.reason, this.#n.t));
731
739
  return;
732
740
  }
733
- this.#h({
741
+ this.#y({
734
742
  detail: r.value,
735
743
  detailLoading: !1
736
- }), i.status == "fulfilled" ? this.#h({
744
+ }), i.status == "fulfilled" ? this.#y({
737
745
  activities: i.value.activities,
738
746
  activitiesLoadFailed: !1,
739
747
  activitiesLoading: !1,
740
748
  activitiesNextCursor: i.value.nextCursor
741
- }) : (this.#h({
749
+ }) : (this.#y({
742
750
  activitiesLoadFailed: !0,
743
751
  activitiesLoading: !1
744
- }), this.#s(R(i.reason, this.#n.t)));
752
+ }), this.#c(B(i.reason, this.#n.t)));
745
753
  }
746
754
  }
747
755
  async loadMoreTriggerActivities() {
748
- let { activitiesLoadingMore: e, activitiesNextCursor: t, selectedTriggerId: n, target: r } = this.#c.value;
756
+ let { activitiesLoadingMore: e, activitiesNextCursor: t, selectedTriggerId: n, target: r } = this.#l.value;
749
757
  if (e || t == null || n == null || r == null) return;
750
- let i = this.#a.capture();
751
- this.#h({
758
+ let i = this.#o.capture();
759
+ this.#y({
752
760
  activitiesLoadFailed: !1,
753
761
  activitiesLoadingMore: !0
754
762
  });
755
763
  try {
756
764
  let e = await this.#e.listFlowTriggerActivities(r.flowId, n, {
757
765
  cursor: t,
758
- limit: ct
766
+ limit: at
759
767
  });
760
- if (!i() || this.#c.value.selectedTriggerId != n) return;
761
- let a = new Set(this.#c.value.activities.map((e) => e.activityId));
762
- this.#h({
763
- activities: [...this.#c.value.activities, ...e.activities.filter((e) => !a.has(e.activityId))],
768
+ if (!i() || this.#l.value.selectedTriggerId != n) return;
769
+ let a = new Set(this.#l.value.activities.map((e) => e.activityId));
770
+ this.#y({
771
+ activities: [...this.#l.value.activities, ...e.activities.filter((e) => !a.has(e.activityId))],
764
772
  activitiesLoadFailed: !1,
765
773
  activitiesLoadingMore: !1,
766
774
  activitiesNextCursor: e.nextCursor
767
775
  });
768
776
  } catch (e) {
769
- if (!i() || this.#c.value.selectedTriggerId != n) return;
770
- this.#h({
777
+ if (!i() || this.#l.value.selectedTriggerId != n) return;
778
+ this.#y({
771
779
  activitiesLoadFailed: !0,
772
780
  activitiesLoadingMore: !1
773
- }), this.#s(R(e, this.#n.t));
781
+ }), this.#c(B(e, this.#n.t));
774
782
  }
775
783
  }
776
784
  async testTrigger() {
777
- let { detail: e, selectedTriggerId: t, target: n, testingTriggerId: r } = this.#c.value;
785
+ let { detail: e, selectedTriggerId: t, target: n, testingTriggerId: r } = this.#l.value;
778
786
  if (e?.binding.kind != "poll" || e.binding.currentPublicationId == null || t == null || n == null || r != null) return !1;
779
- let i = this.#o.begin();
780
- this.#h({
787
+ let i = this.#s.begin();
788
+ this.#y({
781
789
  testingTriggerId: t,
782
790
  testResult: void 0
783
791
  });
784
792
  try {
785
793
  let e = await this.#e.testFlowPollTrigger(n.flowId, t);
786
- return !i() || this.#c.value.selectedTriggerId != t ? !1 : (this.#h({ testResult: e }), !0);
794
+ return !i() || this.#l.value.selectedTriggerId != t ? !1 : (this.#y({ testResult: e }), !0);
787
795
  } catch (e) {
788
- return i() && this.#c.value.selectedTriggerId == t && this.#s(R(e, this.#n.t)), !1;
796
+ return i() && this.#l.value.selectedTriggerId == t && this.#c(B(e, this.#n.t)), !1;
789
797
  } finally {
790
- i() && this.#c.value.selectedTriggerId == t && this.#h({ testingTriggerId: void 0 });
798
+ i() && this.#l.value.selectedTriggerId == t && this.#y({ testingTriggerId: void 0 });
791
799
  }
792
800
  }
793
801
  async toggleTrigger(e) {
794
- let t = this.#c.value.target;
795
- if (t == null || this.#c.value.changingTriggerId != null || this.#c.value.publishing || this.#c.value.rollingBackPublicationId != null) return !1;
802
+ let t = this.#l.value.target;
803
+ if (t == null || this.#l.value.changingTriggerId != null || this.#l.value.publishing || this.#l.value.rollingBackPublicationId != null) return !1;
796
804
  let n = this.#i.begin();
797
- this.#h({ changingTriggerId: e.triggerNodeId });
805
+ this.#y({ changingTriggerId: e.triggerNodeId });
798
806
  try {
799
807
  if (e.operatorState == "active" ? await this.#e.pauseFlowTrigger(t.flowId, e.triggerNodeId) : await this.#e.resumeFlowTrigger(t.flowId, e.triggerNodeId), !n()) return !1;
800
808
  let r = await this.#e.listFlowTriggerBindings(t.flowId);
801
- return n() ? (this.#h({ bindings: r }), this.#c.value.selectedTriggerId == e.triggerNodeId && this.openTrigger(e.triggerNodeId), this.#s({
809
+ return n() ? (this.#y({ bindings: r }), this.#l.value.selectedTriggerId == e.triggerNodeId && this.openTrigger(e.triggerNodeId), this.#c({
802
810
  kind: "success",
803
811
  message: this.#n.t(e.operatorState == "active" ? "notice.triggerPaused" : "notice.triggerResumed")
804
812
  }), !0) : !1;
805
813
  } catch (e) {
806
- return n() && this.#s(R(e, this.#n.t)), !1;
814
+ return n() && this.#c(B(e, this.#n.t)), !1;
807
815
  } finally {
808
- n() && this.#h({ changingTriggerId: void 0 });
816
+ n() && this.#y({ changingTriggerId: void 0 });
809
817
  }
810
818
  }
811
- async #d(e) {
812
- let [t, n, r] = await this.#p(e);
813
- this.#l.updateLive(t), await this.#l.refreshFlows(), W(this.#c.value.target, e) && this.#h({
819
+ async #f(e) {
820
+ let [t, n, r] = await this.#m(e);
821
+ this.#u.updateLive(t), await this.#u.refreshFlows(), q(this.#l.value.target, e) && this.#y({
814
822
  bindings: r,
815
823
  live: t,
816
824
  loadFailed: !1,
@@ -819,38 +827,88 @@ var ut = class {
819
827
  total: n.total
820
828
  });
821
829
  }
822
- async #f(e) {
830
+ async #p(e) {
823
831
  try {
824
- await this.#d(e), this.#u = void 0;
832
+ await this.#f(e), this.#d = void 0;
825
833
  } catch {
826
834
  return;
827
835
  }
828
836
  }
829
- async #p(e) {
837
+ async #m(e) {
830
838
  return await Promise.all([
831
839
  this.#e.getLive(e.flowId),
832
840
  this.#e.listPublications(e.flowId, {
833
841
  includeTotal: !0,
834
- limit: lt
842
+ limit: ot
835
843
  }),
836
844
  this.#e.listFlowTriggerBindings(e.flowId)
837
845
  ]);
838
846
  }
839
- #m(e, t) {
840
- W(this.#c.value.target, e) ? this.#h(t) : this.#c.set({
841
- ...U,
847
+ async #h(e) {
848
+ let t = this.#a.getItem(this.#_(e.flowId));
849
+ if (t != null && t != "") try {
850
+ return await this.#e.getPublishOperation(e.flowId, t);
851
+ } catch (t) {
852
+ if (t instanceof P && t.code == "publication.operation-not-found") {
853
+ this.#a.setItem(this.#_(e.flowId), "");
854
+ return;
855
+ }
856
+ throw t;
857
+ }
858
+ }
859
+ async #g(e, t, n, r) {
860
+ let i = t;
861
+ for (; i.status == "pending";) {
862
+ if (await new Promise((e) => setTimeout(e, st)), !n()) return !1;
863
+ try {
864
+ i = await this.#e.getPublishOperation(e.flowId, i.operationId);
865
+ } catch (t) {
866
+ 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, {
868
+ operation: void 0,
869
+ publishing: !1
870
+ }), this.#c(B(t, this.#n.t)), !1;
871
+ this.#c(B(t, this.#n.t));
872
+ continue;
873
+ }
874
+ if (!n()) return !1;
875
+ this.#v(e, { operation: i });
876
+ }
877
+ if (this.#d = void 0, this.#v(e, {
878
+ operation: i,
879
+ publishing: !1
880
+ }), i.status == "failed") return this.#c({
881
+ kind: "error",
882
+ message: i.issue.message
883
+ }), !1;
884
+ try {
885
+ await this.#f(e);
886
+ } catch (e) {
887
+ return n() && this.#c(B(e, this.#n.t)), !0;
888
+ }
889
+ return n() ? (this.#c({
890
+ kind: "success",
891
+ message: this.#n.t("notice.published", { name: r })
892
+ }), !0) : !1;
893
+ }
894
+ #_(e) {
895
+ return `publish-operation:${e}`;
896
+ }
897
+ #v(e, t) {
898
+ q(this.#l.value.target, e) ? this.#y(t) : this.#l.set({
899
+ ...K,
842
900
  ...t,
843
901
  target: e
844
902
  });
845
903
  }
846
- #h(e) {
847
- this.#c.set({
848
- ...this.#c.value,
904
+ #y(e) {
905
+ this.#l.set({
906
+ ...this.#l.value,
849
907
  ...e
850
908
  });
851
909
  }
852
- }, dt = { starting: !1 };
853
- function ft(e) {
910
+ }, lt = { starting: !1 };
911
+ function ut(e) {
854
912
  switch (e.kind) {
855
913
  case "condition": return { [e.node.input.handle]: e.node.input };
856
914
  case "subflow": return s(e.definition?.inputs ?? []);
@@ -858,15 +916,15 @@ function ft(e) {
858
916
  case "value": return {};
859
917
  }
860
918
  }
861
- function pt(e) {
919
+ function dt(e) {
862
920
  return e.node.name == null ? e.kind == "task" || e.kind == "subflow" ? e.definition?.name ?? e.id : e.id : e.node.name;
863
921
  }
864
- async function mt(e, t) {
922
+ async function ft(e, t) {
865
923
  let { FlowRunInputEditorStore: n } = await import("./flowRunInputEditorStore-BeyUSWpO.js").then((e) => e.n), r = N(e), i = r.graph({ kind: "flow" });
866
924
  return i == null ? [] : Object.entries(i.nodes).toSorted(([e], [t]) => e.localeCompare(t)).flatMap(([e, i]) => {
867
925
  let a = r.resolveNode(e, i);
868
926
  if (a.kind == "trigger") return [];
869
- let o = Object.entries(ft(a)).filter(([e, t]) => a.node.inputs[e] == null && !Object.hasOwn(t, "value")).toSorted(([e], [t]) => e.localeCompare(t)).map(([e, t]) => Object.assign({
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({
870
928
  handle: e,
871
929
  jsonSchema: t.jsonSchema,
872
930
  nullable: t.nullable
@@ -874,11 +932,11 @@ async function mt(e, t) {
874
932
  return o.length == 0 ? [] : [{
875
933
  editor: new n(o, t),
876
934
  nodeId: e,
877
- title: pt(a)
935
+ title: dt(a)
878
936
  }];
879
937
  });
880
938
  }
881
- var ht = class {
939
+ var pt = class {
882
940
  #e;
883
941
  #t;
884
942
  #n;
@@ -886,7 +944,7 @@ var ht = class {
886
944
  #i = new x();
887
945
  #a;
888
946
  #o;
889
- #s = t(dt);
947
+ #s = t(lt);
890
948
  #c;
891
949
  constructor(t, n, r, i = E(), a = () => crypto.randomUUID()) {
892
950
  this.#e = t, this.#a = n, this.#o = r, this.#n = i, this.#t = a, this.$ = {
@@ -903,7 +961,7 @@ var ht = class {
903
961
  reset() {
904
962
  this.#r.invalidate(), this.#i.invalidate(), this.#c = void 0;
905
963
  let e = this.#s.value.inputRequest;
906
- this.#s.set(dt), this.#d(e);
964
+ this.#s.set(lt), this.#d(e);
907
965
  }
908
966
  async requestDraft(e, t) {
909
967
  let n = this.#i.begin();
@@ -918,7 +976,7 @@ var ht = class {
918
976
  let r = await this.#e.getRevision(e.flowId, n.revisionId);
919
977
  return t() ? await this.#l("live", e, r, n.revisionId, t, n.publicationId) : "unavailable";
920
978
  } catch (e) {
921
- return t() && this.#o(R(e, this.#n.t)), "unavailable";
979
+ return t() && this.#o(B(e, this.#n.t)), "unavailable";
922
980
  } finally {
923
981
  t() && this.#f({ starting: !1 });
924
982
  }
@@ -946,7 +1004,7 @@ var ht = class {
946
1004
  }), this.#d(s);
947
1005
  let c;
948
1006
  try {
949
- c = await mt(r, this.#n.lang$);
1007
+ c = await ft(r, this.#n.lang$);
950
1008
  } catch (e) {
951
1009
  throw a() && this.#f({
952
1010
  starting: !1,
@@ -1002,7 +1060,7 @@ var ht = class {
1002
1060
  });
1003
1061
  return !a() || !o() ? !1 : (this.#c = void 0, this.#a.follow(s, o));
1004
1062
  } catch (e) {
1005
- return a() && o() && this.#o(R(e, this.#n.t)), !1;
1063
+ return a() && o() && this.#o(B(e, this.#n.t)), !1;
1006
1064
  } finally {
1007
1065
  a() && this.#f({
1008
1066
  starting: !1,
@@ -1022,34 +1080,34 @@ var ht = class {
1022
1080
  ...e
1023
1081
  });
1024
1082
  }
1025
- }, gt = {
1083
+ }, mt = {
1026
1084
  actions: {},
1027
1085
  catalogs: {}
1028
1086
  };
1029
- function _t(e) {
1087
+ function ht(e) {
1030
1088
  return Object.entries(e).map(([e, t]) => ({
1031
1089
  description: t.description,
1032
1090
  handle: e,
1033
1091
  jsonSchema: t.jsonSchema
1034
1092
  }));
1035
1093
  }
1036
- function G(e, t) {
1094
+ function J(e, t) {
1037
1095
  return {
1038
1096
  connector: e,
1039
- description: e.defaultConnection == null ? t("addNode.connectorNeedsConnection", {
1097
+ description: e.authenticated && e.defaultConnection == null ? t("addNode.connectorNeedsConnection", {
1040
1098
  description: e.description,
1041
1099
  service: e.serviceName
1042
1100
  }) : e.description,
1043
1101
  group: t("addNode.connectorActions"),
1044
1102
  icon: e.icon ?? ":carbon:connection-signal:",
1045
1103
  id: `connector:${e.actionId}`,
1046
- inputs: _t(e.inputs),
1104
+ inputs: ht(e.inputs),
1047
1105
  kind: "connector",
1048
1106
  label: e.name,
1049
- outputs: _t(e.outputs)
1107
+ outputs: ht(e.outputs)
1050
1108
  };
1051
1109
  }
1052
- function vt(e, t) {
1110
+ function gt(e, t) {
1053
1111
  let n = /* @__PURE__ */ new Map();
1054
1112
  for (let t of e) {
1055
1113
  let e = n.get(t.serviceId) ?? [];
@@ -1057,7 +1115,7 @@ function vt(e, t) {
1057
1115
  }
1058
1116
  return [...n.values()].toSorted((e, t) => e[0].serviceName.localeCompare(t[0].serviceName)).map((e) => {
1059
1117
  let n = e[0], r = e.map((e) => {
1060
- let n = G(e, t);
1118
+ let n = J(e, t);
1061
1119
  return {
1062
1120
  description: n.description,
1063
1121
  label: n.label,
@@ -1078,7 +1136,7 @@ function vt(e, t) {
1078
1136
  };
1079
1137
  });
1080
1138
  }
1081
- function yt(e, t) {
1139
+ function _t(e, t) {
1082
1140
  return {
1083
1141
  choices: [],
1084
1142
  description: t("addNode.connectorBrowseActions"),
@@ -1092,7 +1150,7 @@ function yt(e, t) {
1092
1150
  serviceId: e.serviceId
1093
1151
  };
1094
1152
  }
1095
- function bt(e) {
1153
+ function vt(e) {
1096
1154
  if (e?.kind != "task" || e.node.task != null) return;
1097
1155
  let t = e.definition;
1098
1156
  if (!(t == null || !("executor" in t) || t.executor.kind != "connector")) return {
@@ -1102,7 +1160,7 @@ function bt(e) {
1102
1160
  taskId: e.node.taskId
1103
1161
  };
1104
1162
  }
1105
- var xt = class {
1163
+ var yt = class {
1106
1164
  #e;
1107
1165
  #t;
1108
1166
  #n;
@@ -1119,12 +1177,12 @@ var xt = class {
1119
1177
  #p;
1120
1178
  #m;
1121
1179
  constructor(r, i, a, o, s = E()) {
1122
- this.#r = /* @__PURE__ */ new Map(), this.#i = /* @__PURE__ */ new Set(), this.#a = new x(), this.#u = t(gt), this.#m = !1, this.browseAddNodeOptions = async (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) => {
1123
1181
  if (this.#m) return;
1124
1182
  let t = this.#d.$.flowId.value;
1125
1183
  if (t == null) return;
1126
1184
  let n = this.#p ?? await this.#e.listConnectorProviders(e, t);
1127
- 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) => yt(e, this.#t.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));
1128
1186
  }, this.provideAddNodeOptionChoices = async (e, t) => {
1129
1187
  if (this.#m) return;
1130
1188
  let n = this.#d.$.flowId.value, r = this.#p?.find((t) => `connector-provider:${t.serviceId}` == e);
@@ -1135,7 +1193,7 @@ var xt = class {
1135
1193
  return this.#r.set(r.serviceId, a), this.#y({ actions: {
1136
1194
  ...this.#u.value.actions,
1137
1195
  ...Object.fromEntries(a.map((e) => [e.actionId, e]))
1138
- } }), a.map((e) => G(e, this.#t.t));
1196
+ } }), a.map((e) => J(e, this.#t.t));
1139
1197
  }, this.provideAddNodeOptions = async (e, t) => {
1140
1198
  if (this.#m) return;
1141
1199
  let n = this.#d.$.flowId.value;
@@ -1144,17 +1202,17 @@ var xt = class {
1144
1202
  if (t.aborted || this.#m || n != this.#d.$.flowId.value) return;
1145
1203
  let a = { ...this.#u.value.actions };
1146
1204
  for (let e of i) a[e.actionId] = e;
1147
- if (this.#y({ actions: a }), r.length != 0) return i.map((e) => G(e, this.#t.t));
1205
+ if (this.#y({ actions: a }), r.length != 0) return i.map((e) => J(e, this.#t.t));
1148
1206
  let o = new Map(i.map((e) => [e.actionId, e]));
1149
1207
  for (let e of this.#d.$.revision.value?.connectorActionIds ?? []) {
1150
1208
  let t = a[e];
1151
1209
  t != null && o.set(e, t);
1152
1210
  }
1153
- return vt([...o.values()], this.#t.t);
1211
+ return gt([...o.values()], this.#t.t);
1154
1212
  }, this.#e = r, this.#n = o, this.#d = i, this.#l = a, this.#t = s;
1155
1213
  let c = e(this.#u, (e) => e.actions), l = e(this.#u, (e) => e.catalogs);
1156
1214
  this.#c = n((e) => {
1157
- let t = bt(e(i.$.selection)), n = e(this.#u);
1215
+ let t = vt(e(i.$.selection)), n = e(this.#u);
1158
1216
  if (t == null) return { authorizationPending: !1 };
1159
1217
  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);
1160
1218
  return o == null && r?.defaultConnection?.connectionId == t.connectionId && (o = r.defaultConnection), {
@@ -1184,11 +1242,11 @@ var xt = class {
1184
1242
  this.#c.dispose(), this.#u.dispose();
1185
1243
  }
1186
1244
  reset() {
1187
- this.#m || (this.#a.invalidate(), this.#f = void 0, this.#r.clear(), this.#p = void 0, this.#i.clear(), this.#u.set(gt));
1245
+ this.#m || (this.#a.invalidate(), this.#f = void 0, this.#r.clear(), this.#p = void 0, this.#i.clear(), this.#u.set(mt));
1188
1246
  }
1189
1247
  async refresh(e = !1) {
1190
1248
  if (this.#m) return;
1191
- let t = this.#a.begin(), n = this.#d.$.flowId.value, r = bt(this.#d.$.selection.value);
1249
+ let t = this.#a.begin(), n = this.#d.$.flowId.value, r = vt(this.#d.$.selection.value);
1192
1250
  if (n == null || r == null) {
1193
1251
  (this.#u.value.actionLoading != null || this.#u.value.connectionLoading != null) && this.#y({
1194
1252
  actionLoading: void 0,
@@ -1208,11 +1266,11 @@ var xt = class {
1208
1266
  this.#y({ actions: {
1209
1267
  ...this.#u.value.actions,
1210
1268
  [i.actionId]: i
1211
- } }), await this.#g(n, r, i.serviceId, e, t);
1269
+ } }), i.authenticated && await this.#g(n, r, i.serviceId, e, t);
1212
1270
  } catch (e) {
1213
1271
  this.#b(t, n) && this.#y({ actionError: {
1214
1272
  actionId: r.actionId,
1215
- message: R(e, this.#t.t).message
1273
+ message: B(e, this.#t.t).message
1216
1274
  } });
1217
1275
  } finally {
1218
1276
  this.#b(t, n) && this.#u.value.actionLoading == r.actionId && this.#y({ actionLoading: void 0 });
@@ -1237,7 +1295,7 @@ var xt = class {
1237
1295
  serviceId: e
1238
1296
  }, this.#y({ authorizationServiceId: e });
1239
1297
  } catch (e) {
1240
- this.#m || this.#l(R(e, this.#t.t));
1298
+ this.#m || this.#l(B(e, this.#t.t));
1241
1299
  }
1242
1300
  }
1243
1301
  async setConnection(e, t) {
@@ -1270,7 +1328,7 @@ var xt = class {
1270
1328
  a = await this.#e.listConnectorConnections(t, void 0, e);
1271
1329
  } catch (n) {
1272
1330
  this.#b(r, e) && this.#y({ connectionError: {
1273
- message: R(n, this.#t.t).message,
1331
+ message: B(n, this.#t.t).message,
1274
1332
  serviceId: t
1275
1333
  } });
1276
1334
  return;
@@ -1315,8 +1373,8 @@ var xt = class {
1315
1373
  }
1316
1374
  }
1317
1375
  }
1318
- }, St = { catalogs: {} }, Ct = 4, K = "trigger:";
1319
- function q(e, t) {
1376
+ }, bt = { catalogs: {} }, xt = "trigger:";
1377
+ function Y(e, t) {
1320
1378
  if (e?.kind != "trigger") return;
1321
1379
  let n = e.trigger;
1322
1380
  if (n.kind != "poll" && n.kind != "integration") return;
@@ -1327,11 +1385,11 @@ function q(e, t) {
1327
1385
  triggerId: e.id
1328
1386
  };
1329
1387
  }
1330
- function J(e, t, n, r) {
1388
+ function St(e, t) {
1331
1389
  return {
1332
- description: n,
1333
- group: r,
1334
- id: `trigger:${e.key}:${t}`,
1390
+ description: t.t("addNode.triggerNeedsConnection", { provider: e.provider }),
1391
+ group: t.t("addNode.triggers"),
1392
+ id: `${xt}${e.key}`,
1335
1393
  inputs: [],
1336
1394
  kind: "trigger",
1337
1395
  label: e.displayName,
@@ -1340,59 +1398,12 @@ function J(e, t, n, r) {
1340
1398
  jsonSchema: e.payloadSchema
1341
1399
  }],
1342
1400
  trigger: {
1343
- connectionId: t,
1344
1401
  definition: e,
1345
1402
  kind: "catalog"
1346
1403
  }
1347
1404
  };
1348
1405
  }
1349
- function wt(e, t) {
1350
- return {
1351
- choices: [],
1352
- description: t.t("addNode.triggerChooseConnection"),
1353
- group: t.t("addNode.triggers"),
1354
- id: `${K}${e.key}`,
1355
- inputs: [],
1356
- kind: "trigger",
1357
- label: e.displayName,
1358
- outputs: []
1359
- };
1360
- }
1361
- function Tt(e, t, n) {
1362
- let r = n.t("addNode.triggers"), i = t.preferred;
1363
- return i == null ? t.active.length > 0 ? t.active.map((t) => J(e, t.connectionId, t.displayName, r)) : [{
1364
- description: n.t("addNode.triggerNeedsConnection", { provider: e.provider }),
1365
- group: r,
1366
- id: `${K}${e.key}:connect`,
1367
- inputs: [],
1368
- kind: "trigger",
1369
- label: n.t("addNode.triggerAddConnection"),
1370
- outputs: [],
1371
- trigger: {
1372
- kind: "connect",
1373
- provider: e.provider
1374
- }
1375
- }] : [J(e, i.connectionId, i.displayName, r)];
1376
- }
1377
- function Et(e, t, n) {
1378
- let r = t.preferred;
1379
- if (r != null) return J(e, r.connectionId, r.displayName, n.t("addNode.triggers"));
1380
- let i = wt(e, n), a = Tt(e, t, n);
1381
- return {
1382
- ...i,
1383
- description: t.active.length == 0 ? n.t("addNode.triggerNeedsConnection", { provider: e.provider }) : i.description,
1384
- outputs: t.active.length == 0 ? [] : [{
1385
- handle: "payload",
1386
- jsonSchema: e.payloadSchema
1387
- }],
1388
- choices: a.map((n) => ({
1389
- description: t.active.length == 0 ? e.provider : void 0,
1390
- label: n.label,
1391
- option: n
1392
- }))
1393
- };
1394
- }
1395
- var Dt = class {
1406
+ var Ct = class {
1396
1407
  #e;
1397
1408
  #t;
1398
1409
  #n;
@@ -1405,51 +1416,27 @@ var Dt = class {
1405
1416
  #l;
1406
1417
  #u;
1407
1418
  constructor(r, i, a, o, s = E()) {
1408
- this.#t = new AbortController(), this.#a = new x(), this.#c = t(St), this.#u = !1, this.browseAddNodeOptions = async (e) => {
1419
+ this.#t = new AbortController(), this.#a = new x(), this.#c = t(bt), this.#u = !1, this.browseAddNodeOptions = async (e) => {
1409
1420
  let t = this.#l.$.flowId.value;
1410
1421
  if (e.aborted || this.#u || t == null || this.#l.$.target.value?.kind != "flow") return [];
1411
1422
  let n = await this.#d();
1412
- if (!(e.aborted || this.#u || t != this.#l.$.flowId.value)) return [...n.values()].map((e) => wt(e, this.#i));
1423
+ if (!(e.aborted || this.#u || t != this.#l.$.flowId.value)) return [...n.values()].map((e) => St(e, this.#i));
1413
1424
  }, this.provideAddNodeOptions = async (e, t) => {
1414
1425
  let n = this.#l.$.flowId.value;
1415
1426
  if (t.aborted || this.#u || n == null || this.#l.$.target.value?.kind != "flow") return [];
1416
1427
  let r = e.trim().toLowerCase();
1417
1428
  if (r.length == 0) return [];
1418
1429
  let i = await this.#d();
1419
- if (t.aborted || this.#u || n != this.#l.$.flowId.value) return;
1420
- let a = [...i.values()].filter((e) => [
1430
+ if (!(t.aborted || this.#u || n != this.#l.$.flowId.value)) return [...i.values()].filter((e) => [
1421
1431
  e.description,
1422
1432
  e.displayName,
1423
1433
  e.key,
1424
1434
  e.name,
1425
1435
  e.provider,
1426
1436
  e.type
1427
- ].some((e) => e.toLowerCase().includes(r))), o = [...new Set(a.map((e) => e.provider))].filter((e) => this.#c.value.catalogs[e] == null);
1428
- for (let e = 0; e < o.length; e += Ct) {
1429
- let r = await Promise.all(o.slice(e, e + Ct).map(async (e) => [e, w(await this.#n.listConnectorConnections(e, t, n))]));
1430
- if (t.aborted || this.#u || n != this.#l.$.flowId.value) return;
1431
- this.#f({ catalogs: {
1432
- ...this.#c.value.catalogs,
1433
- ...Object.fromEntries(r)
1434
- } });
1435
- }
1436
- return a.map((e) => Et(e, this.#c.value.catalogs[e.provider], this.#i));
1437
- }, this.provideAddNodeOptionChoices = async (e, t) => {
1438
- let n = this.#l.$.flowId.value, r = e.startsWith(K) ? e.slice(8) : void 0;
1439
- if (t.aborted || this.#u || n == null || r == null || this.#l.$.target.value?.kind != "flow") return;
1440
- let i = (await this.#d()).get(r);
1441
- if (t.aborted || this.#u || n != this.#l.$.flowId.value || i == null) return;
1442
- let a = this.#c.value.catalogs[i.provider];
1443
- if (a == null) {
1444
- if (a = w(await this.#n.listConnectorConnections(i.provider, t, n)), t.aborted || this.#u || n != this.#l.$.flowId.value) return;
1445
- this.#f({ catalogs: {
1446
- ...this.#c.value.catalogs,
1447
- [i.provider]: a
1448
- } });
1449
- }
1450
- return Tt(i, a, this.#i);
1437
+ ].some((e) => e.toLowerCase().includes(r))).map((e) => St(e, this.#i));
1451
1438
  }, this.#n = r, this.#r = o, this.#i = s, this.#s = a, this.#l = i, this.#o = n((e) => {
1452
- let t = e(i.$.selection), n = q(t, i), r = e(this.#c);
1439
+ let t = e(i.$.selection), n = Y(t, i), r = e(this.#c);
1453
1440
  if (t?.kind != "trigger") return { authorizationPending: !1 };
1454
1441
  let a = t.trigger;
1455
1442
  if (a.kind != "poll" && a.kind != "integration") return { authorizationPending: !1 };
@@ -1476,10 +1463,10 @@ var Dt = class {
1476
1463
  this.#o.dispose(), this.#c.dispose();
1477
1464
  }
1478
1465
  reset() {
1479
- this.#u || (this.#t.abort(), this.#t = new AbortController(), this.#e = void 0, this.#a.invalidate(), this.#c.set(St));
1466
+ this.#u || (this.#t.abort(), this.#t = new AbortController(), this.#e = void 0, this.#a.invalidate(), this.#c.set(bt));
1480
1467
  }
1481
1468
  async refresh(e = !1) {
1482
- let t = this.#a.begin(), n = this.#l.$.flowId.value, r = q(this.#l.$.selection.value, this.#l);
1469
+ let t = this.#a.begin(), n = this.#l.$.flowId.value, r = Y(this.#l.$.selection.value, this.#l);
1483
1470
  if (!this.#u) {
1484
1471
  if (n == null || r == null) {
1485
1472
  this.#c.value.connectionLoading != null && this.#f({ connectionLoading: void 0 });
@@ -1499,7 +1486,7 @@ var Dt = class {
1499
1486
  } });
1500
1487
  } catch (e) {
1501
1488
  this.#p(t, n) && this.#f({ connectionError: {
1502
- message: R(e, this.#i.t).message,
1489
+ message: B(e, this.#i.t).message,
1503
1490
  provider: r.provider
1504
1491
  } });
1505
1492
  } finally {
@@ -1520,7 +1507,7 @@ var Dt = class {
1520
1507
  }
1521
1508
  !this.#u && t == this.#l.$.flowId.value && this.#f({ authorizationProvider: e });
1522
1509
  } catch (e) {
1523
- this.#u || this.#s(R(e, this.#i.t));
1510
+ this.#u || this.#s(B(e, this.#i.t));
1524
1511
  }
1525
1512
  }
1526
1513
  async setConnection(e, t) {
@@ -1536,7 +1523,7 @@ var Dt = class {
1536
1523
  delete t[e], this.#f({
1537
1524
  authorizationProvider: void 0,
1538
1525
  catalogs: t
1539
- }), q(this.#l.$.selection.value, this.#l)?.provider == e && await this.refresh(!0);
1526
+ }), Y(this.#l.$.selection.value, this.#l)?.provider == e && await this.refresh(!0);
1540
1527
  }
1541
1528
  #d() {
1542
1529
  if (this.#e != null) return this.#e;
@@ -1557,32 +1544,32 @@ var Dt = class {
1557
1544
  };
1558
1545
  //#endregion
1559
1546
  //#region src/workbench/browser/runtime/designer/remoteChangeTargets.ts
1560
- function Ot(e, t) {
1547
+ function wt(e, t) {
1561
1548
  return e.kind == t.kind && (e.kind != "subflow" || t.kind == "subflow" && e.id == t.id);
1562
1549
  }
1563
- function Y(e, t, n, r) {
1550
+ function X(e, t, n, r) {
1564
1551
  for (let [i, a] of Object.entries(t.graph(n)?.nodes ?? {})) r(a) && e.add(i);
1565
1552
  }
1566
- function kt(e, t, n, r) {
1553
+ function Tt(e, t, n, r) {
1567
1554
  let i = /* @__PURE__ */ new Set();
1568
1555
  for (let a of r) switch (a.kind) {
1569
1556
  case "graph.node.create":
1570
1557
  case "graph.node.replace":
1571
- Ot(a.target, n) && i.add(a.nodeId);
1558
+ wt(a.target, n) && i.add(a.nodeId);
1572
1559
  break;
1573
1560
  case "task.replace":
1574
- Y(i, e, n, (e) => e.kind == "task" && e.task == null && e.taskId == a.taskId), Y(i, t, n, (e) => e.kind == "task" && e.task == null && e.taskId == a.taskId);
1561
+ 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);
1575
1562
  break;
1576
1563
  case "module.source.replace":
1577
- Y(i, e, n, (e) => e.kind == "task" && e.task?.moduleId == a.moduleId), Y(i, t, n, (e) => e.kind == "task" && e.task?.moduleId == a.moduleId);
1564
+ X(i, e, n, (e) => e.kind == "task" && e.task?.moduleId == a.moduleId), X(i, t, n, (e) => e.kind == "task" && e.task?.moduleId == a.moduleId);
1578
1565
  break;
1579
- case "subflow.definition.replace": Y(i, e, n, (e) => e.kind == "subflow" && e.subflowId == a.subflowId), Y(i, t, n, (e) => e.kind == "subflow" && e.subflowId == a.subflowId);
1566
+ case "subflow.definition.replace": X(i, e, n, (e) => e.kind == "subflow" && e.subflowId == a.subflowId), X(i, t, n, (e) => e.kind == "subflow" && e.subflowId == a.subflowId);
1580
1567
  }
1581
1568
  return new Set([...i].filter((e) => t.selection(n, e) != null));
1582
1569
  }
1583
1570
  //#endregion
1584
1571
  //#region src/workbench/browser/runtime/stores/draftChanges.ts
1585
- function At(e) {
1572
+ function Et(e) {
1586
1573
  if (e.length != 1) return;
1587
1574
  let t = e[0];
1588
1575
  switch (t.kind) {
@@ -1595,7 +1582,7 @@ function At(e) {
1595
1582
  default: return;
1596
1583
  }
1597
1584
  }
1598
- var jt = class {
1585
+ var Dt = class {
1599
1586
  #e;
1600
1587
  #t;
1601
1588
  #n;
@@ -1631,7 +1618,7 @@ var jt = class {
1631
1618
  }
1632
1619
  async change(e, t, n, r = !0) {
1633
1620
  this.#t.beforeChange(r), this.#t.apply(F(t, n));
1634
- let i = At(n), a = this.#o.at(-1), o = i != null && a != null && !a.started && At(a.changes) == i ? a : void 0;
1621
+ let i = Et(n), a = this.#o.at(-1), o = i != null && a != null && !a.started && Et(a.changes) == i ? a : void 0;
1635
1622
  if (o != null) return o.changes = n, await o.result;
1636
1623
  let s = {
1637
1624
  ...e,
@@ -1668,7 +1655,7 @@ var jt = class {
1668
1655
  kind: "error",
1669
1656
  message: this.#n.t("notice.draftConflict")
1670
1657
  });
1671
- } else this.#u(e), this.#t.current(e) && this.#r(R(n, this.#n.t));
1658
+ } else this.#u(e), this.#t.current(e) && this.#r(B(n, this.#n.t));
1672
1659
  return;
1673
1660
  }
1674
1661
  }
@@ -1685,19 +1672,19 @@ var jt = class {
1685
1672
  #u(e) {
1686
1673
  this.#o = this.#o.filter((t) => t !== e), !(!this.#t.current(e) || this.#a == null) && this.#t.apply(this.project(this.#a));
1687
1674
  }
1688
- }, X = 50, Mt = {
1675
+ }, Ot = 50, kt = {
1689
1676
  failed: !1,
1690
1677
  loaded: !1,
1691
1678
  loading: !0,
1692
1679
  loadingMore: !1,
1693
1680
  loadMoreFailed: !1,
1694
1681
  flows: []
1695
- }, Nt = class {
1682
+ }, At = class {
1696
1683
  #e;
1697
1684
  #t;
1698
1685
  #n = new x();
1699
1686
  #r;
1700
- #i = t(Mt);
1687
+ #i = t(kt);
1701
1688
  #a = !1;
1702
1689
  constructor(t, n, r) {
1703
1690
  this.#e = t, this.#t = r, this.#r = n, this.$ = {
@@ -1739,7 +1726,7 @@ var jt = class {
1739
1726
  try {
1740
1727
  let t = await this.#e.listFlows({
1741
1728
  includeTotal: !0,
1742
- limit: X
1729
+ limit: Ot
1743
1730
  });
1744
1731
  if (!e()) return;
1745
1732
  this.#o({
@@ -1754,7 +1741,7 @@ var jt = class {
1754
1741
  this.#o({
1755
1742
  failed: !0,
1756
1743
  loading: !1
1757
- }), this.#r(R(t, this.#t.t));
1744
+ }), this.#r(B(t, this.#t.t));
1758
1745
  }
1759
1746
  }
1760
1747
  async loadMore() {
@@ -1768,7 +1755,7 @@ var jt = class {
1768
1755
  try {
1769
1756
  let e = await this.#e.listFlows({
1770
1757
  cursor: t,
1771
- limit: X
1758
+ limit: Ot
1772
1759
  });
1773
1760
  if (!n()) return;
1774
1761
  let r = new Set(this.#i.value.flows.map((e) => e.flowId));
@@ -1782,7 +1769,7 @@ var jt = class {
1782
1769
  this.#o({
1783
1770
  loadingMore: !1,
1784
1771
  loadMoreFailed: !0
1785
- }), this.#r(R(e, this.#t.t));
1772
+ }), this.#r(B(e, this.#t.t));
1786
1773
  }
1787
1774
  }
1788
1775
  async create(e) {
@@ -1824,7 +1811,7 @@ var jt = class {
1824
1811
  ...e
1825
1812
  });
1826
1813
  }
1827
- }, Pt = class {
1814
+ }, jt = class {
1828
1815
  #e;
1829
1816
  #t;
1830
1817
  #n;
@@ -1875,9 +1862,9 @@ var jt = class {
1875
1862
  message: this.#t.t("notice.layoutConflict")
1876
1863
  });
1877
1864
  } catch (e) {
1878
- !this.#o && n() && this.#n(R(e, this.#t.t));
1865
+ !this.#o && n() && this.#n(B(e, this.#t.t));
1879
1866
  }
1880
- else this.#c(a, t), this.#n(R(r, this.#t.t));
1867
+ else this.#c(a, t), this.#n(B(r, this.#t.t));
1881
1868
  }
1882
1869
  }), await this.#i;
1883
1870
  }
@@ -1889,13 +1876,13 @@ var jt = class {
1889
1876
  value: n
1890
1877
  });
1891
1878
  }
1892
- }, Ft = {
1879
+ }, Mt = {
1893
1880
  checkLoading: !1,
1894
1881
  selectedNodeIds: [],
1895
1882
  workspaceLoadFailed: !1,
1896
1883
  workspaceLoading: !1
1897
1884
  };
1898
- function It(e) {
1885
+ function Nt(e) {
1899
1886
  return e.workspaceLoading ? "loading" : e.busy == "designer" ? "saving" : e.draft == null ? "noDraft" : "saved";
1900
1887
  }
1901
1888
  function Z(e, t) {
@@ -1911,9 +1898,9 @@ function Q(e, t, n) {
1911
1898
  source: r.module.source
1912
1899
  };
1913
1900
  }
1914
- var Lt = class {
1901
+ var Pt = class {
1915
1902
  #e;
1916
- #t = t(Ft);
1903
+ #t = t(Mt);
1917
1904
  #n;
1918
1905
  constructor(t, r) {
1919
1906
  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) => {
@@ -1934,12 +1921,12 @@ var Lt = class {
1934
1921
  this.$ = {
1935
1922
  addNodeOptions: n((e) => {
1936
1923
  let { revision: n, target: r } = e(this.#e);
1937
- return Ne(n?.revision, r, e(t.t$));
1924
+ return je(n?.revision, r, e(t.t$));
1938
1925
  }),
1939
1926
  busy: i,
1940
1927
  checkLoading: a,
1941
1928
  diagnosticFocus: o,
1942
- diagnosticItems: e(this.#t, (e) => Ee(e.draft == null ? void 0 : N(e.draft), e.target, e.diagnostics)),
1929
+ diagnosticItems: e(this.#t, (e) => we(e.draft == null ? void 0 : N(e.draft), e.target, e.diagnostics)),
1943
1930
  diagnostics: s,
1944
1931
  draft: c,
1945
1932
  flow: n((e) => {
@@ -1954,7 +1941,7 @@ var Lt = class {
1954
1941
  flowNextCursor: r.$.nextCursor,
1955
1942
  flowTotal: r.$.total,
1956
1943
  flows: r.$.flows,
1957
- inspectorDiagnostics: e(this.#t, (e) => Ae(e.draft == null ? void 0 : N(e.draft), e.target, e.diagnostics, y.value)),
1944
+ inspectorDiagnostics: e(this.#t, (e) => Oe(e.draft == null ? void 0 : N(e.draft), e.target, e.diagnostics, y.value)),
1958
1945
  live: p,
1959
1946
  moduleDiagnostics: e(this.#t, (e) => {
1960
1947
  let t = e.moduleEditor?.moduleId;
@@ -1966,7 +1953,7 @@ var Lt = class {
1966
1953
  revision: m,
1967
1954
  selection: y,
1968
1955
  selectedNodeIds: h,
1969
- status: e(this.#t, It),
1956
+ status: e(this.#t, Nt),
1970
1957
  target: g,
1971
1958
  targetFlow: n((e) => e(g)?.kind == "flow" ? e(r.$.flows).find((t) => t.flowId == e(f)) : void 0),
1972
1959
  targetName: e(this.#t, (e) => {
@@ -1989,14 +1976,14 @@ var Lt = class {
1989
1976
  for (let e of Object.values(this.$)) this.#n.has(e) || e.dispose();
1990
1977
  this.#e.dispose(), this.#t.dispose();
1991
1978
  }
1992
- }, Rt = 250;
1993
- function zt(e, t) {
1979
+ }, Ft = 250;
1980
+ function It(e, t) {
1994
1981
  if (t != null) return t.kind == "flow" || e.subflow(t.id) != null ? t : { kind: "flow" };
1995
1982
  }
1996
1983
  function $(e, t) {
1997
1984
  return e?.kind == t?.kind ? e?.kind != "subflow" || t?.kind == "subflow" && e.id == t.id : !1;
1998
1985
  }
1999
- var Bt = class {
1986
+ var Lt = class {
2000
1987
  #e;
2001
1988
  #t;
2002
1989
  #n = new x();
@@ -2019,8 +2006,8 @@ var Bt = class {
2019
2006
  #y = 0;
2020
2007
  #b;
2021
2008
  #x;
2022
- constructor(e, t, n = st, r = E(), i = () => {}) {
2023
- this.#e = e, this.#c = t, this.#i = n, this.#r = r, this.#s = i, this.#o = new Nt(e, t, r), this.#l = new Lt(r, this.#o), this.#t = new jt(e, t, r, {
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, {
2024
2011
  apply: (e, t) => this.#w(e, t),
2025
2012
  beforeChange: (e) => {
2026
2013
  this.#M(), this.#h = !1, e && (this.#B({ busy: "designer" }), this.#c(void 0));
@@ -2033,7 +2020,7 @@ var Bt = class {
2033
2020
  },
2034
2021
  headChanged: (e, t) => this.#N(e, t),
2035
2022
  recover: (e) => this.#O(e, !0)
2036
- }), this.#a = new Pt(e, t, (e) => this.#B({ presentation: e }), r), this.$ = this.#l.$;
2023
+ }), this.#a = new jt(e, t, (e) => this.#B({ presentation: e }), r), this.$ = this.#l.$;
2037
2024
  }
2038
2025
  dispose() {
2039
2026
  this.#M(), this.#_ = !0, this.#n.invalidate(), this.#a.dispose(), this.#b?.(), this.#x?.(), this.#l.dispose(), this.#o.dispose();
@@ -2088,7 +2075,7 @@ var Bt = class {
2088
2075
  return t() ? (this.#B({
2089
2076
  workspaceLoadFailed: !0,
2090
2077
  workspaceLoading: !1
2091
- }), this.#c(R(e, this.#r.t)), !1) : !1;
2078
+ }), this.#c(B(e, this.#r.t)), !1) : !1;
2092
2079
  }
2093
2080
  return !0;
2094
2081
  }
@@ -2118,7 +2105,7 @@ var Bt = class {
2118
2105
  let n = await this.#e.getFlow(await t(e));
2119
2106
  return this.#o.insert(n), n;
2120
2107
  } catch (e) {
2121
- this.#_ || this.#c(R(e, this.#r.t));
2108
+ this.#_ || this.#c(B(e, this.#r.t));
2122
2109
  } finally {
2123
2110
  this.#B({ busy: void 0 });
2124
2111
  }
@@ -2135,7 +2122,7 @@ var Bt = class {
2135
2122
  message: this.#r.t("notice.flowDeleteAccepted", { name: t.name })
2136
2123
  }), !0);
2137
2124
  } catch (e) {
2138
- return this.#_ || this.#c(R(e, this.#r.t)), !1;
2125
+ return this.#_ || this.#c(B(e, this.#r.t)), !1;
2139
2126
  } finally {
2140
2127
  this.#B({ busy: void 0 });
2141
2128
  }
@@ -2162,7 +2149,7 @@ var Bt = class {
2162
2149
  try {
2163
2150
  i = await this.#e.renameFlow(e, r), i != null && this.#o.include(i);
2164
2151
  } catch (e) {
2165
- this.#_ || this.#c(R(e, this.#r.t));
2152
+ this.#_ || this.#c(B(e, this.#r.t));
2166
2153
  }
2167
2154
  return this.#B({ busy: void 0 }), i != null && (this.#c({
2168
2155
  kind: "success",
@@ -2177,9 +2164,9 @@ var Bt = class {
2177
2164
  if (e.kind == "comment") return await this.#S(i, a, t);
2178
2165
  let o = N(r), s = S(e, o, i, this.#r.t);
2179
2166
  if (s == null) return;
2180
- let c = xe(o, i, a, s, this.#i);
2167
+ let c = be(o, i, a, s, this.#i);
2181
2168
  if (c == null) return;
2182
- let l = n == null ? c : [...c, ...nt(F(r, c).content, i, n(a))], u = this.#C(l);
2169
+ let l = n == null ? c : [...c, ...$e(F(r, c).content, i, n(a))], u = this.#C(l);
2183
2170
  this.selectNodes([a]);
2184
2171
  let d = this.moveNodes({ [a]: t });
2185
2172
  if (await u != null && (await d, !this.#_)) return this.#B({ nodeFocus: {
@@ -2190,20 +2177,20 @@ var Bt = class {
2190
2177
  async connect(e) {
2191
2178
  let t = this.$.revision.value, n = this.#l.value.target;
2192
2179
  if (t == null || n == null) return;
2193
- let r = nt(t.revision.content, n, e);
2180
+ let r = $e(t.revision.content, n, e);
2194
2181
  r.length > 0 && await this.#C(r);
2195
2182
  }
2196
2183
  async disconnect(e) {
2197
2184
  let t = this.$.revision.value, n = this.#l.value.target;
2198
2185
  if (t == null || n == null) return;
2199
- let r = rt(t.revision.content, n, e);
2186
+ let r = et(t.revision.content, n, e);
2200
2187
  r.length > 0 && await this.#C(r);
2201
2188
  }
2202
2189
  async deleteSelectedNodes() {
2203
2190
  if (!this.#F()) return;
2204
2191
  let e = this.$.revision.value, t = this.#l.value.target;
2205
2192
  if (e == null || t == null || this.#l.value.selectedNodeIds.length == 0) return;
2206
- let n = T(this.#l.value.presentation?.value ?? {}, t), r = new Set(this.#l.value.selectedNodeIds.filter((e) => n.has(e))), i = we(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));
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));
2207
2194
  this.selectNodes([]), (a == null || await a != null) && await o;
2208
2195
  }
2209
2196
  copySelectedNodes() {
@@ -2217,14 +2204,14 @@ var Bt = class {
2217
2204
  sourceId: e.id,
2218
2205
  title: e.title
2219
2206
  }] : []),
2220
- nodes: ke(e, t, this.#l.value.selectedNodeIds)
2207
+ nodes: De(e, t, this.#l.value.selectedNodeIds)
2221
2208
  };
2222
2209
  }
2223
2210
  async pasteNodes(e) {
2224
2211
  if (!this.#F()) return;
2225
2212
  let t = this.$.revision.value, n = this.#l.value.target;
2226
2213
  if (t == null || n == null || this.#u == null) return;
2227
- let r = je(t, n, this.#u.nodes, this.#i), i = r.changes.length == 0 ? void 0 : this.#C(r.changes), a = this.#u.comments.map((e) => ({
2214
+ let r = ke(t, n, this.#u.nodes, this.#i), i = r.changes.length == 0 ? void 0 : this.#C(r.changes), a = this.#u.comments.map((e) => ({
2228
2215
  ...e,
2229
2216
  nodeId: this.#i()
2230
2217
  }));
@@ -2237,7 +2224,7 @@ var Bt = class {
2237
2224
  }];
2238
2225
  })), c = this.#T((e) => {
2239
2226
  let t = j(e, n, s);
2240
- for (let e of a) t = I(t, n, e.nodeId, {
2227
+ for (let e of a) t = L(t, n, e.nodeId, {
2241
2228
  content: e.content,
2242
2229
  position: {
2243
2230
  x: e.position.x + 40,
@@ -2255,19 +2242,19 @@ var Bt = class {
2255
2242
  async saveNodeSettings(e, t) {
2256
2243
  let n = this.$.revision.value, r = this.#l.value.target;
2257
2244
  if (n == null || r == null) return !1;
2258
- let i = Me(n, r, e, t);
2245
+ let i = Ae(n, r, e, t);
2259
2246
  return i != null && await this.#C(i) != null;
2260
2247
  }
2261
2248
  async saveNodeDescription(e, t) {
2262
2249
  let n = this.$.revision.value, r = this.#l.value.target;
2263
2250
  if (n == null || r == null) return !1;
2264
- let i = be(n, r, e, t);
2251
+ let i = ye(n, r, e, t);
2265
2252
  return i != null && await this.#C(i) != null;
2266
2253
  }
2267
2254
  async saveNodeIcon(e, t) {
2268
2255
  let n = this.$.revision.value, r = this.#l.value.target;
2269
2256
  if (n == null || r == null) return !1;
2270
- let i = ye(n, r, e, t);
2257
+ let i = ve(n, r, e, t);
2271
2258
  return i != null && await this.#C(i) != null;
2272
2259
  }
2273
2260
  async saveNodeTitle(e, t) {
@@ -2279,32 +2266,32 @@ var Bt = class {
2279
2266
  async setInputValue(e, t, n) {
2280
2267
  let r = this.$.revision.value, i = this.#l.value.target;
2281
2268
  if (r == null || i == null) return !1;
2282
- let a = _e(r, i, e, t, n);
2269
+ let a = I(r, i, e, t, n);
2283
2270
  return a != null && await this.#C(a) != null;
2284
2271
  }
2285
2272
  async setInputVariable(e, t, n) {
2286
2273
  let r = this.$.revision.value, i = this.#l.value.target;
2287
2274
  if (r == null || i == null) return !1;
2288
- let a = n == null ? _e(r, i, e, t, void 0) : ve(r, i, e, t, n, this.#i());
2275
+ let a = n == null ? I(r, i, e, t, void 0) : _e(r, i, e, t, n, this.#i());
2289
2276
  return a != null && await this.#C(a) != null;
2290
2277
  }
2291
2278
  async saveCondition(e, t) {
2292
2279
  let n = this.$.revision.value, r = this.#l.value.target;
2293
2280
  if (n == null || r == null) return !1;
2294
- let i = Te(n, r, e, t);
2281
+ let i = Ce(n, r, e, t);
2295
2282
  return i != null && await this.#C(i) != null;
2296
2283
  }
2297
2284
  async saveValue(e, t) {
2298
2285
  let n = this.$.revision.value, r = this.#l.value.target;
2299
2286
  if (n == null || r == null) return !1;
2300
- let i = Pe(n, r, e, t);
2287
+ let i = Me(n, r, e, t);
2301
2288
  return i != null && await this.#C(i) != null;
2302
2289
  }
2303
2290
  async saveComment(e, t) {
2304
2291
  let n = this.#l.value.target;
2305
2292
  if (n == null) return;
2306
2293
  let r = this.#P().nodes.find((t) => t.id == e)?.position;
2307
- r != null && await this.#T((i) => I(i, n, e, {
2294
+ r != null && await this.#T((i) => L(i, n, e, {
2308
2295
  ...t,
2309
2296
  position: r
2310
2297
  }));
@@ -2318,7 +2305,7 @@ var Bt = class {
2318
2305
  async saveCodeTaskPorts(e, t) {
2319
2306
  let n = this.$.revision.value, r = this.#l.value.target;
2320
2307
  if (n == null || r == null) return !1;
2321
- let i = De(n, r, e, t);
2308
+ let i = Te(n, r, e, t);
2322
2309
  return i != null && await this.#C(i) != null;
2323
2310
  }
2324
2311
  async setConnectorConnection(e, t) {
@@ -2360,7 +2347,7 @@ var Bt = class {
2360
2347
  async saveSubflowSettings(e, t) {
2361
2348
  let n = this.$.revision.value;
2362
2349
  if (n == null) return !1;
2363
- let r = Fe(n, e, t);
2350
+ let r = Ne(n, e, t);
2364
2351
  return r != null && await this.#C(r) != null;
2365
2352
  }
2366
2353
  updateModuleSource(e) {
@@ -2391,9 +2378,9 @@ var Bt = class {
2391
2378
  ...e,
2392
2379
  phase: "saving"
2393
2380
  } });
2394
- let t = await at(e.source);
2381
+ let t = await nt(e.source);
2395
2382
  if (this.#_) return !1;
2396
- let n = await this.#C(ot(e.moduleId, e.source, t));
2383
+ let n = await this.#C(rt(e.moduleId, e.source, t));
2397
2384
  return !this.#_ && this.#l.value.moduleEditor?.moduleId == e.moduleId && this.#B({ moduleEditor: {
2398
2385
  ...this.#l.value.moduleEditor,
2399
2386
  phase: n == null ? "failed" : void 0
@@ -2437,7 +2424,7 @@ var Bt = class {
2437
2424
  if (e.kind != "comment") return [];
2438
2425
  let t = /#(\d+)$/.exec(e.title);
2439
2426
  return t == null ? [] : [Number(t[1])];
2440
- })), i = this.#T((i) => I(i, e, t, {
2427
+ })), i = this.#T((i) => L(i, e, t, {
2441
2428
  content: "",
2442
2429
  position: n,
2443
2430
  title: this.#r.t("addNode.commentName", { number: r + 1 })
@@ -2482,9 +2469,18 @@ var Bt = class {
2482
2469
  });
2483
2470
  try {
2484
2471
  let n = await this.#e.checkFlow(e, t.revisionId);
2485
- !this.#_ && e == this.#l.value.flowId && t.revisionId == this.#l.value.draft?.revisionId && this.#B({ diagnostics: n });
2472
+ if (!this.#_ && e == this.#l.value.flowId && t.revisionId == this.#l.value.draft?.revisionId) {
2473
+ let e = this.#l.value.live;
2474
+ this.#B({
2475
+ diagnostics: n,
2476
+ live: e == null ? void 0 : {
2477
+ ...e,
2478
+ hasUnpublishedChanges: e.publication == null || e.publication.closureDigest != n.closureDigest
2479
+ }
2480
+ });
2481
+ }
2486
2482
  } catch (n) {
2487
- !this.#_ && e == this.#l.value.flowId && t.revisionId == this.#l.value.draft?.revisionId && this.#c(R(n, this.#r.t));
2483
+ !this.#_ && e == this.#l.value.flowId && t.revisionId == this.#l.value.draft?.revisionId && this.#c(B(n, this.#r.t));
2488
2484
  } finally {
2489
2485
  !this.#_ && e == this.#l.value.flowId && t.revisionId == this.#l.value.draft?.revisionId && this.#B({ checkLoading: !1 });
2490
2486
  }
@@ -2522,7 +2518,7 @@ var Bt = class {
2522
2518
  s = this.#k(a, o);
2523
2519
  }
2524
2520
  if (s.revisionId == a.revisionId) return !0;
2525
- let c = o.kind == "changes" && t != null ? kt(N(a), N(s), t, o.revisions.flatMap((e) => e.operations)) : void 0;
2521
+ let c = o.kind == "changes" && t != null ? Tt(N(a), N(s), t, o.revisions.flatMap((e) => e.operations)) : void 0;
2526
2522
  o.kind == "snapshot" && this.#M();
2527
2523
  let l = this.#L(s, !1);
2528
2524
  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({
@@ -2530,7 +2526,7 @@ var Bt = class {
2530
2526
  message: this.#r.t(l ? "notice.moduleUpdated" : "notice.draftUpdated")
2531
2527
  }), this.#E()), !0;
2532
2528
  } catch (n) {
2533
- return t && this.#z(e) && this.#c(R(n, this.#r.t)), !1;
2529
+ return t && this.#z(e) && this.#c(B(n, this.#r.t)), !1;
2534
2530
  }
2535
2531
  }
2536
2532
  #k(e, t) {
@@ -2555,7 +2551,7 @@ var Bt = class {
2555
2551
  return;
2556
2552
  }
2557
2553
  for (let e of n) a.targets.add(e);
2558
- globalThis.clearTimeout(a.timer), a.timer = globalThis.setTimeout(() => this.#j(), Rt);
2554
+ globalThis.clearTimeout(a.timer), a.timer = globalThis.setTimeout(() => this.#j(), Ft);
2559
2555
  return;
2560
2556
  }
2561
2557
  n.size == 0 || i.selectedNodeIds.length > 0 || (this.#p = {
@@ -2564,7 +2560,7 @@ var Bt = class {
2564
2560
  flowId: e.flowId,
2565
2561
  target: t,
2566
2562
  targets: new Set(n),
2567
- timer: globalThis.setTimeout(() => this.#j(), Rt),
2563
+ timer: globalThis.setTimeout(() => this.#j(), Ft),
2568
2564
  viewport: this.#P().viewport
2569
2565
  });
2570
2566
  }
@@ -2599,7 +2595,7 @@ var Bt = class {
2599
2595
  }), !1);
2600
2596
  }
2601
2597
  #I(e) {
2602
- let t = N(e), n = zt(t, this.#l.value.target);
2598
+ let t = N(e), n = It(t, this.#l.value.target);
2603
2599
  return {
2604
2600
  revision: t,
2605
2601
  selectedNodeIds: this.#l.value.selectedNodeIds.filter((e) => n != null && t.selection(n, e) != null),
@@ -2633,13 +2629,13 @@ var Bt = class {
2633
2629
  };
2634
2630
  //#endregion
2635
2631
  //#region src/workbench/browser/runtime/stores/workbenchStore.ts
2636
- function Vt(e) {
2632
+ function Rt(e) {
2637
2633
  return new Map(e.nodes.map((e) => [e.id, e]));
2638
2634
  }
2639
- function Ht(e, t) {
2635
+ function zt(e, t) {
2640
2636
  return e == null || t == null ? [] : N(e).designerInputs(t);
2641
2637
  }
2642
- function Ut(e, t, n, r, i) {
2638
+ function Bt(e, t, n, r, i) {
2643
2639
  if (e == null || t?.kind != "flow" || n?.revisionId != e.revisionId || n.flowId != e.flowId) return /* @__PURE__ */ new Map();
2644
2640
  let a = r.find((t) => t.kind == "run.started" && t.payload.flowId == e.flowId)?.payload.scopeId;
2645
2641
  return typeof a == "string" ? new Map(r.flatMap((t) => {
@@ -2647,7 +2643,7 @@ function Ut(e, t, n, r, i) {
2647
2643
  return t.payload.scopeId == a && t.payload.flowId == e.flowId && typeof n == "string" && i.has(n) ? [[t.sequence, n]] : [];
2648
2644
  })) : /* @__PURE__ */ new Map();
2649
2645
  }
2650
- var Wt = { openExternalPage: async () => !1 }, Gt = class {
2646
+ var Vt = { openExternalPage: async () => !1 }, Ht = class {
2651
2647
  #e;
2652
2648
  #t;
2653
2649
  #n;
@@ -2658,17 +2654,19 @@ var Wt = { openExternalPage: async () => !1 }, Gt = class {
2658
2654
  #s;
2659
2655
  #c;
2660
2656
  #l;
2661
- constructor(r, i, a = () => crypto.randomUUID(), o = E(), s = Wt, c = !0) {
2662
- 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) => await (e.startsWith("trigger:") ? this.triggers.provideAddNodeOptionChoices(e, t) : this.connectors.provideAddNodeOptionChoices(e, t)), this.#e = r, this.#n = o, this.#i = c;
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) => {
2659
+ if (!e.startsWith("trigger:")) return await this.connectors.provideAddNodeOptionChoices(e, t);
2660
+ }, this.#e = r, this.#n = o, this.#i = c;
2663
2661
  let l = (e) => {
2664
2662
  this.#l || this.#r.set(e);
2665
2663
  };
2666
- this.runs = new O(r, l, o), this.workspace = new Bt(r, l, st, o, (e) => void this.#d(r, e)), this.connectors = new xt(r, this.workspace, l, s, o), this.triggers = new Dt(r, this.workspace, l, s, o), this.publications = new ut(r, this.workspace, l, a, o), this.runRequests = new ht(r, this.runs, l, o, a);
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);
2667
2665
  let u = /* @__PURE__ */ new Map(), d, f = n((e) => {
2668
2666
  let t = e(this.workspace.$.draft);
2669
2667
  d != t?.flowId && (u.clear(), d = t?.flowId);
2670
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}`, _ = [
2671
- ...Ht(t, n),
2669
+ ...zt(t, n),
2672
2670
  r == null || n == null ? void 0 : se(r, n),
2673
2671
  i,
2674
2672
  a,
@@ -2687,7 +2685,7 @@ var Wt = { openExternalPage: async () => !1 }, Gt = class {
2687
2685
  graph: y,
2688
2686
  inputs: _
2689
2687
  }), y;
2690
- }), p = e(f, Vt);
2688
+ }), p = e(f, Rt);
2691
2689
  this.$ = {
2692
2690
  busy: n((e) => {
2693
2691
  let t = e(this.workspace.$.busy);
@@ -2701,7 +2699,7 @@ var Wt = { openExternalPage: async () => !1 }, Gt = class {
2701
2699
  designer: f,
2702
2700
  designerNodeById: p,
2703
2701
  notice: this.#r,
2704
- runEventNodes: n((e) => Ut(e(this.workspace.$.draft), e(this.workspace.$.target), e(this.runs.$.run), e(this.runs.$.events), e(p))),
2702
+ runEventNodes: n((e) => Bt(e(this.workspace.$.draft), e(this.workspace.$.target), e(this.runs.$.run), e(this.runs.$.events), e(p))),
2705
2703
  selectedDesignerNode: n((e) => {
2706
2704
  let t = e(this.workspace.$.selectedNodeIds);
2707
2705
  return t.length == 1 ? e(p).get(t[0]) : void 0;
@@ -2734,7 +2732,7 @@ var Wt = { openExternalPage: async () => !1 }, Gt = class {
2734
2732
  if (!e() || this.#l) return;
2735
2733
  this.#a.set(t.map((e) => e.name)), this.#o.set(!0);
2736
2734
  } catch (t) {
2737
- e() && !this.#l && this.#r.set(R(t, this.#n.t));
2735
+ e() && !this.#l && this.#r.set(B(t, this.#n.t));
2738
2736
  } finally {
2739
2737
  e() && !this.#l && this.#s.set(!1);
2740
2738
  }
@@ -2773,7 +2771,7 @@ var Wt = { openExternalPage: async () => !1 }, Gt = class {
2773
2771
  if (t.aborted || this.#l) return;
2774
2772
  let r = n.filter((e) => e.status == "rejected");
2775
2773
  if (r.length > 0 && r.length == n.length) throw r[0].reason;
2776
- return r.length > 0 && this.#r.set(R(r[0].reason, this.#n.t)), n.flatMap((e) => e.status == "fulfilled" ? e.value ?? [] : []);
2774
+ return r.length > 0 && this.#r.set(B(r[0].reason, this.#n.t)), n.flatMap((e) => e.status == "fulfilled" ? e.value ?? [] : []);
2777
2775
  }
2778
2776
  async refreshSelectedConnector(e = !1) {
2779
2777
  await this.connectors.refresh(e);
@@ -2798,13 +2796,13 @@ var Wt = { openExternalPage: async () => !1 }, Gt = class {
2798
2796
  return;
2799
2797
  }
2800
2798
  }
2801
- }, Kt = He(() => import("./flowWorkspace-DwyxAOBH.js").then((e) => e.t));
2802
- function qt({ action: e, description: t, error: n, onSubmit: r, onTokenChange: i, pending: a = !1, title: o, token: s, tokenLabel: f }) {
2803
- let g = s != null && f != null && i != null, _ = s ?? "", v = /* @__PURE__ */ H(We, { children: [
2804
- /* @__PURE__ */ V("div", {
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: [
2802
+ /* @__PURE__ */ W("div", {
2805
2803
  "aria-hidden": "true",
2806
2804
  className: "flex size-10 items-center justify-center rounded-lg bg-muted text-muted-foreground",
2807
- children: /* @__PURE__ */ H("svg", {
2805
+ children: /* @__PURE__ */ G("svg", {
2808
2806
  className: "size-5",
2809
2807
  fill: "none",
2810
2808
  stroke: "currentColor",
@@ -2812,40 +2810,40 @@ function qt({ action: e, description: t, error: n, onSubmit: r, onTokenChange: i
2812
2810
  strokeLinejoin: "round",
2813
2811
  strokeWidth: "1.8",
2814
2812
  viewBox: "0 0 24 24",
2815
- children: [/* @__PURE__ */ V("rect", {
2813
+ children: [/* @__PURE__ */ W("rect", {
2816
2814
  height: "9",
2817
2815
  rx: "2",
2818
2816
  width: "14",
2819
2817
  x: "5",
2820
2818
  y: "11"
2821
- }), /* @__PURE__ */ V("path", { d: "M8 11V8a4 4 0 0 1 8 0v3" })]
2819
+ }), /* @__PURE__ */ W("path", { d: "M8 11V8a4 4 0 0 1 8 0v3" })]
2822
2820
  })
2823
2821
  }),
2824
- /* @__PURE__ */ H("header", {
2822
+ /* @__PURE__ */ G("header", {
2825
2823
  className: "flex flex-col gap-2",
2826
- children: [/* @__PURE__ */ V("h1", {
2824
+ children: [/* @__PURE__ */ W("h1", {
2827
2825
  className: "text-xl font-semibold tracking-tight text-balance",
2828
2826
  children: o
2829
- }), /* @__PURE__ */ V("p", {
2827
+ }), /* @__PURE__ */ W("p", {
2830
2828
  className: "text-sm/relaxed text-muted-foreground text-pretty",
2831
2829
  children: t
2832
2830
  })]
2833
2831
  }),
2834
- g && /* @__PURE__ */ V(h, { children: /* @__PURE__ */ H(u, {
2832
+ g && /* @__PURE__ */ W(h, { children: /* @__PURE__ */ G(u, {
2835
2833
  "data-invalid": n != null,
2836
2834
  children: [
2837
- /* @__PURE__ */ V(m, {
2835
+ /* @__PURE__ */ W(m, {
2838
2836
  htmlFor: "session-token",
2839
2837
  children: f
2840
2838
  }),
2841
- /* @__PURE__ */ V(c, {
2839
+ /* @__PURE__ */ W(c, {
2842
2840
  autoComplete: "username",
2843
2841
  name: "username",
2844
2842
  type: "hidden",
2845
2843
  value: "open-flow",
2846
2844
  readOnly: !0
2847
2845
  }),
2848
- /* @__PURE__ */ V(c, {
2846
+ /* @__PURE__ */ W(c, {
2849
2847
  autoComplete: "current-password",
2850
2848
  "aria-invalid": n != null,
2851
2849
  autoFocus: !0,
@@ -2857,29 +2855,29 @@ function qt({ action: e, description: t, error: n, onSubmit: r, onTokenChange: i
2857
2855
  type: "password",
2858
2856
  value: _
2859
2857
  }),
2860
- n != null && /* @__PURE__ */ V(l, { children: n })
2858
+ n != null && /* @__PURE__ */ W(l, { children: n })
2861
2859
  ]
2862
2860
  }) }),
2863
- e != null && r != null && /* @__PURE__ */ H(p, {
2861
+ e != null && r != null && /* @__PURE__ */ G(p, {
2864
2862
  disabled: a || g && _.length == 0,
2865
2863
  size: "lg",
2866
2864
  type: "submit",
2867
- children: [a && /* @__PURE__ */ V(d, {
2865
+ children: [a && /* @__PURE__ */ W(d, {
2868
2866
  "aria-label": e,
2869
2867
  "data-icon": "inline-start"
2870
2868
  }), e]
2871
2869
  }),
2872
- a && e == null && /* @__PURE__ */ V(d, { "aria-label": t })
2870
+ a && e == null && /* @__PURE__ */ W(d, { "aria-label": t })
2873
2871
  ] }), y = "m-auto flex w-full max-w-[420px] flex-col gap-5 rounded-xl bg-card p-6 shadow-lg shadow-black/10";
2874
- return /* @__PURE__ */ V("main", {
2872
+ return /* @__PURE__ */ W("main", {
2875
2873
  className: "open-flow-workbench",
2876
- children: /* @__PURE__ */ V("div", {
2874
+ children: /* @__PURE__ */ W("div", {
2877
2875
  className: "grid h-full overflow-auto bg-muted/20 p-4",
2878
- children: r == null ? /* @__PURE__ */ V("section", {
2876
+ children: r == null ? /* @__PURE__ */ W("section", {
2879
2877
  "aria-busy": a,
2880
2878
  className: y,
2881
2879
  children: v
2882
- }) : /* @__PURE__ */ V("form", {
2880
+ }) : /* @__PURE__ */ W("form", {
2883
2881
  "aria-busy": a,
2884
2882
  className: y,
2885
2883
  onSubmit: r,
@@ -2888,15 +2886,15 @@ function qt({ action: e, description: t, error: n, onSubmit: r, onTokenChange: i
2888
2886
  })
2889
2887
  });
2890
2888
  }
2891
- function Jt({ host: e, store: t }) {
2889
+ function Gt({ host: e, store: t }) {
2892
2890
  let n = a(t.$.notice);
2893
- return z(() => e.notify(n), [e, n]), z(() => () => e.notify(void 0), [e]), null;
2891
+ return H(() => e.notify(n), [e, n]), H(() => () => e.notify(void 0), [e]), null;
2894
2892
  }
2895
- function Yt({ createFlow: e, createFlowDisabled: t, createFlowField: n, flowBadges: r, hrefFor: i, hostAction: o, hostTitle: s, language: c, navigation: l, onHostAction: u, onLanguageChange: d, store: f, theme: p }) {
2896
- let m = a(f.workspace.$.flowId);
2897
- return /* @__PURE__ */ V("div", {
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);
2895
+ return /* @__PURE__ */ W("div", {
2898
2896
  className: "app-shell",
2899
- children: m == null ? /* @__PURE__ */ V(Qe, {
2897
+ children: h == null ? /* @__PURE__ */ W(Ye, {
2900
2898
  createFlowDisabled: t,
2901
2899
  createFlowField: n,
2902
2900
  flowBadges: r,
@@ -2908,61 +2906,62 @@ function Yt({ createFlow: e, createFlowDisabled: t, createFlowField: n, flowBadg
2908
2906
  hostTitle: s,
2909
2907
  language: c,
2910
2908
  onCreateFlow: (t) => l.createFlow(t, e),
2911
- onHostAction: u,
2912
- onLanguageChange: d,
2909
+ onHostAction: d,
2910
+ onLanguageChange: f,
2913
2911
  onSelectFlow: (e) => void l.selectFlow(e),
2914
- store: f
2915
- }) : /* @__PURE__ */ V(Ve, {
2916
- fallback: /* @__PURE__ */ V("main", {
2912
+ store: p
2913
+ }) : /* @__PURE__ */ W(Re, {
2914
+ fallback: /* @__PURE__ */ W("main", {
2917
2915
  "aria-busy": "true",
2918
2916
  className: "workspace"
2919
2917
  }),
2920
- children: /* @__PURE__ */ V(Kt, {
2918
+ children: /* @__PURE__ */ W(Ut, {
2921
2919
  hostAction: o,
2922
2920
  hostTitle: s,
2923
2921
  hrefFor: i,
2924
2922
  navigation: l,
2925
- onHostAction: u,
2926
- store: f,
2927
- theme: p
2923
+ onConfigureConnector: u,
2924
+ onHostAction: d,
2925
+ store: p,
2926
+ theme: m
2928
2927
  })
2929
2928
  })
2930
2929
  });
2931
2930
  }
2932
- function Xt({ createFlow: e, createFlowDisabled: t, createFlowField: n, flowBadges: r, host: i, hostAction: a, hostTitle: s, hrefFor: c, language: l, location: u, onHostAction: d, onLanguageChange: f, onNavigate: p, preferences: m, theme: h, variables: g = !0 }) {
2933
- let _ = Ue(p);
2934
- _.current = p;
2935
- let [{ i18n: v, navigation: y, store: b }] = B(() => {
2936
- let e = E(l), t = new Gt(new k((e, t) => i.request(e, t), (e, t) => i.subscribeFlow(e, t), (e) => i.subscribeFlowCatalog(e)), m, () => crypto.randomUUID(), e, i, g);
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, _);
2937
2936
  return {
2938
2937
  i18n: e,
2939
- navigation: new Ge(t, u, (e, t) => _.current(e, t)),
2938
+ navigation: new He(t, u, (e, t) => v.current(e, t)),
2940
2939
  store: t
2941
2940
  };
2942
2941
  });
2943
- return z(() => {
2944
- y.start();
2942
+ return H(() => {
2943
+ b.start();
2945
2944
  let e = () => {
2946
- b.connectors.refreshAfterAuthorization(), b.triggers.refreshAfterAuthorization(), b.refreshVariableNames();
2945
+ x.connectors.refreshAfterAuthorization(), x.triggers.refreshAfterAuthorization(), x.refreshVariableNames();
2947
2946
  };
2948
2947
  return globalThis.addEventListener("focus", e), () => {
2949
- globalThis.removeEventListener("focus", e), y.dispose(), b.dispose(), v.dispose();
2948
+ globalThis.removeEventListener("focus", e), b.dispose(), x.dispose(), y.dispose();
2950
2949
  };
2951
2950
  }, [
2952
- v,
2953
2951
  y,
2954
- b
2955
- ]), z(() => void y.apply(u), [u, y]), z(() => {
2956
- v.lang != l && v.switchLang(l);
2957
- }, [v, l]), /* @__PURE__ */ V(o, {
2958
- i18n: v,
2959
- children: /* @__PURE__ */ H("div", {
2952
+ 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,
2958
+ children: /* @__PURE__ */ G("div", {
2960
2959
  className: "open-flow-theme open-flow-workbench",
2961
- "data-theme": h,
2962
- children: [/* @__PURE__ */ V(Jt, {
2960
+ "data-theme": g,
2961
+ children: [/* @__PURE__ */ W(Gt, {
2963
2962
  host: i,
2964
- store: b
2965
- }), /* @__PURE__ */ V(Yt, {
2963
+ store: x
2964
+ }), /* @__PURE__ */ W(Kt, {
2966
2965
  createFlow: e,
2967
2966
  createFlowDisabled: t,
2968
2967
  createFlowField: n,
@@ -2971,17 +2970,18 @@ function Xt({ createFlow: e, createFlowDisabled: t, createFlowField: n, flowBadg
2971
2970
  hostTitle: s,
2972
2971
  hrefFor: c,
2973
2972
  language: l,
2974
- navigation: y,
2975
- onHostAction: d,
2976
- onLanguageChange: f,
2977
- store: b,
2978
- theme: h
2973
+ navigation: b,
2974
+ onConfigureConnector: d,
2975
+ onHostAction: f,
2976
+ onLanguageChange: p,
2977
+ store: x,
2978
+ theme: g
2979
2979
  })]
2980
2980
  })
2981
2981
  });
2982
2982
  }
2983
- function Zt({ sessionKey: e, ...t }) {
2984
- return /* @__PURE__ */ V(Xt, { ...t }, e);
2983
+ function Jt({ sessionKey: e, ...t }) {
2984
+ return /* @__PURE__ */ W(qt, { ...t }, e);
2985
2985
  }
2986
2986
  //#endregion
2987
- export { qt as OpenFlowSessionGate, Zt as OpenFlowWorkbench, ze as isWorkbenchLanguage, Be as resolveWorkbenchLanguage, Re as workbenchLanguageNames, Le as workbenchLanguages };
2987
+ export { Wt as OpenFlowSessionGate, Jt as OpenFlowWorkbench, Ie as isWorkbenchLanguage, Le as resolveWorkbenchLanguage, Fe as workbenchLanguageNames, V as workbenchLanguages };