@solid-labs/fab-one-widget 1.1.6 → 1.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{GirthManagerWidget-DfTqUGxv.js → GirthManagerWidget-CT-oyjD6.js} +260 -231
- package/dist/{GirthManagerWidget-DfTqUGxv.js.map → GirthManagerWidget-CT-oyjD6.js.map} +1 -1
- package/dist/index.js +1 -1
- package/dist/web-component.js +18 -11
- package/dist/web-component.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { jsxs as w, jsx as i, Fragment as Re } from "react/jsx-runtime";
|
|
2
|
-
import { createContext as Mo, Component as Fo, useCallback as ce, useMemo as J, useState as
|
|
2
|
+
import { createContext as Mo, Component as Fo, useCallback as ce, useMemo as J, useState as E, memo as ko, useEffect as X, useRef as de, forwardRef as Po, createElement as An } from "react";
|
|
3
3
|
import { useFrame as Rn, useThree as Wn, Canvas as Lo } from "@react-three/fiber";
|
|
4
4
|
import { Html as Xe, Line as ye, OrbitControls as In } from "@react-three/drei";
|
|
5
|
-
import * as
|
|
5
|
+
import * as Z from "three";
|
|
6
6
|
import { Plane as Ct, Vector3 as M, Box3 as Bn, Line3 as En, Raycaster as Do } from "three";
|
|
7
7
|
import { create as _o } from "zustand";
|
|
8
8
|
import { OBJLoader as Tn } from "three/examples/jsm/loaders/OBJLoader.js";
|
|
9
9
|
import { STLLoader as Ro } from "three/examples/jsm/loaders/STLLoader.js";
|
|
10
10
|
import { MeshBVH as At } from "three-mesh-bvh";
|
|
11
|
-
let Ur, wt, Tr, Yn;
|
|
11
|
+
let Ur, wt, Tr, Yn, qt;
|
|
12
12
|
let __tla = (async () => {
|
|
13
|
-
|
|
13
|
+
let Wo, Io, Bo, Eo, zt, Kt, vt, To;
|
|
14
|
+
Wo = {
|
|
14
15
|
showDragDrop: true,
|
|
15
16
|
showStartOver: true,
|
|
16
17
|
showDebug: true,
|
|
@@ -19,7 +20,8 @@ let __tla = (async () => {
|
|
|
19
20
|
showNavigation: true,
|
|
20
21
|
showToolbar: false,
|
|
21
22
|
showSaveButton: true
|
|
22
|
-
}
|
|
23
|
+
};
|
|
24
|
+
Io = {
|
|
23
25
|
showDragDrop: false,
|
|
24
26
|
showStartOver: false,
|
|
25
27
|
showDebug: false,
|
|
@@ -28,7 +30,9 @@ let __tla = (async () => {
|
|
|
28
30
|
showNavigation: false,
|
|
29
31
|
showToolbar: false,
|
|
30
32
|
showSaveButton: false
|
|
31
|
-
}
|
|
33
|
+
};
|
|
34
|
+
Bo = Mo(Wo);
|
|
35
|
+
qt = _o((e, r) => ({
|
|
32
36
|
landmarkPoints: [],
|
|
33
37
|
isAligned: false,
|
|
34
38
|
isCut: false,
|
|
@@ -64,7 +68,12 @@ let __tla = (async () => {
|
|
|
64
68
|
isAligned: false,
|
|
65
69
|
isCut: false
|
|
66
70
|
})
|
|
67
|
-
}))
|
|
71
|
+
}));
|
|
72
|
+
Eo = 0.45;
|
|
73
|
+
zt = 3;
|
|
74
|
+
Kt = 1e-3;
|
|
75
|
+
vt = 25.4;
|
|
76
|
+
To = [
|
|
68
77
|
0.25,
|
|
69
78
|
-0.25,
|
|
70
79
|
0.5,
|
|
@@ -97,31 +106,31 @@ let __tla = (async () => {
|
|
|
97
106
|
const P = r[I * 3] * n, T = r[I * 3 + 1] * n, j = r[I * 3 + 2] * n;
|
|
98
107
|
P < o && (o = P), P > u && (u = P), T < d && (d = T), T > f && (f = T), j < p && (p = j), j > h && (h = j);
|
|
99
108
|
}
|
|
100
|
-
const v = (o + u) * 0.5, g = (d + f) * 0.5, x = (p + h) * 0.5, y = u - o + 1e-6, A = f - d + 1e-6, b = h - p + 1e-6, k = y * 0.5, S = A * 0.5, C = b * 0.5, z = Math.min(128, Math.max(16, Math.round(Math.cbrt(a)))), _ = y / z,
|
|
109
|
+
const v = (o + u) * 0.5, g = (d + f) * 0.5, x = (p + h) * 0.5, y = u - o + 1e-6, A = f - d + 1e-6, b = h - p + 1e-6, k = y * 0.5, S = A * 0.5, C = b * 0.5, z = Math.min(128, Math.max(16, Math.round(Math.cbrt(a)))), _ = y / z, B = A / z, V = b / z, F = /* @__PURE__ */ new Map();
|
|
101
110
|
for (let I = 0; I < a; I++) {
|
|
102
|
-
const P = r[I * 3] * n - v, T = r[I * 3 + 1] * n - g, j = r[I * 3 + 2] * n - x, ee = Math.min(z - 1, Math.max(0, Math.floor((P + k) / _))), ie = Math.min(z - 1, Math.max(0, Math.floor((T + S) /
|
|
103
|
-
let re = F.get(
|
|
104
|
-
re || (re = [], F.set(
|
|
111
|
+
const P = r[I * 3] * n - v, T = r[I * 3 + 1] * n - g, j = r[I * 3 + 2] * n - x, ee = Math.min(z - 1, Math.max(0, Math.floor((P + k) / _))), ie = Math.min(z - 1, Math.max(0, Math.floor((T + S) / B))), oe = Math.min(z - 1, Math.max(0, Math.floor((j + C) / V))), q = ee * z * z + ie * z + oe;
|
|
112
|
+
let re = F.get(q);
|
|
113
|
+
re || (re = [], F.set(q, re)), re.push(I);
|
|
105
114
|
}
|
|
106
115
|
for (let I = 0; I < l; I++) {
|
|
107
|
-
const P = s.getX(I), T = s.getY(I), j = s.getZ(I), ee = Math.min(z - 1, Math.max(0, Math.floor((P + k) / _))), ie = Math.min(z - 1, Math.max(0, Math.floor((T + S) /
|
|
108
|
-
let
|
|
109
|
-
for (let
|
|
110
|
-
for (let he = -
|
|
111
|
-
if (
|
|
116
|
+
const P = s.getX(I), T = s.getY(I), j = s.getZ(I), ee = Math.min(z - 1, Math.max(0, Math.floor((P + k) / _))), ie = Math.min(z - 1, Math.max(0, Math.floor((T + S) / B))), oe = Math.min(z - 1, Math.max(0, Math.floor((j + C) / V)));
|
|
117
|
+
let q = 1 / 0, re = 0;
|
|
118
|
+
for (let K = 0; K <= z && q > 0; K++) {
|
|
119
|
+
for (let he = -K; he <= K; he++) for (let te = -K; te <= K; te++) for (let D = -K; D <= K; D++) {
|
|
120
|
+
if (K > 0 && Math.abs(he) < K && Math.abs(te) < K && Math.abs(D) < K) continue;
|
|
112
121
|
const O = ee + he, Q = ie + te, U = oe + D;
|
|
113
122
|
if (O < 0 || O >= z || Q < 0 || Q >= z || U < 0 || U >= z) continue;
|
|
114
123
|
const N = F.get(O * z * z + Q * z + U);
|
|
115
|
-
if (N) for (const
|
|
116
|
-
const fe = r[
|
|
117
|
-
ue <
|
|
124
|
+
if (N) for (const Y of N) {
|
|
125
|
+
const fe = r[Y * 3] * n - v, se = r[Y * 3 + 1] * n - g, ge = r[Y * 3 + 2] * n - x, ue = (P - fe) ** 2 + (T - se) ** 2 + (j - ge) ** 2;
|
|
126
|
+
ue < q && (q = ue, re = Y);
|
|
118
127
|
}
|
|
119
128
|
}
|
|
120
|
-
if (
|
|
129
|
+
if (q < 1 / 0) break;
|
|
121
130
|
}
|
|
122
131
|
c[I * 3] = t[re * 3], c[I * 3 + 1] = t[re * 3 + 1], c[I * 3 + 2] = t[re * 3 + 2];
|
|
123
132
|
}
|
|
124
|
-
e.setAttribute("color", new
|
|
133
|
+
e.setAttribute("color", new Z.Float32BufferAttribute(c, 3));
|
|
125
134
|
}
|
|
126
135
|
const zn = {
|
|
127
136
|
debug: 0,
|
|
@@ -190,8 +199,8 @@ let __tla = (async () => {
|
|
|
190
199
|
};
|
|
191
200
|
}
|
|
192
201
|
function Hn(e, r) {
|
|
193
|
-
const t = new
|
|
194
|
-
return t.setAttribute("position", new
|
|
202
|
+
const t = new Z.BufferGeometry();
|
|
203
|
+
return t.setAttribute("position", new Z.Float32BufferAttribute(e, 3)), t.setIndex(new Z.BufferAttribute(r, 1)), t.computeVertexNormals(), t;
|
|
195
204
|
}
|
|
196
205
|
async function Ho(e, r, t) {
|
|
197
206
|
try {
|
|
@@ -435,15 +444,15 @@ let __tla = (async () => {
|
|
|
435
444
|
const d = o[0], p = o[1];
|
|
436
445
|
if (!c) {
|
|
437
446
|
n.onStatus("Aligning mesh (JS fallback)..."), be.warn(Pe, "WASM not available, using JS fallback alignment");
|
|
438
|
-
const N = new M(0, 1, 0),
|
|
439
|
-
if (
|
|
440
|
-
|
|
441
|
-
const $ = new
|
|
442
|
-
a.applyMatrix4(new
|
|
447
|
+
const N = new M(0, 1, 0), Y = new M().subVectors(p, d).normalize(), fe = Y.dot(N), se = new M().crossVectors(Y, N);
|
|
448
|
+
if (se.length() > 1e-4) {
|
|
449
|
+
se.normalize();
|
|
450
|
+
const $ = new Z.Quaternion().setFromAxisAngle(se, Math.acos(Math.min(1, Math.max(-1, fe))));
|
|
451
|
+
a.applyMatrix4(new Z.Matrix4().makeRotationFromQuaternion($)), o = o.map((ke) => ke.clone().applyQuaternion($));
|
|
443
452
|
}
|
|
444
453
|
if (o[0].y > o[1].y) {
|
|
445
|
-
const $ = new
|
|
446
|
-
a.applyMatrix4(new
|
|
454
|
+
const $ = new Z.Quaternion().setFromAxisAngle(new M(1, 0, 0), Math.PI);
|
|
455
|
+
a.applyMatrix4(new Z.Matrix4().makeRotationFromQuaternion($)), o = o.map((ke) => ke.clone().applyQuaternion($));
|
|
447
456
|
}
|
|
448
457
|
const ge = o[0].clone();
|
|
449
458
|
a.translate(-ge.x, -ge.y, -ge.z), o = o.map(($) => new M($.x - ge.x, $.y - ge.y, $.z - ge.z)), a.computeVertexNormals(), a.computeBoundingBox();
|
|
@@ -497,7 +506,7 @@ let __tla = (async () => {
|
|
|
497
506
|
k[1],
|
|
498
507
|
k[2]
|
|
499
508
|
]), C = c.align_to_origin(u, h, v, S);
|
|
500
|
-
let z = C.positions(), _ = C.mpt(),
|
|
509
|
+
let z = C.positions(), _ = C.mpt(), B = C.origin();
|
|
501
510
|
const V = C.transform();
|
|
502
511
|
be.info(Pe, "Alignment complete", C.details());
|
|
503
512
|
const F = [
|
|
@@ -516,33 +525,33 @@ let __tla = (async () => {
|
|
|
516
525
|
F[6] * k[0] + F[7] * k[1] + F[8] * k[2]
|
|
517
526
|
]);
|
|
518
527
|
n.onStatus("Generating measurement points...");
|
|
519
|
-
const P = c.subdivide_origin_to_plane(new Float32Array(
|
|
528
|
+
const P = c.subdivide_origin_to_plane(new Float32Array(B), new Float32Array(_), I);
|
|
520
529
|
be.debug(Pe, `Subdivide: ${P.count()} pts, spacing=${P.spacing().toFixed(1)}mm`);
|
|
521
530
|
const T = P.points(), j = P.count(), ee = 2, ie = 1, oe = [];
|
|
522
531
|
for (let N = ee; N < j - ie; N++) oe.push(T[N * 3 + 1]);
|
|
523
532
|
n.onStatus("Computing cross-sections...");
|
|
524
|
-
let
|
|
533
|
+
let q = [];
|
|
525
534
|
if (oe.length >= 2) {
|
|
526
|
-
const
|
|
527
|
-
be.debug(Pe, "Batch (subdivision)",
|
|
528
|
-
const fe =
|
|
529
|
-
for (let ue = 0; ue <
|
|
530
|
-
const we =
|
|
535
|
+
const Y = (x ? c.batch_cross_sections_y_inner.bind(c) : c.batch_cross_sections_y.bind(c))(z, f, new Float32Array(oe), 10);
|
|
536
|
+
be.debug(Pe, "Batch (subdivision)", Y.details());
|
|
537
|
+
const fe = Y.all_loop_points(), se = Y.offsets(), ge = Y.circumferences();
|
|
538
|
+
for (let ue = 0; ue < se.length - 1; ue++) {
|
|
539
|
+
const we = se[ue], $ = se[ue + 1];
|
|
531
540
|
if ($ <= we || ge[ue] <= 0) continue;
|
|
532
541
|
const ke = ($ - we) / 3;
|
|
533
542
|
if (ke < 3) continue;
|
|
534
543
|
let De = 0, Ie = 0, me = 0;
|
|
535
544
|
for (let Me = we; Me < $; Me += 3) De += fe[Me], Ie += fe[Me + 1], me += fe[Me + 2];
|
|
536
|
-
|
|
545
|
+
q.push(De / ke, Ie / ke, me / ke);
|
|
537
546
|
}
|
|
538
547
|
}
|
|
539
|
-
if (
|
|
548
|
+
if (q.length >= 6) {
|
|
540
549
|
n.onStatus("Refining alignment...");
|
|
541
|
-
const N = c.refine_alignment(new Float32Array(
|
|
542
|
-
be.info(Pe, "Refinement complete", N.details()), z = N.positions(), _ = N.mpt(),
|
|
550
|
+
const N = c.refine_alignment(new Float32Array(q), z, new Float32Array(B), new Float32Array(_));
|
|
551
|
+
be.info(Pe, "Refinement complete", N.details()), z = N.positions(), _ = N.mpt(), B = N.origin();
|
|
543
552
|
}
|
|
544
|
-
const re = a.getAttribute("color"),
|
|
545
|
-
re &&
|
|
553
|
+
const re = a.getAttribute("color"), K = Hn(z, f);
|
|
554
|
+
re && K.setAttribute("color", re), a.dispose(), a = K, e.geometry = a, a.computeVertexNormals(), a.computeBoundingBox(), o[0] = new M(B[0], B[1], B[2]), o[1] = new M(_[0], _[1], _[2]), n.onStatus("Setting blue point...");
|
|
546
555
|
const he = new M(o[0].x, o[0].y, o[0].z);
|
|
547
556
|
o.push(he), n.addLandmarkPoint({
|
|
548
557
|
faceIndex: -1,
|
|
@@ -569,17 +578,17 @@ let __tla = (async () => {
|
|
|
569
578
|
const te = a.boundingBox, D = new M();
|
|
570
579
|
te.getSize(D), n.setModelSize(Math.max(D.x, D.y, D.z)), n.setCut(true), n.setAdjustedStartY(null), n.setAdjustedEndY(null), n.setOriginalEndY(o[1].y + 2 * vt), n.onStatus("Computing final measurements...");
|
|
571
580
|
{
|
|
572
|
-
const N = St(a),
|
|
573
|
-
let
|
|
581
|
+
const N = St(a), Y = o[1].y, fe = o[0].y;
|
|
582
|
+
let se = 1 / 0, ge = -1 / 0;
|
|
574
583
|
const ue = N.positions;
|
|
575
|
-
for (let me = 1; me < ue.length; me += 3) ue[me] <
|
|
584
|
+
for (let me = 1; me < ue.length; me += 3) ue[me] < se && (se = ue[me]), ue[me] > ge && (ge = ue[me]);
|
|
576
585
|
const we = 25.4, $ = [];
|
|
577
|
-
$.push(
|
|
586
|
+
$.push(Y);
|
|
578
587
|
for (let me = 1; me <= 2; me++) {
|
|
579
|
-
const Me =
|
|
588
|
+
const Me = Y + me * we;
|
|
580
589
|
Me < ge - 1 && $.push(Me);
|
|
581
590
|
}
|
|
582
|
-
for (let me =
|
|
591
|
+
for (let me = Y - we; me > fe; me -= we) $.push(me);
|
|
583
592
|
$.sort((me, Me) => me - Me), be.info(Pe, `Horizontal slices: ${$.length} Y planes, range ${(_b = $[0]) == null ? void 0 : _b.toFixed(1)} \u2192 ${(_c = $[$.length - 1]) == null ? void 0 : _c.toFixed(1)} mm`);
|
|
584
593
|
const De = (x ? c.batch_cross_sections_y_inner.bind(c) : c.batch_cross_sections_y.bind(c))(N.positions, N.indices, new Float32Array($), 10);
|
|
585
594
|
be.info(Pe, `Horizontal slices (${x ? "inner" : "outer"}): ${De.count()}/${$.length} valid`), be.debug(Pe, "Slice details", De.details());
|
|
@@ -588,7 +597,7 @@ let __tla = (async () => {
|
|
|
588
597
|
circumferences: Array.from(De.circumferences()),
|
|
589
598
|
allLoopPoints: new Float32Array(De.all_loop_points()),
|
|
590
599
|
offsets: new Uint32Array(De.offsets()),
|
|
591
|
-
mptY:
|
|
600
|
+
mptY: Y,
|
|
592
601
|
originY: fe
|
|
593
602
|
};
|
|
594
603
|
(_d = n.setWasmSlices) == null ? void 0 : _d.call(n, Ie);
|
|
@@ -785,7 +794,7 @@ let __tla = (async () => {
|
|
|
785
794
|
];
|
|
786
795
|
const b = x.getAttribute("position"), k = new M().fromBufferAttribute(b, A[0]), S = new M().fromBufferAttribute(b, A[1]), C = new M().fromBufferAttribute(b, A[2]);
|
|
787
796
|
k.applyMatrix4(e.matrixWorld), S.applyMatrix4(e.matrixWorld), C.applyMatrix4(e.matrixWorld);
|
|
788
|
-
const z = v.point, _ = qo(z, k, S, C),
|
|
797
|
+
const z = v.point, _ = qo(z, k, S, C), B = {
|
|
789
798
|
faceIndex: g,
|
|
790
799
|
vertexIndices: A,
|
|
791
800
|
position: {
|
|
@@ -795,7 +804,7 @@ let __tla = (async () => {
|
|
|
795
804
|
},
|
|
796
805
|
barycentricCoords: _
|
|
797
806
|
};
|
|
798
|
-
c(
|
|
807
|
+
c(B);
|
|
799
808
|
}, [
|
|
800
809
|
e,
|
|
801
810
|
c,
|
|
@@ -803,9 +812,9 @@ let __tla = (async () => {
|
|
|
803
812
|
r
|
|
804
813
|
]), d = J(() => !!e.geometry.getAttribute("color"), [
|
|
805
814
|
e
|
|
806
|
-
]), p = l ? Math.min(n, 0.65) : n, u = p < 1, f = J(() => new
|
|
815
|
+
]), p = l ? Math.min(n, 0.65) : n, u = p < 1, f = J(() => new Z.MeshStandardMaterial({
|
|
807
816
|
color: d ? "#ffffff" : t,
|
|
808
|
-
side: s ?
|
|
817
|
+
side: s ? Z.FrontSide : Z.DoubleSide,
|
|
809
818
|
roughness: 0.6,
|
|
810
819
|
metalness: 0.1,
|
|
811
820
|
transparent: u,
|
|
@@ -827,7 +836,7 @@ let __tla = (async () => {
|
|
|
827
836
|
renderOrder: l ? 0 : void 0
|
|
828
837
|
});
|
|
829
838
|
}, Jo = ({ point: e, index: r, markerSize: t, color: n, label: s }) => {
|
|
830
|
-
const [l, c] =
|
|
839
|
+
const [l, c] = E(false);
|
|
831
840
|
return w("mesh", {
|
|
832
841
|
position: [
|
|
833
842
|
e.position.x,
|
|
@@ -898,7 +907,7 @@ let __tla = (async () => {
|
|
|
898
907
|
const kn = (e, r) => {
|
|
899
908
|
const t = Math.abs(e - r);
|
|
900
909
|
return t <= 7 ? "#8BC34A" : t <= 20 ? "#FFC107" : "#FF5722";
|
|
901
|
-
}, Pn = new
|
|
910
|
+
}, Pn = new Z.Color("#8BC34A"), Ln = new Z.Color("#FFC107"), er = new Z.Color("#FF5722"), tr = (e) => {
|
|
902
911
|
if (e <= 7) return Pn.clone();
|
|
903
912
|
if (e <= 20) {
|
|
904
913
|
const t = (e - 7) / 13;
|
|
@@ -915,17 +924,17 @@ let __tla = (async () => {
|
|
|
915
924
|
l.push(h, v, g, v, x, g);
|
|
916
925
|
}
|
|
917
926
|
}
|
|
918
|
-
const c = new
|
|
919
|
-
c.setAttribute("position", new
|
|
920
|
-
const a = new
|
|
927
|
+
const c = new Z.BufferGeometry();
|
|
928
|
+
c.setAttribute("position", new Z.Float32BufferAttribute(n, 3)), c.setAttribute("color", new Z.Float32BufferAttribute(s, 3)), c.setIndex(l);
|
|
929
|
+
const a = new Z.MeshBasicMaterial({
|
|
921
930
|
vertexColors: true,
|
|
922
931
|
transparent: true,
|
|
923
932
|
opacity: 0.25,
|
|
924
|
-
side:
|
|
933
|
+
side: Z.DoubleSide,
|
|
925
934
|
depthTest: false,
|
|
926
935
|
depthWrite: false
|
|
927
936
|
});
|
|
928
|
-
return new
|
|
937
|
+
return new Z.Mesh(c, a);
|
|
929
938
|
}, or = ({ bvh: e, geometry: r, yPosition: t, color: n = "#00ff00", labelX: s, onDataChange: l, displayUnit: c = "cm", useInnerSurface: a = false, formValue: o, lineWidth: d = 1.5, wasmLoopPoints: p, wasmCircumference: u }) => {
|
|
930
939
|
const f = J(() => p && u != null ? null : Ge(e, r, t, a), [
|
|
931
940
|
e,
|
|
@@ -946,27 +955,27 @@ let __tla = (async () => {
|
|
|
946
955
|
h,
|
|
947
956
|
g
|
|
948
957
|
]);
|
|
949
|
-
|
|
958
|
+
X(() => () => {
|
|
950
959
|
x && (x.geometry.dispose(), x.material.dispose());
|
|
951
960
|
}, [
|
|
952
961
|
x
|
|
953
962
|
]);
|
|
954
963
|
const y = de(null), A = J(() => {
|
|
955
|
-
const b = new
|
|
956
|
-
b.setAttribute("position", new
|
|
957
|
-
const k = new
|
|
964
|
+
const b = new Z.BufferGeometry();
|
|
965
|
+
b.setAttribute("position", new Z.Float32BufferAttribute(new Float32Array(6), 3));
|
|
966
|
+
const k = new Z.LineBasicMaterial({
|
|
958
967
|
color: 6710886,
|
|
959
968
|
depthTest: false,
|
|
960
969
|
depthWrite: false,
|
|
961
970
|
transparent: true
|
|
962
971
|
});
|
|
963
|
-
return new
|
|
972
|
+
return new Z.Line(b, k);
|
|
964
973
|
}, []);
|
|
965
|
-
return
|
|
974
|
+
return X(() => () => {
|
|
966
975
|
A.geometry.dispose(), A.material.dispose();
|
|
967
976
|
}, [
|
|
968
977
|
A
|
|
969
|
-
]),
|
|
978
|
+
]), X(() => {
|
|
970
979
|
v > 0 && (l == null ? void 0 : l({
|
|
971
980
|
yPosition: t,
|
|
972
981
|
originalValue: v,
|
|
@@ -989,7 +998,7 @@ let __tla = (async () => {
|
|
|
989
998
|
const P = C.x * I.x + C.z * I.z;
|
|
990
999
|
P > z && (z = P, _ = I);
|
|
991
1000
|
}
|
|
992
|
-
const
|
|
1001
|
+
const B = s * 0.35, V = new M(_.x + C.x * B, t, _.z + C.z * B);
|
|
993
1002
|
y.current.position.copy(V);
|
|
994
1003
|
const F = A.geometry.getAttribute("position");
|
|
995
1004
|
F.setXYZ(0, _.x, _.y, _.z), F.setXYZ(1, V.x, V.y, V.z), F.needsUpdate = true;
|
|
@@ -1138,12 +1147,12 @@ let __tla = (async () => {
|
|
|
1138
1147
|
];
|
|
1139
1148
|
if (n > 25.4 + 0.1) {
|
|
1140
1149
|
const _ = u.mptY;
|
|
1141
|
-
z = z.filter((
|
|
1142
|
-
const V = Math.abs(
|
|
1150
|
+
z = z.filter((B) => {
|
|
1151
|
+
const V = Math.abs(B - _);
|
|
1143
1152
|
return V < 0.5 || Math.abs(Math.round(V / n) * n - V) < 0.5;
|
|
1144
1153
|
});
|
|
1145
1154
|
}
|
|
1146
|
-
return c ? z.sort((_,
|
|
1155
|
+
return c ? z.sort((_, B) => B - _) : z.sort((_, B) => _ - B), z;
|
|
1147
1156
|
}
|
|
1148
1157
|
const S = [];
|
|
1149
1158
|
if (c) for (let C = t; C >= r; C -= n) S.push(C);
|
|
@@ -1158,12 +1167,12 @@ let __tla = (async () => {
|
|
|
1158
1167
|
]), x = J(() => {
|
|
1159
1168
|
if (!u) return null;
|
|
1160
1169
|
const S = /* @__PURE__ */ new Map(), { allLoopPoints: C, offsets: z, yValues: _ } = u;
|
|
1161
|
-
for (let
|
|
1162
|
-
const V = z[
|
|
1170
|
+
for (let B = 0; B < z.length - 1; B++) {
|
|
1171
|
+
const V = z[B], F = z[B + 1];
|
|
1163
1172
|
if (F <= V) continue;
|
|
1164
1173
|
const I = [];
|
|
1165
1174
|
for (let P = V; P < F; P += 3) I.push(new M(C[P], C[P + 1], C[P + 2]));
|
|
1166
|
-
I.length >= 3 && S.set(_[
|
|
1175
|
+
I.length >= 3 && S.set(_[B], I);
|
|
1167
1176
|
}
|
|
1168
1177
|
return S;
|
|
1169
1178
|
}, [
|
|
@@ -1176,11 +1185,11 @@ let __tla = (async () => {
|
|
|
1176
1185
|
}, [
|
|
1177
1186
|
u
|
|
1178
1187
|
]);
|
|
1179
|
-
|
|
1188
|
+
X(() => {
|
|
1180
1189
|
f.current.clear();
|
|
1181
1190
|
}, [
|
|
1182
1191
|
g
|
|
1183
|
-
]),
|
|
1192
|
+
]), X(() => {
|
|
1184
1193
|
if (!y || !l) return;
|
|
1185
1194
|
const S = g.filter((C) => (y.get(C) ?? 0) > 0).map((C) => ({
|
|
1186
1195
|
yPosition: C,
|
|
@@ -1236,8 +1245,8 @@ let __tla = (async () => {
|
|
|
1236
1245
|
const _ = new M(z.x, 0, z.z);
|
|
1237
1246
|
if (_.lengthSq() < 1e-8) return;
|
|
1238
1247
|
_.normalize();
|
|
1239
|
-
const
|
|
1240
|
-
u.current.position.set(
|
|
1248
|
+
const B = new M().crossVectors(new M(0, 1, 0), _).normalize();
|
|
1249
|
+
u.current.position.set(B.x * d, 0, B.z * d);
|
|
1241
1250
|
const V = C.position.x - u.current.position.x, F = C.position.z - u.current.position.z;
|
|
1242
1251
|
u.current.rotation.y = Math.atan2(V, F);
|
|
1243
1252
|
});
|
|
@@ -1364,7 +1373,7 @@ let __tla = (async () => {
|
|
|
1364
1373
|
const { set: u, size: f, camera: h, invalidate: v } = Wn(), g = de(false), x = de(s), y = de(new M()), A = de(null), b = de(c), k = de(r), S = de(t), C = de(a), z = de({
|
|
1365
1374
|
min: o,
|
|
1366
1375
|
max: d
|
|
1367
|
-
}), _ = de(0),
|
|
1376
|
+
}), _ = de(0), B = ce(() => {
|
|
1368
1377
|
if (!n || e <= 0) return null;
|
|
1369
1378
|
const F = a ?? n.geometry;
|
|
1370
1379
|
F.computeBoundingBox();
|
|
@@ -1377,21 +1386,21 @@ let __tla = (async () => {
|
|
|
1377
1386
|
const te = o, D = d, O = F.getAttribute("position");
|
|
1378
1387
|
if (O) {
|
|
1379
1388
|
const Q = O.array, U = (D - te) * 0.08;
|
|
1380
|
-
let N = 1 / 0,
|
|
1389
|
+
let N = 1 / 0, Y = -1 / 0, fe = te - U, se = D + U, ge = false;
|
|
1381
1390
|
for (let ue = 0; ue < O.count; ue++) {
|
|
1382
1391
|
const we = Q[ue * 3 + 1];
|
|
1383
1392
|
if (we < te - U || we > D + U) continue;
|
|
1384
1393
|
const $ = Q[ue * 3];
|
|
1385
|
-
$ < N && (N = $), $ >
|
|
1394
|
+
$ < N && (N = $), $ > Y && (Y = $), ge = true;
|
|
1386
1395
|
}
|
|
1387
|
-
ge && (P.set((N +
|
|
1396
|
+
ge && (P.set((N + Y) / 2, (fe + se) / 2, 0), T.set(Y - N, se - fe, 0));
|
|
1388
1397
|
}
|
|
1389
1398
|
}
|
|
1390
1399
|
y.current.copy(T);
|
|
1391
|
-
const ee = f.width / f.height, ie = 1.35, oe = j ? 1.15 : 1.6,
|
|
1392
|
-
_.current =
|
|
1393
|
-
const he = new
|
|
1394
|
-
return he.position.set(0,
|
|
1400
|
+
const ee = f.width / f.height, ie = 1.35, oe = j ? 1.15 : 1.6, q = Math.max(T.y * oe, T.x * ie / ee), re = q * ee, K = P.y - T.y * 0.05;
|
|
1401
|
+
_.current = K;
|
|
1402
|
+
const he = new Z.OrthographicCamera(-re / 2, re / 2, q / 2, -q / 2, 0.1, e * 10);
|
|
1403
|
+
return he.position.set(0, K, e * 2), he.lookAt(0, K, 0), he;
|
|
1395
1404
|
}, [
|
|
1396
1405
|
n,
|
|
1397
1406
|
e,
|
|
@@ -1400,9 +1409,9 @@ let __tla = (async () => {
|
|
|
1400
1409
|
o,
|
|
1401
1410
|
d
|
|
1402
1411
|
]);
|
|
1403
|
-
|
|
1412
|
+
X(() => {
|
|
1404
1413
|
if (p) return p.current = () => {
|
|
1405
|
-
const F =
|
|
1414
|
+
const F = B();
|
|
1406
1415
|
F && (u({
|
|
1407
1416
|
camera: F
|
|
1408
1417
|
}), v());
|
|
@@ -1411,7 +1420,7 @@ let __tla = (async () => {
|
|
|
1411
1420
|
};
|
|
1412
1421
|
}, [
|
|
1413
1422
|
p,
|
|
1414
|
-
|
|
1423
|
+
B,
|
|
1415
1424
|
u,
|
|
1416
1425
|
v
|
|
1417
1426
|
]);
|
|
@@ -1421,10 +1430,10 @@ let __tla = (async () => {
|
|
|
1421
1430
|
}, [
|
|
1422
1431
|
v
|
|
1423
1432
|
]);
|
|
1424
|
-
return
|
|
1433
|
+
return X(() => {
|
|
1425
1434
|
if (e > 0 && !g.current && !r) {
|
|
1426
1435
|
g.current = true;
|
|
1427
|
-
const F = new
|
|
1436
|
+
const F = new Z.PerspectiveCamera(50, f.width / f.height, 0.1, e * 10);
|
|
1428
1437
|
F.position.set(e * 0.3, e * 0.2, e * 1.5), F.lookAt(0, 0, 0), u({
|
|
1429
1438
|
camera: F
|
|
1430
1439
|
}), requestAnimationFrame(() => V(F));
|
|
@@ -1435,7 +1444,7 @@ let __tla = (async () => {
|
|
|
1435
1444
|
u,
|
|
1436
1445
|
r,
|
|
1437
1446
|
V
|
|
1438
|
-
]),
|
|
1447
|
+
]), X(() => {
|
|
1439
1448
|
const F = b.current;
|
|
1440
1449
|
b.current = c, F === 0 && c === 1 && !r && requestAnimationFrame(() => V(h));
|
|
1441
1450
|
}, [
|
|
@@ -1443,13 +1452,13 @@ let __tla = (async () => {
|
|
|
1443
1452
|
r,
|
|
1444
1453
|
h,
|
|
1445
1454
|
V
|
|
1446
|
-
]),
|
|
1455
|
+
]), X(() => {
|
|
1447
1456
|
const F = k.current !== r, I = S.current !== t, P = !C.current && !!a, T = (z.current.min == null || z.current.max == null) && o != null && d != null;
|
|
1448
1457
|
if (k.current = r, S.current = t, C.current = a, z.current = {
|
|
1449
1458
|
min: o,
|
|
1450
1459
|
max: d
|
|
1451
1460
|
}, !F && !I && !P && !T || !r || s !== "3D") return;
|
|
1452
|
-
const j =
|
|
1461
|
+
const j = B();
|
|
1453
1462
|
j && u({
|
|
1454
1463
|
camera: j
|
|
1455
1464
|
});
|
|
@@ -1460,37 +1469,37 @@ let __tla = (async () => {
|
|
|
1460
1469
|
a,
|
|
1461
1470
|
o,
|
|
1462
1471
|
d,
|
|
1463
|
-
|
|
1472
|
+
B,
|
|
1464
1473
|
u
|
|
1465
|
-
]),
|
|
1474
|
+
]), X(() => {
|
|
1466
1475
|
if (x.current === s) return;
|
|
1467
1476
|
const F = x.current;
|
|
1468
1477
|
if (x.current = s, !(!r || !n || e <= 0)) {
|
|
1469
1478
|
if (s === "2D" && l != null) {
|
|
1470
1479
|
A.current = h;
|
|
1471
1480
|
const I = n.geometry, P = I.getAttribute("position"), T = P.array, j = e * 0.15;
|
|
1472
|
-
let ee = 1 / 0, ie = -1 / 0, oe = 1 / 0,
|
|
1481
|
+
let ee = 1 / 0, ie = -1 / 0, oe = 1 / 0, q = -1 / 0, re = false;
|
|
1473
1482
|
for (let fe = 0; fe < P.count; fe++) if (Math.abs(T[fe * 3 + 1] - l) < j) {
|
|
1474
|
-
const
|
|
1475
|
-
|
|
1483
|
+
const se = T[fe * 3], ge = T[fe * 3 + 2];
|
|
1484
|
+
se < ee && (ee = se), se > ie && (ie = se), ge < oe && (oe = ge), ge > q && (q = ge), re = true;
|
|
1476
1485
|
}
|
|
1477
1486
|
if (!re) {
|
|
1478
1487
|
I.computeBoundingBox();
|
|
1479
1488
|
const fe = I.boundingBox;
|
|
1480
|
-
ee = fe.min.x, ie = fe.max.x, oe = fe.min.z,
|
|
1489
|
+
ee = fe.min.x, ie = fe.max.x, oe = fe.min.z, q = fe.max.z;
|
|
1481
1490
|
}
|
|
1482
|
-
const
|
|
1491
|
+
const K = (ee + ie) / 2, he = (oe + q) / 2, te = f.width / f.height, D = 1.4, O = (ie - ee) * D, Q = (q - oe) * D;
|
|
1483
1492
|
let U, N;
|
|
1484
1493
|
O / Q > te ? (U = O, N = O / te) : (N = Q, U = Q * te);
|
|
1485
|
-
const
|
|
1486
|
-
|
|
1487
|
-
camera:
|
|
1494
|
+
const Y = new Z.OrthographicCamera(-U / 2, U / 2, N / 2, -N / 2, 0.1, e * 10);
|
|
1495
|
+
Y.position.set(K, l + e * 2, he), Y.up.set(0, 0, -1), Y.lookAt(K, l, he), u({
|
|
1496
|
+
camera: Y
|
|
1488
1497
|
});
|
|
1489
1498
|
} else if (F === "2D") if (A.current) u({
|
|
1490
1499
|
camera: A.current
|
|
1491
1500
|
}), A.current = null;
|
|
1492
1501
|
else {
|
|
1493
|
-
const I =
|
|
1502
|
+
const I = B();
|
|
1494
1503
|
I && u({
|
|
1495
1504
|
camera: I
|
|
1496
1505
|
});
|
|
@@ -1505,26 +1514,26 @@ let __tla = (async () => {
|
|
|
1505
1514
|
f,
|
|
1506
1515
|
u,
|
|
1507
1516
|
h,
|
|
1508
|
-
|
|
1509
|
-
]),
|
|
1517
|
+
B
|
|
1518
|
+
]), X(() => {
|
|
1510
1519
|
if (!r || !h || !h.isOrthographicCamera) return;
|
|
1511
1520
|
const F = h;
|
|
1512
1521
|
if (s === "2D") {
|
|
1513
1522
|
if (!n || l == null) return;
|
|
1514
1523
|
const I = n.geometry, P = I.getAttribute("position"), T = P.array, j = e * 0.15;
|
|
1515
|
-
let ee = 1 / 0, ie = -1 / 0, oe = 1 / 0,
|
|
1524
|
+
let ee = 1 / 0, ie = -1 / 0, oe = 1 / 0, q = -1 / 0, re = false;
|
|
1516
1525
|
for (let U = 0; U < P.count; U++) if (Math.abs(T[U * 3 + 1] - l) < j) {
|
|
1517
|
-
const N = T[U * 3],
|
|
1518
|
-
N < ee && (ee = N), N > ie && (ie = N),
|
|
1526
|
+
const N = T[U * 3], Y = T[U * 3 + 2];
|
|
1527
|
+
N < ee && (ee = N), N > ie && (ie = N), Y < oe && (oe = Y), Y > q && (q = Y), re = true;
|
|
1519
1528
|
}
|
|
1520
1529
|
if (!re) {
|
|
1521
1530
|
I.computeBoundingBox();
|
|
1522
1531
|
const U = I.boundingBox;
|
|
1523
|
-
ee = U.min.x, ie = U.max.x, oe = U.min.z,
|
|
1532
|
+
ee = U.min.x, ie = U.max.x, oe = U.min.z, q = U.max.z;
|
|
1524
1533
|
}
|
|
1525
|
-
const
|
|
1534
|
+
const K = f.width / f.height, he = 1.4, te = (ie - ee) * he, D = (q - oe) * he;
|
|
1526
1535
|
let O, Q;
|
|
1527
|
-
te / D >
|
|
1536
|
+
te / D > K ? (O = te, Q = te / K) : (Q = D, O = D * K), F.left = -O / 2, F.right = O / 2, F.top = Q / 2, F.bottom = -Q / 2;
|
|
1528
1537
|
} else {
|
|
1529
1538
|
const I = y.current, P = f.width / f.height, T = Math.max(I.y, I.x / P) * 1.6, j = T * P;
|
|
1530
1539
|
F.left = -j / 2, F.right = j / 2, F.top = T / 2, F.bottom = -T / 2;
|
|
@@ -1598,7 +1607,7 @@ let __tla = (async () => {
|
|
|
1598
1607
|
children: "X"
|
|
1599
1608
|
})
|
|
1600
1609
|
]
|
|
1601
|
-
}), fr = ({ isDoubleShell: e, onDismiss: r }) => (
|
|
1610
|
+
}), fr = ({ isDoubleShell: e, onDismiss: r }) => (X(() => {
|
|
1602
1611
|
const t = setTimeout(r, 1e4);
|
|
1603
1612
|
return () => clearTimeout(t);
|
|
1604
1613
|
}, []), w("div", {
|
|
@@ -1659,14 +1668,14 @@ let __tla = (async () => {
|
|
|
1659
1668
|
]), { mlLine: f, apLine: h, mlWidth: v, apWidth: g } = J(() => {
|
|
1660
1669
|
let A = null, b = null, k = 0, S = 0;
|
|
1661
1670
|
if (p.linePoints.length >= 2) {
|
|
1662
|
-
let C = p.linePoints[0], z = p.linePoints[0], _ = p.linePoints[0],
|
|
1663
|
-
for (const V of p.linePoints) V.x < C.x && (C = V), V.x > z.x && (z = V), V.z < _.z && (_ = V), V.z >
|
|
1671
|
+
let C = p.linePoints[0], z = p.linePoints[0], _ = p.linePoints[0], B = p.linePoints[0];
|
|
1672
|
+
for (const V of p.linePoints) V.x < C.x && (C = V), V.x > z.x && (z = V), V.z < _.z && (_ = V), V.z > B.z && (B = V);
|
|
1664
1673
|
A = [
|
|
1665
1674
|
new M(C.x, t, C.z),
|
|
1666
1675
|
new M(z.x, t, z.z)
|
|
1667
1676
|
], b = [
|
|
1668
1677
|
new M(_.x, t, _.z),
|
|
1669
|
-
new M(
|
|
1678
|
+
new M(B.x, t, B.z)
|
|
1670
1679
|
], k = A[0].distanceTo(A[1]), S = b[0].distanceTo(b[1]);
|
|
1671
1680
|
}
|
|
1672
1681
|
return {
|
|
@@ -1685,7 +1694,7 @@ let __tla = (async () => {
|
|
|
1685
1694
|
geometry: e.geometry,
|
|
1686
1695
|
children: i("meshStandardMaterial", {
|
|
1687
1696
|
color: s,
|
|
1688
|
-
side:
|
|
1697
|
+
side: Z.DoubleSide,
|
|
1689
1698
|
transparent: true,
|
|
1690
1699
|
opacity: 0.15,
|
|
1691
1700
|
depthWrite: false,
|
|
@@ -1905,7 +1914,7 @@ let __tla = (async () => {
|
|
|
1905
1914
|
]
|
|
1906
1915
|
});
|
|
1907
1916
|
}, pr = ({ mesh: e, yPosition: r, onYChange: t, minY: n, maxY: s, modelSize: l, color: c, hoverColor: a, dragColor: o, label: d, onDragStart: p, onDragEnd: u }) => {
|
|
1908
|
-
const [f, h] =
|
|
1917
|
+
const [f, h] = E(false), [v, g] = E(false), { camera: x, gl: y } = Wn(), A = de(0), b = de(null), k = e.geometry, S = Nn(k), C = J(() => S ? Ge(S, k, r) : {
|
|
1909
1918
|
linePoints: [],
|
|
1910
1919
|
lineLength: 0,
|
|
1911
1920
|
rightmostPoint: new M()
|
|
@@ -1914,10 +1923,10 @@ let __tla = (async () => {
|
|
|
1914
1923
|
k,
|
|
1915
1924
|
r
|
|
1916
1925
|
]), z = ce((P, T, j) => {
|
|
1917
|
-
const ee = y.domElement.getBoundingClientRect(), ie = (P - ee.left) / ee.width * 2 - 1, oe = -((T - ee.top) / ee.height) * 2 + 1,
|
|
1918
|
-
|
|
1926
|
+
const ee = y.domElement.getBoundingClientRect(), ie = (P - ee.left) / ee.width * 2 - 1, oe = -((T - ee.top) / ee.height) * 2 + 1, q = new Do();
|
|
1927
|
+
q.setFromCamera(new Z.Vector2(ie, oe), x);
|
|
1919
1928
|
const re = new M();
|
|
1920
|
-
return
|
|
1929
|
+
return q.ray.intersectPlane(j, re) ? re.y : null;
|
|
1921
1930
|
}, [
|
|
1922
1931
|
x,
|
|
1923
1932
|
y
|
|
@@ -1928,7 +1937,7 @@ let __tla = (async () => {
|
|
|
1928
1937
|
return new Ct().setFromNormalAndCoplanarPoint(j, new M(0, P, 0));
|
|
1929
1938
|
}, [
|
|
1930
1939
|
x
|
|
1931
|
-
]),
|
|
1940
|
+
]), B = ce((P) => {
|
|
1932
1941
|
P.stopPropagation(), h(true), y.domElement.style.cursor = "ns-resize";
|
|
1933
1942
|
const T = _(r);
|
|
1934
1943
|
b.current = T;
|
|
@@ -1971,7 +1980,7 @@ let __tla = (async () => {
|
|
|
1971
1980
|
depthWrite: false,
|
|
1972
1981
|
transparent: true,
|
|
1973
1982
|
renderOrder: 10,
|
|
1974
|
-
onPointerDown:
|
|
1983
|
+
onPointerDown: B,
|
|
1975
1984
|
onPointerMove: V,
|
|
1976
1985
|
onPointerUp: F,
|
|
1977
1986
|
onPointerEnter: () => {
|
|
@@ -2071,46 +2080,46 @@ let __tla = (async () => {
|
|
|
2071
2080
|
]), [
|
|
2072
2081
|
e,
|
|
2073
2082
|
v
|
|
2074
|
-
]), [b, k] =
|
|
2083
|
+
]), [b, k] = E(() => {
|
|
2075
2084
|
if (!f) return {};
|
|
2076
2085
|
const D = {};
|
|
2077
2086
|
return y.forEach((O, Q) => {
|
|
2078
2087
|
f[Q] != null && f[Q] !== 0 && (D[O] = (f[Q] / 10).toFixed(1));
|
|
2079
2088
|
}), D;
|
|
2080
|
-
}), [S, C] =
|
|
2089
|
+
}), [S, C] = E(h && h > 0 ? (h / 10).toFixed(1) : ""), [z, _] = E(""), [B, V] = E(""), [F, I] = E(""), [P, T] = E(""), j = e === "AK" ? "Perineum to Distal (Axial)" : "MPT to Distal (Axial)", ee = e === "AK" ? "M/L at Perineum" : "M/L at MPT", ie = e === "AK" ? "A/P at Perineum" : "A/P at MPT", oe = J(() => y.map((D) => {
|
|
2081
2090
|
const O = b[D];
|
|
2082
2091
|
return O != null && O !== "" && !isNaN(parseFloat(O)) ? parseFloat(O) * 10 : 0;
|
|
2083
2092
|
}), [
|
|
2084
2093
|
y,
|
|
2085
2094
|
b
|
|
2086
2095
|
]);
|
|
2087
|
-
|
|
2096
|
+
X(() => {
|
|
2088
2097
|
o == null ? void 0 : o(oe);
|
|
2089
2098
|
}, [
|
|
2090
2099
|
oe,
|
|
2091
2100
|
o
|
|
2092
|
-
]),
|
|
2101
|
+
]), X(() => {
|
|
2093
2102
|
const D = S !== "" && !isNaN(parseFloat(S)) ? parseFloat(S) * 10 : void 0;
|
|
2094
2103
|
d == null ? void 0 : d(D);
|
|
2095
2104
|
}, [
|
|
2096
2105
|
S,
|
|
2097
2106
|
d
|
|
2098
2107
|
]);
|
|
2099
|
-
const
|
|
2100
|
-
|
|
2101
|
-
const D =
|
|
2108
|
+
const q = e === "AK" ? z : F, re = e === "AK" ? B : P;
|
|
2109
|
+
X(() => {
|
|
2110
|
+
const D = q !== "" && !isNaN(parseFloat(q)) ? parseFloat(q) * 10 : void 0;
|
|
2102
2111
|
p == null ? void 0 : p(D);
|
|
2103
2112
|
}, [
|
|
2104
|
-
|
|
2113
|
+
q,
|
|
2105
2114
|
p
|
|
2106
|
-
]),
|
|
2115
|
+
]), X(() => {
|
|
2107
2116
|
const D = re !== "" && !isNaN(parseFloat(re)) ? parseFloat(re) * 10 : void 0;
|
|
2108
2117
|
u == null ? void 0 : u(D);
|
|
2109
2118
|
}, [
|
|
2110
2119
|
re,
|
|
2111
2120
|
u
|
|
2112
2121
|
]);
|
|
2113
|
-
const
|
|
2122
|
+
const K = J(() => {
|
|
2114
2123
|
for (const D of A) {
|
|
2115
2124
|
const O = y.indexOf(D);
|
|
2116
2125
|
if (O === -1) continue;
|
|
@@ -2123,22 +2132,22 @@ let __tla = (async () => {
|
|
|
2123
2132
|
A,
|
|
2124
2133
|
S
|
|
2125
2134
|
]), he = ce(() => {
|
|
2126
|
-
if (!
|
|
2135
|
+
if (!K) return;
|
|
2127
2136
|
const D = (Q) => Q !== "" && !isNaN(parseFloat(Q)) ? parseFloat(Q) * 10 : void 0, O = D(S) ?? 0;
|
|
2128
2137
|
c({
|
|
2129
2138
|
circumferences: oe,
|
|
2130
2139
|
frontalHeight: O,
|
|
2131
2140
|
perineumML: e === "AK" ? D(z) : void 0,
|
|
2132
|
-
perineumAP: e === "AK" ? D(
|
|
2141
|
+
perineumAP: e === "AK" ? D(B) : void 0,
|
|
2133
2142
|
mptML: e === "BK" ? D(F) : void 0,
|
|
2134
2143
|
mptAP: e === "BK" ? D(P) : void 0
|
|
2135
2144
|
});
|
|
2136
2145
|
}, [
|
|
2137
|
-
|
|
2146
|
+
K,
|
|
2138
2147
|
oe,
|
|
2139
2148
|
S,
|
|
2140
2149
|
z,
|
|
2141
|
-
|
|
2150
|
+
B,
|
|
2142
2151
|
F,
|
|
2143
2152
|
P,
|
|
2144
2153
|
e,
|
|
@@ -2366,8 +2375,8 @@ let __tla = (async () => {
|
|
|
2366
2375
|
type: "number",
|
|
2367
2376
|
step: "0.1",
|
|
2368
2377
|
value: b[D] ?? "",
|
|
2369
|
-
onChange: (N) => k((
|
|
2370
|
-
...
|
|
2378
|
+
onChange: (N) => k((Y) => ({
|
|
2379
|
+
...Y,
|
|
2371
2380
|
[D]: N.target.value
|
|
2372
2381
|
})),
|
|
2373
2382
|
style: {
|
|
@@ -2508,13 +2517,13 @@ let __tla = (async () => {
|
|
|
2508
2517
|
i("input", {
|
|
2509
2518
|
type: "number",
|
|
2510
2519
|
step: "0.1",
|
|
2511
|
-
value:
|
|
2520
|
+
value: B,
|
|
2512
2521
|
onChange: (D) => V(D.target.value),
|
|
2513
2522
|
style: {
|
|
2514
2523
|
...qe,
|
|
2515
2524
|
padding: "6px 8px",
|
|
2516
2525
|
fontSize: 13,
|
|
2517
|
-
borderColor:
|
|
2526
|
+
borderColor: B ? "rgb(12, 67, 173)" : "#ccc",
|
|
2518
2527
|
borderWidth: 1
|
|
2519
2528
|
},
|
|
2520
2529
|
placeholder: "0.0"
|
|
@@ -2616,13 +2625,13 @@ let __tla = (async () => {
|
|
|
2616
2625
|
},
|
|
2617
2626
|
children: i("button", {
|
|
2618
2627
|
onClick: he,
|
|
2619
|
-
disabled: !
|
|
2628
|
+
disabled: !K,
|
|
2620
2629
|
style: {
|
|
2621
2630
|
..._n,
|
|
2622
|
-
backgroundColor:
|
|
2631
|
+
backgroundColor: K ? "rgb(12, 67, 173)" : "#e0e0e0",
|
|
2623
2632
|
border: "none",
|
|
2624
|
-
color:
|
|
2625
|
-
cursor:
|
|
2633
|
+
color: K ? "#fff" : "#9e9e9e",
|
|
2634
|
+
cursor: K ? "pointer" : "not-allowed",
|
|
2626
2635
|
padding: "6px 16px",
|
|
2627
2636
|
fontSize: 13,
|
|
2628
2637
|
width: "100%"
|
|
@@ -2657,7 +2666,7 @@ let __tla = (async () => {
|
|
|
2657
2666
|
boxSizing: "border-box",
|
|
2658
2667
|
fontFamily: "system-ui, sans-serif"
|
|
2659
2668
|
}, wr = ({ onSkip: e, onCancel: r }) => {
|
|
2660
|
-
const [t, n] =
|
|
2669
|
+
const [t, n] = E("confirm"), [s, l] = E(null), [c, a] = E(""), o = ce(() => {
|
|
2661
2670
|
n("reasons");
|
|
2662
2671
|
}, []), d = ce(() => {
|
|
2663
2672
|
t === "reasons" ? (n("confirm"), l(null), a("")) : r();
|
|
@@ -3249,16 +3258,16 @@ let __tla = (async () => {
|
|
|
3249
3258
|
const l = J(() => {
|
|
3250
3259
|
const p = s ?? e, u = Zt(p), f = new M(0, 1, 0), h = 5, g = t + 3 * 25.4, x = [];
|
|
3251
3260
|
for (let _ = r + h; _ < g; _ += h) {
|
|
3252
|
-
const
|
|
3253
|
-
|
|
3261
|
+
const B = Go(u, p, new M(0, _, 0), f);
|
|
3262
|
+
B > 0 && x.push({
|
|
3254
3263
|
y: _,
|
|
3255
|
-
circ:
|
|
3264
|
+
circ: B
|
|
3256
3265
|
});
|
|
3257
3266
|
}
|
|
3258
3267
|
if (x.length < 5) return null;
|
|
3259
3268
|
const y = t - r, A = r + y * 0.3, b = r + y * 0.7, k = x.filter((_) => _.y >= A && _.y <= b);
|
|
3260
3269
|
if (k.length < 3) return null;
|
|
3261
|
-
const S = k.map((_) => _.circ).sort((_,
|
|
3270
|
+
const S = k.map((_) => _.circ).sort((_, B) => _ - B), C = S[Math.floor(S.length / 2)], z = Math.max(...x.map((_) => _.circ));
|
|
3262
3271
|
return {
|
|
3263
3272
|
circumferences: x,
|
|
3264
3273
|
baseline: C,
|
|
@@ -3337,7 +3346,7 @@ let __tla = (async () => {
|
|
|
3337
3346
|
color: n,
|
|
3338
3347
|
transparent: true,
|
|
3339
3348
|
opacity: s ? 0.5 : 0.2,
|
|
3340
|
-
side:
|
|
3349
|
+
side: Z.DoubleSide,
|
|
3341
3350
|
depthWrite: false,
|
|
3342
3351
|
polygonOffset: true,
|
|
3343
3352
|
polygonOffsetFactor: 1,
|
|
@@ -3396,7 +3405,7 @@ let __tla = (async () => {
|
|
|
3396
3405
|
a[v] = p, a[v + 1] = u, a[v + 2] = f;
|
|
3397
3406
|
}
|
|
3398
3407
|
}
|
|
3399
|
-
return n.setAttribute("color", new
|
|
3408
|
+
return n.setAttribute("color", new Z.Float32BufferAttribute(a, 3)), n;
|
|
3400
3409
|
}, [
|
|
3401
3410
|
e,
|
|
3402
3411
|
r
|
|
@@ -3410,7 +3419,7 @@ let __tla = (async () => {
|
|
|
3410
3419
|
vertexColors: true,
|
|
3411
3420
|
transparent: true,
|
|
3412
3421
|
opacity: 0.85,
|
|
3413
|
-
side:
|
|
3422
|
+
side: Z.DoubleSide,
|
|
3414
3423
|
depthWrite: false
|
|
3415
3424
|
})
|
|
3416
3425
|
});
|
|
@@ -3660,14 +3669,14 @@ let __tla = (async () => {
|
|
|
3660
3669
|
});
|
|
3661
3670
|
}
|
|
3662
3671
|
const Br = ({ config: e, spacingType: r, scanUrl: t, formMeasurements: n, onComplete: s, isDebugUser: l = false, onAnalyticsEvent: c, wasmModule: a, autoProcessOnTwoPoints: o = false }) => {
|
|
3663
|
-
const [d, p] =
|
|
3672
|
+
const [d, p] = E(null), [u, f] = E(0), [h, v] = E(false), [g, x] = E(false), [y, A] = E(""), [b, k] = E("3D"), [S, C] = E(r === "AK" ? 2 : 1), [z, _] = E(false), [B, V] = E(null), [F, I] = E(r ?? null), [P, T] = E("cm"), [j, ee] = E(false), [ie, oe] = E(""), [q, re] = E(false), [K, he] = E(false), [te, D] = E(false), [O, Q] = E(false), [U, N] = E(null), [Y, fe] = E(null), [se, ge] = E(null), [ue, we] = E(false), [$, ke] = E([]), [De, Ie] = E(null), [me, Me] = E(null), [Mt, Ft] = E(null), [it, Ut] = E(null), [Kn, Jt] = E(false), [st, Qt] = E(null), [kt, Le] = E(null), [We, Zn] = E(false), [en, qn] = E(vr), [He, tn] = E("obj"), [Ae, Pt] = E(n), [Ve, Lt] = E(true), [Ye, Je] = E(false), [Dt, nn] = E(false), [Be, lt] = E(false), Ke = de(false), [Un, at] = E(false), [_t, on] = E(() => {
|
|
3664
3673
|
try {
|
|
3665
3674
|
return localStorage.getItem("gm_helpTipDismissed") !== "1";
|
|
3666
3675
|
} catch {
|
|
3667
3676
|
return true;
|
|
3668
3677
|
}
|
|
3669
3678
|
});
|
|
3670
|
-
|
|
3679
|
+
X(() => {
|
|
3671
3680
|
if (!_t) return;
|
|
3672
3681
|
const m = setTimeout(() => {
|
|
3673
3682
|
on(false);
|
|
@@ -3679,22 +3688,22 @@ let __tla = (async () => {
|
|
|
3679
3688
|
return () => clearTimeout(m);
|
|
3680
3689
|
}, [
|
|
3681
3690
|
_t
|
|
3682
|
-
]),
|
|
3683
|
-
if (!
|
|
3691
|
+
]), X(() => {
|
|
3692
|
+
if (!K) return;
|
|
3684
3693
|
const m = setTimeout(() => he(false), 5e3);
|
|
3685
3694
|
return () => clearTimeout(m);
|
|
3686
3695
|
}, [
|
|
3687
|
-
|
|
3696
|
+
K
|
|
3688
3697
|
]);
|
|
3689
|
-
const Rt = de(null), [Ne, Jn] =
|
|
3690
|
-
|
|
3698
|
+
const Rt = de(null), [Ne, Jn] = E(0);
|
|
3699
|
+
X(() => {
|
|
3691
3700
|
if (!Rt.current) return;
|
|
3692
3701
|
const m = new ResizeObserver((L) => {
|
|
3693
3702
|
for (const R of L) Jn(R.contentRect.width);
|
|
3694
3703
|
});
|
|
3695
3704
|
return m.observe(Rt.current), () => m.disconnect();
|
|
3696
3705
|
}, []);
|
|
3697
|
-
const [ve, Qn] =
|
|
3706
|
+
const [ve, Qn] = E(null), [eo, to] = E(void 0), [no, oo] = E(void 0), [ro, io] = E(void 0), [so, lo] = E(void 0), [rn] = E("#c8c8c8"), [ao] = E(1), [Ee, co] = E(false), [Wt, sn] = E([]), ct = de(null), je = de(null), dt = de(false), fo = de(null), It = de(null), Bt = de(null), Qe = ce(async (m) => {
|
|
3698
3707
|
if (!Bt.current) return;
|
|
3699
3708
|
const L = (m == null ? void 0 : m.restoreView) ?? true;
|
|
3700
3709
|
try {
|
|
@@ -3760,14 +3769,14 @@ let __tla = (async () => {
|
|
|
3760
3769
|
...W.slice(-200),
|
|
3761
3770
|
`[${R}] ${m}`
|
|
3762
3771
|
]);
|
|
3763
|
-
}, []), { landmarkPoints: G, clearLandmarkPoints: uo, addLandmarkPoint: ln, removeLandmarkPoint: an, updateLandmarkPositions: cn, setAligned: dn, isAligned:
|
|
3764
|
-
|
|
3772
|
+
}, []), { landmarkPoints: G, clearLandmarkPoints: uo, addLandmarkPoint: ln, removeLandmarkPoint: an, updateLandmarkPositions: cn, setAligned: dn, isAligned: le, setCut: fn, isCut: Et, reset: ft } = qt();
|
|
3773
|
+
X(() => {
|
|
3765
3774
|
ft();
|
|
3766
3775
|
}, [
|
|
3767
3776
|
ft
|
|
3768
3777
|
]);
|
|
3769
3778
|
const ut = S * vt;
|
|
3770
|
-
|
|
3779
|
+
X(() => {
|
|
3771
3780
|
if (!l || G.length === 0) return;
|
|
3772
3781
|
const m = G[G.length - 1];
|
|
3773
3782
|
ze(`LANDMARK[${G.length - 1}]: placed at (${m.position.x.toFixed(1)}, ${m.position.y.toFixed(1)}, ${m.position.z.toFixed(1)}) face=${m.faceIndex}`);
|
|
@@ -3775,38 +3784,54 @@ let __tla = (async () => {
|
|
|
3775
3784
|
G.length,
|
|
3776
3785
|
l,
|
|
3777
3786
|
ze
|
|
3778
|
-
]),
|
|
3779
|
-
l &&
|
|
3787
|
+
]), X(() => {
|
|
3788
|
+
l && le && ze("STATE: mesh aligned");
|
|
3780
3789
|
}, [
|
|
3781
|
-
|
|
3790
|
+
le,
|
|
3782
3791
|
l,
|
|
3783
3792
|
ze
|
|
3784
|
-
]),
|
|
3793
|
+
]), X(() => {
|
|
3785
3794
|
l && Et && ze("STATE: mesh cut");
|
|
3786
3795
|
}, [
|
|
3787
3796
|
Et,
|
|
3788
3797
|
l,
|
|
3789
3798
|
ze
|
|
3790
|
-
]),
|
|
3799
|
+
]), X(() => {
|
|
3791
3800
|
ct.current && (ct.current.scrollTop = ct.current.scrollHeight);
|
|
3792
3801
|
}, [
|
|
3793
3802
|
Wt
|
|
3794
3803
|
]);
|
|
3795
|
-
const Te = J(() =>
|
|
3796
|
-
|
|
3804
|
+
const Te = J(() => se ? new Z.Mesh(se) : null, [
|
|
3805
|
+
se
|
|
3797
3806
|
]);
|
|
3798
|
-
|
|
3807
|
+
X(() => () => {
|
|
3808
|
+
d && d.geometry.dispose();
|
|
3809
|
+
}, [
|
|
3810
|
+
d
|
|
3811
|
+
]), X(() => () => {
|
|
3812
|
+
se && se.dispose();
|
|
3813
|
+
}, [
|
|
3814
|
+
se
|
|
3815
|
+
]), X(() => () => {
|
|
3816
|
+
Y && Y.dispose();
|
|
3817
|
+
}, [
|
|
3818
|
+
Y
|
|
3819
|
+
]), X(() => () => {
|
|
3820
|
+
B && B.geometry.dispose();
|
|
3821
|
+
}, [
|
|
3822
|
+
B
|
|
3823
|
+
]), X(() => {
|
|
3799
3824
|
n && Pt(n);
|
|
3800
3825
|
}, [
|
|
3801
3826
|
n
|
|
3802
|
-
]),
|
|
3827
|
+
]), X(() => {
|
|
3803
3828
|
n || Pt(void 0);
|
|
3804
3829
|
}, [
|
|
3805
3830
|
S
|
|
3806
3831
|
]);
|
|
3807
3832
|
const pt = de(false);
|
|
3808
|
-
|
|
3809
|
-
if (!
|
|
3833
|
+
X(() => {
|
|
3834
|
+
if (!le || $.length === 0 || pt.current || !c) return;
|
|
3810
3835
|
pt.current = true;
|
|
3811
3836
|
const m = G.length >= 3 ? Math.abs(G[2].position.y - G[0].position.y) : null;
|
|
3812
3837
|
c("dimensions_calculated", {
|
|
@@ -3825,9 +3850,9 @@ let __tla = (async () => {
|
|
|
3825
3850
|
frontal_height: m !== null ? +m.toFixed(1) : null
|
|
3826
3851
|
});
|
|
3827
3852
|
}, [
|
|
3828
|
-
|
|
3853
|
+
le,
|
|
3829
3854
|
$
|
|
3830
|
-
]),
|
|
3855
|
+
]), X(() => {
|
|
3831
3856
|
a !== void 0 && (je.current = a), a !== void 0 && co(true);
|
|
3832
3857
|
}, [
|
|
3833
3858
|
a
|
|
@@ -3838,9 +3863,9 @@ let __tla = (async () => {
|
|
|
3838
3863
|
R.getCenter(W), m.translate(-W.x, -W.y, -W.z), m.computeBoundingBox();
|
|
3839
3864
|
const pe = m.boundingBox, H = new M();
|
|
3840
3865
|
pe.getSize(H), f(Math.max(H.x, H.y, H.z));
|
|
3841
|
-
const ne = new
|
|
3866
|
+
const ne = new Z.Mesh(m, new Z.MeshStandardMaterial({
|
|
3842
3867
|
color: 8947848,
|
|
3843
|
-
side:
|
|
3868
|
+
side: Z.DoubleSide
|
|
3844
3869
|
}));
|
|
3845
3870
|
p(ne), re(L), he(true), Q(false), dt.current = false;
|
|
3846
3871
|
}, []), $e = ce(async (m, L) => {
|
|
@@ -3892,7 +3917,7 @@ let __tla = (async () => {
|
|
|
3892
3917
|
r,
|
|
3893
3918
|
et
|
|
3894
3919
|
]);
|
|
3895
|
-
|
|
3920
|
+
X(() => {
|
|
3896
3921
|
if (!t || !Ee) return;
|
|
3897
3922
|
(async () => {
|
|
3898
3923
|
x(true), A("Loading scan...");
|
|
@@ -3947,18 +3972,18 @@ let __tla = (async () => {
|
|
|
3947
3972
|
Ee,
|
|
3948
3973
|
$e
|
|
3949
3974
|
]), mo = ce((m) => {
|
|
3950
|
-
I(m), C(m === "AK" ? 2 : 1), _(false),
|
|
3975
|
+
I(m), C(m === "AK" ? 2 : 1), _(false), B && (et(B.geometry, B.wasScaled), V(null)), c == null ? void 0 : c("file_loaded", {
|
|
3951
3976
|
spacing_type: m,
|
|
3952
3977
|
file_format: He,
|
|
3953
3978
|
is_double_wall: false
|
|
3954
3979
|
});
|
|
3955
3980
|
}, [
|
|
3956
|
-
|
|
3981
|
+
B,
|
|
3957
3982
|
et,
|
|
3958
3983
|
c,
|
|
3959
3984
|
He
|
|
3960
3985
|
]);
|
|
3961
|
-
|
|
3986
|
+
X(() => {
|
|
3962
3987
|
if (!d || G.length !== 1 || !je.current || dt.current) return;
|
|
3963
3988
|
dt.current = true;
|
|
3964
3989
|
const m = G[0], L = je.current, R = d.geometry, { positions: W, indices: pe } = St(R), H = new Float32Array([
|
|
@@ -4025,16 +4050,16 @@ let __tla = (async () => {
|
|
|
4025
4050
|
fn,
|
|
4026
4051
|
O
|
|
4027
4052
|
]), $t = de(false);
|
|
4028
|
-
|
|
4029
|
-
o && ($t.current || !d ||
|
|
4053
|
+
X(() => {
|
|
4054
|
+
o && ($t.current || !d || le || j || G.length < 2 || ($t.current = true, Tt()));
|
|
4030
4055
|
}, [
|
|
4031
4056
|
o,
|
|
4032
4057
|
d,
|
|
4033
4058
|
G.length,
|
|
4034
|
-
|
|
4059
|
+
le,
|
|
4035
4060
|
j,
|
|
4036
4061
|
Tt
|
|
4037
|
-
]),
|
|
4062
|
+
]), X(() => {
|
|
4038
4063
|
G.length < 2 && ($t.current = false);
|
|
4039
4064
|
}, [
|
|
4040
4065
|
G.length
|
|
@@ -4057,14 +4082,14 @@ let __tla = (async () => {
|
|
|
4057
4082
|
$e,
|
|
4058
4083
|
ft
|
|
4059
4084
|
]);
|
|
4060
|
-
|
|
4061
|
-
|
|
4085
|
+
X(() => {
|
|
4086
|
+
le && $.length > 0 && !Ot.current && (Ot.current = true, Je(true));
|
|
4062
4087
|
}, [
|
|
4063
|
-
|
|
4088
|
+
le,
|
|
4064
4089
|
$.length
|
|
4065
4090
|
]);
|
|
4066
4091
|
const { scanTransverseML: Ht, scanTransverseAP: Vt } = J(() => {
|
|
4067
|
-
if (!d || !
|
|
4092
|
+
if (!d || !le || G.length < 1) return {
|
|
4068
4093
|
scanTransverseML: 0,
|
|
4069
4094
|
scanTransverseAP: 0
|
|
4070
4095
|
};
|
|
@@ -4090,16 +4115,19 @@ let __tla = (async () => {
|
|
|
4090
4115
|
}, [
|
|
4091
4116
|
d,
|
|
4092
4117
|
Te,
|
|
4093
|
-
|
|
4118
|
+
le,
|
|
4094
4119
|
G
|
|
4095
4120
|
]), tt = J(() => {
|
|
4096
4121
|
var _a;
|
|
4097
|
-
if (!d || G.length <
|
|
4098
|
-
if (te) return Math.abs(G[0].position.y - G[2].position.y);
|
|
4122
|
+
if (!d || G.length < 1) return 0;
|
|
4099
4123
|
const m = d.geometry;
|
|
4100
4124
|
m.computeBoundingBox();
|
|
4101
|
-
const L = ((_a = m.boundingBox) == null ? void 0 : _a.min.y) ?? 0;
|
|
4102
|
-
|
|
4125
|
+
const L = ((_a = m.boundingBox) == null ? void 0 : _a.min.y) ?? 0, R = G[0].position.y;
|
|
4126
|
+
if (te && G.length >= 3) {
|
|
4127
|
+
const W = Math.abs(R - G[2].position.y);
|
|
4128
|
+
if (W > 0.5) return W;
|
|
4129
|
+
}
|
|
4130
|
+
return Math.abs(R - L);
|
|
4103
4131
|
}, [
|
|
4104
4132
|
d,
|
|
4105
4133
|
G,
|
|
@@ -4151,8 +4179,8 @@ let __tla = (async () => {
|
|
|
4151
4179
|
t,
|
|
4152
4180
|
Qe
|
|
4153
4181
|
]), pn = de(null);
|
|
4154
|
-
|
|
4155
|
-
if (!d || !
|
|
4182
|
+
X(() => {
|
|
4183
|
+
if (!d || !le) {
|
|
4156
4184
|
pn.current = null;
|
|
4157
4185
|
return;
|
|
4158
4186
|
}
|
|
@@ -4160,7 +4188,7 @@ let __tla = (async () => {
|
|
|
4160
4188
|
pn.current = Zt(m);
|
|
4161
4189
|
}, [
|
|
4162
4190
|
d,
|
|
4163
|
-
|
|
4191
|
+
le,
|
|
4164
4192
|
Te
|
|
4165
4193
|
]);
|
|
4166
4194
|
const Nt = ce(async (m) => {
|
|
@@ -4288,7 +4316,7 @@ let __tla = (async () => {
|
|
|
4288
4316
|
minHeight: 0
|
|
4289
4317
|
},
|
|
4290
4318
|
children: [
|
|
4291
|
-
d && !
|
|
4319
|
+
d && !le && (() => {
|
|
4292
4320
|
const m = G.length === 0 ? 1 : G.length === 1 ? 2 : 3, L = F === "AK" ? "Perineum" : "MPT", R = m === 1 ? `Place Point at ${L}` : m === 2 ? "Place Point at Distal Most Point" : "Ready to Continue", W = m === 1 ? `Click on the model to mark the ${L}.` : m === 2 ? "Click on the model to mark the Distal Most Point." : "Both points are placed. Click Continue to process the scan.", pe = m === 1 ? "#2fbf4a" : m === 2 ? "#e53935" : "#2fbf4a", H = G.length >= 2;
|
|
4293
4321
|
return w("div", {
|
|
4294
4322
|
style: {
|
|
@@ -4528,7 +4556,7 @@ let __tla = (async () => {
|
|
|
4528
4556
|
]
|
|
4529
4557
|
});
|
|
4530
4558
|
})(),
|
|
4531
|
-
|
|
4559
|
+
le && Ye && F && i("div", {
|
|
4532
4560
|
style: {
|
|
4533
4561
|
width: hn,
|
|
4534
4562
|
flexShrink: 0,
|
|
@@ -4860,7 +4888,7 @@ let __tla = (async () => {
|
|
|
4860
4888
|
preserveDrawingBuffer: true
|
|
4861
4889
|
},
|
|
4862
4890
|
scene: {
|
|
4863
|
-
background: We ? new
|
|
4891
|
+
background: We ? new Z.Color("#070611") : null
|
|
4864
4892
|
},
|
|
4865
4893
|
children: [
|
|
4866
4894
|
i("ambientLight", {
|
|
@@ -4896,7 +4924,7 @@ let __tla = (async () => {
|
|
|
4896
4924
|
meshColor: rn,
|
|
4897
4925
|
meshOpacity: We ? 0.3 : ao,
|
|
4898
4926
|
frontFaceOnly: O,
|
|
4899
|
-
doubleShellTransparency: te &&
|
|
4927
|
+
doubleShellTransparency: te && le
|
|
4900
4928
|
}),
|
|
4901
4929
|
d && b === "3D" && i(Qo, {
|
|
4902
4930
|
modelSize: u,
|
|
@@ -4908,25 +4936,25 @@ let __tla = (async () => {
|
|
|
4908
4936
|
}),
|
|
4909
4937
|
i(ar, {
|
|
4910
4938
|
modelSize: u,
|
|
4911
|
-
isAligned:
|
|
4939
|
+
isAligned: le,
|
|
4912
4940
|
isCut: Et,
|
|
4913
4941
|
mesh: d,
|
|
4914
4942
|
viewMode: b,
|
|
4915
|
-
sliceY:
|
|
4943
|
+
sliceY: le && G.length >= 2 ? Mt ?? it ?? G[0].position.y : void 0,
|
|
4916
4944
|
landmarkCount: G.length,
|
|
4917
|
-
measurementGeometry:
|
|
4918
|
-
fitYMin:
|
|
4919
|
-
fitYMax:
|
|
4945
|
+
measurementGeometry: se,
|
|
4946
|
+
fitYMin: le && G.length >= 2 ? Mt ?? it ?? void 0 : void 0,
|
|
4947
|
+
fitYMax: le && G.length >= 2 ? st ?? G[0].position.y : void 0,
|
|
4920
4948
|
resetCameraToFrontRef: It
|
|
4921
4949
|
}),
|
|
4922
|
-
!
|
|
4950
|
+
!le && i(In, {
|
|
4923
4951
|
enableDamping: false
|
|
4924
4952
|
}),
|
|
4925
|
-
|
|
4953
|
+
le && $.length > 0 && d && b === "3D" && i(cr, {
|
|
4926
4954
|
mesh: d,
|
|
4927
4955
|
isDragging: Kn
|
|
4928
4956
|
}),
|
|
4929
|
-
d &&
|
|
4957
|
+
d && le && G.length >= 3 && (() => {
|
|
4930
4958
|
const L = d.geometry.getIndex();
|
|
4931
4959
|
if (!L || L.count < 30) return null;
|
|
4932
4960
|
const R = G[2], W = G[0], pe = me ?? R.position.y, H = Mt ?? it ?? W.position.y;
|
|
@@ -4988,7 +5016,7 @@ let __tla = (async () => {
|
|
|
4988
5016
|
]
|
|
4989
5017
|
});
|
|
4990
5018
|
})(),
|
|
4991
|
-
d &&
|
|
5019
|
+
d && le && b === "3D" && We && i(Rr, {
|
|
4992
5020
|
mesh: d
|
|
4993
5021
|
}),
|
|
4994
5022
|
d && e.showDebug && We && b === "3D" && i(_r, {
|
|
@@ -4998,14 +5026,14 @@ let __tla = (async () => {
|
|
|
4998
5026
|
landmarkPoints: G,
|
|
4999
5027
|
componentDebug: null,
|
|
5000
5028
|
aoData: U,
|
|
5001
|
-
aoGeometry:
|
|
5002
|
-
measurementGeometry:
|
|
5029
|
+
aoGeometry: Y,
|
|
5030
|
+
measurementGeometry: se
|
|
5003
5031
|
}),
|
|
5004
5032
|
i(Er, {
|
|
5005
5033
|
screenshotFnRef: fo,
|
|
5006
5034
|
mesh: d,
|
|
5007
5035
|
modelSize: u,
|
|
5008
|
-
measurementGeometry:
|
|
5036
|
+
measurementGeometry: se
|
|
5009
5037
|
})
|
|
5010
5038
|
]
|
|
5011
5039
|
})
|
|
@@ -5020,7 +5048,7 @@ let __tla = (async () => {
|
|
|
5020
5048
|
gap: 8
|
|
5021
5049
|
},
|
|
5022
5050
|
children: [
|
|
5023
|
-
e.showStartOver &&
|
|
5051
|
+
e.showStartOver && le && i("button", {
|
|
5024
5052
|
onClick: () => window.location.reload(),
|
|
5025
5053
|
style: {
|
|
5026
5054
|
padding: "6px 16px",
|
|
@@ -5037,7 +5065,7 @@ let __tla = (async () => {
|
|
|
5037
5065
|
},
|
|
5038
5066
|
children: "Start Over"
|
|
5039
5067
|
}),
|
|
5040
|
-
!
|
|
5068
|
+
!le && G.length >= 1 && i("button", {
|
|
5041
5069
|
onClick: uo,
|
|
5042
5070
|
style: {
|
|
5043
5071
|
padding: "6px 16px",
|
|
@@ -5054,7 +5082,7 @@ let __tla = (async () => {
|
|
|
5054
5082
|
},
|
|
5055
5083
|
children: "Reset Points"
|
|
5056
5084
|
}),
|
|
5057
|
-
|
|
5085
|
+
le && !Dt && i("button", {
|
|
5058
5086
|
onClick: xo,
|
|
5059
5087
|
style: {
|
|
5060
5088
|
padding: "6px 16px",
|
|
@@ -5081,7 +5109,7 @@ let __tla = (async () => {
|
|
|
5081
5109
|
})),
|
|
5082
5110
|
isDoubleShell: te
|
|
5083
5111
|
}),
|
|
5084
|
-
|
|
5112
|
+
le && $.length > 0 && w("div", {
|
|
5085
5113
|
style: {
|
|
5086
5114
|
position: "absolute",
|
|
5087
5115
|
top: 16,
|
|
@@ -5290,15 +5318,15 @@ let __tla = (async () => {
|
|
|
5290
5318
|
})
|
|
5291
5319
|
]
|
|
5292
5320
|
}),
|
|
5293
|
-
d &&
|
|
5294
|
-
wasAutoScaled:
|
|
5321
|
+
d && K && i(dr, {
|
|
5322
|
+
wasAutoScaled: q,
|
|
5295
5323
|
onDismiss: () => he(false)
|
|
5296
5324
|
}),
|
|
5297
|
-
d && ue &&
|
|
5325
|
+
d && ue && le && i(fr, {
|
|
5298
5326
|
isDoubleShell: te,
|
|
5299
5327
|
onDismiss: () => we(false)
|
|
5300
5328
|
}),
|
|
5301
|
-
s &&
|
|
5329
|
+
s && le && i("div", {
|
|
5302
5330
|
className: "gm-action-row-container",
|
|
5303
5331
|
style: {
|
|
5304
5332
|
position: "absolute",
|
|
@@ -5479,7 +5507,7 @@ let __tla = (async () => {
|
|
|
5479
5507
|
" | ",
|
|
5480
5508
|
G.length,
|
|
5481
5509
|
" pts | ",
|
|
5482
|
-
|
|
5510
|
+
le ? "aligned" : "unaligned",
|
|
5483
5511
|
" | ",
|
|
5484
5512
|
$.length,
|
|
5485
5513
|
" slices"
|
|
@@ -5533,7 +5561,7 @@ let __tla = (async () => {
|
|
|
5533
5561
|
});
|
|
5534
5562
|
};
|
|
5535
5563
|
function Er({ screenshotFnRef: e }) {
|
|
5536
|
-
return
|
|
5564
|
+
return X(() => {
|
|
5537
5565
|
e.current = null;
|
|
5538
5566
|
}, [
|
|
5539
5567
|
e
|
|
@@ -5635,8 +5663,8 @@ let __tla = (async () => {
|
|
|
5635
5663
|
};
|
|
5636
5664
|
}
|
|
5637
5665
|
Ur = ({ request: e, onComplete: r, wasmModule: t }) => {
|
|
5638
|
-
const [n, s] =
|
|
5639
|
-
|
|
5666
|
+
const [n, s] = E(null);
|
|
5667
|
+
X(() => {
|
|
5640
5668
|
if (t != null) return;
|
|
5641
5669
|
let o = false;
|
|
5642
5670
|
const d = async (p) => {
|
|
@@ -5749,5 +5777,6 @@ export {
|
|
|
5749
5777
|
__tla,
|
|
5750
5778
|
wt as a,
|
|
5751
5779
|
Tr as c,
|
|
5752
|
-
Yn as g
|
|
5780
|
+
Yn as g,
|
|
5781
|
+
qt as u
|
|
5753
5782
|
};
|