stickyflow 0.7.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/binding/index.cjs +9 -9
  3. package/dist/binding/index.d.cts +4 -4
  4. package/dist/binding/index.d.ts +4 -4
  5. package/dist/binding/index.js +3 -3
  6. package/dist/{chunk-JCRPLPKV.js → chunk-CZW3ARXQ.js} +4 -4
  7. package/dist/{chunk-JCRPLPKV.js.map → chunk-CZW3ARXQ.js.map} +1 -1
  8. package/dist/{chunk-MUKIGLR5.js → chunk-EDOPENSE.js} +169 -42
  9. package/dist/chunk-EDOPENSE.js.map +1 -0
  10. package/dist/{chunk-EKAWJFJQ.cjs → chunk-FQ7GMLCM.cjs} +15 -15
  11. package/dist/{chunk-EKAWJFJQ.cjs.map → chunk-FQ7GMLCM.cjs.map} +1 -1
  12. package/dist/{chunk-JQK4IGXJ.js → chunk-GLZVHUSW.js} +50 -6
  13. package/dist/chunk-GLZVHUSW.js.map +1 -0
  14. package/dist/{chunk-BUOWM3LC.cjs → chunk-IR2T47NW.cjs} +198 -71
  15. package/dist/chunk-IR2T47NW.cjs.map +1 -0
  16. package/dist/{chunk-ZNHYW47T.js → chunk-LFEGZJWC.js} +3 -3
  17. package/dist/{chunk-ZNHYW47T.js.map → chunk-LFEGZJWC.js.map} +1 -1
  18. package/dist/{chunk-KXYSO6GC.cjs → chunk-LNW5VIEA.cjs} +53 -5
  19. package/dist/chunk-LNW5VIEA.cjs.map +1 -0
  20. package/dist/{chunk-SDMQRSRW.js → chunk-MAPNY7MJ.js} +331 -125
  21. package/dist/chunk-MAPNY7MJ.js.map +1 -0
  22. package/dist/{chunk-A73UJ5AQ.cjs → chunk-VOYX6JMW.cjs} +950 -744
  23. package/dist/chunk-VOYX6JMW.cjs.map +1 -0
  24. package/dist/{chunk-OWNVXKXN.cjs → chunk-XPM3E7NV.cjs} +23 -23
  25. package/dist/{chunk-OWNVXKXN.cjs.map → chunk-XPM3E7NV.cjs.map} +1 -1
  26. package/dist/index.cjs +36 -36
  27. package/dist/index.d.cts +5 -5
  28. package/dist/index.d.ts +5 -5
  29. package/dist/index.js +5 -5
  30. package/dist/interaction/index.cjs +266 -235
  31. package/dist/interaction/index.cjs.map +1 -1
  32. package/dist/interaction/index.d.cts +2 -2
  33. package/dist/interaction/index.d.ts +2 -2
  34. package/dist/interaction/index.js +42 -11
  35. package/dist/interaction/index.js.map +1 -1
  36. package/dist/{render-BU2uYzjG.d.cts → render-Bp2FLEzv.d.cts} +10 -0
  37. package/dist/{render-BU2uYzjG.d.ts → render-Bp2FLEzv.d.ts} +10 -0
  38. package/dist/{runtime-BPzyD-Nd.d.ts → runtime-CWIGxRcL.d.ts} +2 -2
  39. package/dist/{runtime-B7KiTmn8.d.cts → runtime-DIag-XBa.d.cts} +2 -2
  40. package/dist/{runtimeTypes-BIP70z72.d.cts → runtimeTypes-BYODuxHk.d.cts} +1 -1
  41. package/dist/{runtimeTypes-DalvhScn.d.ts → runtimeTypes-C7sSLfOK.d.ts} +1 -1
  42. package/dist/stickyflow-diagram.global.js +141 -38
  43. package/dist/stickyflow-diagram.global.js.map +1 -1
  44. package/dist/{types-DMWs27Hn.d.ts → types-B9QM_H3R.d.ts} +1 -1
  45. package/dist/{types-D_2NZ6lL.d.cts → types-D2w6D_wG.d.cts} +1 -1
  46. package/dist/viewer/index.cjs +9 -9
  47. package/dist/viewer/index.d.cts +4 -4
  48. package/dist/viewer/index.d.ts +4 -4
  49. package/dist/viewer/index.js +4 -4
  50. package/dist/web-component/index.cjs +6 -6
  51. package/dist/web-component/index.d.cts +2 -2
  52. package/dist/web-component/index.d.ts +2 -2
  53. package/dist/web-component/index.js +4 -4
  54. package/package.json +1 -1
  55. package/dist/chunk-A73UJ5AQ.cjs.map +0 -1
  56. package/dist/chunk-BUOWM3LC.cjs.map +0 -1
  57. package/dist/chunk-JQK4IGXJ.js.map +0 -1
  58. package/dist/chunk-KXYSO6GC.cjs.map +0 -1
  59. package/dist/chunk-MUKIGLR5.js.map +0 -1
  60. package/dist/chunk-SDMQRSRW.js.map +0 -1
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkEKAWJFJQ_cjs = require('../chunk-EKAWJFJQ.cjs');
4
- var chunkKXYSO6GC_cjs = require('../chunk-KXYSO6GC.cjs');
3
+ var chunkFQ7GMLCM_cjs = require('../chunk-FQ7GMLCM.cjs');
4
+ var chunkLNW5VIEA_cjs = require('../chunk-LNW5VIEA.cjs');
5
5
 
6
6
  // src/runtime/interaction/chartValue/coordinates.ts
7
7
  function pointerUserY(svg, event) {
@@ -70,13 +70,13 @@ function updateConnectedLine(svg, drag) {
70
70
  }));
71
71
  const line = findConnectedLine(svg, drag.owner.id, drag.series);
72
72
  if (line) {
73
- line.setAttribute("d", chunkKXYSO6GC_cjs.linePathData(points, drag.lineTension));
73
+ line.setAttribute("d", chunkLNW5VIEA_cjs.linePathData(points, drag.lineTension));
74
74
  }
75
75
  const area = findConnectedLineArea(svg, drag.owner.id, drag.series);
76
76
  if (area && points.length > 1) {
77
77
  const first = points[0];
78
78
  const last = points[points.length - 1];
79
- const d = `${chunkKXYSO6GC_cjs.linePathData(points, drag.lineTension)} L ${last.x} ${drag.baseY} L ${first.x} ${drag.baseY} Z`;
79
+ const d = `${chunkLNW5VIEA_cjs.linePathData(points, drag.lineTension)} L ${last.x} ${drag.baseY} L ${first.x} ${drag.baseY} Z`;
80
80
  area.setAttribute("d", d);
81
81
  }
82
82
  }
