@groupviz/react 2.1.1 → 2.1.3

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/index.js CHANGED
@@ -1090,7 +1090,7 @@ var je = {
1090
1090
  "theme.viewWindowDark": "视图窗口切换为浅色",
1091
1091
  "theme.viewWindowLight": "视图窗口切换为深色",
1092
1092
  "welcome.subtitle": "群论可视化平台",
1093
- "welcome.version": "v2.1.1",
1093
+ "welcome.version": "v2.1.3",
1094
1094
  "welcome.tagline": "探索抽象代数的对称之美 — 交互式群论可视化与学习工具",
1095
1095
  "welcome.enter": "进入应用",
1096
1096
  "welcome.section.done": "已实现",
@@ -1719,7 +1719,7 @@ var je = {
1719
1719
  "theme.viewWindowDark": "View windows: switch to light",
1720
1720
  "theme.viewWindowLight": "View windows: switch to dark",
1721
1721
  "welcome.subtitle": "Group Theory Visualization Platform",
1722
- "welcome.version": "v2.1.1",
1722
+ "welcome.version": "v2.1.3",
1723
1723
  "welcome.tagline": "Explore the beauty of symmetry in abstract algebra — Interactive group theory visualization & learning tool",
1724
1724
  "welcome.enter": "Enter",
1725
1725
  "welcome.section.done": "Implemented",
@@ -5032,11 +5032,8 @@ function Ft(e) {
5032
5032
  edges: a
5033
5033
  };
5034
5034
  }
5035
- var It = /* @__PURE__ */ new Map(), Lt = /* @__PURE__ */ new Map();
5036
- function Rt(e, t) {
5037
- return `${t}:${e.vertices.map((e) => `${e.x.toFixed(4)},${e.y.toFixed(4)},${e.z.toFixed(4)}`).join("|")}:${e.edges.map((e) => e.join("-")).join("|")}`;
5038
- }
5039
- function zt(e) {
5035
+ var It = /* @__PURE__ */ new Map();
5036
+ function Lt(e) {
5040
5037
  let t = e * 1, n = e * .55;
5041
5038
  return {
5042
5039
  vertices: [
@@ -5053,7 +5050,7 @@ function zt(e) {
5053
5050
  ]
5054
5051
  };
5055
5052
  }
5056
- function Bt(e) {
5053
+ function Rt(e) {
5057
5054
  let t = [
5058
5055
  new J.Vector3(e, 0, 0),
5059
5056
  new J.Vector3(-e, 0, 0),
@@ -5068,7 +5065,7 @@ function Bt(e) {
5068
5065
  edges: n
5069
5066
  };
5070
5067
  }
5071
- function Vt(e) {
5068
+ function zt(e) {
5072
5069
  let t = (1 + Math.sqrt(5)) / 2, n = 1 / t, r = t, i = [];
5073
5070
  for (let e of [-1, 1]) for (let t of [-1, 1]) for (let n of [-1, 1]) i.push([
5074
5071
  e * 1,
@@ -5097,10 +5094,10 @@ function Vt(e) {
5097
5094
  edges: l
5098
5095
  };
5099
5096
  }
5100
- function Ht(e, t) {
5097
+ function Bt(e, t) {
5101
5098
  return `hsl(${e / t * 360}, 70%, 60%)`;
5102
5099
  }
5103
- function Ut(e) {
5100
+ function Vt(e) {
5104
5101
  let t = `${e.vertices.length}:${e.edges.map((e) => e.join("-")).join("|")}`, n = It.get(t);
5105
5102
  if (n) return n;
5106
5103
  let r = /* @__PURE__ */ new Map();
@@ -5133,7 +5130,7 @@ function Ut(e) {
5133
5130
  }
5134
5131
  return It.set(t, a), a;
5135
5132
  }
5136
- function Wt(e) {
5133
+ function Ht(e) {
5137
5134
  let t = e.vertices[0].length() / Math.sqrt(3);
5138
5135
  return [
5139
5136
  new J.Vector3(t, 0, 0),
@@ -5144,13 +5141,13 @@ function Wt(e) {
5144
5141
  new J.Vector3(0, 0, -t)
5145
5142
  ];
5146
5143
  }
5147
- function Gt(e, t) {
5144
+ function Ut(e, t) {
5148
5145
  let n = [];
5149
5146
  if (t.length > 0 && e.vertices.length <= 12) {
5150
5147
  for (let [r, i, a] of t) n.push(e.vertices[r].clone().add(e.vertices[i]).add(e.vertices[a]).multiplyScalar(1 / 3));
5151
5148
  return n;
5152
5149
  }
5153
- if (e.vertices.length === 8) return Wt(e);
5150
+ if (e.vertices.length === 8) return Ht(e);
5154
5151
  if (e.vertices.length >= 20) {
5155
5152
  let t = /* @__PURE__ */ new Map();
5156
5153
  for (let n = 0; n < e.vertices.length; n++) t.set(n, /* @__PURE__ */ new Set());
@@ -5185,188 +5182,10 @@ function Gt(e, t) {
5185
5182
  }
5186
5183
  return [];
5187
5184
  }
5188
- function Kt(e, t) {
5189
- let n = Rt(e, t), r = Lt.get(n);
5190
- if (r) return r;
5191
- let i = {
5192
- vertexAxes: [],
5193
- faceAxes: [],
5194
- edgeAxes: []
5195
- }, a = /* @__PURE__ */ new Set();
5196
- function o(e, t) {
5197
- let n = [
5198
- Math.round(e.x * 1e6) / 1e6,
5199
- Math.round(e.y * 1e6) / 1e6,
5200
- Math.round(e.z * 1e6) / 1e6
5201
- ], r = n.join(","), i = n.map((e) => -e).join(",");
5202
- a.has(r) || a.has(i) || (a.add(r), t.push([
5203
- e.x,
5204
- e.y,
5205
- e.z
5206
- ]));
5207
- }
5208
- if (t === "tetrahedron") {
5209
- for (let t of e.vertices) o(t.clone().normalize(), i.vertexAxes);
5210
- i.edgeAxes = [
5211
- [
5212
- 1,
5213
- 0,
5214
- 0
5215
- ],
5216
- [
5217
- 0,
5218
- 1,
5219
- 0
5220
- ],
5221
- [
5222
- 0,
5223
- 0,
5224
- 1
5225
- ]
5226
- ];
5227
- } else if (t === "cube") i.faceAxes = [
5228
- [
5229
- 1,
5230
- 0,
5231
- 0
5232
- ],
5233
- [
5234
- 0,
5235
- 1,
5236
- 0
5237
- ],
5238
- [
5239
- 0,
5240
- 0,
5241
- 1
5242
- ]
5243
- ], i.vertexAxes = [
5244
- [
5245
- 1,
5246
- 1,
5247
- 1
5248
- ],
5249
- [
5250
- 1,
5251
- -1,
5252
- -1
5253
- ],
5254
- [
5255
- -1,
5256
- 1,
5257
- -1
5258
- ],
5259
- [
5260
- -1,
5261
- -1,
5262
- 1
5263
- ]
5264
- ].map((e) => [
5265
- e[0] / Math.sqrt(3),
5266
- e[1] / Math.sqrt(3),
5267
- e[2] / Math.sqrt(3)
5268
- ]), i.edgeAxes = [
5269
- [
5270
- 1,
5271
- 1,
5272
- 0
5273
- ],
5274
- [
5275
- 1,
5276
- 0,
5277
- 1
5278
- ],
5279
- [
5280
- 0,
5281
- 1,
5282
- 1
5283
- ],
5284
- [
5285
- 1,
5286
- -1,
5287
- 0
5288
- ],
5289
- [
5290
- 1,
5291
- 0,
5292
- -1
5293
- ],
5294
- [
5295
- 0,
5296
- 1,
5297
- -1
5298
- ]
5299
- ].map((e) => [
5300
- e[0] / Math.sqrt(2),
5301
- e[1] / Math.sqrt(2),
5302
- e[2] / Math.sqrt(2)
5303
- ]);
5304
- else if (t === "icosahedron") {
5305
- let t = e.vertices.length >= 20;
5306
- for (let t of e.vertices) o(t.clone().normalize(), i.vertexAxes);
5307
- let n = Gt(e, Ut(e));
5308
- for (let e of n) o(e.clone().normalize(), i.faceAxes);
5309
- for (let [t, n] of e.edges) o(e.vertices[t].clone().add(e.vertices[n]).multiplyScalar(.5).clone().normalize(), i.edgeAxes);
5310
- if (t) {
5311
- let e = i.vertexAxes;
5312
- i.vertexAxes = i.faceAxes, i.faceAxes = e;
5313
- }
5314
- }
5315
- return Lt.set(n, i), i;
5316
- }
5317
- function qt(e, t) {
5318
- if (t === "1") return "identity";
5319
- if (e.startsWith("C")) return "face";
5320
- if (e.startsWith("D")) return t === "1-1" || t === "1" ? null : "vertex";
5321
- if (e === "S_{4}") {
5322
- if (t === "4" || t === "2-2") return "face";
5323
- if (t === "3") return "vertex";
5324
- if (t === "2") return "edge";
5325
- }
5326
- if (e === "A_{4}") {
5327
- if (t === "3") return "vertex";
5328
- if (t === "2-2") return "edge";
5329
- }
5330
- if (e === "A_{5}") {
5331
- if (t === "5") return "vertex";
5332
- if (t === "3") return "face";
5333
- if (t === "2-2") return "edge";
5334
- }
5335
- return null;
5336
- }
5337
- function Jt(e, t, n, r) {
5338
- let i = C(e, t);
5339
- if (!i) return null;
5340
- if (i.angleRad === 0) return i;
5341
- let a = t.value, o = (() => {
5342
- let e = a.length;
5343
- if (e < 2) return "1";
5344
- let t = Array(e).fill(!1), n = [], r = a.map((e) => e - 1);
5345
- for (let i = 0; i < e; i++) {
5346
- if (t[i]) continue;
5347
- let e = 0, a = i;
5348
- for (; !t[a];) t[a] = !0, a = r[a], e++;
5349
- e > 1 && n.push(e);
5350
- }
5351
- return n.sort().join("-") || "1";
5352
- })(), s = qt(e.symbol, o);
5353
- if (!s || s === "identity") return i;
5354
- let c = Kt(n, r), l = t.id, u;
5355
- if (u = s === "vertex" ? c.vertexAxes : s === "face" ? c.faceAxes : c.edgeAxes, u.length === 0) return i;
5356
- let d = 0;
5357
- for (let e = 0; e < l.length; e++) d = (d << 5) - d + l.charCodeAt(e) | 0;
5358
- let f = Math.abs(d) % u.length, p = u[f];
5359
- return {
5360
- axis: [
5361
- p[0],
5362
- p[1],
5363
- p[2]
5364
- ],
5365
- angleRad: i.angleRad,
5366
- label: i.label
5367
- };
5185
+ function Wt(e, t) {
5186
+ return C(e, t);
5368
5187
  }
5369
- function Yt({ group: e, symmetryType: t, dark: n = !1, variant: r = !1, showAction: i = !1, actionElementId: a = null, rotateSpeed: o = 1, showFigureTitle: s = !0, locked: l = !1, onHint: u, hintOnIdle: d = !0, replaySignal: m = 0, theme: h, lockCameraOnAction: g = !1, onAnimationEnd: _ }) {
5188
+ function Gt({ group: e, symmetryType: t, dark: n = !1, variant: r = !1, showAction: i = !1, actionElementId: a = null, rotateSpeed: o = 1, showFigureTitle: s = !0, locked: l = !1, onHint: u, hintOnIdle: d = !0, replaySignal: m = 0, theme: h, lockCameraOnAction: g = !1, onAnimationEnd: _ }) {
5370
5189
  let v = t ?? z(e), y = h ? h === "dark" : n, b = c(() => {
5371
5190
  switch (v) {
5372
5191
  case "cyclic": return jt(e.order, 4);
@@ -5375,9 +5194,9 @@ function Yt({ group: e, symmetryType: t, dark: n = !1, variant: r = !1, showActi
5375
5194
  return Mt(Math.round(t), 4);
5376
5195
  }
5377
5196
  case "tetrahedron": return Nt(4);
5378
- case "cube": return r ? Bt(4) : Pt(4);
5379
- case "icosahedron": return r ? Vt(4) : Ft(4);
5380
- case "rectangle": return zt(4);
5197
+ case "cube": return r ? Rt(4) : Pt(4);
5198
+ case "icosahedron": return r ? zt(4) : Ft(4);
5199
+ case "rectangle": return Lt(4);
5381
5200
  default: return jt(1, 4);
5382
5201
  }
5383
5202
  }, [
@@ -5385,7 +5204,7 @@ function Yt({ group: e, symmetryType: t, dark: n = !1, variant: r = !1, showActi
5385
5204
  v,
5386
5205
  r
5387
5206
  ]);
5388
- if (v === "unsupported") return /* @__PURE__ */ f(en, { group: e });
5207
+ if (v === "unsupported") return /* @__PURE__ */ f(Xt, { group: e });
5389
5208
  let x = y ? "#0a0a1a" : "#f4f4f7";
5390
5209
  return /* @__PURE__ */ f("div", {
5391
5210
  style: {
@@ -5412,7 +5231,7 @@ function Yt({ group: e, symmetryType: t, dark: n = !1, variant: r = !1, showActi
5412
5231
  children: [/* @__PURE__ */ f("color", {
5413
5232
  attach: "background",
5414
5233
  args: [x]
5415
- }), /* @__PURE__ */ f($t, {
5234
+ }), /* @__PURE__ */ f(Yt, {
5416
5235
  group: e,
5417
5236
  symmetryType: v,
5418
5237
  data: b,
@@ -5432,7 +5251,7 @@ function Yt({ group: e, symmetryType: t, dark: n = !1, variant: r = !1, showActi
5432
5251
  })
5433
5252
  });
5434
5253
  }
5435
- function Xt(e, t, n, r, i) {
5254
+ function Kt(e, t, n, r, i) {
5436
5255
  let o = l({
5437
5256
  target: null,
5438
5257
  t: 2,
@@ -5462,16 +5281,16 @@ function Xt(e, t, n, r, i) {
5462
5281
  }
5463
5282
  }), o;
5464
5283
  }
5465
- function Zt({ data: e, symmetryType: t, isDirected: n, animState: r }) {
5284
+ function qt({ data: e, symmetryType: t, isDirected: n, animState: r }) {
5466
5285
  let [i] = u(() => new J.Group());
5467
5286
  return a(() => {
5468
5287
  for (; i.children.length > 0;) i.remove(i.children[0]);
5469
5288
  if (e.vertices.forEach((t, n) => {
5470
5289
  let r = new J.Mesh(new J.SphereGeometry(.28, 16, 16), new J.MeshStandardMaterial({
5471
- color: Ht(n, e.vertices.length),
5290
+ color: Bt(n, e.vertices.length),
5472
5291
  roughness: .3,
5473
5292
  metalness: .1,
5474
- emissive: Ht(n, e.vertices.length),
5293
+ emissive: Bt(n, e.vertices.length),
5475
5294
  emissiveIntensity: .3
5476
5295
  }));
5477
5296
  r.position.copy(t), i.add(r);
@@ -5490,7 +5309,7 @@ function Zt({ data: e, symmetryType: t, isDirected: n, animState: r }) {
5490
5309
  "cube",
5491
5310
  "icosahedron"
5492
5311
  ].includes(t)) {
5493
- let n = t === "cube" ? "#ff9944" : t === "tetrahedron" ? "#44cc88" : "#cc66ff", r = Ut(e);
5312
+ let n = t === "cube" ? "#ff9944" : t === "tetrahedron" ? "#44cc88" : "#cc66ff", r = Vt(e);
5494
5313
  if (r.length > 0) {
5495
5314
  let t = [], a = [];
5496
5315
  for (let [n, i, o] of r) {
@@ -5516,7 +5335,7 @@ function Zt({ data: e, symmetryType: t, isDirected: n, animState: r }) {
5516
5335
  i.quaternion.copy(r.current.currentQuat);
5517
5336
  }), /* @__PURE__ */ f("primitive", { object: i });
5518
5337
  }
5519
- function Qt({ from: e, to: t, intersections: n }) {
5338
+ function Jt({ from: e, to: t, intersections: n }) {
5520
5339
  let r = c(() => e.clone().add(t).multiplyScalar(.5), [e, t]), i = c(() => t.clone().sub(e).normalize(), [e, t]), a = c(() => t.distanceTo(e), [e, t]), o = c(() => {
5521
5340
  let e = new J.Quaternion();
5522
5341
  return e.setFromUnitVectors(new J.Vector3(0, 1, 0), i), e;
@@ -5567,20 +5386,19 @@ function Qt({ from: e, to: t, intersections: n }) {
5567
5386
  }, t))
5568
5387
  ] });
5569
5388
  }
5570
- function $t({ group: e, symmetryType: t, data: n, variant: r, showAction: i, actionElementId: o, rotateSpeed: s, showFigureTitle: l, dark: m, locked: h, onHint: g, hintOnIdle: _, replaySignal: v, lockCameraOnAction: y, onAnimationEnd: b }) {
5389
+ function Yt({ group: e, symmetryType: t, data: n, variant: r, showAction: i, actionElementId: o, rotateSpeed: s, showFigureTitle: l, dark: m, locked: h, onHint: g, hintOnIdle: _, replaySignal: v, lockCameraOnAction: y, onAnimationEnd: b }) {
5571
5390
  let { t: x } = Fe(), [S, C] = u("rest"), w = c(() => {
5572
5391
  if (!i || !o || !n) return null;
5573
- let r = Ce(e, o, "SymmetryViewScene.actionElementId");
5574
- if (!r) return null;
5575
- let a = Jt(e, r, n, t);
5576
- return !a || a.angleRad === 0 ? null : a;
5392
+ let t = Ce(e, o, "SymmetryViewScene.actionElementId");
5393
+ if (!t) return null;
5394
+ let r = Wt(e, t);
5395
+ return !r || r.angleRad === 0 ? null : r;
5577
5396
  }, [
5578
5397
  i,
5579
5398
  o,
5580
5399
  e,
5581
- n,
5582
- t
5583
- ]), T = Xt(c(() => {
5400
+ n
5401
+ ]), T = Kt(c(() => {
5584
5402
  if (!w || w.angleRad === 0) return null;
5585
5403
  let e = new J.Quaternion();
5586
5404
  return e.setFromAxisAngle(new J.Vector3(...w.axis), w.angleRad), e;
@@ -5634,7 +5452,7 @@ function $t({ group: e, symmetryType: t, data: n, variant: r, showAction: i, act
5634
5452
  kind: "edge"
5635
5453
  });
5636
5454
  }
5637
- let r = Gt(n, Ut(n));
5455
+ let r = Ut(n, Vt(n));
5638
5456
  for (let n of r) {
5639
5457
  let r = n.dot(e), i = e.clone().multiplyScalar(r);
5640
5458
  n.distanceTo(i) < .25 && t.push({
@@ -5722,12 +5540,12 @@ function $t({ group: e, symmetryType: t, data: n, variant: r, showAction: i, act
5722
5540
  dangerouslySetInnerHTML: { __html: Z(t === "cyclic" ? x("symmetry.geo.cyclicText", { n: e.order }) : t === "dihedral" ? x("symmetry.geo.dihedralText", { n: e.order / 2 }) : x(t === "cube" ? r ? "symmetry.geo.octahedron" : "symmetry.geo.cube" : t === "icosahedron" ? r ? "symmetry.geo.dodecahedron" : "symmetry.geo.icosahedron" : "symmetry.geo." + t)) }
5723
5541
  })
5724
5542
  }),
5725
- M && /* @__PURE__ */ f(Qt, {
5543
+ M && /* @__PURE__ */ f(Jt, {
5726
5544
  from: F,
5727
5545
  to: P,
5728
5546
  intersections: I
5729
5547
  }),
5730
- /* @__PURE__ */ f(Zt, {
5548
+ /* @__PURE__ */ f(qt, {
5731
5549
  data: n,
5732
5550
  symmetryType: t,
5733
5551
  isDirected: k,
@@ -5775,7 +5593,7 @@ function $t({ group: e, symmetryType: t, data: n, variant: r, showAction: i, act
5775
5593
  })
5776
5594
  ] }) : null;
5777
5595
  }
5778
- function en({ group: e }) {
5596
+ function Xt({ group: e }) {
5779
5597
  let { t } = Fe();
5780
5598
  return /* @__PURE__ */ p("div", {
5781
5599
  style: {
@@ -5816,7 +5634,7 @@ function en({ group: e }) {
5816
5634
  }
5817
5635
  //#endregion
5818
5636
  //#region src/theme/ThemeContext.tsx
5819
- var tn = e({
5637
+ var Zt = e({
5820
5638
  theme: "dark",
5821
5639
  toggleTheme: () => {},
5822
5640
  viewWindowTheme: "dark",
@@ -5824,24 +5642,24 @@ var tn = e({
5824
5642
  });
5825
5643
  //#endregion
5826
5644
  //#region src/theme/useTheme.ts
5827
- function nn() {
5828
- return i(tn);
5645
+ function Qt() {
5646
+ return i(Zt);
5829
5647
  }
5830
5648
  //#endregion
5831
5649
  //#region src/utils/cayley3dControls.ts
5832
- var rn = null;
5833
- function an(e) {
5834
- rn = e;
5650
+ var $t = null;
5651
+ function en(e) {
5652
+ $t = e;
5835
5653
  }
5836
- function on(e) {
5837
- rn === e && (rn = null);
5654
+ function tn(e) {
5655
+ $t === e && ($t = null);
5838
5656
  }
5839
5657
  //#endregion
5840
5658
  //#region src/components/Canvas/Cayley3DScene.tsx
5841
- function sn(e, t, n) {
5659
+ function nn(e, t, n) {
5842
5660
  return n ? `hsl(${e / t * 360}, 60%, 55%)` : `hsl(${e * 137.508 % 360}, 65%, 55%)`;
5843
5661
  }
5844
- var cn = n(function({ position: e, label: t, color: n, isSelected: r, isHovered: i, subsetColor: a, element: o, nodeScale: s, showLabel: l, isDark: u, onSelectElement: d, onPointerEnter: m, onPointerLeave: h }) {
5662
+ var rn = n(function({ position: e, label: t, color: n, isSelected: r, isHovered: i, subsetColor: a, element: o, nodeScale: s, showLabel: l, isDark: u, onSelectElement: d, onPointerEnter: m, onPointerLeave: h }) {
5845
5663
  let g = c(() => Z(Y(t)), [t]), _ = r || i, v = _ ? 24 : 12;
5846
5664
  return /* @__PURE__ */ p("group", {
5847
5665
  position: e,
@@ -5907,7 +5725,7 @@ var cn = n(function({ position: e, label: t, color: n, isSelected: r, isHovered:
5907
5725
  })
5908
5726
  ]
5909
5727
  });
5910
- }), ln = n(function({ start: e, end: t, color: n, isHighlighted: r }) {
5728
+ }), an = n(function({ start: e, end: t, color: n, isHighlighted: r }) {
5911
5729
  let i = l(null), o = new J.Vector3().subVectors(t, e), s = o.length();
5912
5730
  o.normalize();
5913
5731
  let c = new J.Vector3().addVectors(e, t).multiplyScalar(.5), u = r ? .08 : .05;
@@ -5932,7 +5750,7 @@ var cn = n(function({ position: e, label: t, color: n, isSelected: r, isHovered:
5932
5750
  roughness: .4
5933
5751
  })]
5934
5752
  });
5935
- }), un = n(function({ position: e, direction: t, color: n, isHighlighted: r }) {
5753
+ }), on = n(function({ position: e, direction: t, color: n, isHighlighted: r }) {
5936
5754
  return /* @__PURE__ */ p("mesh", {
5937
5755
  position: e,
5938
5756
  quaternion: c(() => {
@@ -5951,7 +5769,7 @@ var cn = n(function({ position: e, label: t, color: n, isSelected: r, isHovered:
5951
5769
  roughness: .4
5952
5770
  })]
5953
5771
  });
5954
- }), dn = n(function({ start: e, end: t, color: n, isHighlighted: r, isSelfLoop: i, isBidirectional: a, showArrow: o }) {
5772
+ }), sn = n(function({ start: e, end: t, color: n, isHighlighted: r, isSelfLoop: i, isBidirectional: a, showArrow: o }) {
5955
5773
  if (i) return /* @__PURE__ */ p("group", {
5956
5774
  position: e,
5957
5775
  children: [/* @__PURE__ */ p("mesh", {
@@ -5996,20 +5814,20 @@ var cn = n(function({ position: e, label: t, color: n, isSelected: r, isHovered:
5996
5814
  })]
5997
5815
  });
5998
5816
  let s = new J.Vector3().subVectors(t, e);
5999
- return s.normalize(), /* @__PURE__ */ p("group", { children: [/* @__PURE__ */ f(ln, {
5817
+ return s.normalize(), /* @__PURE__ */ p("group", { children: [/* @__PURE__ */ f(an, {
6000
5818
  start: e,
6001
5819
  end: t,
6002
5820
  color: n,
6003
5821
  isHighlighted: r
6004
- }), o && !a && /* @__PURE__ */ f(un, {
5822
+ }), o && !a && /* @__PURE__ */ f(on, {
6005
5823
  position: t.clone().addScaledVector(s, -.66),
6006
5824
  direction: s,
6007
5825
  color: n,
6008
5826
  isHighlighted: r
6009
5827
  })] });
6010
- }), fn = () => {};
6011
- function pn({ group: e, selectedElements: t, onSelectElement: n, actions: i, multiplyType: o, layout3D: s, nodeScale: m, autoRotate: h, showLabels: _, locked: y = !1, subsetHighlights: S = [], theme: C = "dark", faceFill: w }) {
6012
- let { t: T } = Fe(), { gl: E, camera: D, scene: O } = oe(), k = c(() => Ee(e, i), [e, i]), A = o ?? "right", j = s ?? P(e), M = m ?? 1, N = _ !== !1, F = n ?? fn, [I, L] = u(!1), R = h ?? I, [z, ee] = u(null), B = l({
5828
+ }), cn = () => {};
5829
+ function ln({ group: e, selectedElements: t, onSelectElement: n, actions: i, multiplyType: o, layout3D: s, nodeScale: m, autoRotate: h, showLabels: _, locked: y = !1, subsetHighlights: S = [], theme: C = "dark", faceFill: w }) {
5830
+ let { t: T } = Fe(), { gl: E, camera: D, scene: O } = oe(), k = c(() => Ee(e, i), [e, i]), A = o ?? "right", j = s ?? P(e), M = m ?? 1, N = _ !== !1, F = n ?? cn, [I, L] = u(!1), R = h ?? I, [z, ee] = u(null), B = l({
6013
5831
  theta: 0,
6014
5832
  phi: Math.acos(3 / Math.sqrt(153)),
6015
5833
  radius: Math.sqrt(153),
@@ -6192,7 +6010,7 @@ function pn({ group: e, selectedElements: t, onSelectElement: n, actions: i, mul
6192
6010
  e.active = !1, e.renderer?.dispose(), e.renderer = null, e.ecam = null;
6193
6011
  }
6194
6012
  };
6195
- return an(e), () => on(e);
6013
+ return en(e), () => tn(e);
6196
6014
  }, [
6197
6015
  E,
6198
6016
  O,
@@ -6452,7 +6270,7 @@ function pn({ group: e, selectedElements: t, onSelectElement: n, actions: i, mul
6452
6270
  let n = pe.get(e.fromId), r = pe.get(e.toId);
6453
6271
  if (!n || !r) return null;
6454
6272
  let i = t.has(n.id) || t.has(r.id);
6455
- return /* @__PURE__ */ f(dn, {
6273
+ return /* @__PURE__ */ f(sn, {
6456
6274
  start: e.fromPos,
6457
6275
  end: e.toPos,
6458
6276
  color: e.gen.color,
@@ -6466,10 +6284,10 @@ function pn({ group: e, selectedElements: t, onSelectElement: n, actions: i, mul
6466
6284
  let i = e.elements[r];
6467
6285
  if (U && !re.has(i.id)) return null;
6468
6286
  let a = t.has(i.id), o = he.get(i.id);
6469
- return /* @__PURE__ */ f(cn, {
6287
+ return /* @__PURE__ */ f(rn, {
6470
6288
  position: n,
6471
6289
  label: i.label,
6472
- color: sn(r, e.order, e.isAbelian),
6290
+ color: nn(r, e.order, e.isAbelian),
6473
6291
  isSelected: a,
6474
6292
  isHovered: z?.id === i.id,
6475
6293
  subsetColor: o ? o.color : null,
@@ -6484,8 +6302,8 @@ function pn({ group: e, selectedElements: t, onSelectElement: n, actions: i, mul
6484
6302
  })
6485
6303
  ] });
6486
6304
  }
6487
- function mn(e) {
6488
- let { group: t, theme: n } = e, { t: r } = Fe(), { theme: i } = nn(), a = n ?? i;
6305
+ function un(e) {
6306
+ let { group: t, theme: n } = e, { t: r } = Fe(), { theme: i } = Qt(), a = n ?? i;
6489
6307
  if (!t) return /* @__PURE__ */ f("div", {
6490
6308
  className: "view-empty",
6491
6309
  children: /* @__PURE__ */ f("p", { children: r("canvas.noGroup") })
@@ -6520,7 +6338,7 @@ function mn(e) {
6520
6338
  children: [/* @__PURE__ */ f("color", {
6521
6339
  attach: "background",
6522
6340
  args: [o]
6523
- }), /* @__PURE__ */ f(pn, {
6341
+ }), /* @__PURE__ */ f(ln, {
6524
6342
  ...e,
6525
6343
  group: t,
6526
6344
  theme: a
@@ -6530,7 +6348,7 @@ function mn(e) {
6530
6348
  }
6531
6349
  //#endregion
6532
6350
  //#region src/components/Canvas/SublatticeScene.tsx
6533
- var hn = {
6351
+ var dn = {
6534
6352
  derived: {
6535
6353
  light: "#b8860b",
6536
6354
  dark: "#ffd93d"
@@ -6547,15 +6365,15 @@ var hn = {
6547
6365
  light: "#7c3aed",
6548
6366
  dark: "#c084fc"
6549
6367
  }
6550
- }, gn = {
6368
+ }, fn = {
6551
6369
  w: 104,
6552
6370
  h: 28,
6553
6371
  font: 13
6554
- }, _n = 8, vn = 11;
6555
- function yn(e, t, n) {
6372
+ }, pn = 8, mn = 11;
6373
+ function hn(e, t, n) {
6556
6374
  return Math.min(e / Math.max(t, 1e-4), n);
6557
6375
  }
6558
- function bn(e) {
6376
+ function gn(e) {
6559
6377
  return e === "light" ? {
6560
6378
  edge: "#a9adbc",
6561
6379
  edgeOpacity: .95,
@@ -6608,12 +6426,12 @@ function bn(e) {
6608
6426
  seriesBadgeText: "#111"
6609
6427
  };
6610
6428
  }
6611
- function xn(e, t) {
6429
+ function _n(e, t) {
6612
6430
  let n = Array.from({ length: e }, () => []);
6613
6431
  for (let r of t) r.from >= 0 && r.from < e && r.to >= 0 && r.to < e && (n[r.from].push(r.to), n[r.to].push(r.from));
6614
6432
  return n;
6615
6433
  }
6616
- function Sn(e, t, n) {
6434
+ function vn(e, t, n) {
6617
6435
  if (t === n) return [t];
6618
6436
  let r = /* @__PURE__ */ new Set(), i = [[t]];
6619
6437
  for (; i.length > 0;) {
@@ -6626,8 +6444,8 @@ function Sn(e, t, n) {
6626
6444
  }
6627
6445
  return null;
6628
6446
  }
6629
- function Cn({ group: e, series: t, color: n, theme: r }) {
6630
- let { t: i } = Fe(), { theme: a } = nn(), o = r ?? a, { type: s, terms: c, factors: l, solvable: u, nilpotent: m, chainCount: h, truncated: g, loading: _ } = t, v = c ? c.map((t, n) => {
6447
+ function yn({ group: e, series: t, color: n, theme: r }) {
6448
+ let { t: i } = Fe(), { theme: a } = Qt(), o = r ?? a, { type: s, terms: c, factors: l, solvable: u, nilpotent: m, chainCount: h, truncated: g, loading: _ } = t, v = c ? c.map((t, n) => {
6631
6449
  let r = t.length === 1 ? "\\langle e \\rangle" : t.length === e.order ? Y(e.symbol) : `N_{${n}}`;
6632
6450
  return (n === 0 ? "" : " \\trianglerighteq ") + r;
6633
6451
  }).join("") : "", y = c ? c.map((e, t) => `|N_{${t}}| = ${e.length}`).join(",\\;") : "", b = l ? l.map((e, t) => `N_{${t}}/N_{${t + 1}} \\cong ${e.label}`).join(",\\;") : "", x = l ? [...l].sort((e, t) => e.order - t.order || e.label.localeCompare(t.label)).map((e) => e.label).join(", ") : "", S = o === "light" ? "#15803d" : "#4ade80", C = o === "light" ? "#0369a1" : "#38bdf8";
@@ -6736,8 +6554,8 @@ function Cn({ group: e, series: t, color: n, theme: r }) {
6736
6554
  })
6737
6555
  });
6738
6556
  }
6739
- function wn({ group: e, lattice: t, canvasTransform: n, availableSize: r, labelDetail: i = "auto", mergeConjugates: a = !1, nodeScale: o = 1, showSeriesPanel: d = !0, series: m = null, centerIds: h, subsets: g, activeNodeIdx: _, onActivateNode: v, noGroupText: y, theme: b, maxEnumerateOrder: x = 60 }) {
6740
- let { t: S } = Fe(), { theme: C } = nn(), w = b ?? C, E = c(() => bn(w), [w]), O = l(null), [k, A] = u({
6557
+ function bn({ group: e, lattice: t, canvasTransform: n, availableSize: r, labelDetail: i = "auto", mergeConjugates: a = !1, nodeScale: o = 1, showSeriesPanel: d = !0, series: m = null, centerIds: h, subsets: g, activeNodeIdx: _, onActivateNode: v, noGroupText: y, theme: b, maxEnumerateOrder: x = 60 }) {
6558
+ let { t: S } = Fe(), { theme: C } = Qt(), w = b ?? C, E = c(() => gn(w), [w]), O = l(null), [k, A] = u({
6741
6559
  width: 0,
6742
6560
  height: 0
6743
6561
  });
@@ -6803,7 +6621,7 @@ function wn({ group: e, lattice: t, canvasTransform: n, availableSize: r, labelD
6803
6621
  slotScreenWidth: n,
6804
6622
  rowScreenHeight: r,
6805
6623
  tier: a,
6806
- edgeWidth: a === "full" ? E.edgeWidth : yn(1.7, t, H.nodeRx * .1)
6624
+ edgeWidth: a === "full" ? E.edgeWidth : hn(1.7, t, H.nodeRx * .1)
6807
6625
  };
6808
6626
  }, [
6809
6627
  M,
@@ -6831,9 +6649,9 @@ function wn({ group: e, lattice: t, canvasTransform: n, availableSize: r, labelD
6831
6649
  t.set(e, n);
6832
6650
  }
6833
6651
  return t;
6834
- }, [e]), [J, le] = u(null), ue = _ ?? J, [de, fe] = u(null), pe = c(() => xn(L.length, R), [L, R]), me = c(() => {
6652
+ }, [e]), [J, le] = u(null), ue = _ ?? J, [de, fe] = u(null), pe = c(() => _n(L.length, R), [L, R]), me = c(() => {
6835
6653
  if (ue === null || L.length === 0) return /* @__PURE__ */ new Set();
6836
- let e = /* @__PURE__ */ new Set(), t = q >= 0 ? Sn(pe, ue, q) : null, n = ae >= 0 ? Sn(pe, ue, ae) : null;
6654
+ let e = /* @__PURE__ */ new Set(), t = q >= 0 ? vn(pe, ue, q) : null, n = ae >= 0 ? vn(pe, ue, ae) : null;
6837
6655
  return t && t.forEach((t) => e.add(t)), n && n.forEach((t) => e.add(t)), e;
6838
6656
  }, [
6839
6657
  ue,
@@ -6851,7 +6669,7 @@ function wn({ group: e, lattice: t, canvasTransform: n, availableSize: r, labelD
6851
6669
  return e;
6852
6670
  }, [me, R]), Q = c(() => {
6853
6671
  if (!m) return null;
6854
- let e = hn[m.type];
6672
+ let e = dn[m.type];
6855
6673
  return w === "light" ? e.light : e.dark;
6856
6674
  }, [m, w]), he = c(() => {
6857
6675
  let e = /* @__PURE__ */ new Map();
@@ -6866,7 +6684,7 @@ function wn({ group: e, lattice: t, canvasTransform: n, availableSize: r, labelD
6866
6684
  r !== void 0 && !e.has(r) && e.set(r, n);
6867
6685
  }), e;
6868
6686
  }, [m, he]), _e = c(() => new Set(ge.keys()), [ge]), ve = c(() => {
6869
- let e = W === "compact" ? yn(gn.h / 2, U, H.nodeRy * .9) : W === "dots" ? yn(_n, U, H.nodeRx * .42) : H.nodeRy;
6687
+ let e = W === "compact" ? hn(fn.h / 2, U, H.nodeRy * .9) : W === "dots" ? hn(pn, U, H.nodeRx * .42) : H.nodeRy;
6870
6688
  return R.map((t, n) => {
6871
6689
  let r = H.positions[t.from], i = H.positions[t.to];
6872
6690
  if (!r || !i) return null;
@@ -6896,7 +6714,7 @@ function wn({ group: e, lattice: t, canvasTransform: n, availableSize: r, labelD
6896
6714
  let r = H.positions[n];
6897
6715
  if (!r) return null;
6898
6716
  let i = t.orbitSize ?? 1, a = me.has(n), o = ue === n, s = t.order === 1, c = t.order === (e?.order ?? 0), l = n === se, u = t.order > 1 ? ce.get(t.order) : void 0, d = ge.get(n), h = !!m?.terms && d === void 0 && !_e.has(n), g = E.nodeFill, _ = t.isNormal ? E.nodeStrokeNormal : E.nodeStroke, y = 2.5, b = E.nodeText;
6899
- a && !(d !== void 0 && Q) && (g = E.pathFill, _ = E.pathStroke, y = 4, b = E.pathText), o && (g = E.activeFill, y = 4), l && !a && (g = E.centerFill, _ = E.centerStroke), s && !a && (g = E.trivialFill, _ = E.trivialStroke, y = 2), c && !a && (g = E.fullFill, _ = E.fullStroke), d !== void 0 && Q && (_ = Q, y = W === "full" ? 4 : Math.max(yn(3, U, H.nodeRx * .1), K));
6717
+ a && !(d !== void 0 && Q) && (g = E.pathFill, _ = E.pathStroke, y = 4, b = E.pathText), o && (g = E.activeFill, y = 4), l && !a && (g = E.centerFill, _ = E.centerStroke), s && !a && (g = E.trivialFill, _ = E.trivialStroke, y = 2), c && !a && (g = E.fullFill, _ = E.fullStroke), d !== void 0 && Q && (_ = Q, y = W === "full" ? 4 : Math.max(hn(3, U, H.nodeRx * .1), K));
6900
6718
  let x = ye.find((e) => t.elementIds.every((t) => e.set.has(t))), C = {
6901
6719
  onMouseDown: (e) => e.stopPropagation(),
6902
6720
  onClick: (e) => {
@@ -6909,7 +6727,7 @@ function wn({ group: e, lattice: t, canvasTransform: n, availableSize: r, labelD
6909
6727
  opacity: h ? .22 : 1
6910
6728
  };
6911
6729
  if (W === "dots") {
6912
- let e = yn(_n, U, H.nodeRx * .42), m = d !== void 0 && Q ? Q : l ? E.centerStroke : u === void 0 ? c ? E.fullStroke : s ? E.trivialStroke : t.isNormal ? E.nodeStrokeNormal : E.dotPlain : E.sylowText;
6730
+ let e = hn(pn, U, H.nodeRx * .42), m = d !== void 0 && Q ? Q : l ? E.centerStroke : u === void 0 ? c ? E.fullStroke : s ? E.trivialStroke : t.isNormal ? E.nodeStrokeNormal : E.dotPlain : E.sylowText;
6913
6731
  return /* @__PURE__ */ p("g", {
6914
6732
  transform: `translate(${r.x}, ${r.y})`,
6915
6733
  style: w,
@@ -6919,7 +6737,7 @@ function wn({ group: e, lattice: t, canvasTransform: n, availableSize: r, labelD
6919
6737
  /* @__PURE__ */ f("circle", {
6920
6738
  cx: 0,
6921
6739
  cy: 0,
6922
- r: yn(14, U, H.nodeRx),
6740
+ r: hn(14, U, H.nodeRx),
6923
6741
  fill: "transparent",
6924
6742
  stroke: "none"
6925
6743
  }),
@@ -6929,14 +6747,14 @@ function wn({ group: e, lattice: t, canvasTransform: n, availableSize: r, labelD
6929
6747
  r: e,
6930
6748
  fill: a ? E.pathFill : m,
6931
6749
  stroke: a ? E.pathStroke : m,
6932
- strokeWidth: a || o ? yn(2.5, U, e) : 0
6750
+ strokeWidth: a || o ? hn(2.5, U, e) : 0
6933
6751
  }),
6934
6752
  i > 1 && /* @__PURE__ */ p("text", {
6935
- x: e + yn(3, U, H.nodeRx * .2),
6936
- y: yn(-3, U, H.nodeRy * .5),
6753
+ x: e + hn(3, U, H.nodeRx * .2),
6754
+ y: hn(-3, U, H.nodeRy * .5),
6937
6755
  textAnchor: "start",
6938
6756
  fill: E.nodeSubText,
6939
- fontSize: yn(vn, U, H.nodeRx * .6),
6757
+ fontSize: hn(mn, U, H.nodeRx * .6),
6940
6758
  fontFamily: "monospace",
6941
6759
  style: {
6942
6760
  pointerEvents: "none",
@@ -6948,7 +6766,7 @@ function wn({ group: e, lattice: t, canvasTransform: n, availableSize: r, labelD
6948
6766
  }, t.id);
6949
6767
  }
6950
6768
  if (W === "compact") {
6951
- let u = yn(gn.w / 2, U, H.nodeRx * .94), m = yn(gn.h / 2, U, H.nodeRy * .9), h = yn(gn.font, U, H.nodeRx * .5);
6769
+ let u = hn(fn.w / 2, U, H.nodeRx * .94), m = hn(fn.h / 2, U, H.nodeRy * .9), h = hn(fn.font, U, H.nodeRx * .5);
6952
6770
  return /* @__PURE__ */ p("g", {
6953
6771
  transform: `translate(${r.x}, ${r.y})`,
6954
6772
  style: w,
@@ -7319,7 +7137,7 @@ function wn({ group: e, lattice: t, canvasTransform: n, availableSize: r, labelD
7319
7137
  x2: e.to.x,
7320
7138
  y2: e.to.y,
7321
7139
  stroke: Q,
7322
- strokeWidth: W === "full" ? 4 : Math.max(yn(4, U, H.nodeRx * .1), K),
7140
+ strokeWidth: W === "full" ? 4 : Math.max(hn(4, U, H.nodeRx * .1), K),
7323
7141
  strokeLinecap: "round",
7324
7142
  opacity: .85
7325
7143
  }, `series-line-${t}`)),
@@ -7339,7 +7157,7 @@ function wn({ group: e, lattice: t, canvasTransform: n, availableSize: r, labelD
7339
7157
  },
7340
7158
  children: S("lattice.mergeTooLarge")
7341
7159
  }),
7342
- d && m && /* @__PURE__ */ f(Cn, {
7160
+ d && m && /* @__PURE__ */ f(yn, {
7343
7161
  group: e,
7344
7162
  series: m,
7345
7163
  color: Q,
@@ -7350,19 +7168,19 @@ function wn({ group: e, lattice: t, canvasTransform: n, availableSize: r, labelD
7350
7168
  }
7351
7169
  //#endregion
7352
7170
  //#region src/components/Canvas/SceneWindow.tsx
7353
- var Tn = 32, En = 220, Dn = 160, On = 208, kn = 8, An = 5e3, jn = {
7171
+ var xn = 32, Sn = 220, Cn = 160, wn = 208, Tn = 8, En = 5e3, Dn = {
7354
7172
  x: 12,
7355
7173
  y: 12
7356
- }, Mn = {
7174
+ }, On = {
7357
7175
  width: 440,
7358
7176
  height: 320
7359
- }, Nn = {
7177
+ }, kn = {
7360
7178
  locked: !1,
7361
7179
  showInfo: !1,
7362
7180
  resizable: !0,
7363
7181
  viewportFixed: !1,
7364
7182
  showControls: !0
7365
- }, Pn = {
7183
+ }, An = {
7366
7184
  n: "ns-resize",
7367
7185
  s: "ns-resize",
7368
7186
  e: "ew-resize",
@@ -7371,7 +7189,7 @@ var Tn = 32, En = 220, Dn = 160, On = 208, kn = 8, An = 5e3, jn = {
7371
7189
  sw: "nesw-resize",
7372
7190
  nw: "nwse-resize",
7373
7191
  se: "nwse-resize"
7374
- }, Fn = [
7192
+ }, jn = [
7375
7193
  "n",
7376
7194
  "s",
7377
7195
  "e",
@@ -7380,7 +7198,7 @@ var Tn = 32, En = 220, Dn = 160, On = 208, kn = 8, An = 5e3, jn = {
7380
7198
  "nw",
7381
7199
  "se",
7382
7200
  "sw"
7383
- ], In = {
7201
+ ], Mn = {
7384
7202
  dark: {
7385
7203
  tbarBg: "#131c2b",
7386
7204
  tbarBorder: "#24324a",
@@ -7404,7 +7222,7 @@ var Tn = 32, En = 220, Dn = 160, On = 208, kn = 8, An = 5e3, jn = {
7404
7222
  accent: "#0e7490"
7405
7223
  }
7406
7224
  };
7407
- function Ln(e, t) {
7225
+ function Nn(e, t) {
7408
7226
  try {
7409
7227
  let n = localStorage.getItem(`gv-sw-${e}`);
7410
7228
  return n ? t(JSON.parse(n)) : null;
@@ -7412,19 +7230,19 @@ function Ln(e, t) {
7412
7230
  return null;
7413
7231
  }
7414
7232
  }
7415
- function Rn(e, t) {
7233
+ function Pn(e, t) {
7416
7234
  try {
7417
7235
  localStorage.setItem(`gv-sw-${e}`, JSON.stringify(t));
7418
7236
  } catch {}
7419
7237
  }
7420
- function zn(e, t) {
7238
+ function Fn(e, t) {
7421
7239
  return t ? {
7422
7240
  ...e,
7423
7241
  ...t
7424
7242
  } : e;
7425
7243
  }
7426
- function Bn(e, t = !0) {
7427
- return !e || !t ? null : Ln(e, (e) => {
7244
+ function In(e, t = !0) {
7245
+ return !e || !t ? null : Nn(e, (e) => {
7428
7246
  let t = e.pos, n = e.size, r = e.config;
7429
7247
  return {
7430
7248
  pos: t && typeof t.x == "number" && typeof t.y == "number" ? {
@@ -7432,35 +7250,35 @@ function Bn(e, t = !0) {
7432
7250
  y: t.y
7433
7251
  } : void 0,
7434
7252
  size: n && typeof n.width == "number" && typeof n.height == "number" ? {
7435
- width: Math.max(En, n.width),
7436
- height: Math.max(Dn, n.height)
7253
+ width: Math.max(Sn, n.width),
7254
+ height: Math.max(Cn, n.height)
7437
7255
  } : void 0,
7438
7256
  cfg: r && typeof r == "object" ? r : void 0
7439
7257
  };
7440
7258
  });
7441
7259
  }
7442
- var Vn = {};
7443
- function Hn({ title: e, group: t, theme: n = "dark", shell: i = "chrome", capabilities: o, config: s, onConfigChange: c, storageKey: l, defaultPosition: d, defaultSize: m, onClose: h, children: g }) {
7444
- let _ = In[n], v = !!l && o?.persist !== !1, [y, b] = u(() => {
7260
+ var Ln = {};
7261
+ function Rn({ title: e, group: t, theme: n = "dark", shell: i = "chrome", capabilities: o, config: s, onConfigChange: c, storageKey: l, defaultPosition: d, defaultSize: m, onClose: h, children: g }) {
7262
+ let _ = Mn[n], v = !!l && o?.persist !== !1, [y, b] = u(() => {
7445
7263
  let e = {
7446
- ...Nn,
7447
- ...s ?? Vn
7448
- }, t = Bn(l, v);
7449
- return t?.cfg ? zn(e, t.cfg) : e;
7264
+ ...kn,
7265
+ ...s ?? Ln
7266
+ }, t = In(l, v);
7267
+ return t?.cfg ? Fn(e, t.cfg) : e;
7450
7268
  }), x = r((e) => {
7451
7269
  b((t) => {
7452
- let n = zn(t, e);
7270
+ let n = Fn(t, e);
7453
7271
  return c?.(n), n;
7454
7272
  });
7455
7273
  }, [c]), [S, C] = u(() => {
7456
- let e = Bn(l, v);
7274
+ let e = In(l, v);
7457
7275
  return {
7458
- pos: e?.pos ?? d ?? jn,
7459
- size: e?.size ?? m ?? Mn
7276
+ pos: e?.pos ?? d ?? Dn,
7277
+ size: e?.size ?? m ?? On
7460
7278
  };
7461
7279
  }), { pos: w, size: T } = S;
7462
7280
  a(() => {
7463
- v && Rn(l, {
7281
+ v && Pn(l, {
7464
7282
  pos: w,
7465
7283
  size: T,
7466
7284
  config: y
@@ -7472,7 +7290,7 @@ function Hn({ title: e, group: t, theme: n = "dark", shell: i = "chrome", capabi
7472
7290
  l,
7473
7291
  v
7474
7292
  ]);
7475
- let [E, D] = u(() => ++An), O = r(() => D(++An), []), [k, A] = u(!1), j = r((e) => {
7293
+ let [E, D] = u(() => ++En), O = r(() => D(++En), []), [k, A] = u(!1), j = r((e) => {
7476
7294
  if (y.locked || e.target.closest("button")) return;
7477
7295
  e.preventDefault(), O();
7478
7296
  let t = {
@@ -7512,7 +7330,7 @@ function Hn({ title: e, group: t, theme: n = "dark", shell: i = "chrome", capabi
7512
7330
  width: n.ow,
7513
7331
  height: n.oh
7514
7332
  };
7515
- e.includes("e") && (s = Math.max(En, n.ow + r)), e.includes("s") && (c = Math.max(Dn, n.oh + i)), e.includes("w") && (s = Math.max(En, n.ow - r), a = n.ox + (n.ow - s)), e.includes("n") && (c = Math.max(Dn, n.oh - i), o = n.oy + (n.oh - c)), C({
7333
+ e.includes("e") && (s = Math.max(Sn, n.ow + r)), e.includes("s") && (c = Math.max(Cn, n.oh + i)), e.includes("w") && (s = Math.max(Sn, n.ow - r), a = n.ox + (n.ow - s)), e.includes("n") && (c = Math.max(Cn, n.oh - i), o = n.oy + (n.oh - c)), C({
7516
7334
  pos: {
7517
7335
  x: a,
7518
7336
  y: o
@@ -7552,7 +7370,7 @@ function Hn({ title: e, group: t, theme: n = "dark", shell: i = "chrome", capabi
7552
7370
  params: !0,
7553
7371
  close: !0,
7554
7372
  persist: !0,
7555
- ...o ?? Vn
7373
+ ...o ?? Ln
7556
7374
  }, P = y.showControls !== !1, F = e ?? (t ? t.symbol : "View"), I = y.showInfo && t ? `${t.symbol} · |G|=${t.order} · ${t.name ?? ""}` : "", L = {
7557
7375
  background: "none",
7558
7376
  border: "none",
@@ -7590,7 +7408,7 @@ function Hn({ title: e, group: t, theme: n = "dark", shell: i = "chrome", capabi
7590
7408
  alignItems: "center",
7591
7409
  justifyContent: "space-between",
7592
7410
  padding: "0 6px 0 10px",
7593
- height: Tn,
7411
+ height: xn,
7594
7412
  background: _.tbarBg,
7595
7413
  borderBottom: `1px solid ${_.tbarBorder}`,
7596
7414
  cursor: N.drag && !y.locked ? "grab" : "default",
@@ -7657,15 +7475,15 @@ function Hn({ title: e, group: t, theme: n = "dark", shell: i = "chrome", capabi
7657
7475
  }), /* @__PURE__ */ p("div", {
7658
7476
  style: {
7659
7477
  position: "relative",
7660
- height: T.height - (N.titlebar && P ? Tn : 0),
7478
+ height: T.height - (N.titlebar && P ? xn : 0),
7661
7479
  overflow: "hidden",
7662
7480
  background: _.contentBg
7663
7481
  },
7664
- children: [g, N.resize && y.resizable !== !1 && Fn.map((e) => {
7482
+ children: [g, N.resize && y.resizable !== !1 && jn.map((e) => {
7665
7483
  let t = {
7666
7484
  position: "absolute",
7667
7485
  zIndex: 10,
7668
- cursor: Pn[e],
7486
+ cursor: An[e],
7669
7487
  background: "transparent"
7670
7488
  }, n = (() => {
7671
7489
  switch (e) {
@@ -7731,9 +7549,9 @@ function Hn({ title: e, group: t, theme: n = "dark", shell: i = "chrome", capabi
7731
7549
  }), k && N.params && /* @__PURE__ */ p("div", {
7732
7550
  style: {
7733
7551
  position: y.viewportFixed ? "fixed" : "absolute",
7734
- left: T.width + kn,
7552
+ left: T.width + Tn,
7735
7553
  top: 0,
7736
- width: On,
7554
+ width: wn,
7737
7555
  maxHeight: T.height,
7738
7556
  overflowY: "auto",
7739
7557
  zIndex: E + 1,
@@ -7839,7 +7657,7 @@ function Hn({ title: e, group: t, theme: n = "dark", shell: i = "chrome", capabi
7839
7657
  }
7840
7658
  //#endregion
7841
7659
  //#region src/components/Canvas/SceneHoverBubble.tsx
7842
- function Un({ element: e, anchor: t, theme: n = "dark", group: r, offset: i }) {
7660
+ function zn({ element: e, anchor: t, theme: n = "dark", group: r, offset: i }) {
7843
7661
  if (!e || !t) return null;
7844
7662
  let a = i?.x ?? 0, o = i?.y ?? -14, s = r ? A(r, e) : null;
7845
7663
  return /* @__PURE__ */ f("div", {
@@ -7887,18 +7705,18 @@ function Un({ element: e, anchor: t, theme: n = "dark", group: r, offset: i }) {
7887
7705
  }
7888
7706
  //#endregion
7889
7707
  //#region src/hooks/useSceneState.ts
7890
- var Wn = {
7708
+ var Bn = {
7891
7709
  x: 0,
7892
7710
  y: 0,
7893
7711
  scale: 1
7894
- }, Gn = {
7712
+ }, Vn = {
7895
7713
  width: 800,
7896
7714
  height: 600
7897
- }, Kn = .25, qn = 8;
7898
- function Jn(e, n = {}) {
7899
- let { initialTransform: i, locked: o = !1, enableZoom: s = !0, enablePan: d = !0, minScale: f = Kn, maxScale: p = qn, selectedElements: m, onSelectionChange: h, fallbackViewBoxSize: g, hostStyle: _, theme: v = "dark", renderHoverBubble: y } = n, b = l(null), x = r((e) => {
7715
+ }, Hn = .25, Un = 8;
7716
+ function Wn(e, n = {}) {
7717
+ let { initialTransform: i, locked: o = !1, enableZoom: s = !0, enablePan: d = !0, minScale: f = Hn, maxScale: p = Un, selectedElements: m, onSelectionChange: h, fallbackViewBoxSize: g, hostStyle: _, theme: v = "dark", renderHoverBubble: y } = n, b = l(null), x = r((e) => {
7900
7718
  b.current = e;
7901
- }, []), S = r(() => b.current, []), [C, w] = u(g ?? Gn);
7719
+ }, []), S = r(() => b.current, []), [C, w] = u(g ?? Vn);
7902
7720
  a(() => {
7903
7721
  let e = b.current;
7904
7722
  if (!e) return;
@@ -7913,9 +7731,9 @@ function Jn(e, n = {}) {
7913
7731
  let n = new ResizeObserver(t);
7914
7732
  return n.observe(e), () => n.disconnect();
7915
7733
  }, []);
7916
- let [T, E] = u(i ?? Wn), D = l(T), O = r((e) => {
7734
+ let [T, E] = u(i ?? Bn), D = l(T), O = r((e) => {
7917
7735
  D.current = e, E(e);
7918
- }, []), k = r(() => O(i ?? Wn), [O, i]), A = r((e, t) => {
7736
+ }, []), k = r(() => O(i ?? Bn), [O, i]), A = r((e, t) => {
7919
7737
  let n = b.current, r = n?.getBoundingClientRect();
7920
7738
  if (!r) return {
7921
7739
  x: 0,
@@ -8035,7 +7853,7 @@ function Jn(e, n = {}) {
8035
7853
  return;
8036
7854
  }
8037
7855
  K(t);
8038
- }, []), ae = c(() => W ? y ? y(W, G) : t(Un, {
7856
+ }, []), ae = c(() => W ? y ? y(W, G) : t(zn, {
8039
7857
  element: W,
8040
7858
  anchor: G,
8041
7859
  theme: v,
@@ -8090,6 +7908,6 @@ function Jn(e, n = {}) {
8090
7908
  };
8091
7909
  }
8092
7910
  //#endregion
8093
- export { bt as ActionScene, mn as Cayley3DScene, De as CayleyView, Re as CosetStripScene, ve as CycleView, kt as HomomorphismScene, Pe as I18nProvider, Un as SceneHoverBubble, le as SceneThemeRoot, Hn as SceneWindow, Q as SetView, wn as SublatticeScene, Yt as SymmetryViewScene, We as TableView, Jn as useSceneState, Fe as useTranslation };
7911
+ export { bt as ActionScene, un as Cayley3DScene, De as CayleyView, Re as CosetStripScene, ve as CycleView, kt as HomomorphismScene, Pe as I18nProvider, zn as SceneHoverBubble, le as SceneThemeRoot, Rn as SceneWindow, Q as SetView, bn as SublatticeScene, Gt as SymmetryViewScene, We as TableView, Wn as useSceneState, Fe as useTranslation };
8094
7912
 
8095
7913
  //# sourceMappingURL=index.js.map