@edubeam/plot 0.3.1 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -542,45 +542,51 @@ var D = (e, t) => {
542
542
  }, Ge = 256, Ke = 48, qe = (e, t, n) => {
543
543
  let r = [];
544
544
  for (let i of e) {
545
- if (i.kind !== "path" || !(i.obstacle || i.shield && (n.shields?.has(i.group) ?? !0))) continue;
546
- let e = i.obstacle ? null : i.group, a = i.width / 2 + 1, o = null;
545
+ if (i.kind !== "path" || !(i.obstacle || i.keptOffBy || i.shield && (n.shields?.has(i.group) ?? !0))) continue;
546
+ let e = i.obstacle ? null : i.group, a = i.keptOffBy, o = !i.obstacle && !i.shield, s = i.width / 2 + 1, c = null;
547
547
  for (let n of i.segments) {
548
548
  if (n.op === "Z") continue;
549
- let s = K(t, n.p);
550
- if (n.op === "A" && o) {
551
- let [c, l] = K(t, n.center), u = Math.atan2(o[1] - l, o[0] - c), d = Math.atan2(s[1] - l, s[0] - c);
552
- n.clockwise && d < u && (d += 2 * Math.PI), !n.clockwise && d > u && (d -= 2 * Math.PI);
553
- let f = o;
549
+ let l = K(t, n.p);
550
+ if (n.op === "A" && c) {
551
+ let [u, d] = K(t, n.center), f = Math.atan2(c[1] - d, c[0] - u), p = Math.atan2(l[1] - d, l[0] - u);
552
+ n.clockwise && p < f && (p += 2 * Math.PI), !n.clockwise && p > f && (p -= 2 * Math.PI);
553
+ let m = c;
554
554
  for (let t = 1; t <= 12; t++) {
555
- let o = u + (d - u) * t / 12, s = [c + n.r * Math.cos(o), l + n.r * Math.sin(o)];
555
+ let c = f + (p - f) * t / 12, l = [u + n.r * Math.cos(c), d + n.r * Math.sin(c)];
556
556
  r.push([
557
- f,
557
+ m,
558
+ l,
558
559
  s,
559
- a,
560
560
  e,
561
- i.group
562
- ]), f = s;
561
+ i.group,
562
+ a,
563
+ o
564
+ ]), m = l;
563
565
  }
564
- } else if (n.op === "C" && o) {
565
- let [c, l] = [K(t, n.c1), K(t, n.c2)], u = o;
566
+ } else if (n.op === "C" && c) {
567
+ let [u, d] = [K(t, n.c1), K(t, n.c2)], f = c;
566
568
  for (let t = 1; t <= 12; t++) {
567
- let n = t / 12, d = 1 - n, f = [d * d * d * o[0] + 3 * d * d * n * c[0] + 3 * d * n * n * l[0] + n * n * n * s[0], d * d * d * o[1] + 3 * d * d * n * c[1] + 3 * d * n * n * l[1] + n * n * n * s[1]];
569
+ let n = t / 12, p = 1 - n, m = [p * p * p * c[0] + 3 * p * p * n * u[0] + 3 * p * n * n * d[0] + n * n * n * l[0], p * p * p * c[1] + 3 * p * p * n * u[1] + 3 * p * n * n * d[1] + n * n * n * l[1]];
568
570
  r.push([
569
- u,
570
571
  f,
571
- a,
572
+ m,
573
+ s,
572
574
  e,
573
- i.group
574
- ]), u = f;
575
+ i.group,
576
+ a,
577
+ o
578
+ ]), f = m;
575
579
  }
576
- } else o && n.op !== "M" && r.push([
577
- o,
580
+ } else c && n.op !== "M" && r.push([
581
+ c,
582
+ l,
578
583
  s,
579
- a,
580
584
  e,
581
- i.group
585
+ i.group,
586
+ a,
587
+ o
582
588
  ]);
583
- o = s;
589
+ c = l;
584
590
  }
585
591
  }