@@ -90,14 +90,14 @@ function setBarPath(svg, drag, d) {
90
90
  function updateChartValuePreview(svg, drag, value) {
91
91
  if (drag.isBar && drag.scale.horizontal) {
92
92
  const width = Math.max(0, pixelForValue(value, drag.scale) - drag.barX);
93
- setBarPath(svg, drag, chunkKXYSO6GC_cjs.roundedBarPath(drag.barX, drag.barTop, width, drag.barHeight, drag.barRadius));
93
+ setBarPath(svg, drag, chunkLNW5VIEA_cjs.roundedBarPath(drag.barX, drag.barTop, width, drag.barHeight, drag.barRadius));
94
94
  return;
95
95
  }
96
96
  const y = pixelForValue(value, drag.scale);
97
97
  if (drag.isBar) {
98
98
  const top = Math.min(y, drag.baseY);
99
99
  const height = Math.max(0, Math.abs(drag.baseY - y));
100
- setBarPath(svg, drag, chunkKXYSO6GC_cjs.barShapePath(drag.barX, top, drag.barWidth, height, drag.barRadius));
100
+ setBarPath(svg, drag, chunkLNW5VIEA_cjs.barShapePath(drag.barX, top, drag.barWidth, height, drag.barRadius));
101
101
  return;
102
102
  }
103
103
  drag.element.setAttribute("cy", String(y));
@@ -120,24 +120,24 @@ function labelShift(placement, origin, top, height) {
120
120
  }
121
121
  function resizePill(pill, text, label, dy) {
122
122
  const fontSize = parseFloat(text.getAttribute("font-size") ?? "12");
123
- const size = chunkKXYSO6GC_cjs.barLabelSize(label, fontSize, true);
123
+ const size = chunkLNW5VIEA_cjs.barLabelSize(label, fontSize, true);
124
124
  const stored = pill.dataset.sfPillY ?? (pill.getAttribute("d") ?? "").split(/\s+/)[2];
125
125
  pill.dataset.sfPillY = stored;
126
126
  const centerX = Number(text.getAttribute("x"));
127
- pill.setAttribute("d", chunkKXYSO6GC_cjs.pillPath(centerX - size.width / 2, Number(stored), size.width, size.height));
127
+ pill.setAttribute("d", chunkLNW5VIEA_cjs.pillPath(centerX - size.width / 2, Number(stored), size.width, size.height));
128
128
  pill.setAttribute("transform", `translate(0 ${dy})`);
129
129
  }
130
130
  function updateHorizontalBarLabel(label, drag, origin, value) {
131
- const content = chunkKXYSO6GC_cjs.formatBarLabel(value, label.template);
131
+ const content = chunkLNW5VIEA_cjs.formatBarLabel(value, label.template);
132
132
  (label.text.querySelector("tspan") ?? label.text).textContent = content;
133
133
  if (label.placement === "axis") {
134
134
  return true;
135
135
  }
136
136
  const fontSize = parseFloat(label.text.getAttribute("font-size") ?? "12");
137
- const size = chunkKXYSO6GC_cjs.barLabelSize(content, fontSize, label.pill !== null);
137
+ const size = chunkLNW5VIEA_cjs.barLabelSize(content, fontSize, label.pill !== null);
138
138
  const width = Math.max(0, pixelForValue(value, drag.scale) - origin.left);
139
139
  const end = origin.left + width;
140
- const center = label.placement === "outside" ? end + chunkKXYSO6GC_cjs.BAR_LABEL.gap + size.width / 2 : label.placement === "inside" ? end - chunkKXYSO6GC_cjs.BAR_LABEL.gap - size.width / 2 : origin.left + width / 2;
140
+ const center = label.placement === "outside" ? end + chunkLNW5VIEA_cjs.BAR_LABEL.gap + size.width / 2 : label.placement === "inside" ? end - chunkLNW5VIEA_cjs.BAR_LABEL.gap - size.width / 2 : origin.left + width / 2;
141
141
  const stored = label.text.dataset.sfLabelX ?? label.text.getAttribute("x") ?? "0";
142
142
  label.text.dataset.sfLabelX = stored;
143
143
  label.text.setAttribute("transform", `translate(${center - Number(stored)} 0)`);
@@ -145,7 +145,7 @@ function updateHorizontalBarLabel(label, drag, origin, value) {
145
145
  const pillY = label.pill.dataset.sfPillY ?? (label.pill.getAttribute("d") ?? "").split(/\s+/)[2];
146
146
  label.pill.dataset.sfPillY = pillY;
147
147
  label.pill.removeAttribute("transform");
148
- label.pill.setAttribute("d", chunkKXYSO6GC_cjs.pillPath(center - size.width / 2, Number(pillY), size.width, size.height));
148
+ label.pill.setAttribute("d", chunkLNW5VIEA_cjs.pillPath(center - size.width / 2, Number(pillY), size.width, size.height));
149
149
  }
150
150
  return true;
151
151
  }
@@ -161,7 +161,7 @@ function updateBarLabel(svg, drag, origin, value) {
161
161
  const top = Math.min(y, drag.baseY);
162
162
  const height = Math.abs(drag.baseY - y);
163
163
  const dy = labelShift(label.placement, origin, top, height);
164
- const content = chunkKXYSO6GC_cjs.formatBarLabel(value, label.template);
164
+ const content = chunkLNW5VIEA_cjs.formatBarLabel(value, label.template);
165
165
  (label.text.querySelector("tspan") ?? label.text).textContent = content;
166
166
  label.text.setAttribute("transform", `translate(0 ${dy})`);
167
167
  if (label.pill) {
@@ -177,7 +177,7 @@ var HEIGHT = 18;
177
177
  var GAP = 8;
178
178
  var BACKGROUND = "rgba(15, 23, 42, 0.9)";
179
179
  function element(svg, tag) {
180
- return svg.ownerDocument.createElementNS(chunkEKAWJFJQ_cjs.SVG_NAMESPACE, tag);
180
+ return svg.ownerDocument.createElementNS(chunkFQ7GMLCM_cjs.SVG_NAMESPACE, tag);
181
181
  }
182
182
  function createValueReadout(svg) {
183
183
  const group = element(svg, "g");
@@ -273,7 +273,7 @@ function resolveChartValueDrag(svg, event) {
273
273
  if (!target) {
274
274
  return null;
275
275
  }
276
- const scale = parseValueScale(chunkEKAWJFJQ_cjs.findOwnerNode(svg, target.owner.id, chunkEKAWJFJQ_cjs.isPrimary));
276
+ const scale = parseValueScale(chunkFQ7GMLCM_cjs.findOwnerNode(svg, target.owner.id, chunkFQ7GMLCM_cjs.isPrimary));
277
277
  const geometry = scale ? resolveChartValueGeometry(svg, target, scale) : null;
278
278
  if (!scale || !geometry) {
279
279
  return null;
@@ -293,13 +293,13 @@ function createChartValueDragState(target, scale, geometry, pointerId) {
293
293
  };
294
294
  }
295
295
  function isChartValuePointer(event) {
296
- return event.button === 0 && !chunkEKAWJFJQ_cjs.isCameraGesture(event);
296
+ return event.button === 0 && !chunkFQ7GMLCM_cjs.isCameraGesture(event);
297
297
  }
298
298
  function findChartValueMark(event) {
299
299
  return event.target?.closest?.("[data-sf-value-index]");
300
300
  }
301
301
  function readChartValueTarget(mark) {
302
- const owner = chunkEKAWJFJQ_cjs.resolveOwner(mark);
302
+ const owner = chunkFQ7GMLCM_cjs.resolveOwner(mark);
303
303
  if (owner?.role !== "chart") {
304
304
  return null;
305
305
  }
@@ -1751,7 +1751,7 @@ var ColorEditSession = class {
1751
1751
  const hasOverride = target.node.getAttribute("data-sf-color-override") === "true";
1752
1752
  this.#open = openColorPopover({
1753
1753
  seed: seedFrom(fill, readGradientValue(this.#svg, fill)),
1754
- anchor: chunkEKAWJFJQ_cjs.screenRectOf(target.node),
1754
+ anchor: chunkFQ7GMLCM_cjs.screenRectOf(target.node),
1755
1755
  theme: resolveTheme(this.#theme),
1756
1756
  allowGradient: !target.solidOnly,
1757
1757
  onCommit: (color) => {
@@ -1833,7 +1833,7 @@ function resolveTarget(event, selector, pathOf, rules) {
1833
1833
  return null;
1834
1834
  }
1835
1835
  const path = pathOf(node);
1836
- const owner = chunkEKAWJFJQ_cjs.resolveOwner(node);
1836
+ const owner = chunkFQ7GMLCM_cjs.resolveOwner(node);
1837
1837
  if (!path || !owner || !isEditablePath(path, rules) || requiresPriorSelection(node, owner)) {
1838
1838
  return null;
1839
1839
  }
@@ -1855,7 +1855,7 @@ function resolveZoneGradientTarget(event) {
1855
1855
  if (!node) {
1856
1856
  return null;
1857
1857
  }
1858
- const owner = chunkEKAWJFJQ_cjs.resolveOwner(node);
1858
+ const owner = chunkFQ7GMLCM_cjs.resolveOwner(node);
1859
1859
  if (!owner) {
1860
1860
  return null;
1861
1861
  }
@@ -1891,7 +1891,7 @@ var ZoneGradientSession = class {
1891
1891
  const beforeStops = sortStops(gradient.stops);
1892
1892
  this.#open = openColorPopover({
1893
1893
  seed: seedFrom(fill, gradient),
1894
- anchor: chunkEKAWJFJQ_cjs.screenRectOf(target.node),
1894
+ anchor: chunkFQ7GMLCM_cjs.screenRectOf(target.node),
1895
1895
  theme: resolveTheme(this.#theme),
1896
1896
  allowGradient: true,
1897
1897
  lockStops: true,
@@ -1964,15 +1964,15 @@ function bindDeleteSelection(viewer, emitter) {
1964
1964
  }
1965
1965
 
1966
1966
  // src/runtime/interaction/events.ts
1967
- var Emitter2 = class extends chunkEKAWJFJQ_cjs.Emitter {
1967
+ var Emitter2 = class extends chunkFQ7GMLCM_cjs.Emitter {
1968
1968
  };
1969
1969
 
1970
1970
  // src/runtime/interaction/linkPreview/geometry.ts
1971
1971
  function anchorPoint(bounds, side, other) {
1972
1972
  if (side) {
1973
- return chunkKXYSO6GC_cjs.pointAtPort(bounds, { side, offset: 0.5 });
1973
+ return chunkLNW5VIEA_cjs.pointAtPort(bounds, { side, offset: 0.5 });
1974
1974
  }
1975
- return chunkKXYSO6GC_cjs.edgePointToward(bounds, other);
1975
+ return chunkLNW5VIEA_cjs.edgePointToward(bounds, other);
1976
1976
  }
1977
1977
  function polylinePathData(points) {
1978
1978
  if (points.length < 4) {
@@ -1989,7 +1989,7 @@ function previewPathData(points, segments, pathType, strokeWidth) {
1989
1989
  return `M ${points[0]} ${points[1]} C ${points[2]} ${points[3]} ${points[4]} ${points[5]} ${points[6]} ${points[7]}`;
1990
1990
  }
1991
1991
  if (pathType === "orthogonal" && segments.length > 0) {
1992
- return chunkKXYSO6GC_cjs.roundedOrthogonalPathData(segments, Math.max(16, strokeWidth * 4));
1992
+ return chunkLNW5VIEA_cjs.roundedOrthogonalPathData(segments, Math.max(16, strokeWidth * 4));
1993
1993
  }
1994
1994
  return polylinePathData(points);
1995
1995
  }
@@ -2009,8 +2009,8 @@ function previewLink(fromSide, toSide) {
2009
2009
  function routePreviewLink(fromBounds, toBounds, fromSide, toSide, pathType) {
2010
2010
  const from = anchorPoint(fromBounds, fromSide, toBounds);
2011
2011
  const to = anchorPoint(toBounds, toSide, fromBounds);
2012
- const { points, segments } = chunkKXYSO6GC_cjs.calculateLinkRoute(previewLink(fromSide, toSide), from, to, pathType);
2013
- return { points, segments, midpoint: chunkKXYSO6GC_cjs.getLineMidpoint(points, pathType, from, to) };
2012
+ const { points, segments } = chunkLNW5VIEA_cjs.calculateLinkRoute(previewLink(fromSide, toSide), from, to, pathType);
2013
+ return { points, segments, midpoint: chunkLNW5VIEA_cjs.getLineMidpoint(points, pathType, from, to) };
2014
2014
  }
2015
2015
 
2016
2016
  // src/runtime/interaction/linkPreview/discovery.ts
@@ -2042,7 +2042,7 @@ function resolveOppositeEndpoint(svg, path, canvasObjectId) {
2042
2042
  if (!otherId) {
2043
2043
  return null;
2044
2044
  }
2045
- const otherPrimary = chunkEKAWJFJQ_cjs.findOwnerNode(svg, otherId, chunkEKAWJFJQ_cjs.isPrimary);
2045
+ const otherPrimary = chunkFQ7GMLCM_cjs.findOwnerNode(svg, otherId, chunkFQ7GMLCM_cjs.isPrimary);
2046
2046
  return otherPrimary ? { draggedIsFrom, bounds: otherPrimary.getBBox() } : null;
2047
2047
  }
2048
2048
  function captureLiveLinkLabel(svg, draft, draggedBounds) {
@@ -2089,8 +2089,8 @@ function resolveOtherFacePoint(svg, path, canvasObjectId) {
2089
2089
  if (!otherId || !face || !otherFace) {
2090
2090
  return null;
2091
2091
  }
2092
- const otherPrimary = chunkEKAWJFJQ_cjs.findOwnerNode(svg, otherId, chunkEKAWJFJQ_cjs.isPrimary);
2093
- const otherGeometry = otherPrimary && chunkEKAWJFJQ_cjs.isometricGeometryOf(otherPrimary);
2092
+ const otherPrimary = chunkFQ7GMLCM_cjs.findOwnerNode(svg, otherId, chunkFQ7GMLCM_cjs.isPrimary);
2093
+ const otherGeometry = otherPrimary && chunkFQ7GMLCM_cjs.isometricGeometryOf(otherPrimary);
2094
2094
  if (!otherGeometry?.bounds) {
2095
2095
  return null;
2096
2096
  }
@@ -2101,7 +2101,7 @@ function resolveOtherFacePoint(svg, path, canvasObjectId) {
2101
2101
  height: otherGeometry.height,
2102
2102
  depth: otherGeometry.depth
2103
2103
  };
2104
- return { otherPoint: chunkKXYSO6GC_cjs.isometricFaceCenter(otherObject, otherFace), draggedIsFrom, face };
2104
+ return { otherPoint: chunkLNW5VIEA_cjs.isometricFaceCenter(otherObject, otherFace), draggedIsFrom, face };
2105
2105
  }
2106
2106
  function findLiveFaceLinks(svg, canvasObjectId) {
2107
2107
  const escapedId = CSS.escape(canvasObjectId);
@@ -2120,7 +2120,7 @@ function findLiveFaceLinks(svg, canvasObjectId) {
2120
2120
 
2121
2121
  // src/runtime/interaction/linkPreview/faceUpdate.ts
2122
2122
  function updateLiveFaceLink(link, liveObject) {
2123
- const draggedPoint = chunkKXYSO6GC_cjs.isometricFaceCenter(liveObject, link.face);
2123
+ const draggedPoint = chunkLNW5VIEA_cjs.isometricFaceCenter(liveObject, link.face);
2124
2124
  const from = link.draggedIsFrom ? draggedPoint : link.otherPoint;
2125
2125
  const to = link.draggedIsFrom ? link.otherPoint : draggedPoint;
2126
2126
  link.path.setAttribute("d", `M ${from.x} ${from.y} L ${to.x} ${to.y}`);
@@ -2144,7 +2144,7 @@ function updateLabelGap(link, points) {
2144
2144
  if (!link.labelGapSize) {
2145
2145
  return;
2146
2146
  }
2147
- const gap = chunkKXYSO6GC_cjs.labelGapDash(points, link.pathType, link.labelGapSize.width, link.labelGapSize.height);
2147
+ const gap = chunkLNW5VIEA_cjs.labelGapDash(points, link.pathType, link.labelGapSize.width, link.labelGapSize.height);
2148
2148
  if (gap) {
2149
2149
  link.path.setAttribute("stroke-dasharray", `${gap.dashBefore} ${gap.gapLength} 1000000`);
2150
2150
  } else {
@@ -2177,6 +2177,12 @@ var SNAP_ATTR = "data-sf-snap";
2177
2177
  function isSnapDisabled(svg) {
2178
2178
  return svg.getAttribute(SNAP_ATTR) === "off";
2179
2179
  }
2180
+ var SNAP_DISTANCE_ATTR = "data-sf-snap-distance";
2181
+ var DEFAULT_SNAP_DISTANCE_PX = 20;
2182
+ function snapDistancePx(svg) {
2183
+ const value = Number(svg.getAttribute(SNAP_DISTANCE_ATTR));
2184
+ return value > 0 ? value : DEFAULT_SNAP_DISTANCE_PX;
2185
+ }
2180
2186
  var ISOMETRIC_GRID = /^isometric:(\d+(?:\.\d+)?)$/;
2181
2187
  function readIsometricSnapStep(svg) {
2182
2188
  const match = ISOMETRIC_GRID.exec(svg.getAttribute(SNAP_GRID_ATTR) ?? "");
@@ -2184,11 +2190,11 @@ function readIsometricSnapStep(svg) {
2184
2190
  return step > 0 ? step : null;
2185
2191
  }
2186
2192
  function nearestIsometricLatticePoint(point, step) {
2187
- const u = point.x / (chunkKXYSO6GC_cjs.AXIS_COS * step);
2188
- const v = point.y / (chunkKXYSO6GC_cjs.AXIS_SIN * step);
2193
+ const u = point.x / (chunkLNW5VIEA_cjs.AXIS_COS * step);
2194
+ const v = point.y / (chunkLNW5VIEA_cjs.AXIS_SIN * step);
2189
2195
  const i = Math.round((u + v) / 2);
2190
2196
  const j = Math.round((u - v) / 2);
2191
- return { x: (i + j) * chunkKXYSO6GC_cjs.AXIS_COS * step, y: (i - j) * chunkKXYSO6GC_cjs.AXIS_SIN * step };
2197
+ return { x: (i + j) * chunkLNW5VIEA_cjs.AXIS_COS * step, y: (i - j) * chunkLNW5VIEA_cjs.AXIS_SIN * step };
2192
2198
  }
2193
2199
  function snapToStep(value, step, min) {
2194
2200
  return Math.max(min, Math.round(value / step) * step);
@@ -2201,21 +2207,21 @@ var LABEL_FONT_SIZE = 12;
2201
2207
  var LABEL_LINE_HEIGHT = 1.2;
2202
2208
  var LABEL_BASELINE_OFFSET = -LABEL_GAP - LABEL_HEIGHT + (LABEL_HEIGHT - LABEL_FONT_SIZE * LABEL_LINE_HEIGHT) / 2 + LABEL_FONT_SIZE;
2203
2209
  function applyIsometricAxisPreview(nodes, object, cornerRadius, overlay, svg) {
2204
- const faces = chunkKXYSO6GC_cjs.isometricFaces(object);
2205
- nodes.top?.setAttribute("d", chunkKXYSO6GC_cjs.roundedPolygonPath(faces.top, 0));
2206
- nodes.front?.setAttribute("d", chunkKXYSO6GC_cjs.roundedPolygonPath(faces.front, 0));
2207
- nodes.side?.setAttribute("d", chunkKXYSO6GC_cjs.roundedPolygonPath(faces.right, 0));
2210
+ const faces = chunkLNW5VIEA_cjs.isometricFaces(object);
2211
+ nodes.top?.setAttribute("d", chunkLNW5VIEA_cjs.roundedPolygonPath(faces.top, 0));
2212
+ nodes.front?.setAttribute("d", chunkLNW5VIEA_cjs.roundedPolygonPath(faces.front, 0));
2213
+ nodes.side?.setAttribute("d", chunkLNW5VIEA_cjs.roundedPolygonPath(faces.right, 0));
2208
2214
  const silhouette = [faces.top[0], faces.top[1], faces.right[2], faces.front[2], faces.front[3], faces.top[3]];
2209
- const hullPath = chunkKXYSO6GC_cjs.roundedPolygonPath(silhouette, cornerRadius);
2215
+ const hullPath = chunkLNW5VIEA_cjs.roundedPolygonPath(silhouette, cornerRadius);
2210
2216
  nodes.hull?.setAttribute("d", hullPath);
2211
2217
  if (overlay.halo) {
2212
- chunkEKAWJFJQ_cjs.updateHalo(overlay.halo, hullPath);
2218
+ chunkFQ7GMLCM_cjs.updateHalo(overlay.halo, hullPath);
2213
2219
  }
2214
- const placements = chunkEKAWJFJQ_cjs.axisArrowPlacements(object);
2220
+ const placements = chunkFQ7GMLCM_cjs.axisArrowPlacements(object);
2215
2221
  Object.keys(placements).forEach((axis) => {
2216
2222
  const group = overlay.arrows[axis];
2217
2223
  if (group) {
2218
- chunkEKAWJFJQ_cjs.updateAxisArrowGroup(group, placements[axis].origin, placements[axis].direction, svg);
2224
+ chunkFQ7GMLCM_cjs.updateAxisArrowGroup(group, placements[axis].origin, placements[axis].direction, svg);
2219
2225
  }
2220
2226
  });
2221
2227
  nodes.seams?.setAttribute(
@@ -2233,9 +2239,9 @@ function applyIsometricAxisPreview(nodes, object, cornerRadius, overlay, svg) {
2233
2239
  x: footprintCenter.x + (point.x - footprintCenter.x) * shadowSpread,
2234
2240
  y: footprintCenter.y + (point.y - footprintCenter.y) * shadowSpread
2235
2241
  }));
2236
- nodes.groundShadow.setAttribute("d", chunkKXYSO6GC_cjs.roundedPolygonPath(footprint, 0));
2242
+ nodes.groundShadow.setAttribute("d", chunkLNW5VIEA_cjs.roundedPolygonPath(footprint, 0));
2237
2243
  }
2238
- const anchor = chunkKXYSO6GC_cjs.isometricTopFaceCenter(object);
2244
+ const anchor = chunkLNW5VIEA_cjs.isometricTopFaceCenter(object);
2239
2245
  if (nodes.labelGuide) {
2240
2246
  nodes.labelGuide.setAttribute("d", `M ${anchor.x} ${anchor.y - LABEL_GAP} L ${anchor.x} ${anchor.y}`);
2241
2247
  }
@@ -2251,7 +2257,7 @@ function applyIsometricAxisPreview(nodes, object, cornerRadius, overlay, svg) {
2251
2257
  // src/runtime/interaction/isometricAxisResize/state.ts
2252
2258
  var AXES = ["width", "height", "depth"];
2253
2259
  function collectNodes(svg, ownerId) {
2254
- const all = chunkEKAWJFJQ_cjs.findAllOwnerNodes(svg, ownerId);
2260
+ const all = chunkFQ7GMLCM_cjs.findAllOwnerNodes(svg, ownerId);
2255
2261
  const bySuffix = (suffix) => all.find((el2) => el2.id.endsWith(suffix)) ?? null;
2256
2262
  return {
2257
2263
  top: bySuffix("-top"),
@@ -2277,30 +2283,30 @@ function createIsometricAxisDragState(svg, event) {
2277
2283
  if (!ownerId) {
2278
2284
  return null;
2279
2285
  }
2280
- const primary = chunkEKAWJFJQ_cjs.findOwnerNode(svg, ownerId, chunkEKAWJFJQ_cjs.isPrimary);
2281
- const owner = primary && chunkEKAWJFJQ_cjs.resolveOwner(primary);
2286
+ const primary = chunkFQ7GMLCM_cjs.findOwnerNode(svg, ownerId, chunkFQ7GMLCM_cjs.isPrimary);
2287
+ const owner = primary && chunkFQ7GMLCM_cjs.resolveOwner(primary);
2282
2288
  if (!primary || owner?.role !== "isometric") {
2283
2289
  return null;
2284
2290
  }
2285
- const startUser = chunkEKAWJFJQ_cjs.pointerUserPoint(svg, event);
2291
+ const startUser = chunkFQ7GMLCM_cjs.pointerUserPoint(svg, event);
2286
2292
  if (!startUser) {
2287
2293
  return null;
2288
2294
  }
2289
- const geometry = chunkEKAWJFJQ_cjs.isometricGeometryOf(primary);
2295
+ const geometry = chunkFQ7GMLCM_cjs.isometricGeometryOf(primary);
2290
2296
  const bounds = geometry?.bounds ?? primary.getBBox();
2291
2297
  const nodes = collectNodes(svg, ownerId);
2292
2298
  [nodes.top, nodes.front, nodes.side].forEach((node) => {
2293
2299
  node?.removeAttribute("clip-path");
2294
2300
  });
2295
2301
  captureTarget.setPointerCapture?.(event.pointerId);
2296
- const overlayHalo = overlay?.querySelector(`[${chunkEKAWJFJQ_cjs.ISO_HALO_ATTR}]`) ?? null;
2302
+ const overlayHalo = overlay?.querySelector(`[${chunkFQ7GMLCM_cjs.ISO_HALO_ATTR}]`) ?? null;
2297
2303
  const overlayArrows = Object.fromEntries(
2298
2304
  AXES.map((axis2) => [
2299
2305
  axis2,
2300
2306
  overlay?.querySelector(`[data-sf-resize-handle="iso-${axis2}"]`) ?? null
2301
2307
  ])
2302
2308
  );
2303
- const overlayDuplicateBubbles = overlay?.querySelector(`[${chunkEKAWJFJQ_cjs.ISO_DUPLICATE_BUBBLES_ATTR}]`) ?? null;
2309
+ const overlayDuplicateBubbles = overlay?.querySelector(`[${chunkFQ7GMLCM_cjs.ISO_DUPLICATE_BUBBLES_ATTR}]`) ?? null;
2304
2310
  if (overlayDuplicateBubbles) {
2305
2311
  overlayDuplicateBubbles.style.display = "none";
2306
2312
  }
@@ -2317,7 +2323,7 @@ function createIsometricAxisDragState(svg, event) {
2317
2323
  pointerId: event.pointerId,
2318
2324
  startUser,
2319
2325
  start,
2320
- cornerRadius: geometry?.cornerRadius ?? Number(primary.getAttribute(chunkKXYSO6GC_cjs.CORNER_RADIUS_ATTR)) ?? 0,
2326
+ cornerRadius: geometry?.cornerRadius ?? Number(primary.getAttribute(chunkLNW5VIEA_cjs.CORNER_RADIUS_ATTR)) ?? 0,
2321
2327
  nodes,
2322
2328
  overlayHalo,
2323
2329
  overlayArrows,
@@ -2336,15 +2342,15 @@ function nextGeometry(drag, point, step) {
2336
2342
  const dx = point.x - drag.startUser.x;
2337
2343
  const dy = point.y - drag.startUser.y;
2338
2344
  if (axis === "width") {
2339
- const delta2 = dx * chunkKXYSO6GC_cjs.AXIS_COS + dy * chunkKXYSO6GC_cjs.AXIS_SIN;
2345
+ const delta2 = dx * chunkLNW5VIEA_cjs.AXIS_COS + dy * chunkLNW5VIEA_cjs.AXIS_SIN;
2340
2346
  return { ...start, width: length(start.width + delta2, MIN_SIZE) };
2341
2347
  }
2342
2348
  if (axis === "height") {
2343
2349
  return { ...start, height: length(start.height + dy, MIN_SIZE) };
2344
2350
  }
2345
- const delta = -dx * chunkKXYSO6GC_cjs.AXIS_COS + dy * chunkKXYSO6GC_cjs.AXIS_SIN;
2351
+ const delta = -dx * chunkLNW5VIEA_cjs.AXIS_COS + dy * chunkLNW5VIEA_cjs.AXIS_SIN;
2346
2352
  const depth = length(start.depth + delta, 0);
2347
- const x = start.x + (start.depth - depth) * chunkKXYSO6GC_cjs.AXIS_COS;
2353
+ const x = start.x + (start.depth - depth) * chunkLNW5VIEA_cjs.AXIS_COS;
2348
2354
  return { ...start, x, depth };
2349
2355
  }
2350
2356
  var IsometricAxisResizeSession = class {
@@ -2356,7 +2362,7 @@ var IsometricAxisResizeSession = class {
2356
2362
  this.#emitter = emitter;
2357
2363
  }
2358
2364
  pointerDown = (event) => {
2359
- if (event.button !== 0 || this.#drag || chunkEKAWJFJQ_cjs.isCameraGesture(event)) {
2365
+ if (event.button !== 0 || this.#drag || chunkFQ7GMLCM_cjs.isCameraGesture(event)) {
2360
2366
  return;
2361
2367
  }
2362
2368
  this.#drag = createIsometricAxisDragState(this.#svg, event);
@@ -2366,7 +2372,7 @@ var IsometricAxisResizeSession = class {
2366
2372
  if (!drag || event.pointerId !== drag.pointerId) {
2367
2373
  return;
2368
2374
  }
2369
- const point = chunkEKAWJFJQ_cjs.pointerUserPoint(this.#svg, event);
2375
+ const point = chunkFQ7GMLCM_cjs.pointerUserPoint(this.#svg, event);
2370
2376
  if (!point) {
2371
2377
  return;
2372
2378
  }
@@ -2464,7 +2470,7 @@ function findLabelMark(event) {
2464
2470
  );
2465
2471
  }
2466
2472
  function isLabelPointer(event) {
2467
- return event.button === 0 && !chunkEKAWJFJQ_cjs.isCameraGesture(event);
2473
+ return event.button === 0 && !chunkFQ7GMLCM_cjs.isCameraGesture(event);
2468
2474
  }
2469
2475
  function findHull(svg, ownerId) {
2470
2476
  return svg.querySelector(`[data-sf-id="${CSS.escape(ownerId)}"][data-sf-primary="true"]`);
@@ -2480,21 +2486,21 @@ function resolveIsometricLabelDrag(svg, event) {
2480
2486
  if (!clicked) {
2481
2487
  return null;
2482
2488
  }
2483
- const owner = chunkEKAWJFJQ_cjs.resolveOwner(clicked);
2489
+ const owner = chunkFQ7GMLCM_cjs.resolveOwner(clicked);
2484
2490
  if (owner?.role !== "isometric") {
2485
2491
  return null;
2486
2492
  }
2487
2493
  const hull = findHull(svg, owner.id);
2488
- const geometry = hull ? chunkEKAWJFJQ_cjs.isometricGeometryOf(hull) : null;
2494
+ const geometry = hull ? chunkFQ7GMLCM_cjs.isometricGeometryOf(hull) : null;
2489
2495
  if (!geometry?.bounds) {
2490
2496
  return null;
2491
2497
  }
2492
- const start = chunkEKAWJFJQ_cjs.pointerUserPoint(svg, event);
2498
+ const start = chunkFQ7GMLCM_cjs.pointerUserPoint(svg, event);
2493
2499
  if (!start) {
2494
2500
  return null;
2495
2501
  }
2496
2502
  const anchorX = geometry.bounds.x + geometry.bounds.width / 2;
2497
- const anchorY = geometry.bounds.y + geometry.bounds.width * (chunkKXYSO6GC_cjs.AXIS_SIN / chunkKXYSO6GC_cjs.AXIS_COS) / 2;
2503
+ const anchorY = geometry.bounds.y + geometry.bounds.width * (chunkLNW5VIEA_cjs.AXIS_SIN / chunkLNW5VIEA_cjs.AXIS_COS) / 2;
2498
2504
  const text = findBySuffix(svg, `-${owner.id}-label`);
2499
2505
  if (!text) {
2500
2506
  return null;
@@ -2546,7 +2552,7 @@ var IsometricLabelDragSession = class {
2546
2552
  if (!this.#drag || event.pointerId !== this.#drag.pointerId) {
2547
2553
  return;
2548
2554
  }
2549
- const point = chunkEKAWJFJQ_cjs.pointerUserPoint(this.#svg, event);
2555
+ const point = chunkFQ7GMLCM_cjs.pointerUserPoint(this.#svg, event);
2550
2556
  if (!point) {
2551
2557
  return;
2552
2558
  }
@@ -2621,7 +2627,7 @@ function isIsometricDirection(value) {
2621
2627
  function bindIsometricQuickDuplicate(viewer, emitter) {
2622
2628
  const svg = viewer.svg;
2623
2629
  const onPointerDown = (event) => {
2624
- if (event.button !== 0 || chunkEKAWJFJQ_cjs.isCameraGesture(event)) {
2630
+ if (event.button !== 0 || chunkFQ7GMLCM_cjs.isCameraGesture(event)) {
2625
2631
  return;
2626
2632
  }
2627
2633
  const bubble = event.target?.closest("[data-sf-quick-duplicate]");
@@ -2632,7 +2638,7 @@ function bindIsometricQuickDuplicate(viewer, emitter) {
2632
2638
  const overlay = bubble.closest("[data-sf-selection-overlay]");
2633
2639
  const sourceId = overlay?.getAttribute("data-sf-selection-overlay");
2634
2640
  const primary = sourceId ? svg.querySelector(`[data-sf-id="${CSS.escape(sourceId)}"][data-sf-primary="true"]`) : null;
2635
- const owner = primary && chunkEKAWJFJQ_cjs.resolveOwner(primary);
2641
+ const owner = primary && chunkFQ7GMLCM_cjs.resolveOwner(primary);
2636
2642
  if (!owner) {
2637
2643
  return;
2638
2644
  }
@@ -2700,7 +2706,7 @@ function updateEndpointPreview(drag, draggedPoint, draggedSide) {
2700
2706
  const toPoint = drag.end === "to" ? draggedPoint : drag.fixedPoint;
2701
2707
  const fromSide = drag.end === "from" ? draggedSide : drag.fixedSide;
2702
2708
  const toSide = drag.end === "to" ? draggedSide : drag.fixedSide;
2703
- const { points, segments } = chunkKXYSO6GC_cjs.calculateLinkRoute(previewLink2(fromSide, toSide), fromPoint, toPoint, drag.pathType);
2709
+ const { points, segments } = chunkLNW5VIEA_cjs.calculateLinkRoute(previewLink2(fromSide, toSide), fromPoint, toPoint, drag.pathType);
2704
2710
  drag.path.setAttribute("d", previewPathData(points, segments, drag.pathType, drag.strokeWidth));
2705
2711
  }
2706
2712
 
@@ -2722,7 +2728,7 @@ var LinkGhost = class {
2722
2728
  constructor(svg, path) {
2723
2729
  this.#svg = svg;
2724
2730
  this.#path = path;
2725
- this.#anchors = svg.ownerDocument.createElementNS(chunkEKAWJFJQ_cjs.SVG_NAMESPACE, "g");
2731
+ this.#anchors = svg.ownerDocument.createElementNS(chunkFQ7GMLCM_cjs.SVG_NAMESPACE, "g");
2726
2732
  this.#anchors.setAttribute("data-sf-link-target", "");
2727
2733
  this.#anchors.setAttribute("pointer-events", "none");
2728
2734
  }
@@ -2732,7 +2738,7 @@ var LinkGhost = class {
2732
2738
  for (const name of RESTORED_ATTRIBUTES) {
2733
2739
  this.#saved.set(name, this.#path.getAttribute(name));
2734
2740
  }
2735
- const dash = GHOST_DASH_PX / chunkEKAWJFJQ_cjs.pxPerUnit(this.#svg);
2741
+ const dash = GHOST_DASH_PX / chunkFQ7GMLCM_cjs.pxPerUnit(this.#svg);
2736
2742
  this.#path.setAttribute("stroke-dasharray", `${dash} ${dash}`);
2737
2743
  this.#path.setAttribute("stroke-linecap", "round");
2738
2744
  this.#path.setAttribute("opacity", GHOST_OPACITY);
@@ -2761,7 +2767,7 @@ var LinkGhost = class {
2761
2767
  if (!bounds) {
2762
2768
  return;
2763
2769
  }
2764
- const unit = 1 / chunkEKAWJFJQ_cjs.pxPerUnit(this.#svg);
2770
+ const unit = 1 / chunkFQ7GMLCM_cjs.pxPerUnit(this.#svg);
2765
2771
  const centers = [
2766
2772
  [bounds.x + bounds.width / 2, bounds.y],
2767
2773
  [bounds.x + bounds.width, bounds.y + bounds.height / 2],
@@ -2769,7 +2775,7 @@ var LinkGhost = class {
2769
2775
  [bounds.x, bounds.y + bounds.height / 2]
2770
2776
  ];
2771
2777
  for (const [cx, cy] of centers) {
2772
- const dot = this.#svg.ownerDocument.createElementNS(chunkEKAWJFJQ_cjs.SVG_NAMESPACE, "circle");
2778
+ const dot = this.#svg.ownerDocument.createElementNS(chunkFQ7GMLCM_cjs.SVG_NAMESPACE, "circle");
2773
2779
  dot.setAttribute("cx", String(cx));
2774
2780
  dot.setAttribute("cy", String(cy));
2775
2781
  dot.setAttribute("r", String(ANCHOR_RADIUS_PX * unit));
@@ -2789,7 +2795,7 @@ function collectEndpointCandidates(svg) {
2789
2795
  if (element2.getAttribute("data-sf-role") === "link") {
2790
2796
  continue;
2791
2797
  }
2792
- const owner = chunkEKAWJFJQ_cjs.resolveOwner(element2);
2798
+ const owner = chunkFQ7GMLCM_cjs.resolveOwner(element2);
2793
2799
  if (owner) {
2794
2800
  candidates.push({ owner, bounds: element2.getBBox() });
2795
2801
  }
@@ -2866,7 +2872,7 @@ function inferFixedSide(svg, reference, fixedPrimary) {
2866
2872
  if (reference.declaredSide) {
2867
2873
  return reference.declaredSide;
2868
2874
  }
2869
- const draggedPrimary = reference.draggedId ? chunkEKAWJFJQ_cjs.findOwnerNode(svg, reference.draggedId, chunkEKAWJFJQ_cjs.isPrimary) : null;
2875
+ const draggedPrimary = reference.draggedId ? chunkFQ7GMLCM_cjs.findOwnerNode(svg, reference.draggedId, chunkFQ7GMLCM_cjs.isPrimary) : null;
2870
2876
  if (!draggedPrimary) {
2871
2877
  return "right";
2872
2878
  }
@@ -2874,7 +2880,7 @@ function inferFixedSide(svg, reference, fixedPrimary) {
2874
2880
  }
2875
2881
  function resolveFixedEndpoint(svg, path, draggedEnd) {
2876
2882
  const reference = fixedEndpointReference(path, draggedEnd);
2877
- const fixedPrimary = reference.fixedId ? chunkEKAWJFJQ_cjs.findOwnerNode(svg, reference.fixedId, chunkEKAWJFJQ_cjs.isPrimary) : null;
2883
+ const fixedPrimary = reference.fixedId ? chunkFQ7GMLCM_cjs.findOwnerNode(svg, reference.fixedId, chunkFQ7GMLCM_cjs.isPrimary) : null;
2878
2884
  if (!fixedPrimary) {
2879
2885
  return null;
2880
2886
  }
@@ -2893,8 +2899,8 @@ function selectLinkEndpoint(svg, event) {
2893
2899
  if (!target || !end || !linkId) {
2894
2900
  return null;
2895
2901
  }
2896
- const path = chunkEKAWJFJQ_cjs.findOwnerNode(svg, linkId, chunkEKAWJFJQ_cjs.isPrimary);
2897
- const linkOwner = path && chunkEKAWJFJQ_cjs.resolveOwner(path);
2902
+ const path = chunkFQ7GMLCM_cjs.findOwnerNode(svg, linkId, chunkFQ7GMLCM_cjs.isPrimary);
2903
+ const linkOwner = path && chunkFQ7GMLCM_cjs.resolveOwner(path);
2898
2904
  if (!path || !linkOwner) {
2899
2905
  return null;
2900
2906
  }
@@ -2936,8 +2942,8 @@ function nearestPort(bounds, point) {
2936
2942
  let nearest = { side: "right", offset: 0.5 };
2937
2943
  let nearestDistance = Infinity;
2938
2944
  for (const side of SIDES2) {
2939
- const offset = Math.max(0, Math.min(1, chunkKXYSO6GC_cjs.relativeOffsetOnRectangleSide(bounds, side, point)));
2940
- const candidate = chunkKXYSO6GC_cjs.pointAtPort(bounds, { side, offset });
2945
+ const offset = Math.max(0, Math.min(1, chunkLNW5VIEA_cjs.relativeOffsetOnRectangleSide(bounds, side, point)));
2946
+ const candidate = chunkLNW5VIEA_cjs.pointAtPort(bounds, { side, offset });
2941
2947
  const distance = Math.hypot(candidate.x - point.x, candidate.y - point.y);
2942
2948
  if (distance < nearestDistance) {
2943
2949
  nearestDistance = distance;
@@ -2996,7 +3002,7 @@ function resolveLinkTarget(candidates, fixedPoint, point, unitsPerPx) {
2996
3002
  }
2997
3003
  const port = snapPort(candidate.bounds, point, unitsPerPx);
2998
3004
  return {
2999
- point: chunkKXYSO6GC_cjs.pointAtPort(candidate.bounds, port),
3005
+ point: chunkLNW5VIEA_cjs.pointAtPort(candidate.bounds, port),
3000
3006
  side: port.side,
3001
3007
  hit: { owner: candidate.owner, side: port.side, offset: port.offset },
3002
3008
  bounds: candidate.bounds
@@ -3020,7 +3026,7 @@ var LinkEndpointSession = class {
3020
3026
  this.#emitter = emitter;
3021
3027
  }
3022
3028
  pointerDown = (event) => {
3023
- if (event.button !== 0 || this.#drag || chunkEKAWJFJQ_cjs.isCameraGesture(event)) {
3029
+ if (event.button !== 0 || this.#drag || chunkFQ7GMLCM_cjs.isCameraGesture(event)) {
3024
3030
  return;
3025
3031
  }
3026
3032
  this.#drag = createLinkEndpointDragState(this.#svg, event);
@@ -3034,7 +3040,7 @@ var LinkEndpointSession = class {
3034
3040
  return;
3035
3041
  }
3036
3042
  drag.moved = true;
3037
- const target = resolveEndpointTarget(drag, endpointPointerPosition(this.#svg, event), 1 / chunkEKAWJFJQ_cjs.pxPerUnit(this.#svg));
3043
+ const target = resolveEndpointTarget(drag, endpointPointerPosition(this.#svg, event), 1 / chunkFQ7GMLCM_cjs.pxPerUnit(this.#svg));
3038
3044
  updateEndpointPreview(drag, target.point, target.side);
3039
3045
  drag.ghost.show(target.hit !== null, target.bounds);
3040
3046
  };
@@ -3148,7 +3154,7 @@ var LinkSegmentSession = class {
3148
3154
  this.#emitter = emitter;
3149
3155
  }
3150
3156
  pointerDown = (event) => {
3151
- if (event.button !== 0 || this.#drag || chunkEKAWJFJQ_cjs.isCameraGesture(event)) {
3157
+ if (event.button !== 0 || this.#drag || chunkFQ7GMLCM_cjs.isCameraGesture(event)) {
3152
3158
  return;
3153
3159
  }
3154
3160
  const target = event.target;
@@ -3158,12 +3164,12 @@ var LinkSegmentSession = class {
3158
3164
  if (!handle || !overlay || !linkId) {
3159
3165
  return;
3160
3166
  }
3161
- const path = chunkEKAWJFJQ_cjs.findOwnerNode(this.#svg, linkId, chunkEKAWJFJQ_cjs.isPrimary);
3162
- const owner = path && chunkEKAWJFJQ_cjs.resolveOwner(path);
3167
+ const path = chunkFQ7GMLCM_cjs.findOwnerNode(this.#svg, linkId, chunkFQ7GMLCM_cjs.isPrimary);
3168
+ const owner = path && chunkFQ7GMLCM_cjs.resolveOwner(path);
3163
3169
  const index = Number(handle.getAttribute("data-sf-link-segment"));
3164
3170
  const segments = path ? parseSegments(path) : [];
3165
3171
  const segment = segments[index];
3166
- const point = chunkEKAWJFJQ_cjs.pointerUserPoint(this.#svg, event);
3172
+ const point = chunkFQ7GMLCM_cjs.pointerUserPoint(this.#svg, event);
3167
3173
  if (!path || !owner || !segment || !point) {
3168
3174
  return;
3169
3175
  }
@@ -3171,7 +3177,7 @@ var LinkSegmentSession = class {
3171
3177
  const guide = document.createElementNS(SVG_NAMESPACE2, "line");
3172
3178
  guide.setAttribute("stroke", GUIDE_COLOR);
3173
3179
  guide.setAttribute("stroke-dasharray", "4 4");
3174
- guide.setAttribute("stroke-width", String(1 / chunkEKAWJFJQ_cjs.pxPerUnit(this.#svg)));
3180
+ guide.setAttribute("stroke-width", String(1 / chunkFQ7GMLCM_cjs.pxPerUnit(this.#svg)));
3175
3181
  guide.setAttribute("visibility", "hidden");
3176
3182
  overlay.appendChild(guide);
3177
3183
  handle.setPointerCapture?.(event.pointerId);
@@ -3206,7 +3212,7 @@ var LinkSegmentSession = class {
3206
3212
  return;
3207
3213
  }
3208
3214
  drag.moved = true;
3209
- const point = chunkEKAWJFJQ_cjs.pointerUserPoint(this.#svg, event);
3215
+ const point = chunkFQ7GMLCM_cjs.pointerUserPoint(this.#svg, event);
3210
3216
  if (!point) {
3211
3217
  return;
3212
3218
  }
@@ -3232,8 +3238,8 @@ var LinkSegmentSession = class {
3232
3238
  doubleClick = (event) => {
3233
3239
  const handle = event.target?.closest("[data-sf-link-segment]");
3234
3240
  const linkId = handle?.closest("[data-sf-selection-overlay]")?.getAttribute("data-sf-selection-overlay");
3235
- const path = linkId ? chunkEKAWJFJQ_cjs.findOwnerNode(this.#svg, linkId, chunkEKAWJFJQ_cjs.isPrimary) : null;
3236
- const owner = path && chunkEKAWJFJQ_cjs.resolveOwner(path);
3241
+ const path = linkId ? chunkFQ7GMLCM_cjs.findOwnerNode(this.#svg, linkId, chunkFQ7GMLCM_cjs.isPrimary) : null;
3242
+ const owner = path && chunkFQ7GMLCM_cjs.resolveOwner(path);
3237
3243
  if (!handle || !owner) {
3238
3244
  return;
3239
3245
  }
@@ -3256,7 +3262,7 @@ var LinkSegmentSession = class {
3256
3262
  if (isSnapDisabled(this.#svg)) {
3257
3263
  return { value: raw, snapped: null };
3258
3264
  }
3259
- const threshold = SNAP_PX / chunkEKAWJFJQ_cjs.pxPerUnit(this.#svg);
3265
+ const threshold = SNAP_PX / chunkFQ7GMLCM_cjs.pxPerUnit(this.#svg);
3260
3266
  let best = null;
3261
3267
  for (const candidate of [drag.base, ...drag.candidates]) {
3262
3268
  const closer = best === null || Math.abs(candidate - raw) < Math.abs(best - raw);
@@ -3269,7 +3275,7 @@ var LinkSegmentSession = class {
3269
3275
  #preview(drag, snapped) {
3270
3276
  const next = movedSegments(drag, drag.value);
3271
3277
  const strokeWidth = Number(drag.path.getAttribute("stroke-width")) || 2;
3272
- const data = chunkKXYSO6GC_cjs.roundedOrthogonalPathData(pathSegments(next), Math.max(16, strokeWidth * 4));
3278
+ const data = chunkLNW5VIEA_cjs.roundedOrthogonalPathData(pathSegments(next), Math.max(16, strokeWidth * 4));
3273
3279
  drag.path.setAttribute("d", data);
3274
3280
  drag.overlay.querySelector("path")?.setAttribute("d", data);
3275
3281
  const segment = next[drag.index];
@@ -3443,8 +3449,8 @@ function nearestCandidates(bounds, candidates, limit = 50) {
3443
3449
 
3444
3450
  // src/runtime/interaction/snapping/isometricDiagonal.ts
3445
3451
  var AXES2 = [
3446
- { x: chunkKXYSO6GC_cjs.AXIS_COS, y: chunkKXYSO6GC_cjs.AXIS_SIN },
3447
- { x: -chunkKXYSO6GC_cjs.AXIS_COS, y: chunkKXYSO6GC_cjs.AXIS_SIN }
3452
+ { x: chunkLNW5VIEA_cjs.AXIS_COS, y: chunkLNW5VIEA_cjs.AXIS_SIN },
3453
+ { x: -chunkLNW5VIEA_cjs.AXIS_COS, y: chunkLNW5VIEA_cjs.AXIS_SIN }
3448
3454
  ];
3449
3455
  var GUIDE_OVERHANG = 40;
3450
3456
  function snapIsometricDiagonal(apex, rawDx, rawDy, candidates, threshold) {
@@ -3503,7 +3509,6 @@ function applyAxisSnap(bounds, moveX, moveY, snap, minSize) {
3503
3509
  var MOVE_ACTIVE_POINTS = ["min", "center", "max"];
3504
3510
 
3505
3511
  // src/runtime/interaction/move/snapping.ts
3506
- var SNAP_THRESHOLD_PX = 20;
3507
3512
  var GUIDE_OVERHANG2 = 10;
3508
3513
  function isometricApexOf(svg, drag, declared = false) {
3509
3514
  if (drag.canvasObjects.length !== 1) {
@@ -3513,13 +3518,13 @@ function isometricApexOf(svg, drag, declared = false) {
3513
3518
  if (lead.owner.role !== "isometric") {
3514
3519
  return null;
3515
3520
  }
3516
- const primary = chunkEKAWJFJQ_cjs.findOwnerNode(svg, lead.owner.id, chunkEKAWJFJQ_cjs.isPrimary);
3517
- const geometry = primary && chunkEKAWJFJQ_cjs.isometricGeometryOf(primary);
3521
+ const primary = chunkFQ7GMLCM_cjs.findOwnerNode(svg, lead.owner.id, chunkFQ7GMLCM_cjs.isPrimary);
3522
+ const geometry = primary && chunkFQ7GMLCM_cjs.isometricGeometryOf(primary);
3518
3523
  if (!geometry) {
3519
3524
  return null;
3520
3525
  }
3521
3526
  const frame = declared && geometry.bounds ? geometry.bounds : lead.draggedBounds;
3522
- return { x: frame.x + geometry.depth * chunkKXYSO6GC_cjs.AXIS_COS, y: frame.y };
3527
+ return { x: frame.x + geometry.depth * chunkLNW5VIEA_cjs.AXIS_COS, y: frame.y };
3523
3528
  }
3524
3529
  function snapIsometricGrid(svg, drag, rawDx, rawDy) {
3525
3530
  const step = readIsometricSnapStep(svg);
@@ -3536,8 +3541,8 @@ function snapIsometricMove(svg, drag, rawDx, rawDy) {
3536
3541
  return null;
3537
3542
  }
3538
3543
  const excludedIds = new Set(drag.canvasObjects.map((canvasObject) => canvasObject.owner.id));
3539
- const candidates = chunkEKAWJFJQ_cjs.findIsometricApexCandidates(svg, excludedIds);
3540
- const snap = snapIsometricDiagonal(apex, rawDx, rawDy, candidates, SNAP_THRESHOLD_PX / chunkEKAWJFJQ_cjs.pxPerUnit(svg));
3544
+ const candidates = chunkFQ7GMLCM_cjs.findIsometricApexCandidates(svg, excludedIds);
3545
+ const snap = snapIsometricDiagonal(apex, rawDx, rawDy, candidates, snapDistancePx(svg) / chunkFQ7GMLCM_cjs.pxPerUnit(svg));
3541
3546
  return snap ? { dx: snap.dx, dy: snap.dy, guides: [snap.guide] } : null;
3542
3547
  }
3543
3548
  function snapMove(svg, drag, rawDx, rawDy) {
@@ -3554,9 +3559,9 @@ function snapMove(svg, drag, rawDx, rawDy) {
3554
3559
  }
3555
3560
  const leadBounds = offsetBounds(drag.canvasObjects[0].draggedBounds, rawDx, rawDy);
3556
3561
  const excludedIds = new Set(drag.canvasObjects.map((canvasObject) => canvasObject.owner.id));
3557
- const candidates = nearestCandidates(leadBounds, chunkEKAWJFJQ_cjs.findSnapCandidateBounds(svg, excludedIds));
3562
+ const candidates = nearestCandidates(leadBounds, chunkFQ7GMLCM_cjs.findSnapCandidateBounds(svg, excludedIds));
3558
3563
  const snap = computeSnap(leadBounds, candidates, {
3559
- threshold: SNAP_THRESHOLD_PX / chunkEKAWJFJQ_cjs.pxPerUnit(svg),
3564
+ threshold: snapDistancePx(svg) / chunkFQ7GMLCM_cjs.pxPerUnit(svg),
3560
3565
  activeX: MOVE_ACTIVE_POINTS,
3561
3566
  activeY: MOVE_ACTIVE_POINTS,
3562
3567
  guideOverhang: GUIDE_OVERHANG2
@@ -3617,7 +3622,7 @@ function isCompositeOwner(owner) {
3617
3622
  return owner !== null && owner !== void 0 && COMPOSITE_ROLES.has(owner.role);
3618
3623
  }
3619
3624
  function hasDerivedHeight(owner) {
3620
- return owner !== null && owner !== void 0 && chunkEKAWJFJQ_cjs.DERIVED_HEIGHT_ROLES.has(owner.role);
3625
+ return owner !== null && owner !== void 0 && chunkFQ7GMLCM_cjs.DERIVED_HEIGHT_ROLES.has(owner.role);
3621
3626
  }
3622
3627
 
3623
3628
  // src/runtime/interaction/move/canvasObjectCapture.ts
@@ -3638,7 +3643,7 @@ function parentContainerBounds(svg, primary, groupIds) {
3638
3643
  if (!parentId || groupIds.has(parentId)) {
3639
3644
  return void 0;
3640
3645
  }
3641
- const container = chunkEKAWJFJQ_cjs.findOwnerNode(svg, parentId, chunkEKAWJFJQ_cjs.isPrimary);
3646
+ const container = chunkFQ7GMLCM_cjs.findOwnerNode(svg, parentId, chunkFQ7GMLCM_cjs.isPrimary);
3642
3647
  if (!container) {
3643
3648
  return void 0;
3644
3649
  }
@@ -3646,14 +3651,14 @@ function parentContainerBounds(svg, primary, groupIds) {
3646
3651
  return { x: bbox.x, y: bbox.y, width: bbox.width, height: bbox.height };
3647
3652
  }
3648
3653
  function captureCanvasObject(svg, owner, groupIds) {
3649
- const nodes = chunkEKAWJFJQ_cjs.findAllOwnerNodes(svg, owner.id);
3650
- const primary = chunkEKAWJFJQ_cjs.findOwnerNode(svg, owner.id, chunkEKAWJFJQ_cjs.isPrimary);
3654
+ const nodes = chunkFQ7GMLCM_cjs.findAllOwnerNodes(svg, owner.id);
3655
+ const primary = chunkFQ7GMLCM_cjs.findOwnerNode(svg, owner.id, chunkFQ7GMLCM_cjs.isPrimary);
3651
3656
  if (!nodes.length || !primary) {
3652
3657
  return null;
3653
3658
  }
3654
3659
  const overlays = [...svg.querySelectorAll(`[data-sf-selection-overlay="${CSS.escape(owner.id)}"]`)];
3655
3660
  const draggedBounds = primary.getBBox();
3656
- const isometricGeometry = owner.role === "isometric" ? chunkEKAWJFJQ_cjs.isometricGeometryOf(primary) : null;
3661
+ const isometricGeometry = owner.role === "isometric" ? chunkFQ7GMLCM_cjs.isometricGeometryOf(primary) : null;
3657
3662
  const isometricSize = isometricGeometry ? { width: isometricGeometry.width, height: isometricGeometry.height, depth: isometricGeometry.depth } : void 0;
3658
3663
  return {
3659
3664
  owner,
@@ -3695,7 +3700,7 @@ function captureInternalLinks(svg, groupIds) {
3695
3700
  if (!linkId || !belongsToMoveGroup(path, groupIds)) {
3696
3701
  continue;
3697
3702
  }
3698
- const nodes = chunkEKAWJFJQ_cjs.findAllOwnerNodes(svg, linkId);
3703
+ const nodes = chunkFQ7GMLCM_cjs.findAllOwnerNodes(svg, linkId);
3699
3704
  if (nodes.length) {
3700
3705
  links.push({ nodes, baseTransforms: nodes.map((node) => node.getAttribute("transform")) });
3701
3706
  }
@@ -3729,7 +3734,7 @@ function containedChildren(viewer, owner) {
3729
3734
  return [];
3730
3735
  }
3731
3736
  const nodes = viewer.svg.querySelectorAll(`[data-sf-parent-frame="${CSS.escape(owner.id)}"]`);
3732
- return [...nodes].map((node) => chunkEKAWJFJQ_cjs.resolveOwner(node)).filter((ref) => ref !== null);
3737
+ return [...nodes].map((node) => chunkFQ7GMLCM_cjs.resolveOwner(node)).filter((ref) => ref !== null);
3733
3738
  }
3734
3739
  function selectedMoveGroup(viewer, owner) {
3735
3740
  const selection = viewer.getSelection();
@@ -3746,7 +3751,7 @@ function isChartInteractiveMark(target) {
3746
3751
  }
3747
3752
  function createMoveDragState(viewer, event, startUser) {
3748
3753
  const target = event.target;
3749
- const owner = chunkEKAWJFJQ_cjs.resolveOwner(target);
3754
+ const owner = chunkFQ7GMLCM_cjs.resolveOwner(target);
3750
3755
  if (!hasMovableGeometry(owner) || isChartInteractiveMark(target)) {
3751
3756
  return null;
3752
3757
  }
@@ -3780,7 +3785,7 @@ var MoveSession = class {
3780
3785
  this.#emitter = emitter;
3781
3786
  }
3782
3787
  pointerDown = (event) => {
3783
- if (event.button !== 0 || this.#drag || chunkEKAWJFJQ_cjs.isCameraGesture(event)) {
3788
+ if (event.button !== 0 || this.#drag || chunkFQ7GMLCM_cjs.isCameraGesture(event)) {
3784
3789
  return;
3785
3790
  }
3786
3791
  this.#drag = createMoveDragState(this.#viewer, event, movePointerPosition(this.#svg, event));
@@ -3798,7 +3803,7 @@ var MoveSession = class {
3798
3803
  const delta = snapMove(this.#svg, drag, rawDelta.dx, rawDelta.dy);
3799
3804
  const clamped = clampMoveDelta(drag.canvasObjects, delta.dx, delta.dy);
3800
3805
  applyMovePreview(drag, clamped.dx, clamped.dy);
3801
- chunkEKAWJFJQ_cjs.updateAlignmentGuides(this.#svg, delta.guides, MOVE_GUIDE_COLOR);
3806
+ chunkFQ7GMLCM_cjs.updateAlignmentGuides(this.#svg, delta.guides, MOVE_GUIDE_COLOR);
3802
3807
  };
3803
3808
  pointerUp = (event) => {
3804
3809
  const drag = this.#drag;
@@ -3807,7 +3812,7 @@ var MoveSession = class {
3807
3812
  }
3808
3813
  this.#drag = null;
3809
3814
  event.target.releasePointerCapture?.(drag.pointerId);
3810
- chunkEKAWJFJQ_cjs.clearAlignmentGuides(this.#svg);
3815
+ chunkFQ7GMLCM_cjs.clearAlignmentGuides(this.#svg);
3811
3816
  emitMoveCompletion(this.#svg, this.#emitter, drag, event);
3812
3817
  };
3813
3818
  cancel() {
@@ -3953,9 +3958,9 @@ var START_POINT_RADIUS_PX = 6;
3953
3958
  var POINT_STROKE_WIDTH_PX = 1.5;
3954
3959
  function createPathDrawPreview(svg) {
3955
3960
  const document2 = svg.ownerDocument;
3956
- const group = document2.createElementNS(chunkEKAWJFJQ_cjs.SVG_NAMESPACE, "g");
3961
+ const group = document2.createElementNS(chunkFQ7GMLCM_cjs.SVG_NAMESPACE, "g");
3957
3962
  group.setAttribute("pointer-events", "none");
3958
- const line = document2.createElementNS(chunkEKAWJFJQ_cjs.SVG_NAMESPACE, "path");
3963
+ const line = document2.createElementNS(chunkFQ7GMLCM_cjs.SVG_NAMESPACE, "path");
3959
3964
  line.setAttribute("fill", "none");
3960
3965
  line.setAttribute("stroke", PREVIEW_COLOR);
3961
3966
  line.setAttribute("stroke-linecap", "round");
@@ -3965,8 +3970,8 @@ function createPathDrawPreview(svg) {
3965
3970
  }
3966
3971
  function pointMarker(svg, point, highlighted) {
3967
3972
  const document2 = svg.ownerDocument;
3968
- const unit = 1 / chunkEKAWJFJQ_cjs.pxPerUnit(svg);
3969
- const circle = document2.createElementNS(chunkEKAWJFJQ_cjs.SVG_NAMESPACE, "circle");
3973
+ const unit = 1 / chunkFQ7GMLCM_cjs.pxPerUnit(svg);
3974
+ const circle = document2.createElementNS(chunkFQ7GMLCM_cjs.SVG_NAMESPACE, "circle");
3970
3975
  circle.setAttribute("cx", String(point.x));
3971
3976
  circle.setAttribute("cy", String(point.y));
3972
3977
  circle.setAttribute("r", String((highlighted ? START_POINT_RADIUS_PX : POINT_RADIUS_PX) * unit));
@@ -3980,11 +3985,11 @@ function updatePathDrawPreview(svg, state) {
3980
3985
  if (!previewLine || !previewGroup) {
3981
3986
  return;
3982
3987
  }
3983
- const unit = 1 / chunkEKAWJFJQ_cjs.pxPerUnit(svg);
3988
+ const unit = 1 / chunkFQ7GMLCM_cjs.pxPerUnit(svg);
3984
3989
  previewLine.setAttribute("stroke-width", String(LINE_WIDTH_PX * unit));
3985
3990
  previewLine.setAttribute("stroke-dasharray", `${DASH_PX * unit} ${GAP_PX * unit}`);
3986
3991
  const live = state.cursor ? [...state.points, state.cursor] : state.points;
3987
- previewLine.setAttribute("d", chunkKXYSO6GC_cjs.freeformPathData({ points: live, tension: state.tension, closed: false }));
3992
+ previewLine.setAttribute("d", chunkLNW5VIEA_cjs.freeformPathData({ points: live, tension: state.tension, closed: false }));
3988
3993
  while (previewGroup.childNodes.length > 1) {
3989
3994
  previewGroup.lastChild?.remove();
3990
3995
  }
@@ -4044,12 +4049,12 @@ var PathDrawSession = class {
4044
4049
  }
4045
4050
  }
4046
4051
  pointerDown = (event) => {
4047
- if (!this.#state.active || event.button !== 0 || chunkEKAWJFJQ_cjs.isCameraGesture(event)) {
4052
+ if (!this.#state.active || event.button !== 0 || chunkFQ7GMLCM_cjs.isCameraGesture(event)) {
4048
4053
  return;
4049
4054
  }
4050
4055
  event.stopPropagation();
4051
4056
  event.preventDefault();
4052
- const point = chunkEKAWJFJQ_cjs.pointerUserPoint(this.#svg, event);
4057
+ const point = chunkFQ7GMLCM_cjs.pointerUserPoint(this.#svg, event);
4053
4058
  if (!point) {
4054
4059
  return;
4055
4060
  }
@@ -4068,14 +4073,14 @@ var PathDrawSession = class {
4068
4073
  this.#state.cursor = resolved.point;
4069
4074
  this.#state.willClose = false;
4070
4075
  updatePathDrawPreview(this.#svg, this.#state);
4071
- chunkEKAWJFJQ_cjs.clearAlignmentGuides(this.#svg);
4076
+ chunkFQ7GMLCM_cjs.clearAlignmentGuides(this.#svg);
4072
4077
  };
4073
4078
  pointerMove = (event) => {
4074
4079
  if (!this.#state.active) {
4075
4080
  return;
4076
4081
  }
4077
4082
  event.stopPropagation();
4078
- const point = chunkEKAWJFJQ_cjs.pointerUserPoint(this.#svg, event);
4083
+ const point = chunkFQ7GMLCM_cjs.pointerUserPoint(this.#svg, event);
4079
4084
  if (!point) {
4080
4085
  return;
4081
4086
  }
@@ -4084,9 +4089,9 @@ var PathDrawSession = class {
4084
4089
  this.#state.willClose = resolved.willClose;
4085
4090
  updatePathDrawPreview(this.#svg, this.#state);
4086
4091
  if (resolved.guide) {
4087
- chunkEKAWJFJQ_cjs.updateAlignmentGuides(this.#svg, [resolved.guide], GUIDE_COLOR2);
4092
+ chunkFQ7GMLCM_cjs.updateAlignmentGuides(this.#svg, [resolved.guide], GUIDE_COLOR2);
4088
4093
  } else {
4089
- chunkEKAWJFJQ_cjs.clearAlignmentGuides(this.#svg);
4094
+ chunkFQ7GMLCM_cjs.clearAlignmentGuides(this.#svg);
4090
4095
  }
4091
4096
  };
4092
4097
  pointerUp = (event) => {
@@ -4121,10 +4126,10 @@ var PathDrawSession = class {
4121
4126
  } else if (event.key === "Backspace" && this.#state.points.length > 0) {
4122
4127
  event.preventDefault();
4123
4128
  this.#state.points = this.#state.points.slice(0, -1);
4124
- const closeSnapUnits = CLOSE_SNAP_PX / chunkEKAWJFJQ_cjs.pxPerUnit(this.#svg);
4129
+ const closeSnapUnits = CLOSE_SNAP_PX / chunkFQ7GMLCM_cjs.pxPerUnit(this.#svg);
4125
4130
  this.#state.willClose = this.#state.cursor ? isCloseToStart(this.#state.points, this.#state.cursor, closeSnapUnits) : false;
4126
4131
  updatePathDrawPreview(this.#svg, this.#state);
4127
- chunkEKAWJFJQ_cjs.clearAlignmentGuides(this.#svg);
4132
+ chunkFQ7GMLCM_cjs.clearAlignmentGuides(this.#svg);
4128
4133
  }
4129
4134
  };
4130
4135
  keyUp = (event) => {
@@ -4133,7 +4138,7 @@ var PathDrawSession = class {
4133
4138
  }
4134
4139
  };
4135
4140
  #resolvePoint(raw) {
4136
- const closeSnapUnits = CLOSE_SNAP_PX / chunkEKAWJFJQ_cjs.pxPerUnit(this.#svg);
4141
+ const closeSnapUnits = CLOSE_SNAP_PX / chunkFQ7GMLCM_cjs.pxPerUnit(this.#svg);
4137
4142
  if (isCloseToStart(this.#state.points, raw, closeSnapUnits)) {
4138
4143
  return { point: this.#state.points[0], willClose: true, guide: null };
4139
4144
  }
@@ -4143,7 +4148,7 @@ var PathDrawSession = class {
4143
4148
  return { point: raw, willClose: false, guide: null };
4144
4149
  }
4145
4150
  const angleSnapped = snapTo45Degrees(last, raw);
4146
- const guideSnapUnits = GUIDE_SNAP_PX / chunkEKAWJFJQ_cjs.pxPerUnit(this.#svg);
4151
+ const guideSnapUnits = GUIDE_SNAP_PX / chunkFQ7GMLCM_cjs.pxPerUnit(this.#svg);
4147
4152
  const { point, guide } = snapToSessionGuides(last, angleSnapped, points.slice(0, -1), raw, guideSnapUnits);
4148
4153
  return { point, willClose: false, guide };
4149
4154
  }
@@ -4157,7 +4162,7 @@ var PathDrawSession = class {
4157
4162
  }
4158
4163
  #reset(callExit) {
4159
4164
  this.#state.previewGroup?.remove();
4160
- chunkEKAWJFJQ_cjs.clearAlignmentGuides(this.#svg);
4165
+ chunkFQ7GMLCM_cjs.clearAlignmentGuides(this.#svg);
4161
4166
  const exit = this.#state.onExit;
4162
4167
  this.#state = createIdlePathDrawState();
4163
4168
  this.#shiftHeld = false;
@@ -4200,7 +4205,7 @@ function applyPathReshapePreview(drag, point) {
4200
4205
  const points = drag.points.map(
4201
4206
  (existing, index) => index === drag.pointIndex ? [point.x, point.y] : existing
4202
4207
  );
4203
- const d = chunkKXYSO6GC_cjs.freeformPathData({
4208
+ const d = chunkLNW5VIEA_cjs.freeformPathData({
4204
4209
  points: points.map(([x, y]) => ({ x, y })),
4205
4210
  tension: drag.tension,
4206
4211
  closed: drag.closed
@@ -4208,22 +4213,22 @@ function applyPathReshapePreview(drag, point) {
4208
4213
  drag.pathNode.setAttribute("d", d);
4209
4214
  drag.handle.setAttribute("cx", String(point.x));
4210
4215
  drag.handle.setAttribute("cy", String(point.y));
4211
- drag.overlay?.querySelector(`[${chunkEKAWJFJQ_cjs.PATH_HALO_ATTR}]`)?.setAttribute("d", d);
4216
+ drag.overlay?.querySelector(`[${chunkFQ7GMLCM_cjs.PATH_HALO_ATTR}]`)?.setAttribute("d", d);
4212
4217
  return points;
4213
4218
  }
4214
4219
 
4215
4220
  // src/runtime/interaction/pathReshape/target.ts
4216
4221
  function resolvePathReshapeTarget(svg, event) {
4217
- const handle = event.target?.closest?.(`[${chunkKXYSO6GC_cjs.PATH_POINT_INDEX_ATTR}]`) ?? null;
4218
- const indexAttr = handle?.getAttribute(chunkKXYSO6GC_cjs.PATH_POINT_INDEX_ATTR) ?? null;
4222
+ const handle = event.target?.closest?.(`[${chunkLNW5VIEA_cjs.PATH_POINT_INDEX_ATTR}]`) ?? null;
4223
+ const indexAttr = handle?.getAttribute(chunkLNW5VIEA_cjs.PATH_POINT_INDEX_ATTR) ?? null;
4219
4224
  const pointIndex = indexAttr !== null ? Number(indexAttr) : Number.NaN;
4220
4225
  const ownerId = handle?.closest("[data-sf-selection-overlay]")?.getAttribute("data-sf-selection-overlay");
4221
4226
  if (!handle || !Number.isInteger(pointIndex) || !ownerId) {
4222
4227
  return null;
4223
4228
  }
4224
- const pathNode = chunkEKAWJFJQ_cjs.findOwnerNode(svg, ownerId, chunkEKAWJFJQ_cjs.isPrimary);
4225
- const owner = pathNode && chunkEKAWJFJQ_cjs.resolveOwner(pathNode);
4226
- const geometry = pathNode && chunkEKAWJFJQ_cjs.pathGeometryOf(pathNode);
4229
+ const pathNode = chunkFQ7GMLCM_cjs.findOwnerNode(svg, ownerId, chunkFQ7GMLCM_cjs.isPrimary);
4230
+ const owner = pathNode && chunkFQ7GMLCM_cjs.resolveOwner(pathNode);
4231
+ const geometry = pathNode && chunkFQ7GMLCM_cjs.pathGeometryOf(pathNode);
4227
4232
  if (!pathNode || !owner || !geometry || pointIndex < 0 || pointIndex >= geometry.points.length) {
4228
4233
  return null;
4229
4234
  }
@@ -4266,7 +4271,7 @@ var PathReshapeSession = class {
4266
4271
  this.#emitter = emitter;
4267
4272
  }
4268
4273
  pointerDown = (event) => {
4269
- if (event.button !== 0 || this.#drag || chunkEKAWJFJQ_cjs.isCameraGesture(event)) {
4274
+ if (event.button !== 0 || this.#drag || chunkFQ7GMLCM_cjs.isCameraGesture(event)) {
4270
4275
  return;
4271
4276
  }
4272
4277
  this.#drag = createPathReshapeDragState(this.#svg, event);
@@ -4277,7 +4282,7 @@ var PathReshapeSession = class {
4277
4282
  return;
4278
4283
  }
4279
4284
  drag.moved = true;
4280
- const point = chunkEKAWJFJQ_cjs.pointerUserPoint(this.#svg, event);
4285
+ const point = chunkFQ7GMLCM_cjs.pointerUserPoint(this.#svg, event);
4281
4286
  if (point) {
4282
4287
  applyPathReshapePreview(drag, point);
4283
4288
  }
@@ -4292,7 +4297,7 @@ var PathReshapeSession = class {
4292
4297
  if (!drag.moved) {
4293
4298
  return;
4294
4299
  }
4295
- const point = chunkEKAWJFJQ_cjs.pointerUserPoint(this.#svg, event) ?? {
4300
+ const point = chunkFQ7GMLCM_cjs.pointerUserPoint(this.#svg, event) ?? {
4296
4301
  x: drag.points[drag.pointIndex][0],
4297
4302
  y: drag.points[drag.pointIndex][1]
4298
4303
  };
@@ -4333,7 +4338,7 @@ function updatePieLabelDragPreview(drag, dx, dy) {
4333
4338
  }
4334
4339
  const from = { x: drag.tickStartX, y: drag.tickStartY };
4335
4340
  const to = { x: drag.restX + dx, y: drag.restY + dy };
4336
- const clipped = chunkKXYSO6GC_cjs.clipSegmentToRect(from, to, drag.halfWidth, drag.halfHeight);
4341
+ const clipped = chunkLNW5VIEA_cjs.clipSegmentToRect(from, to, drag.halfWidth, drag.halfHeight);
4337
4342
  drag.tickElement.setAttribute("d", `M ${from.x} ${from.y} L ${clipped.x} ${clipped.y}`);
4338
4343
  drag.tickElement.setAttribute("stroke", PREVIEW_TICK_COLOR);
4339
4344
  drag.tickElement.setAttribute("stroke-width", PREVIEW_TICK_STROKE_WIDTH);
@@ -4359,7 +4364,7 @@ function restoreAttribute(element2, name, value) {
4359
4364
 
4360
4365
  // src/runtime/interaction/pieGeometry.ts
4361
4366
  function readPieGeometry(svg, ownerId) {
4362
- const raw = chunkEKAWJFJQ_cjs.findOwnerNode(svg, ownerId, chunkEKAWJFJQ_cjs.isPrimary)?.getAttribute("data-sf-pie-geometry");
4367
+ const raw = chunkFQ7GMLCM_cjs.findOwnerNode(svg, ownerId, chunkFQ7GMLCM_cjs.isPrimary)?.getAttribute("data-sf-pie-geometry");
4363
4368
  if (!raw) {
4364
4369
  return null;
4365
4370
  }
@@ -4378,7 +4383,7 @@ function findLabelMark2(event) {
4378
4383
  return event.target?.closest?.(selector);
4379
4384
  }
4380
4385
  function isLabelPointer2(event) {
4381
- return event.button === 0 && !chunkEKAWJFJQ_cjs.isCameraGesture(event);
4386
+ return event.button === 0 && !chunkFQ7GMLCM_cjs.isCameraGesture(event);
4382
4387
  }
4383
4388
  function findLabelSiblings(svg, ownerId, seriesId, mark) {
4384
4389
  const selector = `[data-sf-id="${CSS.escape(ownerId)}"][data-sf-series="${CSS.escape(seriesId)}"][data-sf-mark="${mark}"]`;
@@ -4410,7 +4415,7 @@ function resolvePieLabelDrag(svg, event) {
4410
4415
  if (!clicked) {
4411
4416
  return null;
4412
4417
  }
4413
- const owner = chunkEKAWJFJQ_cjs.resolveOwner(clicked);
4418
+ const owner = chunkFQ7GMLCM_cjs.resolveOwner(clicked);
4414
4419
  if (owner?.role !== "chart") {
4415
4420
  return null;
4416
4421
  }
@@ -4429,7 +4434,7 @@ function resolvePieLabelDrag(svg, event) {
4429
4434
  const wedgeRadius = clicked.getAttribute("data-sf-pie-wedge-radius");
4430
4435
  const explicitRadius = wedgeRadius === null ? Number.NaN : Number(wedgeRadius);
4431
4436
  const outerRadius = Number.isFinite(explicitRadius) ? explicitRadius : geometry.outerRadius;
4432
- const start = chunkEKAWJFJQ_cjs.pointerUserPoint(svg, event);
4437
+ const start = chunkFQ7GMLCM_cjs.pointerUserPoint(svg, event);
4433
4438
  if (!start) {
4434
4439
  return null;
4435
4440
  }
@@ -4451,13 +4456,13 @@ function resolvePieLabelDrag(svg, event) {
4451
4456
  outerRadius,
4452
4457
  anchorX: geometry.centerX + outerRadius * Math.cos(midAngle),
4453
4458
  anchorY: geometry.centerY + outerRadius * Math.sin(midAngle),
4454
- tickStartX: geometry.centerX + (outerRadius + chunkKXYSO6GC_cjs.LEADER_INSET) * Math.cos(midAngle),
4455
- tickStartY: geometry.centerY + (outerRadius + chunkKXYSO6GC_cjs.LEADER_INSET) * Math.sin(midAngle),
4459
+ tickStartX: geometry.centerX + (outerRadius + chunkLNW5VIEA_cjs.LEADER_INSET) * Math.cos(midAngle),
4460
+ tickStartY: geometry.centerY + (outerRadius + chunkLNW5VIEA_cjs.LEADER_INSET) * Math.sin(midAngle),
4456
4461
  restX,
4457
4462
  restY,
4458
4463
  startX: start.x,
4459
4464
  startY: start.y,
4460
- halfWidth: chunkKXYSO6GC_cjs.LABEL_WIDTH / 2,
4465
+ halfWidth: chunkLNW5VIEA_cjs.LABEL_WIDTH / 2,
4461
4466
  halfHeight: fontSize * 1.2,
4462
4467
  moved: false,
4463
4468
  lastDx: 0,
@@ -4493,7 +4498,7 @@ var PieLabelDragSession = class {
4493
4498
  if (!this.#drag || event.pointerId !== this.#drag.pointerId) {
4494
4499
  return;
4495
4500
  }
4496
- const point = chunkEKAWJFJQ_cjs.pointerUserPoint(this.#svg, event);
4501
+ const point = chunkFQ7GMLCM_cjs.pointerUserPoint(this.#svg, event);
4497
4502
  if (!point) {
4498
4503
  return;
4499
4504
  }
@@ -4525,8 +4530,8 @@ var PieLabelDragSession = class {
4525
4530
  if (!drag.moved) {
4526
4531
  return;
4527
4532
  }
4528
- const pathX = chunkKXYSO6GC_cjs.seriesLabelOffsetXProp(drag.seriesId);
4529
- const pathY = chunkKXYSO6GC_cjs.seriesLabelOffsetYProp(drag.seriesId);
4533
+ const pathX = chunkLNW5VIEA_cjs.seriesLabelOffsetXProp(drag.seriesId);
4534
+ const pathY = chunkLNW5VIEA_cjs.seriesLabelOffsetYProp(drag.seriesId);
4530
4535
  if (!pathX || !pathY) {
4531
4536
  return;
4532
4537
  }
@@ -4588,7 +4593,7 @@ function siblingNodes(svg, owner, path) {
4588
4593
  });
4589
4594
  }
4590
4595
  function resolvePropertyDrag(svg, event, rules) {
4591
- if (event.button !== 0 || chunkEKAWJFJQ_cjs.isCameraGesture(event)) {
4596
+ if (event.button !== 0 || chunkFQ7GMLCM_cjs.isCameraGesture(event)) {
4592
4597
  return null;
4593
4598
  }
4594
4599
  const node = event.target?.closest?.('[data-sf-prop-kind="value"]');
@@ -4596,11 +4601,11 @@ function resolvePropertyDrag(svg, event, rules) {
4596
4601
  return null;
4597
4602
  }
4598
4603
  const path = node.getAttribute("data-sf-prop");
4599
- const owner = chunkEKAWJFJQ_cjs.resolveOwner(node);
4604
+ const owner = chunkFQ7GMLCM_cjs.resolveOwner(node);
4600
4605
  if (!path || owner?.role !== "chart" || !isEditablePath(path, rules)) {
4601
4606
  return null;
4602
4607
  }
4603
- const scale = parseValueScale(chunkEKAWJFJQ_cjs.findOwnerNode(svg, owner.id, chunkEKAWJFJQ_cjs.isPrimary));
4608
+ const scale = parseValueScale(chunkFQ7GMLCM_cjs.findOwnerNode(svg, owner.id, chunkFQ7GMLCM_cjs.isPrimary));
4604
4609
  if (!scale) {
4605
4610
  return null;
4606
4611
  }
@@ -4869,7 +4874,7 @@ function resolvePropertyTarget(event, rules) {
4869
4874
  return null;
4870
4875
  }
4871
4876
  const path = hit.getAttribute("data-sf-prop");
4872
- const owner = chunkEKAWJFJQ_cjs.resolveOwner(hit);
4877
+ const owner = chunkFQ7GMLCM_cjs.resolveOwner(hit);
4873
4878
  if (!path || !owner || !isEditablePath(path, rules)) {
4874
4879
  return null;
4875
4880
  }
@@ -4908,7 +4913,7 @@ var PropertyEditingSession = class {
4908
4913
  begin(target) {
4909
4914
  this.cancel();
4910
4915
  const { node } = target;
4911
- const rect = chunkEKAWJFJQ_cjs.screenRectOf(node);
4916
+ const rect = chunkFQ7GMLCM_cjs.screenRectOf(node);
4912
4917
  const fontSize = Number.parseFloat(node.getAttribute("font-size") || "12");
4913
4918
  const originalText = node.textContent ?? "";
4914
4919
  const anchor = node.getAttribute("text-anchor");
@@ -4998,9 +5003,9 @@ function crossedDuplicateDragThreshold(drag, event) {
4998
5003
  var PREVIEW_STROKE_PX = 2;
4999
5004
  var NEW_LINK_PATH_TYPE = "orthogonal";
5000
5005
  function createDuplicatePreviewPath(svg) {
5001
- const path = svg.ownerDocument.createElementNS(chunkEKAWJFJQ_cjs.SVG_NAMESPACE, "path");
5006
+ const path = svg.ownerDocument.createElementNS(chunkFQ7GMLCM_cjs.SVG_NAMESPACE, "path");
5002
5007
  path.setAttribute("fill", "none");
5003
- path.setAttribute("stroke-width", String(PREVIEW_STROKE_PX / chunkEKAWJFJQ_cjs.pxPerUnit(svg)));
5008
+ path.setAttribute("stroke-width", String(PREVIEW_STROKE_PX / chunkFQ7GMLCM_cjs.pxPerUnit(svg)));
5004
5009
  path.style.pointerEvents = "none";
5005
5010
  return path;
5006
5011
  }
@@ -5019,7 +5024,7 @@ function previewLink3(fromSide, toSide) {
5019
5024
  }
5020
5025
  function updateDuplicatePreview(drag, toPoint, toSide) {
5021
5026
  const link = previewLink3(drag.direction, toSide);
5022
- const { points, segments } = chunkKXYSO6GC_cjs.calculateLinkRoute(link, drag.fixedPoint, toPoint, NEW_LINK_PATH_TYPE);
5027
+ const { points, segments } = chunkLNW5VIEA_cjs.calculateLinkRoute(link, drag.fixedPoint, toPoint, NEW_LINK_PATH_TYPE);
5023
5028
  drag.previewPath.setAttribute("d", previewPathData(points, segments, NEW_LINK_PATH_TYPE, 2));
5024
5029
  }
5025
5030
 
@@ -5030,7 +5035,7 @@ function duplicateCandidates(svg, sourceId) {
5030
5035
  if (element2.getAttribute("data-sf-role") === "link") {
5031
5036
  continue;
5032
5037
  }
5033
- const owner = chunkEKAWJFJQ_cjs.resolveOwner(element2);
5038
+ const owner = chunkFQ7GMLCM_cjs.resolveOwner(element2);
5034
5039
  if (owner && owner.id !== sourceId) {
5035
5040
  candidates.push({ owner, bounds: element2.getBBox() });
5036
5041
  }
@@ -5044,8 +5049,8 @@ function createQuickDuplicateDragState(svg, event, previewPath) {
5044
5049
  if (!bubble || !direction || direction.startsWith("iso-") || !sourceId) {
5045
5050
  return null;
5046
5051
  }
5047
- const primary = chunkEKAWJFJQ_cjs.findOwnerNode(svg, sourceId, chunkEKAWJFJQ_cjs.isPrimary);
5048
- const sourceOwner = primary && chunkEKAWJFJQ_cjs.resolveOwner(primary);
5052
+ const primary = chunkFQ7GMLCM_cjs.findOwnerNode(svg, sourceId, chunkFQ7GMLCM_cjs.isPrimary);
5053
+ const sourceOwner = primary && chunkFQ7GMLCM_cjs.resolveOwner(primary);
5049
5054
  if (!primary || !sourceOwner) {
5050
5055
  return null;
5051
5056
  }
@@ -5053,7 +5058,7 @@ function createQuickDuplicateDragState(svg, event, previewPath) {
5053
5058
  return {
5054
5059
  sourceOwner,
5055
5060
  direction,
5056
- fixedPoint: chunkKXYSO6GC_cjs.pointAtPort(primary.getBBox(), { side: direction, offset: 0.5 }),
5061
+ fixedPoint: chunkLNW5VIEA_cjs.pointAtPort(primary.getBBox(), { side: direction, offset: 0.5 }),
5057
5062
  previewPath,
5058
5063
  ghost: new LinkGhost(svg, previewPath),
5059
5064
  candidates: duplicateCandidates(svg, sourceId),
@@ -5081,7 +5086,7 @@ var QuickDuplicateSession = class {
5081
5086
  this.#emitter = emitter;
5082
5087
  }
5083
5088
  pointerDown = (event) => {
5084
- if (event.button !== 0 || this.#drag || chunkEKAWJFJQ_cjs.isCameraGesture(event)) {
5089
+ if (event.button !== 0 || this.#drag || chunkFQ7GMLCM_cjs.isCameraGesture(event)) {
5085
5090
  return;
5086
5091
  }
5087
5092
  this.#drag = createQuickDuplicateDragState(this.#svg, event, createDuplicatePreviewPath(this.#svg));
@@ -5095,7 +5100,7 @@ var QuickDuplicateSession = class {
5095
5100
  return;
5096
5101
  }
5097
5102
  this.beginPreview(drag);
5098
- const target = resolveDuplicateTarget(drag, duplicatePointerPosition(this.#svg, event), 1 / chunkEKAWJFJQ_cjs.pxPerUnit(this.#svg));
5103
+ const target = resolveDuplicateTarget(drag, duplicatePointerPosition(this.#svg, event), 1 / chunkFQ7GMLCM_cjs.pxPerUnit(this.#svg));
5099
5104
  updateDuplicatePreview(drag, target.point, target.side);
5100
5105
  drag.ghost.show(target.hit !== null, target.bounds);
5101
5106
  };
@@ -5153,14 +5158,14 @@ function seriesShapes(svg, ownerId, series) {
5153
5158
  return [...svg.querySelectorAll(selector)];
5154
5159
  }
5155
5160
  function updateRadarVertexDragPreview(svg, drag, value) {
5156
- const point = chunkKXYSO6GC_cjs.radarVertexPoint(drag.frame, drag.index, value);
5161
+ const point = chunkLNW5VIEA_cjs.radarVertexPoint(drag.frame, drag.index, value);
5157
5162
  drag.element.setAttribute("cx", String(point.x));
5158
5163
  drag.element.setAttribute("cy", String(point.y));
5159
5164
  const points = seriesVertices(svg, drag.owner.id, drag.series).map((vertex) => ({
5160
5165
  x: Number(vertex.getAttribute("cx")),
5161
5166
  y: Number(vertex.getAttribute("cy"))
5162
5167
  }));
5163
- const path = chunkKXYSO6GC_cjs.radarSeriesPath(points, drag.frame.curved, drag.frame.tension);
5168
+ const path = chunkLNW5VIEA_cjs.radarSeriesPath(points, drag.frame.curved, drag.frame.tension);
5164
5169
  for (const shape of seriesShapes(svg, drag.owner.id, drag.series)) {
5165
5170
  shape.setAttribute("d", path);
5166
5171
  }
@@ -5215,7 +5220,7 @@ function findVertex(event) {
5215
5220
  return event.target?.closest?.('[data-sf-mark="radar-vertex"]');
5216
5221
  }
5217
5222
  function isVertexPointer(event) {
5218
- return event.button === 0 && !chunkEKAWJFJQ_cjs.isCameraGesture(event);
5223
+ return event.button === 0 && !chunkFQ7GMLCM_cjs.isCameraGesture(event);
5219
5224
  }
5220
5225
  function resolveRadarVertexDrag(svg, event) {
5221
5226
  if (!isVertexPointer(event)) {
@@ -5225,7 +5230,7 @@ function resolveRadarVertexDrag(svg, event) {
5225
5230
  if (!element2) {
5226
5231
  return null;
5227
5232
  }
5228
- const owner = chunkEKAWJFJQ_cjs.resolveOwner(element2);
5233
+ const owner = chunkFQ7GMLCM_cjs.resolveOwner(element2);
5229
5234
  if (owner?.role !== "chart") {
5230
5235
  return null;
5231
5236
  }
@@ -5234,7 +5239,7 @@ function resolveRadarVertexDrag(svg, event) {
5234
5239
  if (!series || !Number.isInteger(index) || index < 0) {
5235
5240
  return null;
5236
5241
  }
5237
- const frame = parseRadarFrame(chunkEKAWJFJQ_cjs.findOwnerNode(svg, owner.id, chunkEKAWJFJQ_cjs.isPrimary));
5242
+ const frame = parseRadarFrame(chunkFQ7GMLCM_cjs.findOwnerNode(svg, owner.id, chunkFQ7GMLCM_cjs.isPrimary));
5238
5243
  if (!frame || index >= frame.count) {
5239
5244
  return null;
5240
5245
  }
@@ -5244,11 +5249,11 @@ function resolveRadarVertexDrag(svg, event) {
5244
5249
 
5245
5250
  // src/runtime/interaction/radarVertexDrag/session.ts
5246
5251
  function valueFrom(svg, event, drag) {
5247
- const point = chunkEKAWJFJQ_cjs.pointerUserPoint(svg, event);
5252
+ const point = chunkFQ7GMLCM_cjs.pointerUserPoint(svg, event);
5248
5253
  if (!point) {
5249
5254
  return null;
5250
5255
  }
5251
- return chunkKXYSO6GC_cjs.radarValueAtPoint(drag.frame, drag.index, point.x, point.y);
5256
+ return chunkLNW5VIEA_cjs.radarValueAtPoint(drag.frame, drag.index, point.x, point.y);
5252
5257
  }
5253
5258
  var RadarVertexDragSession = class {
5254
5259
  #svg;
@@ -5280,7 +5285,7 @@ var RadarVertexDragSession = class {
5280
5285
  if (!this.#readout) {
5281
5286
  this.#readout = createValueReadout(this.#svg);
5282
5287
  }
5283
- const vertex = chunkKXYSO6GC_cjs.radarVertexPoint(this.#drag.frame, this.#drag.index, value);
5288
+ const vertex = chunkLNW5VIEA_cjs.radarVertexPoint(this.#drag.frame, this.#drag.index, value);
5284
5289
  positionRadarReadout(this.#readout, vertex, this.#drag.frame.centerY, value);
5285
5290
  }
5286
5291
  cancel() {
@@ -5371,7 +5376,7 @@ function captureTextFit(text) {
5371
5376
  fontSize,
5372
5377
  lineHeight,
5373
5378
  padding: Math.max(8, text.strokeWidth * 2),
5374
- longestWord: Math.max(0, ...words.map((word) => chunkKXYSO6GC_cjs.estimateTextWidth(word, fontSize, bold)))
5379
+ longestWord: Math.max(0, ...words.map((word) => chunkLNW5VIEA_cjs.estimateTextWidth(word, fontSize, bold)))
5375
5380
  };
5376
5381
  }
5377
5382
  var COMMIT_PRECISION = 10;
@@ -5382,7 +5387,7 @@ function minWidthForText(fit) {
5382
5387
  return roundUpForCommit(fit.longestWord + fit.padding * 2);
5383
5388
  }
5384
5389
  function minHeightForText(fit, width) {
5385
- const lines = chunkKXYSO6GC_cjs.wrapText(fit.rawText, Math.max(0, width - fit.padding * 2), fit.fontSize);
5390
+ const lines = chunkLNW5VIEA_cjs.wrapText(fit.rawText, Math.max(0, width - fit.padding * 2), fit.fontSize);
5386
5391
  return roundUpForCommit(lines.length * fit.fontSize * fit.lineHeight + fit.padding * 2);
5387
5392
  }
5388
5393
 
@@ -5398,6 +5403,30 @@ var HANDLE_AXES = {
5398
5403
  "bottom-left": { x: "left", y: "bottom" },
5399
5404
  left: { x: "left", y: "none" }
5400
5405
  };
5406
+ var ROUND_CHARTS = /* @__PURE__ */ new Set(["pie", "radar", "radial", "radialBar", "polarArea"]);
5407
+ function keepsProportions(drag, shift) {
5408
+ return shift || drag.owner.role === "chart" && drag.kind !== null && ROUND_CHARTS.has(drag.kind);
5409
+ }
5410
+ function lockAspect(bounds, start, handle) {
5411
+ const ratio2 = start.width / start.height;
5412
+ const axes = HANDLE_AXES[handle];
5413
+ let width = bounds.width;
5414
+ let height = bounds.height;
5415
+ if (axes.x === "none") {
5416
+ width = height * ratio2;
5417
+ } else if (axes.y === "none") {
5418
+ height = width / ratio2;
5419
+ } else if (width / start.width > height / start.height) {
5420
+ height = width / ratio2;
5421
+ } else {
5422
+ width = height * ratio2;
5423
+ }
5424
+ width = Math.max(MIN_SIZE2, width);
5425
+ height = Math.max(MIN_SIZE2, height);
5426
+ const x = axes.x === "left" ? start.x + start.width - width : axes.x === "none" ? start.x + (start.width - width) / 2 : start.x;
5427
+ const y = axes.y === "top" ? start.y + start.height - height : axes.y === "none" ? start.y + (start.height - height) / 2 : start.y;
5428
+ return { x, y, width, height };
5429
+ }
5401
5430
  function resizedBounds(start, handle, pointer) {
5402
5431
  const axes = HANDLE_AXES[handle];
5403
5432
  let x = start.x, width = start.width;
@@ -5492,7 +5521,7 @@ function applyRectBounds(rect, kind, bounds) {
5492
5521
  rect.setAttribute("width", String(bounds.width));
5493
5522
  rect.setAttribute("height", String(bounds.height));
5494
5523
  if (kind === "pill") {
5495
- rect.setAttribute("rx", String(chunkKXYSO6GC_cjs.pillCornerRadius(bounds.width, bounds.height)));
5524
+ rect.setAttribute("rx", String(chunkLNW5VIEA_cjs.pillCornerRadius(bounds.width, bounds.height)));
5496
5525
  }
5497
5526
  }
5498
5527
  function applyEllipseBounds(ellipse, bounds) {
@@ -5502,7 +5531,7 @@ function applyEllipseBounds(ellipse, bounds) {
5502
5531
  ellipse.setAttribute("ry", String(bounds.height / 2));
5503
5532
  }
5504
5533
  function applySymbolBounds(path, bounds) {
5505
- const raw = path.getAttribute(chunkKXYSO6GC_cjs.SYMBOL_POINTS_ATTR);
5534
+ const raw = path.getAttribute(chunkLNW5VIEA_cjs.SYMBOL_POINTS_ATTR);
5506
5535
  if (!raw) {
5507
5536
  return false;
5508
5537
  }
@@ -5510,22 +5539,22 @@ function applySymbolBounds(path, bounds) {
5510
5539
  x: bounds.x + x * bounds.width,
5511
5540
  y: bounds.y + y * bounds.height
5512
5541
  }));
5513
- const tension = Number(path.getAttribute(chunkKXYSO6GC_cjs.SYMBOL_TENSION_ATTR)) || 0;
5514
- path.setAttribute("d", chunkKXYSO6GC_cjs.freeformPathData({ points, tension, closed: true }));
5542
+ const tension = Number(path.getAttribute(chunkLNW5VIEA_cjs.SYMBOL_TENSION_ATTR)) || 0;
5543
+ path.setAttribute("d", chunkLNW5VIEA_cjs.freeformPathData({ points, tension, closed: true }));
5515
5544
  return true;
5516
5545
  }
5517
5546
  function applyPathBounds(path, kind, bounds) {
5518
5547
  if (kind === "symbol" && applySymbolBounds(path, bounds)) {
5519
5548
  return;
5520
5549
  }
5521
- const pathData = chunkKXYSO6GC_cjs.localShapePath(kind, bounds.x, bounds.y, bounds.width, bounds.height);
5550
+ const pathData = chunkLNW5VIEA_cjs.localShapePath(kind, bounds.x, bounds.y, bounds.width, bounds.height);
5522
5551
  if (pathData) {
5523
5552
  path.setAttribute("d", pathData);
5524
5553
  }
5525
5554
  }
5526
5555
  function applyFrameBoundaryBounds(path, bounds) {
5527
- const cornerRadius = Number(path.getAttribute(chunkKXYSO6GC_cjs.CORNER_RADIUS_ATTR) ?? 0);
5528
- const squareCorner = path.getAttribute(chunkKXYSO6GC_cjs.SQUARE_CORNER_ATTR);
5556
+ const cornerRadius = Number(path.getAttribute(chunkLNW5VIEA_cjs.CORNER_RADIUS_ATTR) ?? 0);
5557
+ const squareCorner = path.getAttribute(chunkLNW5VIEA_cjs.SQUARE_CORNER_ATTR);
5529
5558
  const radii = {
5530
5559
  topLeft: cornerRadius,
5531
5560
  topRight: cornerRadius,
@@ -5535,7 +5564,7 @@ function applyFrameBoundaryBounds(path, bounds) {
5535
5564
  if (squareCorner) {
5536
5565
  radii[squareCorner] = 0;
5537
5566
  }
5538
- path.setAttribute("d", chunkKXYSO6GC_cjs.cornersRoundedRectPath(bounds.x, bounds.y, bounds.width, bounds.height, radii));
5567
+ path.setAttribute("d", chunkLNW5VIEA_cjs.cornersRoundedRectPath(bounds.x, bounds.y, bounds.width, bounds.height, radii));
5539
5568
  }
5540
5569
  function applySingleNodeBounds(primary, kind, bounds) {
5541
5570
  const tag = primary.tagName.toLowerCase();
@@ -5545,7 +5574,7 @@ function applySingleNodeBounds(primary, kind, bounds) {
5545
5574
  applyEllipseBounds(primary, bounds);
5546
5575
  } else if (tag === "foreignobject") {
5547
5576
  applyRectBounds(primary, null, bounds);
5548
- } else if (tag === "path" && primary.hasAttribute(chunkKXYSO6GC_cjs.CORNER_RADIUS_ATTR)) {
5577
+ } else if (tag === "path" && primary.hasAttribute(chunkLNW5VIEA_cjs.CORNER_RADIUS_ATTR)) {
5549
5578
  applyFrameBoundaryBounds(primary, bounds);
5550
5579
  } else if (tag === "path" && kind) {
5551
5580
  applyPathBounds(primary, kind, bounds);
@@ -5584,7 +5613,7 @@ function updateSelectionRing(overlay, bounds) {
5584
5613
  }
5585
5614
  function updateSelectionOverlay(overlay, bounds) {
5586
5615
  updateSelectionRing(overlay, bounds);
5587
- for (const [centerX, centerY, name] of chunkEKAWJFJQ_cjs.resizeHandlePositions(bounds)) {
5616
+ for (const [centerX, centerY, name] of chunkFQ7GMLCM_cjs.resizeHandlePositions(bounds)) {
5588
5617
  const handle = overlay.querySelector(`[data-sf-resize-handle="${name}"]`);
5589
5618
  if (!handle) {
5590
5619
  continue;
@@ -5601,7 +5630,7 @@ function replaceTextLines(textElement, lines, x, lineHeight) {
5601
5630
  textElement.removeChild(textElement.firstChild);
5602
5631
  }
5603
5632
  lines.forEach((line, index) => {
5604
- const tspan = document.createElementNS(chunkEKAWJFJQ_cjs.SVG_NAMESPACE, "tspan");
5633
+ const tspan = document.createElementNS(chunkFQ7GMLCM_cjs.SVG_NAMESPACE, "tspan");
5605
5634
  tspan.setAttribute("x", String(x));
5606
5635
  if (index > 0) {
5607
5636
  tspan.setAttribute("dy", `${lineHeight}px`);
@@ -5621,7 +5650,7 @@ function applyLiveText(textElement, rawText, bounds, strokeWidth) {
5621
5650
  const height = Math.max(0, bounds.height - padding * 2);
5622
5651
  const boxX = bounds.x + padding;
5623
5652
  const boxY = bounds.y + padding;
5624
- const lines = chunkKXYSO6GC_cjs.wrapText(rawText, width, fontSize);
5653
+ const lines = chunkLNW5VIEA_cjs.wrapText(rawText, width, fontSize);
5625
5654
  const linePixels = fontSize * lineHeight;
5626
5655
  const contentHeight = lines.length * linePixels;
5627
5656
  const firstY = verticalAlign === "top" ? boxY + fontSize : verticalAlign === "bottom" ? boxY + height - contentHeight + fontSize : boxY + (height - contentHeight) / 2 + fontSize;
@@ -5634,7 +5663,7 @@ function applyLiveText(textElement, rawText, bounds, strokeWidth) {
5634
5663
 
5635
5664
  // src/runtime/interaction/resize/preview.ts
5636
5665
  function textBoundsFor(kind, bounds) {
5637
- return kind === "person" ? chunkKXYSO6GC_cjs.personLabelArea(bounds.x, bounds.y, bounds.width, bounds.height) : bounds;
5666
+ return kind === "person" ? chunkLNW5VIEA_cjs.personLabelArea(bounds.x, bounds.y, bounds.width, bounds.height) : bounds;
5638
5667
  }
5639
5668
  function applyGeometryPreview(drag, bounds) {
5640
5669
  if (drag.isComposite) {
@@ -5654,13 +5683,12 @@ function applyResizePreview(drag, bounds) {
5654
5683
  applyLiveText(drag.text.el, drag.text.rawText, textBoundsFor(drag.kind, bounds), drag.text.strokeWidth);
5655
5684
  }
5656
5685
  if (drag.bubbles) {
5657
- chunkEKAWJFJQ_cjs.updateQuickDuplicateBubbles(drag.bubbles, bounds);
5686
+ chunkFQ7GMLCM_cjs.updateQuickDuplicateBubbles(drag.bubbles, bounds);
5658
5687
  }
5659
5688
  updateLiveLinks(drag.liveLinks, bounds);
5660
5689
  }
5661
5690
 
5662
5691
  // src/runtime/interaction/resize/snapping.ts
5663
- var SNAP_THRESHOLD_PX2 = 20;
5664
5692
  var GUIDE_OVERHANG3 = 10;
5665
5693
  function snapResize(svg, drag, pointer) {
5666
5694
  const proposed = resizedBounds(drag.startBounds, drag.handle, pointer);
@@ -5676,9 +5704,9 @@ function snapResize(svg, drag, pointer) {
5676
5704
  };
5677
5705
  }
5678
5706
  const axes = HANDLE_AXES[drag.handle];
5679
- const candidates = nearestCandidates(proposed, chunkEKAWJFJQ_cjs.findSnapCandidateBounds(svg, /* @__PURE__ */ new Set([drag.owner.id])));
5707
+ const candidates = nearestCandidates(proposed, chunkFQ7GMLCM_cjs.findSnapCandidateBounds(svg, /* @__PURE__ */ new Set([drag.owner.id])));
5680
5708
  const snap = computeSnap(proposed, candidates, {
5681
- threshold: SNAP_THRESHOLD_PX2 / chunkEKAWJFJQ_cjs.pxPerUnit(svg),
5709
+ threshold: snapDistancePx(svg) / chunkFQ7GMLCM_cjs.pxPerUnit(svg),
5682
5710
  activeX: resizeActivePoints(axes.x),
5683
5711
  activeY: resizeActivePoints(axes.y),
5684
5712
  guideOverhang: GUIDE_OVERHANG3
@@ -5719,13 +5747,13 @@ function selectResizeTarget(svg, event) {
5719
5747
  if (!ownerId) {
5720
5748
  return null;
5721
5749
  }
5722
- const primary = chunkEKAWJFJQ_cjs.findOwnerNode(svg, ownerId, chunkEKAWJFJQ_cjs.isPrimary);
5723
- const owner = primary && chunkEKAWJFJQ_cjs.resolveOwner(primary);
5750
+ const primary = chunkFQ7GMLCM_cjs.findOwnerNode(svg, ownerId, chunkFQ7GMLCM_cjs.isPrimary);
5751
+ const owner = primary && chunkFQ7GMLCM_cjs.resolveOwner(primary);
5724
5752
  if (!primary || !hasEditableGeometry(owner)) {
5725
5753
  return null;
5726
5754
  }
5727
- const nodes = chunkEKAWJFJQ_cjs.findAllOwnerNodes(svg, ownerId);
5728
- const geometryNodes = isCompositeOwner(owner) ? nodes : nodes.filter((node) => !chunkEKAWJFJQ_cjs.isTextLabel(node));
5755
+ const nodes = chunkFQ7GMLCM_cjs.findAllOwnerNodes(svg, ownerId);
5756
+ const geometryNodes = isCompositeOwner(owner) ? nodes : nodes.filter((node) => !chunkFQ7GMLCM_cjs.isTextLabel(node));
5729
5757
  if (!geometryNodes.length) {
5730
5758
  return null;
5731
5759
  }
@@ -5743,7 +5771,7 @@ function selectResizeTarget(svg, event) {
5743
5771
 
5744
5772
  // src/runtime/interaction/resize/textCapture.ts
5745
5773
  function captureResizeText(nodes, primary) {
5746
- const textElement = nodes.find(chunkEKAWJFJQ_cjs.isTextLabel);
5774
+ const textElement = nodes.find(chunkFQ7GMLCM_cjs.isTextLabel);
5747
5775
  const rawText = primary.getAttribute("aria-label");
5748
5776
  if (!textElement || !rawText) {
5749
5777
  return null;
@@ -5761,7 +5789,7 @@ function createResizeDragState(svg, event) {
5761
5789
  if (!selection) {
5762
5790
  return null;
5763
5791
  }
5764
- const startBounds = chunkEKAWJFJQ_cjs.symbolDeclaredBounds(selection.primary) ?? selection.primary.getBBox();
5792
+ const startBounds = chunkFQ7GMLCM_cjs.symbolDeclaredBounds(selection.primary) ?? selection.primary.getBBox();
5765
5793
  const composite = isCompositeOwner(selection.owner);
5766
5794
  const isContainer = CONTAINER_ROLES.has(selection.owner.role);
5767
5795
  selection.captureTarget.setPointerCapture?.(event.pointerId);
@@ -5774,7 +5802,7 @@ function createResizeDragState(svg, event) {
5774
5802
  isComposite: composite,
5775
5803
  geometryNodes: selection.geometryNodes,
5776
5804
  insets: selection.geometryNodes.map(
5777
- (node) => node === selection.primary ? NO_INSET : insetWithin(startBounds, chunkEKAWJFJQ_cjs.symbolDeclaredBounds(node) ?? node.getBBox())
5805
+ (node) => node === selection.primary ? NO_INSET : insetWithin(startBounds, chunkFQ7GMLCM_cjs.symbolDeclaredBounds(node) ?? node.getBBox())
5778
5806
  ),
5779
5807
  baseTransforms: selection.geometryNodes.map((node) => node.getAttribute("transform")),
5780
5808
  overlay: selection.overlay,
@@ -5800,7 +5828,7 @@ var ResizeSession = class {
5800
5828
  this.#emitter = emitter;
5801
5829
  }
5802
5830
  pointerDown = (event) => {
5803
- if (event.button !== 0 || this.#drag || chunkEKAWJFJQ_cjs.isCameraGesture(event)) {
5831
+ if (event.button !== 0 || this.#drag || chunkFQ7GMLCM_cjs.isCameraGesture(event)) {
5804
5832
  return;
5805
5833
  }
5806
5834
  this.#drag = createResizeDragState(this.#svg, event);
@@ -5811,9 +5839,11 @@ var ResizeSession = class {
5811
5839
  return;
5812
5840
  }
5813
5841
  drag.moved = true;
5814
- const { bounds, guides } = snapResize(this.#svg, drag, resizePointerPosition(this.#svg, event));
5842
+ const snapped = snapResize(this.#svg, drag, resizePointerPosition(this.#svg, event));
5843
+ const bounds = keepsProportions(drag, event.shiftKey) ? lockAspect(snapped.bounds, drag.startBounds, drag.handle) : snapped.bounds;
5844
+ const { guides } = snapped;
5815
5845
  applyResizePreview(drag, clampResizeToChildren(bounds, drag.childrenBounds));
5816
- chunkEKAWJFJQ_cjs.updateAlignmentGuides(this.#svg, guides, RESIZE_GUIDE_COLOR);
5846
+ chunkFQ7GMLCM_cjs.updateAlignmentGuides(this.#svg, guides, RESIZE_GUIDE_COLOR);
5817
5847
  };
5818
5848
  pointerUp = (event) => {
5819
5849
  const drag = this.#drag;
@@ -5822,11 +5852,12 @@ var ResizeSession = class {
5822
5852
  }
5823
5853
  this.#drag = null;
5824
5854
  event.target?.releasePointerCapture?.(drag.pointerId);
5825
- chunkEKAWJFJQ_cjs.clearAlignmentGuides(this.#svg);
5855
+ chunkFQ7GMLCM_cjs.clearAlignmentGuides(this.#svg);
5826
5856
  if (!drag.moved) {
5827
5857
  return;
5828
5858
  }
5829
- const { bounds } = snapResize(this.#svg, drag, resizePointerPosition(this.#svg, event));
5859
+ const snapped = snapResize(this.#svg, drag, resizePointerPosition(this.#svg, event)).bounds;
5860
+ const bounds = keepsProportions(drag, event.shiftKey) ? lockAspect(snapped, drag.startBounds, drag.handle) : snapped;
5830
5861
  emitResizeCompletion(this.#emitter, drag, clampResizeToChildren(bounds, drag.childrenBounds));
5831
5862
  };
5832
5863
  cancel() {
@@ -5860,7 +5891,7 @@ function resolveSankeyNodeLabelTarget(event) {
5860
5891
  if (!labelElement) {
5861
5892
  return null;
5862
5893
  }
5863
- const owner = chunkEKAWJFJQ_cjs.resolveOwner(labelElement);
5894
+ const owner = chunkFQ7GMLCM_cjs.resolveOwner(labelElement);
5864
5895
  if (owner?.role !== "chart") {
5865
5896
  return null;
5866
5897
  }
@@ -5871,7 +5902,7 @@ function resolveSankeyNodeLabelTarget(event) {
5871
5902
  return { owner, nodeId, labelElement };
5872
5903
  }
5873
5904
  function createSankeyNodeLabelEditor(target, emitter, onClose) {
5874
- const rect = chunkEKAWJFJQ_cjs.screenRectOf(target.labelElement);
5905
+ const rect = chunkFQ7GMLCM_cjs.screenRectOf(target.labelElement);
5875
5906
  if (rect.width <= 0 && rect.height <= 0) {
5876
5907
  return null;
5877
5908
  }
@@ -5928,7 +5959,7 @@ function clearSankeyNodeDragPreview(drag) {
5928
5959
  // src/runtime/interaction/sankeyNode/target.ts
5929
5960
  var RIBBON_PATH = /^M\s+(-?[\d.]+)\s+(-?[\d.]+)\s+C\s+-?[\d.]+\s+-?[\d.]+\s+-?[\d.]+\s+(-?[\d.]+)\s+(-?[\d.]+)\s+-?[\d.]+\s+L\s+-?[\d.]+\s+(-?[\d.]+)\s+C\s+-?[\d.]+\s+-?[\d.]+\s+-?[\d.]+\s+(-?[\d.]+)\s+-?[\d.]+\s+-?[\d.]+\s+Z$/;
5930
5961
  function isNodePointer(event) {
5931
- return event.button === 0 && !chunkEKAWJFJQ_cjs.isCameraGesture(event);
5962
+ return event.button === 0 && !chunkFQ7GMLCM_cjs.isCameraGesture(event);
5932
5963
  }
5933
5964
  function findNodeRect(event) {
5934
5965
  return event.target?.closest?.('[data-sf-mark="sankey-node"]');
@@ -5986,7 +6017,7 @@ function resolveSankeyNodeDrag(svg, event) {
5986
6017
  if (!rect) {
5987
6018
  return null;
5988
6019
  }
5989
- const owner = chunkEKAWJFJQ_cjs.resolveOwner(rect);
6020
+ const owner = chunkFQ7GMLCM_cjs.resolveOwner(rect);
5990
6021
  if (owner?.role !== "chart") {
5991
6022
  return null;
5992
6023
  }
@@ -5994,7 +6025,7 @@ function resolveSankeyNodeDrag(svg, event) {
5994
6025
  if (!nodeId) {
5995
6026
  return null;
5996
6027
  }
5997
- const start = chunkEKAWJFJQ_cjs.pointerUserPoint(svg, event);
6028
+ const start = chunkFQ7GMLCM_cjs.pointerUserPoint(svg, event);
5998
6029
  if (!start) {
5999
6030
  return null;
6000
6031
  }
@@ -6018,7 +6049,7 @@ function resolveSankeyNodeDrag(svg, event) {
6018
6049
 
6019
6050
  // src/runtime/interaction/sankeyNode/session.ts
6020
6051
  var MOVE_NOISE3 = 2;
6021
- var SNAP_THRESHOLD_PX3 = 20;
6052
+ var SNAP_THRESHOLD_PX = 20;
6022
6053
  var GUIDE_OVERHANG4 = 10;
6023
6054
  var GUIDE_COLOR3 = "#8b5cf6";
6024
6055
  var SankeyNodeDragSession = class {
@@ -6040,7 +6071,7 @@ var SankeyNodeDragSession = class {
6040
6071
  if (!this.#drag || event.pointerId !== this.#drag.pointerId) {
6041
6072
  return;
6042
6073
  }
6043
- const point = chunkEKAWJFJQ_cjs.pointerUserPoint(this.#svg, event);
6074
+ const point = chunkFQ7GMLCM_cjs.pointerUserPoint(this.#svg, event);
6044
6075
  if (!point) {
6045
6076
  return;
6046
6077
  }
@@ -6054,7 +6085,7 @@ var SankeyNodeDragSession = class {
6054
6085
  const leadBounds = offsetBounds(drag.originalBounds, rawDx, rawDy);
6055
6086
  const candidates = nearestCandidates(leadBounds, drag.siblingBounds);
6056
6087
  const snap = computeSnap(leadBounds, candidates, {
6057
- threshold: SNAP_THRESHOLD_PX3 / chunkEKAWJFJQ_cjs.pxPerUnit(this.#svg),
6088
+ threshold: SNAP_THRESHOLD_PX / chunkFQ7GMLCM_cjs.pxPerUnit(this.#svg),
6058
6089
  activeX: MOVE_ACTIVE_POINTS,
6059
6090
  activeY: MOVE_ACTIVE_POINTS,
6060
6091
  guideOverhang: GUIDE_OVERHANG4
@@ -6064,7 +6095,7 @@ var SankeyNodeDragSession = class {
6064
6095
  drag.lastDx = dx;
6065
6096
  drag.lastDy = dy;
6066
6097
  updateSankeyNodeDragPreview(drag, dx, dy);
6067
- chunkEKAWJFJQ_cjs.updateAlignmentGuides(
6098
+ chunkFQ7GMLCM_cjs.updateAlignmentGuides(
6068
6099
  this.#svg,
6069
6100
  [snap.x.guide, snap.y.guide].filter((guide) => guide !== null),
6070
6101
  GUIDE_COLOR3
@@ -6075,7 +6106,7 @@ var SankeyNodeDragSession = class {
6075
6106
  clearSankeyNodeDragPreview(this.#drag);
6076
6107
  }
6077
6108
  this.#drag = null;
6078
- chunkEKAWJFJQ_cjs.clearAlignmentGuides(this.#svg);
6109
+ chunkFQ7GMLCM_cjs.clearAlignmentGuides(this.#svg);
6079
6110
  }
6080
6111
  finish(event) {
6081
6112
  if (!this.#drag || event.pointerId !== this.#drag.pointerId) {
@@ -6085,7 +6116,7 @@ var SankeyNodeDragSession = class {
6085
6116
  this.#drag = null;
6086
6117
  event.target?.releasePointerCapture?.(drag.pointerId);
6087
6118
  clearSankeyNodeDragPreview(drag);
6088
- chunkEKAWJFJQ_cjs.clearAlignmentGuides(this.#svg);
6119
+ chunkFQ7GMLCM_cjs.clearAlignmentGuides(this.#svg);
6089
6120
  if (!drag.moved) {
6090
6121
  return;
6091
6122
  }
@@ -6141,7 +6172,7 @@ function bindSankeyNode(viewer, emitter) {
6141
6172
  var FALLBACK_WIDTH = 120;
6142
6173
  var FALLBACK_HEIGHT = 28;
6143
6174
  function centeredLabelRect(primaryNode) {
6144
- const primaryRect = chunkEKAWJFJQ_cjs.screenRectOf(primaryNode);
6175
+ const primaryRect = chunkFQ7GMLCM_cjs.screenRectOf(primaryNode);
6145
6176
  return {
6146
6177
  left: primaryRect.left + (primaryRect.width - FALLBACK_WIDTH) / 2,
6147
6178
  top: primaryRect.top + (primaryRect.height - FALLBACK_HEIGHT) / 2,
@@ -6151,10 +6182,10 @@ function centeredLabelRect(primaryNode) {
6151
6182
  }
6152
6183
  function resolveTextEditRect(owner, textNode, primaryNode) {
6153
6184
  if (owner.role === "shape") {
6154
- return primaryNode ? chunkEKAWJFJQ_cjs.screenRectOf(primaryNode) : null;
6185
+ return primaryNode ? chunkFQ7GMLCM_cjs.screenRectOf(primaryNode) : null;
6155
6186
  }
6156
6187
  if (textNode) {
6157
- return chunkEKAWJFJQ_cjs.screenRectOf(textNode);
6188
+ return chunkFQ7GMLCM_cjs.screenRectOf(textNode);
6158
6189
  }
6159
6190
  return primaryNode ? centeredLabelRect(primaryNode) : null;
6160
6191
  }
@@ -6174,8 +6205,8 @@ function textAlign(owner, textNode) {
6174
6205
  return anchor === "end" ? "right" : "left";
6175
6206
  }
6176
6207
  function createActiveTextEditor(svg, owner, emitter, onClose) {
6177
- const textNode = chunkEKAWJFJQ_cjs.findOwnerNode(svg, owner.id, chunkEKAWJFJQ_cjs.isTextLabel);
6178
- const primaryNode = chunkEKAWJFJQ_cjs.findOwnerNode(svg, owner.id, chunkEKAWJFJQ_cjs.isPrimary);
6208
+ const textNode = chunkFQ7GMLCM_cjs.findOwnerNode(svg, owner.id, chunkFQ7GMLCM_cjs.isTextLabel);
6209
+ const primaryNode = chunkFQ7GMLCM_cjs.findOwnerNode(svg, owner.id, chunkFQ7GMLCM_cjs.isPrimary);
6179
6210
  const rect = resolveTextEditRect(owner, textNode, primaryNode);
6180
6211
  if (!rect) {
6181
6212
  return null;
@@ -6221,7 +6252,7 @@ function isFrameTitle(target) {
6221
6252
  }
6222
6253
  function resolveEditableTextOwner(event) {
6223
6254
  const target = event.target;
6224
- const owner = chunkEKAWJFJQ_cjs.resolveOwner(target);
6255
+ const owner = chunkFQ7GMLCM_cjs.resolveOwner(target);
6225
6256
  if (!owner) {
6226
6257
  return null;
6227
6258
  }
@@ -6362,7 +6393,7 @@ function applyToken(target, lines, token) {
6362
6393
  function maskSource(lines) {
6363
6394
  let tokens;
6364
6395
  try {
6365
- tokens = chunkKXYSO6GC_cjs.tokenizeSource(lines.join("\n"));
6396
+ tokens = chunkLNW5VIEA_cjs.tokenizeSource(lines.join("\n"));
6366
6397
  } catch {
6367
6398
  return null;
6368
6399
  }
@@ -6695,7 +6726,7 @@ function resolveCanvasObjectInsertionTarget(sfl, lines, parentId) {
6695
6726
  const modelRange = findFirstBlockOfKind(lines, "Model");
6696
6727
  return modelRange ? { range: modelRange, origin: { x: 0, y: 0 } } : null;
6697
6728
  }
6698
- const parent = chunkKXYSO6GC_cjs.sflToCanvasState(sfl).canvasObjects.find((canvasObject) => canvasObject.id === parentId);
6729
+ const parent = chunkLNW5VIEA_cjs.sflToCanvasState(sfl).canvasObjects.find((canvasObject) => canvasObject.id === parentId);
6699
6730
  if (!parent) {
6700
6731
  return null;
6701
6732
  }
@@ -7141,7 +7172,7 @@ function movePathPoints(lines, range, dx, dy) {
7141
7172
  replacePropertyValue(lines, span, shifted);
7142
7173
  }
7143
7174
  function applyMoveChange(sfl, event) {
7144
- const state = chunkKXYSO6GC_cjs.sflToCanvasState(sfl);
7175
+ const state = chunkLNW5VIEA_cjs.sflToCanvasState(sfl);
7145
7176
  const canvasObject = state.canvasObjects.find((candidate) => candidate.id === event.owner.id);
7146
7177
  if (!canvasObject) {
7147
7178
  return sfl;
@@ -7166,7 +7197,7 @@ function applyMoveChange(sfl, event) {
7166
7197
 
7167
7198
  // src/runtime/interaction/sflPatch/changes/pathPointChange.ts
7168
7199
  function applyPathPointChange(sfl, event) {
7169
- const canvasObjects = chunkKXYSO6GC_cjs.sflToCanvasState(sfl).canvasObjects;
7200
+ const canvasObjects = chunkLNW5VIEA_cjs.sflToCanvasState(sfl).canvasObjects;
7170
7201
  const canvasObject = canvasObjects.find((candidate) => candidate.id === event.owner.id);
7171
7202
  if (!canvasObject) {
7172
7203
  return sfl;
@@ -7320,7 +7351,7 @@ function resolveConnectionInsertionTarget(sfl, lines, options) {
7320
7351
  if (!VALID_IDENT.test(options.id) || nameExists(lines, options.id)) {
7321
7352
  return null;
7322
7353
  }
7323
- const canvasObjects = chunkKXYSO6GC_cjs.sflToCanvasState(sfl).canvasObjects;
7354
+ const canvasObjects = chunkLNW5VIEA_cjs.sflToCanvasState(sfl).canvasObjects;
7324
7355
  const hasSource = canvasObjects.some((canvasObject) => canvasObject.id === options.fromId);
7325
7356
  const hasTarget = canvasObjects.some((canvasObject) => canvasObject.id === options.toId);
7326
7357
  if (!hasSource || !hasTarget) {
@@ -7384,13 +7415,13 @@ function isometricOffset(direction, object, gap) {
7384
7415
  const { depth } = object.isometric;
7385
7416
  switch (direction) {
7386
7417
  case "iso-width-pos":
7387
- return { dx: (width + gap) * chunkKXYSO6GC_cjs.AXIS_COS, dy: (width + gap) * chunkKXYSO6GC_cjs.AXIS_SIN };
7418
+ return { dx: (width + gap) * chunkLNW5VIEA_cjs.AXIS_COS, dy: (width + gap) * chunkLNW5VIEA_cjs.AXIS_SIN };
7388
7419
  case "iso-width-neg":
7389
- return { dx: -(width + gap) * chunkKXYSO6GC_cjs.AXIS_COS, dy: -(width + gap) * chunkKXYSO6GC_cjs.AXIS_SIN };
7420
+ return { dx: -(width + gap) * chunkLNW5VIEA_cjs.AXIS_COS, dy: -(width + gap) * chunkLNW5VIEA_cjs.AXIS_SIN };
7390
7421
  case "iso-depth-pos":
7391
- return { dx: -(depth + gap) * chunkKXYSO6GC_cjs.AXIS_COS, dy: (depth + gap) * chunkKXYSO6GC_cjs.AXIS_SIN };
7422
+ return { dx: -(depth + gap) * chunkLNW5VIEA_cjs.AXIS_COS, dy: (depth + gap) * chunkLNW5VIEA_cjs.AXIS_SIN };
7392
7423
  case "iso-depth-neg":
7393
- return { dx: (depth + gap) * chunkKXYSO6GC_cjs.AXIS_COS, dy: -(depth + gap) * chunkKXYSO6GC_cjs.AXIS_SIN };
7424
+ return { dx: (depth + gap) * chunkLNW5VIEA_cjs.AXIS_COS, dy: -(depth + gap) * chunkLNW5VIEA_cjs.AXIS_SIN };
7394
7425
  case "iso-height-pos":
7395
7426
  return { dx: 0, dy: height + gap };
7396
7427
  case "iso-height-neg":
@@ -7453,7 +7484,7 @@ function resolveLinkInsertionTarget(sfl, lines, options) {
7453
7484
  if (!VALID_IDENT.test(options.id) || nameExists(lines, options.id)) {
7454
7485
  return null;
7455
7486
  }
7456
- const canvasObjects = chunkKXYSO6GC_cjs.sflToCanvasState(sfl).canvasObjects;
7487
+ const canvasObjects = chunkLNW5VIEA_cjs.sflToCanvasState(sfl).canvasObjects;
7457
7488
  const hasSource = canvasObjects.some((canvasObject) => canvasObject.id === options.fromId);
7458
7489
  const hasTarget = canvasObjects.some((canvasObject) => canvasObject.id === options.toId);
7459
7490
  if (!hasSource || !hasTarget) {
@@ -7537,21 +7568,21 @@ function duplicateShape(sfl, input) {
7537
7568
 
7538
7569
  // src/runtime/interaction/sflPatch/changes/quickDuplicateChange.ts
7539
7570
  function applyQuickDuplicateChange(sfl, event, options) {
7540
- const state = chunkKXYSO6GC_cjs.sflToCanvasState(sfl);
7571
+ const state = chunkLNW5VIEA_cjs.sflToCanvasState(sfl);
7541
7572
  const object = state.canvasObjects.find((candidate) => candidate.id === event.owner.id);
7542
7573
  if (!object) {
7543
7574
  return sfl;
7544
7575
  }
7545
7576
  const { direction } = event;
7546
7577
  if (isIsometricDirection2(direction)) {
7547
- return chunkKXYSO6GC_cjs.isIsometricObject(object) ? duplicateIsometricObject(sfl, object, direction, options) : sfl;
7578
+ return chunkLNW5VIEA_cjs.isIsometricObject(object) ? duplicateIsometricObject(sfl, object, direction, options) : sfl;
7548
7579
  }
7549
- return chunkKXYSO6GC_cjs.isIsometricObject(object) ? sfl : duplicateShape(sfl, { object, links: state.links, side: direction, options });
7580
+ return chunkLNW5VIEA_cjs.isIsometricObject(object) ? sfl : duplicateShape(sfl, { object, links: state.links, side: direction, options });
7550
7581
  }
7551
7582
 
7552
7583
  // src/runtime/interaction/sflPatch/changes/resizeChange.ts
7553
7584
  function applyResizeChange(sfl, event) {
7554
- const state = chunkKXYSO6GC_cjs.sflToCanvasState(sfl);
7585
+ const state = chunkLNW5VIEA_cjs.sflToCanvasState(sfl);
7555
7586
  const canvasObject = state.canvasObjects.find((candidate) => candidate.id === event.owner.id);
7556
7587
  const parent = canvasObject?.parentFrameId ? state.canvasObjects.find((candidate) => candidate.id === canvasObject.parentFrameId) : void 0;
7557
7588
  const originX = parent?.x ?? 0;