@g1cloud/bpmn-modeler-next 5.0.0-beta.47 → 5.0.0-beta.48

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.
@@ -406,12 +406,12 @@ class Nb {
406
406
  if (!T) return [];
407
407
  const $ = p.filter((j) => j.body === T).map(Ln);
408
408
  return $.length ? $ : [d];
409
- })(f), m = s !== void 0 && f && !h.includes(t.locale) ? h[0] : t.locale, w = (T) => {
409
+ })(f), g = s !== void 0 && f && !h.includes(t.locale) ? h[0] : t.locale, w = (T) => {
410
410
  var $;
411
411
  return (($ = p.find((j) => Ln(j) === T && j.body)) == null ? void 0 : $.body) ?? (h.includes(T) ? f : "");
412
- }, y = (T) => Br(c).some(($) => $.locale === T), v = w(m);
412
+ }, y = (T) => Br(c).some(($) => $.locale === T), v = w(g);
413
413
  if (v === i) return [];
414
- const b = !!v && !y(m), E = b ? r.filter((T) => T !== m && w(T) && !y(T)) : [], R = () => {
414
+ const b = !!v && !y(g), E = b ? r.filter((T) => T !== g && w(T) && !y(T)) : [], R = () => {
415
415
  let T = c.extensionElements;
416
416
  return T || (T = this.moddle.create("bpmn:ExtensionElements", { values: [] }), T.$parent = c, c.extensionElements = T, u.push(() => delete c.extensionElements)), T.get("values");
417
417
  }, D = (T, $) => {
@@ -430,7 +430,7 @@ class Nb {
430
430
  $.splice(j, 1), u.push(() => $.splice(j, 0, T));
431
431
  };
432
432
  if (s === void 0) {
433
- if (m === o && l) {
433
+ if (g === o && l) {
434
434
  if (f && !p.some(($) => $.body === f)) {
435
435
  const $ = a && a !== o ? a : void 0;
436
436
  $ && D($, f);
@@ -440,14 +440,14 @@ class Nb {
440
440
  T ? l.target[l.key] = f : delete l.target[l.key];
441
441
  });
442
442
  }
443
- D(m, i);
444
- } else (p.some((T) => Ln(T) === m) || !f && m !== d) && D(m, i);
445
- if (!b) for (const T of Br(c).filter(($) => $.locale === m)) P(T);
443
+ D(g, i);
444
+ } else (p.some((T) => Ln(T) === g) || !f && g !== d) && D(g, i);
445
+ if (!b) for (const T of Br(c).filter(($) => $.locale === g)) P(T);
446
446
  for (const T of E) {
447
- const $ = R(), j = this.moddle.create(dd, { locale: T, sourceLocale: m, previous: v });
447
+ const $ = R(), j = this.moddle.create(dd, { locale: T, sourceLocale: g, previous: v });
448
448
  j.$parent = c.extensionElements, $.push(j), u.push(() => $.splice($.indexOf(j), 1));
449
449
  }
450
- for (const T of Br(c).filter(($) => $.sourceLocale === m && ($.previous ?? "") === i)) P(T);
450
+ for (const T of Br(c).filter(($) => $.sourceLocale === g && ($.previous ?? "") === i)) P(T);
451
451
  return u.length ? [n, n.label].filter(Boolean) : [];
452
452
  }
453
453
  revert(t) {
@@ -506,8 +506,8 @@ class $b {
506
506
  });
507
507
  v.$parent = l.extensionElements, y.push(v), u.push(() => y.splice(y.indexOf(v), 1));
508
508
  }
509
- const m = l.extensionElements;
510
- return m && !m.get("values").length && (delete l.extensionElements, u.push(() => l.extensionElements = m)), u.length ? [n, n.label].filter(Boolean) : [];
509
+ const g = l.extensionElements;
510
+ return g && !g.get("values").length && (delete l.extensionElements, u.push(() => l.extensionElements = g)), u.length ? [n, n.label].filter(Boolean) : [];
511
511
  }
512
512
  revert(t) {
513
513
  for (const n of [...t.undo].reverse()) n();
@@ -1317,7 +1317,7 @@ function rR(e) {
1317
1317
  function Ub(e) {
1318
1318
  if (!this)
1319
1319
  return new Ub(e);
1320
- var t = e && e.proxy, n, i, o, r, a = rR, s, c, l, u, p = Bc, f = !1, d = !1, g = "", h = !1, m = !1, w = null, y = !1, v, b, E, R;
1320
+ var t = e && e.proxy, n, i, o, r, a = rR, s, c, l, u, p = Bc, f = !1, d = !1, m = "", h = !1, g = !1, w = null, y = !1, v, b, E, R;
1321
1321
  function D(j) {
1322
1322
  j instanceof Error || (j = Fo(j)), w = j, a(j, p);
1323
1323
  }
@@ -1367,10 +1367,10 @@ function Ub(e) {
1367
1367
  var G = /* @__PURE__ */ Object.create(null), J;
1368
1368
  for (J in j)
1369
1369
  G[J] = j[J];
1370
- return m = !0, R = G, this;
1370
+ return g = !0, R = G, this;
1371
1371
  };
1372
1372
  function T() {
1373
- v = m ? [] : null, b = m ? oR(R) : null, E = [], p = Bc, y = !1, w = null, d = !1, g = "";
1373
+ v = g ? [] : null, b = g ? oR(R) : null, E = [], p = Bc, y = !1, w = null, d = !1, m = "";
1374
1374
  }
1375
1375
  this.parse = function(j) {
1376
1376
  if (typeof j != "string")
@@ -1381,9 +1381,9 @@ function Ub(e) {
1381
1381
  }, this.write = function(j) {
1382
1382
  if (typeof j != "string")
1383
1383
  throw Fo("required args <xml=string>");
1384
- return f || (T(), f = !0), w || (g = $(g + j, !0) || ""), this;
1384
+ return f || (T(), f = !0), w || (m = $(m + j, !0) || ""), this;
1385
1385
  }, this.end = function() {
1386
- return f || T(), f = !1, w || $(g), g = "", p = Bc, y = !1, w;
1386
+ return f || T(), f = !1, w || $(m), m = "", p = Bc, y = !1, w;
1387
1387
  }, this.stop = function() {
1388
1388
  y = !0;
1389
1389
  };
@@ -1399,7 +1399,7 @@ function Ub(e) {
1399
1399
  function Je() {
1400
1400
  if (re !== null)
1401
1401
  return re;
1402
- var yt, en, _n = m && b.xmlns, En = m && h ? [] : null, Lt = X, fn = W, Cn = fn.length, No, fi, Wi, Qn, nn, Ui = {}, br = /* @__PURE__ */ new Set(), jn, ft, Rt;
1402
+ var yt, en, _n = g && b.xmlns, En = g && h ? [] : null, Lt = X, fn = W, Cn = fn.length, No, fi, Wi, Qn, nn, Ui = {}, br = /* @__PURE__ */ new Set(), jn, ft, Rt;
1403
1403
  e:
1404
1404
  for (; Lt < Cn; Lt++)
1405
1405
  if (jn = !1, ft = fn.charCodeAt(Lt), !(ft === 32 || ft < 14 && ft > 8)) {
@@ -1430,7 +1430,7 @@ function Ub(e) {
1430
1430
  P("attribute <" + nn + "> already defined");
1431
1431
  continue;
1432
1432
  }
1433
- if (br.add(nn), !m) {
1433
+ if (br.add(nn), !g) {
1434
1434
  Ui[nn] = Wi;
1435
1435
  continue;
1436
1436
  }
@@ -1561,7 +1561,7 @@ function Ub(e) {
1561
1561
  }
1562
1562
  Ce || E.push(B);
1563
1563
  }
1564
- if (m) {
1564
+ if (g) {
1565
1565
  V = b, be && (Ce || v.push(V), re === null && (h = oe.indexOf("xmlns", Z) !== -1) && (X = Z, W = oe, Je(), h = !1)), C = B, ne !== b && (J = b[Cm], J === void 0 && (J = b[Cm] = /* @__PURE__ */ Object.create(null)), ne = b);
1566
1566
  var Tt = J[B];
1567
1567
  if (Tt !== void 0)
@@ -1581,7 +1581,7 @@ function Ub(e) {
1581
1581
  if (Ce) {
1582
1582
  if (o && (o(t ? S : B, kr, be, p), y))
1583
1583
  return;
1584
- m && (be ? b = V : b = v.pop());
1584
+ g && (be ? b = V : b = v.pop());
1585
1585
  }
1586
1586
  K += 1;
1587
1587
  }
@@ -1855,10 +1855,10 @@ wd.prototype.fromXML = function(e, t, n) {
1855
1855
  function f() {
1856
1856
  c.pop().handleEnd();
1857
1857
  }
1858
- var d = /^<\?xml /i, g = / encoding="([^"]+)"/i, h = /^utf-8$/i;
1859
- function m(E) {
1858
+ var d = /^<\?xml /i, m = / encoding="([^"]+)"/i, h = /^utf-8$/i;
1859
+ function g(E) {
1860
1860
  if (d.test(E)) {
1861
- var R = g.exec(E), D = R && R[1];
1861
+ var R = m.exec(E), D = R && R[1];
1862
1862
  !D || h.test(D) || a.addWarning({
1863
1863
  message: "unsupported document encoding <" + D + ">, falling back to UTF-8"
1864
1864
  });
@@ -1898,7 +1898,7 @@ wd.prototype.fromXML = function(e, t, n) {
1898
1898
  ns: E.ns
1899
1899
  };
1900
1900
  w(j, P);
1901
- }).on("question", m).on("closeTag", f).on("cdata", y).on("text", function(E, R, D) {
1901
+ }).on("question", g).on("closeTag", f).on("cdata", y).on("text", function(E, R, D) {
1902
1902
  v(R(E), D);
1903
1903
  }).on("error", l).on("warn", u), new Promise(function(E, R) {
1904
1904
  var D;
@@ -6252,10 +6252,10 @@ function UC(e, t, n, i) {
6252
6252
  if (a <= o || s <= r) return !1;
6253
6253
  const c = t.x - e.x, l = t.y - e.y;
6254
6254
  let u = 0, p = 1;
6255
- const f = (d, g) => {
6256
- if (g === 0) return d <= 0;
6257
- const h = d / g;
6258
- if (g > 0) {
6255
+ const f = (d, m) => {
6256
+ if (m === 0) return d <= 0;
6257
+ const h = d / m;
6258
+ if (m > 0) {
6259
6259
  if (h > p) return !1;
6260
6260
  h > u && (u = h);
6261
6261
  } else {
@@ -6714,20 +6714,20 @@ function lt(e, t = {}) {
6714
6714
  for (const { shape: v, depth: b } of ql(y.label, e))
6715
6715
  n.push({ kind: "label-over-shape", edge: y.id, shape: v, depth: Math.round(b) });
6716
6716
  }
6717
- const d = new Set(i.map((y) => y.id)), g = e.shapes.filter((y) => y.type === "bpmn:Participant" && y.label);
6718
- for (const y of [...i, ...g.filter((v) => !d.has(v.id))]) {
6717
+ const d = new Set(i.map((y) => y.id)), m = e.shapes.filter((y) => y.type === "bpmn:Participant" && y.label);
6718
+ for (const y of [...i, ...m.filter((v) => !d.has(v.id))]) {
6719
6719
  if (!y.label) continue;
6720
6720
  const v = tM(y, e);
6721
6721
  v && n.push({ kind: "label-over-line", edge: y.id, line: v });
6722
6722
  }
6723
6723
  const h = new Set(e.shapes.filter((y) => y.type === "bpmn:TextAnnotation").map((y) => y.id));
6724
- for (const y of g)
6724
+ for (const y of m)
6725
6725
  for (const { owner: v, rect: b } of jr(e))
6726
6726
  v === y.id || h.has(v) || kp(y.label, b, xa) && n.push({ kind: "pool-name-over-label", pool: y.id, label: v });
6727
- const m = jr(e);
6727
+ const g = jr(e);
6728
6728
  for (const y of i)
6729
6729
  if (y.type === "bpmn:TextAnnotation")
6730
- for (const { owner: v, rect: b } of m)
6730
+ for (const { owner: v, rect: b } of g)
6731
6731
  v !== y.id && kp(y, b, xa) && n.push({ kind: "annotation-over-label", annotation: y.id, label: v });
6732
6732
  const w = new Map(e.shapes.map((y) => [y.id, y]));
6733
6733
  for (const y of i) {
@@ -6779,18 +6779,18 @@ function sM(e) {
6779
6779
  const f = zt(p);
6780
6780
  if ((f == null ? void 0 : f.$type) === "bpmn:Collaboration")
6781
6781
  for (const d of f.participants ?? []) {
6782
- const g = zt(d), h = Ro(g), m = Ro(g == null ? void 0 : g.processRef);
6783
- h && m ? o.set(m, h) : h && r.add(h);
6782
+ const m = zt(d), h = Ro(m), g = Ro(m == null ? void 0 : m.processRef);
6783
+ h && g ? o.set(g, h) : h && r.add(h);
6784
6784
  }
6785
6785
  }
6786
6786
  for (const p of i) {
6787
6787
  const f = zt((c = zt(p)) == null ? void 0 : c.plane), d = (f == null ? void 0 : f.planeElement) ?? [];
6788
- for (const g of d) {
6789
- const h = zt(g);
6788
+ for (const m of d) {
6789
+ const h = zt(m);
6790
6790
  if (!h) continue;
6791
- const m = zt(h.bpmnElement), w = typeof (m == null ? void 0 : m.id) == "string" ? m.id : void 0;
6791
+ const g = zt(h.bpmnElement), w = typeof (g == null ? void 0 : g.id) == "string" ? g.id : void 0;
6792
6792
  if (!w) continue;
6793
- const y = typeof (m == null ? void 0 : m.$type) == "string" ? m.$type : "", v = zt(h.bounds);
6793
+ const y = typeof (g == null ? void 0 : g.$type) == "string" ? g.$type : "", v = zt(h.bounds);
6794
6794
  if (v) {
6795
6795
  const E = h.isExpanded === !1 && y !== "bpmn:Participant", R = zt((l = zt(h.label)) == null ? void 0 : l.bounds), D = {
6796
6796
  id: w,
@@ -6800,11 +6800,11 @@ function sM(e) {
6800
6800
  width: Jt(v.width),
6801
6801
  height: Jt(v.height),
6802
6802
  container: Wl.has(y) && !E,
6803
- attached: (m == null ? void 0 : m.attachedToRef) !== void 0,
6804
- ...m ? { parent: aM(m, o) } : {},
6803
+ attached: (g == null ? void 0 : g.attachedToRef) !== void 0,
6804
+ ...g ? { parent: aM(g, o) } : {},
6805
6805
  ...R ? { label: { x: Jt(R.x), y: Jt(R.y), width: Jt(R.width), height: Jt(R.height) } } : {},
6806
- ...y === "bpmn:Group" ? fw(pw(m)) : {}
6807
- }, P = h.isHorizontal !== !1, T = typeof (m == null ? void 0 : m.name) == "string" ? m.name : "";
6806
+ ...y === "bpmn:Group" ? fw(pw(g)) : {}
6807
+ }, P = h.isHorizontal !== !1, T = typeof (g == null ? void 0 : g.name) == "string" ? g.name : "";
6808
6808
  r.has(w) && P && T && (D.label = sw(D, T)), t.push(D);
6809
6809
  continue;
6810
6810
  }
@@ -6818,8 +6818,8 @@ function sM(e) {
6818
6818
  var D, P;
6819
6819
  return { x: Jt((D = zt(R)) == null ? void 0 : D.x), y: Jt((P = zt(R)) == null ? void 0 : P.y) };
6820
6820
  }),
6821
- endpoints: oM(m),
6822
- ...rM(m),
6821
+ endpoints: oM(g),
6822
+ ...rM(g),
6823
6823
  ...E ? { label: { x: Jt(E.x), y: Jt(E.y), width: Jt(E.width), height: Jt(E.height) } } : {}
6824
6824
  });
6825
6825
  }
@@ -6844,13 +6844,13 @@ function ze(e) {
6844
6844
  if (a === "bpmn:Definitions" || a.startsWith("bpmndi:")) continue;
6845
6845
  const s = r.waypoints;
6846
6846
  if (s) {
6847
- const h = zt(r.label), m = Ro(r.source), w = Ro(r.target);
6847
+ const h = zt(r.label), g = Ro(r.source), w = Ro(r.target);
6848
6848
  n.push({
6849
6849
  id: r.id,
6850
6850
  type: a,
6851
6851
  waypoints: s.map((y) => ({ x: Jt(y.x), y: Jt(y.y) })),
6852
- endpoints: [m, w].filter((y) => !!y),
6853
- ...m && w ? { source: m, target: w } : {},
6852
+ endpoints: [g, w].filter((y) => !!y),
6853
+ ...g && w ? { source: g, target: w } : {},
6854
6854
  ...h && typeof h.x == "number" ? { label: { x: h.x, y: Jt(h.y), width: Jt(h.width), height: Jt(h.height) } } : {}
6855
6855
  });
6856
6856
  continue;
@@ -6873,8 +6873,8 @@ function ze(e) {
6873
6873
  ...f !== void 0 ? { parent: f } : {},
6874
6874
  ...l && typeof l.x == "number" ? { label: { x: l.x, y: Jt(l.y), width: Jt(l.width), height: Jt(l.height) } } : {},
6875
6875
  ...a === "bpmn:Group" ? fw(pw(c)) : {}
6876
- }, g = typeof (c == null ? void 0 : c.name) == "string" ? c.name : "";
6877
- a === "bpmn:Participant" && !(c != null && c.processRef) && g && ((i = zt(r.di)) == null ? void 0 : i.isHorizontal) !== !1 && (d.label = sw(d, g)), t.push(d);
6876
+ }, m = typeof (c == null ? void 0 : c.name) == "string" ? c.name : "";
6877
+ a === "bpmn:Participant" && !(c != null && c.processRef) && m && ((i = zt(r.di)) == null ? void 0 : i.isHorizontal) !== !1 && (d.label = sw(d, m)), t.push(d);
6878
6878
  }
6879
6879
  return { shapes: t, edges: n };
6880
6880
  }
@@ -7058,30 +7058,30 @@ function Pd(e, t, n, i) {
7058
7058
  if (p && f && Ge(p.y + p.height / 2, f.y + f.height / 2)) {
7059
7059
  const d = [o[0], o[o.length - 1]];
7060
7060
  if (Ge(d[0].y, d[1].y) && !Ge(d[0].x, d[1].x)) {
7061
- const g = t.filter(
7061
+ const m = t.filter(
7062
7062
  (y) => !e.endpoints.includes(y.id) && Vt({ ...e, waypoints: d }, [y]).length > 0
7063
- ), h = g.length >= 2 ? Lm(d[0], d[1], g) : null, w = (h ? h.map((y) => [d[0], ...y, d[1]]) : g.length === 1 ? (Cf(d[0], d[1], g[0]) ?? []).map((y) => [d[0], ...y, d[1]]) : g.length === 0 ? [d] : []).filter((y) => la(e, y, t) === 0 && y.length <= o.length).sort((y, v) => Number(u(v)) - Number(u(y)));
7063
+ ), h = m.length >= 2 ? Lm(d[0], d[1], m) : null, w = (h ? h.map((y) => [d[0], ...y, d[1]]) : m.length === 1 ? (Cf(d[0], d[1], m[0]) ?? []).map((y) => [d[0], ...y, d[1]]) : m.length === 0 ? [d] : []).filter((y) => la(e, y, t) === 0 && y.length <= o.length).sort((y, v) => Number(u(v)) - Number(u(y)));
7064
7064
  if (w.length) return w.find((y) => !c(y)) ?? w[0];
7065
7065
  }
7066
7066
  }
7067
7067
  }
7068
7068
  for (let p = 0; p + 1 < o.length; p++) {
7069
- const f = o[p], d = o[p + 1], g = t.filter(
7069
+ const f = o[p], d = o[p + 1], m = t.filter(
7070
7070
  (w) => !e.endpoints.includes(w.id) && Vt({ ...e, waypoints: [f, d] }, [w]).length > 0
7071
7071
  );
7072
- if (g.length < 2) continue;
7073
- const h = Lm(f, d, g);
7072
+ if (m.length < 2) continue;
7073
+ const h = Lm(f, d, m);
7074
7074
  if (!h) continue;
7075
- const m = h.map((w) => Mf(o, p, w)).filter((w) => la(e, w, t) === 0).sort((w, y) => Number(u(y)) - Number(u(w)));
7076
- if (m.length) return m.find((w) => !c(w)) ?? m[0];
7075
+ const g = h.map((w) => Mf(o, p, w)).filter((w) => la(e, w, t) === 0).sort((w, y) => Number(u(y)) - Number(u(w)));
7076
+ if (g.length) return g.find((w) => !c(w)) ?? g[0];
7077
7077
  }
7078
7078
  for (let p = 0; p < fM && r > 0; p++) {
7079
7079
  let f = !1;
7080
7080
  for (let d = 0; d + 1 < o.length && !f; d++) {
7081
- const g = o[d], h = o[d + 1];
7082
- for (const m of t) {
7083
- if (e.endpoints.includes(m.id) || Vt({ ...e, waypoints: [g, h] }, [m]).length === 0) continue;
7084
- const w = Cf(g, h, m), y = w ? w.map((b) => Mf(o, d, b)) : dM(o, m) ?? [];
7081
+ const m = o[d], h = o[d + 1];
7082
+ for (const g of t) {
7083
+ if (e.endpoints.includes(g.id) || Vt({ ...e, waypoints: [m, h] }, [g]).length === 0) continue;
7084
+ const w = Cf(m, h, g), y = w ? w.map((b) => Mf(o, d, b)) : dM(o, g) ?? [];
7085
7085
  if (!y.length) continue;
7086
7086
  const v = [...y].sort((b, E) => Number(u(E)) - Number(u(b)));
7087
7087
  for (const b of v) {
@@ -7113,18 +7113,18 @@ function Im(e, t, n) {
7113
7113
  if (n && !n.has(u)) continue;
7114
7114
  const f = i.get(u);
7115
7115
  if (!f) continue;
7116
- const d = f.parent, g = d && typeof d.x == "number" && typeof d.width == "number" ? { x: d.x, y: d.y, width: d.width, height: d.height } : void 0, h = Vt(p, a);
7116
+ const d = f.parent, m = d && typeof d.x == "number" && typeof d.width == "number" ? { x: d.x, y: d.y, width: d.width, height: d.height } : void 0, h = Vt(p, a);
7117
7117
  if (!n && h.length && h.every((b) => b.type === "bpmn:TextAnnotation")) {
7118
7118
  s.add(u);
7119
7119
  continue;
7120
7120
  }
7121
- const m = Pd(p, a, g, r.edges);
7122
- if (!m) {
7121
+ const g = Pd(p, a, m, r.edges);
7122
+ if (!g) {
7123
7123
  h.some((b) => b.type === "bpmn:TextAnnotation") && s.add(u);
7124
7124
  continue;
7125
7125
  }
7126
7126
  const w = r.edges.filter((b) => b.id !== u), y = Mi(p, w);
7127
- Mi({ ...p, waypoints: m }, w) > y || o.updateWaypoints(f, m);
7127
+ Mi({ ...p, waypoints: g }, w) > y || o.updateWaypoints(f, g);
7128
7128
  }
7129
7129
  return s;
7130
7130
  }
@@ -7161,11 +7161,11 @@ function yM(e, t, n) {
7161
7161
  [u, l]
7162
7162
  ]) {
7163
7163
  if (n.has(p)) continue;
7164
- const d = s.edges.find((D) => D.id === p), g = s.edges.find((D) => D.id === f);
7165
- if (!d || !g) continue;
7164
+ const d = s.edges.find((D) => D.id === p), m = s.edges.find((D) => D.id === f);
7165
+ if (!d || !m) continue;
7166
7166
  const h = i.get(p);
7167
7167
  if (!h) continue;
7168
- const m = Kl(h), w = mM(g), y = [...Ad(d, a) ?? []], v = Pd(d, [...a, ...w], m, r.edges);
7168
+ const g = Kl(h), w = mM(m), y = [...Ad(d, a) ?? []], v = Pd(d, [...a, ...w], g, r.edges);
7169
7169
  v && y.push(v);
7170
7170
  for (let D = 0; D + 1 < d.waypoints.length; D++)
7171
7171
  for (const P of w)
@@ -7176,7 +7176,7 @@ function yM(e, t, n) {
7176
7176
  edges: s.edges.map((P) => P.id === p ? { ...P, waypoints: D } : P)
7177
7177
  }), R = y.find((D) => {
7178
7178
  const P = { ...d, waypoints: D };
7179
- return Op(P, g) || !Af(D, m) || b.some((T) => T.id !== f && !Op(d, T) && Op(P, T)) ? !1 : lt(E(D)).every((T) => c.has(ut(T)));
7179
+ return Op(P, m) || !Af(D, g) || b.some((T) => T.id !== f && !Op(d, T) && Op(P, T)) ? !1 : lt(E(D)).every((T) => c.has(ut(T)));
7180
7180
  });
7181
7181
  if (R) {
7182
7182
  o.updateWaypoints(h, R), s = E(R);
@@ -7198,18 +7198,18 @@ const wM = (e, t) => t === "top" ? { x: e.x + e.width / 2, y: e.y } : t === "bot
7198
7198
  function Bm(e, t, n, i) {
7199
7199
  const o = Nm[t], r = Nm[i], a = o.x === 0, s = r.x === 0;
7200
7200
  if (a === s) {
7201
- const p = a ? "y" : "x", f = a ? "x" : "y", d = o[p], g = r[p];
7201
+ const p = a ? "y" : "x", f = a ? "x" : "y", d = o[p], m = r[p];
7202
7202
  if (Ge(e[f], n[f]))
7203
- return d === -g && d * (n[p] - e[p]) >= as ? [e, n] : null;
7203
+ return d === -m && d * (n[p] - e[p]) >= as ? [e, n] : null;
7204
7204
  let h;
7205
- if (d === -g) {
7205
+ if (d === -m) {
7206
7206
  const w = e[p] + d * as, y = n[p] - d * as;
7207
7207
  if (d * (y - w) < 0) return null;
7208
7208
  h = Math.round((e[p] + n[p]) / 2);
7209
7209
  } else
7210
7210
  h = d > 0 ? Math.max(e[p], n[p]) + Yl : Math.min(e[p], n[p]) - Yl;
7211
- const m = (w, y) => a ? { x: y, y: w } : { x: w, y };
7212
- return [e, m(h, e[f]), m(h, n[f]), n];
7211
+ const g = (w, y) => a ? { x: y, y: w } : { x: w, y };
7212
+ return [e, g(h, e[f]), g(h, n[f]), n];
7213
7213
  }
7214
7214
  const c = a ? { x: e.x, y: n.y } : { x: n.x, y: e.y }, l = a ? o.y * (c.y - e.y) : o.x * (c.x - e.x), u = s ? r.y * (c.y - n.y) : r.x * (c.x - n.x);
7215
7215
  return l >= as && u >= as ? [e, c, n] : null;
@@ -7234,11 +7234,11 @@ function EM(e, t, n) {
7234
7234
  if (t.has(`${l}|${u}`)) continue;
7235
7235
  const p = c.edges.find((T) => T.id === l), f = c.edges.find((T) => T.id === u);
7236
7236
  if (!p || !f || p.type !== "bpmn:SequenceFlow" || f.type !== "bpmn:SequenceFlow" || n.has(l) && n.has(u) || !no({ edges: [p, f] }).length) continue;
7237
- const d = p.endpoints.find((T) => f.endpoints.includes(T)), g = d ? a.get(d) : void 0;
7238
- if (!g || g.container) continue;
7239
- const h = i.get(l), m = i.get(u);
7240
- if (!h || !m) continue;
7241
- const w = (T) => n.has(T.id) ? [T.waypoints] : [T.waypoints, ..._M(T, g, a)], y = (T) => T.length - 2, v = w(p).flatMap((T) => w(f).map(($) => ({ pa: T, pb: $ }))).filter(({ pa: T, pb: $ }) => T !== p.waypoints || $ !== f.waypoints).map((T) => ({ ...T, cost: $m(T.pa) + $m(T.pb) + xM * (y(T.pa) + y(T.pb)) })).sort((T, $) => T.cost - $.cost), b = Kl(h), E = Kl(m), R = no(c).length, D = new Set(Zo(c).map(([T, $]) => `${T}|${$}`)), P = v.find(({ pa: T, pb: $ }) => {
7237
+ const d = p.endpoints.find((T) => f.endpoints.includes(T)), m = d ? a.get(d) : void 0;
7238
+ if (!m || m.container) continue;
7239
+ const h = i.get(l), g = i.get(u);
7240
+ if (!h || !g) continue;
7241
+ const w = (T) => n.has(T.id) ? [T.waypoints] : [T.waypoints, ..._M(T, m, a)], y = (T) => T.length - 2, v = w(p).flatMap((T) => w(f).map(($) => ({ pa: T, pb: $ }))).filter(({ pa: T, pb: $ }) => T !== p.waypoints || $ !== f.waypoints).map((T) => ({ ...T, cost: $m(T.pa) + $m(T.pb) + xM * (y(T.pa) + y(T.pb)) })).sort((T, $) => T.cost - $.cost), b = Kl(h), E = Kl(g), R = no(c).length, D = new Set(Zo(c).map(([T, $]) => `${T}|${$}`)), P = v.find(({ pa: T, pb: $ }) => {
7242
7242
  const j = { ...p, waypoints: T }, G = { ...f, waypoints: $ };
7243
7243
  if (no({ edges: [j, G] }).length || Fa(j, G) || !Af(T, b) || !Af($, E)) return !1;
7244
7244
  const J = {
@@ -7247,7 +7247,7 @@ function EM(e, t, n) {
7247
7247
  };
7248
7248
  return no(J).length >= R || Zo(J).some(([ne, V]) => !D.has(`${ne}|${V}`)) ? !1 : lt(J).every((ne) => s.has(ut(ne)));
7249
7249
  });
7250
- P && (P.pa !== p.waypoints && o.updateWaypoints(h, P.pa), P.pb !== f.waypoints && o.updateWaypoints(m, P.pb), c = {
7250
+ P && (P.pa !== p.waypoints && o.updateWaypoints(h, P.pa), P.pb !== f.waypoints && o.updateWaypoints(g, P.pb), c = {
7251
7251
  ...c,
7252
7252
  edges: c.edges.map(
7253
7253
  (T) => T.id === l ? { ...p, waypoints: P.pa } : T.id === u ? { ...f, waypoints: P.pb } : T
@@ -7276,13 +7276,13 @@ function CM(e, t, n) {
7276
7276
  if (!f) continue;
7277
7277
  const d = f === u ? p : u;
7278
7278
  if (!d || d.type === "bpmn:Participant") continue;
7279
- const g = d.x + d.width / 2;
7280
- if (g >= f.x + 10 && g <= f.x + f.width - 10) continue;
7281
- const h = g > f.x + f.width, m = f.y > d.y, w = m ? d.y + d.height : d.y, y = m ? f.y : f.y + f.height, v = Math.round((w + y) / 2), b = ($) => f === u ? [...$].reverse() : $, E = (l.waypoints ?? []).map(($) => ({ x: $.x, y: $.y })), R = r(l.id), D = a(l.id, E) ?? /* @__PURE__ */ new Set(), P = h ? f.x + f.width : f.x, T = f.x + f.width / 2;
7279
+ const m = d.x + d.width / 2;
7280
+ if (m >= f.x + 10 && m <= f.x + f.width - 10) continue;
7281
+ const h = m > f.x + f.width, g = f.y > d.y, w = g ? d.y + d.height : d.y, y = g ? f.y : f.y + f.height, v = Math.round((w + y) / 2), b = ($) => f === u ? [...$].reverse() : $, E = (l.waypoints ?? []).map(($) => ({ x: $.x, y: $.y })), R = r(l.id), D = a(l.id, E) ?? /* @__PURE__ */ new Set(), P = h ? f.x + f.width : f.x, T = f.x + f.width / 2;
7282
7282
  for (let $ = Math.min(SM, f.width / 4); h ? P - $ > T : P + $ < T; $ += RM) {
7283
7283
  const j = Math.round(h ? P - $ : P + $), G = b([
7284
- { x: g, y: w },
7285
- { x: g, y: v },
7284
+ { x: m, y: w },
7285
+ { x: m, y: v },
7286
7286
  { x: j, y: v },
7287
7287
  { x: j, y }
7288
7288
  ]), J = a(l.id, G);
@@ -7312,12 +7312,12 @@ function AM(e, t) {
7312
7312
  if (!r || !a || r.id === a.id) return null;
7313
7313
  const s = a.y > r.y, c = s ? r : a, l = s ? a : r, u = n.filter((G) => G.id !== r.id && G.id !== a.id && G.y >= c.y + c.height && G.y + G.height <= l.y).sort((G, J) => G.y - J.y);
7314
7314
  if (!u.length) return null;
7315
- const p = u[0], f = u[u.length - 1], d = (c.y + c.height + p.y) / 2, g = (f.y + f.height + l.y) / 2, h = s ? d : g, m = s ? g : d, w = e.waypoints[0], y = e.waypoints[e.waypoints.length - 1], v = qn(t), b = t.edges.filter((G) => G.id !== e.id), E = Ai(e, b), R = Vt(e, v).length;
7315
+ const p = u[0], f = u[u.length - 1], d = (c.y + c.height + p.y) / 2, m = (f.y + f.height + l.y) / 2, h = s ? d : m, g = s ? m : d, w = e.waypoints[0], y = e.waypoints[e.waypoints.length - 1], v = qn(t), b = t.edges.filter((G) => G.id !== e.id), E = Ai(e, b), R = Vt(e, v).length;
7316
7316
  if (E === 0 && R === 0 || R === 0 && e.waypoints.length === 2) return null;
7317
7317
  const D = Math.min(...u.map((G) => G.x)), P = Math.max(...u.map((G) => G.x + G.width)), T = (w.x + y.x) / 2, $ = (G) => G.filter((J, ne) => ne === 0 || !(Ge(J.x, G[ne - 1].x) && Ge(J.y, G[ne - 1].y)));
7318
7318
  let j;
7319
7319
  for (let G = D; G <= P; G += MM) {
7320
- const J = $([w, { x: w.x, y: h }, { x: G, y: h }, { x: G, y: m }, { x: y.x, y: m }, y]), ne = { ...e, waypoints: J };
7320
+ const J = $([w, { x: w.x, y: h }, { x: G, y: h }, { x: G, y: g }, { x: y.x, y: g }, y]), ne = { ...e, waypoints: J };
7321
7321
  if (Vt(ne, v).length > 0) continue;
7322
7322
  const V = Ai(ne, b), te = Math.abs(G - T);
7323
7323
  (!j || V < j.cross || V === j.cross && te < j.detour) && (j = { pts: J, cross: V, detour: te });
@@ -7332,10 +7332,10 @@ function TM(e, t, n) {
7332
7332
  if (!PM.has(p.type) || !p.source || !p.target || n.has(p.id)) continue;
7333
7333
  const f = i.get(p.id);
7334
7334
  if (!(f != null && f.waypoints) || ((l = f.source) == null ? void 0 : l.id) !== p.source || ((u = f.target) == null ? void 0 : u.id) !== p.target) continue;
7335
- const d = r.get(p.source), g = r.get(p.target), h = s.get(p.source), m = s.get(p.target);
7336
- if (!d || !g || !h || !m || !Ge(d.width, h.width) || !Ge(d.height, h.height) || !Ge(g.width, m.width) || !Ge(g.height, m.height)) continue;
7335
+ const d = r.get(p.source), m = r.get(p.target), h = s.get(p.source), g = s.get(p.target);
7336
+ if (!d || !m || !h || !g || !Ge(d.width, h.width) || !Ge(d.height, h.height) || !Ge(m.width, g.width) || !Ge(m.height, g.height)) continue;
7337
7337
  const w = h.x - d.x, y = h.y - d.y;
7338
- if (Ge(w, 0) && Ge(y, 0) || !Ge(m.x - g.x, w) || !Ge(m.y - g.y, y)) continue;
7338
+ if (Ge(w, 0) && Ge(y, 0) || !Ge(g.x - m.x, w) || !Ge(g.y - m.y, y)) continue;
7339
7339
  const v = p.waypoints.map((R) => ({ x: R.x + w, y: R.y + y })), b = f.waypoints.map((R) => ({ x: R.x, y: R.y }));
7340
7340
  b.length === v.length && b.every((R, D) => Ge(R.x, v[D].x) && Ge(R.y, v[D].y)) || b.length === 2 && (Ge(b[0].x, b[1].x) || Ge(b[0].y, b[1].y)) && Vt({ ...p, waypoints: b }, c).length === 0 || Vt({ ...p, waypoints: v }, c).length > 0 || o.updateWaypoints(f, v);
7341
7341
  }
@@ -7389,12 +7389,12 @@ function Np(e, t, n) {
7389
7389
  function NM(e, t, n, i, o) {
7390
7390
  const r = [], a = e.type === "bpmn:Participant", s = t.type === "bpmn:Participant", c = t.y >= e.y + e.height;
7391
7391
  if (!c && t.y + t.height > e.y) return { inPools: r, outside: [] };
7392
- const l = c ? e.y + e.height : e.y, u = c ? t.y : t.y + t.height, p = e.x + e.width / 2, f = t.x + t.width / 2, d = (V, te) => te > V.x + Fi && te < V.x + V.width - Fi, g = (V, te) => V.width <= 2 * Lp ? V.x + V.width / 2 : Math.min(Math.max(te, V.x + Lp), V.x + V.width - Lp), h = Math.max(e.x, t.x) + Fi, m = Math.min(e.x + e.width, t.x + t.width) - Fi;
7393
- if (h <= m) {
7394
- const V = !a && d(t, p) ? p : !s && d(e, f) ? f : Math.round((h + m) / 2);
7392
+ const l = c ? e.y + e.height : e.y, u = c ? t.y : t.y + t.height, p = e.x + e.width / 2, f = t.x + t.width / 2, d = (V, te) => te > V.x + Fi && te < V.x + V.width - Fi, m = (V, te) => V.width <= 2 * Lp ? V.x + V.width / 2 : Math.min(Math.max(te, V.x + Lp), V.x + V.width - Lp), h = Math.max(e.x, t.x) + Fi, g = Math.min(e.x + e.width, t.x + t.width) - Fi;
7393
+ if (h <= g) {
7394
+ const V = !a && d(t, p) ? p : !s && d(e, f) ? f : Math.round((h + g) / 2);
7395
7395
  r.push([{ x: V, y: l }, { x: V, y: u }]);
7396
7396
  }
7397
- const w = s ? g(t, p) : f, y = a ? g(e, f) : p;
7397
+ const w = s ? m(t, p) : f, y = a ? m(e, f) : p;
7398
7398
  if (!a && !d(e, w)) {
7399
7399
  const V = w < e.x ? e.x : e.x + e.width;
7400
7400
  for (const te of Np(e.y + e.height / 2, e.y + Fi, e.y + e.height - Fi))
@@ -7439,9 +7439,9 @@ function NM(e, t, n, i, o) {
7439
7439
  }
7440
7440
  function BM(e, t, n) {
7441
7441
  const { elementRegistry: i } = e, o = e.modeling, r = new Map(n.edges.map((d) => [d.id, d.waypoints])), a = n.shapes.filter((d) => d.type === "bpmn:Participant"), s = (d) => {
7442
- let g = d;
7443
- for (; g && g.type !== "bpmn:Participant"; ) g = g.parent;
7444
- return g == null ? void 0 : g.id;
7442
+ let m = d;
7443
+ for (; m && m.type !== "bpmn:Participant"; ) m = m.parent;
7444
+ return m == null ? void 0 : m.id;
7445
7445
  }, c = () => {
7446
7446
  const d = ze(i);
7447
7447
  return {
@@ -7449,19 +7449,19 @@ function BM(e, t, n) {
7449
7449
  crossings: Zo(d).length,
7450
7450
  shared: no(d).length
7451
7451
  };
7452
- }, l = (d, g) => d.length === g.length && d.every((h, m) => Ge(h.x, g[m].x) && Ge(h.y, g[m].y)), u = (d) => {
7453
- const g = d.source, h = d.target;
7454
- if (!g || !h) return "skip";
7455
- const m = ze(i), w = new Map(m.shapes.map((K) => [K.id, K])), y = s(g), v = s(h), b = new Set([y, v].filter((K) => !!K)), E = m.shapes.filter((K) => K.type === "bpmn:Participant"), R = (d.waypoints ?? []).map((K) => ({ x: K.x, y: K.y })), D = Ip(R, b, E);
7452
+ }, l = (d, m) => d.length === m.length && d.every((h, g) => Ge(h.x, m[g].x) && Ge(h.y, m[g].y)), u = (d) => {
7453
+ const m = d.source, h = d.target;
7454
+ if (!m || !h) return "skip";
7455
+ const g = ze(i), w = new Map(g.shapes.map((K) => [K.id, K])), y = s(m), v = s(h), b = new Set([y, v].filter((K) => !!K)), E = g.shapes.filter((K) => K.type === "bpmn:Participant"), R = (d.waypoints ?? []).map((K) => ({ x: K.x, y: K.y })), D = Ip(R, b, E);
7456
7456
  if (D < Dp) return "skip";
7457
7457
  if (t.has(d.id)) {
7458
7458
  const K = r.get(d.id);
7459
7459
  if (K && l(K, R) || D - (K ? Ip(K, b, a) : 0) < Dp) return "skip";
7460
7460
  }
7461
- const P = w.get(g.id), T = w.get(h.id), $ = m.edges.find((K) => K.id === d.id);
7461
+ const P = w.get(m.id), T = w.get(h.id), $ = g.edges.find((K) => K.id === d.id);
7462
7462
  if (!P || !T || !$) return "skip";
7463
- const j = qn(m), G = new Set(Vt($, j).map((K) => K.id)), J = jr(m).filter((K) => K.owner !== d.id && K.owner !== P.id && K.owner !== T.id), ne = [
7464
- ...m.shapes.filter((K) => !K.container && K.id !== P.id && K.id !== T.id),
7463
+ const j = qn(g), G = new Set(Vt($, j).map((K) => K.id)), J = jr(g).filter((K) => K.owner !== d.id && K.owner !== P.id && K.owner !== T.id), ne = [
7464
+ ...g.shapes.filter((K) => !K.container && K.id !== P.id && K.id !== T.id),
7465
7465
  ...J.map((K) => K.rect)
7466
7466
  ], V = (K) => vn({ ...$, waypoints: K }).some((oe) => LM(oe, ne)), te = NM(
7467
7467
  P,
@@ -7473,7 +7473,7 @@ function BM(e, t, n) {
7473
7473
  for (const K of Ce) {
7474
7474
  if (Ip(K, b, E) >= Dp) continue;
7475
7475
  const oe = { ...$, waypoints: K };
7476
- if (Vt(oe, j).some((ce) => !G.has(ce.id)) || vn(oe).some((ce) => IM(ce, m.shapes) || J.some((ve) => oo(ve.rect, ce)))) continue;
7476
+ if (Vt(oe, j).some((ce) => !G.has(ce.id)) || vn(oe).some((ce) => IM(ce, g.shapes) || J.some((ve) => oo(ve.rect, ce)))) continue;
7477
7477
  o.updateWaypoints(d, K);
7478
7478
  const Z = c();
7479
7479
  if (Z.crossings <= we.crossings && Z.shared <= we.shared && [...Z.keys].every((ce) => we.keys.has(ce))) return "fixed";
@@ -7489,18 +7489,18 @@ function $M(e, t, n = []) {
7489
7489
  const i = e.x + e.width / 2, o = t.x + t.width / 2, r = [], a = n.filter((s) => !s.container && s.id !== e.id && s.id !== t.id && s.label).map((s) => ({ ...s.label, id: `${s.id}:label`, type: "label", container: !1, attached: !1 }));
7490
7490
  for (const s of [!0, !1]) {
7491
7491
  const c = s ? e.y : e.y + e.height, l = s ? t.y : t.y + t.height, u = s ? Math.min(e.y, t.y) - ba : Math.max(e.y + e.height, t.y + t.height) + ba, p = jM(e, t, s, u, n), f = p === null ? [[u, 0]] : [[u, 0], [p, FM]];
7492
- for (const [d, g] of f)
7492
+ for (const [d, m] of f)
7493
7493
  for (const h of [0, ...Hi])
7494
7494
  if (!(Math.abs(h) >= e.width / 2 - 5))
7495
- for (const m of [0, ...Hi]) {
7496
- if (Math.abs(m) >= t.width / 2 - 5) continue;
7497
- const w = i + h, y = o + m, v = [
7495
+ for (const g of [0, ...Hi]) {
7496
+ if (Math.abs(g) >= t.width / 2 - 5) continue;
7497
+ const w = i + h, y = o + g, v = [
7498
7498
  { x: w, y: c },
7499
7499
  { x: w, y: d },
7500
7500
  { x: y, y: d },
7501
7501
  { x: y, y: l }
7502
7502
  ];
7503
- g && Vt({ endpoints: [], waypoints: v }, a).length || r.push({ pts: v, cost: g + Math.abs(m) + Math.abs(h) });
7503
+ m && Vt({ endpoints: [], waypoints: v }, a).length || r.push({ pts: v, cost: m + Math.abs(g) + Math.abs(h) });
7504
7504
  }
7505
7505
  }
7506
7506
  return r;
@@ -7509,32 +7509,32 @@ const FM = 45, Fc = 20;
7509
7509
  function jM(e, t, n, i, o) {
7510
7510
  if (!o.length) return null;
7511
7511
  const r = e.x + e.width / 2, a = t.x + t.width / 2, s = Math.min(r, a), c = Math.max(r, a), l = n ? Math.min(e.y, t.y) : Math.max(e.y + e.height, t.y + t.height), u = o.filter(
7512
- (m) => m.container && (m.type === "bpmn:Lane" || m.type === "bpmn:Participant") && r >= m.x && r <= m.x + m.width && e.y >= m.y && e.y + e.height <= m.y + m.height
7513
- ).sort((m, w) => m.width * m.height - w.width * w.height)[0];
7512
+ (g) => g.container && (g.type === "bpmn:Lane" || g.type === "bpmn:Participant") && r >= g.x && r <= g.x + g.width && e.y >= g.y && e.y + e.height <= g.y + g.height
7513
+ ).sort((g, w) => g.width * g.height - w.width * w.height)[0];
7514
7514
  if (!u) return null;
7515
- const p = o.filter((m) => !m.container && m.id !== e.id && m.id !== t.id), f = p.filter(
7516
- (m) => m.x < c && m.x + m.width > s && (n ? m.y < l && m.y + m.height > i : m.y + m.height > l && m.y < i)
7515
+ const p = o.filter((g) => !g.container && g.id !== e.id && g.id !== t.id), f = p.filter(
7516
+ (g) => g.x < c && g.x + g.width > s && (n ? g.y < l && g.y + g.height > i : g.y + g.height > l && g.y < i)
7517
7517
  );
7518
7518
  if (!f.length) return null;
7519
- const d = [...p, ...p.flatMap((m) => m.label ? [m.label] : [])].filter((m) => m.x < c && m.x + m.width > s);
7519
+ const d = [...p, ...p.flatMap((g) => g.label ? [g.label] : [])].filter((g) => g.x < c && g.x + g.width > s);
7520
7520
  if (n) {
7521
- let m = Math.min(...f.map((y) => y.y));
7521
+ let g = Math.min(...f.map((y) => y.y));
7522
7522
  for (let y = !0; y; ) {
7523
7523
  y = !1;
7524
7524
  for (const v of d)
7525
- v.y < m && v.y < l && v.y + v.height > m - Fc && (m = v.y, y = !0);
7525
+ v.y < g && v.y < l && v.y + v.height > g - Fc && (g = v.y, y = !0);
7526
7526
  }
7527
- const w = Math.max(u.y, ...d.filter((y) => y.y + y.height <= m).map((y) => y.y + y.height));
7528
- return m - w >= Fc ? Math.round((m + w) / 2) : null;
7527
+ const w = Math.max(u.y, ...d.filter((y) => y.y + y.height <= g).map((y) => y.y + y.height));
7528
+ return g - w >= Fc ? Math.round((g + w) / 2) : null;
7529
7529
  }
7530
- let g = Math.max(...f.map((m) => m.y + m.height));
7531
- for (let m = !0; m; ) {
7532
- m = !1;
7530
+ let m = Math.max(...f.map((g) => g.y + g.height));
7531
+ for (let g = !0; g; ) {
7532
+ g = !1;
7533
7533
  for (const w of d)
7534
- w.y + w.height > g && w.y + w.height > l && w.y < g + Fc && (g = w.y + w.height, m = !0);
7534
+ w.y + w.height > m && w.y + w.height > l && w.y < m + Fc && (m = w.y + w.height, g = !0);
7535
7535
  }
7536
- const h = Math.min(u.y + u.height, ...d.filter((m) => m.y >= g).map((m) => m.y));
7537
- return h - g >= Fc ? Math.round((g + h) / 2) : null;
7536
+ const h = Math.min(u.y + u.height, ...d.filter((g) => g.y >= m).map((g) => g.y));
7537
+ return h - m >= Fc ? Math.round((m + h) / 2) : null;
7538
7538
  }
7539
7539
  function wu(e, t) {
7540
7540
  if (e.type !== "bpmn:SequenceFlow") return [];
@@ -7554,20 +7554,20 @@ function wu(e, t) {
7554
7554
  p.push({ pts: [{ x: E, y: l }, { x: E, y: u }, { x: v, y: u }, { x: v, y: c }], cost: Math.abs(y) + Math.abs(b) });
7555
7555
  }
7556
7556
  }
7557
- const f = 50, d = i.y + i.height / 2, g = s ? n.y + n.height : n.y;
7557
+ const f = 50, d = i.y + i.height / 2, m = s ? n.y + n.height : n.y;
7558
7558
  for (const y of [0, ...Hi]) {
7559
7559
  if (Math.abs(y) >= n.width / 2 - 5) continue;
7560
7560
  const v = a + y;
7561
- p.push({ pts: [{ x: v, y: g }, { x: v, y: d }, { x: i.x + i.width, y: d }], cost: f + Math.abs(y) });
7561
+ p.push({ pts: [{ x: v, y: m }, { x: v, y: d }, { x: i.x + i.width, y: d }], cost: f + Math.abs(y) });
7562
7562
  }
7563
- const h = 60, m = s ? i.y + i.height : i.y, w = s ? i.y + i.height + ba : i.y - ba;
7563
+ const h = 60, g = s ? i.y + i.height : i.y, w = s ? i.y + i.height + ba : i.y - ba;
7564
7564
  for (const y of [0, ...Hi]) {
7565
7565
  if (Math.abs(y) >= i.width / 2 - 5) continue;
7566
7566
  const v = r + y;
7567
7567
  for (const b of [0, ...Hi]) {
7568
7568
  if (Math.abs(b) >= n.width / 2 - 5) continue;
7569
7569
  const E = a + b;
7570
- p.push({ pts: [{ x: E, y: g }, { x: E, y: w }, { x: v, y: w }, { x: v, y: m }], cost: h + Math.abs(y) + Math.abs(b) });
7570
+ p.push({ pts: [{ x: E, y: m }, { x: E, y: w }, { x: v, y: w }, { x: v, y: g }], cost: h + Math.abs(y) + Math.abs(b) });
7571
7571
  }
7572
7572
  }
7573
7573
  return p;
@@ -7612,14 +7612,14 @@ function zM(e, t) {
7612
7612
  if (!R) return;
7613
7613
  const D = R.x + R.width / 2, P = R.y + R.height / 2;
7614
7614
  return n.find((T) => T.type === "bpmn:Lane" && D >= T.x && D <= T.x + T.width && P >= T.y && P <= T.y + T.height);
7615
- }, p = u(i.get(e.endpoints[0] ?? "")), f = u(i.get(e.endpoints[1] ?? "")), d = !!p && !!f && p.id !== f.id, g = (R) => {
7615
+ }, p = u(i.get(e.endpoints[0] ?? "")), f = u(i.get(e.endpoints[1] ?? "")), d = !!p && !!f && p.id !== f.id, m = (R) => {
7616
7616
  if (!d || !f) return !1;
7617
7617
  for (let D = 1; D < R.length - 2; D++) {
7618
7618
  const P = R[D], T = R[D + 1];
7619
7619
  if (Ge(P.y, T.y) && !Ge(P.x, T.x) && P.y > f.y && P.y < f.y + f.height) return !0;
7620
7620
  }
7621
7621
  return !1;
7622
- }, h = g(e.waypoints), w = ((R) => {
7622
+ }, h = m(e.waypoints), w = ((R) => {
7623
7623
  if (!R) return;
7624
7624
  const D = R.x + R.width / 2, P = R.y + R.height / 2;
7625
7625
  return n.filter((T) => T.type === "bpmn:Participant" && D >= T.x && D <= T.x + T.width && P >= T.y && P <= T.y + T.height).sort((T, $) => T.width * T.height - $.width * $.height)[0];
@@ -7644,7 +7644,7 @@ function zM(e, t) {
7644
7644
  if ($ > v) continue;
7645
7645
  const j = $ < v && T === 0;
7646
7646
  if (!j && Ai(P, r) > s) continue;
7647
- const G = c(R), J = g(R);
7647
+ const G = c(R), J = m(R);
7648
7648
  if (!j && !(J && !h) && G >= l) continue;
7649
7649
  const V = J ? 0 : 1, te = b(R);
7650
7650
  (!E || $ < E.out || $ === E.out && (V < E.lane || V === E.lane && (T < E.opp || T === E.opp && (G < E.sc || G === E.sc && (D < E.cost || D === E.cost && te < E.len))))) && (E = { pts: R, out: $, sc: G, lane: V, opp: T, cost: D, len: te });
@@ -7663,22 +7663,22 @@ function GM(e, t) {
7663
7663
  function VM(e, t, n) {
7664
7664
  const { elementRegistry: i } = e, o = e.modeling, r = ze(i).edges.filter((a) => (!t.has(a.id) || n.has(a.id)) && a.waypoints.length >= 4).map((a) => a.id).sort();
7665
7665
  for (const a of r) {
7666
- const s = ze(i), c = s.edges.find((m) => m.id === a);
7666
+ const s = ze(i), c = s.edges.find((g) => g.id === a);
7667
7667
  if (!c || c.waypoints.length < 4) continue;
7668
- const l = qn(s), u = s.edges.filter((m) => m.id !== a), p = Vt(c, l).length, f = Mi(c, u), d = Ai(c, u), g = n.has(a) ? new Set(lt(s).map(ut)) : null, h = Ad(c, s.shapes);
7668
+ const l = qn(s), u = s.edges.filter((g) => g.id !== a), p = Vt(c, l).length, f = Mi(c, u), d = Ai(c, u), m = n.has(a) ? new Set(lt(s).map(ut)) : null, h = Ad(c, s.shapes);
7669
7669
  h.length === 2 && GM(c, s) && h.reverse();
7670
- for (const m of h) {
7671
- if (m.length >= c.waypoints.length) continue;
7672
- const w = { ...c, waypoints: m };
7670
+ for (const g of h) {
7671
+ if (g.length >= c.waypoints.length) continue;
7672
+ const w = { ...c, waypoints: g };
7673
7673
  if (Vt(w, l).length > p || Mi(w, u) > f || Ai(w, u) > d) continue;
7674
- if (g) {
7674
+ if (m) {
7675
7675
  const v = new Set(
7676
7676
  lt({ ...s, edges: s.edges.map((R) => R.id === a ? w : R) }).map(ut)
7677
- ), b = [...v].filter((R) => !g.has(R)).length, E = [...g].filter((R) => !v.has(R)).length;
7677
+ ), b = [...v].filter((R) => !m.has(R)).length, E = [...m].filter((R) => !v.has(R)).length;
7678
7678
  if (b > E) continue;
7679
7679
  }
7680
7680
  const y = i.get(a);
7681
- y && o.updateWaypoints(y, m);
7681
+ y && o.updateWaypoints(y, g);
7682
7682
  break;
7683
7683
  }
7684
7684
  }
@@ -7717,21 +7717,21 @@ function UM(e, t, n) {
7717
7717
  const o = i[0], r = i[1], a = Ge(o.y, r.y) && !Ge(o.x, r.x), s = Ge(o.x, r.x) && !Ge(o.y, r.y);
7718
7718
  if (!a && !s) return [];
7719
7719
  const c = Math.sign(a ? r.x - o.x : r.y - o.y);
7720
- if (!t.some((g) => {
7721
- if (!Gm(g.type) || g.type === e.type || g.waypoints.length < 2) return !1;
7722
- const h = g.waypoints[0], m = g.waypoints[1];
7723
- return !Ge(h.x, o.x) || !Ge(h.y, o.y) ? !1 : a ? Ge(h.y, m.y) && Math.sign(m.x - h.x) === c : Ge(h.x, m.x) && Math.sign(m.y - h.y) === c;
7720
+ if (!t.some((m) => {
7721
+ if (!Gm(m.type) || m.type === e.type || m.waypoints.length < 2) return !1;
7722
+ const h = m.waypoints[0], g = m.waypoints[1];
7723
+ return !Ge(h.x, o.x) || !Ge(h.y, o.y) ? !1 : a ? Ge(h.y, g.y) && Math.sign(g.x - h.x) === c : Ge(h.x, g.x) && Math.sign(g.y - h.y) === c;
7724
7724
  })) return [];
7725
7725
  const u = n.get(e.endpoints[0] ?? ""), p = n.get(e.endpoints[1] ?? "");
7726
7726
  if (!u) return [];
7727
- const f = (g, h) => a ? h > g.y + 5 && h < g.y + g.height - 5 : h > g.x + 5 && h < g.x + g.width - 5, d = [];
7728
- for (const g of Hi) {
7729
- const h = (a ? o.y : o.x) + g;
7727
+ const f = (m, h) => a ? h > m.y + 5 && h < m.y + m.height - 5 : h > m.x + 5 && h < m.x + m.width - 5, d = [];
7728
+ for (const m of Hi) {
7729
+ const h = (a ? o.y : o.x) + m;
7730
7730
  if (!f(u, h) || i.length === 2 && (!p || !f(p, h))) continue;
7731
- const m = i.map((w) => ({ ...w }));
7732
- for (const w of [m[0], m[1]])
7731
+ const g = i.map((w) => ({ ...w }));
7732
+ for (const w of [g[0], g[1]])
7733
7733
  a ? w.y = h : w.x = h;
7734
- d.push({ pts: m, cost: Math.abs(g) });
7734
+ d.push({ pts: g, cost: Math.abs(m) });
7735
7735
  }
7736
7736
  return d;
7737
7737
  }
@@ -7744,16 +7744,16 @@ function qM(e, t) {
7744
7744
  if (!o && !r) return [];
7745
7745
  const a = i.x >= n.x + n.width, s = i.x + i.width <= n.x;
7746
7746
  if (!a && !s) return [];
7747
- const c = n.x + n.width / 2, l = n.y + n.height / 2, u = i.x + i.width / 2, p = i.y + i.height / 2, f = a ? n.x + n.width : n.x, d = r ? n.y + n.height : n.y, g = a ? i.x : i.x + i.width, h = r ? i.y : i.y + i.height, m = [];
7747
+ const c = n.x + n.width / 2, l = n.y + n.height / 2, u = i.x + i.width / 2, p = i.y + i.height / 2, f = a ? n.x + n.width : n.x, d = r ? n.y + n.height : n.y, m = a ? i.x : i.x + i.width, h = r ? i.y : i.y + i.height, g = [];
7748
7748
  for (const w of [0, ...Hi])
7749
- Math.abs(w) < i.width / 2 - 5 && m.push({
7749
+ Math.abs(w) < i.width / 2 - 5 && g.push({
7750
7750
  pts: [{ x: f, y: l }, { x: u + w, y: l }, { x: u + w, y: h }],
7751
7751
  cost: Math.abs(w)
7752
- }), Math.abs(w) < i.height / 2 - 5 && m.push({
7753
- pts: [{ x: c, y: d }, { x: c, y: p + w }, { x: g, y: p + w }],
7752
+ }), Math.abs(w) < i.height / 2 - 5 && g.push({
7753
+ pts: [{ x: c, y: d }, { x: c, y: p + w }, { x: m, y: p + w }],
7754
7754
  cost: Math.abs(w)
7755
7755
  });
7756
- return m;
7756
+ return g;
7757
7757
  }
7758
7758
  function kd(e, t) {
7759
7759
  if (e.type !== "bpmn:SequenceFlow") return [];
@@ -7775,22 +7775,22 @@ function YM(e, t) {
7775
7775
  if (r === 0) return null;
7776
7776
  const a = Ai(e, o);
7777
7777
  let s;
7778
- const c = (d) => d.reduce((g, h, m) => m ? g + Math.abs(h.x - d[m - 1].x) + Math.abs(h.y - d[m - 1].y) : 0, 0), l = 3, u = (d) => {
7779
- const g = d[0], h = d[d.length - 1], m = Math.hypot(h.x - g.x, h.y - g.y);
7780
- return m >= 1 && c(d) / m >= l ? 1 : 0;
7778
+ const c = (d) => d.reduce((m, h, g) => g ? m + Math.abs(h.x - d[g - 1].x) + Math.abs(h.y - d[g - 1].y) : 0, 0), l = 3, u = (d) => {
7779
+ const m = d[0], h = d[d.length - 1], g = Math.hypot(h.x - m.x, h.y - m.y);
7780
+ return g >= 1 && c(d) / g >= l ? 1 : 0;
7781
7781
  }, p = u(e.waypoints), f = [
7782
7782
  ...wu(e, n),
7783
7783
  ...kd(e, n),
7784
7784
  ...Td(e, n),
7785
7785
  ...UM(e, o, n)
7786
7786
  ];
7787
- for (const { pts: d, cost: g } of f) {
7787
+ for (const { pts: d, cost: m } of f) {
7788
7788
  const h = { ...e, waypoints: d };
7789
7789
  if (Vt(h, i).length > 0) continue;
7790
- const m = Mi(h, o), w = Ai(h, o), y = r - m + (p - u(d));
7791
- if (m >= r || w - a > y) continue;
7790
+ const g = Mi(h, o), w = Ai(h, o), y = r - g + (p - u(d));
7791
+ if (g >= r || w - a > y) continue;
7792
7792
  const v = c(d);
7793
- (!s || m < s.opposite || m === s.opposite && (w < s.cross || w === s.cross && (g < s.cost || g === s.cost && v < s.len))) && (s = { pts: d, opposite: m, cross: w, cost: g, len: v });
7793
+ (!s || g < s.opposite || g === s.opposite && (w < s.cross || w === s.cross && (m < s.cost || m === s.cost && v < s.len))) && (s = { pts: d, opposite: g, cross: w, cost: m, len: v });
7794
7794
  }
7795
7795
  return (s == null ? void 0 : s.pts) ?? null;
7796
7796
  }
@@ -7803,7 +7803,7 @@ function Vm(e, t) {
7803
7803
  function KM(e, t) {
7804
7804
  const n = new Map(t.shapes.map((f) => [f.id, f])), i = qn(t), o = t.edges.filter((f) => f.id !== e.id), r = Vm(e, o);
7805
7805
  if (r === 0) return null;
7806
- const a = Mi(e, o), s = Ai(e, o), c = (f) => f.reduce((d, g, h) => h ? d + Math.abs(g.x - f[h - 1].x) + Math.abs(g.y - f[h - 1].y) : 0, 0), l = 2;
7806
+ const a = Mi(e, o), s = Ai(e, o), c = (f) => f.reduce((d, m, h) => h ? d + Math.abs(m.x - f[h - 1].x) + Math.abs(m.y - f[h - 1].y) : 0, 0), l = 2;
7807
7807
  let u;
7808
7808
  const p = [
7809
7809
  ...wu(e, n),
@@ -7812,16 +7812,16 @@ function KM(e, t) {
7812
7812
  ...Td(e, n)
7813
7813
  ];
7814
7814
  for (const { pts: f, cost: d } of p) {
7815
- const g = { ...e, waypoints: f };
7816
- if (Vt(g, i).length > 0) continue;
7817
- const h = Vm(g, o);
7815
+ const m = { ...e, waypoints: f };
7816
+ if (Vt(m, i).length > 0) continue;
7817
+ const h = Vm(m, o);
7818
7818
  if (h >= r) continue;
7819
- const m = Mi(g, o);
7820
- if (m - h > a - r) continue;
7821
- const w = Ai(g, o);
7819
+ const g = Mi(m, o);
7820
+ if (g - h > a - r) continue;
7821
+ const w = Ai(m, o);
7822
7822
  if (w - s > (r - h) * l) continue;
7823
7823
  const y = c(f);
7824
- (!u || h < u.fake || h === u.fake && (m < u.unreadable || m === u.unreadable && (w < u.cross || w === u.cross && (d < u.cost || d === u.cost && y < u.length)))) && (u = { pts: f, fake: h, unreadable: m, cross: w, cost: d, length: y });
7824
+ (!u || h < u.fake || h === u.fake && (g < u.unreadable || g === u.unreadable && (w < u.cross || w === u.cross && (d < u.cost || d === u.cost && y < u.length)))) && (u = { pts: f, fake: h, unreadable: g, cross: w, cost: d, length: y });
7825
7825
  }
7826
7826
  return (u == null ? void 0 : u.pts) ?? null;
7827
7827
  }
@@ -7861,7 +7861,7 @@ function Um(e, t, n) {
7861
7861
  function ZM(e, t) {
7862
7862
  const n = new Map(t.shapes.map((f) => [f.id, f])), i = qn(t), o = t.edges.filter((f) => f.id !== e.id), r = Um(e, o, n);
7863
7863
  if (r === 0) return null;
7864
- const a = Mi(e, o), s = Ai(e, o), c = (f) => f.reduce((d, g, h) => h ? d + Math.abs(g.x - f[h - 1].x) + Math.abs(g.y - f[h - 1].y) : 0, 0), l = 2;
7864
+ const a = Mi(e, o), s = Ai(e, o), c = (f) => f.reduce((d, m, h) => h ? d + Math.abs(m.x - f[h - 1].x) + Math.abs(m.y - f[h - 1].y) : 0, 0), l = 2;
7865
7865
  let u;
7866
7866
  const p = [
7867
7867
  ...wu(e, n),
@@ -7869,16 +7869,16 @@ function ZM(e, t) {
7869
7869
  ...Td(e, n)
7870
7870
  ];
7871
7871
  for (const { pts: f, cost: d } of p) {
7872
- const g = { ...e, waypoints: f };
7873
- if (Vt(g, i).length > 0) continue;
7874
- const h = Um(g, o, n);
7872
+ const m = { ...e, waypoints: f };
7873
+ if (Vt(m, i).length > 0) continue;
7874
+ const h = Um(m, o, n);
7875
7875
  if (h >= r) continue;
7876
- const m = Mi(g, o);
7877
- if (m - h > a - r) continue;
7878
- const w = Ai(g, o);
7876
+ const g = Mi(m, o);
7877
+ if (g - h > a - r) continue;
7878
+ const w = Ai(m, o);
7879
7879
  if (w - s > (r - h) * l) continue;
7880
7880
  const y = c(f);
7881
- (!u || h < u.chain || h === u.chain && (m < u.unreadable || m === u.unreadable && (w < u.cross || w === u.cross && (d < u.cost || d === u.cost && y < u.length)))) && (u = { pts: f, chain: h, unreadable: m, cross: w, cost: d, length: y });
7881
+ (!u || h < u.chain || h === u.chain && (g < u.unreadable || g === u.unreadable && (w < u.cross || w === u.cross && (d < u.cost || d === u.cost && y < u.length)))) && (u = { pts: f, chain: h, unreadable: g, cross: w, cost: d, length: y });
7882
7882
  }
7883
7883
  return (u == null ? void 0 : u.pts) ?? null;
7884
7884
  }
@@ -7895,7 +7895,7 @@ function JM(e, t, n) {
7895
7895
  for (const f of l.edges) n.has(f) || c.add(f);
7896
7896
  }
7897
7897
  for (const l of [...c].sort()) {
7898
- const u = ze(i), p = u.edges.find((g) => g.id === l);
7898
+ const u = ze(i), p = u.edges.find((m) => m.id === l);
7899
7899
  if (!p) continue;
7900
7900
  const f = ZM(p, u);
7901
7901
  if (!f) continue;
@@ -7922,8 +7922,8 @@ function QM(e, t, n) {
7922
7922
  if (!f) continue;
7923
7923
  const d = YM(f, p);
7924
7924
  if (!d) continue;
7925
- const g = i.get(u);
7926
- g && o.updateWaypoints(g, d);
7925
+ const m = i.get(u);
7926
+ m && o.updateWaypoints(m, d);
7927
7927
  }
7928
7928
  }
7929
7929
  const eA = 10, tA = (e, t) => e.x < t.x + t.width && t.x < e.x + e.width && e.y < t.y + t.height && t.y < e.y + e.height;
@@ -7935,12 +7935,12 @@ function nA(e, t) {
7935
7935
  const o = qn(t), r = i.flatMap(vn);
7936
7936
  for (const a of vn(e)) {
7937
7937
  let s = [[a.lo, a.hi]];
7938
- for (const [d, g] of Rd(a, r))
7939
- s = s.flatMap(([h, m]) => {
7938
+ for (const [d, m] of Rd(a, r))
7939
+ s = s.flatMap(([h, g]) => {
7940
7940
  const w = [];
7941
- return d > h && w.push([h, Math.min(m, d)]), g < m && w.push([Math.max(h, g), m]), w.filter(([y, v]) => v > y);
7941
+ return d > h && w.push([h, Math.min(g, d)]), m < g && w.push([Math.max(h, m), g]), w.filter(([y, v]) => v > y);
7942
7942
  });
7943
- const c = a.axis === "h" ? n.width : n.height, l = s.find(([d, g]) => g - d >= c + eA * 2);
7943
+ const c = a.axis === "h" ? n.width : n.height, l = s.find(([d, m]) => m - d >= c + eA * 2);
7944
7944
  if (!l) continue;
7945
7945
  const u = (l[0] + l[1]) / 2, p = a.axis === "h" ? { x: u, y: a.at - HC } : { x: a.at + Dn + n.width / 2, y: u }, f = { x: p.x - n.width / 2, y: p.y - n.height / 2, width: n.width, height: n.height };
7946
7946
  if (!Rf({ ...e, label: f }, i) && !o.some((d) => !e.endpoints.includes(d.id) && tA(f, d)))
@@ -7955,8 +7955,8 @@ function gw(e, t) {
7955
7955
  const i = vn(e);
7956
7956
  if (!i.length) return null;
7957
7957
  const o = n.x + n.width / 2, r = n.y + n.height / 2, a = (f) => {
7958
- const d = f.axis === "h" ? o : r, g = f.axis === "h" ? r - f.at : o - f.at, h = d < f.lo ? f.lo - d : d > f.hi ? d - f.hi : 0;
7959
- return Math.hypot(g, h);
7958
+ const d = f.axis === "h" ? o : r, m = f.axis === "h" ? r - f.at : o - f.at, h = d < f.lo ? f.lo - d : d > f.hi ? d - f.hi : 0;
7959
+ return Math.hypot(m, h);
7960
7960
  }, s = i.reduce((f, d) => a(d) < a(f) ? d : f, i[0]), c = [
7961
7961
  ...i,
7962
7962
  ...t.edges.filter((f) => f.id !== e.id).flatMap(vn),
@@ -7967,17 +7967,17 @@ function gw(e, t) {
7967
7967
  if (s.axis === "v")
7968
7968
  for (const f of [s.at + Dn, s.at - Dn - n.width])
7969
7969
  for (const d of p) {
7970
- const g = n.y + d;
7971
- if (g < s.lo || g + n.height > s.hi) continue;
7972
- const h = { ...n, x: f, y: g };
7970
+ const m = n.y + d;
7971
+ if (m < s.lo || m + n.height > s.hi) continue;
7972
+ const h = { ...n, x: f, y: m };
7973
7973
  if (l(h)) return h;
7974
7974
  }
7975
7975
  else
7976
7976
  for (const f of [s.at - Dn - n.height, s.at + Dn])
7977
7977
  for (const d of p) {
7978
- const g = n.x + d;
7979
- if (g < s.lo || g + n.width > s.hi) continue;
7980
- const h = { ...n, x: g, y: f };
7978
+ const m = n.x + d;
7979
+ if (m < s.lo || m + n.width > s.hi) continue;
7980
+ const h = { ...n, x: m, y: f };
7981
7981
  if (l(h)) return h;
7982
7982
  }
7983
7983
  return null;
@@ -8013,8 +8013,8 @@ function rA(e, t) {
8013
8013
  for (const [c, l] of t) {
8014
8014
  const u = l.wps, p = n.get(c), f = p == null ? void 0 : p.label;
8015
8015
  if (!f || !(p != null && p.waypoints)) continue;
8016
- const d = p.waypoints[0].x - u[0].x, g = p.waypoints[0].y - u[0].y;
8017
- if (!(p.waypoints.length === u.length && p.waypoints.every((R, D) => R.x - u[D].x === d && R.y - u[D].y === g))) {
8016
+ const d = p.waypoints[0].x - u[0].x, m = p.waypoints[0].y - u[0].y;
8017
+ if (!(p.waypoints.length === u.length && p.waypoints.every((R, D) => R.x - u[D].x === d && R.y - u[D].y === m))) {
8018
8018
  if (((a = p.source) == null ? void 0 : a.id) === l.source && ((s = p.target) == null ? void 0 : s.id) === l.target) continue;
8019
8019
  const R = o.edges.find((j) => j.id === c);
8020
8020
  if (!(R != null && R.label) || !ql(R.label, o).length) continue;
@@ -8025,12 +8025,12 @@ function rA(e, t) {
8025
8025
  i.moveElements([f], { x: P.x - f.x, y: P.y - f.y }), o = T, r = new Set($.map(ut));
8026
8026
  continue;
8027
8027
  }
8028
- const m = l.label.x + d - f.x, w = l.label.y + g - f.y;
8029
- if (m === 0 && w === 0) continue;
8028
+ const g = l.label.x + d - f.x, w = l.label.y + m - f.y;
8029
+ if (g === 0 && w === 0) continue;
8030
8030
  const y = o.edges.find((R) => R.id === c);
8031
8031
  if (!(y != null && y.label)) continue;
8032
- const v = { ...y.label, x: y.label.x + m, y: y.label.y + w }, b = { ...o, edges: o.edges.map((R) => R.id === c ? { ...R, label: v } : R) }, E = lt(b);
8033
- E.some((R) => !r.has(ut(R))) || (i.moveElements([f], { x: m, y: w }), o = b, r = new Set(E.map(ut)));
8032
+ const v = { ...y.label, x: y.label.x + g, y: y.label.y + w }, b = { ...o, edges: o.edges.map((R) => R.id === c ? { ...R, label: v } : R) }, E = lt(b);
8033
+ E.some((R) => !r.has(ut(R))) || (i.moveElements([f], { x: g, y: w }), o = b, r = new Set(E.map(ut)));
8034
8034
  }
8035
8035
  }
8036
8036
  function aA(e, t, n = /* @__PURE__ */ new Set()) {
@@ -8114,17 +8114,17 @@ function pA(e, t) {
8114
8114
  [c.endpoints[1], l.length - 1]
8115
8115
  ];
8116
8116
  let p = !1;
8117
- for (const [h, m] of u) {
8117
+ for (const [h, g] of u) {
8118
8118
  const w = h ? o.shapes.find((v) => v.id === h) : void 0;
8119
8119
  if (!w) continue;
8120
- const y = uA(w, l[m]);
8121
- y.x === l[m].x && y.y === l[m].y || (l[m] = y, p = !0);
8120
+ const y = uA(w, l[g]);
8121
+ y.x === l[g].x && y.y === l[g].y || (l[g] = y, p = !0);
8122
8122
  }
8123
8123
  if (!p) continue;
8124
8124
  const f = { ...o, edges: o.edges.map((h) => h.id === s ? { ...h, waypoints: l } : h) }, d = lt(f);
8125
8125
  if (d.some((h) => !r.has(ut(h)))) continue;
8126
- const g = n.get(s);
8127
- g && (i.updateWaypoints(g, l), o = f, r = new Set(d.map(ut)));
8126
+ const m = n.get(s);
8127
+ m && (i.updateWaypoints(m, l), o = f, r = new Set(d.map(ut)));
8128
8128
  }
8129
8129
  }
8130
8130
  const Pf = (e) => typeof e == "object" && e !== null && !Array.isArray(e);
@@ -8224,8 +8224,8 @@ function fA(e, t, n) {
8224
8224
  }
8225
8225
  const u = s.map;
8226
8226
  let p = !0;
8227
- for (const [d, g] of Object.entries(u))
8228
- typeof g != "string" || g === "" ? (i.push({ kind: "payload-invalid", opIndex: a, field: `${s.mapField}.${d}` }), p = !1) : o.includes(d) || (i.push({ kind: "locale-not-in-document", opIndex: a, id: s.id, field: s.mapField, locale: d, locales: o }), p = !1);
8227
+ for (const [d, m] of Object.entries(u))
8228
+ typeof m != "string" || m === "" ? (i.push({ kind: "payload-invalid", opIndex: a, field: `${s.mapField}.${d}` }), p = !1) : o.includes(d) || (i.push({ kind: "locale-not-in-document", opIndex: a, id: s.id, field: s.mapField, locale: d, locales: o }), p = !1);
8229
8229
  if (!p) continue;
8230
8230
  const f = o.filter((d) => !(d in u));
8231
8231
  f.length && i.push({ kind: "locale-texts-incomplete", opIndex: a, id: s.id, field: s.mapField, missing: f });
@@ -8267,12 +8267,12 @@ function dA(e, t, n) {
8267
8267
  switch (c.kind) {
8268
8268
  case "participant.add": {
8269
8269
  const [u, ...p] = l, f = bi(c.participant, "name", a(u));
8270
- c.participant.lanes && (f.lanes = c.participant.lanes.map((d, g) => bi(d, "name", a(p[g])))), s.push({ ...c, participant: f });
8270
+ c.participant.lanes && (f.lanes = c.participant.lanes.map((d, m) => bi(d, "name", a(p[m])))), s.push({ ...c, participant: f });
8271
8271
  break;
8272
8272
  }
8273
8273
  case "participant.update": {
8274
8274
  const [u, ...p] = l, f = bi(c, "name", a(u));
8275
- c.lanes && (f.lanes = c.lanes.map((d, g) => bi(d, "name", a(p[g])))), s.push(f);
8275
+ c.lanes && (f.lanes = c.lanes.map((d, m) => bi(d, "name", a(p[m])))), s.push(f);
8276
8276
  break;
8277
8277
  }
8278
8278
  case "node.add":
@@ -8378,9 +8378,9 @@ function gA(e) {
8378
8378
  for (const c of Xm[i.kind]) {
8379
8379
  const l = c.path.endsWith("[]"), u = l ? c.path.slice(0, -2) : c.path, p = u.split(".");
8380
8380
  let f = i;
8381
- for (const g of p.slice(0, -1)) {
8381
+ for (const m of p.slice(0, -1)) {
8382
8382
  if (!ss(f)) break;
8383
- f = f[g];
8383
+ f = f[m];
8384
8384
  }
8385
8385
  if (!ss(f)) continue;
8386
8386
  const d = f[p[p.length - 1]];
@@ -8393,7 +8393,7 @@ function gA(e) {
8393
8393
  t.push({ kind: "payload-invalid", opIndex: o, field: c.path });
8394
8394
  continue;
8395
8395
  }
8396
- d.forEach((g, h) => n(o, `${u}[${h}]`, g, c.shape));
8396
+ d.forEach((m, h) => n(o, `${u}[${h}]`, m, c.shape));
8397
8397
  }
8398
8398
  }
8399
8399
  if (i.kind === "annotation.add") {
@@ -8431,80 +8431,80 @@ function mA(e, t, n = {}) {
8431
8431
  const i = gA(e);
8432
8432
  if (i.length > 0) return i;
8433
8433
  const o = [], r = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map();
8434
- function s(h, m, w) {
8435
- if (!hA.test(m)) {
8436
- o.push({ kind: "id-invalid", opIndex: h, id: m });
8434
+ function s(h, g, w) {
8435
+ if (!hA.test(g)) {
8436
+ o.push({ kind: "id-invalid", opIndex: h, id: g });
8437
8437
  return;
8438
8438
  }
8439
- if (t.categoryOf(m) !== void 0 || r.has(m)) {
8440
- o.push({ kind: "id-duplicate", opIndex: h, id: m });
8439
+ if (t.categoryOf(g) !== void 0 || r.has(g)) {
8440
+ o.push({ kind: "id-duplicate", opIndex: h, id: g });
8441
8441
  return;
8442
8442
  }
8443
- r.set(m, { ...w, opIndex: h });
8443
+ r.set(g, { ...w, opIndex: h });
8444
8444
  }
8445
- e.forEach((h, m) => {
8445
+ e.forEach((h, g) => {
8446
8446
  var w;
8447
8447
  switch (h.kind) {
8448
8448
  case "participant.add":
8449
- s(m, h.participant.id, {
8449
+ s(g, h.participant.id, {
8450
8450
  category: "participant",
8451
8451
  lanes: (h.participant.lanes ?? []).map((y) => y.id)
8452
8452
  });
8453
- for (const y of h.participant.lanes ?? []) s(m, y.id, { category: "lane" });
8453
+ for (const y of h.participant.lanes ?? []) s(g, y.id, { category: "lane" });
8454
8454
  break;
8455
8455
  case "node.add":
8456
- s(m, h.node.id, { category: "flowNode", participant: h.node.participant });
8456
+ s(g, h.node.id, { category: "flowNode", participant: h.node.participant });
8457
8457
  break;
8458
8458
  case "sequenceFlow.add":
8459
- s(m, h.flow.id, { category: "sequenceFlow" });
8459
+ s(g, h.flow.id, { category: "sequenceFlow" });
8460
8460
  break;
8461
8461
  case "messageFlow.add":
8462
- s(m, h.flow.id, { category: "messageFlow" });
8462
+ s(g, h.flow.id, { category: "messageFlow" });
8463
8463
  break;
8464
8464
  case "dataStore.add":
8465
- s(m, h.dataStore.id, { category: "dataStore" });
8465
+ s(g, h.dataStore.id, { category: "dataStore" });
8466
8466
  for (const y of h.associations ?? [])
8467
- y.id && s(m, y.id, { category: "dataAssociation" });
8467
+ y.id && s(g, y.id, { category: "dataAssociation" });
8468
8468
  break;
8469
8469
  case "dataAssociation.add":
8470
- h.association.id && s(m, h.association.id, { category: "dataAssociation" });
8470
+ h.association.id && s(g, h.association.id, { category: "dataAssociation" });
8471
8471
  break;
8472
8472
  case "association.add":
8473
- h.association.id && s(m, h.association.id, { category: "association" });
8473
+ h.association.id && s(g, h.association.id, { category: "association" });
8474
8474
  break;
8475
8475
  case "annotation.add":
8476
- s(m, h.annotation.id, { category: "annotation" }), (w = h.association) != null && w.id && s(m, h.association.id, { category: "association" });
8476
+ s(g, h.annotation.id, { category: "annotation" }), (w = h.association) != null && w.id && s(g, h.association.id, { category: "association" });
8477
8477
  break;
8478
8478
  case "group.add":
8479
- s(m, h.group.id, { category: "group" });
8479
+ s(g, h.group.id, { category: "group" });
8480
8480
  break;
8481
8481
  case "participant.update":
8482
8482
  if (h.lanes) {
8483
8483
  a.set(h.id, h.lanes.map((y) => y.id));
8484
8484
  for (const y of h.lanes)
8485
- t.categoryOf(y.id) === void 0 && s(m, y.id, { category: "lane" });
8485
+ t.categoryOf(y.id) === void 0 && s(g, y.id, { category: "lane" });
8486
8486
  }
8487
8487
  break;
8488
8488
  }
8489
8489
  });
8490
8490
  const c = (h) => {
8491
- var m;
8492
- return ((m = r.get(h)) == null ? void 0 : m.category) ?? t.categoryOf(h);
8491
+ var g;
8492
+ return ((g = r.get(h)) == null ? void 0 : g.category) ?? t.categoryOf(h);
8493
8493
  }, l = (h) => {
8494
- const m = r.get(h);
8495
- return m ? m.category === "participant" ? h : m.participant : t.categoryOf(h) === "participant" ? h : t.participantOf(h);
8494
+ const g = r.get(h);
8495
+ return g ? g.category === "participant" ? h : g.participant : t.categoryOf(h) === "participant" ? h : t.participantOf(h);
8496
8496
  };
8497
- function u(h, m, w, y) {
8498
- const v = c(m);
8497
+ function u(h, g, w, y) {
8498
+ const v = c(g);
8499
8499
  if (v === void 0) {
8500
- o.push({ kind: "ref-missing", opIndex: h, ref: m, role: w });
8500
+ o.push({ kind: "ref-missing", opIndex: h, ref: g, role: w });
8501
8501
  return;
8502
8502
  }
8503
8503
  if (y && !y.includes(v)) {
8504
8504
  o.push({
8505
8505
  kind: "ref-category",
8506
8506
  opIndex: h,
8507
- ref: m,
8507
+ ref: g,
8508
8508
  role: w,
8509
8509
  expected: y.join("|"),
8510
8510
  actual: v
@@ -8517,7 +8517,7 @@ function mA(e, t, n = {}) {
8517
8517
  for (const h of e)
8518
8518
  h.kind === "node.add" ? f.set(h.node.id, h.node.eventDefinition) : h.kind === "node.update" && h.type !== void 0 && f.set(h.id, h.eventDefinition);
8519
8519
  const d = (h) => f.has(h) ? f.get(h) === "timer" : t.eventDefinitionOf(h) === "timer";
8520
- return e.forEach((h, m) => {
8520
+ return e.forEach((h, g) => {
8521
8521
  var w, y;
8522
8522
  switch (h.kind) {
8523
8523
  case "participant.add":
@@ -8525,26 +8525,26 @@ function mA(e, t, n = {}) {
8525
8525
  case "node.add": {
8526
8526
  const { participant: v, lane: b } = h.node;
8527
8527
  if (v === void 0) {
8528
- (p || b !== void 0) && o.push({ kind: "participant-required", opIndex: m, id: h.node.id });
8528
+ (p || b !== void 0) && o.push({ kind: "participant-required", opIndex: g, id: h.node.id });
8529
8529
  break;
8530
8530
  }
8531
- if (u(m, v, "participant", ["participant"]) === void 0) break;
8532
- b !== void 0 && ((((w = r.get(v)) == null ? void 0 : w.lanes) ?? a.get(v) ?? t.lanesOf(v)).includes(b) || o.push({ kind: "lane-unknown", opIndex: m, lane: b, participant: v }));
8531
+ if (u(g, v, "participant", ["participant"]) === void 0) break;
8532
+ b !== void 0 && ((((w = r.get(v)) == null ? void 0 : w.lanes) ?? a.get(v) ?? t.lanesOf(v)).includes(b) || o.push({ kind: "lane-unknown", opIndex: g, lane: b, participant: v }));
8533
8533
  break;
8534
8534
  }
8535
8535
  case "sequenceFlow.add": {
8536
- const { id: v, source: b, target: E, name: R, condition: D } = h.flow, P = u(m, b, "source", ["flowNode"]), T = u(m, E, "target", ["flowNode"]);
8537
- P && T && l(b) !== l(E) && o.push({ kind: "flow-cross-pool", opIndex: m, id: v }), R !== void 0 && D !== void 0 && o.push({ kind: "condition-name-conflict", opIndex: m, id: v });
8536
+ const { id: v, source: b, target: E, name: R, condition: D } = h.flow, P = u(g, b, "source", ["flowNode"]), T = u(g, E, "target", ["flowNode"]);
8537
+ P && T && l(b) !== l(E) && o.push({ kind: "flow-cross-pool", opIndex: g, id: v }), R !== void 0 && D !== void 0 && o.push({ kind: "condition-name-conflict", opIndex: g, id: v });
8538
8538
  break;
8539
8539
  }
8540
8540
  case "messageFlow.add": {
8541
- const { id: v, source: b, target: E } = h.flow, R = u(m, b, "source", ["flowNode", "participant"]), D = u(m, E, "target", ["flowNode", "participant"]);
8541
+ const { id: v, source: b, target: E } = h.flow, R = u(g, b, "source", ["flowNode", "participant"]), D = u(g, E, "target", ["flowNode", "participant"]);
8542
8542
  if (R && D) {
8543
8543
  const P = l(b), T = l(E);
8544
- P !== void 0 && P === T && o.push({ kind: "message-flow-same-pool", opIndex: m, id: v });
8544
+ P !== void 0 && P === T && o.push({ kind: "message-flow-same-pool", opIndex: g, id: v });
8545
8545
  }
8546
8546
  for (const P of [b, E])
8547
- d(P) && o.push({ kind: "message-flow-timer-endpoint", opIndex: m, id: v, ref: P });
8547
+ d(P) && o.push({ kind: "message-flow-timer-endpoint", opIndex: g, id: v, ref: P });
8548
8548
  break;
8549
8549
  }
8550
8550
  case "dataStore.add": {
@@ -8552,30 +8552,30 @@ function mA(e, t, n = {}) {
8552
8552
  if ([v.source, v.target].filter((R) => R === h.dataStore.id).length !== 1) {
8553
8553
  o.push({
8554
8554
  kind: "data-association-ends",
8555
- opIndex: m,
8555
+ opIndex: g,
8556
8556
  source: v.source,
8557
8557
  target: v.target
8558
8558
  });
8559
8559
  continue;
8560
8560
  }
8561
8561
  const E = v.source === h.dataStore.id ? v.target : v.source;
8562
- u(m, E, "dataAssociation", ["flowNode"]);
8562
+ u(g, E, "dataAssociation", ["flowNode"]);
8563
8563
  }
8564
8564
  break;
8565
8565
  }
8566
8566
  case "dataAssociation.add": {
8567
- const { source: v, target: b } = h.association, E = u(m, v, "source"), R = u(m, b, "target");
8567
+ const { source: v, target: b } = h.association, E = u(g, v, "source"), R = u(g, b, "target");
8568
8568
  if (E && R) {
8569
8569
  const D = /* @__PURE__ */ new Set([E, R]);
8570
- D.has("dataStore") && D.has("flowNode") || o.push({ kind: "data-association-ends", opIndex: m, source: v, target: b });
8570
+ D.has("dataStore") && D.has("flowNode") || o.push({ kind: "data-association-ends", opIndex: g, source: v, target: b });
8571
8571
  }
8572
8572
  break;
8573
8573
  }
8574
8574
  case "association.add": {
8575
- const { id: v, source: b, target: E } = h.association, R = u(m, b, "source"), D = u(m, E, "target");
8575
+ const { id: v, source: b, target: E } = h.association, R = u(g, b, "source"), D = u(g, E, "target");
8576
8576
  R && D && R !== "annotation" && D !== "annotation" && o.push({
8577
8577
  kind: "association-detached",
8578
- opIndex: m,
8578
+ opIndex: g,
8579
8579
  annotation: v ?? `${b}->${E}`
8580
8580
  });
8581
8581
  break;
@@ -8584,21 +8584,21 @@ function mA(e, t, n = {}) {
8584
8584
  if (h.association) {
8585
8585
  const { source: v, target: b } = h.association;
8586
8586
  if (v !== h.annotation.id && b !== h.annotation.id)
8587
- o.push({ kind: "association-detached", opIndex: m, annotation: h.annotation.id });
8587
+ o.push({ kind: "association-detached", opIndex: g, annotation: h.annotation.id });
8588
8588
  else {
8589
8589
  const E = v === h.annotation.id ? b : v;
8590
- u(m, E, "association");
8590
+ u(g, E, "association");
8591
8591
  }
8592
8592
  }
8593
- h.placement && u(m, h.placement.anchor, "anchor");
8593
+ h.placement && u(g, h.placement.anchor, "anchor");
8594
8594
  break;
8595
8595
  }
8596
8596
  case "group.add": {
8597
8597
  for (const v of h.group.members ?? []) {
8598
- const b = u(m, v, "member");
8598
+ const b = u(g, v, "member");
8599
8599
  b && Km.has(b) && o.push({
8600
8600
  kind: "ref-category",
8601
- opIndex: m,
8601
+ opIndex: g,
8602
8602
  ref: v,
8603
8603
  role: "member",
8604
8604
  expected: "shape",
@@ -8609,52 +8609,52 @@ function mA(e, t, n = {}) {
8609
8609
  }
8610
8610
  // ── update/remove 계열 (세션 ②-b) — 대상은 기존 문서 요소여야 한다 ──
8611
8611
  case "participant.update": {
8612
- if (g(m, h.id, "participant") === void 0) break;
8612
+ if (m(g, h.id, "participant") === void 0) break;
8613
8613
  if (h.lanes) {
8614
8614
  const v = t.lanesOf(h.id), b = h.lanes.map((P) => P.id);
8615
8615
  for (const P of v)
8616
- b.includes(P) || o.push({ kind: "lane-shrink-unsupported", opIndex: m, participant: h.id, lane: P });
8616
+ b.includes(P) || o.push({ kind: "lane-shrink-unsupported", opIndex: g, participant: h.id, lane: P });
8617
8617
  for (const P of b)
8618
- t.categoryOf(P) !== void 0 && !v.includes(P) && o.push({ kind: "id-duplicate", opIndex: m, id: P });
8618
+ t.categoryOf(P) !== void 0 && !v.includes(P) && o.push({ kind: "id-duplicate", opIndex: g, id: P });
8619
8619
  const E = b.filter((P) => v.includes(P)), R = (P) => E.every((T, $) => T === P[$]), D = (((y = t.laneDeclarationOrderOf) == null ? void 0 : y.call(t, h.id)) ?? v).filter((P) => v.includes(P));
8620
- E.length === v.length && !R(v) && !R(D) && o.push({ kind: "lane-reorder-unsupported", opIndex: m, participant: h.id });
8620
+ E.length === v.length && !R(v) && !R(D) && o.push({ kind: "lane-reorder-unsupported", opIndex: g, participant: h.id });
8621
8621
  }
8622
8622
  break;
8623
8623
  }
8624
8624
  case "node.update": {
8625
- if (g(m, h.id, "flowNode") === void 0) break;
8625
+ if (m(g, h.id, "flowNode") === void 0) break;
8626
8626
  if (h.lane !== void 0) {
8627
8627
  const v = t.participantOf(h.id);
8628
- (v ? a.get(v) ?? t.lanesOf(v) : []).includes(h.lane) || o.push({ kind: "lane-unknown", opIndex: m, lane: h.lane, participant: v ?? "" });
8628
+ (v ? a.get(v) ?? t.lanesOf(v) : []).includes(h.lane) || o.push({ kind: "lane-unknown", opIndex: g, lane: h.lane, participant: v ?? "" });
8629
8629
  }
8630
8630
  break;
8631
8631
  }
8632
8632
  case "sequenceFlow.update": {
8633
- if (g(m, h.id, "sequenceFlow") === void 0) break;
8634
- if (h.name !== void 0 && h.condition !== void 0 && o.push({ kind: "condition-name-conflict", opIndex: m, id: h.id }), h.source !== void 0 || h.target !== void 0) {
8635
- const v = h.source === void 0 || u(m, h.source, "source", ["flowNode"]) !== void 0, b = h.target === void 0 || u(m, h.target, "target", ["flowNode"]) !== void 0, E = t.endpointsOf(h.id), R = h.source ?? (E == null ? void 0 : E.source), D = h.target ?? (E == null ? void 0 : E.target);
8636
- v && b && R !== void 0 && D !== void 0 && (/* @__PURE__ */ new Set([l(R), l(D), l(h.id)])).size > 1 && o.push({ kind: "flow-cross-pool", opIndex: m, id: h.id });
8633
+ if (m(g, h.id, "sequenceFlow") === void 0) break;
8634
+ if (h.name !== void 0 && h.condition !== void 0 && o.push({ kind: "condition-name-conflict", opIndex: g, id: h.id }), h.source !== void 0 || h.target !== void 0) {
8635
+ const v = h.source === void 0 || u(g, h.source, "source", ["flowNode"]) !== void 0, b = h.target === void 0 || u(g, h.target, "target", ["flowNode"]) !== void 0, E = t.endpointsOf(h.id), R = h.source ?? (E == null ? void 0 : E.source), D = h.target ?? (E == null ? void 0 : E.target);
8636
+ v && b && R !== void 0 && D !== void 0 && (/* @__PURE__ */ new Set([l(R), l(D), l(h.id)])).size > 1 && o.push({ kind: "flow-cross-pool", opIndex: g, id: h.id });
8637
8637
  }
8638
8638
  break;
8639
8639
  }
8640
8640
  case "messageFlow.update":
8641
- g(m, h.id, "messageFlow");
8641
+ m(g, h.id, "messageFlow");
8642
8642
  break;
8643
8643
  case "dataStore.update":
8644
- g(m, h.id, "dataStore");
8644
+ m(g, h.id, "dataStore");
8645
8645
  break;
8646
8646
  case "annotation.update": {
8647
- if (g(m, h.id, "annotation") === void 0) break;
8648
- h.placement && u(m, h.placement.anchor, "anchor");
8647
+ if (m(g, h.id, "annotation") === void 0) break;
8648
+ h.placement && u(g, h.placement.anchor, "anchor");
8649
8649
  break;
8650
8650
  }
8651
8651
  case "group.update": {
8652
- if (g(m, h.id, "group") === void 0) break;
8652
+ if (m(g, h.id, "group") === void 0) break;
8653
8653
  for (const v of h.members ?? []) {
8654
- const b = u(m, v, "member");
8654
+ const b = u(g, v, "member");
8655
8655
  b && Km.has(b) && o.push({
8656
8656
  kind: "ref-category",
8657
- opIndex: m,
8657
+ opIndex: g,
8658
8658
  ref: v,
8659
8659
  role: "member",
8660
8660
  expected: "shape",
@@ -8664,12 +8664,12 @@ function mA(e, t, n = {}) {
8664
8664
  break;
8665
8665
  }
8666
8666
  case "translation.confirm":
8667
- g(m, h.id);
8667
+ m(g, h.id);
8668
8668
  break;
8669
8669
  case "element.remove": {
8670
- g(m, h.id) === "lane" && o.push({
8670
+ m(g, h.id) === "lane" && o.push({
8671
8671
  kind: "ref-category",
8672
- opIndex: m,
8672
+ opIndex: g,
8673
8673
  ref: h.id,
8674
8674
  role: "target",
8675
8675
  expected: "removable",
@@ -8679,21 +8679,21 @@ function mA(e, t, n = {}) {
8679
8679
  }
8680
8680
  }
8681
8681
  }), o.push(...fA(e, t, n.i18n)), o;
8682
- function g(h, m, w) {
8683
- if (r.has(m)) {
8684
- o.push({ kind: "target-added-in-batch", opIndex: h, id: m });
8682
+ function m(h, g, w) {
8683
+ if (r.has(g)) {
8684
+ o.push({ kind: "target-added-in-batch", opIndex: h, id: g });
8685
8685
  return;
8686
8686
  }
8687
- const y = t.categoryOf(m);
8687
+ const y = t.categoryOf(g);
8688
8688
  if (y === void 0) {
8689
- o.push({ kind: "ref-missing", opIndex: h, ref: m, role: "target" });
8689
+ o.push({ kind: "ref-missing", opIndex: h, ref: g, role: "target" });
8690
8690
  return;
8691
8691
  }
8692
8692
  if (w && y !== w) {
8693
8693
  o.push({
8694
8694
  kind: "ref-category",
8695
8695
  opIndex: h,
8696
- ref: m,
8696
+ ref: g,
8697
8697
  role: "target",
8698
8698
  expected: w,
8699
8699
  actual: y
@@ -8756,21 +8756,21 @@ function Jl(e, t, n, i, o) {
8756
8756
  if (!o.selfId) return !1;
8757
8757
  const ne = e.get(J);
8758
8758
  return !!ne && (((V = ne.source) == null ? void 0 : V.id) === o.selfId || ((te = ne.target) == null ? void 0 : te.id) === o.selfId);
8759
- }, f = u.edges.filter((J) => !p(J.id)).flatMap(vn), d = jr(u).filter((J) => J.owner !== o.selfId).map((J) => J.rect), g = (J) => ({
8759
+ }, f = u.edges.filter((J) => !p(J.id)).flatMap(vn), d = jr(u).filter((J) => J.owner !== o.selfId).map((J) => J.rect), m = (J) => ({
8760
8760
  x0: J.x - r.width / 2 - Tn,
8761
8761
  x1: J.x + r.width / 2 + Tn,
8762
8762
  y0: J.y - r.height / 2 - Tn,
8763
8763
  y1: J.y + r.height / 2 + Tn
8764
8764
  }), h = (J) => {
8765
- const ne = g(J);
8765
+ const ne = m(J);
8766
8766
  return l.some((V) => ne.x0 < V.x + V.width && ne.x1 > V.x && ne.y0 < V.y + V.height && ne.y1 > V.y);
8767
- }, m = (J) => {
8768
- const ne = g(J);
8767
+ }, g = (J) => {
8768
+ const ne = m(J);
8769
8769
  return f.some(
8770
8770
  (V) => V.axis === "h" ? V.at > ne.y0 && V.at < ne.y1 && V.lo < ne.x1 && V.hi > ne.x0 : V.at > ne.x0 && V.at < ne.x1 && V.lo < ne.y1 && V.hi > ne.y0
8771
8771
  );
8772
8772
  }, w = (J) => {
8773
- const ne = g(J);
8773
+ const ne = m(J);
8774
8774
  return d.some((V) => ne.x0 < V.x + V.width && ne.x1 > V.x && ne.y0 < V.y + V.height && ne.y1 > V.y);
8775
8775
  }, y = u.shapes.filter((J) => J.type === "bpmn:Group").flatMap((J) => [
8776
8776
  { axis: "h", at: J.y, lo: J.x, hi: J.x + J.width },
@@ -8778,11 +8778,11 @@ function Jl(e, t, n, i, o) {
8778
8778
  { axis: "v", at: J.x, lo: J.y, hi: J.y + J.height },
8779
8779
  { axis: "v", at: J.x + J.width, lo: J.y, hi: J.y + J.height }
8780
8780
  ]), v = (J) => {
8781
- const ne = g(J);
8781
+ const ne = m(J);
8782
8782
  return y.some(
8783
8783
  (V) => V.axis === "h" ? V.at > ne.y0 && V.at < ne.y1 && V.lo < ne.x1 && V.hi > ne.x0 : V.at > ne.x0 && V.at < ne.x1 && V.lo < ne.y1 && V.hi > ne.y0
8784
8784
  );
8785
- }, b = (J) => h(J) || m(J) || w(J) || v(J), E = (J) => J.x - r.width / 2 >= i.x && J.x + r.width / 2 <= i.x + i.width && J.y - r.height / 2 >= i.y && J.y + r.height / 2 <= i.y + i.height, R = (J) => E(J) && (!a || Zl(J, r, a));
8785
+ }, b = (J) => h(J) || g(J) || w(J) || v(J), E = (J) => J.x - r.width / 2 >= i.x && J.x + r.width / 2 <= i.x + i.width && J.y - r.height / 2 >= i.y && J.y + r.height / 2 <= i.y + i.height, R = (J) => E(J) && (!a || Zl(J, r, a));
8786
8786
  if (o.placement) {
8787
8787
  const J = (we) => we.startsWith("top") ? we.replace(/^top/, "bottom") : we.replace(/^bottom/, "top"), ne = (we) => we.endsWith("left") ? we.replace(/left$/, "right") : we.replace(/right$/, "left"), V = o.placement.side, te = [V, J(V), ne(V), J(ne(V)), "top", "bottom", "left", "right", "top-left", "top-right", "bottom-left", "bottom-right"], be = o.placement.offset ?? 50;
8788
8788
  let Ce = c(V, be);
@@ -8847,12 +8847,12 @@ function _A(e, t) {
8847
8847
  if (_.type === "bpmn:Participant") return _;
8848
8848
  _ = _.parent;
8849
8849
  }
8850
- }, g = /* @__PURE__ */ new Map();
8850
+ }, m = /* @__PURE__ */ new Map();
8851
8851
  for (const x of r.filter(
8852
8852
  (_) => !("waypoints" in _ && _.waypoints) && _.type !== "bpmn:Lane" && _.type !== "label" && typeof _.x == "number"
8853
8853
  ))
8854
- g.set(x.id, { x: x.x, y: x.y });
8855
- const h = Gt(e, "participant.add"), m = Gt(e, "node.add"), w = Gt(e, "sequenceFlow.add"), y = Gt(e, "messageFlow.add"), v = Gt(e, "dataStore.add"), b = Gt(e, "dataAssociation.add"), E = Gt(e, "annotation.add"), R = Gt(e, "group.add"), D = new Map(m.map((x) => [x.node.id, x])), P = vw(e, (x) => {
8854
+ m.set(x.id, { x: x.x, y: x.y });
8855
+ const h = Gt(e, "participant.add"), g = Gt(e, "node.add"), w = Gt(e, "sequenceFlow.add"), y = Gt(e, "messageFlow.add"), v = Gt(e, "dataStore.add"), b = Gt(e, "dataAssociation.add"), E = Gt(e, "annotation.add"), R = Gt(e, "group.add"), D = new Map(g.map((x) => [x.node.id, x])), P = vw(e, (x) => {
8856
8856
  var _, M;
8857
8857
  return (M = (_ = p(x)) == null ? void 0 : _.source) == null ? void 0 : M.id;
8858
8858
  }), T = new Set([...P.values()].map((x) => x.flow.id)), $ = w.filter((x) => !T.has(x.flow.id)), j = new Set([...P.values()].map((x) => x.flow.target)), G = (x) => Gt(e, "sequenceFlow.update").filter((_) => _.target === x).length + (j.has(x) ? 1 : 0), J = (x, _, M) => {
@@ -8913,7 +8913,7 @@ function _A(e, t) {
8913
8913
  for (const _ of x.participant.lanes ?? []) B.add(_.id);
8914
8914
  }
8915
8915
  const C = /* @__PURE__ */ new Map();
8916
- for (const x of m) {
8916
+ for (const x of g) {
8917
8917
  const _ = x.node.lane ?? `pool:${x.node.participant ?? ""}`;
8918
8918
  let M = C.get(_);
8919
8919
  M || C.set(_, M = /* @__PURE__ */ new Set([0])), x.band !== void 0 && M.add(x.band);
@@ -8930,7 +8930,7 @@ function _A(e, t) {
8930
8930
  for (const [_, M] of S) {
8931
8931
  if (!x.has(_) || M.size < 2) continue;
8932
8932
  const O = x.get(_), L = M.get(0) ?? 0, k = /* @__PURE__ */ new Set();
8933
- for (const ae of m) {
8933
+ for (const ae of g) {
8934
8934
  if (ae.node.lane !== _ || (ae.band ?? 0) !== 0 || !ae.node.type.endsWith("Gateway")) continue;
8935
8935
  const ye = { in: /* @__PURE__ */ new Set(), out: /* @__PURE__ */ new Set(), cross: /* @__PURE__ */ new Set() };
8936
8936
  for (const se of $) {
@@ -8978,7 +8978,7 @@ function _A(e, t) {
8978
8978
  var k;
8979
8979
  return ((k = S.get(O)) == null ? void 0 : k.get(L)) ?? L;
8980
8980
  };
8981
- for (const O of m) {
8981
+ for (const O of g) {
8982
8982
  if (!O.node.type.endsWith("Gateway")) continue;
8983
8983
  const L = O.node.lane ?? `pool:${O.node.participant ?? ""}`, k = S.get(L);
8984
8984
  if (!k || k.size < 2) continue;
@@ -9053,7 +9053,7 @@ function _A(e, t) {
9053
9053
  }, No = /* @__PURE__ */ new Map();
9054
9054
  for (const x of $) No.set(x.flow.target, (No.get(x.flow.target) ?? 0) + 1);
9055
9055
  const fi = (x) => (No.get(x) ?? 0) <= 1, Wi = new Set(
9056
- m.map((x) => x.node.id).filter(
9056
+ g.map((x) => x.node.id).filter(
9057
9057
  (x) => G(x) === 1 && !$.some((_) => _.flow.target === x || _.flow.source === x && D.has(_.flow.target))
9058
9058
  )
9059
9059
  ), Qn = /* @__PURE__ */ new Map(), nn = (x, _) => {
@@ -9085,7 +9085,7 @@ function _A(e, t) {
9085
9085
  return O > M ? { x: M, width: O - M } : void 0;
9086
9086
  })();
9087
9087
  for (const { op: x } of br) {
9088
- const _ = x.participant, M = m.filter((he) => he.node.participant === _.id).length, O = ((Qg = _.lanes) == null ? void 0 : Qg.length) ?? 0, L = Math.max(1200, M * 160 + 300), k = (_.lanes ?? []).map((he) => _n(en.get(he.id) ?? 0)), F = k.reduce((he, Te) => he + Te, 0);
9088
+ const _ = x.participant, M = g.filter((he) => he.node.participant === _.id).length, O = ((Qg = _.lanes) == null ? void 0 : Qg.length) ?? 0, L = Math.max(1200, M * 160 + 300), k = (_.lanes ?? []).map((he) => _n(en.get(he.id) ?? 0)), F = k.reduce((he, Te) => he + Te, 0);
9089
9089
  O && F < 300 && (k[O - 1] += 300 - F);
9090
9090
  const I = Math.max(300, te * ((en.get(`pool:${_.id}`) ?? 0) + 1)), N = _.blackBox || M + O === 0 ? 120 : O ? Math.max(300, F) : I, H = _.blackBox ? Rt : void 0, U = (H == null ? void 0 : H.x) ?? 100, ee = (H == null ? void 0 : H.width) ?? L, ae = o.createShape({
9091
9091
  type: "bpmn:Participant",
@@ -9133,7 +9133,7 @@ function _A(e, t) {
9133
9133
  let _ = es.get(x);
9134
9134
  return _ || es.set(x, _ = { nodes: [], flows: [] }), _;
9135
9135
  };
9136
- for (const x of m) Eg(x.node.participant ?? "").nodes.push(x);
9136
+ for (const x of g) Eg(x.node.participant ?? "").nodes.push(x);
9137
9137
  for (const x of $) Eg(P1(x.flow.source)).flows.push(x);
9138
9138
  const Cc = (x) => {
9139
9139
  var _;
@@ -10600,7 +10600,7 @@ function _A(e, t) {
10600
10600
  }
10601
10601
  Ig(!0);
10602
10602
  const X1 = 10, Z1 = 400, J1 = (x) => [...x.incoming ?? [], ...x.outgoing ?? []].filter((_) => _.type === "bpmn:DataInputAssociation" || _.type === "bpmn:DataOutputAssociation").map((_) => _.source === x ? _.target : _.source).filter((_) => !!_ && typeof _.y == "number"), Q1 = r.filter(
10603
- (x) => x.type === "bpmn:DataStoreReference" && g.has(x.id)
10603
+ (x) => x.type === "bpmn:DataStoreReference" && m.has(x.id)
10604
10604
  ), eS = (x, _) => {
10605
10605
  const M = x.x + x.width / 2, O = x.y + x.height / 2;
10606
10606
  let L;
@@ -10799,7 +10799,7 @@ function _A(e, t) {
10799
10799
  if (x.has(_.id)) continue;
10800
10800
  const O = (((hm = _.businessObject.extensionElements) == null ? void 0 : hm.values) ?? []).find((I) => I.$type === "bwl:Members"), L = ((O == null ? void 0 : O.refs) ?? "").split(" ").filter(Boolean).map(p).filter((I) => !!I);
10801
10801
  !L.length || !L.some((I) => {
10802
- const N = g.get(I.id);
10802
+ const N = m.get(I.id);
10803
10803
  return !N || N.x !== I.x || N.y !== I.y;
10804
10804
  }) || !L.some((I) => I.x < _.x || I.y < _.y || I.x + I.width > _.x + _.width || I.y + I.height > _.y + _.height) || n.resizeShape(_, Ap(L, _.id));
10805
10805
  }
@@ -10831,7 +10831,7 @@ function _A(e, t) {
10831
10831
  if (!U.length) continue;
10832
10832
  const ee = U.map(p).filter((ue) => !!ue);
10833
10833
  if (!ee.length || !(R.some((ue) => ue.group.id === I.id) || Gt(e, "group.update").some((ue) => ue.id === I.id) || ee.some((ue) => {
10834
- const Ne = g.get(ue.id);
10834
+ const Ne = m.get(ue.id);
10835
10835
  return !Ne || Ne.x !== ue.x || Ne.y !== ue.y;
10836
10836
  }))) continue;
10837
10837
  const ye = new Set(U), se = [...U];
@@ -11045,16 +11045,16 @@ function EA(e, t, n, i) {
11045
11045
  (d) => d.type === "bpmn:Association"
11046
11046
  );
11047
11047
  if (!a.length) return 0;
11048
- const s = (d) => d.map((g) => g.original ? { x: g.x, y: g.y, original: { x: g.original.x, y: g.original.y } } : { x: g.x, y: g.y }), c = (d, g) => d.length === g.length && d.every((h, m) => {
11048
+ const s = (d) => d.map((m) => m.original ? { x: m.x, y: m.y, original: { x: m.original.x, y: m.original.y } } : { x: m.x, y: m.y }), c = (d, m) => d.length === m.length && d.every((h, g) => {
11049
11049
  var w, y, v, b;
11050
- return h.x === g[m].x && h.y === g[m].y && ((w = h.original) == null ? void 0 : w.x) === ((y = g[m].original) == null ? void 0 : y.x) && ((v = h.original) == null ? void 0 : v.y) === ((b = g[m].original) == null ? void 0 : b.y);
11050
+ return h.x === m[g].x && h.y === m[g].y && ((w = h.original) == null ? void 0 : w.x) === ((y = m[g].original) == null ? void 0 : y.x) && ((v = h.original) == null ? void 0 : v.y) === ((b = m[g].original) == null ? void 0 : b.y);
11051
11051
  }), l = a.map((d) => s(d.waypoints)), u = new Set(a.map((d) => d.id));
11052
11052
  r.moveElements([t], { x: n, y: i });
11053
11053
  const p = ze(o), f = [...Zo(p), ...no(p)].filter(
11054
- ([d, g]) => u.has(d) !== u.has(g)
11054
+ ([d, m]) => u.has(d) !== u.has(m)
11055
11055
  ).length;
11056
- return r.moveElements([t], { x: -n, y: -i }), a.forEach((d, g) => {
11057
- c(d.waypoints, l[g]) || r.updateWaypoints(d, l[g]);
11056
+ return r.moveElements([t], { x: -n, y: -i }), a.forEach((d, m) => {
11057
+ c(d.waypoints, l[m]) || r.updateWaypoints(d, l[m]);
11058
11058
  }), f;
11059
11059
  }
11060
11060
  function SA(e, t, n) {
@@ -11069,13 +11069,13 @@ function SA(e, t, n) {
11069
11069
  for (const f of l) {
11070
11070
  const d = i.get(f);
11071
11071
  if (!d || typeof d.x != "number" || typeof d.width != "number") continue;
11072
- let g = d.parent, h;
11073
- for (; g; ) {
11074
- if (g.type === "bpmn:Participant") {
11075
- h = g;
11072
+ let m = d.parent, h;
11073
+ for (; m; ) {
11074
+ if (m.type === "bpmn:Participant") {
11075
+ h = m;
11076
11076
  break;
11077
11077
  }
11078
- g = g.parent;
11078
+ m = m.parent;
11079
11079
  }
11080
11080
  if (!h) {
11081
11081
  const te = d.x + d.width / 2, be = d.y + d.height / 2;
@@ -11154,7 +11154,7 @@ function CA(e, t, n) {
11154
11154
  }, u = r(ze(i)), p = a(u).length;
11155
11155
  if (!p) return;
11156
11156
  const f = u.length, d = [];
11157
- let g = 0, h = p, m = f;
11157
+ let m = 0, h = p, g = f;
11158
11158
  for (let w = 0; w < 6; w++) {
11159
11159
  const y = ze(i), v = a(r(y));
11160
11160
  if (!v.length) break;
@@ -11176,9 +11176,9 @@ function CA(e, t, n) {
11176
11176
  if (!R.length) break;
11177
11177
  o.moveElements(R, { x: E.dx, y: 0 }), d.push({ els: R, dx: E.dx });
11178
11178
  const D = r(ze(i)), P = a(D).length;
11179
- P < p && D.length <= f && (P < h || P === h && D.length < m || g === 0) && (g = d.length, h = P, m = D.length);
11179
+ P < p && D.length <= f && (P < h || P === h && D.length < g || m === 0) && (m = d.length, h = P, g = D.length);
11180
11180
  }
11181
- for (const { els: w, dx: y } of d.slice(g).reverse()) o.moveElements(w, { x: -y, y: 0 });
11181
+ for (const { els: w, dx: y } of d.slice(m).reverse()) o.moveElements(w, { x: -y, y: 0 });
11182
11182
  }
11183
11183
  const Rs = 0.5, bw = 150;
11184
11184
  function MA(e, t) {
@@ -11231,9 +11231,9 @@ function PA(e, t) {
11231
11231
  const { shapes: v } = f.get(y.id), b = v.flatMap((E) => [l(E), ...u(E.label) ? [l(E.label)] : []]);
11232
11232
  b.length && (d = Math.max(d, Math.max(...b) + bw));
11233
11233
  }
11234
- const g = a.filter((y) => Math.abs(l(y) - d) > Rs);
11235
- if (!g.length) return;
11236
- for (const y of g) {
11234
+ const m = a.filter((y) => Math.abs(l(y) - d) > Rs);
11235
+ if (!m.length) return;
11236
+ for (const y of m) {
11237
11237
  const v = l(y), { shapes: b, edges: E, lanes: R } = f.get(y.id);
11238
11238
  if ([
11239
11239
  ...b.flatMap((T) => [l(T), ...u(T.label) ? [l(T.label)] : []]),
@@ -11254,9 +11254,9 @@ function PA(e, t) {
11254
11254
  })) return;
11255
11255
  }
11256
11256
  }
11257
- const h = () => new Set(lt(ze(n)).map(ut)), m = h(), w = g.map((y) => y.width);
11258
- for (const y of g) Tf(i, y, d - y.x, { layout: !1 });
11259
- [...h()].every((y) => m.has(y)) || g.forEach((y, v) => Tf(i, y, w[v], { layout: !1 }));
11257
+ const h = () => new Set(lt(ze(n)).map(ut)), g = h(), w = m.map((y) => y.width);
11258
+ for (const y of m) Tf(i, y, d - y.x, { layout: !1 });
11259
+ [...h()].every((y) => g.has(y)) || m.forEach((y, v) => Tf(i, y, w[v], { layout: !1 }));
11260
11260
  }
11261
11261
  function TA(e, t, n) {
11262
11262
  const { elementRegistry: i } = e, o = e.modeling, r = (l) => lt(l).filter((u) => !t.has(ut(u))), a = (l, u) => u.x >= l.x && u.y >= l.y && u.x + u.width <= l.x + l.width && u.y + u.height <= l.y + l.height, s = (l) => ({
@@ -11279,7 +11279,7 @@ function TA(e, t, n) {
11279
11279
  if (!p.length) continue;
11280
11280
  const f = p.map((R) => i.get(R.id)).filter((R) => !!R && typeof R.x == "number");
11281
11281
  if (f.length !== p.length) continue;
11282
- const d = s(p), g = s(f), h = g.l + (l.x - d.l), m = g.t + (l.y - d.t), w = g.r + (l.x + l.width - d.r), y = g.b + (l.y + l.height - d.b), v = { x: h, y: m, width: w - h, height: y - m };
11282
+ const d = s(p), m = s(f), h = m.l + (l.x - d.l), g = m.t + (l.y - d.t), w = m.r + (l.x + l.width - d.r), y = m.b + (l.y + l.height - d.b), v = { x: h, y: g, width: w - h, height: y - g };
11283
11283
  if (v.width <= 0 || v.height <= 0 || Math.abs(v.x - u.x) < 1 && Math.abs(v.y - u.y) < 1 && Math.abs(v.width - u.width) < 1 && Math.abs(v.height - u.height) < 1)
11284
11284
  continue;
11285
11285
  const b = r(ze(i)).length, E = { x: u.x, y: u.y, width: u.width, height: u.height };
@@ -11290,23 +11290,23 @@ const Vc = 20, Wc = 10;
11290
11290
  function kA(e, t, n, i) {
11291
11291
  var p, f;
11292
11292
  const { elementRegistry: o } = e, r = e.modeling, a = (d) => new Set(
11293
- lt(d, { includeObservationOnly: !0 }).filter((g) => g.kind === "edge-along-group-boundary").map(ut)
11293
+ lt(d, { includeObservationOnly: !0 }).filter((m) => m.kind === "edge-along-group-boundary").map(ut)
11294
11294
  ), s = ze(o), c = lt(s, { includeObservationOnly: !0 }).filter(
11295
11295
  (d) => d.kind === "edge-along-group-boundary" && !t.has(ut(d))
11296
11296
  );
11297
11297
  if (!c.length) return;
11298
11298
  const l = new Map(n.shapes.map((d) => [d.id, d])), u = /* @__PURE__ */ new Map();
11299
11299
  for (const d of c) u.set(d.group, [...u.get(d.group) ?? [], d]);
11300
- for (const [d, g] of u) {
11300
+ for (const [d, m] of u) {
11301
11301
  const h = s.shapes.find((Ae) => Ae.id === d);
11302
11302
  if (!((p = h == null ? void 0 : h.members) != null && p.length)) continue;
11303
- const m = l.get(d);
11304
- if (!(!m || Math.abs(m.x - h.x) >= 0.5 || Math.abs(m.y - h.y) >= 0.5 || Math.abs(m.width - h.width) >= 0.5 || Math.abs(m.height - h.height) >= 0.5)) continue;
11303
+ const g = l.get(d);
11304
+ if (!(!g || Math.abs(g.x - h.x) >= 0.5 || Math.abs(g.y - h.y) >= 0.5 || Math.abs(g.width - h.width) >= 0.5 || Math.abs(g.height - h.height) >= 0.5)) continue;
11305
11305
  const y = h.members.map((Ae) => o.get(Ae)).filter((Ae) => !!Ae && typeof Ae.x == "number");
11306
11306
  if (!y.length) continue;
11307
11307
  const v = Math.min(...y.map((Ae) => Ae.x)), b = Math.min(...y.map((Ae) => Ae.y)), E = Math.max(...y.map((Ae) => Ae.x + Ae.width)), R = Math.max(...y.map((Ae) => Ae.y + Ae.height)), D = h.x, P = h.y, T = h.x + h.width, $ = h.y + h.height;
11308
11308
  let j = D, G = P, J = T, ne = $;
11309
- for (const Ae of g) {
11309
+ for (const Ae of m) {
11310
11310
  const B = s.edges.find((S) => S.id === Ae.edge);
11311
11311
  if (!B) continue;
11312
11312
  const C = B.endpoints.some((S) => {
@@ -11375,12 +11375,12 @@ function DA(e, t, n = {}) {
11375
11375
  sharedEndpointCrossings: { before: 0, after: 0, pairs: [] }
11376
11376
  };
11377
11377
  if (s.length) return { ok: !1, issues: s, findings: [], stats: c };
11378
- const l = dA(t, a, i), u = i && l.writes.size ? OA(l.writes, r.elementRegistry, r.canvas, i) : void 0, p = ze(r.elementRegistry), f = new Set(lt(p).map(ut)), d = new Set(lt(p, { includeObservationOnly: !0 }).map(ut)), g = new Set(
11378
+ const l = dA(t, a, i), u = i && l.writes.size ? OA(l.writes, r.elementRegistry, r.canvas, i) : void 0, p = ze(r.elementRegistry), f = new Set(lt(p).map(ut)), d = new Set(lt(p, { includeObservationOnly: !0 }).map(ut)), m = new Set(
11379
11379
  vw(l.ops, (V) => {
11380
11380
  var te, be;
11381
11381
  return (be = (te = r.elementRegistry.get(V)) == null ? void 0 : te.source) == null ? void 0 : be.id;
11382
11382
  }).keys()
11383
- ), h = new Set(p.edges.map((V) => V.id).filter((V) => !g.has(V))), m = new Set(
11383
+ ), h = new Set(p.edges.map((V) => V.id).filter((V) => !m.has(V))), g = new Set(
11384
11384
  t.flatMap(
11385
11385
  (V) => V.kind === "sequenceFlow.update" && (V.source !== void 0 || V.target !== void 0) ? [V.id] : []
11386
11386
  )
@@ -11399,9 +11399,9 @@ function DA(e, t, n = {}) {
11399
11399
  _S(P, () => {
11400
11400
  o(l.ops, r);
11401
11401
  for (const te of (u == null ? void 0 : u.contexts()) ?? []) P.execute(Bb, te);
11402
- CA(r, f, p), MA(r, p), TA(r, f, p), TM(r, p, m), CM(r, h, w), kM(r, h);
11402
+ CA(r, f, p), MA(r, p), TA(r, f, p), TM(r, p, g), CM(r, h, w), kM(r, h);
11403
11403
  const V = Im(r, f);
11404
- yM(r, b, h), QM(r, f, h), WM(r, h), VM(r, h, m), XM(r, f, h), JM(r, f, h), EM(r, R, h), BM(r, h, p), sA(r, f, h), aA(r, h, m), lA(r, w), SA(r, f, w), Im(r, f, V), kA(r, d, p, h), pA(r, f), rA(r, D);
11404
+ yM(r, b, h), QM(r, f, h), WM(r, h), VM(r, h, g), XM(r, f, h), JM(r, f, h), EM(r, R, h), BM(r, h, p), sA(r, f, h), aA(r, h, g), lA(r, w), SA(r, f, w), Im(r, f, V), kA(r, d, p, h), pA(r, f), rA(r, D);
11405
11405
  });
11406
11406
  } catch (V) {
11407
11407
  return {
@@ -11465,7 +11465,7 @@ function ji(e) {
11465
11465
  function NA(e, t = {}) {
11466
11466
  const n = e.rootElements ?? [], i = n.find((K) => K.$type === "bpmn:Collaboration"), o = new Map(
11467
11467
  n.filter((K) => K.$type === "bpmn:Process").map((K) => [K.id, K])
11468
- ), r = [], a = [], s = [], c = [], l = [], u = [], p = { poolOrders: {}, bands: {}, placements: {}, afterColumns: {} }, f = [], d = [], g = [], h = [], m = [], w = [], y = [], v = /* @__PURE__ */ new Map(), b = /* @__PURE__ */ new Set(), E = /* @__PURE__ */ new Set(), R = (K) => {
11468
+ ), r = [], a = [], s = [], c = [], l = [], u = [], p = { poolOrders: {}, bands: {}, placements: {}, afterColumns: {} }, f = [], d = [], m = [], h = [], g = [], w = [], y = [], v = /* @__PURE__ */ new Map(), b = /* @__PURE__ */ new Set(), E = /* @__PURE__ */ new Set(), R = (K) => {
11469
11469
  K && b.add(K);
11470
11470
  }, D = (K) => {
11471
11471
  b.add(K), E.add(K);
@@ -11475,7 +11475,7 @@ function NA(e, t = {}) {
11475
11475
  const q = typeof oe.anchor == "string" ? oe.anchor : void 0;
11476
11476
  if (!q || !IA(oe.side)) return;
11477
11477
  const Z = typeof oe.offset == "number" ? oe.offset : void 0;
11478
- m.push({ owner: K.id, anchor: q, side: oe.side, ...Z !== void 0 ? { offset: Z } : {} });
11478
+ g.push({ owner: K.id, anchor: q, side: oe.side, ...Z !== void 0 ? { offset: Z } : {} });
11479
11479
  }, T = (K) => {
11480
11480
  const oe = ey(K, "bwl:Members"), q = typeof (oe == null ? void 0 : oe.refs) == "string" ? oe.refs.split(/\s+/).filter(Boolean) : [];
11481
11481
  q.length && y.push({ owner: K.id, refs: q });
@@ -11487,7 +11487,7 @@ function NA(e, t = {}) {
11487
11487
  D(q.id), v.set(q.id, q), c.push({ id: q.id, text: typeof q.text == "string" ? q.text : "" }), P(q);
11488
11488
  break;
11489
11489
  case "bpmn:Association":
11490
- g.push({
11490
+ m.push({
11491
11491
  id: q.id,
11492
11492
  type: q.$type,
11493
11493
  source: ji(q.sourceRef),
@@ -11621,7 +11621,7 @@ function NA(e, t = {}) {
11621
11621
  }
11622
11622
  te.push({ ...K.id ? { id: K.id } : {}, source: K.source, target: K.target }), K.id && E.add(K.id);
11623
11623
  }
11624
- for (const K of g) {
11624
+ for (const K of m) {
11625
11625
  if (!be(K.source, K.target)) {
11626
11626
  u.push({ id: K.id ?? "", type: K.type, reason: "endpoint-outside-mvp" });
11627
11627
  continue;
@@ -11633,7 +11633,7 @@ function NA(e, t = {}) {
11633
11633
  const q = oe.filter((ce) => b.has(ce)), Z = Ce.get(K);
11634
11634
  Z && q.length && (Z.members = q);
11635
11635
  }
11636
- for (const K of m)
11636
+ for (const K of g)
11637
11637
  b.has(K.anchor) && (p.placements[K.owner] = { anchor: K.anchor, side: K.side, ...K.offset !== void 0 ? { offset: K.offset } : {} });
11638
11638
  for (const [K, oe] of w)
11639
11639
  b.has(oe) && (p.afterColumns[K] = oe);
@@ -11953,14 +11953,14 @@ function iF() {
11953
11953
  const d = () => {
11954
11954
  e.value = !0, l();
11955
11955
  };
11956
- function g(w, y) {
11956
+ function m(w, y) {
11957
11957
  JA(w).set(!y);
11958
11958
  }
11959
11959
  function h() {
11960
11960
  if (!c) throw new Error("modeler not attached — 뷰 @ready 후 attach() 필요");
11961
11961
  return c;
11962
11962
  }
11963
- function m() {
11963
+ function g() {
11964
11964
  return c == null ? void 0 : c.get("commandStack");
11965
11965
  }
11966
11966
  return {
@@ -11995,13 +11995,13 @@ function iF() {
11995
11995
  return { name: typeof b == "string" && b.trim() !== "" ? b.trim() : void 0, type: typeof v.$type == "string" ? v.$type : "" };
11996
11996
  },
11997
11997
  attach(w) {
11998
- c && this.detach(), c = w, c.get("eventBus").on("commandStack.changed", d), t.value || g(c, !1), f(), l();
11998
+ c && this.detach(), c = w, c.get("eventBus").on("commandStack.changed", d), t.value || m(c, !1), f(), l();
11999
11999
  },
12000
12000
  detach() {
12001
- c == null || c.get("eventBus").off("commandStack.changed", d), c && !t.value && g(c, !0), c = void 0, i.value = Fp, o.value = void 0, r.value = void 0;
12001
+ c == null || c.get("eventBus").off("commandStack.changed", d), c && !t.value && m(c, !0), c = void 0, i.value = Fp, o.value = void 0, r.value = void 0;
12002
12002
  },
12003
12003
  setEditable(w) {
12004
- t.value = w, c && g(c, w);
12004
+ t.value = w, c && m(c, w);
12005
12005
  },
12006
12006
  async applyAgentBatch(w, y) {
12007
12007
  const v = h();
@@ -12027,19 +12027,19 @@ function iF() {
12027
12027
  // command seam — 미연결 시 canUndo/canRedo 는 false (UI 버튼 게이트), undo/redo 는 no-op.
12028
12028
  undo: () => {
12029
12029
  var w;
12030
- return (w = m()) == null ? void 0 : w.undo();
12030
+ return (w = g()) == null ? void 0 : w.undo();
12031
12031
  },
12032
12032
  redo: () => {
12033
12033
  var w;
12034
- return (w = m()) == null ? void 0 : w.redo();
12034
+ return (w = g()) == null ? void 0 : w.redo();
12035
12035
  },
12036
12036
  canUndo: () => {
12037
12037
  var w;
12038
- return ((w = m()) == null ? void 0 : w.canUndo()) ?? !1;
12038
+ return ((w = g()) == null ? void 0 : w.canUndo()) ?? !1;
12039
12039
  },
12040
12040
  canRedo: () => {
12041
12041
  var w;
12042
- return ((w = m()) == null ? void 0 : w.canRedo()) ?? !1;
12042
+ return ((w = g()) == null ? void 0 : w.canRedo()) ?? !1;
12043
12043
  }
12044
12044
  };
12045
12045
  }
@@ -12068,33 +12068,34 @@ function Rw(e) {
12068
12068
  return n;
12069
12069
  }
12070
12070
  const cs = (e) => ({ id: e.bo.id, type: e.bo.$type, name: e.name });
12071
- function oF(e) {
12072
- const t = Sw(e), n = Rw(e);
12073
- let i;
12074
- const o = {}, r = [], a = [], s = [];
12075
- for (const g of n) {
12076
- const h = g.trs.filter((m) => (m.body ?? "") === g.name).map(Ln);
12077
- if (h.length) {
12078
- const m = [...h].sort().join("+");
12079
- o[m] = (o[m] ?? 0) + 1, i = i ? new Set([...i].filter((w) => h.includes(w))) : new Set(h);
12080
- } else g.trs.some((m) => m.body) ? r.push(cs(g)) : s.push({ e: g, inference: kf(g.name) });
12081
- for (const m of g.trs) {
12082
- const w = Ln(m), y = m.body ?? "", v = kf(y);
12083
- v.locale && v.locale !== w ? a.push({ ...cs(g), locale: w, script: v.script }) : w === "ko" && v.script === "han" && g.trs.some((b) => b !== m && b.body === y) && a.push({ ...cs(g), locale: w, script: "han" });
12084
- }
12085
- }
12086
- const c = new Set(s.map((g) => g.inference.locale).filter(Boolean));
12087
- let l, u;
12088
- if (t) u = "kept";
12089
- else if (i && i.size === 1) [l, u] = [[...i][0], "matched"];
12090
- else if (i && i.size > 1) {
12091
- const g = c.size === 1 ? [...c][0] : void 0;
12092
- g && i.has(g) ? [l, u] = [g, "matched"] : u = "ambiguous";
12093
- } else i ? u = "mixed" : c.size === 1 ? [l, u] = [[...c][0], "script"] : u = c.size > 1 ? "mixed" : "no-evidence";
12094
- const p = t ?? l, f = [], d = [];
12095
- for (const { e: g, inference: h } of s)
12096
- h.locale ? h.locale !== p && f.push({ ...cs(g), locale: h.locale }) : d.push({ ...cs(g), script: h.script });
12097
- return { root: { current: t, proposed: l, reason: u }, additions: f, undecided: d, drift: r, matchedBy: o, scriptMismatch: a };
12071
+ function oF(e, t = {}) {
12072
+ const n = Sw(e), i = Rw(e);
12073
+ let o;
12074
+ const r = {}, a = [], s = [], c = [];
12075
+ for (const h of i) {
12076
+ const g = h.trs.filter((w) => (w.body ?? "") === h.name).map(Ln);
12077
+ if (g.length) {
12078
+ const w = [...g].sort().join("+");
12079
+ r[w] = (r[w] ?? 0) + 1, o = o ? new Set([...o].filter((y) => g.includes(y))) : new Set(g);
12080
+ } else h.trs.some((w) => w.body) ? a.push(cs(h)) : c.push({ e: h, inference: kf(h.name) });
12081
+ for (const w of h.trs) {
12082
+ const y = Ln(w), v = w.body ?? "", b = kf(v);
12083
+ b.locale && b.locale !== y ? s.push({ ...cs(h), locale: y, script: b.script }) : y === "ko" && b.script === "han" && h.trs.some((E) => E !== w && E.body === v) && s.push({ ...cs(h), locale: y, script: "han" });
12084
+ }
12085
+ }
12086
+ const l = new Set(c.map((h) => h.inference.locale).filter(Boolean));
12087
+ let u, p;
12088
+ if (n) p = "kept";
12089
+ else if (o && o.size === 1) [u, p] = [[...o][0], "matched"];
12090
+ else if (o && o.size > 1) {
12091
+ const h = l.size === 1 ? [...l][0] : void 0;
12092
+ h && o.has(h) ? [u, p] = [h, "matched"] : p = "ambiguous";
12093
+ } else o ? p = "mixed" : l.size === 1 ? [u, p] = [[...l][0], "script"] : p = l.size > 1 ? "mixed" : "no-evidence";
12094
+ u && t.designLocale && u !== t.designLocale && ([u, p] = [void 0, "non-design"]);
12095
+ const f = n ?? u, d = [], m = [];
12096
+ for (const { e: h, inference: g } of c)
12097
+ g.locale ? g.locale !== f && d.push({ ...cs(h), locale: g.locale }) : m.push({ ...cs(h), script: g.script });
12098
+ return { root: { current: n, proposed: u, reason: p }, additions: d, undecided: m, drift: a, matchedBy: r, scriptMismatch: s };
12098
12099
  }
12099
12100
  function rF(e, t) {
12100
12101
  const n = e.$model;
@@ -12194,26 +12195,26 @@ function sF(e, t) {
12194
12195
  const l = { id: a, type: s.type }, p = [
12195
12196
  [
12196
12197
  "history",
12197
- t.index.sameId(a).filter((m) => m.doc === t.doc && jp(m.state, c)).sort((m, w) => w.version - m.version).slice(0, 1).map((m) => m.state)
12198
+ t.index.sameId(a).filter((g) => g.doc === t.doc && jp(g.state, c)).sort((g, w) => w.version - g.version).slice(0, 1).map((g) => g.state)
12198
12199
  ],
12199
- ["lineage", t.index.sameId(a).filter((m) => m.doc !== t.doc && jp(m.state, c)).map((m) => m.state)],
12200
+ ["lineage", t.index.sameId(a).filter((g) => g.doc !== t.doc && jp(g.state, c)).map((g) => g.state)],
12200
12201
  [
12201
12202
  "bodies",
12202
- t.index.sameBodies(s.cells).filter((m) => !(m.doc === t.doc && m.id === a) && jp(m.state, c)).map((m) => m.state)
12203
+ t.index.sameBodies(s.cells).filter((g) => !(g.doc === t.doc && g.id === a) && jp(g.state, c)).map((g) => g.state)
12203
12204
  ]
12204
- ].find(([, m]) => m.length);
12205
+ ].find(([, g]) => g.length);
12205
12206
  if (!p) {
12206
12207
  if (!r(s)) continue;
12207
- for (const [m, w] of c) for (let y = 0; y < w; y++) n.unresolved.push({ ...l, body: m, script: kf(m).script });
12208
+ for (const [g, w] of c) for (let y = 0; y < w; y++) n.unresolved.push({ ...l, body: g, script: kf(g).script });
12208
12209
  continue;
12209
12210
  }
12210
- const [f, d] = p, g = d.map((m) => oP(s, m, c));
12211
- if (g.some((m) => m.overflow) || new Set(g.map(rP)).size > 1) {
12211
+ const [f, d] = p, m = d.map((g) => oP(s, g, c));
12212
+ if (m.some((g) => g.overflow) || new Set(m.map(rP)).size > 1) {
12212
12213
  n.ambiguous.push({ ...l, source: f });
12213
12214
  continue;
12214
12215
  }
12215
- const [h] = g;
12216
- for (const m of h.stale) n.stale.push({ ...l, ...m });
12216
+ const [h] = m;
12217
+ for (const g of h.stale) n.stale.push({ ...l, ...g });
12217
12218
  h.cells.length && n.restores.push({ ...l, source: f, cells: h.cells });
12218
12219
  }
12219
12220
  return n;
@@ -12818,7 +12819,7 @@ function Lw(e, t) {
12818
12819
  }
12819
12820
  return new Lw(v, a);
12820
12821
  }
12821
- const g = {
12822
+ const m = {
12822
12823
  factory: p,
12823
12824
  type: u,
12824
12825
  value: function(v) {
@@ -12833,7 +12834,7 @@ function Lw(e, t) {
12833
12834
  });
12834
12835
  };
12835
12836
  }
12836
- function m(v) {
12837
+ function g(v) {
12837
12838
  const b = v.__exports__;
12838
12839
  if (b) {
12839
12840
  const E = v.__modules__, R = Object.keys(v).reduce((j, G) => (G !== "__exports__" && G !== "__modules__" && G !== "__init__" && G !== "__depends__" && (j[G] = v[G]), j), /* @__PURE__ */ Object.create(null)), D = (E || []).concat(R), P = d(D), T = Cl(function(j) {
@@ -12861,14 +12862,14 @@ function Lw(e, t) {
12861
12862
  return;
12862
12863
  }
12863
12864
  const D = R[0], P = R[1];
12864
- o[E] = [g[D], NP(D, P), D];
12865
+ o[E] = [m[D], NP(D, P), D];
12865
12866
  }), h(v, a);
12866
12867
  }
12867
12868
  function w(v, b) {
12868
12869
  return v.indexOf(b) !== -1 || (v = (b.__depends__ || []).reduce(w, v), v.indexOf(b) !== -1) ? v : v.concat(b);
12869
12870
  }
12870
12871
  function y(v) {
12871
- const b = v.reduce(w, []).map(m);
12872
+ const b = v.reduce(w, []).map(g);
12872
12873
  let E = !1;
12873
12874
  return function() {
12874
12875
  E || (E = !0, b.forEach((R) => R()));
@@ -13236,9 +13237,9 @@ function nT(e) {
13236
13237
  return t.toString = jd, t;
13237
13238
  }
13238
13239
  function yy(e, t, n, i, o, r, a, s, c) {
13239
- var l = 1 - c, u = gy(l, 3), p = gy(l, 2), f = c * c, d = f * c, g = u * e + p * 3 * c * n + l * 3 * c * c * o + d * a, h = u * t + p * 3 * c * i + l * 3 * c * c * r + d * s;
13240
+ var l = 1 - c, u = gy(l, 3), p = gy(l, 2), f = c * c, d = f * c, m = u * e + p * 3 * c * n + l * 3 * c * c * o + d * a, h = u * t + p * 3 * c * i + l * 3 * c * c * r + d * s;
13240
13241
  return {
13241
- x: Ql(g),
13242
+ x: Ql(m),
13242
13243
  y: Ql(h)
13243
13244
  };
13244
13245
  }
@@ -13263,9 +13264,9 @@ function xy(e, t, n, i, o) {
13263
13264
  }
13264
13265
  function by(e, t, n, i, o, r, a, s, c) {
13265
13266
  c == null && (c = 1), c = c > 1 ? 1 : c < 0 ? 0 : c;
13266
- for (var l = c / 2, u = 12, p = [-0.1252, 0.1252, -0.3678, 0.3678, -0.5873, 0.5873, -0.7699, 0.7699, -0.9041, 0.9041, -0.9816, 0.9816], f = [0.2491, 0.2491, 0.2335, 0.2335, 0.2032, 0.2032, 0.1601, 0.1601, 0.1069, 0.1069, 0.0472, 0.0472], d = 0, g = 0; g < u; g++) {
13267
- var h = l * p[g] + l, m = xy(h, e, n, o, a), w = xy(h, t, i, r, s), y = m * m + w * w;
13268
- d += f[g] * rn.sqrt(y);
13267
+ for (var l = c / 2, u = 12, p = [-0.1252, 0.1252, -0.3678, 0.3678, -0.5873, 0.5873, -0.7699, 0.7699, -0.9041, 0.9041, -0.9816, 0.9816], f = [0.2491, 0.2491, 0.2335, 0.2335, 0.2032, 0.2032, 0.1601, 0.1601, 0.1069, 0.1069, 0.0472, 0.0472], d = 0, m = 0; m < u; m++) {
13268
+ var h = l * p[m] + l, g = xy(h, e, n, o, a), w = xy(h, t, i, r, s), y = g * g + w * w;
13269
+ d += f[m] * rn.sqrt(y);
13269
13270
  }
13270
13271
  return l * d;
13271
13272
  }
@@ -13273,8 +13274,8 @@ function oT(e, t, n, i, o, r, a, s) {
13273
13274
  if (!(Qi(e, n) < Ji(o, a) || Ji(e, n) > Qi(o, a) || Qi(t, i) < Ji(r, s) || Ji(t, i) > Qi(r, s))) {
13274
13275
  var c = (e * i - t * n) * (o - a) - (e - n) * (o * s - r * a), l = (e * i - t * n) * (r - s) - (t - i) * (o * s - r * a), u = (e - n) * (r - s) - (t - i) * (o - a);
13275
13276
  if (u) {
13276
- var p = Ql(c / u), f = Ql(l / u), d = +p.toFixed(2), g = +f.toFixed(2);
13277
- if (!(d < +Ji(e, n).toFixed(2) || d > +Qi(e, n).toFixed(2) || d < +Ji(o, a).toFixed(2) || d > +Qi(o, a).toFixed(2) || g < +Ji(t, i).toFixed(2) || g > +Qi(t, i).toFixed(2) || g < +Ji(r, s).toFixed(2) || g > +Qi(r, s).toFixed(2)))
13277
+ var p = Ql(c / u), f = Ql(l / u), d = +p.toFixed(2), m = +f.toFixed(2);
13278
+ if (!(d < +Ji(e, n).toFixed(2) || d > +Qi(e, n).toFixed(2) || d < +Ji(o, a).toFixed(2) || d > +Qi(o, a).toFixed(2) || m < +Ji(t, i).toFixed(2) || m > +Qi(t, i).toFixed(2) || m < +Ji(r, s).toFixed(2) || m > +Qi(r, s).toFixed(2)))
13278
13279
  return { x: p, y: f };
13279
13280
  }
13280
13281
  }
@@ -13286,7 +13287,7 @@ function rT(e, t, n) {
13286
13287
  var i = vy(e), o = vy(t);
13287
13288
  if (!iT(i, o))
13288
13289
  return [];
13289
- var r = by(...e), a = by(...t), s = wy(e) ? 1 : ~~(r / 5) || 1, c = wy(t) ? 1 : ~~(a / 5) || 1, l = new Array(s + 1), u = new Array(c + 1), p = {}, f = [], d, g;
13290
+ var r = by(...e), a = by(...t), s = wy(e) ? 1 : ~~(r / 5) || 1, c = wy(t) ? 1 : ~~(a / 5) || 1, l = new Array(s + 1), u = new Array(c + 1), p = {}, f = [], d, m;
13290
13291
  for (d = 0; d < s + 1; d++) {
13291
13292
  var h = yy(...e, d / s);
13292
13293
  l[d] = { x: h.x, y: h.y, t: d / s };
@@ -13294,13 +13295,13 @@ function rT(e, t, n) {
13294
13295
  for (d = 0; d < c + 1; d++)
13295
13296
  h = yy(...t, d / c), u[d] = { x: h.x, y: h.y, t: d / c };
13296
13297
  for (d = 0; d < s; d++)
13297
- for (g = 0; g < c; g++) {
13298
- var m = l[d], w = l[d + 1], y = u[g], v = u[g + 1], b = qo(w.x - m.x) < 0.01 ? "y" : "x", E = qo(v.x - y.x) < 0.01 ? "y" : "x", R = oT(m.x, m.y, w.x, w.y, y.x, y.y, v.x, v.y), D;
13298
+ for (m = 0; m < c; m++) {
13299
+ var g = l[d], w = l[d + 1], y = u[m], v = u[m + 1], b = qo(w.x - g.x) < 0.01 ? "y" : "x", E = qo(v.x - y.x) < 0.01 ? "y" : "x", R = oT(g.x, g.y, w.x, w.y, y.x, y.y, v.x, v.y), D;
13299
13300
  if (R) {
13300
13301
  if (D = R.x.toFixed(9) + "#" + R.y.toFixed(9), p[D])
13301
13302
  continue;
13302
13303
  p[D] = !0;
13303
- var P = m.t + qo((R[b] - m[b]) / (w[b] - m[b])) * (w.t - m.t), T = y.t + qo((R[E] - y[E]) / (v[E] - y[E])) * (v.t - y.t);
13304
+ var P = g.t + qo((R[b] - g[b]) / (w[b] - g[b])) * (w.t - g.t), T = y.t + qo((R[E] - y[E]) / (v[E] - y[E])) * (v.t - y.t);
13304
13305
  P >= 0 && P <= 1 && T >= 0 && T <= 1 && f.push({
13305
13306
  x: R.x,
13306
13307
  y: R.y,
@@ -13313,12 +13314,12 @@ function rT(e, t, n) {
13313
13314
  }
13314
13315
  function Bw(e, t, n) {
13315
13316
  e = Ey(e), t = Ey(t);
13316
- for (var i, o, r, a, s, c, l, u, p, f, d = n ? 0 : [], g = 0, h = e.length; g < h; g++) {
13317
- var m = e[g];
13318
- if (m[0] == "M")
13319
- i = s = m[1], o = c = m[2];
13317
+ for (var i, o, r, a, s, c, l, u, p, f, d = n ? 0 : [], m = 0, h = e.length; m < h; m++) {
13318
+ var g = e[m];
13319
+ if (g[0] == "M")
13320
+ i = s = g[1], o = c = g[2];
13320
13321
  else {
13321
- m[0] == "C" ? (p = [i, o, ...m.slice(1)], i = p[6], o = p[7]) : (p = [i, o, i, o, s, c, s, c], i = s, o = c);
13322
+ g[0] == "C" ? (p = [i, o, ...g.slice(1)], i = p[6], o = p[7]) : (p = [i, o, i, o, s, c, s, c], i = s, o = c);
13322
13323
  for (var w = 0, y = t.length; w < y; w++) {
13323
13324
  var v = t[w];
13324
13325
  if (v[0] == "M")
@@ -13328,7 +13329,7 @@ function Bw(e, t, n) {
13328
13329
  var b = rT(p, f);
13329
13330
  {
13330
13331
  for (var E = 0, R = b.length; E < R; E++)
13331
- b[E].segment1 = g, b[E].segment2 = w, b[E].bez1 = p, b[E].bez2 = f;
13332
+ b[E].segment1 = m, b[E].segment2 = w, b[E].bez1 = p, b[E].bez2 = f;
13332
13333
  d = d.concat(b);
13333
13334
  }
13334
13335
  }
@@ -13364,8 +13365,8 @@ function sT(e) {
13364
13365
  c[f] = +l[f] + (f % 2 ? n : i);
13365
13366
  }
13366
13367
  else
13367
- for (var g = 0, h = l.length; g < h; g++)
13368
- c[g] = l[g];
13368
+ for (var m = 0, h = l.length; m < h; m++)
13369
+ c[m] = l[m];
13369
13370
  switch (s = s.toUpperCase(), c[0]) {
13370
13371
  case "Z":
13371
13372
  n = +o, i = +r;
@@ -13409,17 +13410,17 @@ function _y(e, t, n, i, o, r) {
13409
13410
  ];
13410
13411
  }
13411
13412
  function $w(e, t, n, i, o, r, a, s, c, l) {
13412
- var u = jo * 120 / 180, p = jo / 180 * (+o || 0), f = [], d, g = JP(function(B, C, S) {
13413
+ var u = jo * 120 / 180, p = jo / 180 * (+o || 0), f = [], d, m = JP(function(B, C, S) {
13413
13414
  var W = B * rn.cos(S) - C * rn.sin(S), X = B * rn.sin(S) + C * rn.cos(S);
13414
13415
  return { x: W, y: X };
13415
13416
  });
13416
13417
  if (l)
13417
13418
  D = l[0], P = l[1], E = l[2], R = l[3];
13418
13419
  else {
13419
- d = g(e, t, -p), e = d.x, t = d.y, d = g(s, c, -p), s = d.x, c = d.y;
13420
- var h = (e - s) / 2, m = (t - c) / 2, w = h * h / (n * n) + m * m / (i * i);
13420
+ d = m(e, t, -p), e = d.x, t = d.y, d = m(s, c, -p), s = d.x, c = d.y;
13421
+ var h = (e - s) / 2, g = (t - c) / 2, w = h * h / (n * n) + g * g / (i * i);
13421
13422
  w > 1 && (w = rn.sqrt(w), n = w * n, i = w * i);
13422
- var y = n * n, v = i * i, b = (r == a ? -1 : 1) * rn.sqrt(qo((y * v - y * m * m - v * h * h) / (y * m * m + v * h * h))), E = b * n * m / i + (e + s) / 2, R = b * -i * h / n + (t + c) / 2, D = rn.asin(((t - R) / i).toFixed(9)), P = rn.asin(((c - R) / i).toFixed(9));
13423
+ var y = n * n, v = i * i, b = (r == a ? -1 : 1) * rn.sqrt(qo((y * v - y * g * g - v * h * h) / (y * g * g + v * h * h))), E = b * n * g / i + (e + s) / 2, R = b * -i * h / n + (t + c) / 2, D = rn.asin(((t - R) / i).toFixed(9)), P = rn.asin(((c - R) / i).toFixed(9));
13423
13424
  D = e < E ? jo - D : D, P = s < E ? jo - P : P, D < 0 && (D = jo * 2 + D), P < 0 && (P = jo * 2 + P), a && D > P && (D = D - jo * 2), !a && P > D && (P = P - jo * 2);
13424
13425
  }
13425
13426
  var T = P - D;
@@ -13433,18 +13434,18 @@ function $w(e, t, n, i, o, r, a, s, c, l) {
13433
13434
  return [oe, q, Z].concat(f);
13434
13435
  f = [oe, q, Z].concat(f).join().split(",");
13435
13436
  for (var ce = [], ve = 0, Ae = f.length; ve < Ae; ve++)
13436
- ce[ve] = ve % 2 ? g(f[ve - 1], f[ve], p).y : g(f[ve], f[ve + 1], p).x;
13437
+ ce[ve] = ve % 2 ? m(f[ve - 1], f[ve], p).y : m(f[ve], f[ve + 1], p).x;
13437
13438
  return ce;
13438
13439
  }
13439
13440
  function cT(e, t, n, i, o, r, a, s) {
13440
- for (var c = [], l = [[], []], u, p, f, d, g, h, m, w, y = 0; y < 2; ++y) {
13441
+ for (var c = [], l = [[], []], u, p, f, d, m, h, g, w, y = 0; y < 2; ++y) {
13441
13442
  if (y == 0 ? (p = 6 * e - 12 * n + 6 * o, u = -3 * e + 9 * n - 9 * o + 3 * a, f = 3 * n - 3 * e) : (p = 6 * t - 12 * i + 6 * r, u = -3 * t + 9 * i - 9 * r + 3 * s, f = 3 * i - 3 * t), qo(u) < 1e-12) {
13442
13443
  if (qo(p) < 1e-12)
13443
13444
  continue;
13444
13445
  d = -f / p, 0 < d && d < 1 && c.push(d);
13445
13446
  continue;
13446
13447
  }
13447
- m = p * p - 4 * f * u, w = rn.sqrt(m), !(m < 0) && (g = (-p + w) / (2 * u), 0 < g && g < 1 && c.push(g), h = (-p - w) / (2 * u), 0 < h && h < 1 && c.push(h));
13448
+ g = p * p - 4 * f * u, w = rn.sqrt(g), !(g < 0) && (m = (-p + w) / (2 * u), 0 < m && m < 1 && c.push(m), h = (-p - w) / (2 * u), 0 < h && h < 1 && c.push(h));
13448
13449
  }
13449
13450
  for (var v = c.length, b = v, E; v--; )
13450
13451
  d = c[v], E = 1 - d, l[0][v] = E * E * E * e + 3 * E * E * d * n + 3 * E * d * d * o + d * d * d * a, l[1][v] = E * E * E * t + 3 * E * E * d * i + 3 * E * d * d * r + d * d * d * s;
@@ -13458,8 +13459,8 @@ function cT(e, t, n, i, o, r, a, s) {
13458
13459
  function Ey(e) {
13459
13460
  if (aT(e) || (e = QP(e)), tT(e))
13460
13461
  return e;
13461
- for (var t = nT(sT(e)), n = { x: 0, y: 0, bx: 0, by: 0, X: 0, Y: 0, qx: null, qy: null }, i = function(f, d, g) {
13462
- var h, m;
13462
+ for (var t = nT(sT(e)), n = { x: 0, y: 0, bx: 0, by: 0, X: 0, Y: 0, qx: null, qy: null }, i = function(f, d, m) {
13463
+ var h, g;
13463
13464
  if (!f)
13464
13465
  return ["C", d.x, d.y, d.x, d.y, d.x, d.y];
13465
13466
  switch (!(f[0] in { T: 1, Q: 1 }) && (d.qx = d.qy = null), f[0]) {
@@ -13470,10 +13471,10 @@ function Ey(e) {
13470
13471
  f = ["C", ...$w(d.x, d.y, ...f.slice(1))];
13471
13472
  break;
13472
13473
  case "S":
13473
- g == "C" || g == "S" ? (h = d.x * 2 - d.bx, m = d.y * 2 - d.by) : (h = d.x, m = d.y), f = ["C", h, m, ...f.slice(1)];
13474
+ m == "C" || m == "S" ? (h = d.x * 2 - d.bx, g = d.y * 2 - d.by) : (h = d.x, g = d.y), f = ["C", h, g, ...f.slice(1)];
13474
13475
  break;
13475
13476
  case "T":
13476
- g == "Q" || g == "T" ? (d.qx = d.x * 2 - d.qx, d.qy = d.y * 2 - d.qy) : (d.qx = d.x, d.qy = d.y), f = ["C", ..._y(d.x, d.y, d.qx, d.qy, f[1], f[2])];
13477
+ m == "Q" || m == "T" ? (d.qx = d.x * 2 - d.qx, d.qy = d.y * 2 - d.qy) : (d.qx = d.x, d.qy = d.y), f = ["C", ..._y(d.x, d.y, d.qx, d.qy, f[1], f[2])];
13477
13478
  break;
13478
13479
  case "Q":
13479
13480
  d.qx = f[1], d.qy = f[2], f = ["C", ..._y(d.x, d.y, f[1], f[2], f[3], f[4])];
@@ -13495,8 +13496,8 @@ function Ey(e) {
13495
13496
  }, o = function(f, d) {
13496
13497
  if (f[d].length > 7) {
13497
13498
  f[d].shift();
13498
- for (var g = f[d]; g.length; )
13499
- r[d] = "A", f.splice(d++, 0, ["C", ...g.splice(0, 6)]);
13499
+ for (var m = f[d]; m.length; )
13500
+ r[d] = "A", f.splice(d++, 0, ["C", ...m.splice(0, 6)]);
13500
13501
  f.splice(d, 1), l = t.length;
13501
13502
  }
13502
13503
  }, r = [], a = "", s = "", c = 0, l = t.length; c < l; c++) {
@@ -13555,12 +13556,12 @@ function pT(e) {
13555
13556
  for (var t = e.waypoints, n = t.reduce(function(l, u, p) {
13556
13557
  var f = t[p - 1];
13557
13558
  if (f) {
13558
- var d = l[l.length - 1], g = d && d.endLength || 0, h = hT(f, u);
13559
+ var d = l[l.length - 1], m = d && d.endLength || 0, h = hT(f, u);
13559
13560
  l.push({
13560
13561
  start: f,
13561
13562
  end: u,
13562
- startLength: g,
13563
- endLength: g + h,
13563
+ startLength: m,
13564
+ endLength: m + h,
13564
13565
  length: h
13565
13566
  });
13566
13567
  }
@@ -13948,7 +13949,7 @@ qe.prototype.scrollToElement = function(e, t) {
13948
13949
  if (!o)
13949
13950
  return;
13950
13951
  o !== this.getRootElement() && this.setRootElement(o);
13951
- const r = i.filter((g) => g != o);
13952
+ const r = i.filter((m) => m != o);
13952
13953
  if (!r.length)
13953
13954
  return;
13954
13955
  t || (t = {}), typeof t == "number" && (n = t), t = {
@@ -13964,8 +13965,8 @@ qe.prototype.scrollToElement = function(e, t) {
13964
13965
  if (!(a.width < c.width && a.height < c.height))
13965
13966
  u = a.x - c.x, p = a.y - c.y;
13966
13967
  else {
13967
- const g = Math.max(0, s.right - f.right), h = Math.min(0, s.left - f.left), m = Math.max(0, s.bottom - f.bottom), w = Math.min(0, s.top - f.top);
13968
- u = g || h, p = m || w;
13968
+ const m = Math.max(0, s.right - f.right), h = Math.min(0, s.left - f.left), g = Math.max(0, s.bottom - f.bottom), w = Math.min(0, s.top - f.top);
13969
+ u = m || h, p = g || w;
13969
13970
  }
13970
13971
  this.scroll({ dx: -u * l, dy: -p * l });
13971
13972
  };
@@ -14555,9 +14556,9 @@ function IT(e) {
14555
14556
  d(q.plane);
14556
14557
  }
14557
14558
  function d(q) {
14558
- p(q), z(q.planeElement, g);
14559
+ p(q), z(q.planeElement, m);
14559
14560
  }
14560
- function g(q) {
14561
+ function m(q) {
14561
14562
  p(q);
14562
14563
  }
14563
14564
  this.handleDefinitions = function(Z, ce) {
@@ -14582,7 +14583,7 @@ function IT(e) {
14582
14583
  throw new Error("no process or collaboration to display");
14583
14584
  var C = c(B, Ae);
14584
14585
  if (Xn(B, "bpmn:Process") || Xn(B, "bpmn:SubProcess"))
14585
- m(B, C);
14586
+ g(B, C);
14586
14587
  else if (Xn(B, "bpmn:Collaboration"))
14587
14588
  K(B, C), w(Z.rootElements, C);
14588
14589
  else
@@ -14595,14 +14596,14 @@ function IT(e) {
14595
14596
  for (var Z; n.length; )
14596
14597
  Z = n.shift(), Z();
14597
14598
  };
14598
- function m(q, Z) {
14599
+ function g(q, Z) {
14599
14600
  be(q, Z), T(q.ioSpecification, Z), P(q.artifacts, Z), r(q);
14600
14601
  }
14601
14602
  function w(q, Z) {
14602
14603
  var ce = it(q, function(ve) {
14603
14604
  return !a(ve) && Xn(ve, "bpmn:Process") && ve.laneSets;
14604
14605
  });
14605
- ce.forEach(o(m, Z));
14606
+ ce.forEach(o(g, Z));
14606
14607
  }
14607
14608
  function y(q, Z) {
14608
14609
  l(q, Z);
@@ -14679,7 +14680,7 @@ function IT(e) {
14679
14680
  }
14680
14681
  function we(q, Z) {
14681
14682
  var ce = l(q, Z), ve = q.processRef;
14682
- ve && m(ve, ce || Z);
14683
+ ve && g(ve, ce || Z);
14683
14684
  }
14684
14685
  function K(q, Z) {
14685
14686
  z(q.participants, o(we, Z)), n.push(function() {
@@ -14697,14 +14698,14 @@ function NT(e, t, n) {
14697
14698
  var i, o, r, a, s = [];
14698
14699
  function c(l, u) {
14699
14700
  var p = {
14700
- root: function(h, m) {
14701
- return i.add(h, m);
14701
+ root: function(h, g) {
14702
+ return i.add(h, g);
14702
14703
  },
14703
- element: function(h, m, w) {
14704
- return i.add(h, m, w);
14704
+ element: function(h, g, w) {
14705
+ return i.add(h, g, w);
14705
14706
  },
14706
- error: function(h, m) {
14707
- s.push({ message: h, context: m });
14707
+ error: function(h, g) {
14708
+ s.push({ message: h, context: g });
14708
14709
  }
14709
14710
  }, f = new IT(p);
14710
14711
  u = u || l.diagrams && l.diagrams[0];
@@ -14714,9 +14715,9 @@ function NT(e, t, n) {
14714
14715
  z(d, function(h) {
14715
14716
  f.handleDefinitions(l, h);
14716
14717
  });
14717
- var g = u.plane.bpmnElement.id;
14718
+ var m = u.plane.bpmnElement.id;
14718
14719
  r.setRootElement(
14719
- r.findRoot(g + "_plane") || r.findRoot(g)
14720
+ r.findRoot(m + "_plane") || r.findRoot(m)
14720
14721
  );
14721
14722
  }
14722
14723
  return new Promise(function(l, u) {
@@ -15264,9 +15265,9 @@ function Xr(e, t, n, i, o, r, a) {
15264
15265
  }
15265
15266
  function d(B, C, S, W) {
15266
15267
  var X = p2.nextPrefixed("marker-");
15267
- return g(B, X, C, S, W), "url(#" + X + ")";
15268
+ return m(B, X, C, S, W), "url(#" + X + ")";
15268
15269
  }
15269
- function g(B, C, S, W, X) {
15270
+ function m(B, C, S, W, X) {
15270
15271
  if (S === "sequenceflow-end") {
15271
15272
  var re = Le("path", {
15272
15273
  d: "M 1 5 L 11 10 L 1 15 Z",
@@ -15400,7 +15401,7 @@ function Xr(e, t, n, i, o, r, a) {
15400
15401
  });
15401
15402
  return Ke(B, Je), Je;
15402
15403
  }
15403
- function m(B, C, S, W, X, re) {
15404
+ function g(B, C, S, W, X, re) {
15404
15405
  yn(X) && (re = X, X = 0), X = X || 0, re = u(re);
15405
15406
  var _e = Le("rect", {
15406
15407
  x: X,
@@ -15697,7 +15698,7 @@ function Xr(e, t, n, i, o, r, a) {
15697
15698
  });
15698
15699
  },
15699
15700
  SubProcessMarker: function(B, C, S = {}) {
15700
- var W = m(B, 14, 14, 0, {
15701
+ var W = g(B, 14, 14, 0, {
15701
15702
  strokeWidth: 1,
15702
15703
  fill: at(C, s, S.fill),
15703
15704
  stroke: Re(C, c, S.stroke)
@@ -15906,7 +15907,7 @@ function Xr(e, t, n, i, o, r, a) {
15906
15907
  width: W,
15907
15908
  height: X
15908
15909
  } = ps(C, S);
15909
- return m(B, W, X, Tl, {
15910
+ return g(B, W, X, Tl, {
15910
15911
  ...S,
15911
15912
  fill: at(C, s, S.fill),
15912
15913
  fillOpacity: pa,
@@ -15974,7 +15975,7 @@ function Xr(e, t, n, i, o, r, a) {
15974
15975
  });
15975
15976
  }
15976
15977
  function q(B, C, S = {}) {
15977
- var W = m(B, _i(C, S), ni(C, S), 0, {
15978
+ var W = g(B, _i(C, S), ni(C, S), 0, {
15978
15979
  fill: at(C, s, S.fill),
15979
15980
  fillOpacity: S.fillOpacity || pa,
15980
15981
  stroke: Re(C, c, S.stroke),
@@ -16279,7 +16280,7 @@ function Xr(e, t, n, i, o, r, a) {
16279
16280
  "stroke",
16280
16281
  "width",
16281
16282
  "height"
16282
- ]), m(B, C.width, C.height, Tl, {
16283
+ ]), g(B, C.width, C.height, Tl, {
16283
16284
  stroke: Re(C, c, S.stroke),
16284
16285
  strokeWidth: 1.5,
16285
16286
  strokeDasharray: "10, 6, 0, 6",
@@ -16614,7 +16615,7 @@ function Xr(e, t, n, i, o, r, a) {
16614
16615
  var {
16615
16616
  width: W,
16616
16617
  height: X
16617
- } = ps(C, S), re = m(B, W, X, 0, 0, {
16618
+ } = ps(C, S), re = g(B, W, X, 0, 0, {
16618
16619
  fill: "none",
16619
16620
  stroke: "none"
16620
16621
  }), _e = i.getScaledPath("TEXT_ANNOTATION", {
@@ -16657,7 +16658,7 @@ function Xr(e, t, n, i, o, r, a) {
16657
16658
  stroke: Re(C, c, S.stroke),
16658
16659
  strokeWidth: 1.5
16659
16660
  }), re = st(C);
16660
- return re || (S = {}), m(
16661
+ return re || (S = {}), g(
16661
16662
  B,
16662
16663
  _i(C, S),
16663
16664
  ni(C, S),
@@ -16833,27 +16834,27 @@ Cu.prototype.layoutText = function(e, t) {
16833
16834
  for (var n = Y({}, this._config.size, t.box), i = Y({}, this._config.style, t.style), o = x2(t.align || this._config.align), r = b2(t.padding !== void 0 ? t.padding : this._config.padding), a = t.fitBox || !1, s = A2(i), c = e.split(/\u00AD?\r?\n/), l = [], u = n.width - r.left - r.right; c.length; )
16834
16835
  l.push(S2(c, u, i));
16835
16836
  o.vertical === "middle" && (r.top = r.bottom = 0);
16836
- var p = si(l, function(m, w, y) {
16837
- return m + (s || w.height);
16838
- }, 0) + r.top + r.bottom, f = si(l, function(m, w, y) {
16839
- return w.width > m ? w.width : m;
16837
+ var p = si(l, function(g, w, y) {
16838
+ return g + (s || w.height);
16839
+ }, 0) + r.top + r.bottom, f = si(l, function(g, w, y) {
16840
+ return w.width > g ? w.width : g;
16840
16841
  }, 0), d = r.top;
16841
16842
  o.vertical === "middle" && (d += (n.height - p) / 2), d -= (s || l[0].height) / 4;
16842
- var g = Le("text");
16843
- Se(g, i), z(l, function(m) {
16843
+ var m = Le("text");
16844
+ Se(m, i), z(l, function(g) {
16844
16845
  var w;
16845
- switch (d += s || m.height, o.horizontal) {
16846
+ switch (d += s || g.height, o.horizontal) {
16846
16847
  case "left":
16847
16848
  w = r.left;
16848
16849
  break;
16849
16850
  case "right":
16850
- w = (a ? f : u) - r.right - m.width;
16851
+ w = (a ? f : u) - r.right - g.width;
16851
16852
  break;
16852
16853
  default:
16853
- w = Math.max(((a ? f : u) - m.width) / 2 + r.left, 0);
16854
+ w = Math.max(((a ? f : u) - g.width) / 2 + r.left, 0);
16854
16855
  }
16855
16856
  var y = Le("tspan");
16856
- Se(y, { x: w, y: d }), y.textContent = m.text, Ke(g, y);
16857
+ Se(y, { x: w, y: d }), y.textContent = g.text, Ke(m, y);
16857
16858
  });
16858
16859
  var h = {
16859
16860
  width: f,
@@ -16861,7 +16862,7 @@ Cu.prototype.layoutText = function(e, t) {
16861
16862
  };
16862
16863
  return {
16863
16864
  dimensions: h,
16864
- element: g
16865
+ element: m
16865
16866
  };
16866
16867
  };
16867
16868
  function A2(e) {
@@ -17740,73 +17741,73 @@ function Oy(e) {
17740
17741
  }
17741
17742
  function Xd(e, t, n) {
17742
17743
  de.call(this, e), this.preExecute("shape.replace", s, !0), this.postExecuted("shape.replace", c, !0), this.preExecute("connection.create", o, !0), this.postExecuted("connection.delete", i, !0), this.postExecuted("connection.reconnect", r, !0), this.postExecuted("element.updateProperties", a, !0);
17743
- function i(m) {
17744
- const w = m.source, y = m.target;
17744
+ function i(g) {
17745
+ const w = g.source, y = g.target;
17745
17746
  fa(w) && fs(y) && u(y);
17746
17747
  }
17747
- function o(m) {
17748
- const w = m.connection, y = m.source, v = m.target;
17748
+ function o(g) {
17749
+ const w = g.connection, y = g.source, v = g.target;
17749
17750
  fa(y) && Jc(v) && (l(v), f(y, [w]));
17750
17751
  }
17751
- function r(m) {
17752
- const w = m.newTarget, y = m.oldSource, v = m.oldTarget;
17752
+ function r(g) {
17753
+ const w = g.newTarget, y = g.oldSource, v = g.oldTarget;
17753
17754
  if (v !== w) {
17754
17755
  const b = y;
17755
17756
  fs(v) && u(v), fa(b) && Jc(w) && l(w);
17756
17757
  }
17757
17758
  }
17758
- function a(m) {
17759
- const { element: w } = m;
17760
- fs(w) ? (p(w), d(w)) : Jc(w) && g(w);
17759
+ function a(g) {
17760
+ const { element: w } = g;
17761
+ fs(w) ? (p(w), d(w)) : Jc(w) && m(w);
17761
17762
  }
17762
- function s(m) {
17763
+ function s(g) {
17763
17764
  const {
17764
17765
  newData: w,
17765
17766
  oldShape: y
17766
- } = m;
17767
- if (fa(m.oldShape) && w.eventDefinitionType !== "bpmn:CompensateEventDefinition" || w.type !== "bpmn:BoundaryEvent") {
17767
+ } = g;
17768
+ if (fa(g.oldShape) && w.eventDefinitionType !== "bpmn:CompensateEventDefinition" || w.type !== "bpmn:BoundaryEvent") {
17768
17769
  const v = y.outgoing.find(
17769
17770
  ({ target: b }) => fs(b)
17770
17771
  );
17771
- v && v.target && (m._connectionTarget = v.target);
17772
- } else if (!fa(m.oldShape) && w.eventDefinitionType === "bpmn:CompensateEventDefinition" && w.type === "bpmn:BoundaryEvent") {
17772
+ v && v.target && (g._connectionTarget = v.target);
17773
+ } else if (!fa(g.oldShape) && w.eventDefinitionType === "bpmn:CompensateEventDefinition" && w.type === "bpmn:BoundaryEvent") {
17773
17774
  const v = y.outgoing.find(
17774
17775
  ({ target: b }) => Jc(b)
17775
17776
  );
17776
- v && v.target && (m._connectionTarget = v.target), h(y);
17777
+ v && v.target && (g._connectionTarget = v.target), h(y);
17777
17778
  }
17778
17779
  }
17779
- function c(m) {
17780
- const { _connectionTarget: w, newShape: y } = m;
17780
+ function c(g) {
17781
+ const { _connectionTarget: w, newShape: y } = g;
17781
17782
  w && t.connect(y, w);
17782
17783
  }
17783
- function l(m) {
17784
- t.updateProperties(m, { isForCompensation: !0 });
17784
+ function l(g) {
17785
+ t.updateProperties(g, { isForCompensation: !0 });
17785
17786
  }
17786
- function u(m) {
17787
- t.updateProperties(m, { isForCompensation: void 0 });
17787
+ function u(g) {
17788
+ t.updateProperties(g, { isForCompensation: void 0 });
17788
17789
  }
17789
- function p(m) {
17790
- for (const w of m.incoming)
17791
- n.canConnect(w.source, m) || t.removeConnection(w);
17792
- for (const w of m.outgoing)
17793
- n.canConnect(m, w.target) || t.removeConnection(w);
17790
+ function p(g) {
17791
+ for (const w of g.incoming)
17792
+ n.canConnect(w.source, g) || t.removeConnection(w);
17793
+ for (const w of g.outgoing)
17794
+ n.canConnect(g, w.target) || t.removeConnection(w);
17794
17795
  }
17795
- function f(m, w) {
17796
- m.outgoing.filter((b) => A(b, "bpmn:Association")).filter((b) => fs(b.target) && !w.includes(b)).forEach((b) => t.removeConnection(b));
17796
+ function f(g, w) {
17797
+ g.outgoing.filter((b) => A(b, "bpmn:Association")).filter((b) => fs(b.target) && !w.includes(b)).forEach((b) => t.removeConnection(b));
17797
17798
  }
17798
- function d(m) {
17799
- const w = m.attachers.slice();
17799
+ function d(g) {
17800
+ const w = g.attachers.slice();
17800
17801
  w.length && t.removeElements(w);
17801
17802
  }
17802
- function g(m) {
17803
- const w = m.incoming.filter(
17803
+ function m(g) {
17804
+ const w = g.incoming.filter(
17804
17805
  (y) => fa(y.source)
17805
17806
  );
17806
17807
  t.removeElements(w);
17807
17808
  }
17808
- function h(m) {
17809
- const w = m.outgoing.filter(
17809
+ function h(g) {
17810
+ const w = g.outgoing.filter(
17810
17811
  (y) => A(y, "bpmn:SequenceFlow")
17811
17812
  );
17812
17813
  t.removeElements(w);
@@ -17964,8 +17965,8 @@ function eh(e, t) {
17964
17965
  c && (n(a, c, s) || Qt(a.get("properties"), c));
17965
17966
  }
17966
17967
  function r(a) {
17967
- var s = a.context, c = s.connection, l = c.businessObject, u = c.target, p = u && u.businessObject, f = s.newTarget, d = f && f.businessObject, g = s.oldTarget || s.target, h = g && g.businessObject, m = c.businessObject, w;
17968
- h && h !== p && o(h, l), d && d !== p && o(d, l), p ? (w = i(p, !0), m.targetRef = w) : m.targetRef = null;
17968
+ var s = a.context, c = s.connection, l = c.businessObject, u = c.target, p = u && u.businessObject, f = s.newTarget, d = f && f.businessObject, m = s.oldTarget || s.target, h = m && m.businessObject, g = c.businessObject, w;
17969
+ h && h !== p && o(h, l), d && d !== p && o(d, l), p ? (w = i(p, !0), g.targetRef = w) : g.targetRef = null;
17969
17970
  }
17970
17971
  }
17971
17972
  eh.$inject = [
@@ -18172,14 +18173,14 @@ function mk(e, t) {
18172
18173
  var n = Ri(e), i = A(n, "bpmn:Process") ? [] : [n], o = Pu(n, i), r = je(e), a = je(t), s = hk(e, t), c = [], l = wn(e);
18173
18174
  return o.forEach(function(u) {
18174
18175
  if (u !== e) {
18175
- var p = l ? 0 : s.top, f = l ? s.right : 0, d = l ? 0 : s.bottom, g = l ? s.left : 0, h = je(u);
18176
- s.top && (zo(h.bottom - r.top) < 10 && (d = a.top - h.bottom), zo(h.top - r.top) < 5 && (p = a.top - h.top)), s.left && (zo(h.right - r.left) < 10 && (f = a.left - h.right), zo(h.left - r.left) < 5 && (g = a.left - h.left)), s.bottom && (zo(h.top - r.bottom) < 10 && (p = a.bottom - h.top), zo(h.bottom - r.bottom) < 5 && (d = a.bottom - h.bottom)), s.right && (zo(h.left - r.right) < 10 && (g = a.right - h.left), zo(h.right - r.right) < 5 && (f = a.right - h.right)), (p || f || d || g) && c.push({
18176
+ var p = l ? 0 : s.top, f = l ? s.right : 0, d = l ? 0 : s.bottom, m = l ? s.left : 0, h = je(u);
18177
+ s.top && (zo(h.bottom - r.top) < 10 && (d = a.top - h.bottom), zo(h.top - r.top) < 5 && (p = a.top - h.top)), s.left && (zo(h.right - r.left) < 10 && (f = a.left - h.right), zo(h.left - r.left) < 5 && (m = a.left - h.left)), s.bottom && (zo(h.top - r.bottom) < 10 && (p = a.bottom - h.top), zo(h.bottom - r.bottom) < 5 && (d = a.bottom - h.bottom)), s.right && (zo(h.left - r.right) < 10 && (m = a.right - h.left), zo(h.right - r.right) < 5 && (f = a.right - h.right)), (p || f || d || m) && c.push({
18177
18178
  shape: u,
18178
18179
  newBounds: lk(u, {
18179
18180
  top: p,
18180
18181
  right: f,
18181
18182
  bottom: d,
18182
- left: g
18183
+ left: m
18183
18184
  })
18184
18185
  });
18185
18186
  }
@@ -18190,12 +18191,12 @@ function nh(e, t) {
18190
18191
  de.call(this, e);
18191
18192
  function n(i, o) {
18192
18193
  var r = wn(i), a = ar(o), s = [], c = [], l = [], u = [];
18193
- if (Kr(a, function(m) {
18194
- return r ? m.y > i.y ? c.push(m) : s.push(m) : m.x > i.x ? u.push(m) : l.push(m), m.children;
18194
+ if (Kr(a, function(g) {
18195
+ return r ? g.y > i.y ? c.push(g) : s.push(g) : g.x > i.x ? u.push(g) : l.push(g), g.children;
18195
18196
  }), !!a.length) {
18196
18197
  var p;
18197
18198
  r ? c.length && s.length ? p = i.height / 2 : p = i.height : u.length && l.length ? p = i.width / 2 : p = i.width;
18198
- var f, d, g, h;
18199
+ var f, d, m, h;
18199
18200
  s.length && (f = t.calculateAdjustments(
18200
18201
  s,
18201
18202
  "y",
@@ -18216,14 +18217,14 @@ function nh(e, t) {
18216
18217
  d.resizingShapes,
18217
18218
  { x: 0, y: -p },
18218
18219
  "n"
18219
- )), l.length && (g = t.calculateAdjustments(
18220
+ )), l.length && (m = t.calculateAdjustments(
18220
18221
  l,
18221
18222
  "x",
18222
18223
  p,
18223
18224
  i.x - 10
18224
18225
  ), t.makeSpace(
18225
- g.movingShapes,
18226
- g.resizingShapes,
18226
+ m.movingShapes,
18227
+ m.resizingShapes,
18227
18228
  { x: p, y: 0 },
18228
18229
  "e"
18229
18230
  )), u.length && (h = t.calculateAdjustments(
@@ -18350,7 +18351,7 @@ function Gf(e, t) {
18350
18351
  function ih(e, t, n) {
18351
18352
  de.call(this, e);
18352
18353
  function i(o, r, a) {
18353
- var s = r.waypoints, c, l, u, p, f, d, g, h = o.outgoing.slice(), m = o.incoming.slice(), w;
18354
+ var s = r.waypoints, c, l, u, p, f, d, m, h = o.outgoing.slice(), g = o.incoming.slice(), w;
18354
18355
  Ve(a.width) ? w = We(a) : w = a;
18355
18356
  var y = Gf(s, w);
18356
18357
  if (y) {
@@ -18358,17 +18359,17 @@ function ih(e, t, n) {
18358
18359
  return;
18359
18360
  u = y.bendpoint ? s[y.index] : w, (c.length === 1 || !By(o, c[c.length - 1])) && c.push($y(u)), (l.length === 1 || !By(o, l[0])) && l.unshift($y(u));
18360
18361
  }
18361
- p = r.source, f = r.target, t.canConnect(p, o, r) && (n.reconnectEnd(r, o, c || w), d = r), t.canConnect(o, f, r) && (d ? g = n.connect(
18362
+ p = r.source, f = r.target, t.canConnect(p, o, r) && (n.reconnectEnd(r, o, c || w), d = r), t.canConnect(o, f, r) && (d ? m = n.connect(
18362
18363
  o,
18363
18364
  f,
18364
18365
  { type: r.type, waypoints: l }
18365
- ) : (n.reconnectStart(r, o, l || w), g = r));
18366
+ ) : (n.reconnectStart(r, o, l || w), m = r));
18366
18367
  var v = [].concat(
18367
- d && it(m, function(b) {
18368
+ d && it(g, function(b) {
18368
18369
  return b.source === d.source;
18369
18370
  }) || [],
18370
- g && it(h, function(b) {
18371
- return b.target === g.target;
18371
+ m && it(h, function(b) {
18372
+ return b.target === m.target;
18372
18373
  }) || []
18373
18374
  );
18374
18375
  v.length && n.removeElements(v);
@@ -18691,15 +18692,15 @@ function Pk(e, t, n, i) {
18691
18692
  var o = t.x - e.x, r = t.y - e.y, a = n.x - e.x, s = n.y - e.y, c = o * o + r * r, l = o * a + r * s, u = a * a + s * s - i * i, p = l / c, f = u / c, d = p * p - f;
18692
18693
  if (d < 0 && d > -1e-6 && (d = 0), d < 0)
18693
18694
  return [];
18694
- var g = w_(d), h = -p + g, m = -p - g, w = {
18695
+ var m = w_(d), h = -p + m, g = -p - m, w = {
18695
18696
  x: e.x - o * h,
18696
18697
  y: e.y - r * h
18697
18698
  };
18698
18699
  if (d === 0)
18699
18700
  return [w];
18700
18701
  var y = {
18701
- x: e.x - o * m,
18702
- y: e.y - r * m
18702
+ x: e.x - o * g,
18703
+ y: e.y - r * g
18703
18704
  };
18704
18705
  return [w, y].filter(function(v) {
18705
18706
  return Tk(v, e, t);
@@ -18746,13 +18747,13 @@ function E_(e, t, n, i) {
18746
18747
  }, s = Ak(e, n), c = s.segmentIndex, l = Ok(n, t, s, i);
18747
18748
  if (l < 0 || l > t.length - 2 || l === null)
18748
18749
  return a;
18749
- var u = qy(n, c), p = qy(t, l), f = s.position, d = Lk(u, f), g = Dk(u, p);
18750
+ var u = qy(n, c), p = qy(t, l), f = s.position, d = Lk(u, f), m = Dk(u, p);
18750
18751
  if (s.type === "bendpoint") {
18751
- var h = t.length - n.length, m = s.bendpointIndex, w = n[m];
18752
+ var h = t.length - n.length, g = s.bendpointIndex, w = n[g];
18752
18753
  if (t.indexOf(w) !== -1)
18753
18754
  return a;
18754
18755
  if (h === 0) {
18755
- var y = t[m];
18756
+ var y = t[g];
18756
18757
  return o = y.x - s.position.x, r = y.y - s.position.y, {
18757
18758
  delta: {
18758
18759
  x: o,
@@ -18764,7 +18765,7 @@ function E_(e, t, n, i) {
18764
18765
  }
18765
18766
  };
18766
18767
  }
18767
- h < 0 && m !== 0 && m < n.length - 1 && (d = S_(n, m));
18768
+ h < 0 && g !== 0 && g < n.length - 1 && (d = S_(n, g));
18768
18769
  }
18769
18770
  var v = {
18770
18771
  x: (p[1].x - p[0].x) * d + p[0].x,
@@ -18772,7 +18773,7 @@ function E_(e, t, n, i) {
18772
18773
  }, b = Rk({
18773
18774
  x: e.x - f.x,
18774
18775
  y: e.y - f.y
18775
- }, g);
18776
+ }, m);
18776
18777
  return o = v.x + b.x - e.x, r = v.y + b.y - e.y, {
18777
18778
  point: Eo(v),
18778
18779
  delta: Eo({
@@ -18919,18 +18920,18 @@ function ch(e, t, n, i) {
18919
18920
  var u = s.newBounds, p = i.getDimensions(di(c) || "", {
18920
18921
  box: u,
18921
18922
  style: i.getExternalStyle()
18922
- }), f = Math.ceil(p.height), d = u.y !== c.y, g = c.y + c.height;
18923
+ }), f = Math.ceil(p.height), d = u.y !== c.y, m = c.y + c.height;
18923
18924
  s.newBounds = {
18924
18925
  width: u.width,
18925
18926
  height: f,
18926
18927
  x: u.x,
18927
- y: d ? g - f : u.y
18928
+ y: d ? m - f : u.y
18928
18929
  };
18929
18930
  }
18930
18931
  }), this.postExecute("shape.resize", function(a) {
18931
18932
  var s = a.context, c = s.shape, l = s.newBounds, u = s.oldBounds;
18932
18933
  if (Ru(c)) {
18933
- var p = c.label, f = We(p), d = zk(u), g = Hk(f, d), h = jk(g, u, l);
18934
+ var p = c.label, f = We(p), d = zk(u), m = Hk(f, d), h = jk(m, u, l);
18934
18935
  t.moveShape(p, h);
18935
18936
  }
18936
18937
  });
@@ -19240,12 +19241,12 @@ function yh(e, t, n, i) {
19240
19241
  }
19241
19242
  }
19242
19243
  function a(c) {
19243
- var l = c.context, u = l.connection, p = l.newSource || u.source, f = l.newTarget || u.target, d, g;
19244
- d = n.canConnect(p, f), !(!d || d.type === u.type) && (g = t.connect(p, f, {
19244
+ var l = c.context, u = l.connection, p = l.newSource || u.source, f = l.newTarget || u.target, d, m;
19245
+ d = n.canConnect(p, f), !(!d || d.type === u.type) && (m = t.connect(p, f, {
19245
19246
  type: d.type,
19246
19247
  associationDirection: d.associationDirection,
19247
19248
  waypoints: u.waypoints.slice()
19248
- }), u.parent && t.removeConnection(u), l.connection = g, o && s(u, g));
19249
+ }), u.parent && t.removeConnection(u), l.connection = m, o && s(u, m));
19249
19250
  }
19250
19251
  function s(c, l) {
19251
19252
  var u = o.context(), p = u && u.payload.previousSelection, f;
@@ -19331,15 +19332,15 @@ function ma(e, t, n) {
19331
19332
  var tO = { top: 20, left: 50, right: 20, bottom: 20 }, nO = { top: 50, left: 20, right: 20, bottom: 20 };
19332
19333
  function iO(e, t, n) {
19333
19334
  var i = Ri(e), o = !0, r = !0, a = Pu(i, [i]), s = je(e), c = {}, l = {}, u = wn(e), p = u ? vh : xh;
19334
- /n/.test(t) ? l.top = s.bottom - p.height : /e/.test(t) ? l.right = s.left + p.width : /s/.test(t) ? l.bottom = s.top + p.height : /w/.test(t) && (l.left = s.right - p.width), a.forEach(function(g) {
19335
- var h = je(g);
19335
+ /n/.test(t) ? l.top = s.bottom - p.height : /e/.test(t) ? l.right = s.left + p.width : /s/.test(t) ? l.bottom = s.top + p.height : /w/.test(t) && (l.left = s.right - p.width), a.forEach(function(m) {
19336
+ var h = je(m);
19336
19337
  u ? (h.top < s.top - 10 && (o = !1), h.bottom > s.bottom + 10 && (r = !1)) : (h.left < s.left - 10 && (o = !1), h.right > s.right + 10 && (r = !1)), /n/.test(t) && (n && Go(s.top - h.bottom) < 10 && ma(c, "top", h.top + p.height), Go(s.top - h.top) < 5 && ga(l, "top", h.bottom - p.height)), /e/.test(t) && (n && Go(s.right - h.left) < 10 && ga(c, "right", h.right - p.width), Go(s.right - h.right) < 5 && ma(l, "right", h.left + p.width)), /s/.test(t) && (n && Go(s.bottom - h.top) < 10 && ga(c, "bottom", h.bottom - p.height), Go(s.bottom - h.bottom) < 5 && ma(l, "bottom", h.top + p.height)), /w/.test(t) && (n && Go(s.left - h.right) < 10 && ma(c, "left", h.left + p.width), Go(s.left - h.left) < 5 && ga(l, "left", h.right - p.width));
19337
19338
  });
19338
- var f = i.children.filter(function(g) {
19339
- return !g.hidden && !g.waypoints && (A(g, "bpmn:FlowElement") || A(g, "bpmn:Artifact"));
19339
+ var f = i.children.filter(function(m) {
19340
+ return !m.hidden && !m.waypoints && (A(m, "bpmn:FlowElement") || A(m, "bpmn:Artifact"));
19340
19341
  }), d = u ? tO : nO;
19341
- return f.forEach(function(g) {
19342
- var h = je(g);
19342
+ return f.forEach(function(m) {
19343
+ var h = je(m);
19343
19344
  /n/.test(t) && (!u || o) && ga(l, "top", h.top - d.top), /e/.test(t) && (u || r) && ma(l, "right", h.right + d.right), /s/.test(t) && (!u || r) && ma(l, "bottom", h.bottom + d.bottom), /w/.test(t) && (u || o) && ga(l, "left", h.left - d.left);
19344
19345
  }), {
19345
19346
  min: l,
@@ -19440,8 +19441,8 @@ function bh(e, t, n, i, o) {
19440
19441
  ], function(u) {
19441
19442
  var p = u.shape || u.element;
19442
19443
  if (r(p)) {
19443
- var f = me(p), d = c(f), g;
19444
- d && !a(d) && (g = e.getDefinitions().get("rootElements"), tn(g, d), u.addedRootElement = d);
19444
+ var f = me(p), d = c(f), m;
19445
+ d && !a(d) && (m = e.getDefinitions().get("rootElements"), tn(m, d), u.addedRootElement = d);
19445
19446
  }
19446
19447
  }, !0), this.reverted([
19447
19448
  "shape.create",
@@ -19456,8 +19457,8 @@ function bh(e, t, n, i, o) {
19456
19457
  }, !0), t.on("copyPaste.copyElement", function(u) {
19457
19458
  var p = u.descriptor, f = u.element;
19458
19459
  if (!(f.labelTarget || !r(f))) {
19459
- var d = me(f), g = c(d);
19460
- g && (p.referencedRootElement = g);
19460
+ var d = me(f), m = c(d);
19461
+ m && (p.referencedRootElement = m);
19461
19462
  }
19462
19463
  }), t.on("copyPaste.pasteElement", rO, function(u) {
19463
19464
  var p = u.descriptor, f = p.businessObject, d = p.referencedRootElement;
@@ -19565,14 +19566,14 @@ function To(e, t, n, i, o, r, a) {
19565
19566
  return A(p, "bpmn:SubProcess") && !st(p);
19566
19567
  }
19567
19568
  function l(p) {
19568
- var f = p.shape, d = p.newRootElement, g = me(f);
19569
- d = s._addDiagram(d || g), p.newRootElement = e.addRootElement(d);
19569
+ var f = p.shape, d = p.newRootElement, m = me(f);
19570
+ d = s._addDiagram(d || m), p.newRootElement = e.addRootElement(d);
19570
19571
  }
19571
19572
  function u(p) {
19572
19573
  var f = p.shape, d = me(f);
19573
19574
  s._removeDiagram(d);
19574
- var g = p.newRootElement = a.get(to(d));
19575
- e.removeRootElement(g);
19575
+ var m = p.newRootElement = a.get(to(d));
19576
+ e.removeRootElement(m);
19576
19577
  }
19577
19578
  this.executed("shape.create", function(p) {
19578
19579
  var f = p.shape;
@@ -19581,10 +19582,10 @@ function To(e, t, n, i, o, r, a) {
19581
19582
  var f = p.elements;
19582
19583
  z(f, function(d) {
19583
19584
  if (c(d)) {
19584
- var g = a.get(to(d));
19585
- if (!(!g || !d.children || !d.children.length)) {
19585
+ var m = a.get(to(d));
19586
+ if (!(!m || !d.children || !d.children.length)) {
19586
19587
  var h = nv(d);
19587
- s._showRecursively(h), s._moveChildrenToShape(h, g);
19588
+ s._showRecursively(h), s._moveChildrenToShape(h, m);
19588
19589
  }
19589
19590
  }
19590
19591
  });
@@ -19612,42 +19613,42 @@ function To(e, t, n, i, o, r, a) {
19612
19613
  var f = p.oldShape, d = p.newShape;
19613
19614
  !c(f) || !c(d) || (p.oldRoot = e.removeRootElement(to(f)));
19614
19615
  }, !0), this.postExecuted("shape.replace", function(p) {
19615
- var f = p.newShape, d = p.oldRoot, g = e.findRoot(to(f));
19616
- if (!(!d || !g)) {
19616
+ var f = p.newShape, d = p.oldRoot, m = e.findRoot(to(f));
19617
+ if (!(!d || !m)) {
19617
19618
  var h = d.children;
19618
- n.moveElements(h, { x: 0, y: 0 }, g);
19619
+ n.moveElements(h, { x: 0, y: 0 }, m);
19619
19620
  }
19620
19621
  }, !0), this.executed("element.updateProperties", function(p) {
19621
19622
  var f = p.element;
19622
19623
  if (A(f, "bpmn:SubProcess")) {
19623
- var d = p.properties, g = p.oldProperties, h = g.id, m = d.id;
19624
- if (h !== m) {
19624
+ var d = p.properties, m = p.oldProperties, h = m.id, g = d.id;
19625
+ if (h !== g) {
19625
19626
  if (Ll(f)) {
19626
- a.updateId(f, Or(m)), a.updateId(h, m);
19627
+ a.updateId(f, Or(g)), a.updateId(h, g);
19627
19628
  return;
19628
19629
  }
19629
19630
  var w = a.get(Or(h));
19630
- w && a.updateId(Or(h), Or(m));
19631
+ w && a.updateId(Or(h), Or(g));
19631
19632
  }
19632
19633
  }
19633
19634
  }, !0), this.reverted("element.updateProperties", function(p) {
19634
19635
  var f = p.element;
19635
19636
  if (A(f, "bpmn:SubProcess")) {
19636
- var d = p.properties, g = p.oldProperties, h = g.id, m = d.id;
19637
- if (h !== m) {
19637
+ var d = p.properties, m = p.oldProperties, h = m.id, g = d.id;
19638
+ if (h !== g) {
19638
19639
  if (Ll(f)) {
19639
- a.updateId(f, Or(h)), a.updateId(m, h);
19640
+ a.updateId(f, Or(h)), a.updateId(g, h);
19640
19641
  return;
19641
19642
  }
19642
- var w = a.get(Or(m));
19643
+ var w = a.get(Or(g));
19643
19644
  w && a.updateId(w, Or(h));
19644
19645
  }
19645
19646
  }
19646
19647
  }, !0), t.on("element.changed", function(p) {
19647
19648
  var f = p.element;
19648
19649
  if (Ll(f)) {
19649
- var d = f, g = a.get(Qy(d));
19650
- !g || g === d || t.fire("element.changed", { element: g });
19650
+ var d = f, m = a.get(Qy(d));
19651
+ !m || m === d || t.fire("element.changed", { element: m });
19651
19652
  }
19652
19653
  }), this.executed("shape.toggleCollapse", ev, function(p) {
19653
19654
  var f = p.shape;
@@ -19662,26 +19663,26 @@ function To(e, t, n, i, o, r, a) {
19662
19663
  if (d)
19663
19664
  if (st(f))
19664
19665
  s._moveChildrenToShape(d.children.slice(), f), z(Fs(f.children), (h) => {
19665
- n.moveShape(h.annotation, { x: 0, y: 0 }, f.parent), z(h.associations, (m) => {
19666
- n.moveConnection(m, { x: 0, y: 0 }, f.parent);
19666
+ n.moveShape(h.annotation, { x: 0, y: 0 }, f.parent), z(h.associations, (g) => {
19667
+ n.moveConnection(g, { x: 0, y: 0 }, f.parent);
19667
19668
  });
19668
19669
  });
19669
19670
  else {
19670
19671
  s._disconnectSharedAnnotations(f);
19671
- var g = nv(f);
19672
- s._moveChildrenToShape(g, d);
19672
+ var m = nv(f);
19673
+ s._moveChildrenToShape(m, d);
19673
19674
  }
19674
19675
  }
19675
19676
  }, !0), t.on("copyPaste.createTree", function(p) {
19676
19677
  var f = p.element, d = p.children;
19677
19678
  if (c(f)) {
19678
- var g = to(f), h = a.get(g);
19679
+ var m = to(f), h = a.get(m);
19679
19680
  h && d.push.apply(d, h.children);
19680
19681
  }
19681
19682
  }), t.on("copyPaste.copyElement", function(p) {
19682
- var f = p.descriptor, d = p.element, g = p.elements, h = d.parent, m = A(ht(h), "bpmndi:BPMNPlane");
19683
- if (m) {
19684
- var w = Qy(h), y = $t(g, function(v) {
19683
+ var f = p.descriptor, d = p.element, m = p.elements, h = d.parent, g = A(ht(h), "bpmndi:BPMNPlane");
19684
+ if (g) {
19685
+ var w = Qy(h), y = $t(m, function(v) {
19685
19686
  return v.id === w;
19686
19687
  });
19687
19688
  y && (f.parent = y.id);
@@ -20801,7 +20802,7 @@ function a0(e, t, n) {
20801
20802
  var j = a($);
20802
20803
  j && oi.unbind(P, T, j.$delegate);
20803
20804
  }
20804
- function g(P) {
20805
+ function m(P) {
20805
20806
  z(c, function(T, $) {
20806
20807
  f(P, $, T);
20807
20808
  });
@@ -20814,7 +20815,7 @@ function a0(e, t, n) {
20814
20815
  e.on("canvas.destroy", function(P) {
20815
20816
  h(P.svg);
20816
20817
  }), e.on("canvas.init", function(P) {
20817
- g(P.svg);
20818
+ m(P.svg);
20818
20819
  }), e.on(["shape.added", "connection.added"], function(P) {
20819
20820
  var T = P.element, $ = P.gfx;
20820
20821
  e.fire("interactionEvents.createHit", { element: T, gfx: $ });
@@ -20831,10 +20832,10 @@ function a0(e, t, n) {
20831
20832
  var T = P.element, $ = P.gfx;
20832
20833
  i.updateDefaultHit(T, $);
20833
20834
  });
20834
- var m = E("djs-hit djs-hit-stroke"), w = E("djs-hit djs-hit-click-stroke"), y = E("djs-hit djs-hit-all"), v = E("djs-hit djs-hit-no-move"), b = {
20835
+ var g = E("djs-hit djs-hit-stroke"), w = E("djs-hit djs-hit-click-stroke"), y = E("djs-hit djs-hit-all"), v = E("djs-hit djs-hit-no-move"), b = {
20835
20836
  all: y,
20836
20837
  "click-stroke": w,
20837
- stroke: m,
20838
+ stroke: g,
20838
20839
  "no-move": v
20839
20840
  };
20840
20841
  function E(P, T) {
@@ -21103,7 +21104,7 @@ function f0(e, t, n, i) {
21103
21104
  dx: 0,
21104
21105
  dy: 0
21105
21106
  }, { originalEvent: v }), s("start") === !1)
21106
- return m();
21107
+ return g();
21107
21108
  r.active = !0, r.keepSelection || (E.previousSelection = n.get(), n.select(null)), r.cursor && $u(r.cursor), t.addMarker(t.getRootElement(), hv);
21108
21109
  }
21109
21110
  qp(v), r.active && (Y(E, {
@@ -21118,7 +21119,7 @@ function f0(e, t, n, i) {
21118
21119
  r.active && (v && (r.payload.originalEvent = v, qp(v)), E = s("end")), E === !1 && s("rejected"), b = w(E !== !0), s("ended", b);
21119
21120
  }
21120
21121
  function p(v) {
21121
- gn("Escape", v) && (Dr(v), m());
21122
+ gn("Escape", v) && (Dr(v), g());
21122
21123
  }
21123
21124
  function f(v) {
21124
21125
  var b;
@@ -21127,7 +21128,7 @@ function f0(e, t, n, i) {
21127
21128
  function d(v) {
21128
21129
  l(v);
21129
21130
  }
21130
- function g(v) {
21131
+ function m(v) {
21131
21132
  var b = r.payload;
21132
21133
  b.hoverGfx = v.gfx, b.hover = v.element, s("hover");
21133
21134
  }
@@ -21136,7 +21137,7 @@ function f0(e, t, n, i) {
21136
21137
  var b = r.payload;
21137
21138
  b.hoverGfx = null, b.hover = null;
21138
21139
  }
21139
- function m(v) {
21140
+ function g(v) {
21140
21141
  var b;
21141
21142
  if (r) {
21142
21143
  var E = r.active;
@@ -21145,12 +21146,12 @@ function f0(e, t, n, i) {
21145
21146
  }
21146
21147
  function w(v) {
21147
21148
  var b, E;
21148
- s("cleanup"), l0(), r.trapClick ? E = f : E = u, Fe.unbind(document, "mousemove", l), Fe.unbind(document, "dragstart", Dr), Fe.unbind(document, "selectstart", Dr), Fe.unbind(document, "mousedown", E, !0), Fe.unbind(document, "mouseup", E, !0), Fe.unbind(document, "keyup", p), Fe.unbind(document, "touchstart", d, !0), Fe.unbind(document, "touchcancel", m, !0), Fe.unbind(document, "touchmove", l, !0), Fe.unbind(document, "touchend", u, !0), e.off("element.hover", g), e.off("element.out", h), t.removeMarker(t.getRootElement(), hv);
21149
+ s("cleanup"), l0(), r.trapClick ? E = f : E = u, Fe.unbind(document, "mousemove", l), Fe.unbind(document, "dragstart", Dr), Fe.unbind(document, "selectstart", Dr), Fe.unbind(document, "mousedown", E, !0), Fe.unbind(document, "mouseup", E, !0), Fe.unbind(document, "keyup", p), Fe.unbind(document, "touchstart", d, !0), Fe.unbind(document, "touchcancel", g, !0), Fe.unbind(document, "touchmove", l, !0), Fe.unbind(document, "touchend", u, !0), e.off("element.hover", m), e.off("element.out", h), t.removeMarker(t.getRootElement(), hv);
21149
21150
  var R = r.payload.previousSelection;
21150
21151
  return v !== !1 && R && !n.get().length && c(R), b = r, r = null, b;
21151
21152
  }
21152
21153
  function y(v, b, E, R) {
21153
- r && m(!1), typeof b == "string" && (R = E, E = b, b = null), R = Y({}, o, R || {});
21154
+ r && g(!1), typeof b == "string" && (R = E, E = b, b = null), R = Y({}, o, R || {});
21154
21155
  var D = R.data || {}, P, T, $, j, G;
21155
21156
  if (R.trapClick ? j = f : j = u, v ? (P = Ga(v) || v, T = zr(v), qp(v), P.type === "dragstart" && Dr(P)) : (P = null, T = { x: 0, y: 0 }), $ = a(T), b || (b = $), G = gD(P), r = Y({
21156
21157
  prefix: E,
@@ -21160,11 +21161,11 @@ function f0(e, t, n, i) {
21160
21161
  displacement: zi(b, $),
21161
21162
  localStart: $,
21162
21163
  isTouch: G
21163
- }, R), R.manual || (G ? (Fe.bind(document, "touchstart", d, !0), Fe.bind(document, "touchcancel", m, !0), Fe.bind(document, "touchmove", l, !0), Fe.bind(document, "touchend", u, !0)) : (Fe.bind(document, "mousemove", l), Fe.bind(document, "dragstart", Dr), Fe.bind(document, "selectstart", Dr), Fe.bind(document, "mousedown", j, !0), Fe.bind(document, "mouseup", j, !0)), Fe.bind(document, "keyup", p), e.on("element.hover", g), e.on("element.out", h)), s("init") === !1)
21164
- return m(), !1;
21164
+ }, R), R.manual || (G ? (Fe.bind(document, "touchstart", d, !0), Fe.bind(document, "touchcancel", g, !0), Fe.bind(document, "touchmove", l, !0), Fe.bind(document, "touchend", u, !0)) : (Fe.bind(document, "mousemove", l), Fe.bind(document, "dragstart", Dr), Fe.bind(document, "selectstart", Dr), Fe.bind(document, "mousedown", j, !0), Fe.bind(document, "mouseup", j, !0)), Fe.bind(document, "keyup", p), e.on("element.hover", m), e.on("element.out", h)), s("init") === !1)
21165
+ return g(), !1;
21165
21166
  R.autoActivate && l(v, !0);
21166
21167
  }
21167
- e.on("diagram.destroy", m), this.init = y, this.move = l, this.hover = g, this.out = h, this.end = u, this.cancel = m, this.context = function() {
21168
+ e.on("diagram.destroy", g), this.init = y, this.move = l, this.hover = m, this.out = h, this.end = u, this.cancel = g, this.context = function() {
21168
21169
  return r;
21169
21170
  }, this.setOptions = function(v) {
21170
21171
  Y(o, v);
@@ -21283,33 +21284,33 @@ function d0(e, t, n, i, o) {
21283
21284
  });
21284
21285
  var d = $t(c, function(y) {
21285
21286
  return !Ot(y);
21286
- }), g = !1, h = !1, m = !1;
21287
- bv(c) && (g = o.allowed("shape.attach", {
21287
+ }), m = !1, h = !1, g = !1;
21288
+ bv(c) && (m = o.allowed("shape.attach", {
21288
21289
  position: u,
21289
21290
  shape: d,
21290
21291
  target: l
21291
- })), g || (bv(c) ? m = o.allowed("shape.create", {
21292
+ })), m || (bv(c) ? g = o.allowed("shape.create", {
21292
21293
  position: u,
21293
21294
  shape: d,
21294
21295
  source: p,
21295
21296
  target: l
21296
- }) : m = o.allowed("elements.create", {
21297
+ }) : g = o.allowed("elements.create", {
21297
21298
  elements: c,
21298
21299
  position: u,
21299
21300
  target: l
21300
21301
  }));
21301
21302
  var w = f.connectionTarget;
21302
- return m || g ? (d && p && (h = o.allowed("connection.create", {
21303
+ return g || m ? (d && p && (h = o.allowed("connection.create", {
21303
21304
  source: w === p ? d : p,
21304
21305
  target: w === p ? p : d,
21305
21306
  hints: {
21306
21307
  targetParent: l,
21307
- targetAttach: g
21308
+ targetAttach: m
21308
21309
  }
21309
21310
  })), {
21310
- attach: g,
21311
+ attach: m,
21311
21312
  connect: h
21312
- }) : m === null || g === null ? null : !1;
21313
+ }) : g === null || m === null ? null : !1;
21313
21314
  }
21314
21315
  function a(c, l) {
21315
21316
  [mv, SD, gv, yv].forEach(function(u) {
@@ -21323,26 +21324,26 @@ function d0(e, t, n, i, o) {
21323
21324
  return;
21324
21325
  }
21325
21326
  xv(c);
21326
- var g = {
21327
+ var m = {
21327
21328
  x: c.x,
21328
21329
  y: c.y
21329
- }, h = l.canExecute = p && r(u, p, g, f, d);
21330
+ }, h = l.canExecute = p && r(u, p, m, f, d);
21330
21331
  p && h !== null && (l.target = p, h && h.attach ? a(p, mv) : a(p, h ? yv : gv));
21331
21332
  }), n.on(["create.end", "create.out", "create.cleanup"], function(c) {
21332
21333
  var l = c.hover;
21333
21334
  l && a(l, null);
21334
21335
  }), n.on("create.end", function(c) {
21335
- var l = c.context, u = l.source, p = l.shape, f = l.elements, d = l.target, g = l.canExecute, h = g && g.attach, m = g && g.connect, w = l.hints || {};
21336
- if (g === !1 || !d)
21336
+ var l = c.context, u = l.source, p = l.shape, f = l.elements, d = l.target, m = l.canExecute, h = m && m.attach, g = m && m.connect, w = l.hints || {};
21337
+ if (m === !1 || !d)
21337
21338
  return !1;
21338
21339
  xv(c);
21339
21340
  var y = {
21340
21341
  x: c.x,
21341
21342
  y: c.y
21342
21343
  };
21343
- m ? p = i.appendShape(u, p, y, d, {
21344
+ g ? p = i.appendShape(u, p, y, d, {
21344
21345
  attach: h,
21345
- connection: m === !0 ? {} : m,
21346
+ connection: g === !0 ? {} : g,
21346
21347
  connectionTarget: w.connectionTarget
21347
21348
  }) : (f = i.createElements(f, y, d, Y({}, w, {
21348
21349
  attach: h
@@ -21366,29 +21367,29 @@ function d0(e, t, n, i, o) {
21366
21367
  });
21367
21368
  }), this.start = function(c, l, u) {
21368
21369
  Ue(l) || (l = [l]);
21369
- var p = $t(l, function(g) {
21370
- return !Ot(g);
21370
+ var p = $t(l, function(m) {
21371
+ return !Ot(m);
21371
21372
  });
21372
21373
  if (p) {
21373
21374
  u = Y({
21374
21375
  elements: l,
21375
21376
  hints: {},
21376
21377
  shape: p
21377
- }, u || {}), z(l, function(g) {
21378
- Ve(g.x) || (g.x = 0), Ve(g.y) || (g.y = 0);
21378
+ }, u || {}), z(l, function(m) {
21379
+ Ve(m.x) || (m.x = 0), Ve(m.y) || (m.y = 0);
21379
21380
  });
21380
- var f = it(l, function(g) {
21381
- return !g.hidden;
21381
+ var f = it(l, function(m) {
21382
+ return !m.hidden;
21382
21383
  }), d = ln(f);
21383
- z(l, function(g) {
21384
- Ot(g) && (g.waypoints = Vn(g.waypoints, function(h) {
21384
+ z(l, function(m) {
21385
+ Ot(m) && (m.waypoints = Vn(m.waypoints, function(h) {
21385
21386
  return {
21386
21387
  x: h.x - d.x - d.width / 2,
21387
21388
  y: h.y - d.y - d.height / 2
21388
21389
  };
21389
- })), Y(g, {
21390
- x: g.x - d.x - d.width / 2,
21391
- y: g.y - d.y - d.height / 2
21390
+ })), Y(m, {
21391
+ x: m.x - d.x - d.width / 2,
21392
+ y: m.y - d.y - d.height / 2
21392
21393
  });
21393
21394
  }), t.init(c, vv, {
21394
21395
  cursor: "grabbing",
@@ -21642,11 +21643,11 @@ li.prototype.createTree = function(e) {
21642
21643
  function c(p, f) {
21643
21644
  var d = r.get(p);
21644
21645
  if (!d) {
21645
- var g = {
21646
+ var m = {
21646
21647
  element: p,
21647
21648
  depth: f
21648
21649
  };
21649
- o.push(g), r.set(p, g);
21650
+ o.push(m), r.set(p, m);
21650
21651
  return;
21651
21652
  }
21652
21653
  if (d.depth < f) {
@@ -21665,17 +21666,17 @@ li.prototype.createTree = function(e) {
21665
21666
  Kr(a, function(p, f, d) {
21666
21667
  if (tt(p))
21667
21668
  return;
21668
- z(p.labels, function(m) {
21669
- c(m, d);
21669
+ z(p.labels, function(g) {
21670
+ c(g, d);
21670
21671
  });
21671
- function g(m) {
21672
- m && m.length && z(m, function(w) {
21672
+ function m(g) {
21673
+ g && g.length && z(g, function(w) {
21673
21674
  z(w.labels, function(y) {
21674
21675
  c(y, d);
21675
21676
  }), c(w, d);
21676
21677
  });
21677
21678
  }
21678
- z([p.attachers, p.incoming, p.outgoing], g), c(p, d);
21679
+ z([p.attachers, p.incoming, p.outgoing], m), c(p, d);
21679
21680
  var h = [];
21680
21681
  return p.children && (h = p.children.slice()), n._eventBus.fire("copyPaste.createTree", {
21681
21682
  element: p,
@@ -21764,9 +21765,9 @@ function g0(e, t, n) {
21764
21765
  return c.default && (u[c.default] = {
21765
21766
  element: p,
21766
21767
  property: "default"
21767
- }), c.host && (me(c).attachedToRef = me(l[c.host])), lo(u, si(u, function(f, d, g) {
21768
- var h = d.element, m = d.property;
21769
- return g === c.id && (h.set(m, p), f.push(c.id)), f;
21768
+ }), c.host && (me(c).attachedToRef = me(l[c.host])), lo(u, si(u, function(f, d, m) {
21769
+ var h = d.element, g = d.property;
21770
+ return m === c.id && (h.set(g, p), f.push(c.id)), f;
21770
21771
  }, []));
21771
21772
  }
21772
21773
  t.on("copyPaste.pasteElement", function(c) {
@@ -21985,9 +21986,9 @@ function v0(e, t, n, i, o, r) {
21985
21986
  "border-color",
21986
21987
  "color"
21987
21988
  ]);
21988
- var g = Kf(p.$descriptor), h = Kf(f.$descriptor, !0), m = BD(g, h);
21989
+ var m = Kf(p.$descriptor), h = Kf(f.$descriptor, !0), g = BD(m, h);
21989
21990
  Y(f, Gi(c, ID));
21990
- var w = it(m, function(b) {
21991
+ var w = it(g, function(b) {
21991
21992
  return b === "eventDefinitions" ? Rv(s, c.eventDefinitionType) : b === "loopCharacteristics" ? !Gn(f) : ii(f, b) || b === "processRef" && c.isExpanded === !1 || b === "triggeredByEvent" ? !1 : b === "isForCompensation" ? !Gn(f) : !0;
21992
21993
  });
21993
21994
  if (f = n.copyElement(
@@ -22192,15 +22193,15 @@ function Di(e, t, n, i, o, r, a) {
22192
22193
  var l = c.context, u = l.initialized;
22193
22194
  u || (u = l.initialized = s.init(c, l)), u && Mv(c);
22194
22195
  }), n.on("spaceTool.end", function(c) {
22195
- var l = c.context, u = l.axis, p = l.direction, f = l.movingShapes, d = l.resizingShapes, g = l.start;
22196
+ var l = c.context, u = l.axis, p = l.direction, f = l.movingShapes, d = l.resizingShapes, m = l.start;
22196
22197
  if (l.initialized) {
22197
22198
  Mv(c);
22198
22199
  var h = {
22199
22200
  x: 0,
22200
22201
  y: 0
22201
22202
  };
22202
- h[u] = GD(c["d" + u]), s.makeSpace(f, d, h, p, g), n.once("spaceTool.ended", function(m) {
22203
- s.activateSelection(m.originalEvent, !0, !0);
22203
+ h[u] = GD(c["d" + u]), s.makeSpace(f, d, h, p, m), n.once("spaceTool.ended", function(g) {
22204
+ s.activateSelection(g.originalEvent, !0, !0);
22204
22205
  });
22205
22206
  }
22206
22207
  });
@@ -22269,8 +22270,8 @@ Di.prototype.calculateAdjustments = function(e, t, n, i) {
22269
22270
  var o = this._rules, r = [], a = [], s = /* @__PURE__ */ new Set(), c = /* @__PURE__ */ new Set(), l = [], u = [];
22270
22271
  function p(d) {
22271
22272
  s.has(d) || (s.add(d), r.push(d));
22272
- var g = d.label;
22273
- g && !s.has(g) && (s.add(g), r.push(g));
22273
+ var m = d.label;
22274
+ m && !s.has(m) && (s.add(m), r.push(m));
22274
22275
  }
22275
22276
  function f(d) {
22276
22277
  c.has(d) || (c.add(d), a.push(d));
@@ -22281,31 +22282,31 @@ Di.prototype.calculateAdjustments = function(e, t, n, i) {
22281
22282
  u.push(d);
22282
22283
  return;
22283
22284
  }
22284
- var g = d[t], h = g + d[vo[t]];
22285
+ var m = d[t], h = m + d[vo[t]];
22285
22286
  if (UD(d) && (n > 0 && We(d)[t] > i || n < 0 && We(d)[t] < i)) {
22286
22287
  l.push(d);
22287
22288
  return;
22288
22289
  }
22289
- if (n > 0 && g > i || n < 0 && h < i) {
22290
+ if (n > 0 && m > i || n < 0 && h < i) {
22290
22291
  p(d);
22291
22292
  return;
22292
22293
  }
22293
- if (g < i && h > i && o.allowed("shape.resize", { shape: d })) {
22294
+ if (m < i && h > i && o.allowed("shape.resize", { shape: d })) {
22294
22295
  f(d);
22295
22296
  return;
22296
22297
  }
22297
22298
  }
22298
22299
  }), z(r, function(d) {
22299
- var g = d.attachers;
22300
- g && z(g, function(h) {
22300
+ var m = d.attachers;
22301
+ m && z(m, function(h) {
22301
22302
  p(h);
22302
22303
  });
22303
22304
  }), z(l, function(d) {
22304
- var g = d.host;
22305
- (s.has(g) || c.has(g)) && p(d);
22305
+ var m = d.host;
22306
+ (s.has(m) || c.has(m)) && p(d);
22306
22307
  }), z(u, function(d) {
22307
- var g = d.source, h = d.target, m = d.label;
22308
- (s.has(g) || c.has(g)) && (s.has(h) || c.has(h)) && m && p(m);
22308
+ var m = d.source, h = d.target, g = d.label;
22309
+ (s.has(m) || c.has(m)) && (s.has(h) || c.has(h)) && g && p(g);
22309
22310
  }), {
22310
22311
  movingShapes: r,
22311
22312
  resizingShapes: a
@@ -22341,12 +22342,12 @@ function WD(e, t, n, i, o) {
22341
22342
  if (a.length) {
22342
22343
  var s = {}, c, l, u = new Set(r), p = new Set(a);
22343
22344
  return z(a, function(f) {
22344
- var d = f.attachers, g = f.children, h = je(f), m = it(g, function(G) {
22345
+ var d = f.attachers, m = f.children, h = je(f), g = it(m, function(G) {
22345
22346
  return !Ot(G) && !tt(G) && !u.has(G) && !p.has(G);
22346
- }), w = it(g, function(G) {
22347
+ }), w = it(m, function(G) {
22347
22348
  return !Ot(G) && !tt(G) && u.has(G);
22348
22349
  }), y, v, b, E = [], R = [], D, P, T, $;
22349
- m.length && (v = Cv(je(ln(m))), y = i - h[Vo[n]] + v[Vo[n]], n === "n" ? s.bottom = l = Ve(l) ? Math.min(l, y) : y : n === "w" ? s.right = l = Ve(l) ? Math.min(l, y) : y : n === "s" ? s.top = c = Ve(c) ? Math.max(c, y) : y : n === "e" && (s.left = c = Ve(c) ? Math.max(c, y) : y)), w.length && (b = Cv(je(ln(w))), y = i - b[Vo[rl[n]]] + h[Vo[rl[n]]], n === "n" ? s.bottom = l = Ve(l) ? Math.min(l, y) : y : n === "w" ? s.right = l = Ve(l) ? Math.min(l, y) : y : n === "s" ? s.top = c = Ve(c) ? Math.max(c, y) : y : n === "e" && (s.left = c = Ve(c) ? Math.max(c, y) : y)), d && d.length && (d.forEach(function(G) {
22350
+ g.length && (v = Cv(je(ln(g))), y = i - h[Vo[n]] + v[Vo[n]], n === "n" ? s.bottom = l = Ve(l) ? Math.min(l, y) : y : n === "w" ? s.right = l = Ve(l) ? Math.min(l, y) : y : n === "s" ? s.top = c = Ve(c) ? Math.max(c, y) : y : n === "e" && (s.left = c = Ve(c) ? Math.max(c, y) : y)), w.length && (b = Cv(je(ln(w))), y = i - b[Vo[rl[n]]] + h[Vo[rl[n]]], n === "n" ? s.bottom = l = Ve(l) ? Math.min(l, y) : y : n === "w" ? s.right = l = Ve(l) ? Math.min(l, y) : y : n === "s" ? s.top = c = Ve(c) ? Math.max(c, y) : y : n === "e" && (s.left = c = Ve(c) ? Math.max(c, y) : y)), d && d.length && (d.forEach(function(G) {
22350
22351
  u.has(G) ? E.push(G) : R.push(G);
22351
22352
  }), E.length && (D = je(ln(E.map(We))), P = h[Vo[rl[n]]] - (D[Vo[rl[n]]] - i)), R.length && (T = je(ln(R.map(We))), $ = T[Vo[n]] - (h[Vo[n]] - i)), n === "n" ? (y = Math.min(P || 1 / 0, $ || 1 / 0), s.bottom = l = Ve(l) ? Math.min(l, y) : y) : n === "w" ? (y = Math.min(P || 1 / 0, $ || 1 / 0), s.right = l = Ve(l) ? Math.min(l, y) : y) : n === "s" ? (y = Math.max(P || -1 / 0, $ || -1 / 0), s.top = c = Ve(c) ? Math.max(c, y) : y) : n === "e" && (y = Math.max(P || -1 / 0, $ || -1 / 0), s.left = c = Ve(c) ? Math.max(c, y) : y));
22352
22353
  var j = o && o[f.id];
@@ -22388,16 +22389,16 @@ function w0(e, t, n, i, o) {
22388
22389
  c = Le("path"), Se(c, "d", "M0,0 L0,0"), ct(c).add("djs-crosshair"), Ke(f, c), s.line = c;
22389
22390
  var d = Le("g");
22390
22391
  Se(d, i.cls("djs-drag-group", ["no-events"])), Ke(n.getActiveLayer(), d), r(u, d);
22391
- var g = new Set(u);
22392
+ var m = new Set(u);
22392
22393
  z(p, function(R) {
22393
- g.add(R);
22394
+ m.add(R);
22394
22395
  });
22395
- var h = /* @__PURE__ */ new Set(), m = s.movingConnections = [];
22396
- g.forEach(function(R) {
22396
+ var h = /* @__PURE__ */ new Set(), g = s.movingConnections = [];
22397
+ m.forEach(function(R) {
22397
22398
  z(R.outgoing, function(D) {
22398
- h.has(D) || !Ot(D) || !g.has(D.target) || (h.add(D), m.push(D));
22399
+ h.has(D) || !Ot(D) || !m.has(D.target) || (h.add(D), g.push(D));
22399
22400
  });
22400
- }), r(m, d), s.dragGroup = d;
22401
+ }), r(g, d), s.dragGroup = d;
22401
22402
  }
22402
22403
  if (!s.frameGroup) {
22403
22404
  var w = Le("g");
@@ -22434,12 +22435,12 @@ function w0(e, t, n, i, o) {
22434
22435
  }
22435
22436
  }), e.on("spaceTool.cleanup", function(a) {
22436
22437
  var s = a.context, c = s.movingShapes, l = s.movingConnections, u = s.resizingShapes, p = s.line, f = s.dragGroup, d = s.frameGroup;
22437
- z(c, function(g) {
22438
- n.removeMarker(g, Jp);
22439
- }), z(l, function(g) {
22440
- n.removeMarker(g, Jp);
22441
- }), f && (cn(p), cn(f)), z(u, function(g) {
22442
- n.removeMarker(g, Av);
22438
+ z(c, function(m) {
22439
+ n.removeMarker(m, Jp);
22440
+ }), z(l, function(m) {
22441
+ n.removeMarker(m, Jp);
22442
+ }), f && (cn(p), cn(f)), z(u, function(m) {
22443
+ n.removeMarker(m, Av);
22443
22444
  }), d && cn(d);
22444
22445
  });
22445
22446
  }
@@ -22772,9 +22773,9 @@ function Fh(e, t, n, i, o) {
22772
22773
  }), this.postExecute("shape.resize", function(a) {
22773
22774
  var s = a.context, c = s.shape, l = s.oldBounds, u = s.newBounds, p = c.attachers, f = s.hints || {};
22774
22775
  f.attachSupport !== !1 && z(p, function(d) {
22775
- var g = Yy(d, l, u);
22776
- o.moveShape(d, g, d.parent), z(d.labels, function(h) {
22777
- o.moveShape(h, g, h.parent);
22776
+ var m = Yy(d, l, u);
22777
+ o.moveShape(d, m, d.parent), z(d.labels, function(h) {
22778
+ o.moveShape(h, m, h.parent);
22778
22779
  });
22779
22780
  });
22780
22781
  }), this.preExecute("shape.delete", function(a) {
@@ -22924,8 +22925,8 @@ function ui(e, t, n) {
22924
22925
  de.call(this, e), this._bpmnFactory = t;
22925
22926
  var i = this;
22926
22927
  function o(d) {
22927
- var g = d.context, h = g.hints || {}, m;
22928
- !g.cropped && h.createElementsBehavior !== !1 && (m = g.connection, m.waypoints = n.getCroppedWaypoints(m), g.cropped = !0);
22928
+ var m = d.context, h = m.hints || {}, g;
22929
+ !m.cropped && h.createElementsBehavior !== !1 && (g = m.connection, g.waypoints = n.getCroppedWaypoints(g), m.cropped = !0);
22929
22930
  }
22930
22931
  this.executed([
22931
22932
  "connection.layout",
@@ -22934,12 +22935,12 @@ function ui(e, t, n) {
22934
22935
  delete d.context.cropped;
22935
22936
  });
22936
22937
  function r(d) {
22937
- var g = d.context;
22938
- i.updateParent(g.shape || g.connection, g.oldParent);
22938
+ var m = d.context;
22939
+ i.updateParent(m.shape || m.connection, m.oldParent);
22939
22940
  }
22940
22941
  function a(d) {
22941
- var g = d.context, h = g.shape || g.connection, m = g.parent || g.newParent;
22942
- i.updateParent(h, m);
22942
+ var m = d.context, h = m.shape || m.connection, g = m.parent || m.newParent;
22943
+ i.updateParent(h, g);
22943
22944
  }
22944
22945
  this.executed([
22945
22946
  "shape.move",
@@ -22957,15 +22958,15 @@ function ui(e, t, n) {
22957
22958
  "connection.delete"
22958
22959
  ], ti(a));
22959
22960
  function s(d) {
22960
- var g = d.context, h = g.oldRoot, m = h.children;
22961
- z(m, function(w) {
22961
+ var m = d.context, h = m.oldRoot, g = h.children;
22962
+ z(g, function(w) {
22962
22963
  A(w, "bpmn:BaseElement") && i.updateParent(w);
22963
22964
  });
22964
22965
  }
22965
22966
  this.executed(["canvas.updateRoot"], s), this.reverted(["canvas.updateRoot"], s);
22966
22967
  function c(d) {
22967
- var g = d.context.shape;
22968
- A(g, "bpmn:BaseElement") && i.updateBounds(g);
22968
+ var m = d.context.shape;
22969
+ A(m, "bpmn:BaseElement") && i.updateBounds(m);
22969
22970
  }
22970
22971
  this.executed(["shape.move", "shape.create", "shape.resize"], ti(function(d) {
22971
22972
  d.context.shape.type !== "label" && c(d);
@@ -23000,23 +23001,23 @@ function ui(e, t, n) {
23000
23001
  "connection.move",
23001
23002
  "connection.updateWaypoints"
23002
23003
  ], ti(u)), this.executed("connection.reconnect", ti(function(d) {
23003
- var g = d.context, h = g.connection, m = g.oldSource, w = g.newSource, y = me(h), v = me(m), b = me(w);
23004
+ var m = d.context, h = m.connection, g = m.oldSource, w = m.newSource, y = me(h), v = me(g), b = me(w);
23004
23005
  y.conditionExpression && !nt(b, [
23005
23006
  "bpmn:Activity",
23006
23007
  "bpmn:ExclusiveGateway",
23007
23008
  "bpmn:InclusiveGateway"
23008
- ]) && (g.oldConditionExpression = y.conditionExpression, delete y.conditionExpression), m !== w && v.default === y && (g.oldDefault = v.default, delete v.default);
23009
+ ]) && (m.oldConditionExpression = y.conditionExpression, delete y.conditionExpression), g !== w && v.default === y && (m.oldDefault = v.default, delete v.default);
23009
23010
  })), this.reverted("connection.reconnect", ti(function(d) {
23010
- var g = d.context, h = g.connection, m = g.oldSource, w = g.newSource, y = me(h), v = me(m), b = me(w);
23011
- g.oldConditionExpression && (y.conditionExpression = g.oldConditionExpression), g.oldDefault && (v.default = g.oldDefault, delete b.default);
23011
+ var m = d.context, h = m.connection, g = m.oldSource, w = m.newSource, y = me(h), v = me(g), b = me(w);
23012
+ m.oldConditionExpression && (y.conditionExpression = m.oldConditionExpression), m.oldDefault && (v.default = m.oldDefault, delete b.default);
23012
23013
  }));
23013
23014
  function p(d) {
23014
23015
  i.updateAttachment(d.context);
23015
23016
  }
23016
23017
  this.executed(["element.updateAttachment"], ti(p)), this.reverted(["element.updateAttachment"], ti(p)), this.executed("element.updateLabel", ti(f)), this.reverted("element.updateLabel", ti(f));
23017
23018
  function f(d) {
23018
- const { element: g } = d.context, h = di(g), m = ht(g), w = m && m.get("label");
23019
- er(g) || Ll(g) || (h && !w ? m.set("label", t.create("bpmndi:BPMNLabel")) : !h && w && m.set("label", void 0));
23019
+ const { element: m } = d.context, h = di(m), g = ht(m), w = g && g.get("label");
23020
+ er(m) || Ll(m) || (h && !w ? g.set("label", t.create("bpmndi:BPMNLabel")) : !h && w && g.set("label", void 0));
23020
23021
  }
23021
23022
  }
23022
23023
  Me(ui, de);
@@ -23456,43 +23457,43 @@ var Lv = {
23456
23457
  };
23457
23458
  Wu.prototype.preExecute = function(e) {
23458
23459
  var t = this._modeling, n = e.groups, i = e.axis, o = e.dimension;
23459
- function r(m, w) {
23460
- m.range.min = Math.min(w[i], m.range.min), m.range.max = Math.max(w[i] + w[o], m.range.max);
23460
+ function r(g, w) {
23461
+ g.range.min = Math.min(w[i], g.range.min), g.range.max = Math.max(w[i] + w[o], g.range.max);
23461
23462
  }
23462
- function a(m) {
23463
- return m[i] + m[o] / 2;
23463
+ function a(g) {
23464
+ return g[i] + g[o] / 2;
23464
23465
  }
23465
- function s(m) {
23466
- return m.length - 1;
23466
+ function s(g) {
23467
+ return g.length - 1;
23467
23468
  }
23468
- function c(m) {
23469
- return m.max - m.min;
23469
+ function c(g) {
23470
+ return g.max - g.min;
23470
23471
  }
23471
- function l(m, w) {
23472
+ function l(g, w) {
23472
23473
  var y = { y: 0 };
23473
- y[i] = m - a(w), y[i] && (y[Lv[i]] = 0, t.moveElements([w], y, w.parent));
23474
+ y[i] = g - a(w), y[i] && (y[Lv[i]] = 0, t.moveElements([w], y, w.parent));
23474
23475
  }
23475
- var u = n[0], p = s(n), f = n[p], d, g, h = 0;
23476
- z(n, function(m, w) {
23476
+ var u = n[0], p = s(n), f = n[p], d, m, h = 0;
23477
+ z(n, function(g, w) {
23477
23478
  var y, v, b;
23478
- if (m.elements.length < 2) {
23479
- w && w !== n.length - 1 && (r(m, m.elements[0]), h += c(m.range));
23479
+ if (g.elements.length < 2) {
23480
+ w && w !== n.length - 1 && (r(g, g.elements[0]), h += c(g.range));
23480
23481
  return;
23481
23482
  }
23482
- y = ao(m.elements, i), v = y[0], w === p && (v = y[s(y)]), b = a(v), m.range = null, z(y, function(E) {
23483
- if (l(b, E), m.range === null) {
23484
- m.range = {
23483
+ y = ao(g.elements, i), v = y[0], w === p && (v = y[s(y)]), b = a(v), g.range = null, z(y, function(E) {
23484
+ if (l(b, E), g.range === null) {
23485
+ g.range = {
23485
23486
  min: E[i],
23486
23487
  max: E[i] + E[o]
23487
23488
  };
23488
23489
  return;
23489
23490
  }
23490
- r(m, E);
23491
- }), w && w !== n.length - 1 && (h += c(m.range));
23492
- }), g = Math.abs(f.range.min - u.range.max), d = Math.round((g - h) / (n.length - 1)), !(d < n.length - 1) && z(n, function(m, w) {
23491
+ r(g, E);
23492
+ }), w && w !== n.length - 1 && (h += c(g.range));
23493
+ }), m = Math.abs(f.range.min - u.range.max), d = Math.round((m - h) / (n.length - 1)), !(d < n.length - 1) && z(n, function(g, w) {
23493
23494
  var y = {}, v;
23494
- m === u || m === f || (v = n[w - 1], m.range.max = 0, z(m.elements, function(b, E) {
23495
- y[Lv[i]] = 0, y[i] = v.range.max - b[i] + d, m.range.min !== b[i] && (y[i] += b[i] - m.range.min), y[i] && t.moveElements([b], y, b.parent), m.range.max = Math.max(b[i] + b[o], E ? m.range.max : 0);
23495
+ g === u || g === f || (v = n[w - 1], g.range.max = 0, z(g.elements, function(b, E) {
23496
+ y[Lv[i]] = 0, y[i] = v.range.max - b[i] + d, g.range.min !== b[i] && (y[i] += b[i] - g.range.min), y[i] && t.moveElements([b], y, b.parent), g.range.max = Math.max(b[i] + b[o], E ? g.range.max : 0);
23496
23497
  }));
23497
23498
  });
23498
23499
  };
@@ -23643,10 +23644,10 @@ function Oo(e, t) {
23643
23644
  Oo.$inject = ["modeling", "rules"];
23644
23645
  Oo.prototype.preExecute = function(e) {
23645
23646
  var t = this, n = this._modeling, i = this._rules, o = e.oldShape, r = e.newData, a = e.hints || {}, s;
23646
- function c(g, h, m) {
23647
+ function c(m, h, g) {
23647
23648
  return i.allowed("connection.reconnect", {
23648
- connection: m,
23649
- source: g,
23649
+ connection: g,
23650
+ source: m,
23650
23651
  target: h
23651
23652
  });
23652
23653
  }
@@ -23663,20 +23664,20 @@ Oo.prototype.preExecute = function(e) {
23663
23664
  var p;
23664
23665
  a.moveChildren !== !1 && (p = o.children.slice(), n.moveElements(p, { x: 0, y: 0 }, s, a));
23665
23666
  var f = o.incoming.slice(), d = o.outgoing.slice();
23666
- z(f, function(g) {
23667
- var h = g.source, m = c(h, s, g);
23668
- m && t.reconnectEnd(
23669
- g,
23667
+ z(f, function(m) {
23668
+ var h = m.source, g = c(h, s, m);
23669
+ g && t.reconnectEnd(
23670
+ m,
23670
23671
  s,
23671
- Ou(g, s, u),
23672
+ Ou(m, s, u),
23672
23673
  a
23673
23674
  );
23674
- }), z(d, function(g) {
23675
- var h = g.target, m = c(s, h, g);
23676
- m && t.reconnectStart(
23677
- g,
23675
+ }), z(d, function(m) {
23676
+ var h = m.target, g = c(s, h, m);
23677
+ g && t.reconnectStart(
23678
+ m,
23678
23679
  s,
23679
- ku(g, s, u),
23680
+ ku(m, s, u),
23680
23681
  a
23681
23682
  );
23682
23683
  });
@@ -23789,12 +23790,12 @@ pr.prototype.resizeShapes = function(e, t, n) {
23789
23790
  pr.prototype.updateConnectionWaypoints = function(e, t, n, i, o, r, a) {
23790
23791
  var s = this, c = new Set(o), l = new Set(r);
23791
23792
  z(e, function(u) {
23792
- var p = u.source, f = u.target, d = dL(u), g = S0(n), h = {}, m = c.has(p) || l.has(p), w = c.has(f) || l.has(f);
23793
- m && w ? (d = Vn(d, function(y) {
23794
- return Bv(y, i, n) && (y[g] = y[g] + t[g]), y.original && Bv(y.original, i, n) && (y.original[g] = y.original[g] + t[g]), y;
23793
+ var p = u.source, f = u.target, d = dL(u), m = S0(n), h = {}, g = c.has(p) || l.has(p), w = c.has(f) || l.has(f);
23794
+ g && w ? (d = Vn(d, function(y) {
23795
+ return Bv(y, i, n) && (y[m] = y[m] + t[m]), y.original && Bv(y.original, i, n) && (y.original[m] = y.original[m] + t[m]), y;
23795
23796
  }), s._modeling.updateWaypoints(u, d, {
23796
23797
  labelBehavior: !1
23797
- })) : (m || w) && (c.has(p) ? h.connectionStart = uh(u, p, t) : c.has(f) ? h.connectionEnd = ph(u, f, t) : l.has(p) ? h.connectionStart = ku(
23798
+ })) : (g || w) && (c.has(p) ? h.connectionStart = uh(u, p, t) : c.has(f) ? h.connectionEnd = ph(u, f, t) : l.has(p) ? h.connectionStart = ku(
23798
23799
  u,
23799
23800
  p,
23800
23801
  a[p.id]
@@ -24301,15 +24302,15 @@ Uh.prototype.preExecute = function(e) {
24301
24302
  return E !== i;
24302
24303
  });
24303
24304
  });
24304
- var f, d, g, h, m;
24305
- o === "top" ? (f = -120, d = i.y, g = d + 10, h = "n", m = "y") : o === "left" ? (f = -120, d = i.x, g = d + 10, h = "w", m = "x") : o === "bottom" ? (f = 120, d = i.y + i.height, g = d - 10, h = "s", m = "y") : o === "right" && (f = 120, d = i.x + i.width, g = d - 10, h = "e", m = "x");
24306
- var w = t.calculateAdjustments(p, m, f, g), y = l ? { x: 0, y: f } : { x: f, y: 0 };
24305
+ var f, d, m, h, g;
24306
+ o === "top" ? (f = -120, d = i.y, m = d + 10, h = "n", g = "y") : o === "left" ? (f = -120, d = i.x, m = d + 10, h = "w", g = "x") : o === "bottom" ? (f = 120, d = i.y + i.height, m = d - 10, h = "s", g = "y") : o === "right" && (f = 120, d = i.x + i.width, m = d - 10, h = "e", g = "x");
24307
+ var w = t.calculateAdjustments(p, g, f, m), y = l ? { x: 0, y: f } : { x: f, y: 0 };
24307
24308
  t.makeSpace(
24308
24309
  w.movingShapes,
24309
24310
  w.resizingShapes,
24310
24311
  y,
24311
24312
  h,
24312
- g
24313
+ m
24313
24314
  );
24314
24315
  var v = l ? {
24315
24316
  x: i.x + (a ? Si : 0),
@@ -24377,8 +24378,8 @@ mc.prototype.resizeBalanced = function(e, t) {
24377
24378
  };
24378
24379
  mc.prototype.resizeSpace = function(e, t) {
24379
24380
  var n = this._spaceTool, i = je(e), o = je(t), r = h_(o, i), a = Ri(e), s = [], c = [];
24380
- Kr(a, function(g) {
24381
- return s.push(g), (A(g, "bpmn:Lane") || A(g, "bpmn:Participant")) && c.push(g), g.children;
24381
+ Kr(a, function(m) {
24382
+ return s.push(m), (A(m, "bpmn:Lane") || A(m, "bpmn:Participant")) && c.push(m), m.children;
24382
24383
  });
24383
24384
  var l, u, p, f, d;
24384
24385
  (r.bottom || r.top) && (l = r.bottom || r.top, u = e.y + (r.bottom ? e.height : 0) + (r.bottom ? -10 : 10), p = r.bottom ? "s" : "n", f = r.top > 0 || r.bottom < 0 ? -l : l, d = n.calculateAdjustments(s, "y", f, u), n.makeSpace(d.movingShapes, d.resizingShapes, { x: 0, y: l }, p)), (r.left || r.right) && (l = r.right || r.left, u = e.x + (r.right ? e.width : 0) + (r.right ? -10 : 100), p = r.right ? "e" : "w", f = r.left > 0 || r.right < 0 ? -l : l, d = n.calculateAdjustments(c, "x", f, u), n.makeSpace(d.movingShapes, d.resizingShapes, { x: l, y: 0 }, p));
@@ -24421,8 +24422,8 @@ Zu.prototype._computeUpdates = function(e, t) {
24421
24422
  f.forEach(s), n.push(p);
24422
24423
  }
24423
24424
  }), e.forEach(s), r.forEach(function(u) {
24424
- var p = u.businessObject, f = p.get(Yh), d = f.slice(), g = l(u);
24425
- i.push({ flowNode: p, remove: d, add: g });
24425
+ var p = u.businessObject, f = p.get(Yh), d = f.slice(), m = l(u);
24426
+ i.push({ flowNode: p, remove: d, add: m });
24426
24427
  }), t.forEach(function(u) {
24427
24428
  var p = u.businessObject;
24428
24429
  u.parent || p.get(zs).forEach(function(f) {
@@ -24511,13 +24512,13 @@ yc.prototype._computeUpdates = function(e, t) {
24511
24512
  }), t.forEach(function(y) {
24512
24513
  s(y.groupShape, y.categoryValue, !1);
24513
24514
  }), r.length && l();
24514
- var d = Array.from(o.keys()), g = Array.from(a.values()).reduce(function(y, v) {
24515
+ var d = Array.from(o.keys()), m = Array.from(a.values()).reduce(function(y, v) {
24515
24516
  return v.present && y.add(v.present.categoryValue), v.past && y.add(v.past.categoryValue), y;
24516
- }, /* @__PURE__ */ new Set()), h = /* @__PURE__ */ new Map(), m = p(d);
24517
+ }, /* @__PURE__ */ new Set()), h = /* @__PURE__ */ new Map(), g = p(d);
24517
24518
  a.forEach(function(y, v) {
24518
24519
  var b = y.present;
24519
24520
  if (b) {
24520
- var E = m.get(b.root) || [], R = Aa(E, v);
24521
+ var E = g.get(b.root) || [], R = Aa(E, v);
24521
24522
  E.forEach(function(D) {
24522
24523
  if (R[D.id]) {
24523
24524
  var P = h.get(D);
@@ -24530,7 +24531,7 @@ yc.prototype._computeUpdates = function(e, t) {
24530
24531
  var b = o.get(v), E = b.get(Kh), R = new Set(E), D = h.get(v) || /* @__PURE__ */ new Set(), P = Array.from(D).filter(function($) {
24531
24532
  return !R.has($);
24532
24533
  }), T = E.filter(function($) {
24533
- return g.has($) && !D.has($);
24534
+ return m.has($) && !D.has($);
24534
24535
  });
24535
24536
  return (P.length || T.length) && y.push({
24536
24537
  businessObject: b,
@@ -24700,8 +24701,8 @@ function L0(e, t, n) {
24700
24701
  d.removeShape !== !1 && e.removeShape(u, { unsetLabel: !1 });
24701
24702
  return;
24702
24703
  }
24703
- var g = di(l);
24704
- typeof f > "u" && (f = t.getExternalLabelBounds(u, g)), f && e.resizeShape(u, f, kL);
24704
+ var m = di(l);
24705
+ typeof f > "u" && (f = t.getExternalLabelBounds(u, m)), f && e.resizeShape(u, f, kL);
24705
24706
  }
24706
24707
  }
24707
24708
  this.preExecute = o, this.execute = r, this.revert = a, this.postExecute = s;
@@ -25358,33 +25359,33 @@ function hI(e, t, n) {
25358
25359
  }
25359
25360
  function gI(e, t) {
25360
25361
  t || (t = {});
25361
- function n(g) {
25362
- return g.source === e ? 1 : -1;
25362
+ function n(m) {
25363
+ return m.source === e ? 1 : -1;
25363
25364
  }
25364
25365
  var i = t.defaultDistance || j0, o = t.direction || "e", r = t.filter, a = t.getWeight || n, s = t.maxDistance || dI, c = t.reference || "start";
25365
25366
  r || (r = xI);
25366
- function l(g, h) {
25367
- return o === "n" ? c === "start" ? je(g).top - je(h).bottom : c === "center" ? je(g).top - We(h).y : je(g).top - je(h).top : o === "w" ? c === "start" ? je(g).left - je(h).right : c === "center" ? je(g).left - We(h).x : je(g).left - je(h).left : o === "s" ? c === "start" ? je(h).top - je(g).bottom : c === "center" ? We(h).y - je(g).bottom : je(h).bottom - je(g).bottom : c === "start" ? je(h).left - je(g).right : c === "center" ? We(h).x - je(g).right : je(h).right - je(g).right;
25367
+ function l(m, h) {
25368
+ return o === "n" ? c === "start" ? je(m).top - je(h).bottom : c === "center" ? je(m).top - We(h).y : je(m).top - je(h).top : o === "w" ? c === "start" ? je(m).left - je(h).right : c === "center" ? je(m).left - We(h).x : je(m).left - je(h).left : o === "s" ? c === "start" ? je(h).top - je(m).bottom : c === "center" ? We(h).y - je(m).bottom : je(h).bottom - je(m).bottom : c === "start" ? je(h).left - je(m).right : c === "center" ? We(h).x - je(m).right : je(h).right - je(m).right;
25368
25369
  }
25369
- var u = e.incoming.filter(r).map(function(g) {
25370
- var h = a(g), m = h < 0 ? l(g.source, e) : l(e, g.source);
25370
+ var u = e.incoming.filter(r).map(function(m) {
25371
+ var h = a(m), g = h < 0 ? l(m.source, e) : l(e, m.source);
25371
25372
  return {
25372
- id: g.source.id,
25373
- distance: m,
25373
+ id: m.source.id,
25374
+ distance: g,
25374
25375
  weight: h
25375
25376
  };
25376
- }), p = e.outgoing.filter(r).map(function(g) {
25377
- var h = a(g), m = h > 0 ? l(e, g.target) : l(g.target, e);
25377
+ }), p = e.outgoing.filter(r).map(function(m) {
25378
+ var h = a(m), g = h > 0 ? l(e, m.target) : l(m.target, e);
25378
25379
  return {
25379
- id: g.target.id,
25380
- distance: m,
25380
+ id: m.target.id,
25381
+ distance: g,
25381
25382
  weight: h
25382
25383
  };
25383
- }), f = u.concat(p).reduce(function(g, h) {
25384
- return g[h.id + "__weight_" + h.weight] = h, g;
25385
- }, {}), d = si(f, function(g, h) {
25386
- var m = h.distance, w = h.weight;
25387
- return m < 0 || m > s || (g[String(m)] || (g[String(m)] = 0), g[String(m)] += 1 * w, (!g.distance || g[g.distance] < g[String(m)]) && (g.distance = m)), g;
25384
+ }), f = u.concat(p).reduce(function(m, h) {
25385
+ return m[h.id + "__weight_" + h.weight] = h, m;
25386
+ }, {}), d = si(f, function(m, h) {
25387
+ var g = h.distance, w = h.weight;
25388
+ return g < 0 || g > s || (m[String(g)] || (m[String(g)] = 0), m[String(g)] += 1 * w, (!m.distance || m[m.distance] < m[String(g)]) && (m.distance = g)), m;
25388
25389
  }, {});
25389
25390
  return d.distance || i;
25390
25391
  }
@@ -26024,14 +26025,14 @@ class J0 {
26024
26025
  An(this, "displayLocale");
26025
26026
  this.eventBus = t, this.elementRegistry = n, this.canvas = a, this.textRenderer = s, this.graphicsFactory = c;
26026
26027
  const l = o.drawShape.bind(o);
26027
- o.drawShape = (f, d, g) => this.withDisplayText(d, () => l(f, d, g), f);
26028
+ o.drawShape = (f, d, m) => this.withDisplayText(d, () => l(f, d, m), f);
26028
26029
  const u = r.activate.bind(r);
26029
26030
  r.activate = (f) => this.withDisplayText(f, () => u(f));
26030
26031
  const p = r.update.bind(r);
26031
- r.update = (f, d, g, h) => {
26032
- const m = this.resolve(f);
26033
- if (!m || m.native) return p(f, d, g, h);
26034
- (d ?? "").trim() !== (g ?? "").trim() && i.execute(bf, {
26032
+ r.update = (f, d, m, h) => {
26033
+ const g = this.resolve(f);
26034
+ if (!g || g.native) return p(f, d, m, h);
26035
+ (d ?? "").trim() !== (m ?? "").trim() && i.execute(bf, {
26035
26036
  element: f.labelTarget ?? f,
26036
26037
  locale: this.displayLocale,
26037
26038
  text: d,
@@ -26041,11 +26042,11 @@ class J0 {
26041
26042
  });
26042
26043
  }, t.on("commandStack.element.updateLabel.postExecute", (f) => {
26043
26044
  if (!this.config) return;
26044
- const { element: d, newLabel: g, oldLabel: h } = f.context;
26045
- (g ?? "") !== (h ?? "") && i.execute(bf, {
26045
+ const { element: d, newLabel: m, oldLabel: h } = f.context;
26046
+ (m ?? "") !== (h ?? "") && i.execute(bf, {
26046
26047
  element: d.labelTarget ?? d,
26047
26048
  locale: this.displayLocale,
26048
- text: g ?? "",
26049
+ text: m ?? "",
26049
26050
  designLocale: this.config.designLocale,
26050
26051
  locales: this.locales(),
26051
26052
  rootLang: this.rootLang(),
@@ -26117,7 +26118,7 @@ class J0 {
26117
26118
  var f;
26118
26119
  if (!this.config) return n();
26119
26120
  const o = this.resolve(t), r = (f = i == null ? void 0 : i.parentNode) == null ? void 0 : f.classList;
26120
- if (r) for (const [d, g] of ex) r.toggle(g, (o == null ? void 0 : o.status) === d);
26121
+ if (r) for (const [d, m] of ex) r.toggle(m, (o == null ? void 0 : o.status) === d);
26121
26122
  if (!o || o.native) return n();
26122
26123
  const { target: a, key: s } = Ca((t.labelTarget ?? t).businessObject), c = Object.prototype.hasOwnProperty.call(a, s), l = a[s];
26123
26124
  if (l === o.text) return n();
@@ -26401,15 +26402,15 @@ function nE(e, t, n) {
26401
26402
  var l = a.flatMap(function(p) {
26402
26403
  var f = n.findRoot(to(p)) || n.findRoot(p.id);
26403
26404
  if (!f && A(p, "bpmn:Process")) {
26404
- var d = t.find(function(m) {
26405
- var w = me(m);
26405
+ var d = t.find(function(g) {
26406
+ var w = me(g);
26406
26407
  return w && w.get("processRef") === p;
26407
26408
  });
26408
26409
  f = d && n.findRoot(d.id);
26409
26410
  }
26410
26411
  if (!f)
26411
26412
  return [];
26412
- var g = tE(p.name || p.id), h = jt('<li><span class="bjs-crumb"><a title="' + g + '">' + g + "</a></span></li>");
26413
+ var m = tE(p.name || p.id), h = jt('<li><span class="bjs-crumb"><a title="' + m + '">' + m + "</a></span></li>");
26413
26414
  return h.addEventListener("click", function() {
26414
26415
  n.setRootElement(f);
26415
26416
  }), h;
@@ -27413,8 +27414,8 @@ function uu() {
27413
27414
  }
27414
27415
  }
27415
27416
  function bE(e, t, n, i, o, r, a, s, c, l, u) {
27416
- var p, f, d, g, h, m, w = i && i.__k || lu, y = t.length;
27417
- for (c = PN(n, t, w, c, y), p = 0; p < y; p++) (d = n.__k[p]) != null && (f = d.__i != -1 && w[d.__i] || cu, d.__i = p, m = cg(e, d, f, o, r, a, s, c, l, u), g = d.__e, d.ref && f.ref != d.ref && (f.ref && lg(f.ref, null, d), u.push(d.ref, d.__c || g, d)), h == null && g != null && (h = g), 4 & d.__u ? (c = wE(d, c, e), f.__e && (f.__e = null)) : typeof d.type == "function" && m !== void 0 ? c = m : g && (c = g.nextSibling), d.__u &= -7);
27417
+ var p, f, d, m, h, g, w = i && i.__k || lu, y = t.length;
27418
+ for (c = PN(n, t, w, c, y), p = 0; p < y; p++) (d = n.__k[p]) != null && (f = d.__i != -1 && w[d.__i] || cu, d.__i = p, g = cg(e, d, f, o, r, a, s, c, l, u), m = d.__e, d.ref && f.ref != d.ref && (f.ref && lg(f.ref, null, d), u.push(d.ref, d.__c || m, d)), h == null && m != null && (h = m), 4 & d.__u ? (c = wE(d, c, e), f.__e && (f.__e = null)) : typeof d.type == "function" && g !== void 0 ? c = g : m && (c = m.nextSibling), d.__u &= -7);
27418
27419
  return n.__e = h, c;
27419
27420
  }
27420
27421
  function PN(e, t, n, i, o) {
@@ -27475,29 +27476,29 @@ function cx(e) {
27475
27476
  };
27476
27477
  }
27477
27478
  function cg(e, t, n, i, o, r, a, s, c, l) {
27478
- var u, p, f, d, g, h, m, w, y, v, b, E, R, D, P, T, $ = t.type;
27479
+ var u, p, f, d, m, h, g, w, y, v, b, E, R, D, P, T, $ = t.type;
27479
27480
  if (t.constructor !== void 0) return null;
27480
27481
  128 & n.__u && (c = !!(32 & n.__u), r = [s = t.__e = n.__e]), (u = Yt.__b) && u(t);
27481
27482
  e: if (typeof $ == "function") {
27482
27483
  p = a.length;
27483
27484
  try {
27484
- if (y = t.props, v = $.prototype && $.prototype.render, b = (u = $.contextType) && i[u.__c], E = u ? b ? b.props.value : u.__ : i, n.__c ? w = (f = t.__c = n.__c).__ = f.__E : (v ? t.__c = f = new $(y, E) : (t.__c = f = new $l(y, E), f.constructor = $, f.render = ON), b && b.sub(f), f.state || (f.state = {}), f.__n = i, d = f.__d = !0, f.__h = [], f._sb = []), v && f.__s == null && (f.__s = f.state), v && $.getDerivedStateFromProps != null && (f.__s == f.state && (f.__s = wo({}, f.__s)), wo(f.__s, $.getDerivedStateFromProps(y, f.__s))), g = f.props, h = f.state, f.__v = t, d) v && $.getDerivedStateFromProps == null && f.componentWillMount != null && f.componentWillMount(), v && f.componentDidMount != null && f.__h.push(f.componentDidMount);
27485
+ if (y = t.props, v = $.prototype && $.prototype.render, b = (u = $.contextType) && i[u.__c], E = u ? b ? b.props.value : u.__ : i, n.__c ? w = (f = t.__c = n.__c).__ = f.__E : (v ? t.__c = f = new $(y, E) : (t.__c = f = new $l(y, E), f.constructor = $, f.render = ON), b && b.sub(f), f.state || (f.state = {}), f.__n = i, d = f.__d = !0, f.__h = [], f._sb = []), v && f.__s == null && (f.__s = f.state), v && $.getDerivedStateFromProps != null && (f.__s == f.state && (f.__s = wo({}, f.__s)), wo(f.__s, $.getDerivedStateFromProps(y, f.__s))), m = f.props, h = f.state, f.__v = t, d) v && $.getDerivedStateFromProps == null && f.componentWillMount != null && f.componentWillMount(), v && f.componentDidMount != null && f.__h.push(f.componentDidMount);
27485
27486
  else {
27486
- if (v && $.getDerivedStateFromProps == null && y !== g && f.componentWillReceiveProps != null && f.componentWillReceiveProps(y, E), t.__v == n.__v || !f.__e && f.shouldComponentUpdate != null && f.shouldComponentUpdate(y, f.__s, E) === !1) {
27487
+ if (v && $.getDerivedStateFromProps == null && y !== m && f.componentWillReceiveProps != null && f.componentWillReceiveProps(y, E), t.__v == n.__v || !f.__e && f.shouldComponentUpdate != null && f.shouldComponentUpdate(y, f.__s, E) === !1) {
27487
27488
  t.__v != n.__v && (f.props = y, f.state = f.__s, f.__d = !1), t.__e = n.__e, t.__k = n.__k, t.__k.some(function(j) {
27488
27489
  j && (j.__ = t);
27489
27490
  }), lu.push.apply(f.__h, f._sb), f._sb = [], f.__h.length && a.push(f), s = Vr(n);
27490
27491
  break e;
27491
27492
  }
27492
27493
  f.componentWillUpdate != null && f.componentWillUpdate(y, f.__s, E), v && f.componentDidUpdate != null && f.__h.push(function() {
27493
- f.componentDidUpdate(g, h, m);
27494
+ f.componentDidUpdate(m, h, g);
27494
27495
  });
27495
27496
  }
27496
27497
  if (f.context = E, f.props = y, f.__P = e, f.__e = !1, R = Yt.__r, D = 0, v) f.state = f.__s, f.__d = !1, R && R(t), u = f.render(f.props, f.state, f.context), lu.push.apply(f.__h, f._sb), f._sb = [];
27497
27498
  else do
27498
27499
  f.__d = !1, R && R(t), u = f.render(f.props, f.state, f.context), f.state = f.__s;
27499
27500
  while (f.__d && ++D < 25);
27500
- f.state = f.__s, f.getChildContext != null && (i = wo(wo({}, i), f.getChildContext())), v && !d && f.getSnapshotBeforeUpdate != null && (m = f.getSnapshotBeforeUpdate(g, h)), P = u != null && u.type === cp && u.key == null ? SE(u.props.children) : u, s = bE(e, sp(P) ? P : [P], t, n, i, o, r, a, s, c, l), f.base = t.__e, t.__u &= -161, f.__h.length && a.push(f), w && (f.__E = f.__ = null);
27501
+ f.state = f.__s, f.getChildContext != null && (i = wo(wo({}, i), f.getChildContext())), v && !d && f.getSnapshotBeforeUpdate != null && (g = f.getSnapshotBeforeUpdate(m, h)), P = u != null && u.type === cp && u.key == null ? SE(u.props.children) : u, s = bE(e, sp(P) ? P : [P], t, n, i, o, r, a, s, c, l), f.base = t.__e, t.__u &= -161, f.__h.length && a.push(f), w && (f.__E = f.__ = null);
27501
27502
  } catch (j) {
27502
27503
  if (a.length = p, t.__v = null, c || r != null) {
27503
27504
  if (j.then) {
@@ -27529,7 +27530,7 @@ function SE(e) {
27529
27530
  return typeof e != "object" || e == null || e.__b > 0 ? e : sp(e) ? e.map(SE) : e.constructor !== void 0 ? null : wo({}, e);
27530
27531
  }
27531
27532
  function kN(e, t, n, i, o, r, a, s, c) {
27532
- var l, u, p, f, d, g, h, m = n.props || cu, w = t.props, y = t.type;
27533
+ var l, u, p, f, d, m, h, g = n.props || cu, w = t.props, y = t.type;
27533
27534
  if (y == "svg" ? o = "http://www.w3.org/2000/svg" : y == "math" ? o = "http://www.w3.org/1998/Math/MathML" : o || (o = "http://www.w3.org/1999/xhtml"), r != null) {
27534
27535
  for (l = 0; l < r.length; l++) if ((d = r[l]) && "setAttribute" in d == !!y && (y ? d.localName == y : d.nodeType == 3)) {
27535
27536
  e = d, r[l] = null;
@@ -27540,14 +27541,14 @@ function kN(e, t, n, i, o, r, a, s, c) {
27540
27541
  if (y == null) return document.createTextNode(w);
27541
27542
  e = document.createElementNS(o, y, w.is && w), s && (Yt.__m && Yt.__m(t, r), s = !1), r = null;
27542
27543
  }
27543
- if (y == null) m === w || s && e.data == w || (e.data = w);
27544
+ if (y == null) g === w || s && e.data == w || (e.data = w);
27544
27545
  else {
27545
- if (r = y == "textarea" && w.defaultValue != null ? null : r && ap.call(e.childNodes), !s && r != null) for (m = {}, l = 0; l < e.attributes.length; l++) m[(d = e.attributes[l]).name] = d.value;
27546
- for (l in m) d = m[l], l == "dangerouslySetInnerHTML" ? p = d : l == "children" || l in w || l == "value" && "defaultValue" in w || l == "checked" && "defaultChecked" in w || hl(e, l, null, d, o);
27547
- for (l in w) d = w[l], l == "children" ? f = d : l == "dangerouslySetInnerHTML" ? u = d : l == "value" ? g = d : l == "checked" ? h = d : s && typeof d != "function" || m[l] === d || hl(e, l, d, m[l], o);
27546
+ if (r = y == "textarea" && w.defaultValue != null ? null : r && ap.call(e.childNodes), !s && r != null) for (g = {}, l = 0; l < e.attributes.length; l++) g[(d = e.attributes[l]).name] = d.value;
27547
+ for (l in g) d = g[l], l == "dangerouslySetInnerHTML" ? p = d : l == "children" || l in w || l == "value" && "defaultValue" in w || l == "checked" && "defaultChecked" in w || hl(e, l, null, d, o);
27548
+ for (l in w) d = w[l], l == "children" ? f = d : l == "dangerouslySetInnerHTML" ? u = d : l == "value" ? m = d : l == "checked" ? h = d : s && typeof d != "function" || g[l] === d || hl(e, l, d, g[l], o);
27548
27549
  if (u) s || p && (u.__html == p.__html || u.__html == e.innerHTML) || (e.innerHTML = u.__html), t.__k = [];
27549
27550
  else if (p && (e.innerHTML = ""), bE(t.type == "template" ? e.content : e, sp(f) ? f : [f], t, n, i, y == "foreignObject" ? "http://www.w3.org/1999/xhtml" : o, r, a, r ? r[0] : n.__k && Vr(n, 0), s, c), r != null) for (l = r.length; l--; ) sg(r[l]);
27550
- s && y != "textarea" || (l = "value", y == "progress" && g == null ? e.removeAttribute("value") : g != null && (g !== e[l] || y == "progress" && !g || y == "option" && g != m[l]) && hl(e, l, g, m[l], o), l = "checked", h != null && h != e[l] && hl(e, l, h, m[l], o));
27551
+ s && y != "textarea" || (l = "value", y == "progress" && m == null ? e.removeAttribute("value") : m != null && (m !== e[l] || y == "progress" && !m || y == "option" && m != g[l]) && hl(e, l, m, g[l], o), l = "checked", h != null && h != e[l] && hl(e, l, h, g[l], o));
27551
27552
  }
27552
27553
  return e;
27553
27554
  }
@@ -27639,8 +27640,8 @@ function LN(e, t, n) {
27639
27640
  if (i.__c.__H.__.some(function(d) {
27640
27641
  if (d.__N) {
27641
27642
  u = !0;
27642
- var g = d.__[0];
27643
- d.__ = d.__N, d.__N = void 0, g !== d.__[0] && (p = !0);
27643
+ var m = d.__[0];
27644
+ d.__ = d.__N, d.__N = void 0, m !== d.__[0] && (p = !0);
27644
27645
  }
27645
27646
  }), r) {
27646
27647
  var f = r.call(this, s, c, l);
@@ -27967,14 +27968,14 @@ function zN(e) {
27967
27968
  const h = p.current;
27968
27969
  if (!h)
27969
27970
  return;
27970
- const m = h.querySelector(".selected");
27971
- m && GN(m);
27971
+ const g = h.querySelector(".selected");
27972
+ g && GN(g);
27972
27973
  }, [t]);
27973
27974
  const f = () => {
27974
27975
  o.current = !1;
27975
27976
  }, d = (h) => {
27976
27977
  o.current || n(h);
27977
- }, g = () => {
27978
+ }, m = () => {
27978
27979
  o.current || n(null);
27979
27980
  };
27980
27981
  return kt`
@@ -28000,14 +28001,14 @@ function zN(e) {
28000
28001
  role="group"
28001
28002
  aria-labelledby=${h.name ? vx(r, h) : void 0}
28002
28003
  >
28003
- ${h.entries.map((m) => kt`
28004
+ ${h.entries.map((g) => kt`
28004
28005
  <${HN}
28005
- key=${m.id}
28006
+ key=${g.id}
28006
28007
  idPrefix=${r}
28007
- entry=${m}
28008
- selected=${m === t}
28009
- onMouseEnter=${() => d(m)}
28010
- onMouseLeave=${g}
28008
+ entry=${g}
28009
+ selected=${g === t}
28010
+ onMouseEnter=${() => d(g)}
28011
+ onMouseLeave=${m}
28011
28012
  ...${u}
28012
28013
  />
28013
28014
  `)}
@@ -28041,10 +28042,10 @@ function WN(e) {
28041
28042
  searchFn: p,
28042
28043
  entries: f,
28043
28044
  onOpened: d,
28044
- onClosed: g
28045
- } = e, [h, m] = af([]);
28045
+ onClosed: m
28046
+ } = e, [h, g] = af([]);
28046
28047
  Fl(() => {
28047
- m([]);
28048
+ g([]);
28048
28049
  }, [f]);
28049
28050
  const [w, y] = af(""), v = w.trim().length > 0, b = xo(() => YN(f), [f]), E = xo(() => mn(l) ? b.length > 5 : !1, [l, b]), R = xo(() => {
28050
28051
  const q = h.length ? h[h.length - 1].entries : f;
@@ -28063,7 +28064,7 @@ function WN(e) {
28063
28064
  let ve = Z.indexOf(P) + q;
28064
28065
  ve < 0 && (ve = Z.length - 1), ve >= Z.length && (ve = 0), j.current = !0, T(Z[ve]);
28065
28066
  }, [D, P]), te = ms((q) => {
28066
- q > 0 && P && P.entries && (j.current = !0, m((Z) => [...Z, P])), q < 0 && h.length > 0 && (j.current = !0, $.current = h[h.length + q], m((Z) => Z.slice(0, q)));
28067
+ q > 0 && P && P.entries && (j.current = !0, g((Z) => [...Z, P])), q < 0 && h.length > 0 && (j.current = !0, $.current = h[h.length + q], g((Z) => Z.slice(0, q)));
28067
28068
  }, [P, h]), be = ms((q, Z, ce) => {
28068
28069
  if (!(!Z || Z.disabled))
28069
28070
  return Z.entries ? (q.preventDefault(), te(1)) : n(q, Z, ce);
@@ -28089,7 +28090,7 @@ function WN(e) {
28089
28090
  Df(q.target, "input") && y(() => q.target.value);
28090
28091
  }, [y]);
28091
28092
  Fl(() => (d(), () => {
28092
- g();
28093
+ m();
28093
28094
  }), []);
28094
28095
  const K = !v && h.length > 0, oe = (a || o.length > 0) && !K;
28095
28096
  return kt`
@@ -28115,7 +28116,7 @@ function WN(e) {
28115
28116
  ${K && kt`
28116
28117
  <${BN}
28117
28118
  navigationStack=${h}
28118
- setNavigationStack=${m}
28119
+ setNavigationStack=${g}
28119
28120
  />
28120
28121
  `}
28121
28122
  ${f.length > 0 && kt`
@@ -28306,7 +28307,7 @@ Zt.prototype._render = function() {
28306
28307
  kt`
28307
28308
  <${WN}
28308
28309
  onClose=${(f) => this.close(f)}
28309
- onSelect=${(f, d, g) => this.trigger(f, d, g)}
28310
+ onSelect=${(f, d, m) => this.trigger(f, d, m)}
28310
28311
  position=${c}
28311
28312
  className=${t}
28312
28313
  entries=${a}
@@ -28644,7 +28645,7 @@ function Sx(e, t) {
28644
28645
  ].join("|"), a = new RegExp(r, "ig");
28645
28646
  let s, c = 0;
28646
28647
  for (; s = a.exec(e); ) {
28647
- const [u] = s, p = s.index, f = s.index + u.length, d = p === 0, g = f === e.length, h = !!((l = s.groups) != null && l.all), m = d || /\s/.test(e.charAt(p - 1)), w = g || /\s/.test(e.charAt(f));
28648
+ const [u] = s, p = s.index, f = s.index + u.length, d = p === 0, m = f === e.length, h = !!((l = s.groups) != null && l.all), g = d || /\s/.test(e.charAt(p - 1)), w = m || /\s/.test(e.charAt(f));
28648
28649
  s.index > c && n.push({
28649
28650
  value: e.slice(c, s.index),
28650
28651
  index: c
@@ -28652,10 +28653,10 @@ function Sx(e, t) {
28652
28653
  value: u,
28653
28654
  index: s.index,
28654
28655
  match: !0,
28655
- wordStart: m,
28656
+ wordStart: g,
28656
28657
  wordEnd: w,
28657
28658
  start: d,
28658
- end: g,
28659
+ end: m,
28659
28660
  all: h
28660
28661
  });
28661
28662
  const y = h ? t : [u];
@@ -29009,7 +29010,7 @@ function jE(e, t, n, i, o) {
29009
29010
  cn(b);
29010
29011
  });
29011
29012
  }
29012
- function g(v) {
29013
+ function m(v) {
29013
29014
  z(Ns("." + $E, v), function(b) {
29014
29015
  cn(b);
29015
29016
  });
@@ -29018,9 +29019,9 @@ function jE(e, t, n, i, o) {
29018
29019
  var b = l(v);
29019
29020
  return b || (b = l(v, !0), p(b, v), f(b, v)), b;
29020
29021
  }
29021
- function m(v) {
29022
+ function g(v) {
29022
29023
  var b = l(v);
29023
- b && (g(b), d(b), f(b, v), p(b, v));
29024
+ b && (m(b), d(b), f(b, v), p(b, v));
29024
29025
  }
29025
29026
  function w(v, b) {
29026
29027
  var E = St(".floating", v), R = b.point;
@@ -29037,7 +29038,7 @@ function jE(e, t, n, i, o) {
29037
29038
  }), In(G, J.x, J.y));
29038
29039
  }
29039
29040
  e.on("connection.changed", function(v) {
29040
- m(v.element);
29041
+ g(v.element);
29041
29042
  }), e.on("connection.remove", function(v) {
29042
29043
  var b = l(v.element);
29043
29044
  b && cn(b);
@@ -29078,7 +29079,7 @@ function jE(e, t, n, i, o) {
29078
29079
  var R = l(b);
29079
29080
  R && Se(R, { "data-element-id": E });
29080
29081
  }
29081
- }), this.addHandles = h, this.updateHandles = m, this.getBendpointsContainer = l, this.getSegmentDragger = u;
29082
+ }), this.addHandles = h, this.updateHandles = g, this.getBendpointsContainer = l, this.getSegmentDragger = u;
29082
29083
  }
29083
29084
  jE.$inject = [
29084
29085
  "eventBus",
@@ -29093,30 +29094,30 @@ function hB(e) {
29093
29094
  var Rx = Math.round, Lr = "reconnectStart", Ir = "reconnectEnd", ys = "updateWaypoints";
29094
29095
  function fg(e, t, n, i, o, r) {
29095
29096
  this._injector = e, this.start = function(a, s, c, l) {
29096
- var u = n.getGraphics(s), p = s.source, f = s.target, d = s.waypoints, g;
29097
- !l && c === 0 ? g = Lr : !l && c === d.length - 1 ? g = Ir : g = ys;
29098
- var h = g === ys ? "connection.updateWaypoints" : "connection.reconnect", m = o.allowed(h, {
29097
+ var u = n.getGraphics(s), p = s.source, f = s.target, d = s.waypoints, m;
29098
+ !l && c === 0 ? m = Lr : !l && c === d.length - 1 ? m = Ir : m = ys;
29099
+ var h = m === ys ? "connection.updateWaypoints" : "connection.reconnect", g = o.allowed(h, {
29099
29100
  connection: s,
29100
29101
  source: p,
29101
29102
  target: f
29102
29103
  });
29103
- if (m === !1 && (m = o.allowed(h, {
29104
+ if (g === !1 && (g = o.allowed(h, {
29104
29105
  connection: s,
29105
29106
  source: f,
29106
29107
  target: p
29107
- })), m !== !1)
29108
+ })), g !== !1)
29108
29109
  return i.init(a, "bendpoint.move", {
29109
29110
  data: {
29110
29111
  connection: s,
29111
29112
  connectionGfx: u,
29112
29113
  context: {
29113
- allowed: m,
29114
+ allowed: g,
29114
29115
  bendpointIndex: c,
29115
29116
  connection: s,
29116
29117
  source: p,
29117
29118
  target: f,
29118
29119
  insert: l,
29119
- type: g
29120
+ type: m
29120
29121
  }
29121
29122
  }
29122
29123
  });
@@ -29125,8 +29126,8 @@ function fg(e, t, n, i, o, r) {
29125
29126
  s.hover = p;
29126
29127
  var d;
29127
29128
  if (p) {
29128
- var g = f === ys ? "connection.updateWaypoints" : "connection.reconnect";
29129
- if (d = s.allowed = o.allowed(g, {
29129
+ var m = f === ys ? "connection.updateWaypoints" : "connection.reconnect";
29130
+ if (d = s.allowed = o.allowed(m, {
29130
29131
  connection: c,
29131
29132
  source: f === Lr ? p : l,
29132
29133
  target: f === Ir ? p : u
@@ -29134,7 +29135,7 @@ function fg(e, t, n, i, o, r) {
29134
29135
  s.source = f === Lr ? p : l, s.target = f === Ir ? p : u;
29135
29136
  return;
29136
29137
  }
29137
- d === !1 && (d = s.allowed = o.allowed(g, {
29138
+ d === !1 && (d = s.allowed = o.allowed(m, {
29138
29139
  connection: c,
29139
29140
  source: f === Ir ? p : u,
29140
29141
  target: f === Lr ? p : l
@@ -29144,16 +29145,16 @@ function fg(e, t, n, i, o, r) {
29144
29145
  var s = a.context, c = s.type;
29145
29146
  s.hover = null, s.source = null, s.target = null, c !== ys && (s.allowed = !1);
29146
29147
  }), t.on("bendpoint.move.end", function(a) {
29147
- var s = a.context, c = s.allowed, l = s.bendpointIndex, u = s.connection, p = s.insert, f = u.waypoints.slice(), d = s.source, g = s.target, h = s.type, m = s.hints || {}, w = {
29148
+ var s = a.context, c = s.allowed, l = s.bendpointIndex, u = s.connection, p = s.insert, f = u.waypoints.slice(), d = s.source, m = s.target, h = s.type, g = s.hints || {}, w = {
29148
29149
  x: Rx(a.x),
29149
29150
  y: Rx(a.y)
29150
29151
  };
29151
29152
  if (!c)
29152
29153
  return !1;
29153
- h === ys ? (p ? f.splice(l, 0, w) : f[l] = w, m.bendpointMove = {
29154
+ h === ys ? (p ? f.splice(l, 0, w) : f[l] = w, g.bendpointMove = {
29154
29155
  insert: p,
29155
29156
  bendpointIndex: l
29156
- }, f = this.cropWaypoints(u, f), r.updateWaypoints(u, dT(f), m)) : (h === Lr ? (m.docking = "source", du(s) && (m.docking = "target", m.newWaypoints = f.reverse())) : h === Ir && (m.docking = "target", du(s) && (m.docking = "source", m.newWaypoints = f.reverse())), r.reconnect(u, d, g, w, m));
29157
+ }, f = this.cropWaypoints(u, f), r.updateWaypoints(u, dT(f), g)) : (h === Lr ? (g.docking = "source", du(s) && (g.docking = "target", g.newWaypoints = f.reverse())) : h === Ir && (g.docking = "target", du(s) && (g.docking = "source", g.newWaypoints = f.reverse())), r.reconnect(u, d, m, w, g));
29157
29158
  }, this);
29158
29159
  }
29159
29160
  fg.$inject = [
@@ -29201,8 +29202,8 @@ function HE(e, t, n, i) {
29201
29202
  var a = r.context, s = a.hover, c = a.target;
29202
29203
  s && (i.removeMarker(s, Mx), i.removeMarker(s, c ? vs : gl));
29203
29204
  }), n.on("bendpoint.move.move", function(r) {
29204
- var a = r.context, s = a.allowed, c = a.bendpointIndex, l = a.draggerGfx, u = a.hover, p = a.type, f = a.connection, d = f.source, g = f.target, h = f.waypoints.slice(), m = { x: r.x, y: r.y }, w = a.hints || {}, y = {};
29205
- o && (w.connectionStart && (y.connectionStart = w.connectionStart), w.connectionEnd && (y.connectionEnd = w.connectionEnd), p === gB ? du(a) ? (y.connectionEnd = y.connectionEnd || m, y.source = g, y.target = u || d, h = h.reverse()) : (y.connectionStart = y.connectionStart || m, y.source = u || d, y.target = g) : p === mB ? du(a) ? (y.connectionStart = y.connectionStart || m, y.source = u || g, y.target = d, h = h.reverse()) : (y.connectionEnd = y.connectionEnd || m, y.source = d, y.target = u || g) : (y.noCropping = !0, y.noLayout = !0, h[c] = m), p === Cx && (h = e.cropWaypoints(f, h)), y.waypoints = h, o.drawPreview(a, s, y)), In(l, r.x, r.y);
29205
+ var a = r.context, s = a.allowed, c = a.bendpointIndex, l = a.draggerGfx, u = a.hover, p = a.type, f = a.connection, d = f.source, m = f.target, h = f.waypoints.slice(), g = { x: r.x, y: r.y }, w = a.hints || {}, y = {};
29206
+ o && (w.connectionStart && (y.connectionStart = w.connectionStart), w.connectionEnd && (y.connectionEnd = w.connectionEnd), p === gB ? du(a) ? (y.connectionEnd = y.connectionEnd || g, y.source = m, y.target = u || d, h = h.reverse()) : (y.connectionStart = y.connectionStart || g, y.source = u || d, y.target = m) : p === mB ? du(a) ? (y.connectionStart = y.connectionStart || g, y.source = u || m, y.target = d, h = h.reverse()) : (y.connectionEnd = y.connectionEnd || g, y.source = d, y.target = u || m) : (y.noCropping = !0, y.noLayout = !0, h[c] = g), p === Cx && (h = e.cropWaypoints(f, h)), y.waypoints = h, o.drawPreview(a, s, y)), In(l, r.x, r.y);
29206
29207
  }, this), n.on([
29207
29208
  "bendpoint.move.end",
29208
29209
  "bendpoint.move.cancel"
@@ -29241,14 +29242,14 @@ function Lx(e, t, n) {
29241
29242
  function GE(e, t, n, i, o, r) {
29242
29243
  var a = e.get("connectionDocking", !1);
29243
29244
  this.start = function(p, f, d) {
29244
- var g, h = n.getGraphics(f), m = d - 1, w = d, y = f.waypoints, v = y[m], b = y[w], E = id(n, y, p), R, D, P;
29245
+ var m, h = n.getGraphics(f), g = d - 1, w = d, y = f.waypoints, v = y[g], b = y[w], E = id(n, y, p), R, D, P;
29245
29246
  if (R = bo(v, b), !!R)
29246
- return D = R === "v" ? "x" : "y", m === 0 && (v = Lx(v, f.source, D)), w === y.length - 1 && (b = Lx(b, f.target, D)), E ? P = E.point : P = {
29247
+ return D = R === "v" ? "x" : "y", g === 0 && (v = Lx(v, f.source, D)), w === y.length - 1 && (b = Lx(b, f.target, D)), E ? P = E.point : P = {
29247
29248
  x: (v.x + b.x) / 2,
29248
29249
  y: (v.y + b.y) / 2
29249
- }, g = {
29250
+ }, m = {
29250
29251
  connection: f,
29251
- segmentStartIndex: m,
29252
+ segmentStartIndex: g,
29252
29253
  segmentEndIndex: w,
29253
29254
  segmentStart: v,
29254
29255
  segmentEnd: b,
@@ -29259,40 +29260,40 @@ function GE(e, t, n, i, o, r) {
29259
29260
  data: {
29260
29261
  connection: f,
29261
29262
  connectionGfx: h,
29262
- context: g
29263
+ context: m
29263
29264
  }
29264
29265
  });
29265
29266
  };
29266
29267
  function s(p, f) {
29267
29268
  if (!a)
29268
29269
  return f;
29269
- var d = p.waypoints, g;
29270
- return p.waypoints = f, g = a.getCroppedWaypoints(p), p.waypoints = d, g;
29270
+ var d = p.waypoints, m;
29271
+ return p.waypoints = f, m = a.getCroppedWaypoints(p), p.waypoints = d, m;
29271
29272
  }
29272
29273
  function c(p) {
29273
29274
  o.update("connection", p.connection, p.connectionGfx);
29274
29275
  }
29275
29276
  function l(p, f, d) {
29276
- var g = p.newWaypoints, h = p.segmentStartIndex + f, m = g[h], w = p.segmentEndIndex + f, y = g[w], v = zE(p.axis), b = yB(d, m, y, v);
29277
+ var m = p.newWaypoints, h = p.segmentStartIndex + f, g = m[h], w = p.segmentEndIndex + f, y = m[w], v = zE(p.axis), b = yB(d, g, y, v);
29277
29278
  In(p.draggerGfx, b.x, b.y);
29278
29279
  }
29279
29280
  function u(p, f) {
29280
- var d = 0, g = p.filter(function(h, m) {
29281
- return Fd(p[m - 1], p[m + 1], h) ? (d = m <= f ? d - 1 : d, !1) : !0;
29281
+ var d = 0, m = p.filter(function(h, g) {
29282
+ return Fd(p[g - 1], p[g + 1], h) ? (d = g <= f ? d - 1 : d, !1) : !0;
29282
29283
  });
29283
29284
  return {
29284
- waypoints: g,
29285
+ waypoints: m,
29285
29286
  segmentOffset: d
29286
29287
  };
29287
29288
  }
29288
29289
  t.on("connectionSegment.move.start", function(p) {
29289
- var f = p.context, d = p.connection, g = n.getLayer("overlays");
29290
- f.originalWaypoints = d.waypoints.slice(), f.draggerGfx = FE(g, f.segmentStart, f.segmentEnd), ct(f.draggerGfx).add("djs-dragging"), n.addMarker(d, Ox);
29290
+ var f = p.context, d = p.connection, m = n.getLayer("overlays");
29291
+ f.originalWaypoints = d.waypoints.slice(), f.draggerGfx = FE(m, f.segmentStart, f.segmentEnd), ct(f.draggerGfx).add("djs-dragging"), n.addMarker(d, Ox);
29291
29292
  }), t.on("connectionSegment.move.move", function(p) {
29292
- var f = p.context, d = f.connection, g = f.segmentStartIndex, h = f.segmentEndIndex, m = f.segmentStart, w = f.segmentEnd, y = f.axis, v = f.originalWaypoints.slice(), b = Dx(m, y, p["d" + y]), E = Dx(w, y, p["d" + y]), R = v.length, D = 0;
29293
- v[g] = b, v[h] = E;
29293
+ var f = p.context, d = f.connection, m = f.segmentStartIndex, h = f.segmentEndIndex, g = f.segmentStart, w = f.segmentEnd, y = f.axis, v = f.originalWaypoints.slice(), b = Dx(g, y, p["d" + y]), E = Dx(w, y, p["d" + y]), R = v.length, D = 0;
29294
+ v[m] = b, v[h] = E;
29294
29295
  var P, T;
29295
- g < 2 && (P = Nn(d.source, b), g === 1 ? P === "intersect" && (v.shift(), v[0] = b, D--) : P !== "intersect" && (v.unshift(m), D++)), h > R - 3 && (T = Nn(d.target, E), h === R - 2 ? T === "intersect" && (v.pop(), v[v.length - 1] = E) : T !== "intersect" && v.push(w)), f.newWaypoints = d.waypoints = s(d, v), l(f, D, p), f.newSegmentStartIndex = g + D, c(p);
29296
+ m < 2 && (P = Nn(d.source, b), m === 1 ? P === "intersect" && (v.shift(), v[0] = b, D--) : P !== "intersect" && (v.unshift(g), D++)), h > R - 3 && (T = Nn(d.target, E), h === R - 2 ? T === "intersect" && (v.pop(), v[v.length - 1] = E) : T !== "intersect" && v.push(w)), f.newWaypoints = d.waypoints = s(d, v), l(f, D, p), f.newSegmentStartIndex = m + D, c(p);
29296
29297
  }), t.on("connectionSegment.move.hover", function(p) {
29297
29298
  p.context.hover = p.hover, n.addMarker(p.hover, kx);
29298
29299
  }), t.on([
@@ -29311,15 +29312,15 @@ function GE(e, t, n, i, o, r) {
29311
29312
  var f = p.context, d = f.connection;
29312
29313
  d.waypoints = f.originalWaypoints, c(p);
29313
29314
  }), t.on("connectionSegment.move.end", function(p) {
29314
- var f = p.context, d = f.connection, g = f.newWaypoints, h = f.newSegmentStartIndex;
29315
- g = g.map(function(E) {
29315
+ var f = p.context, d = f.connection, m = f.newWaypoints, h = f.newSegmentStartIndex;
29316
+ m = m.map(function(E) {
29316
29317
  return {
29317
29318
  original: E.original,
29318
29319
  x: Math.round(E.x),
29319
29320
  y: Math.round(E.y)
29320
29321
  };
29321
29322
  });
29322
- var m = u(g, h), w = m.waypoints, y = s(d, w), v = m.segmentOffset, b = {
29323
+ var g = u(m, h), w = g.waypoints, y = s(d, w), v = g.segmentOffset, b = {
29323
29324
  segmentMove: {
29324
29325
  segmentStartIndex: f.segmentStartIndex,
29325
29326
  newSegmentStartIndex: h + v
@@ -29403,7 +29404,7 @@ function qE(e) {
29403
29404
  };
29404
29405
  }
29405
29406
  function i(r) {
29406
- var a = r.context, s = a.snapPoints, c = a.connection, l = c.waypoints, u = a.segmentStart, p = a.segmentStartIndex, f = a.segmentEnd, d = a.segmentEndIndex, g = a.axis;
29407
+ var a = r.context, s = a.snapPoints, c = a.connection, l = c.waypoints, u = a.segmentStart, p = a.segmentStartIndex, f = a.segmentEnd, d = a.segmentEndIndex, m = a.axis;
29407
29408
  if (s)
29408
29409
  return s;
29409
29410
  var h = [
@@ -29412,8 +29413,8 @@ function qE(e) {
29412
29413
  f,
29413
29414
  l[d + 1]
29414
29415
  ];
29415
- return p < 2 && h.unshift(n(c.source, r)), d > l.length - 3 && h.unshift(n(c.target, r)), a.snapPoints = s = { horizontal: [], vertical: [] }, z(h, function(m) {
29416
- m && (m = m.original || m, g === "y" && s.horizontal.push(m.y), g === "x" && s.vertical.push(m.x));
29416
+ return p < 2 && h.unshift(n(c.source, r)), d > l.length - 3 && h.unshift(n(c.target, r)), a.snapPoints = s = { horizontal: [], vertical: [] }, z(h, function(g) {
29417
+ g && (g = g.original || g, m === "y" && s.horizontal.push(g.y), m === "x" && s.vertical.push(g.x));
29417
29418
  }), s;
29418
29419
  }
29419
29420
  e.on("connectionSegment.move.move", 1500, function(r) {
@@ -29449,13 +29450,13 @@ function qE(e) {
29449
29450
  var a = r.context, s = o(a), c = a.hover, l = c && n(c, r), u = r.x, p = r.y, f, d;
29450
29451
  if (s) {
29451
29452
  f = t(l ? s.vertical.concat([l.x]) : s.vertical, u), d = t(l ? s.horizontal.concat([l.y]) : s.horizontal, p);
29452
- var g = u - f, h = p - d;
29453
+ var m = u - f, h = p - d;
29453
29454
  Y(r, {
29454
- dx: r.dx - g,
29455
+ dx: r.dx - m,
29455
29456
  dy: r.dy - h,
29456
- x: r.x - g,
29457
+ x: r.x - m,
29457
29458
  y: r.y - h
29458
- }), (g || s.vertical.indexOf(u) !== -1) && sn(r, "x", f), (h || s.horizontal.indexOf(p) !== -1) && sn(r, "y", d);
29459
+ }), (m || s.vertical.indexOf(u) !== -1) && sn(r, "x", f), (h || s.horizontal.indexOf(p) !== -1) && sn(r, "y", d);
29459
29460
  }
29460
29461
  });
29461
29462
  }
@@ -29501,11 +29502,11 @@ function YE(e, t, n, i) {
29501
29502
  }, p = s.source, f = s.target;
29502
29503
  if (!c)
29503
29504
  return !1;
29504
- var d = null, g = {
29505
+ var d = null, m = {
29505
29506
  connectionStart: ad(s) ? u : l,
29506
29507
  connectionEnd: ad(s) ? l : u
29507
29508
  };
29508
- yn(c) && (d = c), s.connection = n.connect(p, f, d, g);
29509
+ yn(c) && (d = c), s.connection = n.connect(p, f, d, m);
29509
29510
  }), this.start = function(a, s, c, l) {
29510
29511
  yn(c) || (l = c, c = We(s)), t.init(a, "connect", {
29511
29512
  autoActivate: l,
@@ -29536,11 +29537,11 @@ function KE(e, t, n) {
29536
29537
  var r = o.context, a = r.canExecute, s = r.hover, c = r.source, l = r.start, u = r.startPosition, p = r.target, f = r.connectionStart || u, d = r.connectionEnd || {
29537
29538
  x: o.x,
29538
29539
  y: o.y
29539
- }, g = f, h = d;
29540
- ad(r) && (g = d, h = f), i.drawPreview(r, a, {
29540
+ }, m = f, h = d;
29541
+ ad(r) && (m = d, h = f), i.drawPreview(r, a, {
29541
29542
  source: c || l,
29542
29543
  target: p || s,
29543
- connectionStart: g,
29544
+ connectionStart: m,
29544
29545
  connectionEnd: h
29545
29546
  });
29546
29547
  }), t.on("connect.hover", EB, function(o) {
@@ -29585,9 +29586,9 @@ Lo.$inject = [
29585
29586
  ];
29586
29587
  Lo.prototype.drawPreview = function(e, t, n) {
29587
29588
  n = n || {};
29588
- var i = e.connectionPreviewGfx, o = e.getConnection, r = n.source, a = n.target, s = n.waypoints, c = n.connectionStart, l = n.connectionEnd, u = n.noLayout, p = n.noCropping, f = n.noNoop, d, g = this;
29589
- if (i || (i = e.connectionPreviewGfx = this.createConnectionPreviewGfx()), Zs(i), o || (o = e.getConnection = RB(function(h, m, w) {
29590
- return g.getConnection(h, m, w);
29589
+ var i = e.connectionPreviewGfx, o = e.getConnection, r = n.source, a = n.target, s = n.waypoints, c = n.connectionStart, l = n.connectionEnd, u = n.noLayout, p = n.noCropping, f = n.noNoop, d, m = this;
29590
+ if (i || (i = e.connectionPreviewGfx = this.createConnectionPreviewGfx()), Zs(i), o || (o = e.getConnection = RB(function(h, g, w) {
29591
+ return m.getConnection(h, g, w);
29591
29592
  })), t && (d = o(t, r, a)), !d) {
29592
29593
  !f && this.drawNoopPreview(i, n);
29593
29594
  return;
@@ -29864,8 +29865,8 @@ Vi.prototype._insertTextIE = function(e) {
29864
29865
  this.content.insertBefore(p, s[o]), c = p, l = p.textContent.length;
29865
29866
  } else {
29866
29867
  var f = s.indexOf(n), d = s.indexOf(i);
29867
- s.forEach(function(g, h) {
29868
- h === f ? g.textContent = n.textContent.substring(0, o) + e + i.textContent.substring(r) : h > f && h <= d && co(g);
29868
+ s.forEach(function(m, h) {
29869
+ h === f ? m.textContent = n.textContent.substring(0, o) + e + i.textContent.substring(r) : h > f && h <= d && co(m);
29869
29870
  }), c = n, l = o + e.length;
29870
29871
  }
29871
29872
  c && l !== void 0 && setTimeout(function() {
@@ -29890,21 +29891,21 @@ Vi.prototype.resizable = function() {
29890
29891
  n = this.resizeHandle = jt(
29891
29892
  '<div class="djs-direct-editing-resize-handle"></div>'
29892
29893
  );
29893
- var s, c, l, u, p = function(g) {
29894
- cf(g), Ds(g), s = g.clientX, c = g.clientY;
29894
+ var s, c, l, u, p = function(m) {
29895
+ cf(m), Ds(m), s = m.clientX, c = m.clientY;
29895
29896
  var h = t.getBoundingClientRect();
29896
29897
  l = h.width, u = h.height, Fe.bind(document, "mousemove", f), Fe.bind(document, "mouseup", d);
29897
- }, f = function(g) {
29898
- cf(g), Ds(g);
29899
- var h = jx(Hx(l + g.clientX - s, i), r), m = jx(Hx(u + g.clientY - c, o), a);
29900
- t.style.width = h + "px", t.style.height = m + "px", e.resizeHandler({
29898
+ }, f = function(m) {
29899
+ cf(m), Ds(m);
29900
+ var h = jx(Hx(l + m.clientX - s, i), r), g = jx(Hx(u + m.clientY - c, o), a);
29901
+ t.style.width = h + "px", t.style.height = g + "px", e.resizeHandler({
29901
29902
  width: l,
29902
29903
  height: u,
29903
- dx: g.clientX - s,
29904
- dy: g.clientY - c
29904
+ dx: m.clientX - s,
29905
+ dy: m.clientY - c
29905
29906
  });
29906
- }, d = function(g) {
29907
- cf(g), Ds(g), Fe.unbind(document, "mousemove", f, !1), Fe.unbind(document, "mouseup", d, !1);
29907
+ }, d = function(m) {
29908
+ cf(m), Ds(m), Fe.unbind(document, "mousemove", f, !1), Fe.unbind(document, "mouseup", d, !1);
29908
29909
  };
29909
29910
  Fe.bind(n, "mousedown", p);
29910
29911
  }
@@ -31066,10 +31067,10 @@ const ZB = {
31066
31067
  };
31067
31068
  function bc(e, t, n, i, o, r, a, s, c, l, u, p, f) {
31068
31069
  e = e || {}, i.registerProvider(this), this._contextPad = i, this._modeling = o, this._elementFactory = r, this._connect = a, this._create = s, this._popupMenu = c, this._canvas = l, this._rules = u, this._translate = p, this._eventBus = n, this._appendPreview = f, e.autoPlace !== !1 && (this._autoPlace = t.get("autoPlace", !1)), n.on("create.end", 250, function(d) {
31069
- var g = d.context, h = g.shape;
31070
+ var m = d.context, h = m.shape;
31070
31071
  if (!(!Hs(d) || !i.isOpen(h))) {
31071
- var m = i.getEntries(h);
31072
- m.replace && m.replace.action.click(d, h);
31072
+ var g = i.getEntries(h);
31073
+ g.replace && g.replace.action.click(d, h);
31073
31074
  }
31074
31075
  }), n.on("contextPad.close", function() {
31075
31076
  f.cleanUp();
@@ -31114,7 +31115,7 @@ bc.prototype._isDeleteAllowed = function(e) {
31114
31115
  bc.prototype.getContextPadEntries = function(e) {
31115
31116
  var t = this._contextPad, n = this._modeling, i = this._elementFactory, o = this._connect, r = this._create, a = this._popupMenu, s = this._autoPlace, c = this._translate, l = this._appendPreview, u = {};
31116
31117
  if (e.type === "label")
31117
- return this._isDeleteAllowed([e]) && Y(u, g()), u;
31118
+ return this._isDeleteAllowed([e]) && Y(u, m()), u;
31118
31119
  var p = e.businessObject;
31119
31120
  function f(v, b) {
31120
31121
  o.start(v, b);
@@ -31122,7 +31123,7 @@ bc.prototype.getContextPadEntries = function(e) {
31122
31123
  function d(v, b) {
31123
31124
  n.removeElements([b]);
31124
31125
  }
31125
- function g() {
31126
+ function m() {
31126
31127
  return {
31127
31128
  delete: {
31128
31129
  group: "edit",
@@ -31141,7 +31142,7 @@ bc.prototype.getContextPadEntries = function(e) {
31141
31142
  };
31142
31143
  return D;
31143
31144
  }
31144
- function m(v, b, E, R) {
31145
+ function g(v, b, E, R) {
31145
31146
  function D($, j) {
31146
31147
  var G = i.createShape(Y({ type: v }, R));
31147
31148
  r.start($, G, {
@@ -31217,37 +31218,37 @@ bc.prototype.getContextPadEntries = function(e) {
31217
31218
  });
31218
31219
  }
31219
31220
  return A(p, "bpmn:FlowNode") && (A(p, "bpmn:EventBasedGateway") ? Y(u, {
31220
- "append.receive-task": m(
31221
+ "append.receive-task": g(
31221
31222
  "bpmn:ReceiveTask",
31222
31223
  "bpmn-icon-receive-task",
31223
31224
  c("Append receive task")
31224
31225
  ),
31225
- "append.message-intermediate-event": m(
31226
+ "append.message-intermediate-event": g(
31226
31227
  "bpmn:IntermediateCatchEvent",
31227
31228
  "bpmn-icon-intermediate-event-catch-message",
31228
31229
  c("Append message intermediate catch event"),
31229
31230
  { eventDefinitionType: "bpmn:MessageEventDefinition" }
31230
31231
  ),
31231
- "append.timer-intermediate-event": m(
31232
+ "append.timer-intermediate-event": g(
31232
31233
  "bpmn:IntermediateCatchEvent",
31233
31234
  "bpmn-icon-intermediate-event-catch-timer",
31234
31235
  c("Append timer intermediate catch event"),
31235
31236
  { eventDefinitionType: "bpmn:TimerEventDefinition" }
31236
31237
  ),
31237
- "append.condition-intermediate-event": m(
31238
+ "append.condition-intermediate-event": g(
31238
31239
  "bpmn:IntermediateCatchEvent",
31239
31240
  "bpmn-icon-intermediate-event-catch-condition",
31240
31241
  c("Append conditional intermediate catch event"),
31241
31242
  { eventDefinitionType: "bpmn:ConditionalEventDefinition" }
31242
31243
  ),
31243
- "append.signal-intermediate-event": m(
31244
+ "append.signal-intermediate-event": g(
31244
31245
  "bpmn:IntermediateCatchEvent",
31245
31246
  "bpmn-icon-intermediate-event-catch-signal",
31246
31247
  c("Append signal intermediate catch event"),
31247
31248
  { eventDefinitionType: "bpmn:SignalEventDefinition" }
31248
31249
  )
31249
31250
  }) : Vx(p, "bpmn:BoundaryEvent", "bpmn:CompensateEventDefinition") ? Y(u, {
31250
- "append.compensation-activity": m(
31251
+ "append.compensation-activity": g(
31251
31252
  "bpmn:Task",
31252
31253
  "bpmn-icon-task",
31253
31254
  c("Append compensation activity"),
@@ -31256,22 +31257,22 @@ bc.prototype.getContextPadEntries = function(e) {
31256
31257
  }
31257
31258
  )
31258
31259
  }) : !A(p, "bpmn:EndEvent") && !p.isForCompensation && !Vx(p, "bpmn:IntermediateThrowEvent", "bpmn:LinkEventDefinition") && !Gn(p) && Y(u, {
31259
- "append.end-event": m(
31260
+ "append.end-event": g(
31260
31261
  "bpmn:EndEvent",
31261
31262
  "bpmn-icon-end-event-none",
31262
31263
  c("Append end event")
31263
31264
  ),
31264
- "append.gateway": m(
31265
+ "append.gateway": g(
31265
31266
  "bpmn:ExclusiveGateway",
31266
31267
  "bpmn-icon-gateway-none",
31267
31268
  c("Append gateway")
31268
31269
  ),
31269
- "append.append-task": m(
31270
+ "append.append-task": g(
31270
31271
  "bpmn:Task",
31271
31272
  "bpmn-icon-task",
31272
31273
  c("Append task")
31273
31274
  ),
31274
- "append.intermediate-event": m(
31275
+ "append.intermediate-event": g(
31275
31276
  "bpmn:IntermediateThrowEvent",
31276
31277
  "bpmn-icon-intermediate-event-none",
31277
31278
  c("Append intermediate/boundary event")
@@ -31295,13 +31296,13 @@ bc.prototype.getContextPadEntries = function(e) {
31295
31296
  }
31296
31297
  }
31297
31298
  }), A(p, "bpmn:SequenceFlow") && Y(u, {
31298
- "append.text-annotation": m(
31299
+ "append.text-annotation": g(
31299
31300
  "bpmn:TextAnnotation",
31300
31301
  "bpmn-icon-text-annotation",
31301
31302
  c("Add text annotation")
31302
31303
  )
31303
31304
  }), A(p, "bpmn:MessageFlow") && Y(u, {
31304
- "append.text-annotation": m(
31305
+ "append.text-annotation": g(
31305
31306
  "bpmn:TextAnnotation",
31306
31307
  "bpmn-icon-text-annotation",
31307
31308
  c("Add text annotation")
@@ -31312,7 +31313,7 @@ bc.prototype.getContextPadEntries = function(e) {
31312
31313
  "bpmn:DataObjectReference",
31313
31314
  "bpmn:DataStoreReference"
31314
31315
  ]) && Y(u, {
31315
- "append.text-annotation": m(
31316
+ "append.text-annotation": g(
31316
31317
  "bpmn:TextAnnotation",
31317
31318
  "bpmn-icon-text-annotation",
31318
31319
  c("Add text annotation")
@@ -31347,12 +31348,12 @@ bc.prototype.getContextPadEntries = function(e) {
31347
31348
  }
31348
31349
  }
31349
31350
  }), A(p, "bpmn:Group") && Y(u, {
31350
- "append.text-annotation": m(
31351
+ "append.text-annotation": g(
31351
31352
  "bpmn:TextAnnotation",
31352
31353
  "bpmn-icon-text-annotation",
31353
31354
  c("Add text annotation")
31354
31355
  )
31355
- }), this._isDeleteAllowed([e]) && Y(u, g()), u;
31356
+ }), this._isDeleteAllowed([e]) && Y(u, m()), u;
31356
31357
  };
31357
31358
  function Vx(e, t, n) {
31358
31359
  var i = e.$instanceOf(t), o = !1, r = e.eventDefinitions || [];
@@ -31620,8 +31621,8 @@ dp.prototype._registerDefaultActions = function(e) {
31620
31621
  Ni.prototype._registerDefaultActions.call(this, e);
31621
31622
  var t = e.get("canvas", !1), n = e.get("elementRegistry", !1), i = e.get("selection", !1), o = e.get("spaceTool", !1), r = e.get("lassoTool", !1), a = e.get("handTool", !1), s = e.get("globalConnect", !1), c = e.get("distributeElements", !1), l = e.get("alignElements", !1), u = e.get("directEditing", !1), p = e.get("searchPad", !1), f = e.get("modeling", !1), d = e.get("contextPad", !1);
31622
31623
  t && n && i && this._registerAction("selectElements", function() {
31623
- var g = t.getRootElement(), h = n.filter(function(m) {
31624
- return m !== g;
31624
+ var m = t.getRootElement(), h = n.filter(function(g) {
31625
+ return g !== m;
31625
31626
  });
31626
31627
  return i.select(h), h;
31627
31628
  }), o && this._registerAction("spaceTool", function() {
@@ -31632,35 +31633,35 @@ dp.prototype._registerDefaultActions = function(e) {
31632
31633
  a.toggle();
31633
31634
  }), s && this._registerAction("globalConnectTool", function() {
31634
31635
  s.toggle();
31635
- }), i && c && this._registerAction("distributeElements", function(g) {
31636
- var h = i.get(), m = g.type;
31637
- h.length && c.trigger(h, m);
31638
- }), i && l && this._registerAction("alignElements", function(g) {
31639
- var h = i.get(), m = [], w = g.type;
31640
- h.length && (m = it(h, function(y) {
31636
+ }), i && c && this._registerAction("distributeElements", function(m) {
31637
+ var h = i.get(), g = m.type;
31638
+ h.length && c.trigger(h, g);
31639
+ }), i && l && this._registerAction("alignElements", function(m) {
31640
+ var h = i.get(), g = [], w = m.type;
31641
+ h.length && (g = it(h, function(y) {
31641
31642
  return !A(y, "bpmn:Lane");
31642
- }), l.trigger(m, w));
31643
- }), i && f && this._registerAction("setColor", function(g) {
31643
+ }), l.trigger(g, w));
31644
+ }), i && f && this._registerAction("setColor", function(m) {
31644
31645
  var h = i.get();
31645
- h.length && f.setColor(h, g);
31646
+ h.length && f.setColor(h, m);
31646
31647
  }), i && u && this._registerAction("directEditing", function() {
31647
- var g = i.get();
31648
- g.length && u.activate(g[0]);
31648
+ var m = i.get();
31649
+ m.length && u.activate(m[0]);
31649
31650
  }), p && this._registerAction("find", function() {
31650
31651
  p.toggle();
31651
31652
  }), t && f && this._registerAction("moveToOrigin", function() {
31652
- var g = t.getRootElement(), h, m;
31653
- A(g, "bpmn:Collaboration") ? m = n.filter(function(w) {
31653
+ var m = t.getRootElement(), h, g;
31654
+ A(m, "bpmn:Collaboration") ? g = n.filter(function(w) {
31654
31655
  return A(w.parent, "bpmn:Collaboration");
31655
- }) : m = n.filter(function(w) {
31656
- return w !== g && !A(w.parent, "bpmn:SubProcess");
31657
- }), h = ln(m), f.moveElements(
31658
- m,
31656
+ }) : g = n.filter(function(w) {
31657
+ return w !== m && !A(w.parent, "bpmn:SubProcess");
31658
+ }), h = ln(g), f.moveElements(
31659
+ g,
31659
31660
  { x: -h.x, y: -h.y },
31660
- g
31661
+ m
31661
31662
  );
31662
- }), i && d && this._registerAction("replaceElement", function(g) {
31663
- d.triggerEntry("replace", "click", g);
31663
+ }), i && d && this._registerAction("replaceElement", function(m) {
31664
+ d.triggerEntry("replace", "click", m);
31664
31665
  });
31665
31666
  };
31666
31667
  const r$ = {
@@ -32395,7 +32396,7 @@ Sc.prototype.getEditingBBox = function(e) {
32395
32396
  fontWeight: this._textRenderer.getDefaultStyle().fontWeight
32396
32397
  };
32397
32398
  if (A(e, "bpmn:Lane") || F$(e)) {
32398
- var g = wn(e), h = g ? {
32399
+ var m = wn(e), h = m ? {
32399
32400
  width: i.height,
32400
32401
  height: 30 * a,
32401
32402
  x: i.x - i.height / 2 + 15 * a,
@@ -32411,11 +32412,11 @@ Sc.prototype.getEditingBBox = function(e) {
32411
32412
  paddingBottom: 7 * a + "px",
32412
32413
  paddingLeft: 5 * a + "px",
32413
32414
  paddingRight: 5 * a + "px",
32414
- transform: g ? "rotate(-90deg)" : null
32415
+ transform: m ? "rotate(-90deg)" : null
32415
32416
  });
32416
32417
  }
32417
32418
  if ($$(e)) {
32418
- var m = wn(e), w = m ? {
32419
+ var g = wn(e), w = g ? {
32419
32420
  width: i.width,
32420
32421
  height: i.height
32421
32422
  } : {
@@ -32431,7 +32432,7 @@ Sc.prototype.getEditingBBox = function(e) {
32431
32432
  paddingBottom: 7 * a + "px",
32432
32433
  paddingLeft: 5 * a + "px",
32433
32434
  paddingRight: 5 * a + "px",
32434
- transform: m ? null : "rotate(-90deg)"
32435
+ transform: g ? null : "rotate(-90deg)"
32435
32436
  });
32436
32437
  }
32437
32438
  (nt(e, ["bpmn:Task", "bpmn:CallActivity"]) || l1(e)) && (Y(r, {
@@ -32713,17 +32714,17 @@ function p1(e, t, n, i, o) {
32713
32714
  s();
32714
32715
  }), e.on("selection.changed", function({ newSelection: p }) {
32715
32716
  var d;
32716
- const f = p.filter((g) => nt(g, ob));
32717
+ const f = p.filter((m) => nt(m, ob));
32717
32718
  if (f.length === 1) {
32718
- const g = f[0];
32719
- tt(g) ? a(g, g.labelTarget) : (d = g.labels) != null && d.length && a(g.labels[0], g);
32719
+ const m = f[0];
32720
+ tt(m) ? a(m, m.labelTarget) : (d = m.labels) != null && d.length && a(m.labels[0], m);
32720
32721
  }
32721
32722
  if (f.length === 2) {
32722
- const g = f.find(tt), h = f.find((m) => {
32723
+ const m = f.find(tt), h = f.find((g) => {
32723
32724
  var w;
32724
- return (w = m.labels) == null ? void 0 : w.includes(g);
32725
+ return (w = g.labels) == null ? void 0 : w.includes(m);
32725
32726
  });
32726
- g && h && a(g, h);
32727
+ m && h && a(m, h);
32727
32728
  }
32728
32729
  }), e.on("shape.changed", function({ element: p }) {
32729
32730
  var f;
@@ -32733,10 +32734,10 @@ function p1(e, t, n, i, o) {
32733
32734
  const d = Js(
32734
32735
  [We(f), We(p)],
32735
32736
  rb
32736
- ), g = d.getAttribute("d"), m = o.isSelected(p) ? c(p) : l(p), w = $s(m, g);
32737
+ ), m = d.getAttribute("d"), g = o.isSelected(p) ? c(p) : l(p), w = $s(g, m);
32737
32738
  if (!w)
32738
32739
  return;
32739
- const v = o.isSelected(f) ? c(f) : l(f), b = $s(v, g) || We(f);
32740
+ const v = o.isSelected(f) ? c(f) : l(f), b = $s(v, m) || We(f);
32740
32741
  js(b, w) < U$ || (Nd(d, [b, w]), Ke(r, d));
32741
32742
  }
32742
32743
  function s() {
@@ -32756,13 +32757,13 @@ function p1(e, t, n, i, o) {
32756
32757
  return Ff(d, Wo(f, "rx"));
32757
32758
  }
32758
32759
  if (f.cx) {
32759
- const d = Wo(f, "r"), g = {
32760
+ const d = Wo(f, "r"), m = {
32760
32761
  x: p.x + Wo(f, "cx") - d,
32761
32762
  y: p.y + Wo(f, "cy") - d,
32762
32763
  width: d * 2,
32763
32764
  height: d * 2
32764
32765
  };
32765
- return o_(g);
32766
+ return o_(m);
32766
32767
  }
32767
32768
  }
32768
32769
  function l(p) {
@@ -33041,8 +33042,8 @@ function g1(e, t, n, i) {
33041
33042
  if (!l.dragGroup) {
33042
33043
  var d = Le("g");
33043
33044
  Se(d, n.cls("djs-drag-group", ["no-events"]));
33044
- var g = t.getActiveLayer();
33045
- Ke(g, d), l.dragGroup = d;
33045
+ var m = t.getActiveLayer();
33046
+ Ke(m, d), l.dragGroup = d;
33046
33047
  }
33047
33048
  f.forEach(function(h) {
33048
33049
  i.addDragger(h, l.dragGroup);
@@ -33271,12 +33272,12 @@ function yr(e, t, n, i, o, r, a) {
33271
33272
  width: d.width,
33272
33273
  height: d.height
33273
33274
  });
33274
- var g = p.marked, h = p.lastMarked;
33275
- if (g && h) {
33276
- for (const m of h)
33277
- g.has(m) || t.removeMarker(m, fb);
33278
- for (const m of g)
33279
- h.has(m) || t.addMarker(m, fb);
33275
+ var m = p.marked, h = p.lastMarked;
33276
+ if (m && h) {
33277
+ for (const g of h)
33278
+ m.has(g) || t.removeMarker(g, fb);
33279
+ for (const g of m)
33280
+ h.has(g) || t.addMarker(g, fb);
33280
33281
  }
33281
33282
  },
33282
33283
  /**
@@ -33310,7 +33311,7 @@ function yr(e, t, n, i, o, r, a) {
33310
33311
  var f = p.context;
33311
33312
  f.bbox = db(p), f.add = ou(p), f.lastMarked = new Set(o.get()), f.add ? f.marked = f.lastMarked : f.marked = /* @__PURE__ */ new Set(), f.initialMarked = f.marked, c.create(f);
33312
33313
  }), e.on("lasso.move", function(p) {
33313
- var f = p.context, d = f.bbox = db(p), g = u(d), h = f.initialMarked.union(g);
33314
+ var f = p.context, d = f.bbox = db(p), m = u(d), h = f.initialMarked.union(m);
33314
33315
  f.lastMarked = f.marked, f.marked = h, c.update(f);
33315
33316
  }), e.on("lasso.cleanup", function(p) {
33316
33317
  var f = p.context;
@@ -33581,18 +33582,18 @@ xg.$inject = [
33581
33582
  ];
33582
33583
  xg.prototype.getPaletteEntries = function() {
33583
33584
  var e = {}, t = this._create, n = this._elementFactory, i = this._spaceTool, o = this._lassoTool, r = this._handTool, a = this._globalConnect, s = this._translate;
33584
- function c(p, f, d, g, h) {
33585
- function m(w) {
33585
+ function c(p, f, d, m, h) {
33586
+ function g(w) {
33586
33587
  var y = n.createShape(Y({ type: p }, h));
33587
33588
  t.start(w, y);
33588
33589
  }
33589
33590
  return {
33590
33591
  group: f,
33591
33592
  className: d,
33592
- title: g,
33593
+ title: m,
33593
33594
  action: {
33594
- dragstart: m,
33595
- click: m
33595
+ dragstart: g,
33596
+ click: g
33596
33597
  }
33597
33598
  };
33598
33599
  }
@@ -33757,8 +33758,8 @@ function bg(e, t, n, i, o) {
33757
33758
  Y(p, { x: f.x, y: f.y });
33758
33759
  var d = n.createShape(p);
33759
33760
  i.addShape(d, f.parent);
33760
- var g = St('[data-element-id="' + Gr(f.id) + '"]', s.dragGroup);
33761
- g && Se(g, { display: "none" });
33761
+ var m = St('[data-element-id="' + Gr(f.id) + '"]', s.dragGroup);
33762
+ m && Se(m, { display: "none" });
33762
33763
  var h = o.addDragger(d, s.dragGroup);
33763
33764
  s.visualReplacements[u] = h, i.removeShape(d);
33764
33765
  }
@@ -34587,10 +34588,10 @@ function Fn(e, t, n, i, o) {
34587
34588
  return function(f) {
34588
34589
  var d = gf(f);
34589
34590
  (!r._state._svgClientRect || Sl(r._state._svgClientRect)) && (r._state._svgClientRect = r._svg.getBoundingClientRect()), u && a(d);
34590
- var g = El({
34591
+ var m = El({
34591
34592
  x: d.x - r._state._svgClientRect.left,
34592
34593
  y: d.y - r._state._svgClientRect.top
34593
- }, r._svg, r._lastViewbox), h = i.viewbox(), m = p3(g, h), w = r._viewportDom.getBoundingClientRect(), y = {
34594
+ }, r._svg, r._lastViewbox), h = i.viewbox(), g = p3(m, h), w = r._viewportDom.getBoundingClientRect(), y = {
34594
34595
  x: d.x - w.left + 1,
34595
34596
  y: d.y - w.top + 1
34596
34597
  };
@@ -34601,7 +34602,7 @@ function Fn(e, t, n, i, o) {
34601
34602
  y: d.y
34602
34603
  },
34603
34604
  isDragging: !0,
34604
- offsetViewport: m,
34605
+ offsetViewport: g,
34605
34606
  offsetViewportDom: y,
34606
34607
  viewportClientRect: r._viewport.getBoundingClientRect(),
34607
34608
  parentClientRect: r._parent.getBoundingClientRect()
@@ -34612,27 +34613,27 @@ function Fn(e, t, n, i, o) {
34612
34613
  var p = gf(u);
34613
34614
  if (r._state.isDragging) {
34614
34615
  (!r._state._svgClientRect || Sl(r._state._svgClientRect)) && (r._state._svgClientRect = r._svg.getBoundingClientRect());
34615
- var f = r._state.offsetViewportDom, d = r._state.viewportClientRect, g = r._state.parentClientRect;
34616
+ var f = r._state.offsetViewportDom, d = r._state.viewportClientRect, m = r._state.parentClientRect;
34616
34617
  Y(r._viewportDom.style, {
34617
- top: p.y - f.y - g.top + "px",
34618
- left: p.x - f.x - g.left + "px"
34618
+ top: p.y - f.y - m.top + "px",
34619
+ left: p.x - f.x - m.left + "px"
34619
34620
  });
34620
- var h = C1(g, {
34621
- top: p.y - f.y - g.top,
34622
- left: p.x - f.x - g.left,
34621
+ var h = C1(m, {
34622
+ top: p.y - f.y - m.top,
34623
+ left: p.x - f.x - m.left,
34623
34624
  width: d.width,
34624
34625
  height: d.height
34625
34626
  });
34626
34627
  Y(r._overlay.style, {
34627
34628
  clipPath: h
34628
34629
  });
34629
- var m = El({
34630
+ var g = El({
34630
34631
  x: p.x - r._state._svgClientRect.left,
34631
34632
  y: p.y - r._state._svgClientRect.top
34632
34633
  }, r._svg, r._lastViewbox);
34633
34634
  hf({
34634
- x: m.x - r._state.offsetViewport.x,
34635
- y: m.y - r._state.offsetViewport.y
34635
+ x: g.x - r._state.offsetViewport.x,
34636
+ y: g.y - r._state.offsetViewport.y
34636
34637
  }, r._canvas);
34637
34638
  }
34638
34639
  }
@@ -34652,9 +34653,9 @@ function Fn(e, t, n, i, o) {
34652
34653
  Math.pow(u.deltaY, 2) + Math.pow(u.deltaX, 2)
34653
34654
  ) * y3(u.deltaY) * -p;
34654
34655
  if (r._state.zoomDelta += f, Math.abs(r._state.zoomDelta) > a3) {
34655
- var d = f > 0 ? 1 : -1, g = Math.log(i.zoom()) / Math.log(10), h = v3(Rb, r3 * 2), m = Math.round(g / h) * h;
34656
- m += h * d;
34657
- var w = Math.pow(10, m);
34656
+ var d = f > 0 ? 1 : -1, m = Math.log(i.zoom()) / Math.log(10), h = v3(Rb, r3 * 2), g = Math.round(m / h) * h;
34657
+ g += h * d;
34658
+ var w = Math.pow(10, g);
34658
34659
  i.zoom(x3(Rb, w), y), r._state.zoomDelta = 0;
34659
34660
  var y = El({
34660
34661
  x: u.clientX - r._state._svgClientRect.left,
@@ -35103,9 +35104,9 @@ const _3 = {
35103
35104
  controller: {}
35104
35105
  },
35105
35106
  setup(e) {
35106
- const n = e.controller, i = bs(() => HI(n.issues.value, n.describeElement)), o = bs(() => zI(i.value)), r = (g) => Vs(g, n.changeScope.value), a = bs(() => X0(i.value, n.changeScope.value)), s = _a({ error: !0, warning: !0, info: !0 }), c = bs(
35107
+ const n = e.controller, i = bs(() => HI(n.issues.value, n.describeElement)), o = bs(() => zI(i.value)), r = (m) => Vs(m, n.changeScope.value), a = bs(() => X0(i.value, n.changeScope.value)), s = _a({ error: !0, warning: !0, info: !0 }), c = bs(
35107
35108
  () => GI(
35108
- i.value.filter((g) => s.value[g.severity]),
35109
+ i.value.filter((m) => s.value[m.severity]),
35109
35110
  n.changeScope.value
35110
35111
  )
35111
35112
  ), l = _a(!1), u = ["error", "warning", "info"], p = {
@@ -35113,23 +35114,23 @@ const _3 = {
35113
35114
  warning: "경고",
35114
35115
  info: "정보"
35115
35116
  };
35116
- function f(g) {
35117
+ function f(m) {
35117
35118
  if (!l.value) {
35118
35119
  l.value = !0;
35119
35120
  return;
35120
35121
  }
35121
- s.value[g] = !s.value[g];
35122
+ s.value[m] = !s.value[m];
35122
35123
  }
35123
- function d(g) {
35124
- const h = g.targetRefs[0];
35124
+ function d(m) {
35125
+ const h = m.targetRefs[0];
35125
35126
  h && n.requestFocus(h);
35126
35127
  }
35127
- return (g, h) => (kn(), On("section", {
35128
+ return (m, h) => (kn(), On("section", {
35128
35129
  class: ws(["bwl-validation", { "is-open": l.value }])
35129
35130
  }, [
35130
35131
  wi("header", {
35131
35132
  class: "bwl-validation__head",
35132
- onClick: h[1] || (h[1] = (m) => l.value = !l.value)
35133
+ onClick: h[1] || (h[1] = (g) => l.value = !l.value)
35133
35134
  }, [
35134
35135
  wi("button", {
35135
35136
  type: "button",
@@ -35158,12 +35159,12 @@ const _3 = {
35158
35159
  onClick: h[0] || (h[0] = dS(() => {
35159
35160
  }, ["stop"]))
35160
35161
  }, [
35161
- (kn(), On(mf, null, yf(u, (m) => wi("button", {
35162
- key: m,
35162
+ (kn(), On(mf, null, yf(u, (g) => wi("button", {
35163
+ key: g,
35163
35164
  type: "button",
35164
- class: ws(["bwl-validation__count", [`is-${m}`, { "is-off": !s.value[m] }]]),
35165
- title: l.value ? `${p[m]} ${s.value[m] ? "숨기기" : "보이기"}` : "검증 패널 펼치기",
35166
- onClick: (w) => f(m)
35165
+ class: ws(["bwl-validation__count", [`is-${g}`, { "is-off": !s.value[g] }]]),
35166
+ title: l.value ? `${p[g]} ${s.value[g] ? "숨기기" : "보이기"}` : "검증 패널 펼치기",
35167
+ onClick: (w) => f(g)
35167
35168
  }, [
35168
35169
  (kn(), On("svg", C3, [
35169
35170
  h[4] || (h[4] = wi("circle", {
@@ -35174,29 +35175,29 @@ const _3 = {
35174
35175
  stroke: "currentColor",
35175
35176
  "stroke-width": "1.5"
35176
35177
  }, null, -1)),
35177
- m === "error" ? (kn(), On("path", M3)) : (kn(), On("path", A3))
35178
+ g === "error" ? (kn(), On("path", M3)) : (kn(), On("path", A3))
35178
35179
  ])),
35179
- wi("span", null, Ms(o.value[m]), 1)
35180
+ wi("span", null, Ms(o.value[g]), 1)
35180
35181
  ], 10, R3)), 64))
35181
35182
  ])
35182
35183
  ]),
35183
35184
  l.value ? (kn(), On("div", P3, [
35184
35185
  i.value.length === 0 ? (kn(), On("p", T3, "발견된 문제가 없습니다.")) : c.value.length === 0 ? (kn(), On("p", k3, " 선택한 심각도에 해당하는 항목이 없습니다. ")) : (kn(), On("ul", O3, [
35185
- (kn(!0), On(mf, null, yf(c.value, (m) => (kn(), On("li", {
35186
- key: m.key,
35187
- class: ws(["bwl-validation__item", [`is-${m.severity}`, { "is-clickable": m.targetRefs.length > 0 }]]),
35188
- onClick: (w) => d(m)
35186
+ (kn(!0), On(mf, null, yf(c.value, (g) => (kn(), On("li", {
35187
+ key: g.key,
35188
+ class: ws(["bwl-validation__item", [`is-${g.severity}`, { "is-clickable": g.targetRefs.length > 0 }]]),
35189
+ onClick: (w) => d(g)
35189
35190
  }, [
35190
35191
  h[5] || (h[5] = wi("span", {
35191
35192
  class: "bwl-validation__dot",
35192
35193
  "aria-hidden": "true"
35193
35194
  }, null, -1)),
35194
- a.value && r(m) ? (kn(), On("span", L3, "이번 변경")) : Gl("", !0),
35195
- wi("span", I3, Ms(m.message), 1),
35195
+ a.value && r(g) ? (kn(), On("span", L3, "이번 변경")) : Gl("", !0),
35196
+ wi("span", I3, Ms(g.message), 1),
35196
35197
  wi("span", {
35197
35198
  class: "bwl-validation__cat",
35198
- title: m.code
35199
- }, Ms(m.category), 9, N3)
35199
+ title: g.code
35200
+ }, Ms(g.category), 9, N3)
35200
35201
  ], 10, D3))), 128))
35201
35202
  ]))
35202
35203
  ])) : Gl("", !0)