586
592
  let i = n.alternativeGroups ?? /* @__PURE__ */ new Set(), a = e.flatMap((e, t) => e.kind === "text" ? [{
@@ -608,13 +614,13 @@ var D = (e, t) => {
608
614
  maxY: a.maxY + 1
609
615
  };
610
616
  if (u.near(o, p).some((t) => _(t.group, e.group) && Ve(t.box, a, 1))) return null;
611
- let [c, l] = K(t, e.at), h = -(e.rotate ?? 0) * Math.PI / 180, v = Math.cos(h), y = Math.sin(h), b = ([e, t]) => [(e - c) * v - (t - l) * y, (e - c) * y + (t - l) * v], x = Ne(e.text, e.size ?? n.fontSize, e.align, e.baseline, e.sub), ee = (t, n) => (!s?.has(n) || n === e.group) && (t === null || !r && t !== e.group && !i.has(e.group)), te = {
617
+ let [c, l] = K(t, e.at), h = -(e.rotate ?? 0) * Math.PI / 180, v = Math.cos(h), y = Math.sin(h), b = ([e, t]) => [(e - c) * v - (t - l) * y, (e - c) * y + (t - l) * v], x = Ne(e.text, e.size ?? n.fontSize, e.align, e.baseline, e.sub), ee = (t, n, a, o) => a?.includes(e.group) === !0 || !o && (!s?.has(n) || n === e.group) && (t === null || !r && t !== e.group && !i.has(e.group)), te = {
612
618
  minX: a.minX - f,
613
619
  maxX: a.maxX + f,
614
620
  minY: a.minY - f,
615
621
  maxY: a.maxY + f
616
622
  };
617
- return d.near(te, m).some(([e, t, n, r, i]) => ee(r, i) && Ue(b(e), b(t), {
623
+ return d.near(te, m).some(([e, t, n, r, i, a, o]) => ee(r, i, a, o) && Ue(b(e), b(t), {
618
624
  minX: x.x0 - n + 1,
619
625
  maxX: x.x1 + n - 1,
620
626
  minY: x.y0 - n + 2,
@@ -1054,6 +1060,7 @@ var D = (e, t) => {
1054
1060
  dash: o.dash,
1055
1061
  cap: "butt",
1056
1062
  obstacle: o.obstacle,
1063
+ keptOffBy: o.keptOffBy,
1057
1064
  segments: [{
1058
1065
  op: "M",
1059
1066
  p: G(t, n.x, n.y)
@@ -1069,6 +1076,7 @@ var D = (e, t) => {
1069
1076
  width: 0,
1070
1077
  fill: "tone",
1071
1078
  obstacle: o.obstacle,
1079
+ keptOffBy: o.keptOffBy,
1072
1080
  segments: [
1073
1081
  {
1074
1082
  op: "M",
@@ -1666,7 +1674,8 @@ var D = (e, t) => {
1666
1674
  width: r.pointShaft,
1667
1675
  head: r.pointHead,
1668
1676
  headWidth: r.pointHeadWidth,
1669
- obstacle: !0
1677
+ obstacle: !0,
1678
+ keptOffBy: St
1670
1679
  }), {
1671
1680
  ...jt("loads", m, p, 5, n, "load", Yt),
1672
1681
  weight: o ? 600 : void 0,
@@ -2461,7 +2470,13 @@ var D = (e, t) => {
2461
2470
  alternatives: v
2462
2471
  };
2463
2472
  });
2464
- }, wn = 3, Tn = (e, t, n) => e.members.flatMap((e) => {
2473
+ }, wn = 3, Tn = ["memberLabels"], En = [
2474
+ 0,
2475
+ 12,
2476
+ -12,
2477
+ 24,
2478
+ -24
2479
+ ], Dn = (e, t, n) => e.members.flatMap((e) => {
2465
2480
  let r = t.get(e.id);
2466
2481
  if (!r) return [];
2467
2482
  let i = Math.atan2(r.tz, r.tx) * 180 / Math.PI;
@@ -2469,22 +2484,17 @@ var D = (e, t) => {
2469
2484
  let a = i * Math.PI / 180, o = {
2470
2485
  x: Math.sin(a),
2471
2486
  y: -Math.cos(a)
2472
- }, s = r.nx * o.x + r.nz * o.y > 0 ? -1 : 1, c = n.member / 2 + 3, l = [];
2473
- for (let e of [s, -s]) for (let t of [
2474
- .5,
2475
- .4,
2476
- .6,
2477
- .3,
2478
- .7,
2479
- .2,
2480
- .8
2481
- ]) l.push({
2482
- at: Z(r, r.length * t, o.x * c * e, o.y * c * e),
2487
+ }, s = r.nx * o.x + r.nz * o.y > 0 ? -1 : 1, c = (e) => n.member / 2 + 3 + (e === s ? 0 : 3.5), l = {
2488
+ x: Math.cos(a),
2489
+ y: Math.sin(a)
2490
+ }, u = [];
2491
+ for (let e of En) for (let t of [s, -s]) u.push({
2492
+ at: Z(r, r.length / 2, o.x * c(t) * t + l.x * e, o.y * c(t) * t + l.y * e),
2483
2493
  align: "middle",
2484
- baseline: e > 0 ? "bottom" : "top",
2494
+ baseline: t > 0 ? "bottom" : "top",
2485
2495
  acrossDiagrams: !0
2486
2496
  });
2487
- let [u, ...d] = l;
2497
+ let [d, ...f] = u;
2488
2498
  return [{
2489
2499
  kind: "text",
2490
2500
  group: "memberLabels",
@@ -2492,19 +2502,19 @@ var D = (e, t) => {
2492
2502
  layer: U.label,
2493
2503
  tone: "ink",
2494
2504
  text: e.id,
2495
- ...u,
2505
+ ...d,
2496
2506
  priority: wn,
2497
2507
  rotate: i,
2498
- alternatives: d
2508
+ alternatives: f
2499
2509
  }];
2500
- }), En = (e, t) => {
2510
+ }), On = (e, t) => {
2501
2511
  let n = /* @__PURE__ */ new Map();
2502
2512
  return [...e].sort((e, t) => t.magnitude - e.magnitude).filter((e) => {
2503
2513
  if (e.members.some((e) => (n.get(e) ?? 0) >= t)) return !1;
2504
2514
  for (let t of e.members) n.set(t, (n.get(t) ?? 0) + 1);
2505
2515
  return !0;
2506
2516
  });
2507
- }, Dn = (e, t, n, r) => {
2517
+ }, kn = (e, t, n, r) => {
2508
2518
  let i = [], a = (t, r, i) => Z(e, t, n * (r * e.tx + i * e.nx), n * (r * e.tz + i * e.nz));
2509
2519
  return t.w.forEach((e, n) => {
2510
2520
  let r = t.u[n], o = Math.max(L(e) ?? 0, L(r) ?? 0), s = o <= 1 ? 1 : o <= 3 ? 2 : 6, c = (e.x1 - e.x0) / s;
@@ -2538,7 +2548,7 @@ var D = (e, t) => {
2538
2548
  cap: "round",
2539
2549
  segments: i
2540
2550
  };
2541
- }, On = (e, t, n) => {
2551
+ }, An = (e, t, n) => {
2542
2552
  let r = [];
2543
2553
  for (let i of e.members) {
2544
2554
  let e = n[i.id], a = t.get(i.id);
@@ -2575,7 +2585,7 @@ var D = (e, t) => {
2575
2585
  near: o
2576
2586
  }), !0);
2577
2587
  });
2578
- }, kn = (e, t) => {
2588
+ }, jn = (e, t) => {
2579
2589
  let n = Object.values(e.results?.members ?? {}), r = (e) => Math.max(0, ...n.map((t) => F(t[e]))), i = (e, n, r) => t.diagramScale?.[e] ?? (n > 0 ? r / n : 0);
2580
2590
  return {
2581
2591
  N: i("N", r("N"), t.diagramSize),
@@ -2583,10 +2593,10 @@ var D = (e, t) => {
2583
2593
  M: i("M", r("M"), t.diagramSize),
2584
2594
  w: i("w", Math.max(r("u"), r("w")), t.deformedSize)
2585
2595
  };
2586
- }, An = (e) => {
2596
+ }, Mn = (e) => {
2587
2597
  let t = Xe(e);
2588
2598
  return new Map(e.members.map((n) => [n.id, Ze(e, n, t)]));
2589
- }, jn = (e) => {
2599
+ }, Nn = (e) => {
2590
2600
  let t = e.results;
2591
2601
  if (!t) return null;
2592
2602
  let n = Object.values(t.members), r = (e) => Math.max(0, ...n.map((t) => F(t[e]))), [i, a, o] = [
@@ -2596,15 +2606,15 @@ var D = (e, t) => {
2596
2606
  ];
2597
2607
  if (i === 0 && a === 0 && o === 0) return "w";
2598
2608
  if (e.members.length > 0 && e.members.every((e) => e.hinges[0] && e.hinges[1])) return "N";
2599
- let s = An(e), c = [...s.values()].reduce((e, t) => e + t.length, 0) / Math.max(1, s.size);
2609
+ let s = Mn(e), c = [...s.values()].reduce((e, t) => e + t.length, 0) / Math.max(1, s.size);
2600
2610
  return !e.loads.some((e) => "member" in e) && o < .05 * i * c ? "N" : "M";
2601
- }, Mn = (e, t) => {
2602
- let n = An(e), r = new Set(t.freeNodes ? e.nodes.map((e) => e.id) : e.members.flatMap((e) => [e.start, e.end])), i = (e, n) => yt(e, n, t.numberFormat), a = {
2611
+ }, Pn = (e, t) => {
2612
+ let n = Mn(e), r = new Set(t.freeNodes ? e.nodes.map((e) => e.id) : e.members.flatMap((e) => [e.start, e.end])), i = (e, n) => yt(e, n, t.numberFormat), a = {
2603
2613
  ...t.compact ? Tt.compact : Tt.full,
2604
2614
  ...t.sizes
2605
2615
  }, { layers: o } = t, s = [], c = e.results;
2606
2616
  if (c) {
2607
- let r = kn(e, t), i = [], l = [];
2617
+ let r = jn(e, t), i = [], l = [];
2608
2618
  for (let a of [
2609
2619
  "N",
2610
2620
  "V",
@@ -2627,7 +2637,7 @@ var D = (e, t) => {
2627
2637
  }
2628
2638
  }
2629
2639
  let d = yn(e, n, c.members, a, r[a], u, t);
2630
- for (let e of t.compact ? En(d, 2) : d) {
2640
+ for (let e of t.compact ? On(d, 2) : d) {
2631
2641
  let t = Dt(e.members[0]);
2632
2642
  i.push({
2633
2643
  ...e.item,
@@ -2646,11 +2656,11 @@ var D = (e, t) => {
2646
2656
  for (let t of e.members) {
2647
2657
  let e = c.members[t.id];
2648
2658
  e && s.push({
2649
- ...Dn(It(n, t.id), e, r.w, a.deformed),
2659
+ ...kn(It(n, t.id), e, r.w, a.deformed),
2650
2660
  entity: Dt(t.id)
2651
2661
  });
2652
2662
  }
2653
- for (let i of On(e, n, c.members)) {
2663
+ for (let i of An(e, n, c.members)) {
2654
2664
  let e = It(n, i.member), a = {
2655
2665
  x: i.u * e.tx + i.w * e.nx,
2656
2666
  y: i.u * e.tz + i.w * e.nz
@@ -2710,15 +2720,18 @@ var D = (e, t) => {
2710
2720
  }
2711
2721
  }
2712
2722
  }
2713
- o.has("members") && s.push(...Bt(e, n, a), ...Vt(e, n, a)), o.has("supports") && s.push(...Ut(e, r, t.labelsAvoidSupports === !0, t.supportScale ?? 1)), (o.has("nodes") || o.has("nodeLabels")) && s.push(...Wt(e, r, o, a)), o.has("memberLabels") && s.push(...Tn(e, n, a)), o.has("dimensions") && s.push(...qt(e, n, t, i));
2723
+ o.has("members") && s.push(...Bt(e, n, a), ...Vt(e, n, a)), o.has("supports") && s.push(...Ut(e, r, t.labelsAvoidSupports === !0, t.supportScale ?? 1)), (o.has("nodes") || o.has("nodeLabels")) && s.push(...Wt(e, r, o, a)), o.has("memberLabels") && s.push(...Dn(e, n, a)), o.has("dimensions") && s.push(...qt(e, n, t, i));
2714
2724
  let l = t.loadNumberFormat ?? t.numberFormat, u = t.loadLabels === "ends" ? (e, t) => Y(e * t.scale, l) : (e, t) => yt(e, t, l);
2715
- if (o.has("loads") && s.push(...sn(e, n, t, a, u)), o.has("reactions")) {
2725
+ if (o.has("loads") && s.push(...sn(e, n, t, a, u).map((e) => e.kind === "path" && !e.hitArea ? {
2726
+ ...e,
2727
+ keptOffBy: [...e.keptOffBy ?? [], ...Tn]
2728
+ } : e)), o.has("reactions")) {
2716
2729
  let n = t.reactionLabels === "names" ? un(e) : c?.reactions;
2717
2730
  n && s.push(...dn(e, n, t, a));
2718
2731
  }
2719
2732
  return s;
2720
- }, Nn = (e) => St.filter((t) => e.has(t)).length > 1 ? /* @__PURE__ */ new Set() : new Set(St), Pn = (e, t, n, r = t.layers, i = [t.resultLabelMode ?? "horizontal"], a = []) => {
2721
- let o = n.fontSize, s = Nn(r), c = (n, r = t.resultLabelMode, i = t.reactionLabels) => Mn(e, {
2733
+ }, Fn = (e) => St.filter((t) => e.has(t)).length > 1 ? /* @__PURE__ */ new Set() : new Set(St), In = (e, t, n, r = t.layers, i = [t.resultLabelMode ?? "horizontal"], a = []) => {
2734
+ let o = n.fontSize, s = Fn(r), c = (n, r = t.resultLabelMode, i = t.reactionLabels) => Pn(e, {
2722
2735
  ...t,
2723
2736
  resultLabelMode: r,
2724
2737
  reactionLabels: i,
@@ -2745,18 +2758,18 @@ var D = (e, t) => {
2745
2758
  shields: new Set(St.filter((e) => r.has(e)))
2746
2759
  })
2747
2760
  };
2748
- }, Fn = {
2761
+ }, Ln = {
2749
2762
  M: 1,
2750
2763
  w: 2,
2751
2764
  V: 3,
2752
2765
  N: 4
2753
- }, In = (e, t, n = 0, r, i = []) => {
2766
+ }, Rn = (e, t, n = 0, r, i = []) => {
2754
2767
  let a = r === void 0 ? [] : [0, r], o = [...[...se(e.V), ...a].map((e) => ({
2755
2768
  p: e,
2756
2769
  rank: 0
2757
2770
  })), ...i.flatMap((t) => e[t].flatMap(R).map((e) => ({
2758
2771
  p: e,
2759
- rank: Fn[t]
2772
+ rank: Ln[t]
2760
2773
  })))], s = t, c = null;
2761
2774
  for (let { p: e, rank: r } of o) {
2762
2775
  let i = Math.abs(e - t);
@@ -2788,7 +2801,7 @@ var D = (e, t) => {
2788
2801
  w: u("w")
2789
2802
  }
2790
2803
  };
2791
- }, Ln = (e, t, n, r, i, a = []) => {
2804
+ }, zn = (e, t, n, r, i, a = []) => {
2792
2805
  let o = e.results?.members;
2793
2806
  if (!o) return null;
2794
2807
  let s = Xe(e), c = null;
@@ -2802,7 +2815,7 @@ var D = (e, t) => {
2802
2815
  });
2803
2816
  }
2804
2817
  if (!c || !o[c.member]) return null;
2805
- let l = 8 / t.s, u = c.frame, d = In(o[c.member], c.s * u.length, l, u.length, a), [f, p] = K(t, W(u.x + u.tx * d.x, u.z + u.tz * d.x));
2818
+ let l = 8 / t.s, u = c.frame, d = Rn(o[c.member], c.s * u.length, l, u.length, a), [f, p] = K(t, W(u.x + u.tx * d.x, u.z + u.tz * d.x));
2806
2819
  return {
2807
2820
  member: c.member,
2808
2821
  x: d.x,
@@ -2811,12 +2824,12 @@ var D = (e, t) => {
2811
2824
  values: d.values,
2812
2825
  u: d.u
2813
2826
  };
2814
- }, Rn = {
2827
+ }, Bn = {
2815
2828
  N: "normal",
2816
2829
  V: "shear",
2817
2830
  M: "moment",
2818
2831
  w: "deformed"
2819
- }, zn = (e, t, n, r, i, a) => {
2832
+ }, Vn = (e, t, n, r, i, a) => {
2820
2833
  let o = e.members.find((e) => e.id === n.member);
2821
2834
  if (!o) return [];
2822
2835
  let s = Ze(e, o, Xe(e)), c = s.x + s.tx * n.x, l = s.z + s.tz * n.x, u = K(t, W(c, l));
@@ -2825,28 +2838,28 @@ var D = (e, t) => {
2825
2838
  if (e === "w") {
2826
2839
  let e = n.values.w.right, r = i.w * (n.u * s.tx + e * s.nx), a = i.w * (n.u * s.tz + e * s.nz);
2827
2840
  return [{
2828
- tone: Rn.w,
2841
+ tone: Bn.w,
2829
2842
  from: u,
2830
2843
  to: K(t, W(c, l, r, a))
2831
2844
  }];
2832
2845
  }
2833
2846
  let { left: r, right: o } = n.values[e];
2834
2847
  return (Math.abs(r - o) > 1e-9 * Math.max(1, Math.abs(r), Math.abs(o)) ? [r, o] : [o]).map((n) => ({
2835
- tone: Rn[e],
2848
+ tone: Bn[e],
2836
2849
  from: u,
2837
2850
  to: K(t, W(c, l, s.nx * a[e] * i[e] * n, s.nz * a[e] * i[e] * n))
2838
2851
  }));
2839
2852
  });
2840
- }, Bn = {
2853
+ }, Hn = {
2841
2854
  N: "N",
2842
2855
  V: "V",
2843
2856
  M: "M",
2844
2857
  w: "w"
2845
- }, Vn = (e, t, n, r, i) => {
2858
+ }, Un = (e, t, n, r, i) => {
2846
2859
  let a = t === "M" ? n.moment : t === "w" ? n.displacement : n.force, { left: o, right: s } = e.values[t], c = (e) => i ? i(e * a.scale) : Y(e * a.scale, r), l = (e) => a.symbol ? `${c(e)}\u202f${a.symbol}` : c(e), u = c(o) === c(s) ? l(s) : `${c(o)} → ${l(s)}`;
2847
- return `${Bn[t]} = ${u}`;
2848
- }, Hn = (e, t, n) => e.minX < t.maxX + n && t.minX < e.maxX + n && e.minY < t.maxY + n && t.minY < e.maxY + n, Un = (e, t, n, r, i, a) => {
2849
- let o = i + 8, s = [], c = (e) => a !== void 0 && (e.minX < a.minX || e.minY < a.minY || e.maxX > a.maxX || e.maxY > a.maxY), l = (e) => c(e) || s.some((t) => Hn(t, e, 3)) || Ue([n[0][0], n[0][1]], [n[1][0], n[1][1]], {
2860
+ return `${Hn[t]} = ${u}`;
2861
+ }, Wn = (e, t, n) => e.minX < t.maxX + n && t.minX < e.maxX + n && e.minY < t.maxY + n && t.minY < e.maxY + n, Gn = (e, t, n, r, i, a) => {
2862
+ let o = i + 8, s = [], c = (e) => a !== void 0 && (e.minX < a.minX || e.minY < a.minY || e.maxX > a.maxX || e.maxY > a.maxY), l = (e) => c(e) || s.some((t) => Wn(t, e, 3)) || Ue([n[0][0], n[0][1]], [n[1][0], n[1][1]], {
2850
2863
  minX: e.minX - 2,
2851
2864
  maxX: e.maxX + 2,
2852
2865
  minY: e.minY - 2,
@@ -2913,7 +2926,7 @@ var D = (e, t) => {
2913
2926
  n && b.push(n);
2914
2927
  }
2915
2928
  return b;
2916
- }, Wn = {
2929
+ }, Kn = {
2917
2930
  ink: "var(--figure-ink, var(--ink, CanvasText))",
2918
2931
  paper: "var(--paper, Canvas)",
2919
2932
  muted: "var(--muted, GrayText)",
@@ -2926,19 +2939,19 @@ var D = (e, t) => {
2926
2939
  reaction: "var(--color-reaction, #a020f0)",
2927
2940
  tension: "var(--color-tension, var(--color-moment, #ff2222))",
2928
2941
  compression: "var(--color-compression, var(--color-normal, #2222ff))"
2929
- }, Gn = (e) => Object.fromEntries(Object.entries({
2930
- ...Wn,
2942
+ }, qn = (e) => Object.fromEntries(Object.entries({
2943
+ ...Kn,
2931
2944
  ...e
2932
- }).map(([e, t]) => [`--ebp-${e}`, t])), Kn = ".ebp-svg{display:block;max-width:100%;height:auto;overflow:visible;font-family:var(--ebp-font,var(--font-sans,inherit));font-variant-numeric:tabular-nums;-webkit-user-select:none;user-select:none}\n.ebp-svg text{paint-order:stroke;stroke:var(--ebp-paper);stroke-width:4px;stroke-linejoin:round}\n.ebp-svg text.ebp-nohalo{stroke:none}\n.ebp-svg .ebp-math{font-family:KaTeX_Main,'Latin Modern Roman',Georgia,serif}\n.ebp-svg .ebp-math tspan.ebp-var{font-family:KaTeX_Math,'Latin Modern Math',Georgia,serif;font-style:italic}\n.ebp-layer{opacity:0}\n.ebp-layer.ebp-on{opacity:1}\n.ebp-draw{stroke-dasharray:1;stroke-dashoffset:1}\n.ebp-on .ebp-draw{stroke-dashoffset:0}\n.ebp-animate .ebp-layer{transition:opacity .45s ease}\n.ebp-animate .ebp-draw{transition:stroke-dashoffset .6s cubic-bezier(.22,1,.36,1)}\n.ebp-handle{cursor:grab;outline:none}\n.ebp-handle.ebp-dragging{cursor:grabbing}\n.ebp-animate .ebp-grip,.ebp-stack .ebp-grip{transition:r .15s}\n.ebp-handle:hover .ebp-grip,.ebp-handle:focus-visible .ebp-grip,.ebp-handle.ebp-dragging .ebp-grip{r:11px}\n.ebp-handle:focus-visible .ebp-grip{stroke:var(--ebp-paper);stroke-width:3}\n.ebp-focus-ring{opacity:0}\n.ebp-handle:focus-visible .ebp-focus-ring{opacity:1}\n@media (prefers-reduced-motion:reduce){.ebp-stack .ebp-grip{transition:none}}\n@media (prefers-reduced-motion:reduce){.ebp-animate .ebp-layer,.ebp-animate .ebp-draw{transition:none}}", qn = {
2945
+ }).map(([e, t]) => [`--ebp-${e}`, t])), Jn = ".ebp-svg{display:block;max-width:100%;height:auto;overflow:visible;font-family:var(--ebp-font,var(--font-sans,inherit));font-variant-numeric:tabular-nums;-webkit-user-select:none;user-select:none}\n.ebp-svg text{paint-order:stroke;stroke:var(--ebp-paper);stroke-width:4px;stroke-linejoin:round}\n.ebp-svg text.ebp-nohalo{stroke:none}\n.ebp-svg .ebp-math{font-family:KaTeX_Main,'Latin Modern Roman',Georgia,serif}\n.ebp-svg .ebp-math tspan.ebp-var{font-family:KaTeX_Math,'Latin Modern Math',Georgia,serif;font-style:italic}\n.ebp-layer{opacity:0}\n.ebp-layer.ebp-on{opacity:1}\n.ebp-draw{stroke-dasharray:1;stroke-dashoffset:1}\n.ebp-on .ebp-draw{stroke-dashoffset:0}\n.ebp-animate .ebp-layer{transition:opacity .45s ease}\n.ebp-animate .ebp-draw{transition:stroke-dashoffset .6s cubic-bezier(.22,1,.36,1)}\n.ebp-handle{cursor:grab;outline:none}\n.ebp-handle.ebp-dragging{cursor:grabbing}\n.ebp-animate .ebp-grip,.ebp-stack .ebp-grip{transition:r .15s}\n.ebp-handle:hover .ebp-grip,.ebp-handle:focus-visible .ebp-grip,.ebp-handle.ebp-dragging .ebp-grip{r:11px}\n.ebp-handle:focus-visible .ebp-grip{stroke:var(--ebp-paper);stroke-width:3}\n.ebp-focus-ring{opacity:0}\n.ebp-handle:focus-visible .ebp-focus-ring{opacity:1}\n@media (prefers-reduced-motion:reduce){.ebp-stack .ebp-grip{transition:none}}\n@media (prefers-reduced-motion:reduce){.ebp-animate .ebp-layer,.ebp-animate .ebp-draw{transition:none}}", Yn = {
2933
2946
  N: "normal force",
2934
2947
  V: "shear force",
2935
2948
  M: "bending moment",
2936
2949
  w: "deformed shape",
2937
2950
  reactions: "reactions",
2938
2951
  loads: "loads"
2939
- }, Jn = {
2952
+ }, Xn = {
2940
2953
  structure: (e) => {
2941
- let t = e.flatMap((e) => qn[e] ?? []);
2954
+ let t = e.flatMap((e) => Yn[e] ?? []);
2942
2955
  return t.length > 0 ? `Structure with its ${t.join(", ")}` : "Structure";
2943
2956
  },
2944
2957
  stack: (e) => {
@@ -2953,19 +2966,19 @@ var D = (e, t) => {
2953
2966
  temperature: xt,
2954
2967
  loadHandle: (e) => `Position of the load ${e}`,
2955
2968
  loadPosition: (e) => `${e} m from the start of the beam`
2956
- }, Yn = Symbol("edubeam-plot-texts"), Xn = () => {
2957
- let e = c(Yn, null);
2969
+ }, Zn = Symbol("edubeam-plot-texts"), Qn = () => {
2970
+ let e = c(Zn, null);
2958
2971
  return t(() => ({
2959
- ...Jn,
2972
+ ...Xn,
2960
2973
  ...x(e)
2961
2974
  }));
2962
- }, Zn = [
2975
+ }, $n = [
2963
2976
  "width",
2964
2977
  "height",
2965
2978
  "viewBox",
2966
2979
  "font-size",
2967
2980
  "aria-labelledby"
2968
- ], Qn = ["id"], $n = ["aria-hidden"], er = [
2981
+ ], er = ["id"], tr = ["aria-hidden"], nr = [
2969
2982
  "d",
2970
2983
  "pathLength",
2971
2984
  "stroke",
@@ -2975,14 +2988,14 @@ var D = (e, t) => {
2975
2988
  "stroke-linecap",
2976
2989
  "fill",
2977
2990
  "fill-opacity"
2978
- ], tr = [
2991
+ ], rr = [
2979
2992
  "cx",
2980
2993
  "cy",
2981
2994
  "r",
2982
2995
  "stroke",
2983
2996
  "stroke-width",
2984
2997
  "fill"
2985
- ], nr = ["aria-hidden"], rr = [
2998
+ ], ir = ["aria-hidden"], ar = [
2986
2999
  "x",
2987
3000
  "y",
2988
3001
  "text-anchor",
@@ -2991,7 +3004,7 @@ var D = (e, t) => {
2991
3004
  "font-weight",
2992
3005
  "font-size",
2993
3006
  "font-style"
2994
- ], ir = ["font-size", "dy"], ar = ["font-size", "dy"], or = [
3007
+ ], or = ["font-size", "dy"], sr = ["font-size", "dy"], cr = [
2995
3008
  "x",
2996
3009
  "y",
2997
3010
  "text-anchor",
@@ -3000,38 +3013,38 @@ var D = (e, t) => {
3000
3013
  "font-weight",
3001
3014
  "font-size",
3002
3015
  "font-style"
3003
- ], sr = ["font-size", "dy"], cr = ["font-size", "dy"], lr = {
3016
+ ], lr = ["font-size", "dy"], ur = ["font-size", "dy"], dr = {
3004
3017
  key: 0,
3005
3018
  class: "ebp-readout",
3006
3019
  "pointer-events": "none"
3007
- }, ur = [
3020
+ }, fr = [
3008
3021
  "cx",
3009
3022
  "cy",
3010
3023
  "fill"
3011
- ], dr = [
3024
+ ], pr = [
3012
3025
  "x1",
3013
3026
  "y1",
3014
3027
  "x2",
3015
3028
  "y2",
3016
3029
  "stroke"
3017
- ], fr = [
3030
+ ], mr = [
3018
3031
  "cx",
3019
3032
  "cy",
3020
3033
  "fill",
3021
3034
  "stroke"
3022
- ], pr = [
3035
+ ], hr = [
3023
3036
  "x",
3024
3037
  "y",
3025
3038
  "width",
3026
3039
  "height",
3027
3040
  "fill",
3028
3041
  "stroke"
3029
- ], mr = [
3042
+ ], gr = [
3030
3043
  "x",
3031
3044
  "y",
3032
3045
  "fill",
3033
3046
  "textContent"
3034
- ], hr = /* @__PURE__ */ s({
3047
+ ], _r = /* @__PURE__ */ s({
3035
3048
  __name: "StructurePlot",
3036
3049
  props: {
3037
3050
  solver: {},
@@ -3079,7 +3092,7 @@ var D = (e, t) => {
3079
3092
  nodes: [],
3080
3093
  members: [],
3081
3094
  loads: []
3082
- })), T = t(() => jn(w.value)), E = t(() => {
3095
+ })), T = t(() => Nn(w.value)), E = t(() => {
3083
3096
  if (S.layers) return new Set(S.layers);
3084
3097
  let e = [
3085
3098
  "members",
@@ -3108,7 +3121,7 @@ var D = (e, t) => {
3108
3121
  reactionLabels: S.reactionLabels,
3109
3122
  temperatureSymbols: L.value.temperature,
3110
3123
  fontSize: j.value
3111
- })), N = t(() => Pn(w.value, {
3124
+ })), N = t(() => In(w.value, {
3112
3125
  ...M.value,
3113
3126
  resultLabelMode: S.resultLabelMode
3114
3127
  }, {
@@ -3123,11 +3136,11 @@ var D = (e, t) => {
3123
3136
  paths: N.value.resolved.paths.filter((t) => t.group === e && !t.hitArea),
3124
3137
  circles: N.value.resolved.circles.filter((t) => t.group === e),
3125
3138
  texts: N.value.resolved.texts.filter((t) => t.group === e)
3126
- }))), F = (e) => `var(--ebp-${e})`, I = t(() => Gn(S.colors)), L = Xn(), ae = (e) => ke(e.text, e.size ?? j.value), R = (e) => !!e.sub || ae(e).length > 1, z = t(() => S.title || L.value.structure([...E.value])), B = h(null), oe = h(null), se = (e) => {
3139
+ }))), F = (e) => `var(--ebp-${e})`, I = t(() => qn(S.colors)), L = Qn(), ae = (e) => ke(e.text, e.size ?? j.value), R = (e) => !!e.sub || ae(e).length > 1, z = t(() => S.title || L.value.structure([...E.value])), B = h(null), oe = h(null), se = (e) => {
3127
3140
  let t = oe.value?.getBoundingClientRect();
3128
3141
  if (!t || t.width === 0) return;
3129
3142
  let n = (e.clientX - t.left) / t.width * N.value.fit.width, r = (e.clientY - t.top) / t.height * N.value.fit.height, i = 18 + (ce.value.length > 0 ? M.value.diagramSize : 0);
3130
- B.value = Ln(w.value, N.value.fit, n, r, i, ce.value);
3143
+ B.value = zn(w.value, N.value.fit, n, r, i, ce.value);
3131
3144
  }, V = () => B.value = null, ce = t(() => [
3132
3145
  "N",
3133
3146
  "V",
@@ -3136,12 +3149,12 @@ var D = (e, t) => {
3136
3149
  ].filter((e) => E.value.has(e) && !(e === "N" && w.value.results && Sn(w.value, w.value.results.members)))), le = t(() => {
3137
3150
  let e = B.value;
3138
3151
  if (!e) return [];
3139
- let t = kn(w.value, M.value), n = S.momentOnTensionSide, r = {
3152
+ let t = jn(w.value, M.value), n = S.momentOnTensionSide, r = {
3140
3153
  N: fn("N", n),
3141
3154
  V: fn("V", n),
3142
3155
  M: fn("M", n)
3143
3156
  };
3144
- return zn(w.value, N.value.fit, e, ce.value, t, r);
3157
+ return Vn(w.value, N.value.fit, e, ce.value, t, r);
3145
3158
  });
3146
3159
  te(B, (e) => C("readout", e));
3147
3160
  let H = t(() => {
@@ -3157,11 +3170,11 @@ var D = (e, t) => {
3157
3170
  V: "shear",
3158
3171
  M: "moment"
3159
3172
  }[n],
3160
- text: Vn(e, n, t, M.value.numberFormat)
3173
+ text: Un(e, n, t, M.value.numberFormat)
3161
3174
  }));
3162
3175
  if (E.value.has("w") && n.push({
3163
3176
  tone: "deformed",
3164
- text: Vn(e, "w", t, M.value.numberFormat)
3177
+ text: Un(e, "w", t, M.value.numberFormat)
3165
3178
  }), n.length === 0) return null;
3166
3179
  let r = Math.max(...n.map((e) => Te(e.text, j.value))) * 1.08 + 16, i = n.length * (j.value + 5) + 8, [a, o] = le.value[0]?.to ?? [e.px, e.py];
3167
3180
  return {
@@ -3196,9 +3209,9 @@ var D = (e, t) => {
3196
3209
  pointerdown: se,
3197
3210
  pointerleave: V
3198
3211
  } : {}, !0)), [
3199
- a("title", { id: x(re) }, v(z.value), 9, Qn),
3212
+ a("title", { id: x(re) }, v(z.value), 9, er),
3200
3213
  (m(), n(_("style"), null, {
3201
- default: ne(() => [o(v(x(Kn)), 1)]),
3214
+ default: ne(() => [o(v(x(Jn)), 1)]),
3202
3215
  _: 1
3203
3216
  })),
3204
3217
  (m(!0), i(e, null, g(P.value, (t) => (m(), i("g", {
@@ -3219,7 +3232,7 @@ var D = (e, t) => {
3219
3232
  "stroke-linejoin": "round",
3220
3233
  fill: e.fill === "tone" ? F(e.tone) : e.fill === "paper" ? F("paper") : "none",
3221
3234
  "fill-opacity": e.fillOpacity
3222
- }, null, 14, er))), 128)), (m(!0), i(e, null, g(t.circles, (e, t) => (m(), i("circle", {
3235
+ }, null, 14, nr))), 128)), (m(!0), i(e, null, g(t.circles, (e, t) => (m(), i("circle", {
3223
3236
  key: `c${t}`,
3224
3237
  cx: e.cx,
3225
3238
  cy: e.cy,
@@ -3227,7 +3240,7 @@ var D = (e, t) => {
3227
3240
  stroke: F(e.tone),
3228
3241
  "stroke-width": e.width,
3229
3242
  fill: e.fill === "paper" ? F("paper") : F(e.tone)
3230
- }, null, 8, tr))), 128))], 10, $n))), 128)),
3243
+ }, null, 8, rr))), 128))], 10, tr))), 128)),
3231
3244
  (m(!0), i(e, null, g(P.value, (t) => (m(), i("g", {
3232
3245
  key: `t-${t.layer}`,
3233
3246
  class: u(["ebp-layer ebp-labels", [`ebp-layer-${t.layer}`, { "ebp-on": t.on }]]),
@@ -3250,13 +3263,13 @@ var D = (e, t) => {
3250
3263
  key: t,
3251
3264
  "font-size": e.size,
3252
3265
  dy: e.dy
3253
- }, v(e.text), 9, ir))), 128)),
3266
+ }, v(e.text), 9, or))), 128)),
3254
3267
  t.sub ? (m(), i("tspan", {
3255
3268
  key: 0,
3256
3269
  "font-size": (t.size ?? j.value) * x(je),
3257
3270
  dy: (t.size ?? j.value) * x(Me)
3258
- }, v(t.sub), 9, ar)) : r("", !0)
3259
- ], 8, rr)) : r("", !0), a("text", {
3271
+ }, v(t.sub), 9, sr)) : r("", !0)
3272
+ ], 8, ar)) : r("", !0), a("text", {
3260
3273
  class: u({ "ebp-nohalo": R(t) }),
3261
3274
  x: t.x,
3262
3275
  y: t.y,
@@ -3272,20 +3285,20 @@ var D = (e, t) => {
3272
3285
  key: t,
3273
3286
  "font-size": e.size,
3274
3287
  dy: e.dy
3275
- }, v(e.text), 9, sr))), 128)),
3288
+ }, v(e.text), 9, lr))), 128)),
3276
3289
  t.sub ? (m(), i("tspan", {
3277
3290
  key: 0,
3278
3291
  "font-size": (t.size ?? j.value) * x(je),
3279
3292
  dy: (t.size ?? j.value) * x(Me)
3280
- }, v(t.sub), 9, cr)) : r("", !0)
3281
- ], 10, or)], 64))), 128))], 10, nr))), 128)),
3282
- H.value && B.value ? (m(), i("g", lr, [
3293
+ }, v(t.sub), 9, ur)) : r("", !0)
3294
+ ], 10, cr)], 64))), 128))], 10, ir))), 128)),
3295
+ H.value && B.value ? (m(), i("g", dr, [
3283
3296
  a("circle", {
3284
3297
  cx: B.value.px,
3285
3298
  cy: B.value.py,
3286
3299
  r: "2.5",
3287
3300
  fill: F("ink")
3288
- }, null, 8, ur),
3301
+ }, null, 8, fr),
3289
3302
  (m(!0), i(e, null, g(le.value, (t, n) => (m(), i(e, { key: n }, [a("line", {
3290
3303
  x1: t.from[0],
3291
3304
  y1: t.from[1],
@@ -3293,14 +3306,14 @@ var D = (e, t) => {
3293
3306
  y2: t.to[1],
3294
3307
  stroke: F(t.tone),
3295
3308
  "stroke-width": "2"
3296
- }, null, 8, dr), a("circle", {
3309
+ }, null, 8, pr), a("circle", {
3297
3310
  cx: t.to[0],
3298
3311
  cy: t.to[1],
3299
3312
  r: "4",
3300
3313
  fill: F(t.tone),
3301
3314
  stroke: F("paper"),
3302
3315
  "stroke-width": "1.5"
3303
- }, null, 8, fr)], 64))), 128)),
3316
+ }, null, 8, mr)], 64))), 128)),
3304
3317
  a("rect", {
3305
3318
  x: H.value.x,
3306
3319
  y: H.value.y,
@@ -3310,7 +3323,7 @@ var D = (e, t) => {
3310
3323
  fill: F("paper"),
3311
3324
  stroke: F("muted"),
3312
3325
  "stroke-opacity": "0.5"
3313
- }, null, 8, pr),
3326
+ }, null, 8, hr),
3314
3327
  (m(!0), i(e, null, g(H.value.lines, (e, t) => (m(), i("text", {
3315
3328
  key: t,
3316
3329
  x: H.value.x + 8,
@@ -3318,11 +3331,11 @@ var D = (e, t) => {
3318
3331
  fill: F(e.tone),
3319
3332
  "font-weight": "600",
3320
3333
  textContent: v(e.text)
3321
- }, null, 8, mr))), 128))
3334
+ }, null, 8, gr))), 128))
3322
3335
  ])) : r("", !0)
