@keycloak/keycloak-admin-ui 26.4.7 → 26.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/lib/.vite/manifest.json +53 -43
  2. package/lib/AddJWTAuthorizationGrant-CmYIQF47.js +69 -0
  3. package/lib/AddJWTAuthorizationGrant-CmYIQF47.js.map +1 -0
  4. package/lib/{AddKubernetesConnect-TKm82MxO.js → AddKubernetesConnect--zBiT7am.js} +4 -4
  5. package/lib/{AddKubernetesConnect-TKm82MxO.js.map → AddKubernetesConnect--zBiT7am.js.map} +1 -1
  6. package/lib/{AddOAuth2-Bg_V5CMD.js → AddOAuth2-BLRNGQKN.js} +15 -15
  7. package/lib/{AddOAuth2-Bg_V5CMD.js.map → AddOAuth2-BLRNGQKN.js.map} +1 -1
  8. package/lib/{AddSpiffeConnect-gH8LxYcP.js → AddSpiffeConnect-NfHagx80.js} +5 -5
  9. package/lib/{AddSpiffeConnect-gH8LxYcP.js.map → AddSpiffeConnect-NfHagx80.js.map} +1 -1
  10. package/lib/{CreateFlow-6M8Wg_2H.js → CreateFlow-Bf02T80Q.js} +2 -2
  11. package/lib/{CreateFlow-6M8Wg_2H.js.map → CreateFlow-Bf02T80Q.js.map} +1 -1
  12. package/lib/DetailOrganization-DWvk7gJ9.js +194 -0
  13. package/lib/DetailOrganization-DWvk7gJ9.js.map +1 -0
  14. package/lib/{ExecutorForm-BYCH7c3u.js → ExecutorForm-DHTRUoB1.js} +2 -2
  15. package/lib/{ExecutorForm-BYCH7c3u.js.map → ExecutorForm-DHTRUoB1.js.map} +1 -1
  16. package/lib/{FlowDetails-Dkl-8lLX.js → FlowDetails--N_U426z.js} +1021 -1048
  17. package/lib/{FlowDetails-Dkl-8lLX.js.map → FlowDetails--N_U426z.js.map} +1 -1
  18. package/lib/{NewOrganization-CBaP7xLv.js → NewOrganization-7we_ianL.js} +12 -12
  19. package/lib/{NewOrganization-CBaP7xLv.js.map → NewOrganization-7we_ianL.js.map} +1 -1
  20. package/lib/{PermissionConfigurationDetails-C0sgaW6Y.js → PermissionConfigurationDetails-u9MRYXxC.js} +18 -18
  21. package/lib/{PermissionConfigurationDetails-C0sgaW6Y.js.map → PermissionConfigurationDetails-u9MRYXxC.js.map} +1 -1
  22. package/lib/{PermissionDetails-CCdfBuaW.js → PermissionDetails-DxeSTYxA.js} +2 -2
  23. package/lib/{PermissionDetails-CCdfBuaW.js.map → PermissionDetails-DxeSTYxA.js.map} +1 -1
  24. package/lib/{RealmSection-CbqC2up8.js → RealmSection-DoqGXY7F.js} +7 -7
  25. package/lib/{RealmSection-CbqC2up8.js.map → RealmSection-DoqGXY7F.js.map} +1 -1
  26. package/lib/{ResourceDetails-DWXjggUc.js → ResourceDetails-Bn6Uim5l.js} +3 -3
  27. package/lib/{ResourceDetails-DWXjggUc.js.map → ResourceDetails-Bn6Uim5l.js.map} +1 -1
  28. package/lib/{ScopeDetails-dcHTfc9f.js → ScopeDetails-BCjTo6cS.js} +2 -2
  29. package/lib/{ScopeDetails-dcHTfc9f.js.map → ScopeDetails-BCjTo6cS.js.map} +1 -1
  30. package/lib/{ScopePicker-DNYZfIbU.js → ScopePicker-Dd6Cs54v.js} +7 -7
  31. package/lib/{ScopePicker-DNYZfIbU.js.map → ScopePicker-Dd6Cs54v.js.map} +1 -1
  32. package/lib/WorkflowDetailForm-alfgEItU.js +4938 -0
  33. package/lib/WorkflowDetailForm-alfgEItU.js.map +1 -0
  34. package/lib/WorkflowsSection-DflIdHaB.js +135 -0
  35. package/lib/WorkflowsSection-DflIdHaB.js.map +1 -0
  36. package/lib/client-scopes/details/SearchFilter.d.ts +1 -1
  37. package/lib/clients/constants.d.ts +2 -0
  38. package/lib/clients/keys/ImportKeyDialog.d.ts +3 -1
  39. package/lib/components/dynamic/ClaimDisplayComponent.d.ts +2 -0
  40. package/lib/components/dynamic/IdentityProviderMultiSelectComponent.d.ts +2 -0
  41. package/lib/components/dynamic/MultivaluedListComponent.d.ts +6 -1
  42. package/lib/components/dynamic/components.d.ts +2 -1
  43. package/lib/components/identity-provider/IdentityProviderSelect.d.ts +10 -0
  44. package/lib/components/users/UserDataTableAttributeSearchForm.d.ts +2 -1
  45. package/lib/groups/GroupRoleMapping.d.ts +2 -1
  46. package/lib/identity-providers/add/AddJWTAuthorizationGrant.d.ts +1 -0
  47. package/lib/identity-providers/add/JWTAuthorizationGrantAssertionSettings.d.ts +1 -0
  48. package/lib/identity-providers/add/JWTAuthorizationGrantSettings.d.ts +1 -0
  49. package/lib/identity-providers/add/JwksSettings.d.ts +5 -0
  50. package/lib/identity-providers/routes/IdentityProviderJWTAuthorizationGrant.d.ts +7 -0
  51. package/lib/{index-YEmLy1gM.js → index-Ddam0zn3.js} +28912 -27332
  52. package/lib/{index-YEmLy1gM.js.map → index-Ddam0zn3.js.map} +1 -1
  53. package/lib/index.d.ts +2 -0
  54. package/lib/keycloak-admin-ui.js +147 -145
  55. package/lib/organizations/Invitations.d.ts +1 -0
  56. package/lib/organizations/MembersSection.d.ts +1 -0
  57. package/lib/realm-settings/TokensTab.d.ts +2 -2
  58. package/lib/utils/useIsFeatureEnabled.d.ts +1 -0
  59. package/lib/workflows/WorkflowDetailForm.d.ts +1 -0
  60. package/lib/workflows/routes/WorkflowDetail.d.ts +9 -0
  61. package/package.json +34 -22
  62. package/lib/CreateWorkflow-zbDnQ8Gr.js +0 -86
  63. package/lib/CreateWorkflow-zbDnQ8Gr.js.map +0 -1
  64. package/lib/DetailOrganization-DfVZ7YOx.js +0 -164
  65. package/lib/DetailOrganization-DfVZ7YOx.js.map +0 -1
  66. package/lib/WorkflowsSection-DZtAH1DA.js +0 -92
  67. package/lib/WorkflowsSection-DZtAH1DA.js.map +0 -1
  68. package/lib/workflows/CreateWorkflow.d.ts +0 -1
  69. package/lib/workflows/routes/AddWorkflow.d.ts +0 -7
@@ -1,5 +1,5 @@
1
1
  import { jsx as T, jsxs as te, Fragment as be } from "react/jsx-runtime";
2
- import { g as Wt, h as Lo, i as Dt, T as ia, j as Oc, s as Ac, L as Io, C as Tc, u as mt, _ as Oo, b as zn, M as nn, k as rn, F as Vn, l as on, N as Dc, B as ge, m as Je, d as We, n as Rc, y as Rt, o as Pc, p as $c, P as sa, R as Fc, Q as Cn, U as si, v as zc, q as ai, r as li, w as Vc, x as Hc, X as Bc, Z as qc, z as Gc, D as aa, E as Ye, G as Yc, H as Hn, I as jc, J as Wc, K as lt, O as la, S as co, W as Xc, Y as Zc, $ as Uc, a0 as Kc, A as Qc, a1 as ca, a2 as Jc, a3 as eu, a4 as tu, a5 as nu, a6 as ru, a7 as ou, a8 as iu, a9 as Ve, a as su, aa as ci, t as au, ab as lu, f as cu, ac as uu, V as du, ad as fu, ae as hu, af as tr, ag as pu, ah as gu, ai as mu, aj as yu } from "./index-YEmLy1gM.js";
2
+ import { g as Wt, h as Lo, i as Dt, T as ia, j as Oc, s as Ac, L as Io, C as Tc, u as mt, _ as Oo, b as zn, M as nn, k as rn, F as Vn, l as on, N as Dc, B as ge, m as Je, d as We, n as Rc, y as Rt, o as Pc, p as $c, P as sa, R as Fc, Q as Cn, U as si, v as zc, q as ai, r as li, w as Vc, x as Hc, X as Bc, Z as qc, z as Gc, D as aa, E as Ye, G as Yc, H as Hn, I as jc, J as Wc, K as lt, O as la, S as co, W as Xc, Y as Zc, $ as Uc, a0 as Kc, A as Qc, a1 as ca, a2 as Jc, a3 as eu, a4 as tu, a5 as nu, a6 as ru, a7 as ou, a8 as iu, a9 as Ve, a as su, aa as ci, t as au, ab as lu, f as cu, ac as uu, V as du, ad as fu, ae as hu, af as tr, ag as pu, ah as gu, ai as mu, aj as yu } from "./index-Ddam0zn3.js";
3
3
  import * as Re from "react";
4
4
  import $, { useEffect as oe, useState as re, useMemo as Ne, forwardRef as ua, useCallback as de, memo as ae, useContext as Bn, createContext as da, useRef as Q } from "react";
5
5
  import { useTranslation as _e, Trans as ui } from "react-i18next";
@@ -24,13 +24,13 @@ const uo = ({ variant: e, children: t }) => Re.createElement("span", { className
24
24
  uo.displayName = "ToggleGroupItemElement";
25
25
  const kn = (e) => {
26
26
  var { text: t, icon: n, className: r, isDisabled: o = !1, isSelected: s = !1, "aria-label": i = "", onChange: a = () => {
27
- }, buttonId: c = "" } = e, u = Lo(e, ["text", "icon", "className", "isDisabled", "isSelected", "aria-label", "onChange", "buttonId"]);
28
- const l = (d) => {
29
- a(d, !s);
27
+ }, buttonId: c = "" } = e, d = Lo(e, ["text", "icon", "className", "isDisabled", "isSelected", "aria-label", "onChange", "buttonId"]);
28
+ const l = (u) => {
29
+ a(u, !s);
30
30
  };
31
31
  return !i && n && !t && console.warn("An accessible aria-label is required when using the toggle group item icon variant."), Re.createElement(
32
32
  "div",
33
- Object.assign({ className: Wt(dt.toggleGroupItem, r) }, u),
33
+ Object.assign({ className: Wt(dt.toggleGroupItem, r) }, d),
34
34
  Re.createElement(
35
35
  "button",
36
36
  Object.assign({ type: "button", className: Wt(dt.toggleGroupButton, s && dt.modifiers.selected), "aria-pressed": s, onClick: l }, i && { "aria-label": i }, o && { disabled: !0 }, c && { id: c }),
@@ -95,8 +95,8 @@ const bu = {
95
95
  rowProps: n,
96
96
  row: r
97
97
  } = e, o = Lo(e, ["className", "rowProps", "row"]);
98
- const { "aria-level": s, "aria-posinset": i, "aria-setsize": a, isExpanded: c, isDetailsExpanded: u, isHidden: l } = r.props;
99
- return Re.createElement(ia, Object.assign({ "aria-level": s, "aria-posinset": i, "aria-setsize": a, "aria-expanded": !!c, isHidden: l, className: Wt(t, c && Ac.modifiers.expanded, u && Oc.modifiers.treeViewDetailsExpanded) }, o));
98
+ const { "aria-level": s, "aria-posinset": i, "aria-setsize": a, isExpanded: c, isDetailsExpanded: d, isHidden: l } = r.props;
99
+ return Re.createElement(ia, Object.assign({ "aria-level": s, "aria-posinset": i, "aria-setsize": a, "aria-expanded": !!c, isHidden: l, className: Wt(t, c && Ac.modifiers.expanded, d && Oc.modifiers.treeViewDetailsExpanded) }, o));
100
100
  };
101
101
  ha.displayName = "TreeRowWrapper";
102
102
  const Au = "_icon_1gmts_2", Tu = {
@@ -107,14 +107,14 @@ const Au = "_icon_1gmts_2", Tu = {
107
107
  }, Ru = ({ flow: e, toggleDialog: t }) => {
108
108
  const { adminClient: n } = mt(), { t: r } = _e(), { addAlert: o, addError: s } = Oo(), i = zn({ mode: "onChange" }), { reset: a, handleSubmit: c } = i;
109
109
  oe(() => a(e), [e]);
110
- const u = async (l) => {
110
+ const d = async (l) => {
111
111
  try {
112
112
  await n.authenticationManagement.updateFlow(
113
113
  { flowId: e.id },
114
114
  { ...e, ...l }
115
115
  ), o(r("updateFlowSuccess"), We.success);
116
- } catch (d) {
117
- s("updateFlowError", d);
116
+ } catch (u) {
117
+ s("updateFlowError", u);
118
118
  }
119
119
  t();
120
120
  };
@@ -151,7 +151,7 @@ const Au = "_icon_1gmts_2", Tu = {
151
151
  on,
152
152
  {
153
153
  id: "edit-flow-form",
154
- onSubmit: c(u),
154
+ onSubmit: c(d),
155
155
  isHorizontal: !0,
156
156
  children: /* @__PURE__ */ T(Dc, {})
157
157
  }
@@ -175,7 +175,7 @@ const Au = "_icon_1gmts_2", Tu = {
175
175
  },
176
176
  n.id
177
177
  )) }) }), Ao = ({ name: e, type: t, onSelect: n }) => {
178
- const { adminClient: r } = mt(), { t: o } = _e(), [s, i] = re(), [a, c] = re(), [u, l] = re(10), [d, f] = re(0), [h, p] = re(""), y = Rc();
178
+ const { adminClient: r } = mt(), { t: o } = _e(), [s, i] = re(), [a, c] = re(), [d, l] = re(10), [u, f] = re(0), [h, g] = re(""), y = Rc();
179
179
  Rt(
180
180
  async () => {
181
181
  switch (t) {
@@ -185,7 +185,6 @@ const Au = "_icon_1gmts_2", Tu = {
185
185
  return r.authenticationManagement.getFormActionProviders();
186
186
  case "condition":
187
187
  return (await r.authenticationManagement.getAuthenticatorProviders()).filter(Fn);
188
- case "basic":
189
188
  default:
190
189
  return (await r.authenticationManagement.getAuthenticatorProviders()).filter((w) => !Fn(w));
191
190
  }
@@ -193,12 +192,12 @@ const Au = "_icon_1gmts_2", Tu = {
193
192
  (m) => c(m),
194
193
  []
195
194
  );
196
- const g = Ne(() => {
195
+ const p = Ne(() => {
197
196
  const m = h.trim().toLowerCase();
198
197
  return y(a ?? [], Pc("displayName")).filter(
199
198
  ({ displayName: w, description: x }) => w?.toLowerCase().includes(m) || x?.toLowerCase().includes(m)
200
- ).slice(d, d + u + 1);
201
- }, [a, h, d, u]);
199
+ ).slice(u, u + d + 1);
200
+ }, [a, h, u, d]);
202
201
  return /* @__PURE__ */ T(
203
202
  nn,
204
203
  {
@@ -234,9 +233,9 @@ const Au = "_icon_1gmts_2", Tu = {
234
233
  children: a && /* @__PURE__ */ T(
235
234
  $c,
236
235
  {
237
- count: g.length || 0,
238
- first: d,
239
- max: u,
236
+ count: p.length || 0,
237
+ first: u,
238
+ max: d,
240
239
  onNextClick: f,
241
240
  onPreviousClick: f,
242
241
  onPerPageSelect: (m, w) => {
@@ -244,11 +243,11 @@ const Au = "_icon_1gmts_2", Tu = {
244
243
  },
245
244
  inputGroupName: "search",
246
245
  inputGroupPlaceholder: o("search"),
247
- inputGroupOnEnter: p,
246
+ inputGroupOnEnter: g,
248
247
  children: /* @__PURE__ */ T(
249
248
  Pu,
250
249
  {
251
- list: g.slice(0, u),
250
+ list: p.slice(0, d),
252
251
  setValue: i
253
252
  }
254
253
  )
@@ -428,92 +427,74 @@ function me(e) {
428
427
  return t;
429
428
  }
430
429
  var cn = { exports: {} }, nr = {}, un = { exports: {} }, rr = {};
431
- /**
432
- * @license React
433
- * use-sync-external-store-shim.production.js
434
- *
435
- * Copyright (c) Meta Platforms, Inc. and affiliates.
436
- *
437
- * This source code is licensed under the MIT license found in the
438
- * LICENSE file in the root directory of this source tree.
439
- */
440
430
  var fi;
441
431
  function Hu() {
442
432
  if (fi) return rr;
443
433
  fi = 1;
444
434
  var e = $;
445
- function t(d, f) {
446
- return d === f && (d !== 0 || 1 / d === 1 / f) || d !== d && f !== f;
435
+ function t(u, f) {
436
+ return u === f && (u !== 0 || 1 / u === 1 / f) || u !== u && f !== f;
447
437
  }
448
438
  var n = typeof Object.is == "function" ? Object.is : t, r = e.useState, o = e.useEffect, s = e.useLayoutEffect, i = e.useDebugValue;
449
- function a(d, f) {
450
- var h = f(), p = r({ inst: { value: h, getSnapshot: f } }), y = p[0].inst, g = p[1];
439
+ function a(u, f) {
440
+ var h = f(), g = r({ inst: { value: h, getSnapshot: f } }), y = g[0].inst, p = g[1];
451
441
  return s(
452
442
  function() {
453
- y.value = h, y.getSnapshot = f, c(y) && g({ inst: y });
443
+ y.value = h, y.getSnapshot = f, c(y) && p({ inst: y });
454
444
  },
455
- [d, h, f]
445
+ [u, h, f]
456
446
  ), o(
457
447
  function() {
458
- return c(y) && g({ inst: y }), d(function() {
459
- c(y) && g({ inst: y });
448
+ return c(y) && p({ inst: y }), u(function() {
449
+ c(y) && p({ inst: y });
460
450
  });
461
451
  },
462
- [d]
452
+ [u]
463
453
  ), i(h), h;
464
454
  }
465
- function c(d) {
466
- var f = d.getSnapshot;
467
- d = d.value;
455
+ function c(u) {
456
+ var f = u.getSnapshot;
457
+ u = u.value;
468
458
  try {
469
459
  var h = f();
470
- return !n(d, h);
460
+ return !n(u, h);
471
461
  } catch {
472
462
  return !0;
473
463
  }
474
464
  }
475
- function u(d, f) {
465
+ function d(u, f) {
476
466
  return f();
477
467
  }
478
- var l = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? u : a;
468
+ var l = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? d : a;
479
469
  return rr.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : l, rr;
480
470
  }
481
471
  var or = {};
482
- /**
483
- * @license React
484
- * use-sync-external-store-shim.development.js
485
- *
486
- * Copyright (c) Meta Platforms, Inc. and affiliates.
487
- *
488
- * This source code is licensed under the MIT license found in the
489
- * LICENSE file in the root directory of this source tree.
490
- */
491
472
  var hi;
492
473
  function Bu() {
493
474
  return hi || (hi = 1, process.env.NODE_ENV !== "production" && (function() {
494
- function e(h, p) {
495
- return h === p && (h !== 0 || 1 / h === 1 / p) || h !== h && p !== p;
475
+ function e(h, g) {
476
+ return h === g && (h !== 0 || 1 / h === 1 / g) || h !== h && g !== g;
496
477
  }
497
- function t(h, p) {
478
+ function t(h, g) {
498
479
  l || o.startTransition === void 0 || (l = !0, console.error(
499
480
  "You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
500
481
  ));
501
- var y = p();
502
- if (!d) {
503
- var g = p();
504
- s(y, g) || (console.error(
482
+ var y = g();
483
+ if (!u) {
484
+ var p = g();
485
+ s(y, p) || (console.error(
505
486
  "The result of getSnapshot should be cached to avoid an infinite loop"
506
- ), d = !0);
487
+ ), u = !0);
507
488
  }
508
- g = i({
509
- inst: { value: y, getSnapshot: p }
489
+ p = i({
490
+ inst: { value: y, getSnapshot: g }
510
491
  });
511
- var m = g[0].inst, w = g[1];
492
+ var m = p[0].inst, w = p[1];
512
493
  return c(
513
494
  function() {
514
- m.value = y, m.getSnapshot = p, n(m) && w({ inst: m });
495
+ m.value = y, m.getSnapshot = g, n(m) && w({ inst: m });
515
496
  },
516
- [h, y, p]
497
+ [h, y, g]
517
498
  ), a(
518
499
  function() {
519
500
  return n(m) && w({ inst: m }), h(function() {
@@ -521,23 +502,23 @@ function Bu() {
521
502
  });
522
503
  },
523
504
  [h]
524
- ), u(y), y;
505
+ ), d(y), y;
525
506
  }
526
507
  function n(h) {
527
- var p = h.getSnapshot;
508
+ var g = h.getSnapshot;
528
509
  h = h.value;
529
510
  try {
530
- var y = p();
511
+ var y = g();
531
512
  return !s(h, y);
532
513
  } catch {
533
514
  return !0;
534
515
  }
535
516
  }
536
- function r(h, p) {
537
- return p();
517
+ function r(h, g) {
518
+ return g();
538
519
  }
539
520
  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
540
- var o = $, s = typeof Object.is == "function" ? Object.is : e, i = o.useState, a = o.useEffect, c = o.useLayoutEffect, u = o.useDebugValue, l = !1, d = !1, f = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? r : t;
521
+ var o = $, s = typeof Object.is == "function" ? Object.is : e, i = o.useState, a = o.useEffect, c = o.useLayoutEffect, d = o.useDebugValue, l = !1, u = !1, f = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? r : t;
541
522
  or.useSyncExternalStore = o.useSyncExternalStore !== void 0 ? o.useSyncExternalStore : f, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
542
523
  })()), or;
543
524
  }
@@ -545,31 +526,22 @@ var pi;
545
526
  function ga() {
546
527
  return pi || (pi = 1, process.env.NODE_ENV === "production" ? un.exports = Hu() : un.exports = Bu()), un.exports;
547
528
  }
548
- /**
549
- * @license React
550
- * use-sync-external-store-shim/with-selector.production.js
551
- *
552
- * Copyright (c) Meta Platforms, Inc. and affiliates.
553
- *
554
- * This source code is licensed under the MIT license found in the
555
- * LICENSE file in the root directory of this source tree.
556
- */
557
529
  var gi;
558
530
  function qu() {
559
531
  if (gi) return nr;
560
532
  gi = 1;
561
533
  var e = $, t = ga();
562
- function n(u, l) {
563
- return u === l && (u !== 0 || 1 / u === 1 / l) || u !== u && l !== l;
534
+ function n(d, l) {
535
+ return d === l && (d !== 0 || 1 / d === 1 / l) || d !== d && l !== l;
564
536
  }
565
537
  var r = typeof Object.is == "function" ? Object.is : n, o = t.useSyncExternalStore, s = e.useRef, i = e.useEffect, a = e.useMemo, c = e.useDebugValue;
566
- return nr.useSyncExternalStoreWithSelector = function(u, l, d, f, h) {
567
- var p = s(null);
568
- if (p.current === null) {
538
+ return nr.useSyncExternalStoreWithSelector = function(d, l, u, f, h) {
539
+ var g = s(null);
540
+ if (g.current === null) {
569
541
  var y = { hasValue: !1, value: null };
570
- p.current = y;
571
- } else y = p.current;
572
- p = a(
542
+ g.current = y;
543
+ } else y = g.current;
544
+ g = a(
573
545
  function() {
574
546
  function m(S) {
575
547
  if (!w) {
@@ -584,7 +556,7 @@ function qu() {
584
556
  var E = f(S);
585
557
  return h !== void 0 && h(D, E) ? (x = S, D) : (x = S, b = E);
586
558
  }
587
- var w = !1, x, b, C = d === void 0 ? null : d;
559
+ var w = !1, x, b, C = u === void 0 ? null : u;
588
560
  return [
589
561
  function() {
590
562
  return m(l());
@@ -594,42 +566,33 @@ function qu() {
594
566
  }
595
567
  ];
596
568
  },
597
- [l, d, f, h]
569
+ [l, u, f, h]
598
570
  );
599
- var g = o(u, p[0], p[1]);
571
+ var p = o(d, g[0], g[1]);
600
572
  return i(
601
573
  function() {
602
- y.hasValue = !0, y.value = g;
574
+ y.hasValue = !0, y.value = p;
603
575
  },
604
- [g]
605
- ), c(g), g;
576
+ [p]
577
+ ), c(p), p;
606
578
  }, nr;
607
579
  }
608
580
  var ir = {};
609
- /**
610
- * @license React
611
- * use-sync-external-store-shim/with-selector.development.js
612
- *
613
- * Copyright (c) Meta Platforms, Inc. and affiliates.
614
- *
615
- * This source code is licensed under the MIT license found in the
616
- * LICENSE file in the root directory of this source tree.
617
- */
618
581
  var mi;
619
582
  function Gu() {
620
583
  return mi || (mi = 1, process.env.NODE_ENV !== "production" && (function() {
621
- function e(u, l) {
622
- return u === l && (u !== 0 || 1 / u === 1 / l) || u !== u && l !== l;
584
+ function e(d, l) {
585
+ return d === l && (d !== 0 || 1 / d === 1 / l) || d !== d && l !== l;
623
586
  }
624
587
  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
625
588
  var t = $, n = ga(), r = typeof Object.is == "function" ? Object.is : e, o = n.useSyncExternalStore, s = t.useRef, i = t.useEffect, a = t.useMemo, c = t.useDebugValue;
626
- ir.useSyncExternalStoreWithSelector = function(u, l, d, f, h) {
627
- var p = s(null);
628
- if (p.current === null) {
589
+ ir.useSyncExternalStoreWithSelector = function(d, l, u, f, h) {
590
+ var g = s(null);
591
+ if (g.current === null) {
629
592
  var y = { hasValue: !1, value: null };
630
- p.current = y;
631
- } else y = p.current;
632
- p = a(
593
+ g.current = y;
594
+ } else y = g.current;
595
+ g = a(
633
596
  function() {
634
597
  function m(S) {
635
598
  if (!w) {
@@ -645,7 +608,7 @@ function Gu() {
645
608
  var E = f(S);
646
609
  return h !== void 0 && h(D, E) ? (x = S, D) : (x = S, b = E);
647
610
  }
648
- var w = !1, x, b, C = d === void 0 ? null : d;
611
+ var w = !1, x, b, C = u === void 0 ? null : u;
649
612
  return [
650
613
  function() {
651
614
  return m(l());
@@ -655,15 +618,15 @@ function Gu() {
655
618
  }
656
619
  ];
657
620
  },
658
- [l, d, f, h]
621
+ [l, u, f, h]
659
622
  );
660
- var g = o(u, p[0], p[1]);
623
+ var p = o(d, g[0], g[1]);
661
624
  return i(
662
625
  function() {
663
- y.hasValue = !0, y.value = g;
626
+ y.hasValue = !0, y.value = p;
664
627
  },
665
- [g]
666
- ), c(g), g;
628
+ [p]
629
+ ), c(p), p;
667
630
  }, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
668
631
  })()), ir;
669
632
  }
@@ -674,17 +637,17 @@ function Yu() {
674
637
  var ju = Yu();
675
638
  const Wu = /* @__PURE__ */ Gc(ju), Xu = {}, wi = (e) => {
676
639
  let t;
677
- const n = /* @__PURE__ */ new Set(), r = (l, d) => {
640
+ const n = /* @__PURE__ */ new Set(), r = (l, u) => {
678
641
  const f = typeof l == "function" ? l(t) : l;
679
642
  if (!Object.is(f, t)) {
680
643
  const h = t;
681
- t = d ?? (typeof f != "object" || f === null) ? f : Object.assign({}, t, f), n.forEach((p) => p(t, h));
644
+ t = u ?? (typeof f != "object" || f === null) ? f : Object.assign({}, t, f), n.forEach((g) => g(t, h));
682
645
  }
683
- }, o = () => t, c = { setState: r, getState: o, getInitialState: () => u, subscribe: (l) => (n.add(l), () => n.delete(l)), destroy: () => {
646
+ }, o = () => t, c = { setState: r, getState: o, getInitialState: () => d, subscribe: (l) => (n.add(l), () => n.delete(l)), destroy: () => {
684
647
  (Xu ? "production" : void 0) !== "production" && console.warn(
685
648
  "[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."
686
649
  ), n.clear();
687
- } }, u = t = e(r, o, c);
650
+ } }, d = t = e(r, o, c);
688
651
  return c;
689
652
  }, Zu = (e) => e ? wi(e) : wi, { useDebugValue: Uu } = $, { useSyncExternalStoreWithSelector: Ku } = Wu, Qu = (e) => e;
690
653
  function ma(e, t = Qu, n) {
@@ -826,8 +789,8 @@ function Do(e) {
826
789
  function sd(e) {
827
790
  typeof e != "function" && (e = Do(e));
828
791
  for (var t = this._groups, n = t.length, r = new Array(n), o = 0; o < n; ++o)
829
- for (var s = t[o], i = s.length, a = r[o] = new Array(i), c, u, l = 0; l < i; ++l)
830
- (c = s[l]) && (u = e.call(c, c.__data__, l, s)) && ("__data__" in c && (u.__data__ = c.__data__), a[l] = u);
792
+ for (var s = t[o], i = s.length, a = r[o] = new Array(i), c, d, l = 0; l < i; ++l)
793
+ (c = s[l]) && (d = e.call(c, c.__data__, l, s)) && ("__data__" in c && (d.__data__ = c.__data__), a[l] = d);
831
794
  return new Ee(r, this._parents);
832
795
  }
833
796
  function ad(e) {
@@ -849,8 +812,8 @@ function cd(e) {
849
812
  function ud(e) {
850
813
  typeof e == "function" ? e = cd(e) : e = wa(e);
851
814
  for (var t = this._groups, n = t.length, r = [], o = [], s = 0; s < n; ++s)
852
- for (var i = t[s], a = i.length, c, u = 0; u < a; ++u)
853
- (c = i[u]) && (r.push(e.call(c, c.__data__, u, i)), o.push(c));
815
+ for (var i = t[s], a = i.length, c, d = 0; d < a; ++d)
816
+ (c = i[d]) && (r.push(e.call(c, c.__data__, d, i)), o.push(c));
854
817
  return new Ee(r, o);
855
818
  }
856
819
  function va(e) {
@@ -890,8 +853,8 @@ function wd(e) {
890
853
  function vd(e) {
891
854
  typeof e != "function" && (e = va(e));
892
855
  for (var t = this._groups, n = t.length, r = new Array(n), o = 0; o < n; ++o)
893
- for (var s = t[o], i = s.length, a = r[o] = [], c, u = 0; u < i; ++u)
894
- (c = s[u]) && e.call(c, c.__data__, u, s) && a.push(c);
856
+ for (var s = t[o], i = s.length, a = r[o] = [], c, d = 0; d < i; ++d)
857
+ (c = s[d]) && e.call(c, c.__data__, d, s) && a.push(c);
895
858
  return new Ee(r, this._parents);
896
859
  }
897
860
  function xa(e) {
@@ -924,19 +887,19 @@ function xd(e) {
924
887
  };
925
888
  }
926
889
  function Ed(e, t, n, r, o, s) {
927
- for (var i = 0, a, c = t.length, u = s.length; i < u; ++i)
890
+ for (var i = 0, a, c = t.length, d = s.length; i < d; ++i)
928
891
  (a = t[i]) ? (a.__data__ = s[i], r[i] = a) : n[i] = new Mn(e, s[i]);
929
892
  for (; i < c; ++i)
930
893
  (a = t[i]) && (o[i] = a);
931
894
  }
932
895
  function _d(e, t, n, r, o, s, i) {
933
- var a, c, u = /* @__PURE__ */ new Map(), l = t.length, d = s.length, f = new Array(l), h;
896
+ var a, c, d = /* @__PURE__ */ new Map(), l = t.length, u = s.length, f = new Array(l), h;
934
897
  for (a = 0; a < l; ++a)
935
- (c = t[a]) && (f[a] = h = i.call(c, c.__data__, a, t) + "", u.has(h) ? o[a] = c : u.set(h, c));
936
- for (a = 0; a < d; ++a)
937
- h = i.call(e, s[a], a, s) + "", (c = u.get(h)) ? (r[a] = c, c.__data__ = s[a], u.delete(h)) : n[a] = new Mn(e, s[a]);
898
+ (c = t[a]) && (f[a] = h = i.call(c, c.__data__, a, t) + "", d.has(h) ? o[a] = c : d.set(h, c));
899
+ for (a = 0; a < u; ++a)
900
+ h = i.call(e, s[a], a, s) + "", (c = d.get(h)) ? (r[a] = c, c.__data__ = s[a], d.delete(h)) : n[a] = new Mn(e, s[a]);
938
901
  for (a = 0; a < l; ++a)
939
- (c = t[a]) && u.get(f[a]) === c && (o[a] = c);
902
+ (c = t[a]) && d.get(f[a]) === c && (o[a] = c);
940
903
  }
941
904
  function Sd(e) {
942
905
  return e.__data__;
@@ -945,12 +908,12 @@ function Cd(e, t) {
945
908
  if (!arguments.length) return Array.from(this, Sd);
946
909
  var n = t ? _d : Ed, r = this._parents, o = this._groups;
947
910
  typeof e != "function" && (e = xd(e));
948
- for (var s = o.length, i = new Array(s), a = new Array(s), c = new Array(s), u = 0; u < s; ++u) {
949
- var l = r[u], d = o[u], f = d.length, h = Nd(e.call(l, l && l.__data__, u, r)), p = h.length, y = a[u] = new Array(p), g = i[u] = new Array(p), m = c[u] = new Array(f);
950
- n(l, d, y, g, m, h, t);
951
- for (var w = 0, x = 0, b, C; w < p; ++w)
911
+ for (var s = o.length, i = new Array(s), a = new Array(s), c = new Array(s), d = 0; d < s; ++d) {
912
+ var l = r[d], u = o[d], f = u.length, h = Nd(e.call(l, l && l.__data__, d, r)), g = h.length, y = a[d] = new Array(g), p = i[d] = new Array(g), m = c[d] = new Array(f);
913
+ n(l, u, y, p, m, h, t);
914
+ for (var w = 0, x = 0, b, C; w < g; ++w)
952
915
  if (b = y[w]) {
953
- for (w >= x && (x = w + 1); !(C = g[x]) && ++x < p; ) ;
916
+ for (w >= x && (x = w + 1); !(C = p[x]) && ++x < g; ) ;
954
917
  b._next = C || null;
955
918
  }
956
919
  }
@@ -968,8 +931,8 @@ function Md(e, t, n) {
968
931
  }
969
932
  function Ld(e) {
970
933
  for (var t = e.selection ? e.selection() : e, n = this._groups, r = t._groups, o = n.length, s = r.length, i = Math.min(o, s), a = new Array(o), c = 0; c < i; ++c)
971
- for (var u = n[c], l = r[c], d = u.length, f = a[c] = new Array(d), h, p = 0; p < d; ++p)
972
- (h = u[p] || l[p]) && (f[p] = h);
934
+ for (var d = n[c], l = r[c], u = d.length, f = a[c] = new Array(u), h, g = 0; g < u; ++g)
935
+ (h = d[g] || l[g]) && (f[g] = h);
973
936
  for (; c < o; ++c)
974
937
  a[c] = n[c];
975
938
  return new Ee(a, this._parents);
@@ -982,12 +945,12 @@ function Id() {
982
945
  }
983
946
  function Od(e) {
984
947
  e || (e = Ad);
985
- function t(d, f) {
986
- return d && f ? e(d.__data__, f.__data__) : !d - !f;
948
+ function t(u, f) {
949
+ return u && f ? e(u.__data__, f.__data__) : !u - !f;
987
950
  }
988
951
  for (var n = this._groups, r = n.length, o = new Array(r), s = 0; s < r; ++s) {
989
- for (var i = n[s], a = i.length, c = o[s] = new Array(a), u, l = 0; l < a; ++l)
990
- (u = i[l]) && (c[l] = u);
952
+ for (var i = n[s], a = i.length, c = o[s] = new Array(a), d, l = 0; l < a; ++l)
953
+ (d = i[l]) && (c[l] = d);
991
954
  c.sort(t);
992
955
  }
993
956
  return new Ee(o, this._parents).order();
@@ -1280,7 +1243,7 @@ function If(e, t, n) {
1280
1243
  if (arguments.length < 2) {
1281
1244
  var a = this.node().__on;
1282
1245
  if (a) {
1283
- for (var c = 0, u = a.length, l; c < u; ++c)
1246
+ for (var c = 0, d = a.length, l; c < d; ++c)
1284
1247
  for (o = 0, l = a[c]; o < s; ++o)
1285
1248
  if ((i = r[o]).type === l.type && i.name === l.name)
1286
1249
  return l.value;
@@ -1409,7 +1372,7 @@ function ho(e, {
1409
1372
  x: i,
1410
1373
  y: a,
1411
1374
  dx: c,
1412
- dy: u,
1375
+ dy: d,
1413
1376
  dispatch: l
1414
1377
  }) {
1415
1378
  Object.defineProperties(this, {
@@ -1422,7 +1385,7 @@ function ho(e, {
1422
1385
  x: { value: i, enumerable: !0, configurable: !0 },
1423
1386
  y: { value: a, enumerable: !0, configurable: !0 },
1424
1387
  dx: { value: c, enumerable: !0, configurable: !0 },
1425
- dy: { value: u, enumerable: !0, configurable: !0 },
1388
+ dy: { value: d, enumerable: !0, configurable: !0 },
1426
1389
  _: { value: l }
1427
1390
  });
1428
1391
  }
@@ -1443,27 +1406,27 @@ function Hf() {
1443
1406
  return navigator.maxTouchPoints || "ontouchstart" in this;
1444
1407
  }
1445
1408
  function Bf() {
1446
- var e = Ff, t = zf, n = Vf, r = Hf, o = {}, s = qn("start", "drag", "end"), i = 0, a, c, u, l, d = 0;
1409
+ var e = Ff, t = zf, n = Vf, r = Hf, o = {}, s = qn("start", "drag", "end"), i = 0, a, c, d, l, u = 0;
1447
1410
  function f(b) {
1448
- b.on("mousedown.drag", h).filter(r).on("touchstart.drag", g).on("touchmove.drag", m, $f).on("touchend.drag touchcancel.drag", w).style("touch-action", "none").style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
1411
+ b.on("mousedown.drag", h).filter(r).on("touchstart.drag", p).on("touchmove.drag", m, $f).on("touchend.drag touchcancel.drag", w).style("touch-action", "none").style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
1449
1412
  }
1450
1413
  function h(b, C) {
1451
1414
  if (!(l || !e.call(this, b, C))) {
1452
1415
  var S = x(this, t.call(this, b, C), b, C, "mouse");
1453
- S && (Se(b.view).on("mousemove.drag", p, Xt).on("mouseup.drag", y, Xt), La(b.view), sr(b), u = !1, a = b.clientX, c = b.clientY, S("start", b));
1416
+ S && (Se(b.view).on("mousemove.drag", g, Xt).on("mouseup.drag", y, Xt), La(b.view), sr(b), d = !1, a = b.clientX, c = b.clientY, S("start", b));
1454
1417
  }
1455
1418
  }
1456
- function p(b) {
1457
- if (Mt(b), !u) {
1419
+ function g(b) {
1420
+ if (Mt(b), !d) {
1458
1421
  var C = b.clientX - a, S = b.clientY - c;
1459
- u = C * C + S * S > d;
1422
+ d = C * C + S * S > u;
1460
1423
  }
1461
1424
  o.mouse("drag", b);
1462
1425
  }
1463
1426
  function y(b) {
1464
- Se(b.view).on("mousemove.drag mouseup.drag", null), Ia(b.view, u), Mt(b), o.mouse("end", b);
1427
+ Se(b.view).on("mousemove.drag mouseup.drag", null), Ia(b.view, d), Mt(b), o.mouse("end", b);
1465
1428
  }
1466
- function g(b, C) {
1429
+ function p(b, C) {
1467
1430
  if (e.call(this, b, C)) {
1468
1431
  var S = b.changedTouches, D = t.call(this, b, C), E = S.length, _, N;
1469
1432
  for (_ = 0; _ < E; ++_)
@@ -1539,7 +1502,7 @@ function Bf() {
1539
1502
  var b = s.on.apply(s, arguments);
1540
1503
  return b === s ? f : b;
1541
1504
  }, f.clickDistance = function(b) {
1542
- return arguments.length ? (d = (b = +b) * b, f) : Math.sqrt(d);
1505
+ return arguments.length ? (u = (b = +b) * b, f) : Math.sqrt(u);
1543
1506
  }, f;
1544
1507
  }
1545
1508
  function Po(e, t, n) {
@@ -1866,9 +1829,9 @@ function Da(e, t) {
1866
1829
  const Ii = (function e(t) {
1867
1830
  var n = rh(t);
1868
1831
  function r(o, s) {
1869
- var i = n((o = po(o)).r, (s = po(s)).r), a = n(o.g, s.g), c = n(o.b, s.b), u = Da(o.opacity, s.opacity);
1832
+ var i = n((o = po(o)).r, (s = po(s)).r), a = n(o.g, s.g), c = n(o.b, s.b), d = Da(o.opacity, s.opacity);
1870
1833
  return function(l) {
1871
- return o.r = i(l), o.g = a(l), o.b = c(l), o.opacity = u(l), o + "";
1834
+ return o.r = i(l), o.g = a(l), o.b = c(l), o.opacity = d(l), o + "";
1872
1835
  };
1873
1836
  }
1874
1837
  return r.gamma = e, r;
@@ -1893,8 +1856,8 @@ function sh(e, t) {
1893
1856
  var n = go.lastIndex = lr.lastIndex = 0, r, o, s, i = -1, a = [], c = [];
1894
1857
  for (e = e + "", t = t + ""; (r = go.exec(e)) && (o = lr.exec(t)); )
1895
1858
  (s = o.index) > n && (s = t.slice(n, s), a[i] ? a[i] += s : a[++i] = s), (r = r[0]) === (o = o[0]) ? a[i] ? a[i] += o : a[++i] = o : (a[++i] = null, c.push({ i, x: Xe(r, o) })), n = lr.lastIndex;
1896
- return n < t.length && (s = t.slice(n), a[i] ? a[i] += s : a[++i] = s), a.length < 2 ? c[0] ? ih(c[0].x) : oh(t) : (t = c.length, function(u) {
1897
- for (var l = 0, d; l < t; ++l) a[(d = c[l]).i] = d.x(u);
1859
+ return n < t.length && (s = t.slice(n), a[i] ? a[i] += s : a[++i] = s), a.length < 2 ? c[0] ? ih(c[0].x) : oh(t) : (t = c.length, function(d) {
1860
+ for (var l = 0, u; l < t; ++l) a[(u = c[l]).i] = u.x(d);
1898
1861
  return a.join("");
1899
1862
  });
1900
1863
  }
@@ -1926,32 +1889,32 @@ function lh(e) {
1926
1889
  return e == null || (pn || (pn = document.createElementNS("http://www.w3.org/2000/svg", "g")), pn.setAttribute("transform", e), !(e = pn.transform.baseVal.consolidate())) ? mo : (e = e.matrix, Ra(e.a, e.b, e.c, e.d, e.e, e.f));
1927
1890
  }
1928
1891
  function Pa(e, t, n, r) {
1929
- function o(u) {
1930
- return u.length ? u.pop() + " " : "";
1892
+ function o(d) {
1893
+ return d.length ? d.pop() + " " : "";
1931
1894
  }
1932
- function s(u, l, d, f, h, p) {
1933
- if (u !== d || l !== f) {
1895
+ function s(d, l, u, f, h, g) {
1896
+ if (d !== u || l !== f) {
1934
1897
  var y = h.push("translate(", null, t, null, n);
1935
- p.push({ i: y - 4, x: Xe(u, d) }, { i: y - 2, x: Xe(l, f) });
1936
- } else (d || f) && h.push("translate(" + d + t + f + n);
1898
+ g.push({ i: y - 4, x: Xe(d, u) }, { i: y - 2, x: Xe(l, f) });
1899
+ } else (u || f) && h.push("translate(" + u + t + f + n);
1937
1900
  }
1938
- function i(u, l, d, f) {
1939
- u !== l ? (u - l > 180 ? l += 360 : l - u > 180 && (u += 360), f.push({ i: d.push(o(d) + "rotate(", null, r) - 2, x: Xe(u, l) })) : l && d.push(o(d) + "rotate(" + l + r);
1901
+ function i(d, l, u, f) {
1902
+ d !== l ? (d - l > 180 ? l += 360 : l - d > 180 && (d += 360), f.push({ i: u.push(o(u) + "rotate(", null, r) - 2, x: Xe(d, l) })) : l && u.push(o(u) + "rotate(" + l + r);
1940
1903
  }
1941
- function a(u, l, d, f) {
1942
- u !== l ? f.push({ i: d.push(o(d) + "skewX(", null, r) - 2, x: Xe(u, l) }) : l && d.push(o(d) + "skewX(" + l + r);
1904
+ function a(d, l, u, f) {
1905
+ d !== l ? f.push({ i: u.push(o(u) + "skewX(", null, r) - 2, x: Xe(d, l) }) : l && u.push(o(u) + "skewX(" + l + r);
1943
1906
  }
1944
- function c(u, l, d, f, h, p) {
1945
- if (u !== d || l !== f) {
1907
+ function c(d, l, u, f, h, g) {
1908
+ if (d !== u || l !== f) {
1946
1909
  var y = h.push(o(h) + "scale(", null, ",", null, ")");
1947
- p.push({ i: y - 4, x: Xe(u, d) }, { i: y - 2, x: Xe(l, f) });
1948
- } else (d !== 1 || f !== 1) && h.push(o(h) + "scale(" + d + "," + f + ")");
1949
- }
1950
- return function(u, l) {
1951
- var d = [], f = [];
1952
- return u = e(u), l = e(l), s(u.translateX, u.translateY, l.translateX, l.translateY, d, f), i(u.rotate, l.rotate, d, f), a(u.skewX, l.skewX, d, f), c(u.scaleX, u.scaleY, l.scaleX, l.scaleY, d, f), u = l = null, function(h) {
1953
- for (var p = -1, y = f.length, g; ++p < y; ) d[(g = f[p]).i] = g.x(h);
1954
- return d.join("");
1910
+ g.push({ i: y - 4, x: Xe(d, u) }, { i: y - 2, x: Xe(l, f) });
1911
+ } else (u !== 1 || f !== 1) && h.push(o(h) + "scale(" + u + "," + f + ")");
1912
+ }
1913
+ return function(d, l) {
1914
+ var u = [], f = [];
1915
+ return d = e(d), l = e(l), s(d.translateX, d.translateY, l.translateX, l.translateY, u, f), i(d.rotate, l.rotate, u, f), a(d.skewX, l.skewX, u, f), c(d.scaleX, d.scaleY, l.scaleX, l.scaleY, u, f), d = l = null, function(h) {
1916
+ for (var g = -1, y = f.length, p; ++g < y; ) u[(p = f[g]).i] = p.x(h);
1917
+ return u.join("");
1955
1918
  };
1956
1919
  };
1957
1920
  }
@@ -1967,27 +1930,27 @@ function hh(e) {
1967
1930
  }
1968
1931
  const ph = (function e(t, n, r) {
1969
1932
  function o(s, i) {
1970
- var a = s[0], c = s[1], u = s[2], l = i[0], d = i[1], f = i[2], h = l - a, p = d - c, y = h * h + p * p, g, m;
1933
+ var a = s[0], c = s[1], d = s[2], l = i[0], u = i[1], f = i[2], h = l - a, g = u - c, y = h * h + g * g, p, m;
1971
1934
  if (y < dh)
1972
- m = Math.log(f / u) / t, g = function(D) {
1935
+ m = Math.log(f / d) / t, p = function(D) {
1973
1936
  return [
1974
1937
  a + D * h,
1975
- c + D * p,
1976
- u * Math.exp(t * D * m)
1938
+ c + D * g,
1939
+ d * Math.exp(t * D * m)
1977
1940
  ];
1978
1941
  };
1979
1942
  else {
1980
- var w = Math.sqrt(y), x = (f * f - u * u + r * y) / (2 * u * n * w), b = (f * f - u * u - r * y) / (2 * f * n * w), C = Math.log(Math.sqrt(x * x + 1) - x), S = Math.log(Math.sqrt(b * b + 1) - b);
1981
- m = (S - C) / t, g = function(D) {
1982
- var E = D * m, _ = Ai(C), N = u / (n * w) * (_ * hh(t * E + C) - fh(C));
1943
+ var w = Math.sqrt(y), x = (f * f - d * d + r * y) / (2 * d * n * w), b = (f * f - d * d - r * y) / (2 * f * n * w), C = Math.log(Math.sqrt(x * x + 1) - x), S = Math.log(Math.sqrt(b * b + 1) - b);
1944
+ m = (S - C) / t, p = function(D) {
1945
+ var E = D * m, _ = Ai(C), N = d / (n * w) * (_ * hh(t * E + C) - fh(C));
1983
1946
  return [
1984
1947
  a + N * h,
1985
- c + N * p,
1986
- u * _ / Ai(t * E + C)
1948
+ c + N * g,
1949
+ d * _ / Ai(t * E + C)
1987
1950
  ];
1988
1951
  };
1989
1952
  }
1990
- return g.duration = m * 1e3 * t / Math.SQRT2, g;
1953
+ return p.duration = m * 1e3 * t / Math.SQRT2, p;
1991
1954
  }
1992
1955
  return o.rho = function(s) {
1993
1956
  var i = Math.max(1e-3, +s), a = i * i, c = a * a;
@@ -2095,11 +2058,11 @@ function Ae(e, t) {
2095
2058
  function xh(e, t, n) {
2096
2059
  var r = e.__transition, o;
2097
2060
  r[t] = n, n.timer = za(s, 0, n.time);
2098
- function s(u) {
2099
- n.state = Ri, n.timer.restart(i, n.delay, n.time), n.delay <= u && i(u - n.delay);
2061
+ function s(d) {
2062
+ n.state = Ri, n.timer.restart(i, n.delay, n.time), n.delay <= d && i(d - n.delay);
2100
2063
  }
2101
- function i(u) {
2102
- var l, d, f, h;
2064
+ function i(d) {
2065
+ var l, u, f, h;
2103
2066
  if (n.state !== Ri) return c();
2104
2067
  for (l in r)
2105
2068
  if (h = r[l], h.name === n.name) {
@@ -2107,21 +2070,21 @@ function xh(e, t, n) {
2107
2070
  h.state === Pi ? (h.state = _n, h.timer.stop(), h.on.call("interrupt", e, e.__data__, h.index, h.group), delete r[l]) : +l < t && (h.state = _n, h.timer.stop(), h.on.call("cancel", e, e.__data__, h.index, h.group), delete r[l]);
2108
2071
  }
2109
2072
  if (Di(function() {
2110
- n.state === En && (n.state = Pi, n.timer.restart(a, n.delay, n.time), a(u));
2073
+ n.state === En && (n.state = Pi, n.timer.restart(a, n.delay, n.time), a(d));
2111
2074
  }), n.state = wo, n.on.call("start", e, e.__data__, n.index, n.group), n.state === wo) {
2112
- for (n.state = En, o = new Array(f = n.tween.length), l = 0, d = -1; l < f; ++l)
2113
- (h = n.tween[l].value.call(e, e.__data__, n.index, n.group)) && (o[++d] = h);
2114
- o.length = d + 1;
2075
+ for (n.state = En, o = new Array(f = n.tween.length), l = 0, u = -1; l < f; ++l)
2076
+ (h = n.tween[l].value.call(e, e.__data__, n.index, n.group)) && (o[++u] = h);
2077
+ o.length = u + 1;
2115
2078
  }
2116
2079
  }
2117
- function a(u) {
2118
- for (var l = u < n.duration ? n.ease.call(null, u / n.duration) : (n.timer.restart(c), n.state = vo, 1), d = -1, f = o.length; ++d < f; )
2119
- o[d].call(e, l);
2080
+ function a(d) {
2081
+ for (var l = d < n.duration ? n.ease.call(null, d / n.duration) : (n.timer.restart(c), n.state = vo, 1), u = -1, f = o.length; ++u < f; )
2082
+ o[u].call(e, l);
2120
2083
  n.state === vo && (n.on.call("end", e, e.__data__, n.index, n.group), c());
2121
2084
  }
2122
2085
  function c() {
2123
2086
  n.state = _n, n.timer.stop(), delete r[t];
2124
- for (var u in r) return;
2087
+ for (var d in r) return;
2125
2088
  delete e.__transition;
2126
2089
  }
2127
2090
  }
@@ -2166,12 +2129,12 @@ function Sh(e, t, n) {
2166
2129
  var s = $e(this, e), i = s.tween;
2167
2130
  if (i !== r) {
2168
2131
  o = (r = i).slice();
2169
- for (var a = { name: t, value: n }, c = 0, u = o.length; c < u; ++c)
2132
+ for (var a = { name: t, value: n }, c = 0, d = o.length; c < d; ++c)
2170
2133
  if (o[c].name === t) {
2171
2134
  o[c] = a;
2172
2135
  break;
2173
2136
  }
2174
- c === u && o.push(a);
2137
+ c === d && o.push(a);
2175
2138
  }
2176
2139
  s.tween = o;
2177
2140
  };
@@ -2327,15 +2290,15 @@ function Wh(e) {
2327
2290
  function Xh(e) {
2328
2291
  typeof e != "function" && (e = va(e));
2329
2292
  for (var t = this._groups, n = t.length, r = new Array(n), o = 0; o < n; ++o)
2330
- for (var s = t[o], i = s.length, a = r[o] = [], c, u = 0; u < i; ++u)
2331
- (c = s[u]) && e.call(c, c.__data__, u, s) && a.push(c);
2293
+ for (var s = t[o], i = s.length, a = r[o] = [], c, d = 0; d < i; ++d)
2294
+ (c = s[d]) && e.call(c, c.__data__, d, s) && a.push(c);
2332
2295
  return new Ge(r, this._parents, this._name, this._id);
2333
2296
  }
2334
2297
  function Zh(e) {
2335
2298
  if (e._id !== this._id) throw new Error();
2336
2299
  for (var t = this._groups, n = e._groups, r = t.length, o = n.length, s = Math.min(r, o), i = new Array(r), a = 0; a < s; ++a)
2337
- for (var c = t[a], u = n[a], l = c.length, d = i[a] = new Array(l), f, h = 0; h < l; ++h)
2338
- (f = c[h] || u[h]) && (d[h] = f);
2300
+ for (var c = t[a], d = n[a], l = c.length, u = i[a] = new Array(l), f, h = 0; h < l; ++h)
2301
+ (f = c[h] || d[h]) && (u[h] = f);
2339
2302
  for (; a < r; ++a)
2340
2303
  i[a] = t[a];
2341
2304
  return new Ge(i, this._parents, this._name, this._id);
@@ -2371,18 +2334,18 @@ function tp(e) {
2371
2334
  var t = this._name, n = this._id;
2372
2335
  typeof e != "function" && (e = Do(e));
2373
2336
  for (var r = this._groups, o = r.length, s = new Array(o), i = 0; i < o; ++i)
2374
- for (var a = r[i], c = a.length, u = s[i] = new Array(c), l, d, f = 0; f < c; ++f)
2375
- (l = a[f]) && (d = e.call(l, l.__data__, f, a)) && ("__data__" in l && (d.__data__ = l.__data__), u[f] = d, jn(u[f], t, n, f, u, Ae(l, n)));
2337
+ for (var a = r[i], c = a.length, d = s[i] = new Array(c), l, u, f = 0; f < c; ++f)
2338
+ (l = a[f]) && (u = e.call(l, l.__data__, f, a)) && ("__data__" in l && (u.__data__ = l.__data__), d[f] = u, jn(d[f], t, n, f, d, Ae(l, n)));
2376
2339
  return new Ge(s, this._parents, t, n);
2377
2340
  }
2378
2341
  function np(e) {
2379
2342
  var t = this._name, n = this._id;
2380
2343
  typeof e != "function" && (e = wa(e));
2381
2344
  for (var r = this._groups, o = r.length, s = [], i = [], a = 0; a < o; ++a)
2382
- for (var c = r[a], u = c.length, l, d = 0; d < u; ++d)
2383
- if (l = c[d]) {
2384
- for (var f = e.call(l, l.__data__, d, c), h, p = Ae(l, n), y = 0, g = f.length; y < g; ++y)
2385
- (h = f[y]) && jn(h, t, n, y, f, p);
2345
+ for (var c = r[a], d = c.length, l, u = 0; u < d; ++u)
2346
+ if (l = c[u]) {
2347
+ for (var f = e.call(l, l.__data__, u, c), h, g = Ae(l, n), y = 0, p = f.length; y < p; ++y)
2348
+ (h = f[y]) && jn(h, t, n, y, f, g);
2386
2349
  s.push(f), i.push(l);
2387
2350
  }
2388
2351
  return new Ge(s, i, t, n);
@@ -2420,8 +2383,8 @@ function ap(e, t, n) {
2420
2383
  function lp(e, t) {
2421
2384
  var n, r, o, s = "style." + t, i = "end." + s, a;
2422
2385
  return function() {
2423
- var c = $e(this, e), u = c.on, l = c.value[s] == null ? a || (a = Ba(t)) : void 0;
2424
- (u !== n || o !== l) && (r = (n = u).copy()).on(i, o = l), c.on = r;
2386
+ var c = $e(this, e), d = c.on, l = c.value[s] == null ? a || (a = Ba(t)) : void 0;
2387
+ (d !== n || o !== l) && (r = (n = d).copy()).on(i, o = l), c.on = r;
2425
2388
  };
2426
2389
  }
2427
2390
  function cp(e, t, n) {
@@ -2484,10 +2447,10 @@ function wp(e) {
2484
2447
  }
2485
2448
  function vp() {
2486
2449
  for (var e = this._name, t = this._id, n = qa(), r = this._groups, o = r.length, s = 0; s < o; ++s)
2487
- for (var i = r[s], a = i.length, c, u = 0; u < a; ++u)
2488
- if (c = i[u]) {
2450
+ for (var i = r[s], a = i.length, c, d = 0; d < a; ++d)
2451
+ if (c = i[d]) {
2489
2452
  var l = Ae(c, t);
2490
- jn(c, e, n, u, i, {
2453
+ jn(c, e, n, d, i, {
2491
2454
  time: l.time + l.delay + l.duration,
2492
2455
  delay: 0,
2493
2456
  duration: l.duration,
@@ -2503,8 +2466,8 @@ function bp() {
2503
2466
  --o === 0 && s();
2504
2467
  } };
2505
2468
  n.each(function() {
2506
- var u = $e(this, r), l = u.on;
2507
- l !== e && (t = (e = l).copy(), t._.cancel.push(a), t._.interrupt.push(a), t._.end.push(c)), u.on = t;
2469
+ var d = $e(this, r), l = d.on;
2470
+ l !== e && (t = (e = l).copy(), t._.cancel.push(a), t._.interrupt.push(a), t._.end.push(c)), d.on = t;
2508
2471
  }), o === 0 && s();
2509
2472
  });
2510
2473
  }
@@ -2568,8 +2531,8 @@ function Cp(e) {
2568
2531
  var t, n;
2569
2532
  e instanceof Ge ? (t = e._id, e = e._name) : (t = qa(), (n = _p).time = $o(), e = e == null ? null : e + "");
2570
2533
  for (var r = this._groups, o = r.length, s = 0; s < o; ++s)
2571
- for (var i = r[s], a = i.length, c, u = 0; u < a; ++u)
2572
- (c = i[u]) && jn(c, e, t, u, i, n || Sp(c, t));
2534
+ for (var i = r[s], a = i.length, c, d = 0; d < a; ++d)
2535
+ (c = i[d]) && jn(c, e, t, d, i, n || Sp(c, t));
2573
2536
  return new Ge(r, this._parents, e, t);
2574
2537
  }
2575
2538
  sn.prototype.interrupt = Eh;
@@ -2660,7 +2623,7 @@ function Op(e, t, n) {
2660
2623
  );
2661
2624
  }
2662
2625
  function Ga() {
2663
- var e = kp, t = Mp, n = Op, r = Lp, o = Ip, s = [0, 1 / 0], i = [[-1 / 0, -1 / 0], [1 / 0, 1 / 0]], a = 250, c = ph, u = qn("start", "zoom", "end"), l, d, f, h = 500, p = 150, y = 0, g = 10;
2626
+ var e = kp, t = Mp, n = Op, r = Lp, o = Ip, s = [0, 1 / 0], i = [[-1 / 0, -1 / 0], [1 / 0, 1 / 0]], a = 250, c = ph, d = qn("start", "zoom", "end"), l, u, f, h = 500, g = 150, y = 0, p = 10;
2664
2627
  function m(v) {
2665
2628
  v.property("__zoom", $i).on("wheel.zoom", E, { passive: !1 }).on("mousedown.zoom", _).on("dblclick.zoom", N).filter(o).on("touchstart.zoom", M).on("touchmove.zoom", O).on("touchend.zoom touchcancel.zoom", F).style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
2666
2629
  }
@@ -2743,14 +2706,14 @@ function Ga() {
2743
2706
  },
2744
2707
  emit: function(v) {
2745
2708
  var A = Se(this.that).datum();
2746
- u.call(
2709
+ d.call(
2747
2710
  v,
2748
2711
  this.that,
2749
2712
  new Np(v, {
2750
2713
  sourceEvent: this.sourceEvent,
2751
2714
  target: m,
2752
2715
  transform: this.that.__zoom,
2753
- dispatch: u
2716
+ dispatch: d
2754
2717
  }),
2755
2718
  A
2756
2719
  );
@@ -2765,7 +2728,7 @@ function Ga() {
2765
2728
  if (z.k === G) return;
2766
2729
  L.mouse = [R, z.invert(R)], Sn(this), L.start();
2767
2730
  }
2768
- Vt(v), L.wheel = setTimeout(H, p), L.zoom("mouse", n(x(w(z, G), L.mouse[0], L.mouse[1]), L.extent, i));
2731
+ Vt(v), L.wheel = setTimeout(H, g), L.zoom("mouse", n(x(w(z, G), L.mouse[0], L.mouse[1]), L.extent, i));
2769
2732
  function H() {
2770
2733
  L.wheel = null, L.end();
2771
2734
  }
@@ -2796,7 +2759,7 @@ function Ga() {
2796
2759
  var L = v.touches, z = L.length, G = S(this, A, v.changedTouches.length === z).event(v), R, H, q, j;
2797
2760
  for (cr(v), H = 0; H < z; ++H)
2798
2761
  q = L[H], j = ke(q, this), j = [j, this.__zoom.invert(j), q.identifier], G.touch0 ? !G.touch1 && G.touch0[2] !== j[2] && (G.touch1 = j, G.taps = 0) : (G.touch0 = j, R = !0, G.taps = 1 + !!l);
2799
- l && (l = clearTimeout(l)), R && (G.taps < 2 && (d = j[0], l = setTimeout(function() {
2762
+ l && (l = clearTimeout(l)), R && (G.taps < 2 && (u = j[0], l = setTimeout(function() {
2800
2763
  l = null;
2801
2764
  }, h)), Sn(this), G.start());
2802
2765
  }
@@ -2822,7 +2785,7 @@ function Ga() {
2822
2785
  }, h), R = 0; R < G; ++R)
2823
2786
  H = z[R], L.touch0 && L.touch0[2] === H.identifier ? delete L.touch0 : L.touch1 && L.touch1[2] === H.identifier && delete L.touch1;
2824
2787
  if (L.touch1 && !L.touch0 && (L.touch0 = L.touch1, delete L.touch1), L.touch0) L.touch0[1] = this.__zoom.invert(L.touch0[0]);
2825
- else if (L.end(), L.taps === 2 && (H = ke(H, this), Math.hypot(d[0] - H[0], d[1] - H[1]) < g)) {
2788
+ else if (L.end(), L.taps === 2 && (H = ke(H, this), Math.hypot(u[0] - H[0], u[1] - H[1]) < p)) {
2826
2789
  var q = Se(this).on("dblclick.zoom");
2827
2790
  q && q.apply(this, arguments);
2828
2791
  }
@@ -2847,12 +2810,12 @@ function Ga() {
2847
2810
  }, m.interpolate = function(v) {
2848
2811
  return arguments.length ? (c = v, m) : c;
2849
2812
  }, m.on = function() {
2850
- var v = u.on.apply(u, arguments);
2851
- return v === u ? m : v;
2813
+ var v = d.on.apply(d, arguments);
2814
+ return v === d ? m : v;
2852
2815
  }, m.clickDistance = function(v) {
2853
2816
  return arguments.length ? (y = (v = +v) * v, m) : Math.sqrt(y);
2854
2817
  }, m.tapDistance = function(v) {
2855
- return arguments.length ? (g = +v, m) : g;
2818
+ return arguments.length ? (p = +v, m) : p;
2856
2819
  }, m;
2857
2820
  }
2858
2821
  const Wn = da(null), Ap = Wn.Provider, Ie = {
@@ -2897,11 +2860,11 @@ function Dp({ proOptions: e, position: t = "bottom-right" }) {
2897
2860
  $.createElement("a", { href: "https://reactflow.dev", target: "_blank", rel: "noopener noreferrer", "aria-label": "React Flow attribution" }, "React Flow")
2898
2861
  );
2899
2862
  }
2900
- const Rp = ({ x: e, y: t, label: n, labelStyle: r = {}, labelShowBg: o = !0, labelBgStyle: s = {}, labelBgPadding: i = [2, 4], labelBgBorderRadius: a = 2, children: c, className: u, ...l }) => {
2901
- const d = Q(null), [f, h] = re({ x: 0, y: 0, width: 0, height: 0 }), p = me(["react-flow__edge-textwrapper", u]);
2863
+ const Rp = ({ x: e, y: t, label: n, labelStyle: r = {}, labelShowBg: o = !0, labelBgStyle: s = {}, labelBgPadding: i = [2, 4], labelBgBorderRadius: a = 2, children: c, className: d, ...l }) => {
2864
+ const u = Q(null), [f, h] = re({ x: 0, y: 0, width: 0, height: 0 }), g = me(["react-flow__edge-textwrapper", d]);
2902
2865
  return oe(() => {
2903
- if (d.current) {
2904
- const y = d.current.getBBox();
2866
+ if (u.current) {
2867
+ const y = u.current.getBBox();
2905
2868
  h({
2906
2869
  x: y.x,
2907
2870
  y: y.y,
@@ -2911,9 +2874,9 @@ const Rp = ({ x: e, y: t, label: n, labelStyle: r = {}, labelShowBg: o = !0, lab
2911
2874
  }
2912
2875
  }, [n]), typeof n > "u" || !n ? null : $.createElement(
2913
2876
  "g",
2914
- { transform: `translate(${e - f.width / 2} ${t - f.height / 2})`, className: p, visibility: f.width ? "visible" : "hidden", ...l },
2877
+ { transform: `translate(${e - f.width / 2} ${t - f.height / 2})`, className: g, visibility: f.width ? "visible" : "hidden", ...l },
2915
2878
  o && $.createElement("rect", { width: f.width + 2 * i[0], x: -i[0], y: -i[1], height: f.height + 2 * i[1], className: "react-flow__edge-textbg", style: s, rx: a, ry: a }),
2916
- $.createElement("text", { className: "react-flow__edge-text", y: f.height / 2, dy: "0.3em", ref: d, style: r }, n),
2879
+ $.createElement("text", { className: "react-flow__edge-text", y: f.height / 2, dy: "0.3em", ref: u, style: r }, n),
2917
2880
  c
2918
2881
  );
2919
2882
  };
@@ -2949,7 +2912,7 @@ const Ho = (e) => ({
2949
2912
  }), $p = (e, t) => Za(Xa(Jt(e), Jt(t))), bo = (e, t) => {
2950
2913
  const n = Math.max(0, Math.min(e.x + e.width, t.x + t.width) - Math.max(e.x, t.x)), r = Math.max(0, Math.min(e.y + e.height, t.y + t.height) - Math.max(e.y, t.y));
2951
2914
  return Math.ceil(n * r);
2952
- }, Fp = (e) => Ce(e.width) && Ce(e.height) && Ce(e.x) && Ce(e.y), Ce = (e) => !isNaN(e) && isFinite(e), ue = Symbol.for("internals"), Ua = ["Enter", " ", "Escape"], Ka = (e, t) => {
2915
+ }, Fp = (e) => Ce(e.width) && Ce(e.height) && Ce(e.x) && Ce(e.y), Ce = (e) => !isNaN(e) && isFinite(e), ue = /* @__PURE__ */ Symbol.for("internals"), Ua = ["Enter", " ", "Escape"], Ka = (e, t) => {
2953
2916
  process.env.NODE_ENV === "development" && console.warn(`[React Flow]: ${t} Help: https://reactflow.dev/error#${e}`);
2954
2917
  }, zp = (e) => "nativeEvent" in e;
2955
2918
  function xo(e) {
@@ -2962,12 +2925,12 @@ const Qa = (e) => "clientX" in e, Qe = (e, t) => {
2962
2925
  x: r - (t?.left ?? 0),
2963
2926
  y: o - (t?.top ?? 0)
2964
2927
  };
2965
- }, Dn = () => typeof navigator < "u" && navigator?.userAgent?.indexOf("Mac") >= 0, ln = ({ id: e, path: t, labelX: n, labelY: r, label: o, labelStyle: s, labelShowBg: i, labelBgStyle: a, labelBgPadding: c, labelBgBorderRadius: u, style: l, markerEnd: d, markerStart: f, interactionWidth: h = 20 }) => $.createElement(
2928
+ }, Dn = () => typeof navigator < "u" && navigator?.userAgent?.indexOf("Mac") >= 0, ln = ({ id: e, path: t, labelX: n, labelY: r, label: o, labelStyle: s, labelShowBg: i, labelBgStyle: a, labelBgPadding: c, labelBgBorderRadius: d, style: l, markerEnd: u, markerStart: f, interactionWidth: h = 20 }) => $.createElement(
2966
2929
  $.Fragment,
2967
2930
  null,
2968
- $.createElement("path", { id: e, style: l, d: t, fill: "none", className: "react-flow__edge-path", markerEnd: d, markerStart: f }),
2931
+ $.createElement("path", { id: e, style: l, d: t, fill: "none", className: "react-flow__edge-path", markerEnd: u, markerStart: f }),
2969
2932
  h && $.createElement("path", { d: t, fill: "none", strokeOpacity: 0, strokeWidth: h, className: "react-flow__edge-interaction" }),
2970
- o && Ce(n) && Ce(r) ? $.createElement(Pp, { x: n, y: r, label: o, labelStyle: s, labelShowBg: i, labelBgStyle: a, labelBgPadding: c, labelBgBorderRadius: u }) : null
2933
+ o && Ce(n) && Ce(r) ? $.createElement(Pp, { x: n, y: r, label: o, labelStyle: s, labelShowBg: i, labelBgStyle: a, labelBgPadding: c, labelBgBorderRadius: d }) : null
2971
2934
  );
2972
2935
  ln.displayName = "BaseEdge";
2973
2936
  const Vp = (e, t) => typeof t < "u" && t ? `url(#${t})` : typeof e < "u" ? `url(#react-flow__${e})` : "none";
@@ -2982,8 +2945,8 @@ function Ja({ sourceX: e, sourceY: t, targetX: n, targetY: r }) {
2982
2945
  return [s, a, o, i];
2983
2946
  }
2984
2947
  function el({ sourceX: e, sourceY: t, targetX: n, targetY: r, sourceControlX: o, sourceControlY: s, targetControlX: i, targetControlY: a }) {
2985
- const c = e * 0.125 + o * 0.375 + i * 0.375 + n * 0.125, u = t * 0.125 + s * 0.375 + a * 0.375 + r * 0.125, l = Math.abs(c - e), d = Math.abs(u - t);
2986
- return [c, u, l, d];
2948
+ const c = e * 0.125 + o * 0.375 + i * 0.375 + n * 0.125, d = t * 0.125 + s * 0.375 + a * 0.375 + r * 0.125, l = Math.abs(c - e), u = Math.abs(d - t);
2949
+ return [c, d, l, u];
2987
2950
  }
2988
2951
  var gt;
2989
2952
  (function(e) {
@@ -3019,13 +2982,13 @@ function tl({ sourceX: e, sourceY: t, sourcePosition: n = X.Bottom, targetX: r,
3019
2982
  y1: t,
3020
2983
  x2: r,
3021
2984
  y2: o
3022
- }), [c, u] = Vi({
2985
+ }), [c, d] = Vi({
3023
2986
  pos: s,
3024
2987
  x1: r,
3025
2988
  y1: o,
3026
2989
  x2: e,
3027
2990
  y2: t
3028
- }), [l, d, f, h] = el({
2991
+ }), [l, u, f, h] = el({
3029
2992
  sourceX: e,
3030
2993
  sourceY: t,
3031
2994
  targetX: r,
@@ -3033,18 +2996,18 @@ function tl({ sourceX: e, sourceY: t, sourcePosition: n = X.Bottom, targetX: r,
3033
2996
  sourceControlX: i,
3034
2997
  sourceControlY: a,
3035
2998
  targetControlX: c,
3036
- targetControlY: u
2999
+ targetControlY: d
3037
3000
  });
3038
3001
  return [
3039
- `M${e},${t} C${i},${a} ${c},${u} ${r},${o}`,
3002
+ `M${e},${t} C${i},${a} ${c},${d} ${r},${o}`,
3040
3003
  l,
3041
- d,
3004
+ u,
3042
3005
  f,
3043
3006
  h
3044
3007
  ];
3045
3008
  }
3046
- const qo = ae(({ sourceX: e, sourceY: t, targetX: n, targetY: r, sourcePosition: o = X.Bottom, targetPosition: s = X.Top, label: i, labelStyle: a, labelShowBg: c, labelBgStyle: u, labelBgPadding: l, labelBgBorderRadius: d, style: f, markerEnd: h, markerStart: p, interactionWidth: y }) => {
3047
- const [g, m, w] = tl({
3009
+ const qo = ae(({ sourceX: e, sourceY: t, targetX: n, targetY: r, sourcePosition: o = X.Bottom, targetPosition: s = X.Top, label: i, labelStyle: a, labelShowBg: c, labelBgStyle: d, labelBgPadding: l, labelBgBorderRadius: u, style: f, markerEnd: h, markerStart: g, interactionWidth: y }) => {
3010
+ const [p, m, w] = tl({
3048
3011
  sourceX: e,
3049
3012
  sourceY: t,
3050
3013
  sourcePosition: o,
@@ -3052,7 +3015,7 @@ const qo = ae(({ sourceX: e, sourceY: t, targetX: n, targetY: r, sourcePosition:
3052
3015
  targetY: r,
3053
3016
  targetPosition: s
3054
3017
  });
3055
- return $.createElement(ln, { path: g, labelX: m, labelY: w, label: i, labelStyle: a, labelShowBg: c, labelBgStyle: u, labelBgPadding: l, labelBgBorderRadius: d, style: f, markerEnd: h, markerStart: p, interactionWidth: y });
3018
+ return $.createElement(ln, { path: p, labelX: m, labelY: w, label: i, labelStyle: a, labelShowBg: c, labelBgStyle: d, labelBgPadding: l, labelBgBorderRadius: u, style: f, markerEnd: h, markerStart: g, interactionWidth: y });
3056
3019
  });
3057
3020
  qo.displayName = "SimpleBezierEdge";
3058
3021
  const Hi = {
@@ -3062,89 +3025,89 @@ const Hi = {
3062
3025
  [X.Bottom]: { x: 0, y: 1 }
3063
3026
  }, Hp = ({ source: e, sourcePosition: t = X.Bottom, target: n }) => t === X.Left || t === X.Right ? e.x < n.x ? { x: 1, y: 0 } : { x: -1, y: 0 } : e.y < n.y ? { x: 0, y: 1 } : { x: 0, y: -1 }, Bi = (e, t) => Math.sqrt(Math.pow(t.x - e.x, 2) + Math.pow(t.y - e.y, 2));
3064
3027
  function Bp({ source: e, sourcePosition: t = X.Bottom, target: n, targetPosition: r = X.Top, center: o, offset: s }) {
3065
- const i = Hi[t], a = Hi[r], c = { x: e.x + i.x * s, y: e.y + i.y * s }, u = { x: n.x + a.x * s, y: n.y + a.y * s }, l = Hp({
3028
+ const i = Hi[t], a = Hi[r], c = { x: e.x + i.x * s, y: e.y + i.y * s }, d = { x: n.x + a.x * s, y: n.y + a.y * s }, l = Hp({
3066
3029
  source: c,
3067
3030
  sourcePosition: t,
3068
- target: u
3069
- }), d = l.x !== 0 ? "x" : "y", f = l[d];
3070
- let h = [], p, y;
3071
- const g = { x: 0, y: 0 }, m = { x: 0, y: 0 }, [w, x, b, C] = Ja({
3031
+ target: d
3032
+ }), u = l.x !== 0 ? "x" : "y", f = l[u];
3033
+ let h = [], g, y;
3034
+ const p = { x: 0, y: 0 }, m = { x: 0, y: 0 }, [w, x, b, C] = Ja({
3072
3035
  sourceX: e.x,
3073
3036
  sourceY: e.y,
3074
3037
  targetX: n.x,
3075
3038
  targetY: n.y
3076
3039
  });
3077
- if (i[d] * a[d] === -1) {
3078
- p = o.x ?? w, y = o.y ?? x;
3040
+ if (i[u] * a[u] === -1) {
3041
+ g = o.x ?? w, y = o.y ?? x;
3079
3042
  const D = [
3080
- { x: p, y: c.y },
3081
- { x: p, y: u.y }
3043
+ { x: g, y: c.y },
3044
+ { x: g, y: d.y }
3082
3045
  ], E = [
3083
3046
  { x: c.x, y },
3084
- { x: u.x, y }
3047
+ { x: d.x, y }
3085
3048
  ];
3086
- i[d] === f ? h = d === "x" ? D : E : h = d === "x" ? E : D;
3049
+ i[u] === f ? h = u === "x" ? D : E : h = u === "x" ? E : D;
3087
3050
  } else {
3088
- const D = [{ x: c.x, y: u.y }], E = [{ x: u.x, y: c.y }];
3089
- if (d === "x" ? h = i.x === f ? E : D : h = i.y === f ? D : E, t === r) {
3090
- const F = Math.abs(e[d] - n[d]);
3051
+ const D = [{ x: c.x, y: d.y }], E = [{ x: d.x, y: c.y }];
3052
+ if (u === "x" ? h = i.x === f ? E : D : h = i.y === f ? D : E, t === r) {
3053
+ const F = Math.abs(e[u] - n[u]);
3091
3054
  if (F <= s) {
3092
3055
  const v = Math.min(s - 1, s - F);
3093
- i[d] === f ? g[d] = (c[d] > e[d] ? -1 : 1) * v : m[d] = (u[d] > n[d] ? -1 : 1) * v;
3056
+ i[u] === f ? p[u] = (c[u] > e[u] ? -1 : 1) * v : m[u] = (d[u] > n[u] ? -1 : 1) * v;
3094
3057
  }
3095
3058
  }
3096
3059
  if (t !== r) {
3097
- const F = d === "x" ? "y" : "x", v = i[d] === a[F], A = c[F] > u[F], L = c[F] < u[F];
3098
- (i[d] === 1 && (!v && A || v && L) || i[d] !== 1 && (!v && L || v && A)) && (h = d === "x" ? D : E);
3060
+ const F = u === "x" ? "y" : "x", v = i[u] === a[F], A = c[F] > d[F], L = c[F] < d[F];
3061
+ (i[u] === 1 && (!v && A || v && L) || i[u] !== 1 && (!v && L || v && A)) && (h = u === "x" ? D : E);
3099
3062
  }
3100
- const _ = { x: c.x + g.x, y: c.y + g.y }, N = { x: u.x + m.x, y: u.y + m.y }, M = Math.max(Math.abs(_.x - h[0].x), Math.abs(N.x - h[0].x)), O = Math.max(Math.abs(_.y - h[0].y), Math.abs(N.y - h[0].y));
3101
- M >= O ? (p = (_.x + N.x) / 2, y = h[0].y) : (p = h[0].x, y = (_.y + N.y) / 2);
3063
+ const _ = { x: c.x + p.x, y: c.y + p.y }, N = { x: d.x + m.x, y: d.y + m.y }, M = Math.max(Math.abs(_.x - h[0].x), Math.abs(N.x - h[0].x)), O = Math.max(Math.abs(_.y - h[0].y), Math.abs(N.y - h[0].y));
3064
+ M >= O ? (g = (_.x + N.x) / 2, y = h[0].y) : (g = h[0].x, y = (_.y + N.y) / 2);
3102
3065
  }
3103
3066
  return [[
3104
3067
  e,
3105
- { x: c.x + g.x, y: c.y + g.y },
3068
+ { x: c.x + p.x, y: c.y + p.y },
3106
3069
  ...h,
3107
- { x: u.x + m.x, y: u.y + m.y },
3070
+ { x: d.x + m.x, y: d.y + m.y },
3108
3071
  n
3109
- ], p, y, b, C];
3072
+ ], g, y, b, C];
3110
3073
  }
3111
3074
  function qp(e, t, n, r) {
3112
3075
  const o = Math.min(Bi(e, t) / 2, Bi(t, n) / 2, r), { x: s, y: i } = t;
3113
3076
  if (e.x === s && s === n.x || e.y === i && i === n.y)
3114
3077
  return `L${s} ${i}`;
3115
3078
  if (e.y === i) {
3116
- const u = e.x < n.x ? -1 : 1, l = e.y < n.y ? 1 : -1;
3117
- return `L ${s + o * u},${i}Q ${s},${i} ${s},${i + o * l}`;
3079
+ const d = e.x < n.x ? -1 : 1, l = e.y < n.y ? 1 : -1;
3080
+ return `L ${s + o * d},${i}Q ${s},${i} ${s},${i + o * l}`;
3118
3081
  }
3119
3082
  const a = e.x < n.x ? 1 : -1, c = e.y < n.y ? -1 : 1;
3120
3083
  return `L ${s},${i + o * c}Q ${s},${i} ${s + o * a},${i}`;
3121
3084
  }
3122
- function Eo({ sourceX: e, sourceY: t, sourcePosition: n = X.Bottom, targetX: r, targetY: o, targetPosition: s = X.Top, borderRadius: i = 5, centerX: a, centerY: c, offset: u = 20 }) {
3123
- const [l, d, f, h, p] = Bp({
3085
+ function Eo({ sourceX: e, sourceY: t, sourcePosition: n = X.Bottom, targetX: r, targetY: o, targetPosition: s = X.Top, borderRadius: i = 5, centerX: a, centerY: c, offset: d = 20 }) {
3086
+ const [l, u, f, h, g] = Bp({
3124
3087
  source: { x: e, y: t },
3125
3088
  sourcePosition: n,
3126
3089
  target: { x: r, y: o },
3127
3090
  targetPosition: s,
3128
3091
  center: { x: a, y: c },
3129
- offset: u
3092
+ offset: d
3130
3093
  });
3131
- return [l.reduce((g, m, w) => {
3094
+ return [l.reduce((p, m, w) => {
3132
3095
  let x = "";
3133
- return w > 0 && w < l.length - 1 ? x = qp(l[w - 1], m, l[w + 1], i) : x = `${w === 0 ? "M" : "L"}${m.x} ${m.y}`, g += x, g;
3134
- }, ""), d, f, h, p];
3096
+ return w > 0 && w < l.length - 1 ? x = qp(l[w - 1], m, l[w + 1], i) : x = `${w === 0 ? "M" : "L"}${m.x} ${m.y}`, p += x, p;
3097
+ }, ""), u, f, h, g];
3135
3098
  }
3136
- const Xn = ae(({ sourceX: e, sourceY: t, targetX: n, targetY: r, label: o, labelStyle: s, labelShowBg: i, labelBgStyle: a, labelBgPadding: c, labelBgBorderRadius: u, style: l, sourcePosition: d = X.Bottom, targetPosition: f = X.Top, markerEnd: h, markerStart: p, pathOptions: y, interactionWidth: g }) => {
3099
+ const Xn = ae(({ sourceX: e, sourceY: t, targetX: n, targetY: r, label: o, labelStyle: s, labelShowBg: i, labelBgStyle: a, labelBgPadding: c, labelBgBorderRadius: d, style: l, sourcePosition: u = X.Bottom, targetPosition: f = X.Top, markerEnd: h, markerStart: g, pathOptions: y, interactionWidth: p }) => {
3137
3100
  const [m, w, x] = Eo({
3138
3101
  sourceX: e,
3139
3102
  sourceY: t,
3140
- sourcePosition: d,
3103
+ sourcePosition: u,
3141
3104
  targetX: n,
3142
3105
  targetY: r,
3143
3106
  targetPosition: f,
3144
3107
  borderRadius: y?.borderRadius,
3145
3108
  offset: y?.offset
3146
3109
  });
3147
- return $.createElement(ln, { path: m, labelX: w, labelY: x, label: o, labelStyle: s, labelShowBg: i, labelBgStyle: a, labelBgPadding: c, labelBgBorderRadius: u, style: l, markerEnd: h, markerStart: p, interactionWidth: g });
3110
+ return $.createElement(ln, { path: m, labelX: w, labelY: x, label: o, labelStyle: s, labelShowBg: i, labelBgStyle: a, labelBgPadding: c, labelBgBorderRadius: d, style: l, markerEnd: h, markerStart: g, interactionWidth: p });
3148
3111
  });
3149
3112
  Xn.displayName = "SmoothStepEdge";
3150
3113
  const Go = ae((e) => $.createElement(Xn, { ...e, pathOptions: Ne(() => ({ borderRadius: 0, offset: e.pathOptions?.offset }), [e.pathOptions?.offset]) }));
@@ -3158,9 +3121,9 @@ function Gp({ sourceX: e, sourceY: t, targetX: n, targetY: r }) {
3158
3121
  });
3159
3122
  return [`M ${e},${t}L ${n},${r}`, o, s, i, a];
3160
3123
  }
3161
- const Yo = ae(({ sourceX: e, sourceY: t, targetX: n, targetY: r, label: o, labelStyle: s, labelShowBg: i, labelBgStyle: a, labelBgPadding: c, labelBgBorderRadius: u, style: l, markerEnd: d, markerStart: f, interactionWidth: h }) => {
3162
- const [p, y, g] = Gp({ sourceX: e, sourceY: t, targetX: n, targetY: r });
3163
- return $.createElement(ln, { path: p, labelX: y, labelY: g, label: o, labelStyle: s, labelShowBg: i, labelBgStyle: a, labelBgPadding: c, labelBgBorderRadius: u, style: l, markerEnd: d, markerStart: f, interactionWidth: h });
3124
+ const Yo = ae(({ sourceX: e, sourceY: t, targetX: n, targetY: r, label: o, labelStyle: s, labelShowBg: i, labelBgStyle: a, labelBgPadding: c, labelBgBorderRadius: d, style: l, markerEnd: u, markerStart: f, interactionWidth: h }) => {
3125
+ const [g, y, p] = Gp({ sourceX: e, sourceY: t, targetX: n, targetY: r });
3126
+ return $.createElement(ln, { path: g, labelX: y, labelY: p, label: o, labelStyle: s, labelShowBg: i, labelBgStyle: a, labelBgPadding: c, labelBgBorderRadius: d, style: l, markerEnd: u, markerStart: f, interactionWidth: h });
3164
3127
  });
3165
3128
  Yo.displayName = "StraightEdge";
3166
3129
  function mn(e, t) {
@@ -3186,32 +3149,32 @@ function jo({ sourceX: e, sourceY: t, sourcePosition: n = X.Bottom, targetX: r,
3186
3149
  x2: r,
3187
3150
  y2: o,
3188
3151
  c: i
3189
- }), [u, l] = qi({
3152
+ }), [d, l] = qi({
3190
3153
  pos: s,
3191
3154
  x1: r,
3192
3155
  y1: o,
3193
3156
  x2: e,
3194
3157
  y2: t,
3195
3158
  c: i
3196
- }), [d, f, h, p] = el({
3159
+ }), [u, f, h, g] = el({
3197
3160
  sourceX: e,
3198
3161
  sourceY: t,
3199
3162
  targetX: r,
3200
3163
  targetY: o,
3201
3164
  sourceControlX: a,
3202
3165
  sourceControlY: c,
3203
- targetControlX: u,
3166
+ targetControlX: d,
3204
3167
  targetControlY: l
3205
3168
  });
3206
3169
  return [
3207
- `M${e},${t} C${a},${c} ${u},${l} ${r},${o}`,
3208
- d,
3170
+ `M${e},${t} C${a},${c} ${d},${l} ${r},${o}`,
3171
+ u,
3209
3172
  f,
3210
3173
  h,
3211
- p
3174
+ g
3212
3175
  ];
3213
3176
  }
3214
- const Pn = ae(({ sourceX: e, sourceY: t, targetX: n, targetY: r, sourcePosition: o = X.Bottom, targetPosition: s = X.Top, label: i, labelStyle: a, labelShowBg: c, labelBgStyle: u, labelBgPadding: l, labelBgBorderRadius: d, style: f, markerEnd: h, markerStart: p, pathOptions: y, interactionWidth: g }) => {
3177
+ const Pn = ae(({ sourceX: e, sourceY: t, targetX: n, targetY: r, sourcePosition: o = X.Bottom, targetPosition: s = X.Top, label: i, labelStyle: a, labelShowBg: c, labelBgStyle: d, labelBgPadding: l, labelBgBorderRadius: u, style: f, markerEnd: h, markerStart: g, pathOptions: y, interactionWidth: p }) => {
3215
3178
  const [m, w, x] = jo({
3216
3179
  sourceX: e,
3217
3180
  sourceY: t,
@@ -3221,7 +3184,7 @@ const Pn = ae(({ sourceX: e, sourceY: t, targetX: n, targetY: r, sourcePosition:
3221
3184
  targetPosition: s,
3222
3185
  curvature: y?.curvature
3223
3186
  });
3224
- return $.createElement(ln, { path: m, labelX: w, labelY: x, label: i, labelStyle: a, labelShowBg: c, labelBgStyle: u, labelBgPadding: l, labelBgBorderRadius: d, style: f, markerEnd: h, markerStart: p, interactionWidth: g });
3187
+ return $.createElement(ln, { path: m, labelX: w, labelY: x, label: i, labelStyle: a, labelShowBg: c, labelBgStyle: d, labelBgPadding: l, labelBgBorderRadius: u, style: f, markerEnd: h, markerStart: g, interactionWidth: p });
3225
3188
  });
3226
3189
  Pn.displayName = "BezierEdge";
3227
3190
  const Wo = da(null), Yp = Wo.Provider;
@@ -3286,25 +3249,25 @@ const jp = () => Bn(Wo), Wp = (e) => "id" in e && "source" in e && "target" in e
3286
3249
  y: (t.y - r) / o,
3287
3250
  width: t.width / o,
3288
3251
  height: t.height / o
3289
- }, u = [];
3252
+ }, d = [];
3290
3253
  return e.forEach((l) => {
3291
- const { width: d, height: f, selectable: h = !0, hidden: p = !1 } = l;
3292
- if (i && !h || p)
3254
+ const { width: u, height: f, selectable: h = !0, hidden: g = !1 } = l;
3255
+ if (i && !h || g)
3293
3256
  return !1;
3294
- const { positionAbsolute: y } = ht(l, a), g = {
3257
+ const { positionAbsolute: y } = ht(l, a), p = {
3295
3258
  x: y.x,
3296
3259
  y: y.y,
3297
- width: d || 0,
3260
+ width: u || 0,
3298
3261
  height: f || 0
3299
- }, m = bo(c, g), w = typeof d > "u" || typeof f > "u" || d === null || f === null, x = s && m > 0, b = (d || 0) * (f || 0);
3300
- (w || x || m >= b || l.dragging) && u.push(l);
3301
- }), u;
3262
+ }, m = bo(c, p), w = typeof u > "u" || typeof f > "u" || u === null || f === null, x = s && m > 0, b = (u || 0) * (f || 0);
3263
+ (w || x || m >= b || l.dragging) && d.push(l);
3264
+ }), d;
3302
3265
  }, ol = (e, t) => {
3303
3266
  const n = e.map((r) => r.id);
3304
3267
  return t.filter((r) => n.includes(r.source) || n.includes(r.target));
3305
3268
  }, il = (e, t, n, r, o, s = 0.1) => {
3306
- const i = t / (e.width * (1 + s)), a = n / (e.height * (1 + s)), c = Math.min(i, a), u = Tt(c, r, o), l = e.x + e.width / 2, d = e.y + e.height / 2, f = t / 2 - l * u, h = n / 2 - d * u;
3307
- return { x: f, y: h, zoom: u };
3269
+ const i = t / (e.width * (1 + s)), a = n / (e.height * (1 + s)), c = Math.min(i, a), d = Tt(c, r, o), l = e.x + e.width / 2, u = e.y + e.height / 2, f = t / 2 - l * d, h = n / 2 - u * d;
3270
+ return { x: f, y: h, zoom: d };
3308
3271
  }, at = (e, t = 0) => e.transition().duration(t);
3309
3272
  function Gi(e, t, n, r) {
3310
3273
  return (t[n] || []).reduce((o, s) => (`${e.id}-${s.id}-${n}` !== r && o.push({
@@ -3316,18 +3279,18 @@ function Gi(e, t, n, r) {
3316
3279
  }), o), []);
3317
3280
  }
3318
3281
  function Kp(e, t, n, r, o, s) {
3319
- const { x: i, y: a } = Qe(e), u = t.elementsFromPoint(i, a).find((p) => p.classList.contains("react-flow__handle"));
3320
- if (u) {
3321
- const p = u.getAttribute("data-nodeid");
3322
- if (p) {
3323
- const y = Xo(void 0, u), g = u.getAttribute("data-handleid"), m = s({ nodeId: p, id: g, type: y });
3282
+ const { x: i, y: a } = Qe(e), d = t.elementsFromPoint(i, a).find((g) => g.classList.contains("react-flow__handle"));
3283
+ if (d) {
3284
+ const g = d.getAttribute("data-nodeid");
3285
+ if (g) {
3286
+ const y = Xo(void 0, d), p = d.getAttribute("data-handleid"), m = s({ nodeId: g, id: p, type: y });
3324
3287
  if (m) {
3325
- const w = o.find((x) => x.nodeId === p && x.type === y && x.id === g);
3288
+ const w = o.find((x) => x.nodeId === g && x.type === y && x.id === p);
3326
3289
  return {
3327
3290
  handle: {
3328
- id: g,
3291
+ id: p,
3329
3292
  type: y,
3330
- nodeId: p,
3293
+ nodeId: g,
3331
3294
  x: w?.x || n.x,
3332
3295
  y: w?.y || n.y
3333
3296
  },
@@ -3336,22 +3299,22 @@ function Kp(e, t, n, r, o, s) {
3336
3299
  }
3337
3300
  }
3338
3301
  }
3339
- let l = [], d = 1 / 0;
3340
- if (o.forEach((p) => {
3341
- const y = Math.sqrt((p.x - n.x) ** 2 + (p.y - n.y) ** 2);
3302
+ let l = [], u = 1 / 0;
3303
+ if (o.forEach((g) => {
3304
+ const y = Math.sqrt((g.x - n.x) ** 2 + (g.y - n.y) ** 2);
3342
3305
  if (y <= r) {
3343
- const g = s(p);
3344
- y <= d && (y < d ? l = [{ handle: p, validHandleResult: g }] : y === d && l.push({
3345
- handle: p,
3346
- validHandleResult: g
3347
- }), d = y);
3306
+ const p = s(g);
3307
+ y <= u && (y < u ? l = [{ handle: g, validHandleResult: p }] : y === u && l.push({
3308
+ handle: g,
3309
+ validHandleResult: p
3310
+ }), u = y);
3348
3311
  }
3349
3312
  }), !l.length)
3350
3313
  return { handle: null, validHandleResult: sl() };
3351
3314
  if (l.length === 1)
3352
3315
  return l[0];
3353
- const f = l.some(({ validHandleResult: p }) => p.isValid), h = l.some(({ handle: p }) => p.type === "target");
3354
- return l.find(({ handle: p, validHandleResult: y }) => h ? p.type === "target" : f ? y.isValid : !0) || l[0];
3316
+ const f = l.some(({ validHandleResult: g }) => g.isValid), h = l.some(({ handle: g }) => g.type === "target");
3317
+ return l.find(({ handle: g, validHandleResult: y }) => h ? g.type === "target" : f ? y.isValid : !0) || l[0];
3355
3318
  }
3356
3319
  const Qp = { source: null, target: null, sourceHandle: null, targetHandle: null }, sl = () => ({
3357
3320
  handleDomNode: null,
@@ -3360,24 +3323,24 @@ const Qp = { source: null, target: null, sourceHandle: null, targetHandle: null
3360
3323
  endHandle: null
3361
3324
  });
3362
3325
  function al(e, t, n, r, o, s, i) {
3363
- const a = o === "target", c = i.querySelector(`.react-flow__handle[data-id="${e?.nodeId}-${e?.id}-${e?.type}"]`), u = {
3326
+ const a = o === "target", c = i.querySelector(`.react-flow__handle[data-id="${e?.nodeId}-${e?.id}-${e?.type}"]`), d = {
3364
3327
  ...sl(),
3365
3328
  handleDomNode: c
3366
3329
  };
3367
3330
  if (c) {
3368
- const l = Xo(void 0, c), d = c.getAttribute("data-nodeid"), f = c.getAttribute("data-handleid"), h = c.classList.contains("connectable"), p = c.classList.contains("connectableend"), y = {
3369
- source: a ? d : n,
3331
+ const l = Xo(void 0, c), u = c.getAttribute("data-nodeid"), f = c.getAttribute("data-handleid"), h = c.classList.contains("connectable"), g = c.classList.contains("connectableend"), y = {
3332
+ source: a ? u : n,
3370
3333
  sourceHandle: a ? f : r,
3371
- target: a ? n : d,
3334
+ target: a ? n : u,
3372
3335
  targetHandle: a ? r : f
3373
3336
  };
3374
- u.connection = y, h && p && (t === gt.Strict ? a && l === "source" || !a && l === "target" : d !== n || f !== r) && (u.endHandle = {
3375
- nodeId: d,
3337
+ d.connection = y, h && g && (t === gt.Strict ? a && l === "source" || !a && l === "target" : u !== n || f !== r) && (d.endHandle = {
3338
+ nodeId: u,
3376
3339
  handleId: f,
3377
3340
  type: l
3378
- }, u.isValid = s(y));
3341
+ }, d.isValid = s(y));
3379
3342
  }
3380
- return u;
3343
+ return d;
3381
3344
  }
3382
3345
  function Jp({ nodes: e, nodeId: t, handleId: n, handleType: r }) {
3383
3346
  return e.reduce((o, s) => {
@@ -3399,8 +3362,8 @@ function eg(e, t) {
3399
3362
  let n = null;
3400
3363
  return t ? n = "valid" : e && !t && (n = "invalid"), n;
3401
3364
  }
3402
- function ll({ event: e, handleId: t, nodeId: n, onConnect: r, isTarget: o, getState: s, setState: i, isValidConnection: a, edgeUpdaterType: c, onReconnectEnd: u }) {
3403
- const l = Wa(e.target), { connectionMode: d, domNode: f, autoPanOnConnect: h, connectionRadius: p, onConnectStart: y, panBy: g, getNodes: m, cancelConnection: w } = s();
3365
+ function ll({ event: e, handleId: t, nodeId: n, onConnect: r, isTarget: o, getState: s, setState: i, isValidConnection: a, edgeUpdaterType: c, onReconnectEnd: d }) {
3366
+ const l = Wa(e.target), { connectionMode: u, domNode: f, autoPanOnConnect: h, connectionRadius: g, onConnectStart: y, panBy: p, getNodes: m, cancelConnection: w } = s();
3404
3367
  let x = 0, b;
3405
3368
  const { x: C, y: S } = Qe(e), D = l?.elementFromPoint(C, S), E = Xo(c, D), _ = f?.getBoundingClientRect();
3406
3369
  if (!_ || !E)
@@ -3415,7 +3378,7 @@ function ll({ event: e, handleId: t, nodeId: n, onConnect: r, isTarget: o, getSt
3415
3378
  if (!h)
3416
3379
  return;
3417
3380
  const [H, q] = ja(M, _);
3418
- g({ x: H, y: q }), x = requestAnimationFrame(z);
3381
+ p({ x: H, y: q }), x = requestAnimationFrame(z);
3419
3382
  };
3420
3383
  i({
3421
3384
  connectionPosition: M,
@@ -3434,7 +3397,7 @@ function ll({ event: e, handleId: t, nodeId: n, onConnect: r, isTarget: o, getSt
3434
3397
  function G(H) {
3435
3398
  const { transform: q } = s();
3436
3399
  M = Qe(H, _);
3437
- const { handle: j, validHandleResult: k } = Kp(H, l, So(M, q, !1, [1, 1]), p, L, (I) => al(I, d, n, t, o ? "target" : "source", a, l));
3400
+ const { handle: j, validHandleResult: k } = Kp(H, l, So(M, q, !1, [1, 1]), g, L, (I) => al(I, u, n, t, o ? "target" : "source", a, l));
3438
3401
  if (b = j, O || (z(), O = !0), A = k.handleDomNode, F = k.connection, v = k.isValid, i({
3439
3402
  connectionPosition: b && v ? nl({
3440
3403
  x: b.x,
@@ -3447,7 +3410,7 @@ function ll({ event: e, handleId: t, nodeId: n, onConnect: r, isTarget: o, getSt
3447
3410
  F.source !== F.target && A && (ur(N), N = A, A.classList.add("connecting", "react-flow__handle-connecting"), A.classList.toggle("valid", v), A.classList.toggle("react-flow__handle-valid", v));
3448
3411
  }
3449
3412
  function R(H) {
3450
- (b || A) && F && v && r?.(F), s().onConnectEnd?.(H), c && u?.(H), ur(N), w(), cancelAnimationFrame(x), O = !1, v = !1, F = null, A = null, l.removeEventListener("mousemove", G), l.removeEventListener("mouseup", R), l.removeEventListener("touchmove", G), l.removeEventListener("touchend", R);
3413
+ (b || A) && F && v && r?.(F), s().onConnectEnd?.(H), c && d?.(H), ur(N), w(), cancelAnimationFrame(x), O = !1, v = !1, F = null, A = null, l.removeEventListener("mousemove", G), l.removeEventListener("mouseup", R), l.removeEventListener("touchmove", G), l.removeEventListener("touchend", R);
3451
3414
  }
3452
3415
  l.addEventListener("mousemove", G), l.addEventListener("mouseup", R), l.addEventListener("touchmove", G), l.addEventListener("touchend", R);
3453
3416
  }
@@ -3461,16 +3424,16 @@ const Yi = () => !0, tg = (e) => ({
3461
3424
  connecting: o?.nodeId === e && o?.handleId === t && o?.type === n || s?.nodeId === e && s?.handleId === t && s?.type === n,
3462
3425
  clickConnecting: i?.nodeId === e && i?.handleId === t && i?.type === n
3463
3426
  };
3464
- }, cl = ua(({ type: e = "source", position: t = X.Top, isValidConnection: n, isConnectable: r = !0, isConnectableStart: o = !0, isConnectableEnd: s = !0, id: i, onConnect: a, children: c, className: u, onMouseDown: l, onTouchStart: d, ...f }, h) => {
3465
- const p = i || null, y = e === "target", g = pe(), m = jp(), { connectOnClick: w, noPanClassName: x } = le(tg, he), { connecting: b, clickConnecting: C } = le(ng(m, p, e), he);
3466
- m || g.getState().onError?.("010", Ie.error010());
3427
+ }, cl = ua(({ type: e = "source", position: t = X.Top, isValidConnection: n, isConnectable: r = !0, isConnectableStart: o = !0, isConnectableEnd: s = !0, id: i, onConnect: a, children: c, className: d, onMouseDown: l, onTouchStart: u, ...f }, h) => {
3428
+ const g = i || null, y = e === "target", p = pe(), m = jp(), { connectOnClick: w, noPanClassName: x } = le(tg, he), { connecting: b, clickConnecting: C } = le(ng(m, g, e), he);
3429
+ m || p.getState().onError?.("010", Ie.error010());
3467
3430
  const S = (_) => {
3468
- const { defaultEdgeOptions: N, onConnect: M, hasDefaultEdges: O } = g.getState(), F = {
3431
+ const { defaultEdgeOptions: N, onConnect: M, hasDefaultEdges: O } = p.getState(), F = {
3469
3432
  ...N,
3470
3433
  ..._
3471
3434
  };
3472
3435
  if (O) {
3473
- const { edges: v, setEdges: A } = g.getState();
3436
+ const { edges: v, setEdges: A } = p.getState();
3474
3437
  A(Up(F, v));
3475
3438
  }
3476
3439
  M?.(F), a?.(F);
@@ -3480,35 +3443,35 @@ const Yi = () => !0, tg = (e) => ({
3480
3443
  const N = Qa(_);
3481
3444
  o && (N && _.button === 0 || !N) && ll({
3482
3445
  event: _,
3483
- handleId: p,
3446
+ handleId: g,
3484
3447
  nodeId: m,
3485
3448
  onConnect: S,
3486
3449
  isTarget: y,
3487
- getState: g.getState,
3488
- setState: g.setState,
3489
- isValidConnection: n || g.getState().isValidConnection || Yi
3490
- }), N ? l?.(_) : d?.(_);
3450
+ getState: p.getState,
3451
+ setState: p.setState,
3452
+ isValidConnection: n || p.getState().isValidConnection || Yi
3453
+ }), N ? l?.(_) : u?.(_);
3491
3454
  }, E = (_) => {
3492
- const { onClickConnectStart: N, onClickConnectEnd: M, connectionClickStartHandle: O, connectionMode: F, isValidConnection: v } = g.getState();
3455
+ const { onClickConnectStart: N, onClickConnectEnd: M, connectionClickStartHandle: O, connectionMode: F, isValidConnection: v } = p.getState();
3493
3456
  if (!m || !O && !o)
3494
3457
  return;
3495
3458
  if (!O) {
3496
- N?.(_, { nodeId: m, handleId: p, handleType: e }), g.setState({ connectionClickStartHandle: { nodeId: m, type: e, handleId: p } });
3459
+ N?.(_, { nodeId: m, handleId: g, handleType: e }), p.setState({ connectionClickStartHandle: { nodeId: m, type: e, handleId: g } });
3497
3460
  return;
3498
3461
  }
3499
3462
  const A = Wa(_.target), L = n || v || Yi, { connection: z, isValid: G } = al({
3500
3463
  nodeId: m,
3501
- id: p,
3464
+ id: g,
3502
3465
  type: e
3503
3466
  }, F, O.nodeId, O.handleId || null, O.type, L, A);
3504
- G && S(z), M?.(_), g.setState({ connectionClickStartHandle: null });
3467
+ G && S(z), M?.(_), p.setState({ connectionClickStartHandle: null });
3505
3468
  };
3506
- return $.createElement("div", { "data-handleid": p, "data-nodeid": m, "data-handlepos": t, "data-id": `${m}-${p}-${e}`, className: me([
3469
+ return $.createElement("div", { "data-handleid": g, "data-nodeid": m, "data-handlepos": t, "data-id": `${m}-${g}-${e}`, className: me([
3507
3470
  "react-flow__handle",
3508
3471
  `react-flow__handle-${t}`,
3509
3472
  "nodrag",
3510
3473
  x,
3511
- u,
3474
+ d,
3512
3475
  {
3513
3476
  source: !y,
3514
3477
  target: y,
@@ -3590,14 +3553,14 @@ function J(e, t, n) {
3590
3553
  typeof t < "u" && n({ [e]: t });
3591
3554
  }, [t]);
3592
3555
  }
3593
- const lg = ({ nodes: e, edges: t, defaultNodes: n, defaultEdges: r, onConnect: o, onConnectStart: s, onConnectEnd: i, onClickConnectStart: a, onClickConnectEnd: c, nodesDraggable: u, nodesConnectable: l, nodesFocusable: d, edgesFocusable: f, edgesUpdatable: h, elevateNodesOnSelect: p, minZoom: y, maxZoom: g, nodeExtent: m, onNodesChange: w, onEdgesChange: x, elementsSelectable: b, connectionMode: C, snapGrid: S, snapToGrid: D, translateExtent: E, connectOnClick: _, defaultEdgeOptions: N, fitView: M, fitViewOptions: O, onNodesDelete: F, onEdgesDelete: v, onNodeDrag: A, onNodeDragStart: L, onNodeDragStop: z, onSelectionDrag: G, onSelectionDragStart: R, onSelectionDragStop: H, noPanClassName: q, nodeOrigin: j, rfId: k, autoPanOnConnect: I, autoPanOnNodeDrag: P, onError: B, connectionRadius: V, isValidConnection: Y, nodeDragThreshold: W }) => {
3556
+ const lg = ({ nodes: e, edges: t, defaultNodes: n, defaultEdges: r, onConnect: o, onConnectStart: s, onConnectEnd: i, onClickConnectStart: a, onClickConnectEnd: c, nodesDraggable: d, nodesConnectable: l, nodesFocusable: u, edgesFocusable: f, edgesUpdatable: h, elevateNodesOnSelect: g, minZoom: y, maxZoom: p, nodeExtent: m, onNodesChange: w, onEdgesChange: x, elementsSelectable: b, connectionMode: C, snapGrid: S, snapToGrid: D, translateExtent: E, connectOnClick: _, defaultEdgeOptions: N, fitView: M, fitViewOptions: O, onNodesDelete: F, onEdgesDelete: v, onNodeDrag: A, onNodeDragStart: L, onNodeDragStop: z, onSelectionDrag: G, onSelectionDragStart: R, onSelectionDragStop: H, noPanClassName: q, nodeOrigin: j, rfId: k, autoPanOnConnect: I, autoPanOnNodeDrag: P, onError: B, connectionRadius: V, isValidConnection: Y, nodeDragThreshold: W }) => {
3594
3557
  const { setNodes: Z, setEdges: ne, setDefaultNodesAndEdges: K, setMinZoom: ee, setMaxZoom: ce, setTranslateExtent: se, setNodeExtent: ye, reset: ie } = le(ag, he), U = pe();
3595
3558
  return oe(() => {
3596
3559
  const ve = r?.map((Fe) => ({ ...Fe, ...N }));
3597
3560
  return K(n, ve), () => {
3598
3561
  ie();
3599
3562
  };
3600
- }, []), J("defaultEdgeOptions", N, U.setState), J("connectionMode", C, U.setState), J("onConnect", o, U.setState), J("onConnectStart", s, U.setState), J("onConnectEnd", i, U.setState), J("onClickConnectStart", a, U.setState), J("onClickConnectEnd", c, U.setState), J("nodesDraggable", u, U.setState), J("nodesConnectable", l, U.setState), J("nodesFocusable", d, U.setState), J("edgesFocusable", f, U.setState), J("edgesUpdatable", h, U.setState), J("elementsSelectable", b, U.setState), J("elevateNodesOnSelect", p, U.setState), J("snapToGrid", D, U.setState), J("snapGrid", S, U.setState), J("onNodesChange", w, U.setState), J("onEdgesChange", x, U.setState), J("connectOnClick", _, U.setState), J("fitViewOnInit", M, U.setState), J("fitViewOnInitOptions", O, U.setState), J("onNodesDelete", F, U.setState), J("onEdgesDelete", v, U.setState), J("onNodeDrag", A, U.setState), J("onNodeDragStart", L, U.setState), J("onNodeDragStop", z, U.setState), J("onSelectionDrag", G, U.setState), J("onSelectionDragStart", R, U.setState), J("onSelectionDragStop", H, U.setState), J("noPanClassName", q, U.setState), J("nodeOrigin", j, U.setState), J("rfId", k, U.setState), J("autoPanOnConnect", I, U.setState), J("autoPanOnNodeDrag", P, U.setState), J("onError", B, U.setState), J("connectionRadius", V, U.setState), J("isValidConnection", Y, U.setState), J("nodeDragThreshold", W, U.setState), _t(e, Z), _t(t, ne), _t(y, ee), _t(g, ce), _t(E, se), _t(m, ye), null;
3563
+ }, []), J("defaultEdgeOptions", N, U.setState), J("connectionMode", C, U.setState), J("onConnect", o, U.setState), J("onConnectStart", s, U.setState), J("onConnectEnd", i, U.setState), J("onClickConnectStart", a, U.setState), J("onClickConnectEnd", c, U.setState), J("nodesDraggable", d, U.setState), J("nodesConnectable", l, U.setState), J("nodesFocusable", u, U.setState), J("edgesFocusable", f, U.setState), J("edgesUpdatable", h, U.setState), J("elementsSelectable", b, U.setState), J("elevateNodesOnSelect", g, U.setState), J("snapToGrid", D, U.setState), J("snapGrid", S, U.setState), J("onNodesChange", w, U.setState), J("onEdgesChange", x, U.setState), J("connectOnClick", _, U.setState), J("fitViewOnInit", M, U.setState), J("fitViewOnInitOptions", O, U.setState), J("onNodesDelete", F, U.setState), J("onEdgesDelete", v, U.setState), J("onNodeDrag", A, U.setState), J("onNodeDragStart", L, U.setState), J("onNodeDragStop", z, U.setState), J("onSelectionDrag", G, U.setState), J("onSelectionDragStart", R, U.setState), J("onSelectionDragStop", H, U.setState), J("noPanClassName", q, U.setState), J("nodeOrigin", j, U.setState), J("rfId", k, U.setState), J("autoPanOnConnect", I, U.setState), J("autoPanOnNodeDrag", P, U.setState), J("onError", B, U.setState), J("connectionRadius", V, U.setState), J("isValidConnection", Y, U.setState), J("nodeDragThreshold", W, U.setState), _t(e, Z), _t(t, ne), _t(y, ee), _t(p, ce), _t(E, se), _t(m, ye), null;
3601
3564
  }, ji = { display: "none" }, cg = {
3602
3565
  position: "absolute",
3603
3566
  width: 1,
@@ -3632,20 +3595,20 @@ function hg({ rfId: e, disableKeyboardA11y: t }) {
3632
3595
  var tn = (e = null, t = { actInsideInputWithModifier: !0 }) => {
3633
3596
  const [n, r] = re(!1), o = Q(!1), s = Q(/* @__PURE__ */ new Set([])), [i, a] = Ne(() => {
3634
3597
  if (e !== null) {
3635
- const u = (Array.isArray(e) ? e : [e]).filter((d) => typeof d == "string").map((d) => d.split("+")), l = u.reduce((d, f) => d.concat(...f), []);
3636
- return [u, l];
3598
+ const d = (Array.isArray(e) ? e : [e]).filter((u) => typeof u == "string").map((u) => u.split("+")), l = d.reduce((u, f) => u.concat(...f), []);
3599
+ return [d, l];
3637
3600
  }
3638
3601
  return [[], []];
3639
3602
  }, [e]);
3640
3603
  return oe(() => {
3641
- const c = typeof document < "u" ? document : null, u = t?.target || c;
3604
+ const c = typeof document < "u" ? document : null, d = t?.target || c;
3642
3605
  if (e !== null) {
3643
3606
  const l = (h) => {
3644
3607
  if (o.current = h.ctrlKey || h.metaKey || h.shiftKey, (!o.current || o.current && !t.actInsideInputWithModifier) && xo(h))
3645
3608
  return !1;
3646
3609
  const y = Xi(h.code, a);
3647
3610
  s.current.add(h[y]), Wi(i, s.current, !1) && (h.preventDefault(), r(!0));
3648
- }, d = (h) => {
3611
+ }, u = (h) => {
3649
3612
  if ((!o.current || o.current && !t.actInsideInputWithModifier) && xo(h))
3650
3613
  return !1;
3651
3614
  const y = Xi(h.code, a);
@@ -3653,8 +3616,8 @@ var tn = (e = null, t = { actInsideInputWithModifier: !0 }) => {
3653
3616
  }, f = () => {
3654
3617
  s.current.clear(), r(!1);
3655
3618
  };
3656
- return u?.addEventListener("keydown", l), u?.addEventListener("keyup", d), window.addEventListener("blur", f), () => {
3657
- u?.removeEventListener("keydown", l), u?.removeEventListener("keyup", d), window.removeEventListener("blur", f);
3619
+ return d?.addEventListener("keydown", l), d?.addEventListener("keyup", u), window.addEventListener("blur", f), () => {
3620
+ d?.removeEventListener("keydown", l), d?.removeEventListener("keyup", u), window.removeEventListener("blur", f);
3658
3621
  };
3659
3622
  }
3660
3623
  }, [e, r]), n;
@@ -3696,33 +3659,33 @@ function vl(e, t, n) {
3696
3659
  function dr(e, t, n, r) {
3697
3660
  const o = /* @__PURE__ */ new Map(), s = {}, i = r ? 1e3 : 0;
3698
3661
  return e.forEach((a) => {
3699
- const c = (Ce(a.zIndex) ? a.zIndex : 0) + (a.selected ? i : 0), u = t.get(a.id), l = {
3662
+ const c = (Ce(a.zIndex) ? a.zIndex : 0) + (a.selected ? i : 0), d = t.get(a.id), l = {
3700
3663
  ...a,
3701
3664
  positionAbsolute: {
3702
3665
  x: a.position.x,
3703
3666
  y: a.position.y
3704
3667
  }
3705
- }, d = a.parentNode || a.parentId;
3706
- d && (s[d] = !0);
3707
- const f = u?.type && u?.type !== a.type;
3668
+ }, u = a.parentNode || a.parentId;
3669
+ u && (s[u] = !0);
3670
+ const f = d?.type && d?.type !== a.type;
3708
3671
  Object.defineProperty(l, ue, {
3709
3672
  enumerable: !1,
3710
3673
  value: {
3711
- handleBounds: f ? void 0 : u?.[ue]?.handleBounds,
3674
+ handleBounds: f ? void 0 : d?.[ue]?.handleBounds,
3712
3675
  z: c
3713
3676
  }
3714
3677
  }), o.set(a.id, l);
3715
3678
  }), vl(o, n, s), o;
3716
3679
  }
3717
3680
  function bl(e, t = {}) {
3718
- const { getNodes: n, width: r, height: o, minZoom: s, maxZoom: i, d3Zoom: a, d3Selection: c, fitViewOnInitDone: u, fitViewOnInit: l, nodeOrigin: d } = e(), f = t.initial && !u && l;
3681
+ const { getNodes: n, width: r, height: o, minZoom: s, maxZoom: i, d3Zoom: a, d3Selection: c, fitViewOnInitDone: d, fitViewOnInit: l, nodeOrigin: u } = e(), f = t.initial && !d && l;
3719
3682
  if (a && c && (f || !t.initial)) {
3720
- const p = n().filter((g) => {
3721
- const m = t.includeHiddenNodes ? g.width && g.height : !g.hidden;
3722
- return t.nodes?.length ? m && t.nodes.some((w) => w.id === g.id) : m;
3723
- }), y = p.every((g) => g.width && g.height);
3724
- if (p.length > 0 && y) {
3725
- const g = Zn(p, d), { x: m, y: w, zoom: x } = il(g, r, o, t.minZoom ?? s, t.maxZoom ?? i, t.padding ?? 0.1), b = qe.translate(m, w).scale(x);
3683
+ const g = n().filter((p) => {
3684
+ const m = t.includeHiddenNodes ? p.width && p.height : !p.hidden;
3685
+ return t.nodes?.length ? m && t.nodes.some((w) => w.id === p.id) : m;
3686
+ }), y = g.every((p) => p.width && p.height);
3687
+ if (g.length > 0 && y) {
3688
+ const p = Zn(g, u), { x: m, y: w, zoom: x } = il(p, r, o, t.minZoom ?? s, t.maxZoom ?? i, t.padding ?? 0.1), b = qe.translate(m, w).scale(x);
3726
3689
  return typeof t.duration == "number" && t.duration > 0 ? a.transform(at(c, t.duration), b) : a.transform(c, b), !0;
3727
3690
  }
3728
3691
  }
@@ -3745,8 +3708,8 @@ function gg(e, t) {
3745
3708
  });
3746
3709
  }
3747
3710
  function wn({ changedNodes: e, changedEdges: t, get: n, set: r }) {
3748
- const { nodeInternals: o, edges: s, onNodesChange: i, onEdgesChange: a, hasDefaultNodes: c, hasDefaultEdges: u } = n();
3749
- e?.length && (c && r({ nodeInternals: pg(e, o) }), i?.(e)), t?.length && (u && r({ edges: gg(t, s) }), a?.(t));
3711
+ const { nodeInternals: o, edges: s, onNodesChange: i, onEdgesChange: a, hasDefaultNodes: c, hasDefaultEdges: d } = n();
3712
+ e?.length && (c && r({ nodeInternals: pg(e, o) }), i?.(e)), t?.length && (d && r({ edges: gg(t, s) }), a?.(t));
3750
3713
  }
3751
3714
  const St = () => {
3752
3715
  }, mg = {
@@ -3774,8 +3737,8 @@ const St = () => {
3774
3737
  zoomTo: (o, s) => t.scaleTo(at(n, s?.duration), o),
3775
3738
  getZoom: () => e.getState().transform[2],
3776
3739
  setViewport: (o, s) => {
3777
- const [i, a, c] = e.getState().transform, u = qe.translate(o.x ?? i, o.y ?? a).scale(o.zoom ?? c);
3778
- t.transform(at(n, s?.duration), u);
3740
+ const [i, a, c] = e.getState().transform, d = qe.translate(o.x ?? i, o.y ?? a).scale(o.zoom ?? c);
3741
+ t.transform(at(n, s?.duration), d);
3779
3742
  },
3780
3743
  getViewport: () => {
3781
3744
  const [o, s, i] = e.getState().transform;
@@ -3783,11 +3746,11 @@ const St = () => {
3783
3746
  },
3784
3747
  fitView: (o) => bl(e.getState, o),
3785
3748
  setCenter: (o, s, i) => {
3786
- const { width: a, height: c, maxZoom: u } = e.getState(), l = typeof i?.zoom < "u" ? i.zoom : u, d = a / 2 - o * l, f = c / 2 - s * l, h = qe.translate(d, f).scale(l);
3749
+ const { width: a, height: c, maxZoom: d } = e.getState(), l = typeof i?.zoom < "u" ? i.zoom : d, u = a / 2 - o * l, f = c / 2 - s * l, h = qe.translate(u, f).scale(l);
3787
3750
  t.transform(at(n, i?.duration), h);
3788
3751
  },
3789
3752
  fitBounds: (o, s) => {
3790
- const { width: i, height: a, minZoom: c, maxZoom: u } = e.getState(), { x: l, y: d, zoom: f } = il(o, i, a, c, u, s?.padding ?? 0.1), h = qe.translate(l, d).scale(f);
3753
+ const { width: i, height: a, minZoom: c, maxZoom: d } = e.getState(), { x: l, y: u, zoom: f } = il(o, i, a, c, d, s?.padding ?? 0.1), h = qe.translate(l, u).scale(f);
3791
3754
  t.transform(at(n, s?.duration), h);
3792
3755
  },
3793
3756
  // @deprecated Use `screenToFlowPosition`.
@@ -3799,20 +3762,20 @@ const St = () => {
3799
3762
  const { transform: s, snapToGrid: i, snapGrid: a, domNode: c } = e.getState();
3800
3763
  if (!c)
3801
3764
  return o;
3802
- const { x: u, y: l } = c.getBoundingClientRect(), d = {
3803
- x: o.x - u,
3765
+ const { x: d, y: l } = c.getBoundingClientRect(), u = {
3766
+ x: o.x - d,
3804
3767
  y: o.y - l
3805
3768
  };
3806
- return So(d, s, i, a);
3769
+ return So(u, s, i, a);
3807
3770
  },
3808
3771
  flowToScreenPosition: (o) => {
3809
3772
  const { transform: s, domNode: i } = e.getState();
3810
3773
  if (!i)
3811
3774
  return o;
3812
- const { x: a, y: c } = i.getBoundingClientRect(), u = nl(o, s);
3775
+ const { x: a, y: c } = i.getBoundingClientRect(), d = nl(o, s);
3813
3776
  return {
3814
- x: u.x + a,
3815
- y: u.y + c
3777
+ x: d.x + a,
3778
+ y: d.y + c
3816
3779
  };
3817
3780
  },
3818
3781
  viewportInitialized: !0
@@ -3821,12 +3784,12 @@ const St = () => {
3821
3784
  function Uo() {
3822
3785
  const e = wg(), t = pe(), n = de(() => t.getState().getNodes().map((y) => ({ ...y })), []), r = de((y) => t.getState().nodeInternals.get(y), []), o = de(() => {
3823
3786
  const { edges: y = [] } = t.getState();
3824
- return y.map((g) => ({ ...g }));
3787
+ return y.map((p) => ({ ...p }));
3825
3788
  }, []), s = de((y) => {
3826
- const { edges: g = [] } = t.getState();
3827
- return g.find((m) => m.id === y);
3789
+ const { edges: p = [] } = t.getState();
3790
+ return p.find((m) => m.id === y);
3828
3791
  }, []), i = de((y) => {
3829
- const { getNodes: g, setNodes: m, hasDefaultNodes: w, onNodesChange: x } = t.getState(), b = g(), C = typeof y == "function" ? y(b) : y;
3792
+ const { getNodes: p, setNodes: m, hasDefaultNodes: w, onNodesChange: x } = t.getState(), b = p(), C = typeof y == "function" ? y(b) : y;
3830
3793
  if (w)
3831
3794
  m(C);
3832
3795
  else if (x) {
@@ -3834,45 +3797,45 @@ function Uo() {
3834
3797
  x(S);
3835
3798
  }
3836
3799
  }, []), a = de((y) => {
3837
- const { edges: g = [], setEdges: m, hasDefaultEdges: w, onEdgesChange: x } = t.getState(), b = typeof y == "function" ? y(g) : y;
3800
+ const { edges: p = [], setEdges: m, hasDefaultEdges: w, onEdgesChange: x } = t.getState(), b = typeof y == "function" ? y(p) : y;
3838
3801
  if (w)
3839
3802
  m(b);
3840
3803
  else if (x) {
3841
- const C = b.length === 0 ? g.map((S) => ({ type: "remove", id: S.id })) : b.map((S) => ({ item: S, type: "reset" }));
3804
+ const C = b.length === 0 ? p.map((S) => ({ type: "remove", id: S.id })) : b.map((S) => ({ item: S, type: "reset" }));
3842
3805
  x(C);
3843
3806
  }
3844
3807
  }, []), c = de((y) => {
3845
- const g = Array.isArray(y) ? y : [y], { getNodes: m, setNodes: w, hasDefaultNodes: x, onNodesChange: b } = t.getState();
3808
+ const p = Array.isArray(y) ? y : [y], { getNodes: m, setNodes: w, hasDefaultNodes: x, onNodesChange: b } = t.getState();
3846
3809
  if (x) {
3847
- const S = [...m(), ...g];
3810
+ const S = [...m(), ...p];
3848
3811
  w(S);
3849
3812
  } else if (b) {
3850
- const C = g.map((S) => ({ item: S, type: "add" }));
3813
+ const C = p.map((S) => ({ item: S, type: "add" }));
3851
3814
  b(C);
3852
3815
  }
3853
- }, []), u = de((y) => {
3854
- const g = Array.isArray(y) ? y : [y], { edges: m = [], setEdges: w, hasDefaultEdges: x, onEdgesChange: b } = t.getState();
3816
+ }, []), d = de((y) => {
3817
+ const p = Array.isArray(y) ? y : [y], { edges: m = [], setEdges: w, hasDefaultEdges: x, onEdgesChange: b } = t.getState();
3855
3818
  if (x)
3856
- w([...m, ...g]);
3819
+ w([...m, ...p]);
3857
3820
  else if (b) {
3858
- const C = g.map((S) => ({ item: S, type: "add" }));
3821
+ const C = p.map((S) => ({ item: S, type: "add" }));
3859
3822
  b(C);
3860
3823
  }
3861
3824
  }, []), l = de(() => {
3862
- const { getNodes: y, edges: g = [], transform: m } = t.getState(), [w, x, b] = m;
3825
+ const { getNodes: y, edges: p = [], transform: m } = t.getState(), [w, x, b] = m;
3863
3826
  return {
3864
3827
  nodes: y().map((C) => ({ ...C })),
3865
- edges: g.map((C) => ({ ...C })),
3828
+ edges: p.map((C) => ({ ...C })),
3866
3829
  viewport: {
3867
3830
  x: w,
3868
3831
  y: x,
3869
3832
  zoom: b
3870
3833
  }
3871
3834
  };
3872
- }, []), d = de(({ nodes: y, edges: g }) => {
3873
- const { nodeInternals: m, getNodes: w, edges: x, hasDefaultNodes: b, hasDefaultEdges: C, onNodesDelete: S, onEdgesDelete: D, onNodesChange: E, onEdgesChange: _ } = t.getState(), N = (y || []).map((A) => A.id), M = (g || []).map((A) => A.id), O = w().reduce((A, L) => {
3835
+ }, []), u = de(({ nodes: y, edges: p }) => {
3836
+ const { nodeInternals: m, getNodes: w, edges: x, hasDefaultNodes: b, hasDefaultEdges: C, onNodesDelete: S, onEdgesDelete: D, onNodesChange: E, onEdgesChange: _ } = t.getState(), N = (y || []).map((A) => A.id), M = (p || []).map((A) => A.id), O = w().reduce((A, L) => {
3874
3837
  const z = L.parentNode || L.parentId, G = !N.includes(L.id) && z && A.find((H) => H.id === z);
3875
- return (typeof L.deletable == "boolean" ? L.deletable : !0) && (N.includes(L.id) || G) && A.push(L), A;
3838
+ return (typeof L.deletable != "boolean" || L.deletable) && (N.includes(L.id) || G) && A.push(L), A;
3876
3839
  }, []), F = x.filter((A) => typeof A.deletable == "boolean" ? A.deletable : !0), v = F.filter((A) => M.includes(A.id));
3877
3840
  if (O || v) {
3878
3841
  const A = ol(O, F), L = [...v, ...A], z = L.reduce((G, R) => (G.includes(R.id) || G.push(R.id), G), []);
@@ -3891,21 +3854,21 @@ function Uo() {
3891
3854
  }
3892
3855
  }
3893
3856
  }, []), f = de((y) => {
3894
- const g = Fp(y), m = g ? null : t.getState().nodeInternals.get(y.id);
3895
- return !g && !m ? [null, null, g] : [g ? y : zi(m), m, g];
3896
- }, []), h = de((y, g = !0, m) => {
3857
+ const p = Fp(y), m = p ? null : t.getState().nodeInternals.get(y.id);
3858
+ return !p && !m ? [null, null, p] : [p ? y : zi(m), m, p];
3859
+ }, []), h = de((y, p = !0, m) => {
3897
3860
  const [w, x, b] = f(y);
3898
3861
  return w ? (m || t.getState().getNodes()).filter((C) => {
3899
3862
  if (!b && (C.id === x.id || !C.positionAbsolute))
3900
3863
  return !1;
3901
3864
  const S = zi(C), D = bo(S, w);
3902
- return g && D > 0 || D >= w.width * w.height;
3865
+ return p && D > 0 || D >= w.width * w.height;
3903
3866
  }) : [];
3904
- }, []), p = de((y, g, m = !0) => {
3867
+ }, []), g = de((y, p, m = !0) => {
3905
3868
  const [w] = f(y);
3906
3869
  if (!w)
3907
3870
  return !1;
3908
- const x = bo(w, g);
3871
+ const x = bo(w, p);
3909
3872
  return m && x > 0 || x >= w.width * w.height;
3910
3873
  }, []);
3911
3874
  return Ne(() => ({
@@ -3917,11 +3880,11 @@ function Uo() {
3917
3880
  setNodes: i,
3918
3881
  setEdges: a,
3919
3882
  addNodes: c,
3920
- addEdges: u,
3883
+ addEdges: d,
3921
3884
  toObject: l,
3922
- deleteElements: d,
3885
+ deleteElements: u,
3923
3886
  getIntersectingNodes: h,
3924
- isNodeIntersecting: p
3887
+ isNodeIntersecting: g
3925
3888
  }), [
3926
3889
  e,
3927
3890
  n,
@@ -3931,11 +3894,11 @@ function Uo() {
3931
3894
  i,
3932
3895
  a,
3933
3896
  c,
3934
- u,
3935
- l,
3936
3897
  d,
3898
+ l,
3899
+ u,
3937
3900
  h,
3938
- p
3901
+ g
3939
3902
  ]);
3940
3903
  }
3941
3904
  const vg = { actInsideInputWithModifier: !1 };
@@ -3943,8 +3906,8 @@ var bg = ({ deleteKeyCode: e, multiSelectionKeyCode: t }) => {
3943
3906
  const n = pe(), { deleteElements: r } = Uo(), o = tn(e, vg), s = tn(t);
3944
3907
  oe(() => {
3945
3908
  if (o) {
3946
- const { edges: i, getNodes: a } = n.getState(), c = a().filter((l) => l.selected), u = i.filter((l) => l.selected);
3947
- r({ nodes: c, edges: u }), n.setState({ nodesSelectionActive: !1 });
3909
+ const { edges: i, getNodes: a } = n.getState(), c = a().filter((l) => l.selected), d = i.filter((l) => l.selected);
3910
+ r({ nodes: c, edges: d }), n.setState({ nodesSelectionActive: !1 });
3948
3911
  }
3949
3912
  }, [o]), oe(() => {
3950
3913
  n.setState({ multiSelectionActive: s });
@@ -3983,11 +3946,11 @@ const Ko = {
3983
3946
  d3Selection: e.d3Selection,
3984
3947
  d3ZoomHandler: e.d3ZoomHandler,
3985
3948
  userSelectionActive: e.userSelectionActive
3986
- }), Sg = ({ onMove: e, onMoveStart: t, onMoveEnd: n, onPaneContextMenu: r, zoomOnScroll: o = !0, zoomOnPinch: s = !0, panOnScroll: i = !1, panOnScrollSpeed: a = 0.5, panOnScrollMode: c = ut.Free, zoomOnDoubleClick: u = !0, elementsSelectable: l, panOnDrag: d = !0, defaultViewport: f, translateExtent: h, minZoom: p, maxZoom: y, zoomActivationKeyCode: g, preventScrolling: m = !0, children: w, noWheelClassName: x, noPanClassName: b }) => {
3987
- const C = Q(), S = pe(), D = Q(!1), E = Q(!1), _ = Q(null), N = Q({ x: 0, y: 0, zoom: 0 }), { d3Zoom: M, d3Selection: O, d3ZoomHandler: F, userSelectionActive: v } = le(_g, he), A = tn(g), L = Q(0), z = Q(!1), G = Q();
3949
+ }), Sg = ({ onMove: e, onMoveStart: t, onMoveEnd: n, onPaneContextMenu: r, zoomOnScroll: o = !0, zoomOnPinch: s = !0, panOnScroll: i = !1, panOnScrollSpeed: a = 0.5, panOnScrollMode: c = ut.Free, zoomOnDoubleClick: d = !0, elementsSelectable: l, panOnDrag: u = !0, defaultViewport: f, translateExtent: h, minZoom: g, maxZoom: y, zoomActivationKeyCode: p, preventScrolling: m = !0, children: w, noWheelClassName: x, noPanClassName: b }) => {
3950
+ const C = Q(), S = pe(), D = Q(!1), E = Q(!1), _ = Q(null), N = Q({ x: 0, y: 0, zoom: 0 }), { d3Zoom: M, d3Selection: O, d3ZoomHandler: F, userSelectionActive: v } = le(_g, he), A = tn(p), L = Q(0), z = Q(!1), G = Q();
3988
3951
  return xg(_), oe(() => {
3989
3952
  if (_.current) {
3990
- const R = _.current.getBoundingClientRect(), H = Ga().scaleExtent([p, y]).translateExtent(h), q = Se(_.current).call(H), j = qe.translate(f.x, f.y).scale(Tt(f.zoom, p, y)), k = [
3953
+ const R = _.current.getBoundingClientRect(), H = Ga().scaleExtent([g, y]).translateExtent(h), q = Se(_.current).call(H), j = qe.translate(f.x, f.y).scale(Tt(f.zoom, g, y)), k = [
3991
3954
  [0, 0],
3992
3955
  [R.width, R.height]
3993
3956
  ], I = H.constrain()(j, k, h);
@@ -4054,31 +4017,31 @@ const Ko = {
4054
4017
  }, [M, t]), oe(() => {
4055
4018
  M && (v && !D.current ? M.on("zoom", null) : v || M.on("zoom", (R) => {
4056
4019
  const { onViewportChange: H } = S.getState();
4057
- if (S.setState({ transform: [R.transform.x, R.transform.y, R.transform.k] }), E.current = !!(r && Zi(d, L.current ?? 0)), (e || H) && !R.sourceEvent?.internal) {
4020
+ if (S.setState({ transform: [R.transform.x, R.transform.y, R.transform.k] }), E.current = !!(r && Zi(u, L.current ?? 0)), (e || H) && !R.sourceEvent?.internal) {
4058
4021
  const q = vn(R.transform);
4059
4022
  H?.(q), e?.(R.sourceEvent, q);
4060
4023
  }
4061
4024
  }));
4062
- }, [v, M, e, d, r]), oe(() => {
4025
+ }, [v, M, e, u, r]), oe(() => {
4063
4026
  M && M.on("end", (R) => {
4064
4027
  if (!R.sourceEvent || R.sourceEvent.internal)
4065
4028
  return null;
4066
4029
  const { onViewportChangeEnd: H } = S.getState();
4067
- if (D.current = !1, S.setState({ paneDragging: !1 }), r && Zi(d, L.current ?? 0) && !E.current && r(R.sourceEvent), E.current = !1, (n || H) && Eg(N.current, R.transform)) {
4030
+ if (D.current = !1, S.setState({ paneDragging: !1 }), r && Zi(u, L.current ?? 0) && !E.current && r(R.sourceEvent), E.current = !1, (n || H) && Eg(N.current, R.transform)) {
4068
4031
  const q = vn(R.transform);
4069
4032
  N.current = q, clearTimeout(C.current), C.current = setTimeout(() => {
4070
4033
  H?.(q), n?.(R.sourceEvent, q);
4071
4034
  }, i ? 150 : 0);
4072
4035
  }
4073
4036
  });
4074
- }, [M, i, d, n, r]), oe(() => {
4037
+ }, [M, i, u, n, r]), oe(() => {
4075
4038
  M && M.filter((R) => {
4076
4039
  const H = A || o, q = s && R.ctrlKey;
4077
- if ((d === !0 || Array.isArray(d) && d.includes(1)) && R.button === 1 && R.type === "mousedown" && (Ct(R, "react-flow__node") || Ct(R, "react-flow__edge")))
4040
+ if ((u === !0 || Array.isArray(u) && u.includes(1)) && R.button === 1 && R.type === "mousedown" && (Ct(R, "react-flow__node") || Ct(R, "react-flow__edge")))
4078
4041
  return !0;
4079
- if (!d && !H && !i && !u && !s || v || !u && R.type === "dblclick" || Ct(R, x) && R.type === "wheel" || Ct(R, b) && (R.type !== "wheel" || i && R.type === "wheel" && !A) || !s && R.ctrlKey && R.type === "wheel" || !H && !i && !q && R.type === "wheel" || !d && (R.type === "mousedown" || R.type === "touchstart") || Array.isArray(d) && !d.includes(R.button) && R.type === "mousedown")
4042
+ if (!u && !H && !i && !d && !s || v || !d && R.type === "dblclick" || Ct(R, x) && R.type === "wheel" || Ct(R, b) && (R.type !== "wheel" || i && R.type === "wheel" && !A) || !s && R.ctrlKey && R.type === "wheel" || !H && !i && !q && R.type === "wheel" || !u && (R.type === "mousedown" || R.type === "touchstart") || Array.isArray(u) && !u.includes(R.button) && R.type === "mousedown")
4080
4043
  return !1;
4081
- const j = Array.isArray(d) && d.includes(R.button) || !R.button || R.button <= 1;
4044
+ const j = Array.isArray(u) && u.includes(R.button) || !R.button || R.button <= 1;
4082
4045
  return (!R.ctrlKey || R.type === "wheel") && j;
4083
4046
  });
4084
4047
  }, [
@@ -4087,8 +4050,8 @@ const Ko = {
4087
4050
  o,
4088
4051
  s,
4089
4052
  i,
4090
- u,
4091
4053
  d,
4054
+ u,
4092
4055
  l,
4093
4056
  A
4094
4057
  ]), $.createElement("div", { className: "react-flow__renderer", ref: _, style: Ko }, w);
@@ -4174,9 +4137,9 @@ const fr = (e, t) => (n) => {
4174
4137
  userSelectionActive: e.userSelectionActive,
4175
4138
  elementsSelectable: e.elementsSelectable,
4176
4139
  dragging: e.paneDragging
4177
- }), _l = ae(({ isSelecting: e, selectionMode: t = en.Full, panOnDrag: n, onSelectionStart: r, onSelectionEnd: o, onPaneClick: s, onPaneContextMenu: i, onPaneScroll: a, onPaneMouseEnter: c, onPaneMouseMove: u, onPaneMouseLeave: l, children: d }) => {
4178
- const f = Q(null), h = pe(), p = Q(0), y = Q(0), g = Q(), { userSelectionActive: m, elementsSelectable: w, dragging: x } = le(Mg, he), b = () => {
4179
- h.setState({ userSelectionActive: !1, userSelectionRect: null }), p.current = 0, y.current = 0;
4140
+ }), _l = ae(({ isSelecting: e, selectionMode: t = en.Full, panOnDrag: n, onSelectionStart: r, onSelectionEnd: o, onPaneClick: s, onPaneContextMenu: i, onPaneScroll: a, onPaneMouseEnter: c, onPaneMouseMove: d, onPaneMouseLeave: l, children: u }) => {
4141
+ const f = Q(null), h = pe(), g = Q(0), y = Q(0), p = Q(), { userSelectionActive: m, elementsSelectable: w, dragging: x } = le(Mg, he), b = () => {
4142
+ h.setState({ userSelectionActive: !1, userSelectionRect: null }), g.current = 0, y.current = 0;
4180
4143
  }, C = (F) => {
4181
4144
  s?.(F), h.getState().resetSelectedElements(), h.setState({ nodesSelectionActive: !1 });
4182
4145
  }, S = (F) => {
@@ -4187,9 +4150,9 @@ const fr = (e, t) => (n) => {
4187
4150
  i?.(F);
4188
4151
  }, D = a ? (F) => a(F) : void 0, E = (F) => {
4189
4152
  const { resetSelectedElements: v, domNode: A } = h.getState();
4190
- if (g.current = A?.getBoundingClientRect(), !w || !e || F.button !== 0 || F.target !== f.current || !g.current)
4153
+ if (p.current = A?.getBoundingClientRect(), !w || !e || F.button !== 0 || F.target !== f.current || !p.current)
4191
4154
  return;
4192
- const { x: L, y: z } = Qe(F, g.current);
4155
+ const { x: L, y: z } = Qe(F, p.current);
4193
4156
  v(), h.setState({
4194
4157
  userSelectionRect: {
4195
4158
  width: 0,
@@ -4202,18 +4165,18 @@ const fr = (e, t) => (n) => {
4202
4165
  }), r?.(F);
4203
4166
  }, _ = (F) => {
4204
4167
  const { userSelectionRect: v, nodeInternals: A, edges: L, transform: z, onNodesChange: G, onEdgesChange: R, nodeOrigin: H, getNodes: q } = h.getState();
4205
- if (!e || !g.current || !v)
4168
+ if (!e || !p.current || !v)
4206
4169
  return;
4207
4170
  h.setState({ userSelectionActive: !0, nodesSelectionActive: !1 });
4208
- const j = Qe(F, g.current), k = v.startX ?? 0, I = v.startY ?? 0, P = {
4171
+ const j = Qe(F, p.current), k = v.startX ?? 0, I = v.startY ?? 0, P = {
4209
4172
  ...v,
4210
4173
  x: j.x < k ? j.x : k,
4211
4174
  y: j.y < I ? j.y : I,
4212
4175
  width: Math.abs(j.x - k),
4213
4176
  height: Math.abs(j.y - I)
4214
4177
  }, B = q(), V = rl(A, P, z, t === en.Partial, !0, H), Y = ol(V, L).map((Z) => Z.id), W = V.map((Z) => Z.id);
4215
- if (p.current !== W.length) {
4216
- p.current = W.length;
4178
+ if (g.current !== W.length) {
4179
+ g.current = W.length;
4217
4180
  const Z = kt(B, W);
4218
4181
  Z.length && G?.(Z);
4219
4182
  }
@@ -4229,14 +4192,14 @@ const fr = (e, t) => (n) => {
4229
4192
  if (F.button !== 0)
4230
4193
  return;
4231
4194
  const { userSelectionRect: v } = h.getState();
4232
- !m && v && F.target === f.current && C?.(F), h.setState({ nodesSelectionActive: p.current > 0 }), b(), o?.(F);
4195
+ !m && v && F.target === f.current && C?.(F), h.setState({ nodesSelectionActive: g.current > 0 }), b(), o?.(F);
4233
4196
  }, M = (F) => {
4234
- m && (h.setState({ nodesSelectionActive: p.current > 0 }), o?.(F)), b();
4197
+ m && (h.setState({ nodesSelectionActive: g.current > 0 }), o?.(F)), b();
4235
4198
  }, O = w && (e || m);
4236
4199
  return $.createElement(
4237
4200
  "div",
4238
- { className: me(["react-flow__pane", { dragging: x, selection: e }]), onClick: O ? void 0 : fr(C, f), onContextMenu: fr(S, f), onWheel: fr(D, f), onMouseEnter: O ? void 0 : c, onMouseDown: O ? E : void 0, onMouseMove: O ? _ : u, onMouseUp: O ? N : void 0, onMouseLeave: O ? M : l, ref: f, style: Ko },
4239
- d,
4201
+ { className: me(["react-flow__pane", { dragging: x, selection: e }]), onClick: O ? void 0 : fr(C, f), onContextMenu: fr(S, f), onWheel: fr(D, f), onMouseEnter: O ? void 0 : c, onMouseDown: O ? E : void 0, onMouseMove: O ? _ : d, onMouseUp: O ? N : void 0, onMouseLeave: O ? M : l, ref: f, style: Ko },
4202
+ u,
4240
4203
  $.createElement(Ng, null)
4241
4204
  );
4242
4205
  });
@@ -4289,33 +4252,33 @@ function Cl(e, t, n, r, o = [0, 0], s) {
4289
4252
  const c = e.parentNode || e.parentId;
4290
4253
  if (e.extent === "parent" && !e.expandParent)
4291
4254
  if (c && e.width && e.height) {
4292
- const d = n.get(c), { x: f, y: h } = ht(d, o).positionAbsolute;
4293
- a = d && Ce(f) && Ce(h) && Ce(d.width) && Ce(d.height) ? [
4255
+ const u = n.get(c), { x: f, y: h } = ht(u, o).positionAbsolute;
4256
+ a = u && Ce(f) && Ce(h) && Ce(u.width) && Ce(u.height) ? [
4294
4257
  [f + e.width * o[0], h + e.height * o[1]],
4295
4258
  [
4296
- f + d.width - e.width + e.width * o[0],
4297
- h + d.height - e.height + e.height * o[1]
4259
+ f + u.width - e.width + e.width * o[0],
4260
+ h + u.height - e.height + e.height * o[1]
4298
4261
  ]
4299
4262
  ] : a;
4300
4263
  } else
4301
4264
  s?.("005", Ie.error005()), a = i;
4302
4265
  else if (e.extent && c && e.extent !== "parent") {
4303
- const d = n.get(c), { x: f, y: h } = ht(d, o).positionAbsolute;
4266
+ const u = n.get(c), { x: f, y: h } = ht(u, o).positionAbsolute;
4304
4267
  a = [
4305
4268
  [e.extent[0][0] + f, e.extent[0][1] + h],
4306
4269
  [e.extent[1][0] + f, e.extent[1][1] + h]
4307
4270
  ];
4308
4271
  }
4309
- let u = { x: 0, y: 0 };
4272
+ let d = { x: 0, y: 0 };
4310
4273
  if (c) {
4311
- const d = n.get(c);
4312
- u = ht(d, o).positionAbsolute;
4274
+ const u = n.get(c);
4275
+ d = ht(u, o).positionAbsolute;
4313
4276
  }
4314
4277
  const l = a && a !== "parent" ? Bo(t, a) : t;
4315
4278
  return {
4316
4279
  position: {
4317
- x: l.x - u.x,
4318
- y: l.y - u.y
4280
+ x: l.x - d.x,
4281
+ y: l.y - d.y
4319
4282
  },
4320
4283
  positionAbsolute: l
4321
4284
  };
@@ -4337,12 +4300,12 @@ const Ji = (e, t, n, r) => {
4337
4300
  y: i.height * r[1]
4338
4301
  };
4339
4302
  return s.map((c) => {
4340
- const u = c.getBoundingClientRect();
4303
+ const d = c.getBoundingClientRect();
4341
4304
  return {
4342
4305
  id: c.getAttribute("data-handleid"),
4343
4306
  position: c.getAttribute("data-handlepos"),
4344
- x: (u.left - i.left - a.x) / n,
4345
- y: (u.top - i.top - a.y) / n,
4307
+ x: (d.left - i.left - a.x) / n,
4308
+ y: (d.top - i.top - a.y) / n,
4346
4309
  ...Ho(c)
4347
4310
  };
4348
4311
  });
@@ -4354,12 +4317,12 @@ function Bt(e, t, n) {
4354
4317
  };
4355
4318
  }
4356
4319
  function No({ id: e, store: t, unselect: n = !1, nodeRef: r }) {
4357
- const { addSelectedNodes: o, unselectNodesAndEdges: s, multiSelectionActive: i, nodeInternals: a, onError: c } = t.getState(), u = a.get(e);
4358
- if (!u) {
4320
+ const { addSelectedNodes: o, unselectNodesAndEdges: s, multiSelectionActive: i, nodeInternals: a, onError: c } = t.getState(), d = a.get(e);
4321
+ if (!d) {
4359
4322
  c?.("012", Ie.error012(e));
4360
4323
  return;
4361
4324
  }
4362
- t.setState({ nodesSelectionActive: !1 }), u.selected ? (n || u.selected && i) && (s({ nodes: [u], edges: [] }), requestAnimationFrame(() => r?.current?.blur())) : o([e]);
4325
+ t.setState({ nodesSelectionActive: !1 }), d.selected ? (n || d.selected && i) && (s({ nodes: [d], edges: [] }), requestAnimationFrame(() => r?.current?.blur())) : o([e]);
4363
4326
  }
4364
4327
  function Og() {
4365
4328
  const e = pe();
@@ -4379,12 +4342,12 @@ function pr(e) {
4379
4342
  return (t, n, r) => e?.(t, r);
4380
4343
  }
4381
4344
  function Nl({ nodeRef: e, disabled: t = !1, noDragClassName: n, handleSelector: r, nodeId: o, isSelectable: s, selectNodesOnDrag: i }) {
4382
- const a = pe(), [c, u] = re(!1), l = Q([]), d = Q({ x: null, y: null }), f = Q(0), h = Q(null), p = Q({ x: 0, y: 0 }), y = Q(null), g = Q(!1), m = Q(!1), w = Q(!1), x = Og();
4345
+ const a = pe(), [c, d] = re(!1), l = Q([]), u = Q({ x: null, y: null }), f = Q(0), h = Q(null), g = Q({ x: 0, y: 0 }), y = Q(null), p = Q(!1), m = Q(!1), w = Q(!1), x = Og();
4383
4346
  return oe(() => {
4384
4347
  if (e?.current) {
4385
4348
  const b = Se(e.current), C = ({ x: E, y: _ }) => {
4386
4349
  const { nodeInternals: N, onNodeDrag: M, onSelectionDrag: O, updateNodePositions: F, nodeExtent: v, snapGrid: A, snapToGrid: L, nodeOrigin: z, onError: G } = a.getState();
4387
- d.current = { x: E, y: _ };
4350
+ u.current = { x: E, y: _ };
4388
4351
  let R = !1, H = { x: 0, y: 0, x2: 0, y2: 0 };
4389
4352
  if (l.current.length > 1 && v) {
4390
4353
  const j = Zn(l.current, z);
@@ -4402,7 +4365,7 @@ function Nl({ nodeRef: e, disabled: t = !1, noDragClassName: n, handleSelector:
4402
4365
  return R = R || j.position.x !== P.position.x || j.position.y !== P.position.y, j.position = P.position, j.positionAbsolute = P.positionAbsolute, j;
4403
4366
  }), !R)
4404
4367
  return;
4405
- F(l.current, !0, !0), u(!0);
4368
+ F(l.current, !0, !0), d(!0);
4406
4369
  const q = o ? M : pr(O);
4407
4370
  if (q && y.current) {
4408
4371
  const [j, k] = hr({
@@ -4415,10 +4378,10 @@ function Nl({ nodeRef: e, disabled: t = !1, noDragClassName: n, handleSelector:
4415
4378
  }, S = () => {
4416
4379
  if (!h.current)
4417
4380
  return;
4418
- const [E, _] = ja(p.current, h.current);
4381
+ const [E, _] = ja(g.current, h.current);
4419
4382
  if (E !== 0 || _ !== 0) {
4420
4383
  const { transform: N, panBy: M } = a.getState();
4421
- d.current.x = (d.current.x ?? 0) - E / N[2], d.current.y = (d.current.y ?? 0) - _ / N[2], M({ x: E, y: _ }) && C(d.current);
4384
+ u.current.x = (u.current.x ?? 0) - E / N[2], u.current.y = (u.current.y ?? 0) - _ / N[2], M({ x: E, y: _ }) && C(u.current);
4422
4385
  }
4423
4386
  f.current = requestAnimationFrame(S);
4424
4387
  }, D = (E) => {
@@ -4431,7 +4394,7 @@ function Nl({ nodeRef: e, disabled: t = !1, noDragClassName: n, handleSelector:
4431
4394
  nodeRef: e
4432
4395
  });
4433
4396
  const L = x(E);
4434
- if (d.current = L, l.current = Lg(_, M, L, o), A && l.current) {
4397
+ if (u.current = L, l.current = Lg(_, M, L, o), A && l.current) {
4435
4398
  const [z, G] = hr({
4436
4399
  nodeId: o,
4437
4400
  dragItems: l.current,
@@ -4447,18 +4410,18 @@ function Nl({ nodeRef: e, disabled: t = !1, noDragClassName: n, handleSelector:
4447
4410
  const { domNode: N, nodeDragThreshold: M } = a.getState();
4448
4411
  M === 0 && D(_), w.current = !1;
4449
4412
  const O = x(_);
4450
- d.current = O, h.current = N?.getBoundingClientRect() || null, p.current = Qe(_.sourceEvent, h.current);
4413
+ u.current = O, h.current = N?.getBoundingClientRect() || null, g.current = Qe(_.sourceEvent, h.current);
4451
4414
  }).on("drag", (_) => {
4452
4415
  const N = x(_), { autoPanOnNodeDrag: M, nodeDragThreshold: O } = a.getState();
4453
4416
  if (_.sourceEvent.type === "touchmove" && _.sourceEvent.touches.length > 1 && (w.current = !0), !w.current) {
4454
- if (!g.current && m.current && M && (g.current = !0, S()), !m.current) {
4455
- const F = N.xSnapped - (d?.current?.x ?? 0), v = N.ySnapped - (d?.current?.y ?? 0);
4417
+ if (!p.current && m.current && M && (p.current = !0, S()), !m.current) {
4418
+ const F = N.xSnapped - (u?.current?.x ?? 0), v = N.ySnapped - (u?.current?.y ?? 0);
4456
4419
  Math.sqrt(F * F + v * v) > O && D(_);
4457
4420
  }
4458
- (d.current.x !== N.xSnapped || d.current.y !== N.ySnapped) && l.current && m.current && (y.current = _.sourceEvent, p.current = Qe(_.sourceEvent, h.current), C(N));
4421
+ (u.current.x !== N.xSnapped || u.current.y !== N.ySnapped) && l.current && m.current && (y.current = _.sourceEvent, g.current = Qe(_.sourceEvent, h.current), C(N));
4459
4422
  }
4460
4423
  }).on("end", (_) => {
4461
- if (!(!m.current || w.current) && (u(!1), g.current = !1, m.current = !1, cancelAnimationFrame(f.current), l.current)) {
4424
+ if (!(!m.current || w.current) && (d(!1), p.current = !1, m.current = !1, cancelAnimationFrame(f.current), l.current)) {
4462
4425
  const { updateNodePositions: N, nodeInternals: M, onNodeDragStop: O, onSelectionDragStop: F } = a.getState(), v = o ? O : pr(F);
4463
4426
  if (N(l.current, !1, !1), v) {
4464
4427
  const [A, L] = hr({
@@ -4493,11 +4456,11 @@ function Nl({ nodeRef: e, disabled: t = !1, noDragClassName: n, handleSelector:
4493
4456
  function kl() {
4494
4457
  const e = pe();
4495
4458
  return de((n) => {
4496
- const { nodeInternals: r, nodeExtent: o, updateNodePositions: s, getNodes: i, snapToGrid: a, snapGrid: c, onError: u, nodesDraggable: l } = e.getState(), d = i().filter((w) => w.selected && (w.draggable || l && typeof w.draggable > "u")), f = a ? c[0] : 5, h = a ? c[1] : 5, p = n.isShiftPressed ? 4 : 1, y = n.x * f * p, g = n.y * h * p, m = d.map((w) => {
4459
+ const { nodeInternals: r, nodeExtent: o, updateNodePositions: s, getNodes: i, snapToGrid: a, snapGrid: c, onError: d, nodesDraggable: l } = e.getState(), u = i().filter((w) => w.selected && (w.draggable || l && typeof w.draggable > "u")), f = a ? c[0] : 5, h = a ? c[1] : 5, g = n.isShiftPressed ? 4 : 1, y = n.x * f * g, p = n.y * h * g, m = u.map((w) => {
4497
4460
  if (w.positionAbsolute) {
4498
- const x = { x: w.positionAbsolute.x + y, y: w.positionAbsolute.y + g };
4461
+ const x = { x: w.positionAbsolute.x + y, y: w.positionAbsolute.y + p };
4499
4462
  a && (x.x = c[0] * Math.round(x.x / c[0]), x.y = c[1] * Math.round(x.y / c[1]));
4500
- const { positionAbsolute: b, position: C } = Cl(w, x, r, o, void 0, u);
4463
+ const { positionAbsolute: b, position: C } = Cl(w, x, r, o, void 0, d);
4501
4464
  w.position = C, w.positionAbsolute = b;
4502
4465
  }
4503
4466
  return w;
@@ -4512,8 +4475,8 @@ const It = {
4512
4475
  ArrowRight: { x: 1, y: 0 }
4513
4476
  };
4514
4477
  var qt = (e) => {
4515
- const t = ({ id: n, type: r, data: o, xPos: s, yPos: i, xPosOrigin: a, yPosOrigin: c, selected: u, onClick: l, onMouseEnter: d, onMouseMove: f, onMouseLeave: h, onContextMenu: p, onDoubleClick: y, style: g, className: m, isDraggable: w, isSelectable: x, isConnectable: b, isFocusable: C, selectNodesOnDrag: S, sourcePosition: D, targetPosition: E, hidden: _, resizeObserver: N, dragHandle: M, zIndex: O, isParent: F, noDragClassName: v, noPanClassName: A, initialized: L, disableKeyboardA11y: z, ariaLabel: G, rfId: R, hasHandleBounds: H }) => {
4516
- const q = pe(), j = Q(null), k = Q(null), I = Q(D), P = Q(E), B = Q(r), V = x || w || l || d || f || h, Y = kl(), W = Bt(n, q.getState, d), Z = Bt(n, q.getState, f), ne = Bt(n, q.getState, h), K = Bt(n, q.getState, p), ee = Bt(n, q.getState, y), ce = (ie) => {
4478
+ const t = ({ id: n, type: r, data: o, xPos: s, yPos: i, xPosOrigin: a, yPosOrigin: c, selected: d, onClick: l, onMouseEnter: u, onMouseMove: f, onMouseLeave: h, onContextMenu: g, onDoubleClick: y, style: p, className: m, isDraggable: w, isSelectable: x, isConnectable: b, isFocusable: C, selectNodesOnDrag: S, sourcePosition: D, targetPosition: E, hidden: _, resizeObserver: N, dragHandle: M, zIndex: O, isParent: F, noDragClassName: v, noPanClassName: A, initialized: L, disableKeyboardA11y: z, ariaLabel: G, rfId: R, hasHandleBounds: H }) => {
4479
+ const q = pe(), j = Q(null), k = Q(null), I = Q(D), P = Q(E), B = Q(r), V = x || w || l || u || f || h, Y = kl(), W = Bt(n, q.getState, u), Z = Bt(n, q.getState, f), ne = Bt(n, q.getState, h), K = Bt(n, q.getState, g), ee = Bt(n, q.getState, y), ce = (ie) => {
4517
4480
  const { nodeDragThreshold: U } = q.getState();
4518
4481
  if (x && (!S || !w || U > 0) && No({
4519
4482
  id: n,
@@ -4533,7 +4496,7 @@ var qt = (e) => {
4533
4496
  unselect: U,
4534
4497
  nodeRef: j
4535
4498
  });
4536
- } else w && u && Object.prototype.hasOwnProperty.call(It, ie.key) && (q.setState({
4499
+ } else w && d && Object.prototype.hasOwnProperty.call(It, ie.key) && (q.setState({
4537
4500
  ariaLiveMessage: `Moved selected node ${ie.key.replace("Arrow", "").toLowerCase()}. New position, x: ${~~s}, y: ${~~i}`
4538
4501
  }), Y({
4539
4502
  x: It[ie.key].x,
@@ -4572,7 +4535,7 @@ var qt = (e) => {
4572
4535
  },
4573
4536
  m,
4574
4537
  {
4575
- selected: u,
4538
+ selected: d,
4576
4539
  selectable: x,
4577
4540
  parent: F,
4578
4541
  dragging: ye
@@ -4582,12 +4545,12 @@ var qt = (e) => {
4582
4545
  transform: `translate(${a}px,${c}px)`,
4583
4546
  pointerEvents: V ? "all" : "none",
4584
4547
  visibility: L ? "visible" : "hidden",
4585
- ...g
4548
+ ...p
4586
4549
  }, "data-id": n, "data-testid": `rf__node-${n}`, onMouseEnter: W, onMouseMove: Z, onMouseLeave: ne, onContextMenu: K, onClick: ce, onDoubleClick: ee, onKeyDown: C ? se : void 0, tabIndex: C ? 0 : void 0, role: C ? "button" : void 0, "aria-describedby": z ? void 0 : `${ml}-${R}`, "aria-label": G },
4587
4550
  $.createElement(
4588
4551
  Yp,
4589
4552
  { value: n },
4590
- $.createElement(e, { id: n, data: o, type: r, xPos: s, yPos: i, selected: u, isConnectable: b, sourcePosition: D, targetPosition: E, dragging: ye, dragHandle: M, zIndex: O })
4553
+ $.createElement(e, { id: n, data: o, type: r, xPos: s, yPos: i, selected: d, isConnectable: b, sourcePosition: D, targetPosition: E, dragging: ye, dragHandle: M, zIndex: O })
4591
4554
  )
4592
4555
  );
4593
4556
  };
@@ -4602,23 +4565,23 @@ const Ag = (e) => {
4602
4565
  };
4603
4566
  };
4604
4567
  function Tg({ onSelectionContextMenu: e, noPanClassName: t, disableKeyboardA11y: n }) {
4605
- const r = pe(), { width: o, height: s, x: i, y: a, transformString: c, userSelectionActive: u } = le(Ag, he), l = kl(), d = Q(null);
4568
+ const r = pe(), { width: o, height: s, x: i, y: a, transformString: c, userSelectionActive: d } = le(Ag, he), l = kl(), u = Q(null);
4606
4569
  if (oe(() => {
4607
- n || d.current?.focus({
4570
+ n || u.current?.focus({
4608
4571
  preventScroll: !0
4609
4572
  });
4610
4573
  }, [n]), Nl({
4611
- nodeRef: d
4612
- }), u || !o || !s)
4574
+ nodeRef: u
4575
+ }), d || !o || !s)
4613
4576
  return null;
4614
- const f = e ? (p) => {
4615
- const y = r.getState().getNodes().filter((g) => g.selected);
4616
- e(p, y);
4617
- } : void 0, h = (p) => {
4618
- Object.prototype.hasOwnProperty.call(It, p.key) && l({
4619
- x: It[p.key].x,
4620
- y: It[p.key].y,
4621
- isShiftPressed: p.shiftKey
4577
+ const f = e ? (g) => {
4578
+ const y = r.getState().getNodes().filter((p) => p.selected);
4579
+ e(g, y);
4580
+ } : void 0, h = (g) => {
4581
+ Object.prototype.hasOwnProperty.call(It, g.key) && l({
4582
+ x: It[g.key].x,
4583
+ y: It[g.key].y,
4584
+ isShiftPressed: g.shiftKey
4622
4585
  });
4623
4586
  };
4624
4587
  return $.createElement(
@@ -4626,7 +4589,7 @@ function Tg({ onSelectionContextMenu: e, noPanClassName: t, disableKeyboardA11y:
4626
4589
  { className: me(["react-flow__nodesselection", "react-flow__container", t]), style: {
4627
4590
  transform: c
4628
4591
  } },
4629
- $.createElement("div", { ref: d, className: "react-flow__nodesselection-rect", onContextMenu: f, tabIndex: n ? void 0 : -1, onKeyDown: n ? void 0 : h, style: {
4592
+ $.createElement("div", { ref: u, className: "react-flow__nodesselection-rect", onContextMenu: f, tabIndex: n ? void 0 : -1, onKeyDown: n ? void 0 : h, style: {
4630
4593
  width: o,
4631
4594
  height: s,
4632
4595
  top: a,
@@ -4635,14 +4598,14 @@ function Tg({ onSelectionContextMenu: e, noPanClassName: t, disableKeyboardA11y:
4635
4598
  );
4636
4599
  }
4637
4600
  var Dg = ae(Tg);
4638
- const Rg = (e) => e.nodesSelectionActive, Ml = ({ children: e, onPaneClick: t, onPaneMouseEnter: n, onPaneMouseMove: r, onPaneMouseLeave: o, onPaneContextMenu: s, onPaneScroll: i, deleteKeyCode: a, onMove: c, onMoveStart: u, onMoveEnd: l, selectionKeyCode: d, selectionOnDrag: f, selectionMode: h, onSelectionStart: p, onSelectionEnd: y, multiSelectionKeyCode: g, panActivationKeyCode: m, zoomActivationKeyCode: w, elementsSelectable: x, zoomOnScroll: b, zoomOnPinch: C, panOnScroll: S, panOnScrollSpeed: D, panOnScrollMode: E, zoomOnDoubleClick: _, panOnDrag: N, defaultViewport: M, translateExtent: O, minZoom: F, maxZoom: v, preventScrolling: A, onSelectionContextMenu: L, noWheelClassName: z, noPanClassName: G, disableKeyboardA11y: R }) => {
4639
- const H = le(Rg), q = tn(d), j = tn(m), k = j || N, I = j || S, P = q || f && k !== !0;
4640
- return bg({ deleteKeyCode: a, multiSelectionKeyCode: g }), $.createElement(
4601
+ const Rg = (e) => e.nodesSelectionActive, Ml = ({ children: e, onPaneClick: t, onPaneMouseEnter: n, onPaneMouseMove: r, onPaneMouseLeave: o, onPaneContextMenu: s, onPaneScroll: i, deleteKeyCode: a, onMove: c, onMoveStart: d, onMoveEnd: l, selectionKeyCode: u, selectionOnDrag: f, selectionMode: h, onSelectionStart: g, onSelectionEnd: y, multiSelectionKeyCode: p, panActivationKeyCode: m, zoomActivationKeyCode: w, elementsSelectable: x, zoomOnScroll: b, zoomOnPinch: C, panOnScroll: S, panOnScrollSpeed: D, panOnScrollMode: E, zoomOnDoubleClick: _, panOnDrag: N, defaultViewport: M, translateExtent: O, minZoom: F, maxZoom: v, preventScrolling: A, onSelectionContextMenu: L, noWheelClassName: z, noPanClassName: G, disableKeyboardA11y: R }) => {
4602
+ const H = le(Rg), q = tn(u), j = tn(m), k = j || N, I = j || S, P = q || f && k !== !0;
4603
+ return bg({ deleteKeyCode: a, multiSelectionKeyCode: p }), $.createElement(
4641
4604
  Sg,
4642
- { onMove: c, onMoveStart: u, onMoveEnd: l, onPaneContextMenu: s, elementsSelectable: x, zoomOnScroll: b, zoomOnPinch: C, panOnScroll: I, panOnScrollSpeed: D, panOnScrollMode: E, zoomOnDoubleClick: _, panOnDrag: !q && k, defaultViewport: M, translateExtent: O, minZoom: F, maxZoom: v, zoomActivationKeyCode: w, preventScrolling: A, noWheelClassName: z, noPanClassName: G },
4605
+ { onMove: c, onMoveStart: d, onMoveEnd: l, onPaneContextMenu: s, elementsSelectable: x, zoomOnScroll: b, zoomOnPinch: C, panOnScroll: I, panOnScrollSpeed: D, panOnScrollMode: E, zoomOnDoubleClick: _, panOnDrag: !q && k, defaultViewport: M, translateExtent: O, minZoom: F, maxZoom: v, zoomActivationKeyCode: w, preventScrolling: A, noWheelClassName: z, noPanClassName: G },
4643
4606
  $.createElement(
4644
4607
  _l,
4645
- { onSelectionStart: p, onSelectionEnd: y, onPaneClick: t, onPaneMouseEnter: n, onPaneMouseMove: r, onPaneMouseLeave: o, onPaneContextMenu: s, onPaneScroll: i, panOnDrag: k, isSelecting: !!P, selectionMode: h },
4608
+ { onSelectionStart: g, onSelectionEnd: y, onPaneClick: t, onPaneMouseEnter: n, onPaneMouseMove: r, onPaneMouseLeave: o, onPaneContextMenu: s, onPaneScroll: i, panOnDrag: k, isSelecting: !!P, selectionMode: h },
4646
4609
  e,
4647
4610
  H && $.createElement(Dg, { onSelectionContextMenu: L, noPanClassName: G, disableKeyboardA11y: R })
4648
4611
  )
@@ -4676,11 +4639,11 @@ const zg = ({ x: e, y: t, width: n, height: r, origin: o }) => !n || !r ? { x: e
4676
4639
  updateNodeDimensions: e.updateNodeDimensions,
4677
4640
  onError: e.onError
4678
4641
  }), Ll = (e) => {
4679
- const { nodesDraggable: t, nodesConnectable: n, nodesFocusable: r, elementsSelectable: o, updateNodeDimensions: s, onError: i } = le(Vg, he), a = $g(e.onlyRenderVisibleElements), c = Q(), u = Ne(() => {
4642
+ const { nodesDraggable: t, nodesConnectable: n, nodesFocusable: r, elementsSelectable: o, updateNodeDimensions: s, onError: i } = le(Vg, he), a = $g(e.onlyRenderVisibleElements), c = Q(), d = Ne(() => {
4680
4643
  if (typeof ResizeObserver > "u")
4681
4644
  return null;
4682
- const l = new ResizeObserver((d) => {
4683
- const f = d.map((h) => ({
4645
+ const l = new ResizeObserver((u) => {
4646
+ const f = u.map((h) => ({
4684
4647
  id: h.target.getAttribute("data-id"),
4685
4648
  nodeElement: h.target,
4686
4649
  forceUpdate: !0
@@ -4692,23 +4655,23 @@ const zg = ({ x: e, y: t, width: n, height: r, origin: o }) => !n || !r ? { x: e
4692
4655
  return oe(() => () => {
4693
4656
  c?.current?.disconnect();
4694
4657
  }, []), $.createElement("div", { className: "react-flow__nodes", style: Ko }, a.map((l) => {
4695
- let d = l.type || "default";
4696
- e.nodeTypes[d] || (i?.("003", Ie.error003(d)), d = "default");
4697
- const f = e.nodeTypes[d] || e.nodeTypes.default, h = !!(l.draggable || t && typeof l.draggable > "u"), p = !!(l.selectable || o && typeof l.selectable > "u"), y = !!(l.connectable || n && typeof l.connectable > "u"), g = !!(l.focusable || r && typeof l.focusable > "u"), m = e.nodeExtent ? Bo(l.positionAbsolute, e.nodeExtent) : l.positionAbsolute, w = m?.x ?? 0, x = m?.y ?? 0, b = zg({
4658
+ let u = l.type || "default";
4659
+ e.nodeTypes[u] || (i?.("003", Ie.error003(u)), u = "default");
4660
+ const f = e.nodeTypes[u] || e.nodeTypes.default, h = !!(l.draggable || t && typeof l.draggable > "u"), g = !!(l.selectable || o && typeof l.selectable > "u"), y = !!(l.connectable || n && typeof l.connectable > "u"), p = !!(l.focusable || r && typeof l.focusable > "u"), m = e.nodeExtent ? Bo(l.positionAbsolute, e.nodeExtent) : l.positionAbsolute, w = m?.x ?? 0, x = m?.y ?? 0, b = zg({
4698
4661
  x: w,
4699
4662
  y: x,
4700
4663
  width: l.width ?? 0,
4701
4664
  height: l.height ?? 0,
4702
4665
  origin: e.nodeOrigin
4703
4666
  });
4704
- return $.createElement(f, { key: l.id, id: l.id, className: l.className, style: l.style, type: d, data: l.data, sourcePosition: l.sourcePosition || X.Bottom, targetPosition: l.targetPosition || X.Top, hidden: l.hidden, xPos: w, yPos: x, xPosOrigin: b.x, yPosOrigin: b.y, selectNodesOnDrag: e.selectNodesOnDrag, onClick: e.onNodeClick, onMouseEnter: e.onNodeMouseEnter, onMouseMove: e.onNodeMouseMove, onMouseLeave: e.onNodeMouseLeave, onContextMenu: e.onNodeContextMenu, onDoubleClick: e.onNodeDoubleClick, selected: !!l.selected, isDraggable: h, isSelectable: p, isConnectable: y, isFocusable: g, resizeObserver: u, dragHandle: l.dragHandle, zIndex: l[ue]?.z ?? 0, isParent: !!l[ue]?.isParent, noDragClassName: e.noDragClassName, noPanClassName: e.noPanClassName, initialized: !!l.width && !!l.height, rfId: e.rfId, disableKeyboardA11y: e.disableKeyboardA11y, ariaLabel: l.ariaLabel, hasHandleBounds: !!l[ue]?.handleBounds });
4667
+ return $.createElement(f, { key: l.id, id: l.id, className: l.className, style: l.style, type: u, data: l.data, sourcePosition: l.sourcePosition || X.Bottom, targetPosition: l.targetPosition || X.Top, hidden: l.hidden, xPos: w, yPos: x, xPosOrigin: b.x, yPosOrigin: b.y, selectNodesOnDrag: e.selectNodesOnDrag, onClick: e.onNodeClick, onMouseEnter: e.onNodeMouseEnter, onMouseMove: e.onNodeMouseMove, onMouseLeave: e.onNodeMouseLeave, onContextMenu: e.onNodeContextMenu, onDoubleClick: e.onNodeDoubleClick, selected: !!l.selected, isDraggable: h, isSelectable: g, isConnectable: y, isFocusable: p, resizeObserver: d, dragHandle: l.dragHandle, zIndex: l[ue]?.z ?? 0, isParent: !!l[ue]?.isParent, noDragClassName: e.noDragClassName, noPanClassName: e.noPanClassName, initialized: !!l.width && !!l.height, rfId: e.rfId, disableKeyboardA11y: e.disableKeyboardA11y, ariaLabel: l.ariaLabel, hasHandleBounds: !!l[ue]?.handleBounds });
4705
4668
  }));
4706
4669
  };
4707
4670
  Ll.displayName = "NodeRenderer";
4708
4671
  var Hg = ae(Ll);
4709
4672
  const Bg = (e, t, n) => n === X.Left ? e - t : n === X.Right ? e + t : e, qg = (e, t, n) => n === X.Top ? e - t : n === X.Bottom ? e + t : e, es = "react-flow__edgeupdater", ts = ({ position: e, centerX: t, centerY: n, radius: r = 10, onMouseDown: o, onMouseEnter: s, onMouseOut: i, type: a }) => $.createElement("circle", { onMouseDown: o, onMouseEnter: s, onMouseOut: i, className: me([es, `${es}-${a}`]), cx: Bg(t, r, e), cy: qg(n, r, e), r, stroke: "transparent", fill: "transparent" }), Gg = () => !0;
4710
4673
  var Nt = (e) => {
4711
- const t = ({ id: n, className: r, type: o, data: s, onClick: i, onEdgeDoubleClick: a, selected: c, animated: u, label: l, labelStyle: d, labelShowBg: f, labelBgStyle: h, labelBgPadding: p, labelBgBorderRadius: y, style: g, source: m, target: w, sourceX: x, sourceY: b, targetX: C, targetY: S, sourcePosition: D, targetPosition: E, elementsSelectable: _, hidden: N, sourceHandleId: M, targetHandleId: O, onContextMenu: F, onMouseEnter: v, onMouseMove: A, onMouseLeave: L, reconnectRadius: z, onReconnect: G, onReconnectStart: R, onReconnectEnd: H, markerEnd: q, markerStart: j, rfId: k, ariaLabel: I, isFocusable: P, isReconnectable: B, pathOptions: V, interactionWidth: Y, disableKeyboardA11y: W }) => {
4674
+ const t = ({ id: n, className: r, type: o, data: s, onClick: i, onEdgeDoubleClick: a, selected: c, animated: d, label: l, labelStyle: u, labelShowBg: f, labelBgStyle: h, labelBgPadding: g, labelBgBorderRadius: y, style: p, source: m, target: w, sourceX: x, sourceY: b, targetX: C, targetY: S, sourcePosition: D, targetPosition: E, elementsSelectable: _, hidden: N, sourceHandleId: M, targetHandleId: O, onContextMenu: F, onMouseEnter: v, onMouseMove: A, onMouseLeave: L, reconnectRadius: z, onReconnect: G, onReconnectStart: R, onReconnectEnd: H, markerEnd: q, markerStart: j, rfId: k, ariaLabel: I, isFocusable: P, isReconnectable: B, pathOptions: V, interactionWidth: Y, disableKeyboardA11y: W }) => {
4712
4675
  const Z = Q(null), [ne, K] = re(!1), [ee, ce] = re(!1), se = pe(), ye = Ne(() => `url('#${_o(j, k)}')`, [j, k]), ie = Ne(() => `url('#${_o(q, k)}')`, [q, k]);
4713
4676
  if (N)
4714
4677
  return null;
@@ -4747,9 +4710,9 @@ var Nt = (e) => {
4747
4710
  "react-flow__edge",
4748
4711
  `react-flow__edge-${o}`,
4749
4712
  r,
4750
- { selected: c, animated: u, inactive: xt, updating: ne }
4713
+ { selected: c, animated: d, inactive: xt, updating: ne }
4751
4714
  ]), onClick: U, onDoubleClick: ve, onContextMenu: Fe, onMouseEnter: Pt, onMouseMove: yt, onMouseLeave: wt, onKeyDown: P ? $t : void 0, tabIndex: P ? 0 : void 0, role: P ? "button" : "img", "data-testid": `rf__edge-${n}`, "aria-label": I === null ? void 0 : I || `Edge from ${m} to ${w}`, "aria-describedby": P ? `${yl}-${k}` : void 0, ref: Z },
4752
- !ee && $.createElement(e, { id: n, source: m, target: w, selected: c, animated: u, label: l, labelStyle: d, labelShowBg: f, labelBgStyle: h, labelBgPadding: p, labelBgBorderRadius: y, data: s, style: g, sourceX: x, sourceY: b, targetX: C, targetY: S, sourcePosition: D, targetPosition: E, sourceHandleId: M, targetHandleId: O, markerStart: ye, markerEnd: ie, pathOptions: V, interactionWidth: Y }),
4715
+ !ee && $.createElement(e, { id: n, source: m, target: w, selected: c, animated: d, label: l, labelStyle: u, labelShowBg: f, labelBgStyle: h, labelBgPadding: g, labelBgBorderRadius: y, data: s, style: p, sourceX: x, sourceY: b, targetX: C, targetY: S, sourcePosition: D, targetPosition: E, sourceHandleId: M, targetHandleId: O, markerStart: ye, markerEnd: ie, pathOptions: V, interactionWidth: Y }),
4753
4716
  B && $.createElement(
4754
4717
  $.Fragment,
4755
4718
  null,
@@ -4811,20 +4774,20 @@ const jg = (e, t, n, r, o, s) => {
4811
4774
  };
4812
4775
  };
4813
4776
  function Wg({ sourcePos: e, targetPos: t, sourceWidth: n, sourceHeight: r, targetWidth: o, targetHeight: s, width: i, height: a, transform: c }) {
4814
- const u = {
4777
+ const d = {
4815
4778
  x: Math.min(e.x, t.x),
4816
4779
  y: Math.min(e.y, t.y),
4817
4780
  x2: Math.max(e.x + n, t.x + o),
4818
4781
  y2: Math.max(e.y + r, t.y + s)
4819
4782
  };
4820
- u.x === u.x2 && (u.x2 += 1), u.y === u.y2 && (u.y2 += 1);
4783
+ d.x === d.x2 && (d.x2 += 1), d.y === d.y2 && (d.y2 += 1);
4821
4784
  const l = Jt({
4822
4785
  x: (0 - c[0]) / c[2],
4823
4786
  y: (0 - c[1]) / c[2],
4824
4787
  width: i / c[2],
4825
4788
  height: a / c[2]
4826
- }), d = Math.max(0, Math.min(l.x2, u.x2) - Math.max(l.x, u.x)), f = Math.max(0, Math.min(l.y2, u.y2) - Math.max(l.y, u.y));
4827
- return Math.ceil(d * f) > 0;
4789
+ }), u = Math.max(0, Math.min(l.x2, d.x2) - Math.max(l.x, d.x)), f = Math.max(0, Math.min(l.y2, d.y2) - Math.max(l.y, d.y));
4790
+ return Math.ceil(u * f) > 0;
4828
4791
  }
4829
4792
  function os(e) {
4830
4793
  const t = e?.[ue]?.handleBounds || null, n = t && e?.width && e?.height && typeof e?.positionAbsolute?.x < "u" && typeof e?.positionAbsolute?.y < "u";
@@ -4844,12 +4807,12 @@ function Zg(e, t, n = !1) {
4844
4807
  let r = -1;
4845
4808
  const o = e.reduce((i, a) => {
4846
4809
  const c = Ce(a.zIndex);
4847
- let u = c ? a.zIndex : 0;
4810
+ let d = c ? a.zIndex : 0;
4848
4811
  if (n) {
4849
- const l = t.get(a.target), d = t.get(a.source), f = a.selected || l?.selected || d?.selected, h = Math.max(d?.[ue]?.z || 0, l?.[ue]?.z || 0, 1e3);
4850
- u = (c ? a.zIndex : 0) + (f ? h : 0);
4812
+ const l = t.get(a.target), u = t.get(a.source), f = a.selected || l?.selected || u?.selected, h = Math.max(u?.[ue]?.z || 0, l?.[ue]?.z || 0, 1e3);
4813
+ d = (c ? a.zIndex : 0) + (f ? h : 0);
4851
4814
  }
4852
- return i[u] ? i[u].push(a) : i[u] = [a], r = u > r ? u : r, i;
4815
+ return i[d] ? i[d].push(a) : i[d] = [a], r = d > r ? d : r, i;
4853
4816
  }, {}), s = Object.entries(o).map(([i, a]) => {
4854
4817
  const c = +i;
4855
4818
  return {
@@ -4927,7 +4890,7 @@ const rm = (e) => ({
4927
4890
  connectionMode: e.connectionMode,
4928
4891
  nodeInternals: e.nodeInternals,
4929
4892
  onError: e.onError
4930
- }), Ol = ({ defaultMarkerColor: e, onlyRenderVisibleElements: t, elevateEdgesOnSelect: n, rfId: r, edgeTypes: o, noPanClassName: s, onEdgeContextMenu: i, onEdgeMouseEnter: a, onEdgeMouseMove: c, onEdgeMouseLeave: u, onEdgeClick: l, onEdgeDoubleClick: d, onReconnect: f, onReconnectStart: h, onReconnectEnd: p, reconnectRadius: y, children: g, disableKeyboardA11y: m }) => {
4893
+ }), Ol = ({ defaultMarkerColor: e, onlyRenderVisibleElements: t, elevateEdgesOnSelect: n, rfId: r, edgeTypes: o, noPanClassName: s, onEdgeContextMenu: i, onEdgeMouseEnter: a, onEdgeMouseMove: c, onEdgeMouseLeave: d, onEdgeClick: l, onEdgeDoubleClick: u, onReconnect: f, onReconnectStart: h, onReconnectEnd: g, reconnectRadius: y, children: p, disableKeyboardA11y: m }) => {
4931
4894
  const { edgesFocusable: w, edgesUpdatable: x, elementsSelectable: b, width: C, height: S, connectionMode: D, nodeInternals: E, onError: _ } = le(rm, he), N = Ug(t, E, n);
4932
4895
  return C ? $.createElement(
4933
4896
  $.Fragment,
@@ -4946,10 +4909,10 @@ const rm = (e) => ({
4946
4909
  if (!I || !P)
4947
4910
  return _?.("008", Ie.error008(I, v)), null;
4948
4911
  const { sourceX: ne, sourceY: K, targetX: ee, targetY: ce } = jg(A, I, B, G, P, V);
4949
- return $.createElement(j, { key: v.id, id: v.id, className: me([v.className, s]), type: q, data: v.data, selected: !!v.selected, animated: !!v.animated, hidden: !!v.hidden, label: v.label, labelStyle: v.labelStyle, labelShowBg: v.labelShowBg, labelBgStyle: v.labelBgStyle, labelBgPadding: v.labelBgPadding, labelBgBorderRadius: v.labelBgBorderRadius, style: v.style, source: v.source, target: v.target, sourceHandleId: v.sourceHandle, targetHandleId: v.targetHandle, markerEnd: v.markerEnd, markerStart: v.markerStart, sourceX: ne, sourceY: K, targetX: ee, targetY: ce, sourcePosition: B, targetPosition: V, elementsSelectable: b, onContextMenu: i, onMouseEnter: a, onMouseMove: c, onMouseLeave: u, onClick: l, onEdgeDoubleClick: d, onReconnect: f, onReconnectStart: h, onReconnectEnd: p, reconnectRadius: y, rfId: r, ariaLabel: v.ariaLabel, isFocusable: Y, isReconnectable: Z, pathOptions: "pathOptions" in v ? v.pathOptions : void 0, interactionWidth: v.interactionWidth, disableKeyboardA11y: m });
4912
+ return $.createElement(j, { key: v.id, id: v.id, className: me([v.className, s]), type: q, data: v.data, selected: !!v.selected, animated: !!v.animated, hidden: !!v.hidden, label: v.label, labelStyle: v.labelStyle, labelShowBg: v.labelShowBg, labelBgStyle: v.labelBgStyle, labelBgPadding: v.labelBgPadding, labelBgBorderRadius: v.labelBgBorderRadius, style: v.style, source: v.source, target: v.target, sourceHandleId: v.sourceHandle, targetHandleId: v.targetHandle, markerEnd: v.markerEnd, markerStart: v.markerStart, sourceX: ne, sourceY: K, targetX: ee, targetY: ce, sourcePosition: B, targetPosition: V, elementsSelectable: b, onContextMenu: i, onMouseEnter: a, onMouseMove: c, onMouseLeave: d, onClick: l, onEdgeDoubleClick: u, onReconnect: f, onReconnectStart: h, onReconnectEnd: g, reconnectRadius: y, rfId: r, ariaLabel: v.ariaLabel, isFocusable: Y, isReconnectable: Z, pathOptions: "pathOptions" in v ? v.pathOptions : void 0, interactionWidth: v.interactionWidth, disableKeyboardA11y: m });
4950
4913
  }))
4951
4914
  )),
4952
- g
4915
+ p
4953
4916
  ) : null;
4954
4917
  };
4955
4918
  Ol.displayName = "EdgeRenderer";
@@ -4971,34 +4934,34 @@ const lm = {
4971
4934
  [X.Top]: X.Bottom,
4972
4935
  [X.Bottom]: X.Top
4973
4936
  }, Al = ({ nodeId: e, handleType: t, style: n, type: r = Ue.Bezier, CustomComponent: o, connectionStatus: s }) => {
4974
- const { fromNode: i, handleId: a, toX: c, toY: u, connectionMode: l } = le(de((S) => ({
4937
+ const { fromNode: i, handleId: a, toX: c, toY: d, connectionMode: l } = le(de((S) => ({
4975
4938
  fromNode: S.nodeInternals.get(e),
4976
4939
  handleId: S.connectionHandleId,
4977
4940
  toX: (S.connectionPosition.x - S.transform[0]) / S.transform[2],
4978
4941
  toY: (S.connectionPosition.y - S.transform[1]) / S.transform[2],
4979
4942
  connectionMode: S.connectionMode
4980
- }), [e]), he), d = i?.[ue]?.handleBounds;
4981
- let f = d?.[t];
4982
- if (l === gt.Loose && (f = f || d?.[t === "source" ? "target" : "source"]), !i || !f)
4943
+ }), [e]), he), u = i?.[ue]?.handleBounds;
4944
+ let f = u?.[t];
4945
+ if (l === gt.Loose && (f = f || u?.[t === "source" ? "target" : "source"]), !i || !f)
4983
4946
  return null;
4984
- const h = a ? f.find((S) => S.id === a) : f[0], p = h ? h.x + h.width / 2 : (i.width ?? 0) / 2, y = h ? h.y + h.height / 2 : i.height ?? 0, g = (i.positionAbsolute?.x ?? 0) + p, m = (i.positionAbsolute?.y ?? 0) + y, w = h?.position, x = w ? lm[w] : null;
4947
+ const h = a ? f.find((S) => S.id === a) : f[0], g = h ? h.x + h.width / 2 : (i.width ?? 0) / 2, y = h ? h.y + h.height / 2 : i.height ?? 0, p = (i.positionAbsolute?.x ?? 0) + g, m = (i.positionAbsolute?.y ?? 0) + y, w = h?.position, x = w ? lm[w] : null;
4985
4948
  if (!w || !x)
4986
4949
  return null;
4987
4950
  if (o)
4988
- return $.createElement(o, { connectionLineType: r, connectionLineStyle: n, fromNode: i, fromHandle: h, fromX: g, fromY: m, toX: c, toY: u, fromPosition: w, toPosition: x, connectionStatus: s });
4951
+ return $.createElement(o, { connectionLineType: r, connectionLineStyle: n, fromNode: i, fromHandle: h, fromX: p, fromY: m, toX: c, toY: d, fromPosition: w, toPosition: x, connectionStatus: s });
4989
4952
  let b = "";
4990
4953
  const C = {
4991
- sourceX: g,
4954
+ sourceX: p,
4992
4955
  sourceY: m,
4993
4956
  sourcePosition: w,
4994
4957
  targetX: c,
4995
- targetY: u,
4958
+ targetY: d,
4996
4959
  targetPosition: x
4997
4960
  };
4998
4961
  return r === Ue.Bezier ? [b] = jo(C) : r === Ue.Step ? [b] = Eo({
4999
4962
  ...C,
5000
4963
  borderRadius: 0
5001
- }) : r === Ue.SmoothStep ? [b] = Eo(C) : r === Ue.SimpleBezier ? [b] = tl(C) : b = `M${g},${m} ${c},${u}`, $.createElement("path", { d: b, fill: "none", className: "react-flow__connection-path", style: n });
4964
+ }) : r === Ue.SmoothStep ? [b] = Eo(C) : r === Ue.SimpleBezier ? [b] = tl(C) : b = `M${p},${m} ${c},${d}`, $.createElement("path", { d: b, fill: "none", className: "react-flow__connection-path", style: n });
5002
4965
  };
5003
4966
  Al.displayName = "ConnectionLine";
5004
4967
  const cm = (e) => ({
@@ -5010,14 +4973,14 @@ const cm = (e) => ({
5010
4973
  height: e.height
5011
4974
  });
5012
4975
  function um({ containerStyle: e, style: t, type: n, component: r }) {
5013
- const { nodeId: o, handleType: s, nodesConnectable: i, width: a, height: c, connectionStatus: u } = le(cm, he);
4976
+ const { nodeId: o, handleType: s, nodesConnectable: i, width: a, height: c, connectionStatus: d } = le(cm, he);
5014
4977
  return !(o && s && a && i) ? null : $.createElement(
5015
4978
  "svg",
5016
4979
  { style: e, width: a, height: c, className: "react-flow__edges react-flow__connectionline react-flow__container" },
5017
4980
  $.createElement(
5018
4981
  "g",
5019
- { className: me(["react-flow__connection", u]) },
5020
- $.createElement(Al, { nodeId: o, handleType: s, style: t, type: n, CustomComponent: r, connectionStatus: u })
4982
+ { className: me(["react-flow__connection", d]) },
4983
+ $.createElement(Al, { nodeId: o, handleType: s, style: t, type: n, CustomComponent: r, connectionStatus: d })
5021
4984
  )
5022
4985
  );
5023
4986
  }
@@ -5031,21 +4994,21 @@ function ss(e, t) {
5031
4994
  return t(e);
5032
4995
  }, [e]);
5033
4996
  }
5034
- const Tl = ({ nodeTypes: e, edgeTypes: t, onMove: n, onMoveStart: r, onMoveEnd: o, onInit: s, onNodeClick: i, onEdgeClick: a, onNodeDoubleClick: c, onEdgeDoubleClick: u, onNodeMouseEnter: l, onNodeMouseMove: d, onNodeMouseLeave: f, onNodeContextMenu: h, onSelectionContextMenu: p, onSelectionStart: y, onSelectionEnd: g, connectionLineType: m, connectionLineStyle: w, connectionLineComponent: x, connectionLineContainerStyle: b, selectionKeyCode: C, selectionOnDrag: S, selectionMode: D, multiSelectionKeyCode: E, panActivationKeyCode: _, zoomActivationKeyCode: N, deleteKeyCode: M, onlyRenderVisibleElements: O, elementsSelectable: F, selectNodesOnDrag: v, defaultViewport: A, translateExtent: L, minZoom: z, maxZoom: G, preventScrolling: R, defaultMarkerColor: H, zoomOnScroll: q, zoomOnPinch: j, panOnScroll: k, panOnScrollSpeed: I, panOnScrollMode: P, zoomOnDoubleClick: B, panOnDrag: V, onPaneClick: Y, onPaneMouseEnter: W, onPaneMouseMove: Z, onPaneMouseLeave: ne, onPaneScroll: K, onPaneContextMenu: ee, onEdgeContextMenu: ce, onEdgeMouseEnter: se, onEdgeMouseMove: ye, onEdgeMouseLeave: ie, onReconnect: U, onReconnectStart: ve, onReconnectEnd: Fe, reconnectRadius: Pt, noDragClassName: yt, noWheelClassName: wt, noPanClassName: ze, elevateEdgesOnSelect: vt, disableKeyboardA11y: tt, nodeOrigin: nt, nodeExtent: bt, rfId: xt }) => {
4997
+ const Tl = ({ nodeTypes: e, edgeTypes: t, onMove: n, onMoveStart: r, onMoveEnd: o, onInit: s, onNodeClick: i, onEdgeClick: a, onNodeDoubleClick: c, onEdgeDoubleClick: d, onNodeMouseEnter: l, onNodeMouseMove: u, onNodeMouseLeave: f, onNodeContextMenu: h, onSelectionContextMenu: g, onSelectionStart: y, onSelectionEnd: p, connectionLineType: m, connectionLineStyle: w, connectionLineComponent: x, connectionLineContainerStyle: b, selectionKeyCode: C, selectionOnDrag: S, selectionMode: D, multiSelectionKeyCode: E, panActivationKeyCode: _, zoomActivationKeyCode: N, deleteKeyCode: M, onlyRenderVisibleElements: O, elementsSelectable: F, selectNodesOnDrag: v, defaultViewport: A, translateExtent: L, minZoom: z, maxZoom: G, preventScrolling: R, defaultMarkerColor: H, zoomOnScroll: q, zoomOnPinch: j, panOnScroll: k, panOnScrollSpeed: I, panOnScrollMode: P, zoomOnDoubleClick: B, panOnDrag: V, onPaneClick: Y, onPaneMouseEnter: W, onPaneMouseMove: Z, onPaneMouseLeave: ne, onPaneScroll: K, onPaneContextMenu: ee, onEdgeContextMenu: ce, onEdgeMouseEnter: se, onEdgeMouseMove: ye, onEdgeMouseLeave: ie, onReconnect: U, onReconnectStart: ve, onReconnectEnd: Fe, reconnectRadius: Pt, noDragClassName: yt, noWheelClassName: wt, noPanClassName: ze, elevateEdgesOnSelect: vt, disableKeyboardA11y: tt, nodeOrigin: nt, nodeExtent: bt, rfId: xt }) => {
5035
4998
  const $t = ss(e, Fg), we = ss(t, Yg);
5036
4999
  return am(s), $.createElement(
5037
5000
  Pg,
5038
- { onPaneClick: Y, onPaneMouseEnter: W, onPaneMouseMove: Z, onPaneMouseLeave: ne, onPaneContextMenu: ee, onPaneScroll: K, deleteKeyCode: M, selectionKeyCode: C, selectionOnDrag: S, selectionMode: D, onSelectionStart: y, onSelectionEnd: g, multiSelectionKeyCode: E, panActivationKeyCode: _, zoomActivationKeyCode: N, elementsSelectable: F, onMove: n, onMoveStart: r, onMoveEnd: o, zoomOnScroll: q, zoomOnPinch: j, zoomOnDoubleClick: B, panOnScroll: k, panOnScrollSpeed: I, panOnScrollMode: P, panOnDrag: V, defaultViewport: A, translateExtent: L, minZoom: z, maxZoom: G, onSelectionContextMenu: p, preventScrolling: R, noDragClassName: yt, noWheelClassName: wt, noPanClassName: ze, disableKeyboardA11y: tt },
5001
+ { onPaneClick: Y, onPaneMouseEnter: W, onPaneMouseMove: Z, onPaneMouseLeave: ne, onPaneContextMenu: ee, onPaneScroll: K, deleteKeyCode: M, selectionKeyCode: C, selectionOnDrag: S, selectionMode: D, onSelectionStart: y, onSelectionEnd: p, multiSelectionKeyCode: E, panActivationKeyCode: _, zoomActivationKeyCode: N, elementsSelectable: F, onMove: n, onMoveStart: r, onMoveEnd: o, zoomOnScroll: q, zoomOnPinch: j, zoomOnDoubleClick: B, panOnScroll: k, panOnScrollSpeed: I, panOnScrollMode: P, panOnDrag: V, defaultViewport: A, translateExtent: L, minZoom: z, maxZoom: G, onSelectionContextMenu: g, preventScrolling: R, noDragClassName: yt, noWheelClassName: wt, noPanClassName: ze, disableKeyboardA11y: tt },
5039
5002
  $.createElement(
5040
5003
  sm,
5041
5004
  null,
5042
5005
  $.createElement(
5043
5006
  om,
5044
- { edgeTypes: we, onEdgeClick: a, onEdgeDoubleClick: u, onlyRenderVisibleElements: O, onEdgeContextMenu: ce, onEdgeMouseEnter: se, onEdgeMouseMove: ye, onEdgeMouseLeave: ie, onReconnect: U, onReconnectStart: ve, onReconnectEnd: Fe, reconnectRadius: Pt, defaultMarkerColor: H, noPanClassName: ze, elevateEdgesOnSelect: !!vt, disableKeyboardA11y: tt, rfId: xt },
5007
+ { edgeTypes: we, onEdgeClick: a, onEdgeDoubleClick: d, onlyRenderVisibleElements: O, onEdgeContextMenu: ce, onEdgeMouseEnter: se, onEdgeMouseMove: ye, onEdgeMouseLeave: ie, onReconnect: U, onReconnectStart: ve, onReconnectEnd: Fe, reconnectRadius: Pt, defaultMarkerColor: H, noPanClassName: ze, elevateEdgesOnSelect: !!vt, disableKeyboardA11y: tt, rfId: xt },
5045
5008
  $.createElement(um, { style: w, type: m, component: x, containerStyle: b })
5046
5009
  ),
5047
5010
  $.createElement("div", { className: "react-flow__edgelabel-renderer" }),
5048
- $.createElement(Hg, { nodeTypes: $t, onNodeClick: i, onNodeDoubleClick: c, onNodeMouseEnter: l, onNodeMouseMove: d, onNodeMouseLeave: f, onNodeContextMenu: h, selectNodesOnDrag: v, onlyRenderVisibleElements: O, noPanClassName: ze, noDragClassName: yt, disableKeyboardA11y: tt, nodeOrigin: nt, nodeExtent: bt, rfId: xt })
5011
+ $.createElement(Hg, { nodeTypes: $t, onNodeClick: i, onNodeDoubleClick: c, onNodeMouseEnter: l, onNodeMouseMove: u, onNodeMouseLeave: f, onNodeContextMenu: h, selectNodesOnDrag: v, onlyRenderVisibleElements: O, noPanClassName: ze, noDragClassName: yt, disableKeyboardA11y: tt, nodeOrigin: nt, nodeExtent: bt, rfId: xt })
5049
5012
  )
5050
5013
  );
5051
5014
  };
@@ -5126,11 +5089,11 @@ const ko = [
5126
5089
  e({ nodeInternals: i, edges: s ? r : [], hasDefaultNodes: o, hasDefaultEdges: s });
5127
5090
  },
5128
5091
  updateNodeDimensions: (n) => {
5129
- const { onNodesChange: r, nodeInternals: o, fitViewOnInit: s, fitViewOnInitDone: i, fitViewOnInitOptions: a, domNode: c, nodeOrigin: u } = t(), l = c?.querySelector(".react-flow__viewport");
5092
+ const { onNodesChange: r, nodeInternals: o, fitViewOnInit: s, fitViewOnInitDone: i, fitViewOnInitOptions: a, domNode: c, nodeOrigin: d } = t(), l = c?.querySelector(".react-flow__viewport");
5130
5093
  if (!l)
5131
5094
  return;
5132
- const d = window.getComputedStyle(l), { m22: f } = new window.DOMMatrixReadOnly(d.transform), h = n.reduce((y, g) => {
5133
- const m = o.get(g.id);
5095
+ const u = window.getComputedStyle(l), { m22: f } = new window.DOMMatrixReadOnly(u.transform), h = n.reduce((y, p) => {
5096
+ const m = o.get(p.id);
5134
5097
  if (m?.hidden)
5135
5098
  o.set(m.id, {
5136
5099
  ...m,
@@ -5142,14 +5105,14 @@ const ko = [
5142
5105
  }
5143
5106
  });
5144
5107
  else if (m) {
5145
- const w = Ho(g.nodeElement);
5146
- !!(w.width && w.height && (m.width !== w.width || m.height !== w.height || g.forceUpdate)) && (o.set(m.id, {
5108
+ const w = Ho(p.nodeElement);
5109
+ w.width && w.height && (m.width !== w.width || m.height !== w.height || p.forceUpdate) && (o.set(m.id, {
5147
5110
  ...m,
5148
5111
  [ue]: {
5149
5112
  ...m[ue],
5150
5113
  handleBounds: {
5151
- source: Ji(".source", g.nodeElement, f, u),
5152
- target: Ji(".target", g.nodeElement, f, u)
5114
+ source: Ji(".source", p.nodeElement, f, d),
5115
+ target: Ji(".target", p.nodeElement, f, d)
5153
5116
  }
5154
5117
  },
5155
5118
  ...w
@@ -5161,9 +5124,9 @@ const ko = [
5161
5124
  }
5162
5125
  return y;
5163
5126
  }, []);
5164
- vl(o, u);
5165
- const p = i || s && !i && bl(t, { initial: !0, ...a });
5166
- e({ nodeInternals: new Map(o), fitViewOnInitDone: p }), h?.length > 0 && r?.(h);
5127
+ vl(o, d);
5128
+ const g = i || s && !i && bl(t, { initial: !0, ...a });
5129
+ e({ nodeInternals: new Map(o), fitViewOnInitDone: g }), h?.length > 0 && r?.(h);
5167
5130
  },
5168
5131
  updateNodePositions: (n, r = !0, o = !1) => {
5169
5132
  const { triggerNodeChanges: s } = t(), i = n.map((a) => {
@@ -5180,7 +5143,7 @@ const ko = [
5180
5143
  const { onNodesChange: r, nodeInternals: o, hasDefaultNodes: s, nodeOrigin: i, getNodes: a, elevateNodesOnSelect: c } = t();
5181
5144
  if (n?.length) {
5182
5145
  if (s) {
5183
- const u = El(n, a()), l = dr(u, o, i, c);
5146
+ const d = El(n, a()), l = dr(d, o, i, c);
5184
5147
  e({ nodeInternals: l });
5185
5148
  }
5186
5149
  r?.(n);
@@ -5207,10 +5170,10 @@ const ko = [
5207
5170
  });
5208
5171
  },
5209
5172
  unselectNodesAndEdges: ({ nodes: n, edges: r } = {}) => {
5210
- const { edges: o, getNodes: s } = t(), i = n || s(), a = r || o, c = i.map((l) => (l.selected = !1, Ze(l.id, !1))), u = a.map((l) => Ze(l.id, !1));
5173
+ const { edges: o, getNodes: s } = t(), i = n || s(), a = r || o, c = i.map((l) => (l.selected = !1, Ze(l.id, !1))), d = a.map((l) => Ze(l.id, !1));
5211
5174
  wn({
5212
5175
  changedNodes: c,
5213
- changedEdges: u,
5176
+ changedEdges: d,
5214
5177
  get: t,
5215
5178
  set: e
5216
5179
  });
@@ -5248,11 +5211,11 @@ const ko = [
5248
5211
  const { transform: r, width: o, height: s, d3Zoom: i, d3Selection: a, translateExtent: c } = t();
5249
5212
  if (!i || !a || !n.x && !n.y)
5250
5213
  return !1;
5251
- const u = qe.translate(r[0] + n.x, r[1] + n.y).scale(r[2]), l = [
5214
+ const d = qe.translate(r[0] + n.x, r[1] + n.y).scale(r[2]), l = [
5252
5215
  [0, 0],
5253
5216
  [o, s]
5254
- ], d = i?.constrain()(u, l, c);
5255
- return i.transform(a, d), r[0] !== d.x || r[1] !== d.y || r[2] !== d.k;
5217
+ ], u = i?.constrain()(d, l, c);
5218
+ return i.transform(a, u), r[0] !== u.x || r[1] !== u.y || r[2] !== u.k;
5256
5219
  },
5257
5220
  cancelConnection: () => e({
5258
5221
  connectionNodeId: je.connectionNodeId,
@@ -5287,7 +5250,7 @@ const hm = {
5287
5250
  overflow: "hidden",
5288
5251
  position: "relative",
5289
5252
  zIndex: 0
5290
- }, Pl = ua(({ nodes: e, edges: t, defaultNodes: n, defaultEdges: r, className: o, nodeTypes: s = hm, edgeTypes: i = pm, onNodeClick: a, onEdgeClick: c, onInit: u, onMove: l, onMoveStart: d, onMoveEnd: f, onConnect: h, onConnectStart: p, onConnectEnd: y, onClickConnectStart: g, onClickConnectEnd: m, onNodeMouseEnter: w, onNodeMouseMove: x, onNodeMouseLeave: b, onNodeContextMenu: C, onNodeDoubleClick: S, onNodeDragStart: D, onNodeDrag: E, onNodeDragStop: _, onNodesDelete: N, onEdgesDelete: M, onSelectionChange: O, onSelectionDragStart: F, onSelectionDrag: v, onSelectionDragStop: A, onSelectionContextMenu: L, onSelectionStart: z, onSelectionEnd: G, connectionMode: R = gt.Strict, connectionLineType: H = Ue.Bezier, connectionLineStyle: q, connectionLineComponent: j, connectionLineContainerStyle: k, deleteKeyCode: I = "Backspace", selectionKeyCode: P = "Shift", selectionOnDrag: B = !1, selectionMode: V = en.Full, panActivationKeyCode: Y = "Space", multiSelectionKeyCode: W = Dn() ? "Meta" : "Control", zoomActivationKeyCode: Z = Dn() ? "Meta" : "Control", snapToGrid: ne = !1, snapGrid: K = mm, onlyRenderVisibleElements: ee = !1, selectNodesOnDrag: ce = !0, nodesDraggable: se, nodesConnectable: ye, nodesFocusable: ie, nodeOrigin: U = gm, edgesFocusable: ve, edgesUpdatable: Fe, elementsSelectable: Pt, defaultViewport: yt = ym, minZoom: wt = 0.5, maxZoom: ze = 2, translateExtent: vt = ko, preventScrolling: tt = !0, nodeExtent: nt, defaultMarkerColor: bt = "#b1b1b7", zoomOnScroll: xt = !0, zoomOnPinch: $t = !0, panOnScroll: we = !1, panOnScrollSpeed: Te = 0.5, panOnScrollMode: rt = ut.Free, zoomOnDoubleClick: ot = !0, panOnDrag: Et = !0, onPaneClick: De, onPaneMouseEnter: it, onPaneMouseMove: Kn, onPaneMouseLeave: Qn, onPaneScroll: Ft, onPaneContextMenu: Jn, children: ni, onEdgeContextMenu: st, onEdgeDoubleClick: Ql, onEdgeMouseEnter: Jl, onEdgeMouseMove: ec, onEdgeMouseLeave: tc, onEdgeUpdate: nc, onEdgeUpdateStart: rc, onEdgeUpdateEnd: oc, onReconnect: ic, onReconnectStart: sc, onReconnectEnd: ac, reconnectRadius: lc = 10, edgeUpdaterRadius: cc = 10, onNodesChange: uc, onEdgesChange: dc, noDragClassName: fc = "nodrag", noWheelClassName: hc = "nowheel", noPanClassName: ri = "nopan", fitView: pc = !1, fitViewOptions: gc, connectOnClick: mc = !0, attributionPosition: yc, proOptions: wc, defaultEdgeOptions: vc, elevateNodesOnSelect: bc = !0, elevateEdgesOnSelect: xc = !1, disableKeyboardA11y: oi = !1, autoPanOnConnect: Ec = !0, autoPanOnNodeDrag: _c = !0, connectionRadius: Sc = 20, isValidConnection: Cc, onError: Nc, style: kc, id: ii, nodeDragThreshold: Mc, ...Lc }, Ic) => {
5253
+ }, Pl = ua(({ nodes: e, edges: t, defaultNodes: n, defaultEdges: r, className: o, nodeTypes: s = hm, edgeTypes: i = pm, onNodeClick: a, onEdgeClick: c, onInit: d, onMove: l, onMoveStart: u, onMoveEnd: f, onConnect: h, onConnectStart: g, onConnectEnd: y, onClickConnectStart: p, onClickConnectEnd: m, onNodeMouseEnter: w, onNodeMouseMove: x, onNodeMouseLeave: b, onNodeContextMenu: C, onNodeDoubleClick: S, onNodeDragStart: D, onNodeDrag: E, onNodeDragStop: _, onNodesDelete: N, onEdgesDelete: M, onSelectionChange: O, onSelectionDragStart: F, onSelectionDrag: v, onSelectionDragStop: A, onSelectionContextMenu: L, onSelectionStart: z, onSelectionEnd: G, connectionMode: R = gt.Strict, connectionLineType: H = Ue.Bezier, connectionLineStyle: q, connectionLineComponent: j, connectionLineContainerStyle: k, deleteKeyCode: I = "Backspace", selectionKeyCode: P = "Shift", selectionOnDrag: B = !1, selectionMode: V = en.Full, panActivationKeyCode: Y = "Space", multiSelectionKeyCode: W = Dn() ? "Meta" : "Control", zoomActivationKeyCode: Z = Dn() ? "Meta" : "Control", snapToGrid: ne = !1, snapGrid: K = mm, onlyRenderVisibleElements: ee = !1, selectNodesOnDrag: ce = !0, nodesDraggable: se, nodesConnectable: ye, nodesFocusable: ie, nodeOrigin: U = gm, edgesFocusable: ve, edgesUpdatable: Fe, elementsSelectable: Pt, defaultViewport: yt = ym, minZoom: wt = 0.5, maxZoom: ze = 2, translateExtent: vt = ko, preventScrolling: tt = !0, nodeExtent: nt, defaultMarkerColor: bt = "#b1b1b7", zoomOnScroll: xt = !0, zoomOnPinch: $t = !0, panOnScroll: we = !1, panOnScrollSpeed: Te = 0.5, panOnScrollMode: rt = ut.Free, zoomOnDoubleClick: ot = !0, panOnDrag: Et = !0, onPaneClick: De, onPaneMouseEnter: it, onPaneMouseMove: Kn, onPaneMouseLeave: Qn, onPaneScroll: Ft, onPaneContextMenu: Jn, children: ni, onEdgeContextMenu: st, onEdgeDoubleClick: Ql, onEdgeMouseEnter: Jl, onEdgeMouseMove: ec, onEdgeMouseLeave: tc, onEdgeUpdate: nc, onEdgeUpdateStart: rc, onEdgeUpdateEnd: oc, onReconnect: ic, onReconnectStart: sc, onReconnectEnd: ac, reconnectRadius: lc = 10, edgeUpdaterRadius: cc = 10, onNodesChange: uc, onEdgesChange: dc, noDragClassName: fc = "nodrag", noWheelClassName: hc = "nowheel", noPanClassName: ri = "nopan", fitView: pc = !1, fitViewOptions: gc, connectOnClick: mc = !0, attributionPosition: yc, proOptions: wc, defaultEdgeOptions: vc, elevateNodesOnSelect: bc = !0, elevateEdgesOnSelect: xc = !1, disableKeyboardA11y: oi = !1, autoPanOnConnect: Ec = !0, autoPanOnNodeDrag: _c = !0, connectionRadius: Sc = 20, isValidConnection: Cc, onError: Nc, style: kc, id: ii, nodeDragThreshold: Mc, ...Lc }, Ic) => {
5291
5254
  const er = ii || "1";
5292
5255
  return $.createElement(
5293
5256
  "div",
@@ -5295,8 +5258,8 @@ const hm = {
5295
5258
  $.createElement(
5296
5259
  Rl,
5297
5260
  null,
5298
- $.createElement(dm, { onInit: u, onMove: l, onMoveStart: d, onMoveEnd: f, onNodeClick: a, onEdgeClick: c, onNodeMouseEnter: w, onNodeMouseMove: x, onNodeMouseLeave: b, onNodeContextMenu: C, onNodeDoubleClick: S, nodeTypes: s, edgeTypes: i, connectionLineType: H, connectionLineStyle: q, connectionLineComponent: j, connectionLineContainerStyle: k, selectionKeyCode: P, selectionOnDrag: B, selectionMode: V, deleteKeyCode: I, multiSelectionKeyCode: W, panActivationKeyCode: Y, zoomActivationKeyCode: Z, onlyRenderVisibleElements: ee, selectNodesOnDrag: ce, defaultViewport: yt, translateExtent: vt, minZoom: wt, maxZoom: ze, preventScrolling: tt, zoomOnScroll: xt, zoomOnPinch: $t, zoomOnDoubleClick: ot, panOnScroll: we, panOnScrollSpeed: Te, panOnScrollMode: rt, panOnDrag: Et, onPaneClick: De, onPaneMouseEnter: it, onPaneMouseMove: Kn, onPaneMouseLeave: Qn, onPaneScroll: Ft, onPaneContextMenu: Jn, onSelectionContextMenu: L, onSelectionStart: z, onSelectionEnd: G, onEdgeContextMenu: st, onEdgeDoubleClick: Ql, onEdgeMouseEnter: Jl, onEdgeMouseMove: ec, onEdgeMouseLeave: tc, onReconnect: ic ?? nc, onReconnectStart: sc ?? rc, onReconnectEnd: ac ?? oc, reconnectRadius: lc ?? cc, defaultMarkerColor: bt, noDragClassName: fc, noWheelClassName: hc, noPanClassName: ri, elevateEdgesOnSelect: xc, rfId: er, disableKeyboardA11y: oi, nodeOrigin: U, nodeExtent: nt }),
5299
- $.createElement(lg, { nodes: e, edges: t, defaultNodes: n, defaultEdges: r, onConnect: h, onConnectStart: p, onConnectEnd: y, onClickConnectStart: g, onClickConnectEnd: m, nodesDraggable: se, nodesConnectable: ye, nodesFocusable: ie, edgesFocusable: ve, edgesUpdatable: Fe, elementsSelectable: Pt, elevateNodesOnSelect: bc, minZoom: wt, maxZoom: ze, nodeExtent: nt, onNodesChange: uc, onEdgesChange: dc, snapToGrid: ne, snapGrid: K, connectionMode: R, translateExtent: vt, connectOnClick: mc, defaultEdgeOptions: vc, fitView: pc, fitViewOptions: gc, onNodesDelete: N, onEdgesDelete: M, onNodeDragStart: D, onNodeDrag: E, onNodeDragStop: _, onSelectionDrag: v, onSelectionDragStart: F, onSelectionDragStop: A, noPanClassName: ri, nodeOrigin: U, rfId: er, autoPanOnConnect: Ec, autoPanOnNodeDrag: _c, onError: Nc, connectionRadius: Sc, isValidConnection: Cc, nodeDragThreshold: Mc }),
5261
+ $.createElement(dm, { onInit: d, onMove: l, onMoveStart: u, onMoveEnd: f, onNodeClick: a, onEdgeClick: c, onNodeMouseEnter: w, onNodeMouseMove: x, onNodeMouseLeave: b, onNodeContextMenu: C, onNodeDoubleClick: S, nodeTypes: s, edgeTypes: i, connectionLineType: H, connectionLineStyle: q, connectionLineComponent: j, connectionLineContainerStyle: k, selectionKeyCode: P, selectionOnDrag: B, selectionMode: V, deleteKeyCode: I, multiSelectionKeyCode: W, panActivationKeyCode: Y, zoomActivationKeyCode: Z, onlyRenderVisibleElements: ee, selectNodesOnDrag: ce, defaultViewport: yt, translateExtent: vt, minZoom: wt, maxZoom: ze, preventScrolling: tt, zoomOnScroll: xt, zoomOnPinch: $t, zoomOnDoubleClick: ot, panOnScroll: we, panOnScrollSpeed: Te, panOnScrollMode: rt, panOnDrag: Et, onPaneClick: De, onPaneMouseEnter: it, onPaneMouseMove: Kn, onPaneMouseLeave: Qn, onPaneScroll: Ft, onPaneContextMenu: Jn, onSelectionContextMenu: L, onSelectionStart: z, onSelectionEnd: G, onEdgeContextMenu: st, onEdgeDoubleClick: Ql, onEdgeMouseEnter: Jl, onEdgeMouseMove: ec, onEdgeMouseLeave: tc, onReconnect: ic ?? nc, onReconnectStart: sc ?? rc, onReconnectEnd: ac ?? oc, reconnectRadius: lc ?? cc, defaultMarkerColor: bt, noDragClassName: fc, noWheelClassName: hc, noPanClassName: ri, elevateEdgesOnSelect: xc, rfId: er, disableKeyboardA11y: oi, nodeOrigin: U, nodeExtent: nt }),
5262
+ $.createElement(lg, { nodes: e, edges: t, defaultNodes: n, defaultEdges: r, onConnect: h, onConnectStart: g, onConnectEnd: y, onClickConnectStart: p, onClickConnectEnd: m, nodesDraggable: se, nodesConnectable: ye, nodesFocusable: ie, edgesFocusable: ve, edgesUpdatable: Fe, elementsSelectable: Pt, elevateNodesOnSelect: bc, minZoom: wt, maxZoom: ze, nodeExtent: nt, onNodesChange: uc, onEdgesChange: dc, snapToGrid: ne, snapGrid: K, connectionMode: R, translateExtent: vt, connectOnClick: mc, defaultEdgeOptions: vc, fitView: pc, fitViewOptions: gc, onNodesDelete: N, onEdgesDelete: M, onNodeDragStart: D, onNodeDrag: E, onNodeDragStop: _, onSelectionDrag: v, onSelectionDragStart: F, onSelectionDragStop: A, noPanClassName: ri, nodeOrigin: U, rfId: er, autoPanOnConnect: Ec, autoPanOnNodeDrag: _c, onError: Nc, connectionRadius: Sc, isValidConnection: Cc, nodeDragThreshold: Mc }),
5300
5263
  $.createElement(sg, { onSelectionChange: O }),
5301
5264
  ni,
5302
5265
  $.createElement(Dp, { proOptions: wc, position: yc }),
@@ -5311,9 +5274,9 @@ function $l(e) {
5311
5274
  return [n, r, o];
5312
5275
  };
5313
5276
  }
5314
- const vm = $l(El), bm = $l(kg), Fl = ({ id: e, x: t, y: n, width: r, height: o, style: s, color: i, strokeColor: a, strokeWidth: c, className: u, borderRadius: l, shapeRendering: d, onClick: f, selected: h }) => {
5315
- const { background: p, backgroundColor: y } = s || {}, g = i || p || y;
5316
- return $.createElement("rect", { className: me(["react-flow__minimap-node", { selected: h }, u]), x: t, y: n, rx: l, ry: l, width: r, height: o, fill: g, stroke: a, strokeWidth: c, shapeRendering: d, onClick: f ? (m) => f(m, e) : void 0 });
5277
+ const vm = $l(El), bm = $l(kg), Fl = ({ id: e, x: t, y: n, width: r, height: o, style: s, color: i, strokeColor: a, strokeWidth: c, className: d, borderRadius: l, shapeRendering: u, onClick: f, selected: h }) => {
5278
+ const { background: g, backgroundColor: y } = s || {}, p = i || g || y;
5279
+ return $.createElement("rect", { className: me(["react-flow__minimap-node", { selected: h }, d]), x: t, y: n, rx: l, ry: l, width: r, height: o, fill: p, stroke: a, strokeWidth: c, shapeRendering: u, onClick: f ? (m) => f(m, e) : void 0 });
5317
5280
  };
5318
5281
  Fl.displayName = "MiniMapNode";
5319
5282
  var xm = ae(Fl);
@@ -5329,10 +5292,10 @@ function Sm({
5329
5292
  nodeComponent: s = xm,
5330
5293
  onClick: i
5331
5294
  }) {
5332
- const a = le(_m, he), c = le(Em), u = gr(t), l = gr(e), d = gr(n), f = typeof window > "u" || window.chrome ? "crispEdges" : "geometricPrecision";
5295
+ const a = le(_m, he), c = le(Em), d = gr(t), l = gr(e), u = gr(n), f = typeof window > "u" || window.chrome ? "crispEdges" : "geometricPrecision";
5333
5296
  return $.createElement($.Fragment, null, a.map((h) => {
5334
- const { x: p, y } = ht(h, c).positionAbsolute;
5335
- return $.createElement(s, { key: h.id, x: p, y, width: h.width, height: h.height, style: h.style, selected: h.selected, className: d(h), color: u(h), borderRadius: r, strokeColor: l(h), strokeWidth: o, shapeRendering: f, onClick: i, id: h.id });
5297
+ const { x: g, y } = ht(h, c).positionAbsolute;
5298
+ return $.createElement(s, { key: h.id, x: g, y, width: h.width, height: h.height, style: h.style, selected: h.selected, className: u(h), color: d(h), borderRadius: r, strokeColor: l(h), strokeWidth: o, shapeRendering: f, onClick: i, id: h.id });
5336
5299
  }));
5337
5300
  }
5338
5301
  var Cm = ae(Sm);
@@ -5361,14 +5324,14 @@ function zl({
5361
5324
  // a component properly.
5362
5325
  nodeComponent: a,
5363
5326
  maskColor: c = "rgb(240, 240, 240, 0.6)",
5364
- maskStrokeColor: u = "none",
5327
+ maskStrokeColor: d = "none",
5365
5328
  maskStrokeWidth: l = 1,
5366
- position: d = "bottom-right",
5329
+ position: u = "bottom-right",
5367
5330
  onClick: f,
5368
5331
  onNodeClick: h,
5369
- pannable: p = !1,
5332
+ pannable: g = !1,
5370
5333
  zoomable: y = !1,
5371
- ariaLabel: g = "React Flow mini map",
5334
+ ariaLabel: p = "React Flow mini map",
5372
5335
  inversePan: m = !1,
5373
5336
  zoomStep: w = 10,
5374
5337
  offsetScale: x = 5
@@ -5394,12 +5357,12 @@ function zl({
5394
5357
  [ce, se]
5395
5358
  ], ve = qe.translate(ie.x, ie.y).scale(Z[2]), Fe = K.constrain()(ve, U, ee);
5396
5359
  K.transform(ne, Fe);
5397
- }, Y = Ga().on("zoom", p ? V : null).on("zoom.wheel", y ? B : null);
5360
+ }, Y = Ga().on("zoom", g ? V : null).on("zoom.wheel", y ? B : null);
5398
5361
  return P.call(Y), () => {
5399
5362
  P.on("zoom", null);
5400
5363
  };
5401
5364
  }
5402
- }, [p, y, m, w]);
5365
+ }, [g, y, m, w]);
5403
5366
  const k = f ? (P) => {
5404
5367
  const B = ke(P);
5405
5368
  f(P, { x: B[0], y: B[1] });
@@ -5409,14 +5372,14 @@ function zl({
5409
5372
  } : void 0;
5410
5373
  return $.createElement(
5411
5374
  Vo,
5412
- { position: d, style: e, className: me(["react-flow__minimap", t]), "data-testid": "rf__minimap" },
5375
+ { position: u, style: e, className: me(["react-flow__minimap", t]), "data-testid": "rf__minimap" },
5413
5376
  $.createElement(
5414
5377
  "svg",
5415
5378
  { width: _, height: N, viewBox: `${z} ${G} ${R} ${H}`, role: "img", "aria-labelledby": q, ref: C, onClick: k },
5416
- g && $.createElement("title", { id: q }, g),
5379
+ p && $.createElement("title", { id: q }, p),
5417
5380
  $.createElement(Cm, { onClick: I, nodeColor: r, nodeStrokeColor: n, nodeBorderRadius: s, nodeClassName: o, nodeStrokeWidth: i, nodeComponent: a }),
5418
5381
  $.createElement("path", { className: "react-flow__minimap-mask", d: `M${z - L},${G - L}h${R + L * 2}v${H + L * 2}h${-R - L * 2}z
5419
- M${D.x},${D.y}h${D.width}v${D.height}h${-D.width}z`, fill: c, fillRule: "evenodd", stroke: u, strokeWidth: l, pointerEvents: "none" })
5382
+ M${D.x},${D.y}h${D.width}v${D.height}h${-D.width}z`, fill: c, fillRule: "evenodd", stroke: d, strokeWidth: l, pointerEvents: "none" })
5420
5383
  )
5421
5384
  );
5422
5385
  }
@@ -5463,10 +5426,10 @@ const Pm = (e) => ({
5463
5426
  isInteractive: e.nodesDraggable || e.nodesConnectable || e.elementsSelectable,
5464
5427
  minZoomReached: e.transform[2] <= e.minZoom,
5465
5428
  maxZoomReached: e.transform[2] >= e.maxZoom
5466
- }), Vl = ({ style: e, showZoom: t = !0, showFitView: n = !0, showInteractive: r = !0, fitViewOptions: o, onZoomIn: s, onZoomOut: i, onFitView: a, onInteractiveChange: c, className: u, children: l, position: d = "bottom-left" }) => {
5467
- const f = pe(), [h, p] = re(!1), { isInteractive: y, minZoomReached: g, maxZoomReached: m } = le(Pm, he), { zoomIn: w, zoomOut: x, fitView: b } = Uo();
5429
+ }), Vl = ({ style: e, showZoom: t = !0, showFitView: n = !0, showInteractive: r = !0, fitViewOptions: o, onZoomIn: s, onZoomOut: i, onFitView: a, onInteractiveChange: c, className: d, children: l, position: u = "bottom-left" }) => {
5430
+ const f = pe(), [h, g] = re(!1), { isInteractive: y, minZoomReached: p, maxZoomReached: m } = le(Pm, he), { zoomIn: w, zoomOut: x, fitView: b } = Uo();
5468
5431
  if (oe(() => {
5469
- p(!0);
5432
+ g(!0);
5470
5433
  }, []), !h)
5471
5434
  return null;
5472
5435
  const C = () => {
@@ -5484,7 +5447,7 @@ const Pm = (e) => ({
5484
5447
  };
5485
5448
  return $.createElement(
5486
5449
  Vo,
5487
- { className: me(["react-flow__controls", u]), position: d, style: e, "data-testid": "rf__controls" },
5450
+ { className: me(["react-flow__controls", d]), position: u, style: e, "data-testid": "rf__controls" },
5488
5451
  t && $.createElement(
5489
5452
  $.Fragment,
5490
5453
  null,
@@ -5495,7 +5458,7 @@ const Pm = (e) => ({
5495
5458
  ),
5496
5459
  $.createElement(
5497
5460
  jt,
5498
- { onClick: S, className: "react-flow__controls-zoomout", title: "zoom out", "aria-label": "zoom out", disabled: g },
5461
+ { onClick: S, className: "react-flow__controls-zoomout", title: "zoom out", "aria-label": "zoom out", disabled: p },
5499
5462
  $.createElement(Am, null)
5500
5463
  )
5501
5464
  ),
@@ -5541,7 +5504,7 @@ function Hl({
5541
5504
  style: a,
5542
5505
  className: c
5543
5506
  }) {
5544
- const u = Q(null), { transform: l, patternId: d } = le(Bm, he), f = i || Vm[t], h = r || Hm[t], p = t === Le.Dots, y = t === Le.Cross, g = Array.isArray(n) ? n : [n, n], m = [g[0] * l[2] || 1, g[1] * l[2] || 1], w = h * l[2], x = y ? [w, w] : m, b = p ? [w / s, w / s] : [x[0] / s, x[1] / s];
5507
+ const d = Q(null), { transform: l, patternId: u } = le(Bm, he), f = i || Vm[t], h = r || Hm[t], g = t === Le.Dots, y = t === Le.Cross, p = Array.isArray(n) ? n : [n, n], m = [p[0] * l[2] || 1, p[1] * l[2] || 1], w = h * l[2], x = y ? [w, w] : m, b = g ? [w / s, w / s] : [x[0] / s, x[1] / s];
5545
5508
  return $.createElement(
5546
5509
  "svg",
5547
5510
  { className: me(["react-flow__background", c]), style: {
@@ -5551,9 +5514,9 @@ function Hl({
5551
5514
  height: "100%",
5552
5515
  top: 0,
5553
5516
  left: 0
5554
- }, ref: u, "data-testid": "rf__background" },
5555
- $.createElement("pattern", { id: d + e, x: l[0] % m[0], y: l[1] % m[1], width: m[0], height: m[1], patternUnits: "userSpaceOnUse", patternTransform: `translate(-${b[0]},-${b[1]})` }, p ? $.createElement(zm, { color: f, radius: w / s }) : $.createElement(Fm, { dimensions: x, color: f, lineWidth: o })),
5556
- $.createElement("rect", { x: "0", y: "0", width: "100%", height: "100%", fill: `url(#${d + e})` })
5517
+ }, ref: d, "data-testid": "rf__background" },
5518
+ $.createElement("pattern", { id: u + e, x: l[0] % m[0], y: l[1] % m[1], width: m[0], height: m[1], patternUnits: "userSpaceOnUse", patternTransform: `translate(-${b[0]},-${b[1]})` }, g ? $.createElement(zm, { color: f, radius: w / s }) : $.createElement(Fm, { dimensions: x, color: f, lineWidth: o })),
5519
+ $.createElement("rect", { x: "0", y: "0", width: "100%", height: "100%", fill: `url(#${u + e})` })
5557
5520
  );
5558
5521
  }
5559
5522
  Hl.displayName = "Background";
@@ -5669,7 +5632,7 @@ function Qo() {
5669
5632
  */
5670
5633
  sources() {
5671
5634
  var l = this;
5672
- return this.nodes().filter((d) => Object.keys(l._in[d]).length === 0);
5635
+ return this.nodes().filter((u) => Object.keys(l._in[u]).length === 0);
5673
5636
  }
5674
5637
  /**
5675
5638
  * Gets list of nodes without out-edges.
@@ -5677,16 +5640,16 @@ function Qo() {
5677
5640
  */
5678
5641
  sinks() {
5679
5642
  var l = this;
5680
- return this.nodes().filter((d) => Object.keys(l._out[d]).length === 0);
5643
+ return this.nodes().filter((u) => Object.keys(l._out[u]).length === 0);
5681
5644
  }
5682
5645
  /**
5683
5646
  * Invokes setNode method for each node in names list.
5684
5647
  * Complexity: O(|names|).
5685
5648
  */
5686
- setNodes(l, d) {
5649
+ setNodes(l, u) {
5687
5650
  var f = arguments, h = this;
5688
- return l.forEach(function(p) {
5689
- f.length > 1 ? h.setNode(p, d) : h.setNode(p);
5651
+ return l.forEach(function(g) {
5652
+ f.length > 1 ? h.setNode(g, u) : h.setNode(g);
5690
5653
  }), this;
5691
5654
  }
5692
5655
  /**
@@ -5695,8 +5658,8 @@ function Qo() {
5695
5658
  * created by this call then the default node label will be assigned.
5696
5659
  * Complexity: O(1).
5697
5660
  */
5698
- setNode(l, d) {
5699
- return Object.hasOwn(this._nodes, l) ? (arguments.length > 1 && (this._nodes[l] = d), this) : (this._nodes[l] = arguments.length > 1 ? d : this._defaultNodeLabelFn(l), this._isCompound && (this._parent[l] = t, this._children[l] = {}, this._children[t][l] = !0), this._in[l] = {}, this._preds[l] = {}, this._out[l] = {}, this._sucs[l] = {}, ++this._nodeCount, this);
5661
+ setNode(l, u) {
5662
+ return Object.hasOwn(this._nodes, l) ? (arguments.length > 1 && (this._nodes[l] = u), this) : (this._nodes[l] = arguments.length > 1 ? u : this._defaultNodeLabelFn(l), this._isCompound && (this._parent[l] = t, this._children[l] = {}, this._children[t][l] = !0), this._in[l] = {}, this._preds[l] = {}, this._out[l] = {}, this._sucs[l] = {}, ++this._nodeCount, this);
5700
5663
  }
5701
5664
  /**
5702
5665
  * Gets the label of node with specified name.
@@ -5718,11 +5681,11 @@ function Qo() {
5718
5681
  * Complexity: O(1).
5719
5682
  */
5720
5683
  removeNode(l) {
5721
- var d = this;
5684
+ var u = this;
5722
5685
  if (Object.hasOwn(this._nodes, l)) {
5723
- var f = (h) => d.removeEdge(d._edgeObjs[h]);
5686
+ var f = (h) => u.removeEdge(u._edgeObjs[h]);
5724
5687
  delete this._nodes[l], this._isCompound && (this._removeFromParentsChildList(l), delete this._parent[l], this.children(l).forEach(function(h) {
5725
- d.setParent(h);
5688
+ u.setParent(h);
5726
5689
  }), delete this._children[l]), Object.keys(this._in[l]).forEach(f), delete this._in[l], delete this._preds[l], Object.keys(this._out[l]).forEach(f), delete this._out[l], delete this._sucs[l], --this._nodeCount;
5727
5690
  }
5728
5691
  return this;
@@ -5733,19 +5696,19 @@ function Qo() {
5733
5696
  * invoking it in context of noncompound graph.
5734
5697
  * Average-case complexity: O(1).
5735
5698
  */
5736
- setParent(l, d) {
5699
+ setParent(l, u) {
5737
5700
  if (!this._isCompound)
5738
5701
  throw new Error("Cannot set parent in a non-compound graph");
5739
- if (d === void 0)
5740
- d = t;
5702
+ if (u === void 0)
5703
+ u = t;
5741
5704
  else {
5742
- d += "";
5743
- for (var f = d; f !== void 0; f = this.parent(f))
5705
+ u += "";
5706
+ for (var f = u; f !== void 0; f = this.parent(f))
5744
5707
  if (f === l)
5745
- throw new Error("Setting " + d + " as parent of " + l + " would create a cycle");
5746
- this.setNode(d);
5708
+ throw new Error("Setting " + u + " as parent of " + l + " would create a cycle");
5709
+ this.setNode(u);
5747
5710
  }
5748
- return this.setNode(l), this._removeFromParentsChildList(l), this._parent[l] = d, this._children[d][l] = !0, this;
5711
+ return this.setNode(l), this._removeFromParentsChildList(l), this._parent[l] = u, this._children[u][l] = !0, this;
5749
5712
  }
5750
5713
  _removeFromParentsChildList(l) {
5751
5714
  delete this._children[this._parent[l]][l];
@@ -5756,9 +5719,9 @@ function Qo() {
5756
5719
  */
5757
5720
  parent(l) {
5758
5721
  if (this._isCompound) {
5759
- var d = this._parent[l];
5760
- if (d !== t)
5761
- return d;
5722
+ var u = this._parent[l];
5723
+ if (u !== t)
5724
+ return u;
5762
5725
  }
5763
5726
  }
5764
5727
  /**
@@ -5767,9 +5730,9 @@ function Qo() {
5767
5730
  */
5768
5731
  children(l = t) {
5769
5732
  if (this._isCompound) {
5770
- var d = this._children[l];
5771
- if (d)
5772
- return Object.keys(d);
5733
+ var u = this._children[l];
5734
+ if (u)
5735
+ return Object.keys(u);
5773
5736
  } else {
5774
5737
  if (l === t)
5775
5738
  return this.nodes();
@@ -5783,9 +5746,9 @@ function Qo() {
5783
5746
  * Complexity: O(|V|).
5784
5747
  */
5785
5748
  predecessors(l) {
5786
- var d = this._preds[l];
5787
- if (d)
5788
- return Object.keys(d);
5749
+ var u = this._preds[l];
5750
+ if (u)
5751
+ return Object.keys(u);
5789
5752
  }
5790
5753
  /**
5791
5754
  * Return all nodes that are successors of the specified node or undefined if node v is not in
@@ -5793,9 +5756,9 @@ function Qo() {
5793
5756
  * Complexity: O(|V|).
5794
5757
  */
5795
5758
  successors(l) {
5796
- var d = this._sucs[l];
5797
- if (d)
5798
- return Object.keys(d);
5759
+ var u = this._sucs[l];
5760
+ if (u)
5761
+ return Object.keys(u);
5799
5762
  }
5800
5763
  /**
5801
5764
  * Return all nodes that are predecessors or successors of the specified node or undefined if
@@ -5803,17 +5766,17 @@ function Qo() {
5803
5766
  * Complexity: O(|V|).
5804
5767
  */
5805
5768
  neighbors(l) {
5806
- var d = this.predecessors(l);
5807
- if (d) {
5808
- const h = new Set(d);
5769
+ var u = this.predecessors(l);
5770
+ if (u) {
5771
+ const h = new Set(u);
5809
5772
  for (var f of this.successors(l))
5810
5773
  h.add(f);
5811
5774
  return Array.from(h.values());
5812
5775
  }
5813
5776
  }
5814
5777
  isLeaf(l) {
5815
- var d;
5816
- return this.isDirected() ? d = this.successors(l) : d = this.neighbors(l), d.length === 0;
5778
+ var u;
5779
+ return this.isDirected() ? u = this.successors(l) : u = this.neighbors(l), u.length === 0;
5817
5780
  }
5818
5781
  /**
5819
5782
  * Creates new graph with nodes filtered via filter. Edges incident to rejected node
@@ -5822,24 +5785,24 @@ function Qo() {
5822
5785
  * Average-case complexity: O(|E|+|V|).
5823
5786
  */
5824
5787
  filterNodes(l) {
5825
- var d = new this.constructor({
5788
+ var u = new this.constructor({
5826
5789
  directed: this._isDirected,
5827
5790
  multigraph: this._isMultigraph,
5828
5791
  compound: this._isCompound
5829
5792
  });
5830
- d.setGraph(this.graph());
5793
+ u.setGraph(this.graph());
5831
5794
  var f = this;
5832
- Object.entries(this._nodes).forEach(function([y, g]) {
5833
- l(y) && d.setNode(y, g);
5795
+ Object.entries(this._nodes).forEach(function([y, p]) {
5796
+ l(y) && u.setNode(y, p);
5834
5797
  }), Object.values(this._edgeObjs).forEach(function(y) {
5835
- d.hasNode(y.v) && d.hasNode(y.w) && d.setEdge(y, f.edge(y));
5798
+ u.hasNode(y.v) && u.hasNode(y.w) && u.setEdge(y, f.edge(y));
5836
5799
  });
5837
5800
  var h = {};
5838
- function p(y) {
5839
- var g = f.parent(y);
5840
- return g === void 0 || d.hasNode(g) ? (h[y] = g, g) : g in h ? h[g] : p(g);
5801
+ function g(y) {
5802
+ var p = f.parent(y);
5803
+ return p === void 0 || u.hasNode(p) ? (h[y] = p, p) : p in h ? h[p] : g(p);
5841
5804
  }
5842
- return this._isCompound && d.nodes().forEach((y) => d.setParent(y, p(y))), d;
5805
+ return this._isCompound && u.nodes().forEach((y) => u.setParent(y, g(y))), u;
5843
5806
  }
5844
5807
  /* === Edge functions ========== */
5845
5808
  /**
@@ -5872,10 +5835,10 @@ function Qo() {
5872
5835
  * of nodes with label provided or default label if no label provided.
5873
5836
  * Complexity: O(|nodes|).
5874
5837
  */
5875
- setPath(l, d) {
5838
+ setPath(l, u) {
5876
5839
  var f = this, h = arguments;
5877
- return l.reduce(function(p, y) {
5878
- return h.length > 1 ? f.setEdge(p, y, d) : f.setEdge(p, y), y;
5840
+ return l.reduce(function(g, y) {
5841
+ return h.length > 1 ? f.setEdge(g, y, u) : f.setEdge(g, y), y;
5879
5842
  }), this;
5880
5843
  }
5881
5844
  /**
@@ -5885,23 +5848,23 @@ function Qo() {
5885
5848
  * be assigned. The name parameter is only useful with multigraphs.
5886
5849
  */
5887
5850
  setEdge() {
5888
- var l, d, f, h, p = !1, y = arguments[0];
5889
- typeof y == "object" && y !== null && "v" in y ? (l = y.v, d = y.w, f = y.name, arguments.length === 2 && (h = arguments[1], p = !0)) : (l = y, d = arguments[1], f = arguments[3], arguments.length > 2 && (h = arguments[2], p = !0)), l = "" + l, d = "" + d, f !== void 0 && (f = "" + f);
5890
- var g = i(this._isDirected, l, d, f);
5891
- if (Object.hasOwn(this._edgeLabels, g))
5892
- return p && (this._edgeLabels[g] = h), this;
5851
+ var l, u, f, h, g = !1, y = arguments[0];
5852
+ typeof y == "object" && y !== null && "v" in y ? (l = y.v, u = y.w, f = y.name, arguments.length === 2 && (h = arguments[1], g = !0)) : (l = y, u = arguments[1], f = arguments[3], arguments.length > 2 && (h = arguments[2], g = !0)), l = "" + l, u = "" + u, f !== void 0 && (f = "" + f);
5853
+ var p = i(this._isDirected, l, u, f);
5854
+ if (Object.hasOwn(this._edgeLabels, p))
5855
+ return g && (this._edgeLabels[p] = h), this;
5893
5856
  if (f !== void 0 && !this._isMultigraph)
5894
5857
  throw new Error("Cannot set a named edge when isMultigraph = false");
5895
- this.setNode(l), this.setNode(d), this._edgeLabels[g] = p ? h : this._defaultEdgeLabelFn(l, d, f);
5896
- var m = a(this._isDirected, l, d, f);
5897
- return l = m.v, d = m.w, Object.freeze(m), this._edgeObjs[g] = m, o(this._preds[d], l), o(this._sucs[l], d), this._in[d][g] = m, this._out[l][g] = m, this._edgeCount++, this;
5858
+ this.setNode(l), this.setNode(u), this._edgeLabels[p] = g ? h : this._defaultEdgeLabelFn(l, u, f);
5859
+ var m = a(this._isDirected, l, u, f);
5860
+ return l = m.v, u = m.w, Object.freeze(m), this._edgeObjs[p] = m, o(this._preds[u], l), o(this._sucs[l], u), this._in[u][p] = m, this._out[l][p] = m, this._edgeCount++, this;
5898
5861
  }
5899
5862
  /**
5900
5863
  * Gets the label for the specified edge.
5901
5864
  * Complexity: O(1).
5902
5865
  */
5903
- edge(l, d, f) {
5904
- var h = arguments.length === 1 ? c(this._isDirected, arguments[0]) : i(this._isDirected, l, d, f);
5866
+ edge(l, u, f) {
5867
+ var h = arguments.length === 1 ? c(this._isDirected, arguments[0]) : i(this._isDirected, l, u, f);
5905
5868
  return this._edgeLabels[h];
5906
5869
  }
5907
5870
  /**
@@ -5916,28 +5879,28 @@ function Qo() {
5916
5879
  * Detects whether the graph contains specified edge or not. No subgraphs are considered.
5917
5880
  * Complexity: O(1).
5918
5881
  */
5919
- hasEdge(l, d, f) {
5920
- var h = arguments.length === 1 ? c(this._isDirected, arguments[0]) : i(this._isDirected, l, d, f);
5882
+ hasEdge(l, u, f) {
5883
+ var h = arguments.length === 1 ? c(this._isDirected, arguments[0]) : i(this._isDirected, l, u, f);
5921
5884
  return Object.hasOwn(this._edgeLabels, h);
5922
5885
  }
5923
5886
  /**
5924
5887
  * Removes the specified edge from the graph. No subgraphs are considered.
5925
5888
  * Complexity: O(1).
5926
5889
  */
5927
- removeEdge(l, d, f) {
5928
- var h = arguments.length === 1 ? c(this._isDirected, arguments[0]) : i(this._isDirected, l, d, f), p = this._edgeObjs[h];
5929
- return p && (l = p.v, d = p.w, delete this._edgeLabels[h], delete this._edgeObjs[h], s(this._preds[d], l), s(this._sucs[l], d), delete this._in[d][h], delete this._out[l][h], this._edgeCount--), this;
5890
+ removeEdge(l, u, f) {
5891
+ var h = arguments.length === 1 ? c(this._isDirected, arguments[0]) : i(this._isDirected, l, u, f), g = this._edgeObjs[h];
5892
+ return g && (l = g.v, u = g.w, delete this._edgeLabels[h], delete this._edgeObjs[h], s(this._preds[u], l), s(this._sucs[l], u), delete this._in[u][h], delete this._out[l][h], this._edgeCount--), this;
5930
5893
  }
5931
5894
  /**
5932
5895
  * Return all edges that point to the node v. Optionally filters those edges down to just those
5933
5896
  * coming from node u. Behavior is undefined for undirected graphs - use nodeEdges instead.
5934
5897
  * Complexity: O(|E|).
5935
5898
  */
5936
- inEdges(l, d) {
5899
+ inEdges(l, u) {
5937
5900
  var f = this._in[l];
5938
5901
  if (f) {
5939
5902
  var h = Object.values(f);
5940
- return d ? h.filter((p) => p.v === d) : h;
5903
+ return u ? h.filter((g) => g.v === u) : h;
5941
5904
  }
5942
5905
  }
5943
5906
  /**
@@ -5945,11 +5908,11 @@ function Qo() {
5945
5908
  * those point to w. Behavior is undefined for undirected graphs - use nodeEdges instead.
5946
5909
  * Complexity: O(|E|).
5947
5910
  */
5948
- outEdges(l, d) {
5911
+ outEdges(l, u) {
5949
5912
  var f = this._out[l];
5950
5913
  if (f) {
5951
5914
  var h = Object.values(f);
5952
- return d ? h.filter((p) => p.w === d) : h;
5915
+ return u ? h.filter((g) => g.w === u) : h;
5953
5916
  }
5954
5917
  }
5955
5918
  /**
@@ -5957,37 +5920,37 @@ function Qo() {
5957
5920
  * down to just those between nodes v and w regardless of direction.
5958
5921
  * Complexity: O(|E|).
5959
5922
  */
5960
- nodeEdges(l, d) {
5961
- var f = this.inEdges(l, d);
5923
+ nodeEdges(l, u) {
5924
+ var f = this.inEdges(l, u);
5962
5925
  if (f)
5963
- return f.concat(this.outEdges(l, d));
5926
+ return f.concat(this.outEdges(l, u));
5964
5927
  }
5965
5928
  }
5966
- function o(u, l) {
5967
- u[l] ? u[l]++ : u[l] = 1;
5929
+ function o(d, l) {
5930
+ d[l] ? d[l]++ : d[l] = 1;
5968
5931
  }
5969
- function s(u, l) {
5970
- --u[l] || delete u[l];
5932
+ function s(d, l) {
5933
+ --d[l] || delete d[l];
5971
5934
  }
5972
- function i(u, l, d, f) {
5973
- var h = "" + l, p = "" + d;
5974
- if (!u && h > p) {
5935
+ function i(d, l, u, f) {
5936
+ var h = "" + l, g = "" + u;
5937
+ if (!d && h > g) {
5975
5938
  var y = h;
5976
- h = p, p = y;
5939
+ h = g, g = y;
5977
5940
  }
5978
- return h + n + p + n + (f === void 0 ? e : f);
5941
+ return h + n + g + n + (f === void 0 ? e : f);
5979
5942
  }
5980
- function a(u, l, d, f) {
5981
- var h = "" + l, p = "" + d;
5982
- if (!u && h > p) {
5943
+ function a(d, l, u, f) {
5944
+ var h = "" + l, g = "" + u;
5945
+ if (!d && h > g) {
5983
5946
  var y = h;
5984
- h = p, p = y;
5947
+ h = g, g = y;
5985
5948
  }
5986
- var g = { v: h, w: p };
5987
- return f && (g.name = f), g;
5949
+ var p = { v: h, w: g };
5950
+ return f && (p.name = f), p;
5988
5951
  }
5989
- function c(u, l) {
5990
- return i(u, l.v, l.w, l.name);
5952
+ function c(d, l) {
5953
+ return i(d, l.v, l.w, l.name);
5991
5954
  }
5992
5955
  return mr = r, mr;
5993
5956
  }
@@ -6025,8 +5988,8 @@ function Wm() {
6025
5988
  }
6026
5989
  function n(s) {
6027
5990
  return s.nodes().map(function(i) {
6028
- var a = s.node(i), c = s.parent(i), u = { v: i };
6029
- return a !== void 0 && (u.value = a), c !== void 0 && (u.parent = c), u;
5991
+ var a = s.node(i), c = s.parent(i), d = { v: i };
5992
+ return a !== void 0 && (d.value = a), c !== void 0 && (d.parent = c), d;
6030
5993
  });
6031
5994
  }
6032
5995
  function r(s) {
@@ -6177,16 +6140,16 @@ function ql() {
6177
6140
  );
6178
6141
  }
6179
6142
  function r(o, s, i, a) {
6180
- var c = {}, u = new e(), l, d, f = function(h) {
6181
- var p = h.v !== l ? h.v : h.w, y = c[p], g = i(h), m = d.distance + g;
6182
- if (g < 0)
6183
- throw new Error("dijkstra does not allow negative edge weights. Bad edge: " + h + " Weight: " + g);
6184
- m < y.distance && (y.distance = m, y.predecessor = l, u.decrease(p, m));
6143
+ var c = {}, d = new e(), l, u, f = function(h) {
6144
+ var g = h.v !== l ? h.v : h.w, y = c[g], p = i(h), m = u.distance + p;
6145
+ if (p < 0)
6146
+ throw new Error("dijkstra does not allow negative edge weights. Bad edge: " + h + " Weight: " + p);
6147
+ m < y.distance && (y.distance = m, y.predecessor = l, d.decrease(g, m));
6185
6148
  };
6186
6149
  for (o.nodes().forEach(function(h) {
6187
- var p = h === s ? 0 : Number.POSITIVE_INFINITY;
6188
- c[h] = { distance: p }, u.add(h, p);
6189
- }); u.size() > 0 && (l = u.removeMin(), d = c[l], d.distance !== Number.POSITIVE_INFINITY); )
6150
+ var g = h === s ? 0 : Number.POSITIVE_INFINITY;
6151
+ c[h] = { distance: g }, d.add(h, g);
6152
+ }); d.size() > 0 && (l = d.removeMin(), u = c[l], u.distance !== Number.POSITIVE_INFINITY); )
6190
6153
  a(l).forEach(f);
6191
6154
  return c;
6192
6155
  }
@@ -6217,14 +6180,14 @@ function Gl() {
6217
6180
  lowlink: n,
6218
6181
  index: n++
6219
6182
  };
6220
- if (r.push(a), t.successors(a).forEach(function(d) {
6221
- Object.hasOwn(o, d) ? o[d].onStack && (c.lowlink = Math.min(c.lowlink, o[d].index)) : (i(d), c.lowlink = Math.min(c.lowlink, o[d].lowlink));
6183
+ if (r.push(a), t.successors(a).forEach(function(u) {
6184
+ Object.hasOwn(o, u) ? o[u].onStack && (c.lowlink = Math.min(c.lowlink, o[u].index)) : (i(u), c.lowlink = Math.min(c.lowlink, o[u].lowlink));
6222
6185
  }), c.lowlink === c.index) {
6223
- var u = [], l;
6186
+ var d = [], l;
6224
6187
  do
6225
- l = r.pop(), o[l].onStack = !1, u.push(l);
6188
+ l = r.pop(), o[l].onStack = !1, d.push(l);
6226
6189
  while (a !== l);
6227
- s.push(u);
6190
+ s.push(d);
6228
6191
  }
6229
6192
  }
6230
6193
  return t.nodes().forEach(function(a) {
@@ -6263,19 +6226,19 @@ function Km() {
6263
6226
  function n(r, o, s) {
6264
6227
  var i = {}, a = r.nodes();
6265
6228
  return a.forEach(function(c) {
6266
- i[c] = {}, i[c][c] = { distance: 0 }, a.forEach(function(u) {
6267
- c !== u && (i[c][u] = { distance: Number.POSITIVE_INFINITY });
6268
- }), s(c).forEach(function(u) {
6269
- var l = u.v === c ? u.w : u.v, d = o(u);
6270
- i[c][l] = { distance: d, predecessor: c };
6229
+ i[c] = {}, i[c][c] = { distance: 0 }, a.forEach(function(d) {
6230
+ c !== d && (i[c][d] = { distance: Number.POSITIVE_INFINITY });
6231
+ }), s(c).forEach(function(d) {
6232
+ var l = d.v === c ? d.w : d.v, u = o(d);
6233
+ i[c][l] = { distance: u, predecessor: c };
6271
6234
  });
6272
6235
  }), a.forEach(function(c) {
6273
- var u = i[c];
6236
+ var d = i[c];
6274
6237
  a.forEach(function(l) {
6275
- var d = i[l];
6238
+ var u = i[l];
6276
6239
  a.forEach(function(f) {
6277
- var h = d[c], p = u[f], y = d[f], g = h.distance + p.distance;
6278
- g < y.distance && (y.distance = g, y.predecessor = p.predecessor);
6240
+ var h = u[c], g = d[f], y = u[f], p = h.distance + g.distance;
6241
+ p < y.distance && (y.distance = p, y.predecessor = g.predecessor);
6279
6242
  });
6280
6243
  });
6281
6244
  }), i;
@@ -6328,23 +6291,23 @@ function jl() {
6328
6291
  bs = 1, Lr = e;
6329
6292
  function e(o, s, i) {
6330
6293
  Array.isArray(s) || (s = [s]);
6331
- var a = o.isDirected() ? (d) => o.successors(d) : (d) => o.neighbors(d), c = i === "post" ? t : n, u = [], l = {};
6332
- return s.forEach((d) => {
6333
- if (!o.hasNode(d))
6334
- throw new Error("Graph does not have node: " + d);
6335
- c(d, a, l, u);
6336
- }), u;
6294
+ var a = o.isDirected() ? (u) => o.successors(u) : (u) => o.neighbors(u), c = i === "post" ? t : n, d = [], l = {};
6295
+ return s.forEach((u) => {
6296
+ if (!o.hasNode(u))
6297
+ throw new Error("Graph does not have node: " + u);
6298
+ c(u, a, l, d);
6299
+ }), d;
6337
6300
  }
6338
6301
  function t(o, s, i, a) {
6339
6302
  for (var c = [[o, !1]]; c.length > 0; ) {
6340
- var u = c.pop();
6341
- u[1] ? a.push(u[0]) : Object.hasOwn(i, u[0]) || (i[u[0]] = !0, c.push([u[0], !0]), r(s(u[0]), (l) => c.push([l, !1])));
6303
+ var d = c.pop();
6304
+ d[1] ? a.push(d[0]) : Object.hasOwn(i, d[0]) || (i[d[0]] = !0, c.push([d[0], !0]), r(s(d[0]), (l) => c.push([l, !1])));
6342
6305
  }
6343
6306
  }
6344
6307
  function n(o, s, i, a) {
6345
6308
  for (var c = [o]; c.length > 0; ) {
6346
- var u = c.pop();
6347
- Object.hasOwn(i, u) || (i[u] = !0, a.push(u), r(s(u), (l) => c.push(l)));
6309
+ var d = c.pop();
6310
+ Object.hasOwn(i, d) || (i[d] = !0, a.push(d), r(s(d), (l) => c.push(l)));
6348
6311
  }
6349
6312
  }
6350
6313
  function r(o, s) {
@@ -6384,17 +6347,17 @@ function t0() {
6384
6347
  Ar = n;
6385
6348
  function n(r, o) {
6386
6349
  var s = new e(), i = {}, a = new t(), c;
6387
- function u(d) {
6388
- var f = d.v === c ? d.w : d.v, h = a.priority(f);
6350
+ function d(u) {
6351
+ var f = u.v === c ? u.w : u.v, h = a.priority(f);
6389
6352
  if (h !== void 0) {
6390
- var p = o(d);
6391
- p < h && (i[f] = c, a.decrease(f, p));
6353
+ var g = o(u);
6354
+ g < h && (i[f] = c, a.decrease(f, g));
6392
6355
  }
6393
6356
  }
6394
6357
  if (r.nodeCount() === 0)
6395
6358
  return s;
6396
- r.nodes().forEach(function(d) {
6397
- a.add(d, Number.POSITIVE_INFINITY), s.setNode(d);
6359
+ r.nodes().forEach(function(u) {
6360
+ a.add(u, Number.POSITIVE_INFINITY), s.setNode(u);
6398
6361
  }), a.decrease(r.nodes()[0], 0);
6399
6362
  for (var l = !1; a.size() > 0; ) {
6400
6363
  if (c = a.removeMin(), Object.hasOwn(i, c))
@@ -6404,7 +6367,7 @@ function t0() {
6404
6367
  throw new Error("Input graph is not connected: " + r);
6405
6368
  l = !0;
6406
6369
  }
6407
- r.nodeEdges(c).forEach(u);
6370
+ r.nodeEdges(c).forEach(d);
6408
6371
  }
6409
6372
  return s;
6410
6373
  }
@@ -6479,59 +6442,59 @@ function o0() {
6479
6442
  let e = Oe().Graph, t = r0();
6480
6443
  Pr = r;
6481
6444
  let n = () => 1;
6482
- function r(u, l) {
6483
- if (u.nodeCount() <= 1)
6445
+ function r(d, l) {
6446
+ if (d.nodeCount() <= 1)
6484
6447
  return [];
6485
- let d = i(u, l || n);
6486
- return o(d.graph, d.buckets, d.zeroIdx).flatMap((h) => u.outEdges(h.v, h.w));
6487
- }
6488
- function o(u, l, d) {
6489
- let f = [], h = l[l.length - 1], p = l[0], y;
6490
- for (; u.nodeCount(); ) {
6491
- for (; y = p.dequeue(); )
6492
- s(u, l, d, y);
6448
+ let u = i(d, l || n);
6449
+ return o(u.graph, u.buckets, u.zeroIdx).flatMap((h) => d.outEdges(h.v, h.w));
6450
+ }
6451
+ function o(d, l, u) {
6452
+ let f = [], h = l[l.length - 1], g = l[0], y;
6453
+ for (; d.nodeCount(); ) {
6454
+ for (; y = g.dequeue(); )
6455
+ s(d, l, u, y);
6493
6456
  for (; y = h.dequeue(); )
6494
- s(u, l, d, y);
6495
- if (u.nodeCount()) {
6496
- for (let g = l.length - 2; g > 0; --g)
6497
- if (y = l[g].dequeue(), y) {
6498
- f = f.concat(s(u, l, d, y, !0));
6457
+ s(d, l, u, y);
6458
+ if (d.nodeCount()) {
6459
+ for (let p = l.length - 2; p > 0; --p)
6460
+ if (y = l[p].dequeue(), y) {
6461
+ f = f.concat(s(d, l, u, y, !0));
6499
6462
  break;
6500
6463
  }
6501
6464
  }
6502
6465
  }
6503
6466
  return f;
6504
6467
  }
6505
- function s(u, l, d, f, h) {
6506
- let p = h ? [] : void 0;
6507
- return u.inEdges(f.v).forEach((y) => {
6508
- let g = u.edge(y), m = u.node(y.v);
6509
- h && p.push({ v: y.v, w: y.w }), m.out -= g, a(l, d, m);
6510
- }), u.outEdges(f.v).forEach((y) => {
6511
- let g = u.edge(y), m = y.w, w = u.node(m);
6512
- w.in -= g, a(l, d, w);
6513
- }), u.removeNode(f.v), p;
6514
- }
6515
- function i(u, l) {
6516
- let d = new e(), f = 0, h = 0;
6517
- u.nodes().forEach((g) => {
6518
- d.setNode(g, { v: g, in: 0, out: 0 });
6519
- }), u.edges().forEach((g) => {
6520
- let m = d.edge(g.v, g.w) || 0, w = l(g), x = m + w;
6521
- d.setEdge(g.v, g.w, x), h = Math.max(h, d.node(g.v).out += w), f = Math.max(f, d.node(g.w).in += w);
6468
+ function s(d, l, u, f, h) {
6469
+ let g = h ? [] : void 0;
6470
+ return d.inEdges(f.v).forEach((y) => {
6471
+ let p = d.edge(y), m = d.node(y.v);
6472
+ h && g.push({ v: y.v, w: y.w }), m.out -= p, a(l, u, m);
6473
+ }), d.outEdges(f.v).forEach((y) => {
6474
+ let p = d.edge(y), m = y.w, w = d.node(m);
6475
+ w.in -= p, a(l, u, w);
6476
+ }), d.removeNode(f.v), g;
6477
+ }
6478
+ function i(d, l) {
6479
+ let u = new e(), f = 0, h = 0;
6480
+ d.nodes().forEach((p) => {
6481
+ u.setNode(p, { v: p, in: 0, out: 0 });
6482
+ }), d.edges().forEach((p) => {
6483
+ let m = u.edge(p.v, p.w) || 0, w = l(p), x = m + w;
6484
+ u.setEdge(p.v, p.w, x), h = Math.max(h, u.node(p.v).out += w), f = Math.max(f, u.node(p.w).in += w);
6522
6485
  });
6523
- let p = c(h + f + 3).map(() => new t()), y = f + 1;
6524
- return d.nodes().forEach((g) => {
6525
- a(p, y, d.node(g));
6526
- }), { graph: d, buckets: p, zeroIdx: y };
6486
+ let g = c(h + f + 3).map(() => new t()), y = f + 1;
6487
+ return u.nodes().forEach((p) => {
6488
+ a(g, y, u.node(p));
6489
+ }), { graph: u, buckets: g, zeroIdx: y };
6527
6490
  }
6528
- function a(u, l, d) {
6529
- d.out ? d.in ? u[d.out - d.in + l].enqueue(d) : u[u.length - 1].enqueue(d) : u[0].enqueue(d);
6491
+ function a(d, l, u) {
6492
+ u.out ? u.in ? d[u.out - u.in + l].enqueue(u) : d[d.length - 1].enqueue(u) : d[0].enqueue(u);
6530
6493
  }
6531
- function c(u) {
6494
+ function c(d) {
6532
6495
  const l = [];
6533
- for (let d = 0; d < u; d++)
6534
- l.push(d);
6496
+ for (let u = 0; u < d; u++)
6497
+ l.push(u);
6535
6498
  return l;
6536
6499
  }
6537
6500
  return Pr;
@@ -6549,17 +6512,17 @@ function fe() {
6549
6512
  buildLayerMatrix: a,
6550
6513
  intersectRect: i,
6551
6514
  mapValues: S,
6552
- maxRank: p,
6515
+ maxRank: g,
6553
6516
  normalizeRanks: c,
6554
6517
  notime: m,
6555
6518
  partition: y,
6556
6519
  pick: C,
6557
6520
  predecessorWeights: s,
6558
6521
  range: b,
6559
- removeEmptyRanks: u,
6522
+ removeEmptyRanks: d,
6560
6523
  simplify: n,
6561
6524
  successorWeights: o,
6562
- time: g,
6525
+ time: p,
6563
6526
  uniqueId: x,
6564
6527
  zipObject: D
6565
6528
  };
@@ -6612,7 +6575,7 @@ function fe() {
6612
6575
  return Math.abs(F) * v > Math.abs(O) * A ? (F < 0 && (A = -A), L = A * O / F, z = A) : (O < 0 && (v = -v), L = v, z = v * F / O), { x: N + L, y: M + z };
6613
6576
  }
6614
6577
  function a(E) {
6615
- let _ = b(p(E) + 1).map(() => []);
6578
+ let _ = b(g(E) + 1).map(() => []);
6616
6579
  return E.nodes().forEach((N) => {
6617
6580
  let M = E.node(N), O = M.rank;
6618
6581
  O !== void 0 && (_[O][M.order] = N);
@@ -6628,7 +6591,7 @@ function fe() {
6628
6591
  Object.hasOwn(O, "rank") && (O.rank -= N);
6629
6592
  });
6630
6593
  }
6631
- function u(E) {
6594
+ function d(E) {
6632
6595
  let _ = E.nodes().map((v) => E.node(v).rank), N = h(Math.min, _), M = [];
6633
6596
  E.nodes().forEach((v) => {
6634
6597
  let A = E.node(v).rank - N;
@@ -6646,7 +6609,7 @@ function fe() {
6646
6609
  };
6647
6610
  return arguments.length >= 4 && (O.rank = N, O.order = M), t(E, "border", O, _);
6648
6611
  }
6649
- function d(E, _ = f) {
6612
+ function u(E, _ = f) {
6650
6613
  const N = [];
6651
6614
  for (let M = 0; M < E.length; M += _) {
6652
6615
  const O = E.slice(M, M + _);
@@ -6657,12 +6620,12 @@ function fe() {
6657
6620
  const f = 65535;
6658
6621
  function h(E, _) {
6659
6622
  if (_.length > f) {
6660
- const N = d(_);
6623
+ const N = u(_);
6661
6624
  return E.apply(null, N.map((M) => E.apply(null, M)));
6662
6625
  } else
6663
6626
  return E.apply(null, _);
6664
6627
  }
6665
- function p(E) {
6628
+ function g(E) {
6666
6629
  const N = E.nodes().map((M) => {
6667
6630
  let O = E.node(M).rank;
6668
6631
  return O === void 0 ? Number.MIN_VALUE : O;
@@ -6675,7 +6638,7 @@ function fe() {
6675
6638
  _(M) ? N.lhs.push(M) : N.rhs.push(M);
6676
6639
  }), N;
6677
6640
  }
6678
- function g(E, _) {
6641
+ function p(E, _) {
6679
6642
  let N = Date.now();
6680
6643
  try {
6681
6644
  return _();
@@ -6726,21 +6689,21 @@ function i0() {
6726
6689
  };
6727
6690
  function n(s) {
6728
6691
  (s.graph().acyclicer === "greedy" ? e(s, a(s)) : r(s)).forEach((c) => {
6729
- let u = s.edge(c);
6730
- s.removeEdge(c), u.forwardName = c.name, u.reversed = !0, s.setEdge(c.w, c.v, u, t("rev"));
6692
+ let d = s.edge(c);
6693
+ s.removeEdge(c), d.forwardName = c.name, d.reversed = !0, s.setEdge(c.w, c.v, d, t("rev"));
6731
6694
  });
6732
6695
  function a(c) {
6733
- return (u) => c.edge(u).weight;
6696
+ return (d) => c.edge(d).weight;
6734
6697
  }
6735
6698
  }
6736
6699
  function r(s) {
6737
6700
  let i = [], a = {}, c = {};
6738
- function u(l) {
6739
- Object.hasOwn(c, l) || (c[l] = !0, a[l] = !0, s.outEdges(l).forEach((d) => {
6740
- Object.hasOwn(a, d.w) ? i.push(d) : u(d.w);
6701
+ function d(l) {
6702
+ Object.hasOwn(c, l) || (c[l] = !0, a[l] = !0, s.outEdges(l).forEach((u) => {
6703
+ Object.hasOwn(a, u.w) ? i.push(u) : d(u.w);
6741
6704
  }), delete a[l]);
6742
6705
  }
6743
- return s.nodes().forEach(u), i;
6706
+ return s.nodes().forEach(d), i;
6744
6707
  }
6745
6708
  function o(s) {
6746
6709
  s.edges().forEach((i) => {
@@ -6767,19 +6730,19 @@ function s0() {
6767
6730
  o.graph().dummyChains = [], o.edges().forEach((s) => n(o, s));
6768
6731
  }
6769
6732
  function n(o, s) {
6770
- let i = s.v, a = o.node(i).rank, c = s.w, u = o.node(c).rank, l = s.name, d = o.edge(s), f = d.labelRank;
6771
- if (u === a + 1) return;
6733
+ let i = s.v, a = o.node(i).rank, c = s.w, d = o.node(c).rank, l = s.name, u = o.edge(s), f = u.labelRank;
6734
+ if (d === a + 1) return;
6772
6735
  o.removeEdge(s);
6773
- let h, p, y;
6774
- for (y = 0, ++a; a < u; ++y, ++a)
6775
- d.points = [], p = {
6736
+ let h, g, y;
6737
+ for (y = 0, ++a; a < d; ++y, ++a)
6738
+ u.points = [], g = {
6776
6739
  width: 0,
6777
6740
  height: 0,
6778
- edgeLabel: d,
6741
+ edgeLabel: u,
6779
6742
  edgeObj: s,
6780
6743
  rank: a
6781
- }, h = e.addDummyNode(o, "edge", p, "_d"), a === f && (p.width = d.width, p.height = d.height, p.dummy = "edge-label", p.labelpos = d.labelpos), o.setEdge(i, h, { weight: d.weight }, l), y === 0 && o.graph().dummyChains.push(h), i = h;
6782
- o.setEdge(i, c, { weight: d.weight }, l);
6744
+ }, h = e.addDummyNode(o, "edge", g, "_d"), a === f && (g.width = u.width, g.height = u.height, g.dummy = "edge-label", g.labelpos = u.labelpos), o.setEdge(i, h, { weight: u.weight }, l), y === 0 && o.graph().dummyChains.push(h), i = h;
6745
+ o.setEdge(i, c, { weight: u.weight }, l);
6783
6746
  }
6784
6747
  function r(o) {
6785
6748
  o.graph().dummyChains.forEach((s) => {
@@ -6807,8 +6770,8 @@ function $n() {
6807
6770
  return a.rank;
6808
6771
  o[i] = !0;
6809
6772
  let c = r.outEdges(i).map((l) => l == null ? Number.POSITIVE_INFINITY : s(l.w) - r.edge(l).minlen);
6810
- var u = e(Math.min, c);
6811
- return u === Number.POSITIVE_INFINITY && (u = 0), a.rank = u;
6773
+ var d = e(Math.min, c);
6774
+ return d === Number.POSITIVE_INFINITY && (d = 0), a.rank = d;
6812
6775
  }
6813
6776
  r.sources().forEach(s);
6814
6777
  }
@@ -6824,29 +6787,29 @@ function Wl() {
6824
6787
  var e = Oe().Graph, t = $n().slack;
6825
6788
  Hr = n;
6826
6789
  function n(i) {
6827
- var a = new e({ directed: !1 }), c = i.nodes()[0], u = i.nodeCount();
6790
+ var a = new e({ directed: !1 }), c = i.nodes()[0], d = i.nodeCount();
6828
6791
  a.setNode(c, {});
6829
- for (var l, d; r(a, i) < u; )
6830
- l = o(a, i), d = a.hasNode(l.v) ? t(i, l) : -t(i, l), s(a, i, d);
6792
+ for (var l, u; r(a, i) < d; )
6793
+ l = o(a, i), u = a.hasNode(l.v) ? t(i, l) : -t(i, l), s(a, i, u);
6831
6794
  return a;
6832
6795
  }
6833
6796
  function r(i, a) {
6834
- function c(u) {
6835
- a.nodeEdges(u).forEach((l) => {
6836
- var d = l.v, f = u === d ? l.w : d;
6837
- !i.hasNode(f) && !t(a, l) && (i.setNode(f, {}), i.setEdge(u, f, {}), c(f));
6797
+ function c(d) {
6798
+ a.nodeEdges(d).forEach((l) => {
6799
+ var u = l.v, f = d === u ? l.w : u;
6800
+ !i.hasNode(f) && !t(a, l) && (i.setNode(f, {}), i.setEdge(d, f, {}), c(f));
6838
6801
  });
6839
6802
  }
6840
6803
  return i.nodes().forEach(c), i.nodeCount();
6841
6804
  }
6842
6805
  function o(i, a) {
6843
- return a.edges().reduce((u, l) => {
6844
- let d = Number.POSITIVE_INFINITY;
6845
- return i.hasNode(l.v) !== i.hasNode(l.w) && (d = t(a, l)), d < u[0] ? [d, l] : u;
6806
+ return a.edges().reduce((d, l) => {
6807
+ let u = Number.POSITIVE_INFINITY;
6808
+ return i.hasNode(l.v) !== i.hasNode(l.w) && (u = t(a, l)), u < d[0] ? [u, l] : d;
6846
6809
  }, [Number.POSITIVE_INFINITY, null])[1];
6847
6810
  }
6848
6811
  function s(i, a, c) {
6849
- i.nodes().forEach((u) => a.node(u).rank += c);
6812
+ i.nodes().forEach((d) => a.node(d).rank += c);
6850
6813
  }
6851
6814
  return Hr;
6852
6815
  }
@@ -6855,13 +6818,13 @@ function a0() {
6855
6818
  if (Ts) return Br;
6856
6819
  Ts = 1;
6857
6820
  var e = Wl(), t = $n().slack, n = $n().longestPath, r = Oe().alg.preorder, o = Oe().alg.postorder, s = fe().simplify;
6858
- Br = i, i.initLowLimValues = l, i.initCutValues = a, i.calcCutValue = u, i.leaveEdge = f, i.enterEdge = h, i.exchangeEdges = p;
6821
+ Br = i, i.initLowLimValues = l, i.initCutValues = a, i.calcCutValue = d, i.leaveEdge = f, i.enterEdge = h, i.exchangeEdges = g;
6859
6822
  function i(w) {
6860
6823
  w = s(w), n(w);
6861
6824
  var x = e(w);
6862
6825
  l(x), a(x, w);
6863
6826
  for (var b, C; b = f(x); )
6864
- C = h(x, w, b), p(x, w, b, C);
6827
+ C = h(x, w, b), g(x, w, b, C);
6865
6828
  }
6866
6829
  function a(w, x) {
6867
6830
  var b = o(w, w.nodes());
@@ -6869,15 +6832,15 @@ function a0() {
6869
6832
  }
6870
6833
  function c(w, x, b) {
6871
6834
  var C = w.node(b), S = C.parent;
6872
- w.edge(b, S).cutvalue = u(w, x, b);
6835
+ w.edge(b, S).cutvalue = d(w, x, b);
6873
6836
  }
6874
- function u(w, x, b) {
6837
+ function d(w, x, b) {
6875
6838
  var C = w.node(b), S = C.parent, D = !0, E = x.edge(b, S), _ = 0;
6876
6839
  return E || (D = !1, E = x.edge(S, b)), _ = E.weight, x.nodeEdges(b).forEach((N) => {
6877
6840
  var M = N.v === b, O = M ? N.w : N.v;
6878
6841
  if (O !== S) {
6879
6842
  var F = M === D, v = x.edge(N).weight;
6880
- if (_ += F ? v : -v, g(w, b, O)) {
6843
+ if (_ += F ? v : -v, p(w, b, O)) {
6881
6844
  var A = w.edge(b, O).cutvalue;
6882
6845
  _ += F ? -A : A;
6883
6846
  }
@@ -6885,12 +6848,12 @@ function a0() {
6885
6848
  }), _;
6886
6849
  }
6887
6850
  function l(w, x) {
6888
- arguments.length < 2 && (x = w.nodes()[0]), d(w, {}, 1, x);
6851
+ arguments.length < 2 && (x = w.nodes()[0]), u(w, {}, 1, x);
6889
6852
  }
6890
- function d(w, x, b, C, S) {
6853
+ function u(w, x, b, C, S) {
6891
6854
  var D = b, E = w.node(C);
6892
6855
  return x[C] = !0, w.neighbors(C).forEach((_) => {
6893
- Object.hasOwn(x, _) || (b = d(w, x, b, _, C));
6856
+ Object.hasOwn(x, _) || (b = u(w, x, b, _, C));
6894
6857
  }), E.low = D, E.lim = b++, S ? E.parent = S : delete E.parent, b;
6895
6858
  }
6896
6859
  function f(w) {
@@ -6904,7 +6867,7 @@ function a0() {
6904
6867
  var M = x.edges().filter((O) => N === m(w, w.node(O.v), _) && N !== m(w, w.node(O.w), _));
6905
6868
  return M.reduce((O, F) => t(x, F) < t(x, O) ? F : O);
6906
6869
  }
6907
- function p(w, x, b, C) {
6870
+ function g(w, x, b, C) {
6908
6871
  var S = b.v, D = b.w;
6909
6872
  w.removeEdge(S, D), w.setEdge(C.v, C.w, {}), l(w), a(w, x), y(w, x);
6910
6873
  }
@@ -6915,7 +6878,7 @@ function a0() {
6915
6878
  E || (E = x.edge(D, S), _ = !0), x.node(S).rank = x.node(D).rank + (_ ? E.minlen : -E.minlen);
6916
6879
  });
6917
6880
  }
6918
- function g(w, x, b) {
6881
+ function p(w, x, b) {
6919
6882
  return w.hasEdge(x, b);
6920
6883
  }
6921
6884
  function m(w, x, b) {
@@ -6930,9 +6893,9 @@ function l0() {
6930
6893
  var e = $n(), t = e.longestPath, n = Wl(), r = a0();
6931
6894
  qr = o;
6932
6895
  function o(c) {
6933
- var u = c.graph().ranker;
6934
- if (u instanceof Function)
6935
- return u(c);
6896
+ var d = c.graph().ranker;
6897
+ if (d instanceof Function)
6898
+ return d(c);
6936
6899
  switch (c.graph().ranker) {
6937
6900
  case "network-simplex":
6938
6901
  a(c);
@@ -6965,30 +6928,30 @@ function c0() {
6965
6928
  function e(r) {
6966
6929
  let o = n(r);
6967
6930
  r.graph().dummyChains.forEach((s) => {
6968
- let i = r.node(s), a = i.edgeObj, c = t(r, o, a.v, a.w), u = c.path, l = c.lca, d = 0, f = u[d], h = !0;
6931
+ let i = r.node(s), a = i.edgeObj, c = t(r, o, a.v, a.w), d = c.path, l = c.lca, u = 0, f = d[u], h = !0;
6969
6932
  for (; s !== a.w; ) {
6970
6933
  if (i = r.node(s), h) {
6971
- for (; (f = u[d]) !== l && r.node(f).maxRank < i.rank; )
6972
- d++;
6934
+ for (; (f = d[u]) !== l && r.node(f).maxRank < i.rank; )
6935
+ u++;
6973
6936
  f === l && (h = !1);
6974
6937
  }
6975
6938
  if (!h) {
6976
- for (; d < u.length - 1 && r.node(f = u[d + 1]).minRank <= i.rank; )
6977
- d++;
6978
- f = u[d];
6939
+ for (; u < d.length - 1 && r.node(f = d[u + 1]).minRank <= i.rank; )
6940
+ u++;
6941
+ f = d[u];
6979
6942
  }
6980
6943
  r.setParent(s, f), s = r.successors(s)[0];
6981
6944
  }
6982
6945
  });
6983
6946
  }
6984
6947
  function t(r, o, s, i) {
6985
- let a = [], c = [], u = Math.min(o[s].low, o[i].low), l = Math.max(o[s].lim, o[i].lim), d, f;
6986
- d = s;
6948
+ let a = [], c = [], d = Math.min(o[s].low, o[i].low), l = Math.max(o[s].lim, o[i].lim), u, f;
6949
+ u = s;
6987
6950
  do
6988
- d = r.parent(d), a.push(d);
6989
- while (d && (o[d].low > u || l > o[d].lim));
6990
- for (f = d, d = i; (d = r.parent(d)) !== f; )
6991
- c.push(d);
6951
+ u = r.parent(u), a.push(u);
6952
+ while (u && (o[u].low > d || l > o[u].lim));
6953
+ for (f = u, u = i; (u = r.parent(u)) !== f; )
6954
+ c.push(u);
6992
6955
  return { path: a.concat(c.reverse()), lca: f };
6993
6956
  }
6994
6957
  function n(r) {
@@ -7011,22 +6974,22 @@ function u0() {
7011
6974
  cleanup: s
7012
6975
  };
7013
6976
  function t(i) {
7014
- let a = e.addDummyNode(i, "root", {}, "_root"), c = r(i), u = Object.values(c), l = e.applyWithChunking(Math.max, u) - 1, d = 2 * l + 1;
7015
- i.graph().nestingRoot = a, i.edges().forEach((h) => i.edge(h).minlen *= d);
6977
+ let a = e.addDummyNode(i, "root", {}, "_root"), c = r(i), d = Object.values(c), l = e.applyWithChunking(Math.max, d) - 1, u = 2 * l + 1;
6978
+ i.graph().nestingRoot = a, i.edges().forEach((h) => i.edge(h).minlen *= u);
7016
6979
  let f = o(i) + 1;
7017
- i.children().forEach((h) => n(i, a, d, f, l, c, h)), i.graph().nodeRankFactor = d;
6980
+ i.children().forEach((h) => n(i, a, u, f, l, c, h)), i.graph().nodeRankFactor = u;
7018
6981
  }
7019
- function n(i, a, c, u, l, d, f) {
6982
+ function n(i, a, c, d, l, u, f) {
7020
6983
  let h = i.children(f);
7021
6984
  if (!h.length) {
7022
6985
  f !== a && i.setEdge(a, f, { weight: 0, minlen: c });
7023
6986
  return;
7024
6987
  }
7025
- let p = e.addBorderNode(i, "_bt"), y = e.addBorderNode(i, "_bb"), g = i.node(f);
7026
- i.setParent(p, f), g.borderTop = p, i.setParent(y, f), g.borderBottom = y, h.forEach((m) => {
7027
- n(i, a, c, u, l, d, m);
7028
- let w = i.node(m), x = w.borderTop ? w.borderTop : m, b = w.borderBottom ? w.borderBottom : m, C = w.borderTop ? u : 2 * u, S = x !== b ? 1 : l - d[f] + 1;
7029
- i.setEdge(p, x, {
6988
+ let g = e.addBorderNode(i, "_bt"), y = e.addBorderNode(i, "_bb"), p = i.node(f);
6989
+ i.setParent(g, f), p.borderTop = g, i.setParent(y, f), p.borderBottom = y, h.forEach((m) => {
6990
+ n(i, a, c, d, l, u, m);
6991
+ let w = i.node(m), x = w.borderTop ? w.borderTop : m, b = w.borderBottom ? w.borderBottom : m, C = w.borderTop ? d : 2 * d, S = x !== b ? 1 : l - u[f] + 1;
6992
+ i.setEdge(g, x, {
7030
6993
  weight: C,
7031
6994
  minlen: S,
7032
6995
  nestingEdge: !0
@@ -7035,15 +6998,15 @@ function u0() {
7035
6998
  minlen: S,
7036
6999
  nestingEdge: !0
7037
7000
  });
7038
- }), i.parent(f) || i.setEdge(a, p, { weight: 0, minlen: l + d[f] });
7001
+ }), i.parent(f) || i.setEdge(a, g, { weight: 0, minlen: l + u[f] });
7039
7002
  }
7040
7003
  function r(i) {
7041
7004
  var a = {};
7042
- function c(u, l) {
7043
- var d = i.children(u);
7044
- d && d.length && d.forEach((f) => c(f, l + 1)), a[u] = l;
7005
+ function c(d, l) {
7006
+ var u = i.children(d);
7007
+ u && u.length && u.forEach((f) => c(f, l + 1)), a[d] = l;
7045
7008
  }
7046
- return i.children().forEach((u) => c(u, 1)), a;
7009
+ return i.children().forEach((d) => c(d, 1)), a;
7047
7010
  }
7048
7011
  function o(i) {
7049
7012
  return i.edges().reduce((a, c) => a + i.edge(c).weight, 0);
@@ -7051,8 +7014,8 @@ function u0() {
7051
7014
  function s(i) {
7052
7015
  var a = i.graph();
7053
7016
  i.removeNode(a.nestingRoot), delete a.nestingRoot, i.edges().forEach((c) => {
7054
- var u = i.edge(c);
7055
- u.nestingEdge && i.removeEdge(c);
7017
+ var d = i.edge(c);
7018
+ d.nestingEdge && i.removeEdge(c);
7056
7019
  });
7057
7020
  }
7058
7021
  return Yr;
@@ -7068,15 +7031,15 @@ function d0() {
7068
7031
  let i = r.children(s), a = r.node(s);
7069
7032
  if (i.length && i.forEach(o), Object.hasOwn(a, "minRank")) {
7070
7033
  a.borderLeft = [], a.borderRight = [];
7071
- for (let c = a.minRank, u = a.maxRank + 1; c < u; ++c)
7034
+ for (let c = a.minRank, d = a.maxRank + 1; c < d; ++c)
7072
7035
  n(r, "borderLeft", "_bl", s, a, c), n(r, "borderRight", "_br", s, a, c);
7073
7036
  }
7074
7037
  }
7075
7038
  r.children().forEach(o);
7076
7039
  }
7077
7040
  function n(r, o, s, i, a, c) {
7078
- let u = { width: 0, height: 0, rank: c, borderType: o }, l = a[o][c - 1], d = e.addDummyNode(r, "border", u, s);
7079
- a[o][c] = d, r.setParent(d, i), l && r.setEdge(l, d, { weight: 1 });
7041
+ let d = { width: 0, height: 0, rank: c, borderType: o }, l = a[o][c - 1], u = e.addDummyNode(r, "border", d, s);
7042
+ a[o][c] = u, r.setParent(u, i), l && r.setEdge(l, u, { weight: 1 });
7080
7043
  }
7081
7044
  return jr;
7082
7045
  }
@@ -7088,23 +7051,23 @@ function f0() {
7088
7051
  undo: t
7089
7052
  };
7090
7053
  function e(c) {
7091
- let u = c.graph().rankdir.toLowerCase();
7092
- (u === "lr" || u === "rl") && n(c);
7054
+ let d = c.graph().rankdir.toLowerCase();
7055
+ (d === "lr" || d === "rl") && n(c);
7093
7056
  }
7094
7057
  function t(c) {
7095
- let u = c.graph().rankdir.toLowerCase();
7096
- (u === "bt" || u === "rl") && o(c), (u === "lr" || u === "rl") && (i(c), n(c));
7058
+ let d = c.graph().rankdir.toLowerCase();
7059
+ (d === "bt" || d === "rl") && o(c), (d === "lr" || d === "rl") && (i(c), n(c));
7097
7060
  }
7098
7061
  function n(c) {
7099
- c.nodes().forEach((u) => r(c.node(u))), c.edges().forEach((u) => r(c.edge(u)));
7062
+ c.nodes().forEach((d) => r(c.node(d))), c.edges().forEach((d) => r(c.edge(d)));
7100
7063
  }
7101
7064
  function r(c) {
7102
- let u = c.width;
7103
- c.width = c.height, c.height = u;
7065
+ let d = c.width;
7066
+ c.width = c.height, c.height = d;
7104
7067
  }
7105
7068
  function o(c) {
7106
- c.nodes().forEach((u) => s(c.node(u))), c.edges().forEach((u) => {
7107
- let l = c.edge(u);
7069
+ c.nodes().forEach((d) => s(c.node(d))), c.edges().forEach((d) => {
7070
+ let l = c.edge(d);
7108
7071
  l.points.forEach(s), Object.hasOwn(l, "y") && s(l);
7109
7072
  });
7110
7073
  }
@@ -7112,14 +7075,14 @@ function f0() {
7112
7075
  c.y = -c.y;
7113
7076
  }
7114
7077
  function i(c) {
7115
- c.nodes().forEach((u) => a(c.node(u))), c.edges().forEach((u) => {
7116
- let l = c.edge(u);
7078
+ c.nodes().forEach((d) => a(c.node(d))), c.edges().forEach((d) => {
7079
+ let l = c.edge(d);
7117
7080
  l.points.forEach(a), Object.hasOwn(l, "x") && a(l);
7118
7081
  });
7119
7082
  }
7120
7083
  function a(c) {
7121
- let u = c.x;
7122
- c.x = c.y, c.y = u;
7084
+ let d = c.x;
7085
+ c.x = c.y, c.y = d;
7123
7086
  }
7124
7087
  return Wr;
7125
7088
  }
@@ -7134,10 +7097,10 @@ function h0() {
7134
7097
  function c(l) {
7135
7098
  if (r[l]) return;
7136
7099
  r[l] = !0;
7137
- let d = n.node(l);
7138
- a[d.rank].push(l), n.successors(l).forEach(c);
7100
+ let u = n.node(l);
7101
+ a[u.rank].push(l), n.successors(l).forEach(c);
7139
7102
  }
7140
- return o.sort((l, d) => n.node(l).rank - n.node(d).rank).forEach(c), a;
7103
+ return o.sort((l, u) => n.node(l).rank - n.node(u).rank).forEach(c), a;
7141
7104
  }
7142
7105
  return Xr;
7143
7106
  }
@@ -7154,19 +7117,19 @@ function p0() {
7154
7117
  return s;
7155
7118
  }
7156
7119
  function n(r, o, s) {
7157
- let i = e(s, s.map((f, h) => h)), a = o.flatMap((f) => r.outEdges(f).map((h) => ({ pos: i[h.w], weight: r.edge(h).weight })).sort((h, p) => h.pos - p.pos)), c = 1;
7120
+ let i = e(s, s.map((f, h) => h)), a = o.flatMap((f) => r.outEdges(f).map((h) => ({ pos: i[h.w], weight: r.edge(h).weight })).sort((h, g) => h.pos - g.pos)), c = 1;
7158
7121
  for (; c < s.length; ) c <<= 1;
7159
- let u = 2 * c - 1;
7122
+ let d = 2 * c - 1;
7160
7123
  c -= 1;
7161
- let l = new Array(u).fill(0), d = 0;
7124
+ let l = new Array(d).fill(0), u = 0;
7162
7125
  return a.forEach((f) => {
7163
7126
  let h = f.pos + c;
7164
7127
  l[h] += f.weight;
7165
- let p = 0;
7128
+ let g = 0;
7166
7129
  for (; h > 0; )
7167
- h % 2 && (p += l[h + 1]), h = h - 1 >> 1, l[h] += f.weight;
7168
- d += f.weight * p;
7169
- }), d;
7130
+ h % 2 && (g += l[h + 1]), h = h - 1 >> 1, l[h] += f.weight;
7131
+ u += f.weight * g;
7132
+ }), u;
7170
7133
  }
7171
7134
  return Zr;
7172
7135
  }
@@ -7179,9 +7142,9 @@ function g0() {
7179
7142
  let o = t.inEdges(r);
7180
7143
  if (o.length) {
7181
7144
  let s = o.reduce((i, a) => {
7182
- let c = t.edge(a), u = t.node(a.v);
7145
+ let c = t.edge(a), d = t.node(a.v);
7183
7146
  return {
7184
- sum: i.sum + c.weight * u.order,
7147
+ sum: i.sum + c.weight * d.order,
7185
7148
  weight: i.weight + c.weight
7186
7149
  };
7187
7150
  }, { sum: 0, weight: 0 });
@@ -7204,18 +7167,18 @@ function m0() {
7204
7167
  Kr = t;
7205
7168
  function t(o, s) {
7206
7169
  let i = {};
7207
- o.forEach((c, u) => {
7170
+ o.forEach((c, d) => {
7208
7171
  let l = i[c.v] = {
7209
7172
  indegree: 0,
7210
7173
  in: [],
7211
7174
  out: [],
7212
7175
  vs: [c.v],
7213
- i: u
7176
+ i: d
7214
7177
  };
7215
7178
  c.barycenter !== void 0 && (l.barycenter = c.barycenter, l.weight = c.weight);
7216
7179
  }), s.edges().forEach((c) => {
7217
- let u = i[c.v], l = i[c.w];
7218
- u !== void 0 && l !== void 0 && (l.indegree++, u.out.push(i[c.w]));
7180
+ let d = i[c.v], l = i[c.w];
7181
+ d !== void 0 && l !== void 0 && (l.indegree++, d.out.push(i[c.w]));
7219
7182
  });
7220
7183
  let a = Object.values(i).filter((c) => !c.indegree);
7221
7184
  return n(a);
@@ -7223,13 +7186,13 @@ function m0() {
7223
7186
  function n(o) {
7224
7187
  let s = [];
7225
7188
  function i(c) {
7226
- return (u) => {
7227
- u.merged || (u.barycenter === void 0 || c.barycenter === void 0 || u.barycenter >= c.barycenter) && r(c, u);
7189
+ return (d) => {
7190
+ d.merged || (d.barycenter === void 0 || c.barycenter === void 0 || d.barycenter >= c.barycenter) && r(c, d);
7228
7191
  };
7229
7192
  }
7230
7193
  function a(c) {
7231
- return (u) => {
7232
- u.in.push(c), --u.indegree === 0 && o.push(u);
7194
+ return (d) => {
7195
+ d.in.push(c), --d.indegree === 0 && o.push(d);
7233
7196
  };
7234
7197
  }
7235
7198
  for (; o.length; ) {
@@ -7251,12 +7214,12 @@ function y0() {
7251
7214
  let e = fe();
7252
7215
  Qr = t;
7253
7216
  function t(o, s) {
7254
- let i = e.partition(o, (p) => Object.hasOwn(p, "barycenter")), a = i.lhs, c = i.rhs.sort((p, y) => y.i - p.i), u = [], l = 0, d = 0, f = 0;
7255
- a.sort(r(!!s)), f = n(u, c, f), a.forEach((p) => {
7256
- f += p.vs.length, u.push(p.vs), l += p.barycenter * p.weight, d += p.weight, f = n(u, c, f);
7217
+ let i = e.partition(o, (g) => Object.hasOwn(g, "barycenter")), a = i.lhs, c = i.rhs.sort((g, y) => y.i - g.i), d = [], l = 0, u = 0, f = 0;
7218
+ a.sort(r(!!s)), f = n(d, c, f), a.forEach((g) => {
7219
+ f += g.vs.length, d.push(g.vs), l += g.barycenter * g.weight, u += g.weight, f = n(d, c, f);
7257
7220
  });
7258
- let h = { vs: u.flat(!0) };
7259
- return d && (h.barycenter = l / d, h.weight = d), h;
7221
+ let h = { vs: d.flat(!0) };
7222
+ return u && (h.barycenter = l / u, h.weight = u), h;
7260
7223
  }
7261
7224
  function n(o, s, i) {
7262
7225
  let a;
@@ -7275,19 +7238,19 @@ function w0() {
7275
7238
  Gs = 1;
7276
7239
  let e = g0(), t = m0(), n = y0();
7277
7240
  Jr = r;
7278
- function r(i, a, c, u) {
7279
- let l = i.children(a), d = i.node(a), f = d ? d.borderLeft : void 0, h = d ? d.borderRight : void 0, p = {};
7241
+ function r(i, a, c, d) {
7242
+ let l = i.children(a), u = i.node(a), f = u ? u.borderLeft : void 0, h = u ? u.borderRight : void 0, g = {};
7280
7243
  f && (l = l.filter((w) => w !== f && w !== h));
7281
7244
  let y = e(i, l);
7282
7245
  y.forEach((w) => {
7283
7246
  if (i.children(w.v).length) {
7284
- let x = r(i, w.v, c, u);
7285
- p[w.v] = x, Object.hasOwn(x, "barycenter") && s(w, x);
7247
+ let x = r(i, w.v, c, d);
7248
+ g[w.v] = x, Object.hasOwn(x, "barycenter") && s(w, x);
7286
7249
  }
7287
7250
  });
7288
- let g = t(y, c);
7289
- o(g, p);
7290
- let m = n(g, u);
7251
+ let p = t(y, c);
7252
+ o(p, g);
7253
+ let m = n(p, d);
7291
7254
  if (f && (m.vs = [f, m.vs, h].flat(!0), i.predecessors(f).length)) {
7292
7255
  let w = i.node(i.predecessors(f)[0]), x = i.node(i.predecessors(h)[0]);
7293
7256
  Object.hasOwn(m, "barycenter") || (m.barycenter = 0, m.weight = 0), m.barycenter = (m.barycenter * m.weight + w.order + x.order) / (m.weight + 2), m.weight += 2;
@@ -7296,7 +7259,7 @@ function w0() {
7296
7259
  }
7297
7260
  function o(i, a) {
7298
7261
  i.forEach((c) => {
7299
- c.vs = c.vs.flatMap((u) => a[u] ? a[u].vs : u);
7262
+ c.vs = c.vs.flatMap((d) => a[d] ? a[d].vs : d);
7300
7263
  });
7301
7264
  }
7302
7265
  function s(i, a) {
@@ -7310,18 +7273,19 @@ function v0() {
7310
7273
  Ys = 1;
7311
7274
  let e = Oe().Graph, t = fe();
7312
7275
  eo = n;
7313
- function n(o, s, i) {
7314
- let a = r(o), c = new e({ compound: !0 }).setGraph({ root: a }).setDefaultNodeLabel((u) => o.node(u));
7315
- return o.nodes().forEach((u) => {
7316
- let l = o.node(u), d = o.parent(u);
7317
- (l.rank === s || l.minRank <= s && s <= l.maxRank) && (c.setNode(u), c.setParent(u, d || a), o[i](u).forEach((f) => {
7318
- let h = f.v === u ? f.w : f.v, p = c.edge(h, u), y = p !== void 0 ? p.weight : 0;
7319
- c.setEdge(h, u, { weight: o.edge(f).weight + y });
7320
- }), Object.hasOwn(l, "minRank") && c.setNode(u, {
7321
- borderLeft: l.borderLeft[s],
7322
- borderRight: l.borderRight[s]
7276
+ function n(o, s, i, a) {
7277
+ a || (a = o.nodes());
7278
+ let c = r(o), d = new e({ compound: !0 }).setGraph({ root: c }).setDefaultNodeLabel((l) => o.node(l));
7279
+ return a.forEach((l) => {
7280
+ let u = o.node(l), f = o.parent(l);
7281
+ (u.rank === s || u.minRank <= s && s <= u.maxRank) && (d.setNode(l), d.setParent(l, f || c), o[i](l).forEach((h) => {
7282
+ let g = h.v === l ? h.w : h.v, y = d.edge(g, l), p = y !== void 0 ? y.weight : 0;
7283
+ d.setEdge(g, l, { weight: o.edge(h).weight + p });
7284
+ }), Object.hasOwn(u, "minRank") && d.setNode(l, {
7285
+ borderLeft: u.borderLeft[s],
7286
+ borderRight: u.borderRight[s]
7323
7287
  }));
7324
- }), c;
7288
+ }), d;
7325
7289
  }
7326
7290
  function r(o) {
7327
7291
  for (var s; o.hasNode(s = t.uniqueId("_root")); ) ;
@@ -7336,10 +7300,10 @@ function b0() {
7336
7300
  function e(t, n, r) {
7337
7301
  let o = {}, s;
7338
7302
  r.forEach((i) => {
7339
- let a = t.parent(i), c, u;
7303
+ let a = t.parent(i), c, d;
7340
7304
  for (; a; ) {
7341
- if (c = t.parent(a), c ? (u = o[c], o[c] = a) : (u = s, s = a), u && u !== a) {
7342
- n.setEdge(u, a);
7305
+ if (c = t.parent(a), c ? (d = o[c], o[c] = a) : (d = s, s = a), d && d !== a) {
7306
+ n.setEdge(d, a);
7343
7307
  return;
7344
7308
  }
7345
7309
  a = c;
@@ -7354,36 +7318,45 @@ function x0() {
7354
7318
  Ws = 1;
7355
7319
  let e = h0(), t = p0(), n = w0(), r = v0(), o = b0(), s = Oe().Graph, i = fe();
7356
7320
  no = a;
7357
- function a(d, f) {
7321
+ function a(u, f) {
7358
7322
  if (f && typeof f.customOrder == "function") {
7359
- f.customOrder(d, a);
7323
+ f.customOrder(u, a);
7360
7324
  return;
7361
7325
  }
7362
- let h = i.maxRank(d), p = c(d, i.range(1, h + 1), "inEdges"), y = c(d, i.range(h - 1, -1, -1), "outEdges"), g = e(d);
7363
- if (l(d, g), f && f.disableOptimalOrderHeuristic)
7326
+ let h = i.maxRank(u), g = c(u, i.range(1, h + 1), "inEdges"), y = c(u, i.range(h - 1, -1, -1), "outEdges"), p = e(u);
7327
+ if (l(u, p), f && f.disableOptimalOrderHeuristic)
7364
7328
  return;
7365
7329
  let m = Number.POSITIVE_INFINITY, w;
7366
7330
  for (let x = 0, b = 0; b < 4; ++x, ++b) {
7367
- u(x % 2 ? p : y, x % 4 >= 2), g = i.buildLayerMatrix(d);
7368
- let C = t(d, g);
7369
- C < m && (b = 0, w = Object.assign({}, g), m = C);
7331
+ d(x % 2 ? g : y, x % 4 >= 2), p = i.buildLayerMatrix(u);
7332
+ let C = t(u, p);
7333
+ C < m && (b = 0, w = Object.assign({}, p), m = C);
7370
7334
  }
7371
- l(d, w);
7335
+ l(u, w);
7372
7336
  }
7373
- function c(d, f, h) {
7337
+ function c(u, f, h) {
7338
+ const g = /* @__PURE__ */ new Map(), y = (p, m) => {
7339
+ g.has(p) || g.set(p, []), g.get(p).push(m);
7340
+ };
7341
+ for (const p of u.nodes()) {
7342
+ const m = u.node(p);
7343
+ if (typeof m.rank == "number" && y(m.rank, p), typeof m.minRank == "number" && typeof m.maxRank == "number")
7344
+ for (let w = m.minRank; w <= m.maxRank; w++)
7345
+ w !== m.rank && y(w, p);
7346
+ }
7374
7347
  return f.map(function(p) {
7375
- return r(d, p, h);
7348
+ return r(u, p, h, g.get(p) || []);
7376
7349
  });
7377
7350
  }
7378
- function u(d, f) {
7351
+ function d(u, f) {
7379
7352
  let h = new s();
7380
- d.forEach(function(p) {
7381
- let y = p.graph().root, g = n(p, y, h, f);
7382
- g.vs.forEach((m, w) => p.node(m).order = w), o(p, h, g.vs);
7353
+ u.forEach(function(g) {
7354
+ let y = g.graph().root, p = n(g, y, h, f);
7355
+ p.vs.forEach((m, w) => g.node(m).order = w), o(g, h, p.vs);
7383
7356
  });
7384
7357
  }
7385
- function l(d, f) {
7386
- Object.values(f).forEach((h) => h.forEach((p, y) => d.node(p).order = y));
7358
+ function l(u, f) {
7359
+ Object.values(f).forEach((h) => h.forEach((g, y) => u.node(g).order = y));
7387
7360
  }
7388
7361
  return no;
7389
7362
  }
@@ -7400,33 +7373,33 @@ function E0() {
7400
7373
  hasConflict: i,
7401
7374
  verticalAlignment: a,
7402
7375
  horizontalCompaction: c,
7403
- alignCoordinates: d,
7376
+ alignCoordinates: u,
7404
7377
  findSmallestWidthAlignment: l,
7405
7378
  balance: f
7406
7379
  };
7407
- function n(g, m) {
7380
+ function n(p, m) {
7408
7381
  let w = {};
7409
7382
  function x(b, C) {
7410
7383
  let S = 0, D = 0, E = b.length, _ = C[C.length - 1];
7411
7384
  return C.forEach((N, M) => {
7412
- let O = o(g, N), F = O ? g.node(O).order : E;
7385
+ let O = o(p, N), F = O ? p.node(O).order : E;
7413
7386
  (O || N === _) && (C.slice(D, M + 1).forEach((v) => {
7414
- g.predecessors(v).forEach((A) => {
7415
- let L = g.node(A), z = L.order;
7416
- (z < S || F < z) && !(L.dummy && g.node(v).dummy) && s(w, A, v);
7387
+ p.predecessors(v).forEach((A) => {
7388
+ let L = p.node(A), z = L.order;
7389
+ (z < S || F < z) && !(L.dummy && p.node(v).dummy) && s(w, A, v);
7417
7390
  });
7418
7391
  }), D = M + 1, S = F);
7419
7392
  }), C;
7420
7393
  }
7421
7394
  return m.length && m.reduce(x), w;
7422
7395
  }
7423
- function r(g, m) {
7396
+ function r(p, m) {
7424
7397
  let w = {};
7425
7398
  function x(C, S, D, E, _) {
7426
7399
  let N;
7427
7400
  t.range(S, D).forEach((M) => {
7428
- N = C[M], g.node(N).dummy && g.predecessors(N).forEach((O) => {
7429
- let F = g.node(O);
7401
+ N = C[M], p.node(N).dummy && p.predecessors(N).forEach((O) => {
7402
+ let F = p.node(O);
7430
7403
  F.dummy && (F.order < E || F.order > _) && s(w, O, N);
7431
7404
  });
7432
7405
  });
@@ -7434,35 +7407,35 @@ function E0() {
7434
7407
  function b(C, S) {
7435
7408
  let D = -1, E, _ = 0;
7436
7409
  return S.forEach((N, M) => {
7437
- if (g.node(N).dummy === "border") {
7438
- let O = g.predecessors(N);
7439
- O.length && (E = g.node(O[0]).order, x(S, _, M, D, E), _ = M, D = E);
7410
+ if (p.node(N).dummy === "border") {
7411
+ let O = p.predecessors(N);
7412
+ O.length && (E = p.node(O[0]).order, x(S, _, M, D, E), _ = M, D = E);
7440
7413
  }
7441
7414
  x(S, _, S.length, E, C.length);
7442
7415
  }), S;
7443
7416
  }
7444
7417
  return m.length && m.reduce(b), w;
7445
7418
  }
7446
- function o(g, m) {
7447
- if (g.node(m).dummy)
7448
- return g.predecessors(m).find((w) => g.node(w).dummy);
7419
+ function o(p, m) {
7420
+ if (p.node(m).dummy)
7421
+ return p.predecessors(m).find((w) => p.node(w).dummy);
7449
7422
  }
7450
- function s(g, m, w) {
7423
+ function s(p, m, w) {
7451
7424
  if (m > w) {
7452
7425
  let b = m;
7453
7426
  m = w, w = b;
7454
7427
  }
7455
- let x = g[m];
7456
- x || (g[m] = x = {}), x[w] = !0;
7428
+ let x = p[m];
7429
+ x || (p[m] = x = {}), x[w] = !0;
7457
7430
  }
7458
- function i(g, m, w) {
7431
+ function i(p, m, w) {
7459
7432
  if (m > w) {
7460
7433
  let x = m;
7461
7434
  m = w, w = x;
7462
7435
  }
7463
- return !!g[m] && Object.hasOwn(g[m], w);
7436
+ return !!p[m] && Object.hasOwn(p[m], w);
7464
7437
  }
7465
- function a(g, m, w, x) {
7438
+ function a(p, m, w, x) {
7466
7439
  let b = {}, C = {}, S = {};
7467
7440
  return m.forEach((D) => {
7468
7441
  D.forEach((E, _) => {
@@ -7483,8 +7456,8 @@ function E0() {
7483
7456
  });
7484
7457
  }), { root: b, align: C };
7485
7458
  }
7486
- function c(g, m, w, x, b) {
7487
- let C = {}, S = u(g, m, w, b), D = b ? "borderLeft" : "borderRight";
7459
+ function c(p, m, w, x, b) {
7460
+ let C = {}, S = d(p, m, w, b), D = b ? "borderLeft" : "borderRight";
7488
7461
  function E(M, O) {
7489
7462
  let F = S.nodes(), v = F.pop(), A = {};
7490
7463
  for (; v; )
@@ -7494,67 +7467,67 @@ function E0() {
7494
7467
  C[M] = S.inEdges(M).reduce((O, F) => Math.max(O, C[F.v] + S.edge(F)), 0);
7495
7468
  }
7496
7469
  function N(M) {
7497
- let O = S.outEdges(M).reduce((v, A) => Math.min(v, C[A.w] - S.edge(A)), Number.POSITIVE_INFINITY), F = g.node(M);
7470
+ let O = S.outEdges(M).reduce((v, A) => Math.min(v, C[A.w] - S.edge(A)), Number.POSITIVE_INFINITY), F = p.node(M);
7498
7471
  O !== Number.POSITIVE_INFINITY && F.borderType !== D && (C[M] = Math.max(C[M], O));
7499
7472
  }
7500
7473
  return E(_, S.predecessors.bind(S)), E(N, S.successors.bind(S)), Object.keys(x).forEach((M) => C[M] = C[w[M]]), C;
7501
7474
  }
7502
- function u(g, m, w, x) {
7503
- let b = new e(), C = g.graph(), S = p(C.nodesep, C.edgesep, x);
7475
+ function d(p, m, w, x) {
7476
+ let b = new e(), C = p.graph(), S = g(C.nodesep, C.edgesep, x);
7504
7477
  return m.forEach((D) => {
7505
7478
  let E;
7506
7479
  D.forEach((_) => {
7507
7480
  let N = w[_];
7508
7481
  if (b.setNode(N), E) {
7509
7482
  var M = w[E], O = b.edge(M, N);
7510
- b.setEdge(M, N, Math.max(S(g, _, E), O || 0));
7483
+ b.setEdge(M, N, Math.max(S(p, _, E), O || 0));
7511
7484
  }
7512
7485
  E = _;
7513
7486
  });
7514
7487
  }), b;
7515
7488
  }
7516
- function l(g, m) {
7489
+ function l(p, m) {
7517
7490
  return Object.values(m).reduce((w, x) => {
7518
7491
  let b = Number.NEGATIVE_INFINITY, C = Number.POSITIVE_INFINITY;
7519
7492
  Object.entries(x).forEach(([D, E]) => {
7520
- let _ = y(g, D) / 2;
7493
+ let _ = y(p, D) / 2;
7521
7494
  b = Math.max(E + _, b), C = Math.min(E - _, C);
7522
7495
  });
7523
7496
  const S = b - C;
7524
7497
  return S < w[0] && (w = [S, x]), w;
7525
7498
  }, [Number.POSITIVE_INFINITY, null])[1];
7526
7499
  }
7527
- function d(g, m) {
7500
+ function u(p, m) {
7528
7501
  let w = Object.values(m), x = t.applyWithChunking(Math.min, w), b = t.applyWithChunking(Math.max, w);
7529
7502
  ["u", "d"].forEach((C) => {
7530
7503
  ["l", "r"].forEach((S) => {
7531
- let D = C + S, E = g[D];
7504
+ let D = C + S, E = p[D];
7532
7505
  if (E === m) return;
7533
7506
  let _ = Object.values(E), N = x - t.applyWithChunking(Math.min, _);
7534
- S !== "l" && (N = b - t.applyWithChunking(Math.max, _)), N && (g[D] = t.mapValues(E, (M) => M + N));
7507
+ S !== "l" && (N = b - t.applyWithChunking(Math.max, _)), N && (p[D] = t.mapValues(E, (M) => M + N));
7535
7508
  });
7536
7509
  });
7537
7510
  }
7538
- function f(g, m) {
7539
- return t.mapValues(g.ul, (w, x) => {
7511
+ function f(p, m) {
7512
+ return t.mapValues(p.ul, (w, x) => {
7540
7513
  if (m)
7541
- return g[m.toLowerCase()][x];
7514
+ return p[m.toLowerCase()][x];
7542
7515
  {
7543
- let b = Object.values(g).map((C) => C[x]).sort((C, S) => C - S);
7516
+ let b = Object.values(p).map((C) => C[x]).sort((C, S) => C - S);
7544
7517
  return (b[1] + b[2]) / 2;
7545
7518
  }
7546
7519
  });
7547
7520
  }
7548
- function h(g) {
7549
- let m = t.buildLayerMatrix(g), w = Object.assign(
7550
- n(g, m),
7551
- r(g, m)
7521
+ function h(p) {
7522
+ let m = t.buildLayerMatrix(p), w = Object.assign(
7523
+ n(p, m),
7524
+ r(p, m)
7552
7525
  ), x = {}, b;
7553
7526
  ["u", "d"].forEach((S) => {
7554
7527
  b = S === "u" ? m : Object.values(m).reverse(), ["l", "r"].forEach((D) => {
7555
7528
  D === "r" && (b = b.map((M) => Object.values(M).reverse()));
7556
- let E = (S === "u" ? g.predecessors : g.successors).bind(g), _ = a(g, b, w, E), N = c(
7557
- g,
7529
+ let E = (S === "u" ? p.predecessors : p.successors).bind(p), _ = a(p, b, w, E), N = c(
7530
+ p,
7558
7531
  b,
7559
7532
  _.root,
7560
7533
  _.align,
@@ -7563,10 +7536,10 @@ function E0() {
7563
7536
  D === "r" && (N = t.mapValues(N, (M) => -M)), x[S + D] = N;
7564
7537
  });
7565
7538
  });
7566
- let C = l(g, x);
7567
- return d(x, C), f(x, g.graph().align);
7539
+ let C = l(p, x);
7540
+ return u(x, C), f(x, p.graph().align);
7568
7541
  }
7569
- function p(g, m, w) {
7542
+ function g(p, m, w) {
7570
7543
  return (x, b, C) => {
7571
7544
  let S = x.node(b), D = x.node(C), E = 0, _;
7572
7545
  if (E += S.width / 2, Object.hasOwn(S, "labelpos"))
@@ -7578,7 +7551,7 @@ function E0() {
7578
7551
  _ = S.width / 2;
7579
7552
  break;
7580
7553
  }
7581
- if (_ && (E += w ? _ : -_), _ = 0, E += (S.dummy ? m : g) / 2, E += (D.dummy ? m : g) / 2, E += D.width / 2, Object.hasOwn(D, "labelpos"))
7554
+ if (_ && (E += w ? _ : -_), _ = 0, E += (S.dummy ? m : p) / 2, E += (D.dummy ? m : p) / 2, E += D.width / 2, Object.hasOwn(D, "labelpos"))
7582
7555
  switch (D.labelpos.toLowerCase()) {
7583
7556
  case "l":
7584
7557
  _ = D.width / 2;
@@ -7590,8 +7563,8 @@ function E0() {
7590
7563
  return _ && (E += w ? _ : -_), _ = 0, E;
7591
7564
  };
7592
7565
  }
7593
- function y(g, m) {
7594
- return g.node(m).width;
7566
+ function y(p, m) {
7567
+ return p.node(m).width;
7595
7568
  }
7596
7569
  return ro;
7597
7570
  }
@@ -7607,11 +7580,11 @@ function _0() {
7607
7580
  function r(o) {
7608
7581
  let s = e.buildLayerMatrix(o), i = o.graph().ranksep, a = 0;
7609
7582
  s.forEach((c) => {
7610
- const u = c.reduce((l, d) => {
7611
- const f = o.node(d).height;
7583
+ const d = c.reduce((l, u) => {
7584
+ const f = o.node(u).height;
7612
7585
  return l > f ? l : f;
7613
7586
  }, 0);
7614
- c.forEach((l) => o.node(l).y = a + u / 2), a += u + i;
7587
+ c.forEach((l) => o.node(l).y = a + d / 2), a += d + i;
7615
7588
  });
7616
7589
  }
7617
7590
  return oo;
@@ -7620,17 +7593,17 @@ var io, Us;
7620
7593
  function S0() {
7621
7594
  if (Us) return io;
7622
7595
  Us = 1;
7623
- let e = i0(), t = s0(), n = l0(), r = fe().normalizeRanks, o = c0(), s = fe().removeEmptyRanks, i = u0(), a = d0(), c = f0(), u = x0(), l = _0(), d = fe(), f = Oe().Graph;
7596
+ let e = i0(), t = s0(), n = l0(), r = fe().normalizeRanks, o = c0(), s = fe().removeEmptyRanks, i = u0(), a = d0(), c = f0(), d = x0(), l = _0(), u = fe(), f = Oe().Graph;
7624
7597
  io = h;
7625
7598
  function h(k, I) {
7626
- let P = I && I.debugTiming ? d.time : d.notime;
7599
+ let P = I && I.debugTiming ? u.time : u.notime;
7627
7600
  P("layout", () => {
7628
7601
  let B = P(" buildLayoutGraph", () => E(k));
7629
- P(" runLayout", () => p(B, P, I)), P(" updateInputGraph", () => y(k, B));
7602
+ P(" runLayout", () => g(B, P, I)), P(" updateInputGraph", () => y(k, B));
7630
7603
  });
7631
7604
  }
7632
- function p(k, I, P) {
7633
- I(" makeSpaceForEdgeLabels", () => _(k)), I(" removeSelfEdges", () => G(k)), I(" acyclic", () => e.run(k)), I(" nestingGraph.run", () => i.run(k)), I(" rank", () => n(d.asNonCompoundGraph(k))), I(" injectEdgeLabelProxies", () => N(k)), I(" removeEmptyRanks", () => s(k)), I(" nestingGraph.cleanup", () => i.cleanup(k)), I(" normalizeRanks", () => r(k)), I(" assignRankMinMax", () => M(k)), I(" removeEdgeLabelProxies", () => O(k)), I(" normalize.run", () => t.run(k)), I(" parentDummyChains", () => o(k)), I(" addBorderSegments", () => a(k)), I(" order", () => u(k, P)), I(" insertSelfEdges", () => R(k)), I(" adjustCoordinateSystem", () => c.adjust(k)), I(" position", () => l(k)), I(" positionSelfEdges", () => H(k)), I(" removeBorderNodes", () => z(k)), I(" normalize.undo", () => t.undo(k)), I(" fixupEdgeLabelCoords", () => A(k)), I(" undoCoordinateSystem", () => c.undo(k)), I(" translateGraph", () => F(k)), I(" assignNodeIntersects", () => v(k)), I(" reversePoints", () => L(k)), I(" acyclic.undo", () => e.undo(k));
7605
+ function g(k, I, P) {
7606
+ I(" makeSpaceForEdgeLabels", () => _(k)), I(" removeSelfEdges", () => G(k)), I(" acyclic", () => e.run(k)), I(" nestingGraph.run", () => i.run(k)), I(" rank", () => n(u.asNonCompoundGraph(k))), I(" injectEdgeLabelProxies", () => N(k)), I(" removeEmptyRanks", () => s(k)), I(" nestingGraph.cleanup", () => i.cleanup(k)), I(" normalizeRanks", () => r(k)), I(" assignRankMinMax", () => M(k)), I(" removeEdgeLabelProxies", () => O(k)), I(" normalize.run", () => t.run(k)), I(" parentDummyChains", () => o(k)), I(" addBorderSegments", () => a(k)), I(" order", () => d(k, P)), I(" insertSelfEdges", () => R(k)), I(" adjustCoordinateSystem", () => c.adjust(k)), I(" position", () => l(k)), I(" positionSelfEdges", () => H(k)), I(" removeBorderNodes", () => z(k)), I(" normalize.undo", () => t.undo(k)), I(" fixupEdgeLabelCoords", () => A(k)), I(" undoCoordinateSystem", () => c.undo(k)), I(" translateGraph", () => F(k)), I(" assignNodeIntersects", () => v(k)), I(" reversePoints", () => L(k)), I(" acyclic.undo", () => e.undo(k));
7634
7607
  }
7635
7608
  function y(k, I) {
7636
7609
  k.nodes().forEach((P) => {
@@ -7641,7 +7614,7 @@ function S0() {
7641
7614
  B.points = V.points, Object.hasOwn(V, "x") && (B.x = V.x, B.y = V.y);
7642
7615
  }), k.graph().width = I.graph().width, k.graph().height = I.graph().height;
7643
7616
  }
7644
- let g = ["nodesep", "edgesep", "ranksep", "marginx", "marginy"], m = { ranksep: 50, edgesep: 20, nodesep: 50, rankdir: "tb" }, w = ["acyclicer", "ranker", "rankdir", "align"], x = ["width", "height", "rank"], b = { width: 0, height: 0 }, C = ["minlen", "weight", "width", "height", "labeloffset"], S = {
7617
+ let p = ["nodesep", "edgesep", "ranksep", "marginx", "marginy"], m = { ranksep: 50, edgesep: 20, nodesep: 50, rankdir: "tb" }, w = ["acyclicer", "ranker", "rankdir", "align"], x = ["width", "height", "rank"], b = { width: 0, height: 0 }, C = ["minlen", "weight", "width", "height", "labeloffset"], S = {
7645
7618
  minlen: 1,
7646
7619
  weight: 1,
7647
7620
  width: 0,
@@ -7654,8 +7627,8 @@ function S0() {
7654
7627
  return I.setGraph(Object.assign(
7655
7628
  {},
7656
7629
  m,
7657
- q(P, g),
7658
- d.pick(P, w)
7630
+ q(P, p),
7631
+ u.pick(P, w)
7659
7632
  )), k.nodes().forEach((B) => {
7660
7633
  let V = j(k.node(B));
7661
7634
  const Y = q(V, x);
@@ -7668,7 +7641,7 @@ function S0() {
7668
7641
  {},
7669
7642
  S,
7670
7643
  q(V, C),
7671
- d.pick(V, D)
7644
+ u.pick(V, D)
7672
7645
  ));
7673
7646
  }), I;
7674
7647
  }
@@ -7684,7 +7657,7 @@ function S0() {
7684
7657
  let P = k.edge(I);
7685
7658
  if (P.width && P.height) {
7686
7659
  let B = k.node(I.v), Y = { rank: (k.node(I.w).rank - B.rank) / 2 + B.rank, e: I };
7687
- d.addDummyNode(k, "edge-proxy", Y, "_ep");
7660
+ u.addDummyNode(k, "edge-proxy", Y, "_ep");
7688
7661
  }
7689
7662
  });
7690
7663
  }
@@ -7723,7 +7696,7 @@ function S0() {
7723
7696
  function v(k) {
7724
7697
  k.edges().forEach((I) => {
7725
7698
  let P = k.edge(I), B = k.node(I.v), V = k.node(I.w), Y, W;
7726
- P.points ? (Y = P.points[0], W = P.points[P.points.length - 1]) : (P.points = [], Y = V, W = B), P.points.unshift(d.intersectRect(B, Y)), P.points.push(d.intersectRect(V, W));
7699
+ P.points ? (Y = P.points[0], W = P.points[P.points.length - 1]) : (P.points = [], Y = V, W = B), P.points.unshift(u.intersectRect(B, Y)), P.points.push(u.intersectRect(V, W));
7727
7700
  });
7728
7701
  }
7729
7702
  function A(k) {
@@ -7765,13 +7738,13 @@ function S0() {
7765
7738
  });
7766
7739
  }
7767
7740
  function R(k) {
7768
- var I = d.buildLayerMatrix(k);
7741
+ var I = u.buildLayerMatrix(k);
7769
7742
  I.forEach((P) => {
7770
7743
  var B = 0;
7771
7744
  P.forEach((V, Y) => {
7772
7745
  var W = k.node(V);
7773
7746
  W.order = Y + B, (W.selfEdges || []).forEach((Z) => {
7774
- d.addDummyNode(k, "selfedge", {
7747
+ u.addDummyNode(k, "selfedge", {
7775
7748
  width: Z.label.width,
7776
7749
  height: Z.label.height,
7777
7750
  rank: W.rank,
@@ -7799,7 +7772,7 @@ function S0() {
7799
7772
  });
7800
7773
  }
7801
7774
  function q(k, I) {
7802
- return d.mapValues(d.pick(k, I), Number);
7775
+ return u.mapValues(u.pick(k, I), Number);
7803
7776
  }
7804
7777
  function j(k) {
7805
7778
  var I = {};
@@ -7823,14 +7796,14 @@ function C0() {
7823
7796
  s.setNode(i, { label: i }), s.setParent(i, "layer" + r.node(i).rank);
7824
7797
  }), r.edges().forEach((i) => s.setEdge(i.v, i.w, {}, i.name)), o.forEach((i, a) => {
7825
7798
  let c = "layer" + a;
7826
- s.setNode(c, { rank: "same" }), i.reduce((u, l) => (s.setEdge(u, l, { style: "invis" }), l));
7799
+ s.setNode(c, { rank: "same" }), i.reduce((d, l) => (s.setEdge(d, l, { style: "invis" }), l));
7827
7800
  }), s;
7828
7801
  }
7829
7802
  return so;
7830
7803
  }
7831
7804
  var ao, Qs;
7832
7805
  function N0() {
7833
- return Qs || (Qs = 1, ao = "1.1.5"), ao;
7806
+ return Qs || (Qs = 1, ao = "1.1.8"), ao;
7834
7807
  }
7835
7808
  var lo, Js;
7836
7809
  function k0() {
@@ -7875,19 +7848,19 @@ const ea = 130, ta = 40, M0 = 130, L0 = (e, t = "LR") => {
7875
7848
  targetPosition: i,
7876
7849
  label: a,
7877
7850
  style: c = {},
7878
- markerType: u,
7851
+ markerType: d,
7879
7852
  markerEndId: l,
7880
- selected: d,
7853
+ selected: u,
7881
7854
  data: { onEdgeClick: f }
7882
7855
  }) => {
7883
- const [h, p, y] = jo({
7856
+ const [h, g, y] = jo({
7884
7857
  sourceX: t,
7885
7858
  sourceY: n,
7886
7859
  sourcePosition: s,
7887
7860
  targetX: r,
7888
7861
  targetY: o,
7889
7862
  targetPosition: i
7890
- }), g = Vp(u, l);
7863
+ }), p = Vp(d, l);
7891
7864
  return /* @__PURE__ */ te(be, { children: [
7892
7865
  /* @__PURE__ */ T(
7893
7866
  "path",
@@ -7896,10 +7869,10 @@ const ea = 130, ta = 40, M0 = 130, L0 = (e, t = "LR") => {
7896
7869
  style: c,
7897
7870
  className: "react-flow__edge-path",
7898
7871
  d: h,
7899
- markerEnd: g
7872
+ markerEnd: p
7900
7873
  }
7901
7874
  ),
7902
- !d && /* @__PURE__ */ T("text", { children: /* @__PURE__ */ T(
7875
+ !u && /* @__PURE__ */ T("text", { children: /* @__PURE__ */ T(
7903
7876
  "textPath",
7904
7877
  {
7905
7878
  href: `#${e}`,
@@ -7909,12 +7882,12 @@ const ea = 130, ta = 40, M0 = 130, L0 = (e, t = "LR") => {
7909
7882
  children: a
7910
7883
  }
7911
7884
  ) }),
7912
- d && /* @__PURE__ */ T(
7885
+ u && /* @__PURE__ */ T(
7913
7886
  "foreignObject",
7914
7887
  {
7915
7888
  width: bn,
7916
7889
  height: bn,
7917
- x: p - bn / 2,
7890
+ x: g - bn / 2,
7918
7891
  y: y - bn / 2,
7919
7892
  className: "edgebutton-foreignobject",
7920
7893
  requiredExtensions: "http://www.w3.org/1999/xhtml",
@@ -8079,10 +8052,10 @@ const j0 = ({
8079
8052
  const [t, n] = re(!1), [r, o] = Ne(
8080
8053
  () => ra(e),
8081
8054
  []
8082
- ), [s, i, a] = vm(r), [c, u, l] = bm(o);
8055
+ ), [s, i, a] = vm(r), [c, d, l] = bm(o);
8083
8056
  return Gm(() => {
8084
- const [h, p] = ra(e);
8085
- i(h), u(p);
8057
+ const [h, g] = ra(e);
8058
+ i(h), d(g);
8086
8059
  }, [e]), /* @__PURE__ */ te(
8087
8060
  Pl,
8088
8061
  {
@@ -8129,12 +8102,12 @@ const j0 = ({
8129
8102
  onAddExecution: t,
8130
8103
  onAddFlow: n
8131
8104
  }) => {
8132
- const { adminClient: r } = mt(), { t: o } = _e(), [s, i] = re(!1), [a, c] = re(), [u, l] = re();
8105
+ const { adminClient: r } = mt(), { t: o } = _e(), [s, i] = re(!1), [a, c] = re(), [d, l] = re();
8133
8106
  return Rt(
8134
8107
  () => r.authenticationManagement.getFlow({
8135
8108
  flowId: e.flowId
8136
8109
  }),
8137
- ({ providerId: d }) => l(d),
8110
+ ({ providerId: u }) => l(u),
8138
8111
  []
8139
8112
  ), /* @__PURE__ */ T(Hn, { content: o("add"), children: /* @__PURE__ */ te(be, { children: [
8140
8113
  /* @__PURE__ */ T(
@@ -8144,11 +8117,11 @@ const j0 = ({
8144
8117
  position: "right"
8145
8118
  },
8146
8119
  isOpen: s,
8147
- onOpenChange: (d) => i(d),
8148
- toggle: (d) => /* @__PURE__ */ T(
8120
+ onOpenChange: (u) => i(u),
8121
+ toggle: (u) => /* @__PURE__ */ T(
8149
8122
  la,
8150
8123
  {
8151
- ref: d,
8124
+ ref: u,
8152
8125
  variant: "plain",
8153
8126
  onClick: () => i(!s),
8154
8127
  "aria-label": o("add"),
@@ -8161,7 +8134,7 @@ const j0 = ({
8161
8134
  /* @__PURE__ */ T(
8162
8135
  lt,
8163
8136
  {
8164
- onClick: () => c(u === "form-flow" ? "form" : "basic"),
8137
+ onClick: () => c(d === "form-flow" ? "form" : "basic"),
8165
8138
  children: o("addExecution")
8166
8139
  },
8167
8140
  "addStep"
@@ -8183,8 +8156,8 @@ const j0 = ({
8183
8156
  {
8184
8157
  name: e.displayName,
8185
8158
  type: a,
8186
- onSelect: (d) => {
8187
- d && t(e, d), c(void 0);
8159
+ onSelect: (u) => {
8160
+ u && t(e, u), c(void 0);
8188
8161
  }
8189
8162
  }
8190
8163
  ),
@@ -8193,8 +8166,8 @@ const j0 = ({
8193
8166
  {
8194
8167
  name: e.displayName,
8195
8168
  onCancel: () => c(void 0),
8196
- onConfirm: (d) => {
8197
- n(e, d), c(void 0);
8169
+ onConfirm: (u) => {
8170
+ n(e, u), c(void 0);
8198
8171
  }
8199
8172
  }
8200
8173
  )
@@ -8288,7 +8261,7 @@ const j0 = ({
8288
8261
  }, U0 = ({
8289
8262
  execution: e
8290
8263
  }) => {
8291
- const { adminClient: t } = mt(), { t: n } = _e(), { addAlert: r, addError: o } = Oo(), [s, i] = re(!1), [a, c] = re(), [u, l] = re(), d = zn(), { setValue: f, handleSubmit: h } = d, p = e.authenticationFlow ? [] : [
8264
+ const { adminClient: t } = mt(), { t: n } = _e(), { addAlert: r, addError: o } = Oo(), [s, i] = re(!1), [a, c] = re(), [d, l] = re(), u = zn(), { setValue: f, handleSubmit: h } = u, g = e.authenticationFlow ? [] : [
8292
8265
  {
8293
8266
  helpText: n("authenticatorRefConfig.value.help"),
8294
8267
  label: n("authenticatorRefConfig.value.label"),
@@ -8320,7 +8293,7 @@ const j0 = ({
8320
8293
  return e.authenticationConfig && (m = await t.authenticationManagement.getConfig({
8321
8294
  id: e.authenticationConfig
8322
8295
  })), w.properties = [
8323
- ...p,
8296
+ ...g,
8324
8297
  ...w.properties
8325
8298
  ], { configDescription: w, config: m };
8326
8299
  },
@@ -8331,7 +8304,7 @@ const j0 = ({
8331
8304
  ), oe(() => {
8332
8305
  a && y(a);
8333
8306
  }, [a]);
8334
- const g = async (m) => {
8307
+ const p = async (m) => {
8335
8308
  const w = eu(m);
8336
8309
  try {
8337
8310
  if (a) {
@@ -8364,15 +8337,15 @@ const j0 = ({
8364
8337
  children: /* @__PURE__ */ T(Uc, {})
8365
8338
  }
8366
8339
  ) }),
8367
- u && /* @__PURE__ */ T(
8340
+ d && /* @__PURE__ */ T(
8368
8341
  nn,
8369
8342
  {
8370
8343
  variant: rn.small,
8371
8344
  isOpen: s,
8372
- title: n("executionConfig", { name: u.name }),
8345
+ title: n("executionConfig", { name: d.name }),
8373
8346
  onClose: () => i(!1),
8374
- children: /* @__PURE__ */ te(on, { id: "execution-config-form", onSubmit: h(g), children: [
8375
- /* @__PURE__ */ te(Vn, { ...d, children: [
8347
+ children: /* @__PURE__ */ te(on, { id: "execution-config-form", onSubmit: h(p), children: [
8348
+ /* @__PURE__ */ te(Vn, { ...u, children: [
8376
8349
  /* @__PURE__ */ T(
8377
8350
  Cn,
8378
8351
  {
@@ -8387,7 +8360,7 @@ const j0 = ({
8387
8360
  Kc,
8388
8361
  {
8389
8362
  stringify: !0,
8390
- properties: u.properties || []
8363
+ properties: d.properties || []
8391
8364
  }
8392
8365
  )
8393
8366
  ] }),
@@ -8509,7 +8482,7 @@ const ey = ({
8509
8482
  onAddFlow: s,
8510
8483
  onDelete: i
8511
8484
  }) => {
8512
- const { t: a } = _e(), c = !!t.executionList?.length, u = {
8485
+ const { t: a } = _e(), c = !!t.executionList?.length, d = {
8513
8486
  onCollapse: () => n(t),
8514
8487
  props: {
8515
8488
  isExpanded: !t.isCollapsed,
@@ -8523,7 +8496,7 @@ const ey = ({
8523
8496
  /* @__PURE__ */ T(iu, { hasNoWrapper: !0, children: /* @__PURE__ */ te(
8524
8497
  ha,
8525
8498
  {
8526
- row: { props: u.props },
8499
+ row: { props: d.props },
8527
8500
  className: "keycloak__authentication__flow-row",
8528
8501
  children: [
8529
8502
  /* @__PURE__ */ T(
@@ -8534,7 +8507,7 @@ const ey = ({
8534
8507
  }
8535
8508
  }
8536
8509
  ),
8537
- /* @__PURE__ */ T(Ve, { treeRow: u, children: /* @__PURE__ */ T(
8510
+ /* @__PURE__ */ T(Ve, { treeRow: d, children: /* @__PURE__ */ T(
8538
8511
  ey,
8539
8512
  {
8540
8513
  id: t.id,
@@ -8621,8 +8594,8 @@ class ti {
8621
8594
  return o - 1;
8622
8595
  const a = this.#e[o + 1]?.level || 0;
8623
8596
  if (i < a) {
8624
- const u = { ...s, executionList: [], isCollapsed: !1 };
8625
- o = this.#t(o + 1, i, u), r.executionList?.push(u);
8597
+ const d = { ...s, executionList: [], isCollapsed: !1 };
8598
+ o = this.#t(o + 1, i, d), r.executionList?.push(d);
8626
8599
  } else
8627
8600
  r.executionList?.push(s);
8628
8601
  }
@@ -8656,11 +8629,11 @@ class ti {
8656
8629
  return r;
8657
8630
  }
8658
8631
  getChange(t, n) {
8659
- const r = this.order(), o = n.findIndex((l) => l === t.id), s = r.findIndex((l) => l.id === t.id), i = r[s], a = r[o], c = this.#n(i.level, s), u = this.#n(a.level, o);
8660
- return c?.id !== u?.id ? a.level > 0 ? new oa(
8661
- u?.executionList?.length || 0,
8632
+ const r = this.order(), o = n.findIndex((l) => l === t.id), s = r.findIndex((l) => l.id === t.id), i = r[s], a = r[o], c = this.#n(i.level, s), d = this.#n(a.level, o);
8633
+ return c?.id !== d?.id ? a.level > 0 ? new oa(
8634
+ d?.executionList?.length || 0,
8662
8635
  a.index,
8663
- u
8636
+ d
8664
8637
  ) : new oa(this.expandableList.length, a.index) : new Kl(i.index, a.index);
8665
8638
  }
8666
8639
  clone() {
@@ -8670,7 +8643,7 @@ class ti {
8670
8643
  }
8671
8644
  const Fn = (e) => e.displayName?.startsWith("Condition ");
8672
8645
  function ly() {
8673
- const { adminClient: e } = mt(), { t } = _e(), { realm: n } = su(), { addAlert: r, addError: o } = Oo(), { id: s, usedBy: i, builtIn: a } = wu(), c = vu(), [u, l] = re(0), d = () => l((/* @__PURE__ */ new Date()).getTime()), [f, h] = re(!0), [p, y] = re(), [g, m] = re(), [w, x] = re(""), [b, C] = re(), [S, D] = re(), [E, _] = re(), [N, M, O] = co(), [F, v] = re(!1), [A, L] = co();
8646
+ const { adminClient: e } = mt(), { t } = _e(), { realm: n } = su(), { addAlert: r, addError: o } = Oo(), { id: s, usedBy: i, builtIn: a } = wu(), c = vu(), [d, l] = re(0), u = () => l((/* @__PURE__ */ new Date()).getTime()), [f, h] = re(!0), [g, y] = re(), [p, m] = re(), [w, x] = re(""), [b, C] = re(), [S, D] = re(), [E, _] = re(), [N, M, O] = co(), [F, v] = re(!1), [A, L] = co();
8674
8647
  Rt(
8675
8648
  async () => {
8676
8649
  const Y = (await e.authenticationManagement.getFlows()).find((Z) => Z.id === s);
@@ -8684,7 +8657,7 @@ function ly() {
8684
8657
  ({ flow: V, executions: Y }) => {
8685
8658
  y(V), m(new ti(Y));
8686
8659
  },
8687
- [u]
8660
+ [d]
8688
8661
  );
8689
8662
  const z = async (V, Y) => {
8690
8663
  try {
@@ -8700,7 +8673,7 @@ function ly() {
8700
8673
  }
8701
8674
  if ("authenticationFlow" in V) {
8702
8675
  const K = V, ee = await e.authenticationManagement.addFlowToFlow({
8703
- flow: Y.parent?.displayName || p?.alias,
8676
+ flow: Y.parent?.displayName || g?.alias,
8704
8677
  alias: K.displayName,
8705
8678
  description: K.description,
8706
8679
  provider: V.providerId,
@@ -8715,7 +8688,7 @@ function ly() {
8715
8688
  );
8716
8689
  } else {
8717
8690
  const K = await e.authenticationManagement.addExecutionToFlow({
8718
- flow: Y.parent?.displayName || p?.alias,
8691
+ flow: Y.parent?.displayName || g?.alias,
8719
8692
  provider: V.providerId
8720
8693
  });
8721
8694
  if (ne.id) {
@@ -8736,7 +8709,7 @@ function ly() {
8736
8709
  }) : await e.authenticationManagement.raisePriorityExecution({
8737
8710
  id: W
8738
8711
  });
8739
- d(), r(t("updateFlowSuccess"), We.success);
8712
+ u(), r(t("updateFlowSuccess"), We.success);
8740
8713
  } catch (W) {
8741
8714
  o("updateFlowError", W);
8742
8715
  }
@@ -8744,9 +8717,9 @@ function ly() {
8744
8717
  const { executionList: Y, isCollapsed: W, ...Z } = V;
8745
8718
  try {
8746
8719
  await e.authenticationManagement.updateExecution(
8747
- { flow: p?.alias },
8720
+ { flow: g?.alias },
8748
8721
  Z
8749
- ), d(), r(t("updateFlowSuccess"), We.success);
8722
+ ), u(), r(t("updateFlowSuccess"), We.success);
8750
8723
  } catch (ne) {
8751
8724
  o("updateFlowError", ne);
8752
8725
  }
@@ -8755,7 +8728,7 @@ function ly() {
8755
8728
  await e.authenticationManagement.addExecutionToFlow({
8756
8729
  flow: V,
8757
8730
  provider: Y.id
8758
- }), d(), r(t("updateFlowSuccess"), We.success);
8731
+ }), u(), r(t("updateFlowSuccess"), We.success);
8759
8732
  } catch (W) {
8760
8733
  o("updateFlowError", W);
8761
8734
  }
@@ -8767,7 +8740,7 @@ function ly() {
8767
8740
  description: W,
8768
8741
  provider: ne,
8769
8742
  type: Z
8770
- }), d(), r(t("updateFlowSuccess"), We.success);
8743
+ }), u(), r(t("updateFlowSuccess"), We.success);
8771
8744
  } catch (K) {
8772
8745
  o("updateFlowError", K);
8773
8746
  }
@@ -8786,7 +8759,7 @@ function ly() {
8786
8759
  try {
8787
8760
  await e.authenticationManagement.delExecution({
8788
8761
  id: E?.id
8789
- }), r(t("deleteExecutionSuccess"), We.success), d();
8762
+ }), r(t("deleteExecutionSuccess"), We.success), u();
8790
8763
  } catch (V) {
8791
8764
  o("deleteExecutionError", V);
8792
8765
  }
@@ -8795,7 +8768,7 @@ function ly() {
8795
8768
  titleKey: "deleteConfirmFlow",
8796
8769
  children: /* @__PURE__ */ te(ui, { i18nKey: "deleteConfirmFlowMessage", children: [
8797
8770
  " ",
8798
- /* @__PURE__ */ T("strong", { children: { flow: p?.alias || "" } }),
8771
+ /* @__PURE__ */ T("strong", { children: { flow: g?.alias || "" } }),
8799
8772
  "."
8800
8773
  ] }),
8801
8774
  continueButtonLabel: "delete",
@@ -8803,13 +8776,13 @@ function ly() {
8803
8776
  onConfirm: async () => {
8804
8777
  try {
8805
8778
  await e.authenticationManagement.deleteFlow({
8806
- flowId: p.id
8779
+ flowId: g.id
8807
8780
  }), c(au({ realm: n })), r(t("deleteFlowSuccess"), We.success);
8808
8781
  } catch (V) {
8809
8782
  o("deleteFlowError", V);
8810
8783
  }
8811
8784
  }
8812
- }), P = g?.expandableList.length !== 0, B = [
8785
+ }), P = p?.expandableList.length !== 0, B = [
8813
8786
  ...i !== "DEFAULT" ? [
8814
8787
  /* @__PURE__ */ T(
8815
8788
  lt,
@@ -8849,7 +8822,7 @@ function ly() {
8849
8822
  A && /* @__PURE__ */ T(
8850
8823
  lu,
8851
8824
  {
8852
- flowAlias: p?.alias,
8825
+ flowAlias: g?.alias,
8853
8826
  onClose: (V) => {
8854
8827
  L(), c(
8855
8828
  cu({
@@ -8862,23 +8835,23 @@ function ly() {
8862
8835
  }
8863
8836
  }
8864
8837
  ),
8865
- N && p && /* @__PURE__ */ T(
8838
+ N && g && /* @__PURE__ */ T(
8866
8839
  uu,
8867
8840
  {
8868
- name: p.alias,
8869
- description: p.description,
8841
+ name: g.alias,
8842
+ description: g.description,
8870
8843
  toggleDialog: M,
8871
8844
  onComplete: () => {
8872
- d(), O(!1);
8845
+ u(), O(!1);
8873
8846
  }
8874
8847
  }
8875
8848
  ),
8876
8849
  F && /* @__PURE__ */ T(
8877
8850
  Ru,
8878
8851
  {
8879
- flow: p,
8852
+ flow: g,
8880
8853
  toggleDialog: () => {
8881
- v(!F), d();
8854
+ v(!F), u();
8882
8855
  }
8883
8856
  }
8884
8857
  ),
@@ -8886,7 +8859,7 @@ function ly() {
8886
8859
  /* @__PURE__ */ T(
8887
8860
  du,
8888
8861
  {
8889
- titleKey: p?.alias || "",
8862
+ titleKey: g?.alias || "",
8890
8863
  badges: [
8891
8864
  { text: /* @__PURE__ */ T(Io, { children: t(`used.${i}`) }) },
8892
8865
  a ? {
@@ -8898,7 +8871,7 @@ function ly() {
8898
8871
  }
8899
8872
  ),
8900
8873
  /* @__PURE__ */ te(sa, { variant: "light", children: [
8901
- g && P && /* @__PURE__ */ te(be, { children: [
8874
+ p && P && /* @__PURE__ */ te(be, { children: [
8902
8875
  /* @__PURE__ */ T(fu, { id: "toolbar", children: /* @__PURE__ */ te(hu, { children: [
8903
8876
  /* @__PURE__ */ T(tr, { children: /* @__PURE__ */ te(fa, { children: [
8904
8877
  /* @__PURE__ */ T(
@@ -8946,35 +8919,35 @@ function ly() {
8946
8919
  pu,
8947
8920
  {
8948
8921
  onDrag: ({ index: V }) => {
8949
- const Y = g.findExecution(V);
8950
- return x(t("onDragStart", { item: Y.displayName })), Y.isCollapsed || (Y.isCollapsed = !0, m(g.clone())), !0;
8922
+ const Y = p.findExecution(V);
8923
+ return x(t("onDragStart", { item: Y.displayName })), Y.isCollapsed || (Y.isCollapsed = !0, m(p.clone())), !0;
8951
8924
  },
8952
8925
  onDragMove: ({ index: V }) => {
8953
- const Y = g.findExecution(V);
8926
+ const Y = p.findExecution(V);
8954
8927
  x(t("onDragMove", { item: Y?.displayName }));
8955
8928
  },
8956
8929
  onDrop: (V, Y) => {
8957
8930
  if (Y) {
8958
- const W = g.findExecution(V.index), Z = g.order().map((ee) => ee.id);
8931
+ const W = p.findExecution(V.index), Z = p.order().map((ee) => ee.id);
8959
8932
  x(
8960
8933
  t("onDragFinish", { list: W.displayName })
8961
8934
  );
8962
8935
  const [ne] = Z.splice(V.index, 1);
8963
8936
  Z.splice(Y.index, 0, ne);
8964
- const K = g.getChange(W, Z);
8937
+ const K = p.getChange(W, Z);
8965
8938
  return z(W, K), !0;
8966
8939
  } else
8967
8940
  return x(t("onDragCancel")), !1;
8968
8941
  },
8969
8942
  children: /* @__PURE__ */ T(gu, { hasNoWrapper: !0, children: /* @__PURE__ */ te(mu, { "aria-label": t("flows"), isTreeTable: !0, children: [
8970
8943
  /* @__PURE__ */ T(W0, {}),
8971
- /* @__PURE__ */ T(be, { children: g.expandableList.map((V) => /* @__PURE__ */ T(yu, { draggable: !0, children: /* @__PURE__ */ T(
8944
+ /* @__PURE__ */ T(be, { children: p.expandableList.map((V) => /* @__PURE__ */ T(yu, { draggable: !0, children: /* @__PURE__ */ T(
8972
8945
  Ul,
8973
8946
  {
8974
8947
  builtIn: !!a,
8975
8948
  execution: V,
8976
8949
  onRowClick: (Y) => {
8977
- Y.isCollapsed = !Y.isCollapsed, m(g.clone());
8950
+ Y.isCollapsed = !Y.isCollapsed, m(p.clone());
8978
8951
  },
8979
8952
  onRowChange: G,
8980
8953
  onAddExecution: (Y, W) => R(Y.displayName, W),
@@ -8987,37 +8960,37 @@ function ly() {
8987
8960
  ] }) })
8988
8961
  }
8989
8962
  ),
8990
- p && /* @__PURE__ */ te(be, { children: [
8963
+ g && /* @__PURE__ */ te(be, { children: [
8991
8964
  b && /* @__PURE__ */ T(
8992
8965
  Ao,
8993
8966
  {
8994
- name: p.alias,
8995
- type: p.providerId === "client-flow" ? "client" : "basic",
8967
+ name: g.alias,
8968
+ type: g.providerId === "client-flow" ? "client" : "basic",
8996
8969
  onSelect: async (V) => {
8997
- V && await R(p.alias, V), C(!1);
8970
+ V && await R(g.alias, V), C(!1);
8998
8971
  }
8999
8972
  }
9000
8973
  ),
9001
8974
  S && /* @__PURE__ */ T(
9002
8975
  To,
9003
8976
  {
9004
- name: p.alias,
8977
+ name: g.alias,
9005
8978
  onCancel: () => D(!1),
9006
8979
  onConfirm: async (V) => {
9007
- await H(p.alias, V), D(!1);
8980
+ await H(g.alias, V), D(!1);
9008
8981
  }
9009
8982
  }
9010
8983
  )
9011
8984
  ] }),
9012
8985
  /* @__PURE__ */ T("div", { className: "pf-v5-screen-reader", "aria-live": "assertive", children: w })
9013
8986
  ] }),
9014
- !f && g?.expandableList && /* @__PURE__ */ T(j0, { executionList: g }),
9015
- !g?.expandableList || p && !P && /* @__PURE__ */ T(
8987
+ !f && p?.expandableList && /* @__PURE__ */ T(j0, { executionList: p }),
8988
+ !p?.expandableList || g && !P && /* @__PURE__ */ T(
9016
8989
  Fu,
9017
8990
  {
9018
- flow: p,
9019
- onAddExecution: (V) => R(p.alias, V),
9020
- onAddFlow: (V) => H(p.alias, V)
8991
+ flow: g,
8992
+ onAddExecution: (V) => R(g.alias, V),
8993
+ onAddFlow: (V) => H(g.alias, V)
9021
8994
  }
9022
8995
  )
9023
8996
  ] })
@@ -9027,4 +9000,4 @@ export {
9027
9000
  ly as default,
9028
9001
  Fn as providerConditionFilter
9029
9002
  };
9030
- //# sourceMappingURL=FlowDetails-Dkl-8lLX.js.map
9003
+ //# sourceMappingURL=FlowDetails--N_U426z.js.map