3323
- ], 16, Zn))], 4));
3336
+ ], 16, $n))], 4));
3324
3337
  }
3325
- }), gr = (e, t) => {
3338
+ }), vr = (e, t) => {
3326
3339
  let n = Xe(e), r = t ? t.map((t) => e.members.find((e) => e.id === t)) : [...e.members];
3327
3340
  if (r.length === 0) throw Error("A diagram stack needs at least one member");
3328
3341
  let i = r.map((t) => {
@@ -3356,14 +3369,14 @@ var D = (e, t) => {
3356
3369
  at: t
3357
3370
  })).sort((e, t) => e.at - t.at)
3358
3371
  };
3359
- }, _r = (e, t, n) => {
3372
+ }, yr = (e, t, n) => {
3360
3373
  let r = e.results?.members ?? {};
3361
3374
  return t.members.flatMap((e) => (r[e.id]?.[n] ?? []).map((t) => ({
3362
3375
  x0: t.x0 + e.offset,
3363
3376
  x1: t.x1 + e.offset,
3364
3377
  c: t.c
3365
3378
  })));
3366
- }, vr = (e, t, n) => {
3379
+ }, br = (e, t, n) => {
3367
3380
  let r = new Set(t.members.map((e) => e.id)), i = new Set(t.nodes.map((e) => e.id)), a = (e) => "member" in e ? r.has(e.member) : i.has(e.node);
3368
3381
  return {
3369
3382
  nodes: e.nodes.filter((e) => i.has(e.id)),
@@ -3374,7 +3387,7 @@ var D = (e, t) => {
3374
3387
  reactions: e.results.reactions.filter((e) => i.has(e.node))
3375
3388
  }
3376
3389
  };
3377
- }, yr = (e, t, n) => {
3390
+ }, xr = (e, t, n) => {
3378
3391
  let r = 1e-6 * Math.max(1, t.length);
3379
3392
  return e.loads.find((e) => {
3380
3393
  if (e.kind === "pointForce") {
@@ -3387,7 +3400,7 @@ var D = (e, t) => {
3387
3400
  }
3388
3401
  return !1;
3389
3402
  });
3390
- }, $ = (e) => Math.round(e * 10) / 10, br = (e, t, n, r) => {
3403
+ }, $ = (e) => Math.round(e * 10) / 10, Sr = (e, t, n, r) => {
3391
3404
  if (e.length === 0) return "";
3392
3405
  let i = [];
3393
3406
  return e.forEach((e, a) => {
@@ -3395,7 +3408,7 @@ var D = (e, t) => {
3395
3408
  a === 0 ? i.push(r ? `M${$(t(e.x0))},${$(n(0))}L${o}` : `M${o}`) : i.push(`L${o}`);
3396
3409
  for (let [, r, a, o] of V(e)) i.push(`C${$(t(r[0]))},${$(n(r[1]))} ${$(t(a[0]))},${$(n(a[1]))} ${$(t(o[0]))},${$(n(o[1]))}`);
3397
3410
  }), r && i.push(`L${$(t(e[e.length - 1].x1))},${$(n(0))}Z`), i.join("");
3398
- }, xr = (e, t, n, r) => {
3411
+ }, Cr = (e, t, n, r) => {
3399
3412
  if (e.length === 0) return "";
3400
3413
  let i = t(e[0].x0), a = t(e[e.length - 1].x1), o = Math.floor((a - i) / r), s = i + (a - i - o * r) / 2, c = (e[e.length - 1].x1 - e[0].x0) / (a - i), l = [];
3401
3414
  for (let t = 0; t <= o; t++) {
@@ -3403,10 +3416,10 @@ var D = (e, t) => {
3403
3416
  Math.abs(d - u) >= 1.5 && l.push(`M${$(a)},${$(u)}V${$(d)}`);
3404
3417
  }
3405
3418
  return l.join("");
3406
- }, Sr = (e) => {
3419
+ }, wr = (e) => {
3407
3420
  let t = ce(e);
3408
3421
  return t ? [Math.min(0, t.min.value), Math.max(0, t.max.value)] : [0, 0];
3409
- }, Cr = (e) => {
3422
+ }, Tr = (e) => {
3410
3423
  let t = ce(e);
3411
3424
  if (!t) return [];
3412
3425
  let n = F(e), r = [];
@@ -3417,21 +3430,21 @@ var D = (e, t) => {
3417
3430
  ...t.min,
3418
3431
  kind: "min"
3419
3432
  }), r;
3420
- }, wr = (e) => se(e), Tr = [
3433
+ }, Er = (e) => se(e), Dr = [
3421
3434
  "width",
3422
3435
  "height",
3423
3436
  "viewBox",
3424
3437
  "font-size",
3425
3438
  "aria-labelledby"
3426
- ], Er = ["id"], Dr = {
3439
+ ], Or = ["id"], kr = {
3427
3440
  class: "ebp-math",
3428
3441
  "font-size": "15"
3429
- }, Or = [
3442
+ }, Ar = [
3430
3443
  "x",
3431
3444
  "y",
3432
3445
  "fill",
3433
3446
  "opacity"
3434
- ], kr = { class: "ebp-var" }, Ar = { key: 0 }, jr = [
3447
+ ], jr = { class: "ebp-var" }, Mr = { key: 0 }, Nr = [
3435
3448
  "d",
3436
3449
  "stroke",
3437
3450
  "stroke-width",
@@ -3439,31 +3452,31 @@ var D = (e, t) => {
3439
3452
  "stroke-dasharray",
3440
3453
  "stroke-linecap",
3441
3454
  "fill"
3442
- ], Mr = [
3455
+ ], Pr = [
3443
3456
  "cx",
3444
3457
  "cy",
3445
3458
  "r",
3446
3459
  "stroke",
3447
3460
  "stroke-width",
3448
3461
  "fill"
3449
- ], Nr = [
3462
+ ], Fr = [
3450
3463
  "x1",
3451
3464
  "x2",
3452
3465
  "y1",
3453
3466
  "y2",
3454
3467
  "stroke"
3455
- ], Pr = [
3468
+ ], Ir = [
3456
3469
  "x1",
3457
3470
  "x2",
3458
3471
  "y1",
3459
3472
  "y2",
3460
3473
  "stroke",
3461
3474
  "stroke-dasharray"
3462
- ], Fr = ["d", "stroke"], Ir = [
3475
+ ], Lr = ["d", "stroke"], Rr = [
3463
3476
  "d",
3464
3477
  "stroke",
3465
3478
  "stroke-width"
3466
- ], Lr = { key: 2 }, Rr = [
3479
+ ], zr = { key: 2 }, Br = [
3467
3480
  "x",
3468
3481
  "y",
3469
3482
  "text-anchor",
@@ -3471,67 +3484,67 @@ var D = (e, t) => {
3471
3484
  "fill",
3472
3485
  "font-weight",
3473
3486
  "textContent"
3474
- ], zr = [
3487
+ ], Vr = [
3475
3488
  "x",
3476
3489
  "y",
3477
3490
  "fill",
3478
3491
  "textContent"
3479
- ], Br = [
3492
+ ], Hr = [
3480
3493
  "aria-label",
3481
3494
  "aria-valuemax",
3482
3495
  "aria-valuenow",
3483
3496
  "aria-valuetext"
3484
- ], Vr = ["x", "y"], Hr = [
3497
+ ], Ur = ["x", "y"], Wr = [
3485
3498
  "x1",
3486
3499
  "x2",
3487
3500
  "y1",
3488
3501
  "y2",
3489
3502
  "stroke"
3490
- ], Ur = ["d", "fill"], Wr = [
3503
+ ], Gr = ["d", "fill"], Kr = [
3491
3504
  "cx",
3492
3505
  "cy",
3493
3506
  "fill"
3494
- ], Gr = [
3507
+ ], qr = [
3495
3508
  "cx",
3496
3509
  "cy",
3497
3510
  "stroke"
3498
- ], Kr = [
3511
+ ], Jr = [
3499
3512
  "x",
3500
3513
  "y",
3501
3514
  "text-anchor",
3502
3515
  "fill",
3503
3516
  "textContent"
3504
- ], qr = {
3517
+ ], Yr = {
3505
3518
  key: 4,
3506
3519
  "pointer-events": "none",
3507
3520
  "font-weight": "600"
3508
- }, Jr = [
3521
+ }, Xr = [
3509
3522
  "x1",
3510
3523
  "x2",
3511
3524
  "y1",
3512
3525
  "y2",
3513
3526
  "stroke"
3514
- ], Yr = [
3527
+ ], Zr = [
3515
3528
  "x",
3516
3529
  "y",
3517
3530
  "fill"
3518
- ], Xr = [
3531
+ ], Qr = [
3519
3532
  "cx",
3520
3533
  "cy",
3521
3534
  "fill",
3522
3535
  "stroke"
3523
- ], Zr = [
3536
+ ], $r = [
3524
3537
  "x",
3525
3538
  "y",
3526
3539
  "width",
3527
3540
  "fill",
3528
3541
  "stroke"
3529
- ], Qr = [
3542
+ ], ei = [
3530
3543
  "x",
3531
3544
  "y",
3532
3545
  "fill",
3533
3546
  "textContent"
3534
- ], $r = 20, ei = 8, ti = /* @__PURE__ */ s({
3547
+ ], ti = 20, ni = 8, ri = /* @__PURE__ */ s({
3535
3548
  __name: "DiagramStack",
3536
3549
  props: {
3537
3550
  solver: {},
@@ -3567,25 +3580,25 @@ var D = (e, t) => {
3567
3580
  },
3568
3581
  emits: ["update:loadAt", "readout"],
3569
3582
  setup(s, { emit: c }) {
3570
- let S = s, C = c, re = Xn(), w = ee(), T = t(() => (S.revision, S.model ? S.model : S.solver ? Ce(b(S.solver), { loadCase: S.loadCase }) : {
3583
+ let S = s, C = c, re = Qn(), w = ee(), T = t(() => (S.revision, S.model ? S.model : S.solver ? Ce(b(S.solver), { loadCase: S.loadCase }) : {
3571
3584
  nodes: [],
3572
3585
  members: [],
3573
3586
  loads: []
3574
- })), E = t(() => gr(T.value, S.members)), D = t(() => _t(S.units)), O = t(() => S.numberFormat ?? vt), k = t(() => S.fontSize ?? 12.5), ie = h(null), A = h(0), j;
3587
+ })), E = t(() => vr(T.value, S.members)), D = t(() => _t(S.units)), O = t(() => S.numberFormat ?? vt), k = t(() => S.fontSize ?? 12.5), ie = h(null), A = h(0), j;
3575
3588
  p(() => {
3576
3589
  ie.value && typeof ResizeObserver < "u" && (j = new ResizeObserver(([e]) => {
3577
3590
  let t = Math.round(e.contentRect.width);
3578
3591
  t > 0 && (A.value = t);
3579
3592
  }), j.observe(ie.value));
3580
3593
  }), f(() => j?.disconnect());
3581
- let M = t(() => Math.max(320, A.value || S.width || 720)), N = t(() => M.value < 560), P = t(() => N.value ? 52 : 60), F = t(() => M.value - P.value - $r), I = (e) => P.value + e / E.value.length * F.value, L = (e) => (e - P.value) / F.value * E.value.length, ae = t(() => S.loadAt === void 0 ? void 0 : yr(T.value, E.value, S.loadAt)), R = t(() => {
3594
+ let M = t(() => Math.max(320, A.value || S.width || 720)), N = t(() => M.value < 560), P = t(() => N.value ? 52 : 60), F = t(() => M.value - P.value - ti), I = (e) => P.value + e / E.value.length * F.value, L = (e) => (e - P.value) / F.value * E.value.length, ae = t(() => S.loadAt === void 0 ? void 0 : xr(T.value, E.value, S.loadAt)), R = t(() => {
3582
3595
  if (!S.loadRow) return null;
3583
- let e = vr(T.value, E.value, ae.value), t = /* @__PURE__ */ new Set([
3596
+ let e = br(T.value, E.value, ae.value), t = /* @__PURE__ */ new Set([
3584
3597
  "members",
3585
3598
  "supports",
3586
3599
  "loads",
3587
3600
  "reactions"
3588
- ]), n = F.value / E.value.length, r = Mn(e, {
3601
+ ]), n = F.value / E.value.length, r = Pn(e, {
3589
3602
  layers: t,
3590
3603
  compact: N.value,
3591
3604
  units: D.value,
@@ -3633,8 +3646,8 @@ var D = (e, t) => {
3633
3646
  w: 76
3634
3647
  }, t = N.value ? 22 : 26, n = R.value ? R.value.bottom + t : 30, r = S.rows.map((t) => S.rowHeights?.[t] ?? e[t]), i = r.reduce((e, t) => e + t, 0), a = S.maxHeight === void 0 ? Infinity : S.maxHeight - n - t * (S.rows.length - 1) - 14, o = Math.min(1, Math.max(.6, a / i)), s = n;
3635
3648
  return S.rows.map((e, n) => {
3636
- let i = Math.round(r[n] * o), a = _r(T.value, E.value, e), [c, l] = S.ranges?.[e] ?? Sr(a), u = l - c || 1, d = oe[e], f = d ? s + l / u * i : s + -c / u * i, p = i / u, m = (e) => d ? f - e * p : f + e * p, h = B[e], g = Cr(a).map((t) => {
3637
- let n = m(t.value), r = d ? t.value < 0 : t.value > 0, i = yt(t.value, se(e), O.value), a = Te(i, k.value), o = Math.min(Math.max(I(t.x), P.value + a / 2), M.value - $r - a / 2), s = n - 7, c = n + k.value + 3, l = n + k.value * .35;
3649
+ let i = Math.round(r[n] * o), a = yr(T.value, E.value, e), [c, l] = S.ranges?.[e] ?? wr(a), u = l - c || 1, d = oe[e], f = d ? s + l / u * i : s + -c / u * i, p = i / u, m = (e) => d ? f - e * p : f + e * p, h = B[e], g = Tr(a).map((t) => {
3650
+ let n = m(t.value), r = d ? t.value < 0 : t.value > 0, i = yt(t.value, se(e), O.value), a = Te(i, k.value), o = Math.min(Math.max(I(t.x), P.value + a / 2), M.value - ti - a / 2), s = n - 7, c = n + k.value + 3, l = n + k.value * .35;
3638
3651
  return {
3639
3652
  text: i,
3640
3653
  width: a,
@@ -3644,7 +3657,7 @@ var D = (e, t) => {
3644
3657
  y: r ? c : s
3645
3658
  },
3646
3659
  {
3647
- x: Math.min(o + a / 2 + 10, M.value - $r - a / 2),
3660
+ x: Math.min(o + a / 2 + 10, M.value - ti - a / 2),
3648
3661
  y: l
3649
3662
  },
3650
3663
  {
@@ -3665,8 +3678,8 @@ var D = (e, t) => {
3665
3678
  axis: f,
3666
3679
  sy: m,
3667
3680
  pw: a,
3668
- outline: br(a, I, m, e !== "w"),
3669
- ordinates: e === "w" ? "" : xr(a, I, m, 7),
3681
+ outline: Sr(a, I, m, e !== "w"),
3682
+ ordinates: e === "w" ? "" : Cr(a, I, m, 7),
3670
3683
  peaks: g
3671
3684
  };
3672
3685
  return s += i + t, _;
@@ -3697,10 +3710,10 @@ var D = (e, t) => {
3697
3710
  V: "V",
3698
3711
  M: "M",
3699
3712
  w: "w"
3700
- }, ue = h(null), de = t(() => [...new Set(S.rows.flatMap((e) => wr(_r(T.value, E.value, e))))]), fe = t(() => {
3713
+ }, ue = h(null), de = t(() => [...new Set(S.rows.flatMap((e) => Er(yr(T.value, E.value, e))))]), fe = t(() => {
3701
3714
  let e = ue.value;
3702
3715
  if (e === null) return null;
3703
- let t = de.value.find((t) => Math.abs(I(t) - I(e)) < ei) ?? e;
3716
+ let t = de.value.find((t) => Math.abs(I(t) - I(e)) < ni) ?? e;
3704
3717
  return {
3705
3718
  x: t,
3706
3719
  values: Object.fromEntries(V.value.map((e) => [e.row, {
@@ -3771,7 +3784,7 @@ var D = (e, t) => {
3771
3784
  text: S.loadLabel ?? `P = ${yt(t, D.value.force, O.value)}`,
3772
3785
  nearEnd: r
3773
3786
  };
3774
- }), K = (e) => `var(--ebp-${e})`, we = t(() => Gn(S.colors)), Ee = t(() => S.title ?? re.value.stack(S.rows)), De = t(() => {
3787
+ }), K = (e) => `var(--ebp-${e})`, we = t(() => qn(S.colors)), Ee = t(() => S.title ?? re.value.stack(S.rows)), De = t(() => {
3775
3788
  let e = V.value[V.value.length - 1];
3776
3789
  return e ? e.top + e.height : le.value;
3777
3790
  });
@@ -3792,12 +3805,12 @@ var D = (e, t) => {
3792
3805
  "aria-labelledby": x(w),
3793
3806
  style: U.value ? { touchAction: "pan-y pinch-zoom" } : void 0
3794
3807
  }, y(W.value, !0)), [
3795
- a("title", { id: x(w) }, v(Ee.value), 9, Er),
3808
+ a("title", { id: x(w) }, v(Ee.value), 9, Or),
3796
3809
  (m(), n(_("style"), null, {
3797
- default: ne(() => [o(v(x(Kn)), 1)]),
3810
+ default: ne(() => [o(v(x(Jn)), 1)]),
3798
3811
  _: 1
3799
3812
  })),
3800
- a("g", Dr, [(m(!0), i(e, null, g(V.value, (e) => (m(), i("text", {
3813
+ a("g", kr, [(m(!0), i(e, null, g(V.value, (e) => (m(), i("text", {
3801
3814
  key: e.row,
3802
3815
  x: P.value - 12,
3803
3816
  y: e.axis + 5,
@@ -3805,12 +3818,12 @@ var D = (e, t) => {
3805
3818
  fill: K(e.tone),
3806
3819
  opacity: e.row === "w" ? .7 : void 0
3807
3820
  }, [
3808
- a("tspan", kr, v(H[e.row]), 1),
3821
+ a("tspan", jr, v(H[e.row]), 1),
3809
3822
  c[0] ||= a("tspan", null, "(", -1),
3810
3823
  c[1] ||= a("tspan", { class: "ebp-var" }, "x", -1),
3811
3824
  c[2] ||= a("tspan", null, ")", -1)
3812
- ], 8, Or))), 128))]),
3813
- R.value ? (m(), i("g", Ar, [(m(!0), i(e, null, g(R.value.resolved.paths, (e, t) => (m(), i("path", {
3825
+ ], 8, Ar))), 128))]),
3826
+ R.value ? (m(), i("g", Mr, [(m(!0), i(e, null, g(R.value.resolved.paths, (e, t) => (m(), i("path", {
3814
3827
  key: t,
3815
3828
  d: e.d,
3816
3829
  stroke: e.width > 0 ? K(e.tone) : "none",
@@ -3820,7 +3833,7 @@ var D = (e, t) => {
3820
3833
  "stroke-linecap": e.cap ?? "round",
3821
3834
  "stroke-linejoin": "round",
3822
3835
  fill: e.fill === "tone" ? K(e.tone) : e.fill === "paper" ? K("paper") : "none"
3823
- }, null, 8, jr))), 128)), (m(!0), i(e, null, g(R.value.resolved.circles, (e, t) => (m(), i("circle", {
3836
+ }, null, 8, Nr))), 128)), (m(!0), i(e, null, g(R.value.resolved.circles, (e, t) => (m(), i("circle", {
3824
3837
  key: `c${t}`,
3825
3838
  cx: e.cx,
3826
3839
  cy: e.cy,
@@ -3828,7 +3841,7 @@ var D = (e, t) => {
3828
3841
  stroke: K(e.tone),
3829
3842
  "stroke-width": e.width,
3830
3843
  fill: K("paper")
3831
- }, null, 8, Mr))), 128))])) : r("", !0),
3844
+ }, null, 8, Pr))), 128))])) : r("", !0),
3832
3845
  G.value && V.value.length ? (m(), i("line", {
3833
3846
  key: 1,
3834
3847
  x1: G.value.x,
@@ -3838,7 +3851,7 @@ var D = (e, t) => {
3838
3851
  stroke: K("brand"),
3839
3852
  "stroke-dasharray": "3 4",
3840
3853
  opacity: "0.45"
3841
- }, null, 8, Nr)) : r("", !0),
3854
+ }, null, 8, Fr)) : r("", !0),
3842
3855
  (m(!0), i(e, null, g(V.value, (e) => (m(), i("g", { key: e.row }, [
3843
3856
  a("line", {
3844
3857
  x1: I(0),
@@ -3848,14 +3861,14 @@ var D = (e, t) => {
3848
3861
  stroke: K("muted"),
3849
3862
  "stroke-opacity": "0.45",
3850
3863
  "stroke-dasharray": e.row === "w" ? "4 4" : void 0
3851
- }, null, 8, Pr),
3864
+ }, null, 8, Ir),
3852
3865
  e.ordinates ? (m(), i("path", {
3853
3866
  key: 0,
3854
3867
  d: e.ordinates,
3855
3868
  stroke: K(e.tone),
3856
3869
  "stroke-width": "1",
3857
3870
  "stroke-opacity": "0.55"
3858
- }, null, 8, Fr)) : r("", !0),
3871
+ }, null, 8, Lr)) : r("", !0),
3859
3872
  a("path", {
3860
3873
  d: e.outline,
3861
3874
  fill: "none",
@@ -3863,9 +3876,9 @@ var D = (e, t) => {
3863
3876
  "stroke-width": e.row === "w" ? 2.25 : 1.75,
3864
3877
  "stroke-linejoin": "round",
3865
3878
  "stroke-linecap": "round"
3866
- }, null, 8, Ir)
3879
+ }, null, 8, Rr)
3867
3880
  ]))), 128)),
3868
- R.value ? (m(), i("g", Lr, [(m(!0), i(e, null, g(R.value.resolved.texts, (e, t) => (m(), i("text", {
3881
+ R.value ? (m(), i("g", zr, [(m(!0), i(e, null, g(R.value.resolved.texts, (e, t) => (m(), i("text", {
3869
3882
  key: t,
3870
3883
  x: e.x,
3871
3884
  y: e.y,
@@ -3874,7 +3887,7 @@ var D = (e, t) => {
3874
3887
  fill: K(e.tone),
3875
3888
  "font-weight": e.weight,
3876
3889
  textContent: v(e.text)
3877
- }, null, 8, Rr))), 128))])) : r("", !0),
3890
+ }, null, 8, Br))), 128))])) : r("", !0),
3878
3891
  (m(!0), i(e, null, g(ce.value, (t, n) => (m(), i("g", { key: `l-${n}` }, [(m(!0), i(e, null, g(t, (e, t) => (m(), i("text", {
3879
3892
  key: t,
3880
3893
  x: e.x,
@@ -3882,7 +3895,7 @@ var D = (e, t) => {
3882
3895
  "text-anchor": "middle",
3883
3896
  fill: K(e.tone),
3884
3897
  textContent: v(e.text)
3885
- }, null, 8, zr))), 128))]))), 128)),
3898
+ }, null, 8, Vr))), 128))]))), 128)),
3886
3899
  G.value ? (m(), i("g", {
3887
3900
  key: 3,
3888
3901
  class: u(["ebp-handle", { "ebp-dragging": he.value }]),
@@ -3901,7 +3914,7 @@ var D = (e, t) => {
3901
3914
  width: "44",
3902
3915
  height: "86",
3903
3916
  fill: "transparent"
3904
- }, null, 8, Vr),
3917
+ }, null, 8, Ur),
3905
3918
  a("line", {
3906
3919
  x1: G.value.x,
3907
3920
  x2: G.value.x,
@@ -3909,18 +3922,18 @@ var D = (e, t) => {
3909
3922
  y2: G.value.y - 13,
3910
3923
  stroke: K("brand"),
3911
3924
  "stroke-width": "3"
3912
- }, null, 8, Hr),
3925
+ }, null, 8, Wr),
3913
3926
  a("path", {
3914
3927
  d: `M${G.value.x - 7},${G.value.y - 14}L${G.value.x + 7},${G.value.y - 14}L${G.value.x},${G.value.y - 2}Z`,
3915
3928
  fill: K("brand")
3916
- }, null, 8, Ur),
3929
+ }, null, 8, Gr),
3917
3930
  a("circle", {
3918
3931
  class: "ebp-grip",
3919
3932
  cx: G.value.x,
3920
3933
  cy: G.value.y - 80,
3921
3934
  r: "9",
3922
3935
  fill: K("brand")
3923
- }, null, 8, Wr),
3936
+ }, null, 8, Kr),
3924
3937
  a("circle", {
3925
3938
  class: "ebp-focus-ring",
3926
3939
  cx: G.value.x,
@@ -3929,7 +3942,7 @@ var D = (e, t) => {
3929
3942
  fill: "none",
3930
3943
  stroke: K("ink"),
3931
3944
  "stroke-width": "2"
3932
- }, null, 8, Gr),
3945
+ }, null, 8, qr),
3933
3946
  a("text", {
3934
3947
  x: G.value.x + (G.value.nearEnd ? -22 : 22),
3935
3948
  y: G.value.y - 76,
@@ -3937,9 +3950,9 @@ var D = (e, t) => {
3937
3950
  fill: K("brand"),
3938
3951
  "font-weight": "600",
3939
3952
  textContent: v(G.value.text)
3940
- }, null, 8, Kr)
3941
- ], 42, Br)) : r("", !0),
3942
- fe.value && !he.value && V.value.length ? (m(), i("g", qr, [
3953
+ }, null, 8, Jr)
3954
+ ], 42, Hr)) : r("", !0),
3955
+ fe.value && !he.value && V.value.length ? (m(), i("g", Yr, [
3943
3956
  a("line", {
3944
3957
  x1: I(fe.value.x),
3945
3958
  x2: I(fe.value.x),
@@ -3947,13 +3960,13 @@ var D = (e, t) => {
3947
3960
  y2: De.value,
3948
3961
  stroke: K("ink"),
3949
3962
  "stroke-opacity": "0.3"
3950
- }, null, 8, Jr),
3963
+ }, null, 8, Xr),
3951
3964
  a("text", {
3952
3965
  x: I(fe.value.x),
3953
3966
  y: V.value[0].top - 20,
3954
3967
  "text-anchor": "middle",
3955
3968
  fill: K("ink")
3956
- }, [c[3] ||= a("tspan", { class: "ebp-math" }, [a("tspan", { class: "ebp-var" }, "x")], -1), o(" = " + v(x(yt)(fe.value.x, D.value.length, O.value)), 1)], 8, Yr),
3969
+ }, [c[3] ||= a("tspan", { class: "ebp-math" }, [a("tspan", { class: "ebp-var" }, "x")], -1), o(" = " + v(x(yt)(fe.value.x, D.value.length, O.value)), 1)], 8, Zr),
3957
3970
  (m(!0), i(e, null, g(pe.value, (t) => (m(), i("g", { key: t.key }, [
3958
3971
  (m(!0), i(e, null, g(t.ys, (e, n) => (m(), i("circle", {
3959
3972
  key: n,
@@ -3963,7 +3976,7 @@ var D = (e, t) => {
3963
3976
  fill: K(t.tone),
3964
3977
  stroke: K("paper"),
3965
3978
  "stroke-width": "1.5"
3966
- }, null, 8, Xr))), 128)),
3979
+ }, null, 8, Qr))), 128)),
3967
3980
  a("rect", {
3968
3981
  x: t.left,
3969
3982
  y: t.top,
@@ -3973,21 +3986,21 @@ var D = (e, t) => {
3973
3986
  fill: K("paper"),
3974
3987
  stroke: K(t.tone),
3975
3988
  "stroke-opacity": "0.5"
3976
- }, null, 8, Zr),
3989
+ }, null, 8, $r),
3977
3990
  a("text", {
3978
3991
  x: t.left + 7,
3979
3992
  y: t.top + 15,
3980
3993
  fill: K(t.tone),
3981
3994
  class: "ebp-pill",
3982
3995
  textContent: v(t.text)
3983
- }, null, 8, Qr)
3996
+ }, null, 8, ei)
3984
3997
  ]))), 128))
3985
3998
  ])) : r("", !0)
3986
- ], 16, Tr))], 4));
3999
+ ], 16, Dr))], 4));
3987
4000
  }
3988
- }), ni = { install(e) {
3989
- e.component("StructurePlot", hr), e.component("DiagramStack", ti);
3990
- } }, ri = {
4001
+ }), ii = { install(e) {
4002
+ e.component("StructurePlot", _r), e.component("DiagramStack", ri);
4003
+ } }, ai = {
3991
4004
  ink: "#16182b",
3992
4005
  paper: "#ffffff",
3993
4006
  muted: "#6b7085",
@@ -4000,14 +4013,14 @@ var D = (e, t) => {
4000
4013
  reaction: "#a020f0",
4001
4014
  tension: "#ff2222",
4002
4015
  compression: "#2222ff"
4003
- }, ii = (e) => e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;"), ai = (e) => Math.round(e * 100) / 100, oi = (e) => Object.entries(e).filter(([, e]) => e !== void 0 && e !== "").map(([e, t]) => `${e}="${ii(String(t))}"`).join(" "), si = (e, t = {}) => {
4004
- let n = t.fontSize ?? (t.compact ? 11.5 : 13), r = t.width ?? 640, i = jn(e), a = new Set(t.layers ?? [
4016
+ }, oi = (e) => e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;"), si = (e) => Math.round(e * 100) / 100, ci = (e) => Object.entries(e).filter(([, e]) => e !== void 0 && e !== "").map(([e, t]) => `${e}="${oi(String(t))}"`).join(" "), li = (e, t = {}) => {
4017
+ let n = t.fontSize ?? (t.compact ? 11.5 : 13), r = t.width ?? 640, i = Nn(e), a = new Set(t.layers ?? [
4005
4018
  "members",
4006
4019
  "supports",
4007
4020
  "loads",
4008
4021
  "reactions",
4009
4022
  ...i ? [i] : []
4010
- ]), { fit: o, resolved: s } = Pn(e, {
4023
+ ]), { fit: o, resolved: s } = In(e, {
4011
4024
  layers: /* @__PURE__ */ new Set([...a, ...t.reserve ?? []]),
4012
4025
  compact: t.compact ?? !1,
4013
4026
  units: _t(t.units),
@@ -4026,7 +4039,7 @@ var D = (e, t) => {
4026
4039
  padding: t.padding ?? 6,
4027
4040
  fontSize: n
4028
4041
  }, a, t.reserveLabelModes, t.reserveReactionLabels), c = a;
4029
- return li({
4042
+ return di({
4030
4043
  paths: s.paths.filter((e) => c.has(e.group)),
4031
4044
  circles: s.circles.filter((e) => c.has(e.group)),
4032
4045
  texts: s.texts.filter((e) => c.has(e.group))
@@ -4037,11 +4050,11 @@ var D = (e, t) => {
4037
4050
  background: t.background,
4038
4051
  title: t.title
4039
4052
  });
4040
- }, ci = (e, t = {}) => {
4053
+ }, ui = (e, t = {}) => {
4041
4054
  let n = t.fontSize ?? 13, r = {
4042
- ...ri,
4055
+ ...ai,
4043
4056
  ...t.colors
4044
- }, i = (e) => r[e], a = (e) => `<path ${oi({
4057
+ }, i = (e) => r[e], a = (e) => `<path ${ci({
4045
4058
  d: e.d,
4046
4059
  fill: e.fill === "tone" ? i(e.tone) : e.fill === "paper" ? i("paper") : "none",
4047
4060
  "fill-opacity": e.fillOpacity,
@@ -4051,7 +4064,7 @@ var D = (e, t) => {
4051
4064
  "stroke-dasharray": e.dash,
4052
4065
  "stroke-linecap": e.cap ?? "round",
4053
4066
  "stroke-linejoin": "round"
4054
- })}/>`, o = (e) => `<circle ${oi({
4067
+ })}/>`, o = (e) => `<circle ${ci({
4055
4068
  cx: e.cx,
4056
4069
  cy: e.cy,
4057
4070
  r: e.r,
@@ -4067,45 +4080,45 @@ var D = (e, t) => {
4067
4080
  "font-weight": e.weight,
4068
4081
  "font-style": e.italic ? "italic" : void 0,
4069
4082
  transform: e.transform
4070
- }, r = e.size ?? n, a = ke(e.text, r).map((e) => e.size === void 0 && e.dy === void 0 ? ii(e.text) : `<tspan ${oi({
4083
+ }, r = e.size ?? n, a = ke(e.text, r).map((e) => e.size === void 0 && e.dy === void 0 ? oi(e.text) : `<tspan ${ci({
4071
4084
  "font-size": e.size,
4072
4085
  dy: e.dy
4073
- })}>${ii(e.text)}</tspan>`).join("") + (e.sub ? `<tspan ${oi({
4074
- "font-size": ai(r * je),
4075
- dy: ai(r * Me)
4076
- })}>${ii(e.sub)}</tspan>` : "");
4077
- return [`<text ${oi({
4086
+ })}>${oi(e.text)}</tspan>`).join("") + (e.sub ? `<tspan ${ci({
4087
+ "font-size": si(r * je),
4088
+ dy: si(r * Me)
4089
+ })}>${oi(e.sub)}</tspan>` : "");
4090
+ return [`<text ${ci({
4078
4091
  ...t,
4079
4092
  fill: i("paper"),
4080
4093
  stroke: i("paper"),
4081
4094
  "stroke-width": 4,
4082
4095
  "stroke-linejoin": "round"
4083
- })}>${a}</text>`, `<text ${oi({
4096
+ })}>${a}</text>`, `<text ${ci({
4084
4097
  ...t,
4085
4098
  fill: i(e.tone)
4086
4099
  })}>${a}</text>`];
4087
4100
  }, c = bt.flatMap((t) => [...e.paths.filter((e) => e.group === t && !e.hitArea).map(a), ...e.circles.filter((e) => e.group === t).map(o)]), l = bt.flatMap((t) => e.texts.filter((e) => e.group === t).flatMap(s));
4088
4101
  return [...c, ...l].join("\n");
4089
- }, li = (e, t, n = {}) => {
4102
+ }, di = (e, t, n = {}) => {
4090
4103
  let r = {
4091
- ...ri,
4104
+ ...ai,
4092
4105
  ...n.colors
4093
4106
  }.paper;
4094
4107
  return [
4095
- `<svg ${oi({
4108
+ `<svg ${ci({
4096
4109
  xmlns: "http://www.w3.org/2000/svg",
4097
4110
  width: t.width,
4098
4111
  height: t.height,
4099
4112
  viewBox: `0 0 ${t.width} ${t.height}`,
4100
4113
  "font-family": n.fontFamily ?? "Helvetica, Arial, sans-serif"
4101
4114
  })}>`,
4102
- ...n.title ? [`<title>${ii(n.title)}</title>`] : [],
4115
+ ...n.title ? [`<title>${oi(n.title)}</title>`] : [],
4103
4116
  ...n.background === !1 ? [] : [`<rect width="100%" height="100%" fill="${r}"/>`],
4104
- ci(e, n),
4117
+ ui(e, n),
4105
4118
  "</svg>",
4106
4119
  ""
4107
4120
  ].join("\n");
4108
4121
  };
4109
- export { Wn as DEFAULT_COLORS, vt as DEFAULT_NUMBER_FORMAT, Jn as DEFAULT_PLOT_TEXTS, xt as DEFAULT_TEMPERATURE_SYMBOLS, ti as DiagramStack, ni as EduBeamPlot, Ct as HATCH_SPACING_PX, gt as KN_UNITS, Kn as PLOT_CSS, bt as PLOT_LAYERS, Yn as PLOT_TEXTS, ri as PRINT_COLORS, St as RESULT_LAYERS, ht as SI_UNITS, hr as StructurePlot, Nn as alternativeResultGroups, gr as beamLine, Mn as buildStructureScene, I as cleanPiecewise, jn as defaultResultLayer, kn as diagramScales, fn as diagramSide, A as evalPiece, j as evalPieceSlope, ce as extremes, N as fitPiece, ze as fitScene, Y as formatNumber, yt as formatQuantity, Vn as formatReadout, mt as glyphReach, se as innerBreaks, Sn as isBarStructure, ae as isZero, Pn as layoutStructure, _r as lineDiagram, vr as lineModel, F as maxAbs, Ze as memberFrame, An as memberFrames, Je as mergePaths, Ce as modelFromSolver, Xe as nodeMap, L as pieceDegree, R as pieceExtrema, V as pieceToBeziers, qe as placeLabels, Un as placeReadoutTags, Qe as pointAlong, yr as pointLoadAt, K as project, In as readMember, Ln as readoutAt, zn as readoutMarks, Ye as resolveScene, _t as resolveUnits, wr as rowBreaks, xr as rowOrdinates, br as rowOutline, Cr as rowPeaks, Sr as rowRange, Re as sceneBounds, ci as sceneMarkup, li as sceneSvg, B as slopeAt, si as structureSvg, st as supportGlyph, $e as supportKind, ft as supportPlacement, ke as textRuns, vn as tipPlacements, Gn as toneVars, Xn as usePlotTexts, z as valueAt };
4122
+ export { Kn as DEFAULT_COLORS, vt as DEFAULT_NUMBER_FORMAT, Xn as DEFAULT_PLOT_TEXTS, xt as DEFAULT_TEMPERATURE_SYMBOLS, ri as DiagramStack, ii as EduBeamPlot, Ct as HATCH_SPACING_PX, gt as KN_UNITS, Jn as PLOT_CSS, bt as PLOT_LAYERS, Zn as PLOT_TEXTS, ai as PRINT_COLORS, St as RESULT_LAYERS, ht as SI_UNITS, _r as StructurePlot, Fn as alternativeResultGroups, vr as beamLine, Pn as buildStructureScene, I as cleanPiecewise, Nn as defaultResultLayer, jn as diagramScales, fn as diagramSide, A as evalPiece, j as evalPieceSlope, ce as extremes, N as fitPiece, ze as fitScene, Y as formatNumber, yt as formatQuantity, Un as formatReadout, mt as glyphReach, se as innerBreaks, Sn as isBarStructure, ae as isZero, In as layoutStructure, yr as lineDiagram, br as lineModel, F as maxAbs, Ze as memberFrame, Mn as memberFrames, Je as mergePaths, Ce as modelFromSolver, Xe as nodeMap, L as pieceDegree, R as pieceExtrema, V as pieceToBeziers, qe as placeLabels, Gn as placeReadoutTags, Qe as pointAlong, xr as pointLoadAt, K as project, Rn as readMember, zn as readoutAt, Vn as readoutMarks, Ye as resolveScene, _t as resolveUnits, Er as rowBreaks, Cr as rowOrdinates, Sr as rowOutline, Tr as rowPeaks, wr as rowRange, Re as sceneBounds, ui as sceneMarkup, di as sceneSvg, B as slopeAt, li as structureSvg, st as supportGlyph, $e as supportKind, ft as supportPlacement, ke as textRuns, vn as tipPlacements, qn as toneVars, Qn as usePlotTexts, z as valueAt };
4110
4123
 
4111
4124
  //# sourceMappingURL=index.js.map