quantum-component-library 1.4.48-dev.7 → 1.4.48-dev.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/components.cjs +1 -1
- package/dist/components.js +44 -43
- package/dist/{dnd-core-vendor-C8EkmZ-Q.js → dnd-core-vendor-CEbjUoFs.js} +2 -2
- package/dist/{dnd-core-vendor-CrbsA5lC.cjs → dnd-core-vendor-gqRN0Czq.cjs} +1 -1
- package/dist/generated/graphql.d.ts +1 -1
- package/dist/{graphql-vendor-BGoVZGn3.cjs → graphql-vendor-AFHxLsy8.cjs} +1 -1
- package/dist/{graphql-vendor-BsmTENtE.js → graphql-vendor-hJezYUeG.js} +1 -1
- package/dist/hooks.cjs +1 -1
- package/dist/hooks.js +13 -13
- package/dist/index.cjs +1 -1
- package/dist/index.js +130 -125
- package/dist/lib/utils/cn.d.ts +2 -0
- package/dist/lib/utils/index.d.ts +1 -2
- package/dist/{lodash-vendor-CR237hSU.cjs → lodash-vendor-CF0pV_0E.cjs} +1 -1
- package/dist/{lodash-vendor-D4ZPCr77.js → lodash-vendor-apNdTTav.js} +1 -1
- package/dist/other-D9ROT7p0.js +20 -0
- package/dist/other-DyoApG-9.cjs +1 -0
- package/dist/{react-dnd-vendor-DQO87S4J.js → react-dnd-vendor-BCrg2QCX.js} +2 -2
- package/dist/{react-dnd-vendor-BuaDqq1-.cjs → react-dnd-vendor-PwwXhPmK.cjs} +1 -1
- package/dist/{react-select-vendor-C09H7eSP.cjs → react-select-vendor-BeWvSe2q.cjs} +1 -1
- package/dist/{react-select-vendor-D8Fzpeg3.js → react-select-vendor-BxbsY5Z-.js} +1 -1
- package/dist/services-action-CfZFwhy-.js +40 -0
- package/dist/services-action-DBOzfgMl.cjs +1 -0
- package/dist/services-human-B98qxeuS.js +798 -0
- package/dist/services-human-CnvSTmoF.cjs +1 -0
- package/dist/services-rom-DmV5X8yu.cjs +1 -0
- package/dist/services-rom-omMeC-vQ.js +18 -0
- package/dist/services.cjs +1 -1
- package/dist/services.js +52 -844
- package/dist/types.cjs +1 -1
- package/dist/types.js +11 -11
- package/dist/utils-cn-CgdSr4hO.js +7 -0
- package/dist/utils-cn-FIKrq5Mb.cjs +1 -0
- package/dist/utils-conversion-CWypeWsT.cjs +1 -0
- package/dist/utils-conversion-ChFbq8I2.js +94 -0
- package/dist/utils-memo-BJJP2KfI.cjs +1 -0
- package/dist/utils-memo-DtXdOqCT.js +13 -0
- package/dist/utils-parameters-BBFuBK2B.js +21 -0
- package/dist/utils-parameters-dwKmz1VU.cjs +1 -0
- package/dist/utils-text-CN3zLiZ7.js +5 -0
- package/dist/utils-text-lORqO4uI.cjs +1 -0
- package/dist/utils.cjs +1 -1
- package/dist/utils.js +29 -126
- package/dist/{vendor-CRvKgRcl.js → vendor-BOD7IxCS.js} +1 -1
- package/dist/{vendor-BwXiOWc8.cjs → vendor-IPtJZCbx.cjs} +1 -1
- package/package.json +1 -1
- package/dist/other-C4VnLmM6.js +0 -15
- package/dist/other-Dp3RPYfF.cjs +0 -1
|
@@ -0,0 +1,798 @@
|
|
|
1
|
+
import { axes as S, planes as x, AngleDataSource as c, limbAngle as w, jointAngle as b } from "./types.js";
|
|
2
|
+
import { r as p } from "./services-rom-omMeC-vQ.js";
|
|
3
|
+
import "./moment-vendor-DMLRxgRE.js";
|
|
4
|
+
import { m as l } from "./utils-memo-DtXdOqCT.js";
|
|
5
|
+
import { c as L } from "./utils-text-CN3zLiZ7.js";
|
|
6
|
+
const i = {
|
|
7
|
+
LeftFoot: "Left Foot",
|
|
8
|
+
RightFoot: "Right Foot",
|
|
9
|
+
LeftShank: "Left Shank",
|
|
10
|
+
RightShank: "Right Shank",
|
|
11
|
+
LeftThigh: "Left Thigh",
|
|
12
|
+
RightThigh: "Right Thigh",
|
|
13
|
+
LeftPelvis: "Left Pelvis",
|
|
14
|
+
RightPelvis: "Right Pelvis",
|
|
15
|
+
LowerBack: "Pelvis",
|
|
16
|
+
CenterBack: "Center Back",
|
|
17
|
+
UpperBack: "Thorax",
|
|
18
|
+
Head: "Head",
|
|
19
|
+
LeftClavicle: "Left Clavicle",
|
|
20
|
+
RightClavicle: "Right Clavicle",
|
|
21
|
+
LeftUpperArm: "Left Upper Arm",
|
|
22
|
+
RightUpperArm: "Right Upper Arm",
|
|
23
|
+
LeftForearm: "Left Forearm",
|
|
24
|
+
RightForearm: "Right Forearm"
|
|
25
|
+
}, n = {
|
|
26
|
+
LeftAnkle: "Left Ankle",
|
|
27
|
+
RightAnkle: "Right Ankle",
|
|
28
|
+
LeftKnee: "Left Knee",
|
|
29
|
+
RightKnee: "Right Knee",
|
|
30
|
+
LeftHip: "Left Hip",
|
|
31
|
+
RightHip: "Right Hip",
|
|
32
|
+
NavalSpine: "Lower Back",
|
|
33
|
+
ChestSpine: "Upper Back",
|
|
34
|
+
TotalSpine: "Total Spine",
|
|
35
|
+
LeftShoulder: "Left Shoulder",
|
|
36
|
+
RightShoulder: "Right Shoulder",
|
|
37
|
+
LeftElbow: "Left Elbow",
|
|
38
|
+
RightElbow: "Right Elbow",
|
|
39
|
+
Neck: "Neck"
|
|
40
|
+
}, Z = {
|
|
41
|
+
LeftFoot: ["LeftAnkle"],
|
|
42
|
+
RightFoot: ["RightAnkle"],
|
|
43
|
+
LeftShank: ["LeftKnee", "LeftAnkle"],
|
|
44
|
+
RightShank: ["RightKnee", "RightAnkle"],
|
|
45
|
+
LeftThigh: ["LeftHip", "LeftKnee"],
|
|
46
|
+
RightThigh: ["RightHip", "RightKnee"],
|
|
47
|
+
LeftPelvis: ["LeftHip"],
|
|
48
|
+
RightPelvis: ["RightHip"],
|
|
49
|
+
LowerBack: ["LeftHip", "RightHip", "NavalSpine", "TotalSpine"],
|
|
50
|
+
CenterBack: ["NavalSpine", "ChestSpine"],
|
|
51
|
+
UpperBack: ["ChestSpine", "TotalSpine"],
|
|
52
|
+
Head: ["Neck"],
|
|
53
|
+
LeftClavicle: ["LeftShoulder"],
|
|
54
|
+
RightClavicle: ["RightShoulder"],
|
|
55
|
+
LeftUpperArm: ["LeftShoulder", "LeftElbow"],
|
|
56
|
+
RightUpperArm: ["RightShoulder", "RightElbow"],
|
|
57
|
+
LeftForearm: ["LeftElbow"],
|
|
58
|
+
RightForearm: ["RightElbow"]
|
|
59
|
+
}, d = {
|
|
60
|
+
LeftAnkle: ["LeftFoot", "LeftShank"],
|
|
61
|
+
RightAnkle: ["RightFoot", "RightShank"],
|
|
62
|
+
LeftKnee: ["LeftShank", "LeftThigh"],
|
|
63
|
+
RightKnee: ["RightShank", "RightThigh"],
|
|
64
|
+
LeftHip: ["LeftThigh", "LowerBack"],
|
|
65
|
+
RightHip: ["RightThigh", "LowerBack"],
|
|
66
|
+
NavalSpine: ["LowerBack", "CenterBack"],
|
|
67
|
+
ChestSpine: ["CenterBack", "UpperBack"],
|
|
68
|
+
TotalSpine: ["UpperBack", "LowerBack"],
|
|
69
|
+
LeftShoulder: ["LeftClavicle", "LeftUpperArm"],
|
|
70
|
+
RightShoulder: ["RightClavicle", "RightUpperArm"],
|
|
71
|
+
LeftElbow: ["LeftUpperArm", "LeftForearm"],
|
|
72
|
+
RightElbow: ["RightUpperArm", "RightForearm"],
|
|
73
|
+
Neck: ["Head", "UpperBack"]
|
|
74
|
+
}, k = () => [
|
|
75
|
+
{ id: "LeftFoot", name: i.LeftFoot },
|
|
76
|
+
{ id: "RightFoot", name: i.RightFoot },
|
|
77
|
+
{ id: "LeftShank", name: i.LeftShank },
|
|
78
|
+
{ id: "RightShank", name: i.RightShank },
|
|
79
|
+
{ id: "LeftThigh", name: i.LeftThigh },
|
|
80
|
+
{ id: "RightThigh", name: i.RightThigh },
|
|
81
|
+
// { id: 'LeftPelvis', name: limbNames.LeftPelvis },
|
|
82
|
+
// { id: 'RightPelvis', name: limbNames.RightPelvis },
|
|
83
|
+
{ id: "LowerBack", name: i.LowerBack },
|
|
84
|
+
{ id: "CenterBack", name: i.CenterBack },
|
|
85
|
+
{ id: "UpperBack", name: i.UpperBack },
|
|
86
|
+
{ id: "Head", name: i.Head },
|
|
87
|
+
// { id: 'LeftClavicle', name: limbNames.LeftClavicle },
|
|
88
|
+
// { id: 'RightClavicle', name: limbNames.RightClavicle },
|
|
89
|
+
{ id: "LeftUpperArm", name: i.LeftUpperArm },
|
|
90
|
+
{ id: "RightUpperArm", name: i.RightUpperArm },
|
|
91
|
+
{ id: "LeftForearm", name: i.LeftForearm },
|
|
92
|
+
{ id: "RightForearm", name: i.RightForearm }
|
|
93
|
+
], ee = (t) => k().filter((e) => t.find((a) => a == e.id)), v = () => [
|
|
94
|
+
{ id: "LeftAnkle", name: n.LeftAnkle },
|
|
95
|
+
{ id: "RightAnkle", name: n.RightAnkle },
|
|
96
|
+
{ id: "LeftKnee", name: n.LeftKnee },
|
|
97
|
+
{ id: "RightKnee", name: n.RightKnee },
|
|
98
|
+
{ id: "LeftHip", name: n.LeftHip },
|
|
99
|
+
{ id: "RightHip", name: n.RightHip },
|
|
100
|
+
{ id: "NavalSpine", name: n.NavalSpine },
|
|
101
|
+
{ id: "ChestSpine", name: n.ChestSpine },
|
|
102
|
+
{ id: "TotalSpine", name: n.TotalSpine },
|
|
103
|
+
{ id: "LeftShoulder", name: n.LeftShoulder },
|
|
104
|
+
{ id: "RightShoulder", name: n.RightShoulder },
|
|
105
|
+
{ id: "LeftElbow", name: n.LeftElbow },
|
|
106
|
+
{ id: "RightElbow", name: n.RightElbow },
|
|
107
|
+
{ id: "Neck", name: n.Neck }
|
|
108
|
+
], F = () => [
|
|
109
|
+
{ id: "LeftAnkle", name: n.LeftAnkle },
|
|
110
|
+
{ id: "RightAnkle", name: n.RightAnkle },
|
|
111
|
+
{ id: "LeftKnee", name: n.LeftKnee },
|
|
112
|
+
{ id: "RightKnee", name: n.RightKnee },
|
|
113
|
+
{ id: "LeftHip", name: n.LeftHip },
|
|
114
|
+
{ id: "RightHip", name: n.RightHip },
|
|
115
|
+
{ id: "NavalSpine", name: n.NavalSpine },
|
|
116
|
+
{ id: "ChestSpine", name: n.ChestSpine },
|
|
117
|
+
{ id: "TotalSpine", name: n.TotalSpine },
|
|
118
|
+
{ id: "LeftShoulder", name: n.LeftShoulder },
|
|
119
|
+
{ id: "RightShoulder", name: n.RightShoulder },
|
|
120
|
+
// TODO: Left & Right elbow hidden while validation is being done
|
|
121
|
+
// { id: 'LeftElbow', name: jointNames.LeftElbow },
|
|
122
|
+
// { id: 'RightElbow', name: jointNames.RightElbow },
|
|
123
|
+
{ id: "Neck", name: n.Neck }
|
|
124
|
+
], E = () => [
|
|
125
|
+
{ id: "LeftAnkle", name: n.LeftAnkle },
|
|
126
|
+
{ id: "RightAnkle", name: n.RightAnkle },
|
|
127
|
+
{ id: "LeftKnee", name: n.LeftKnee },
|
|
128
|
+
{ id: "RightKnee", name: n.RightKnee },
|
|
129
|
+
{ id: "LeftHip", name: n.LeftHip },
|
|
130
|
+
{ id: "RightHip", name: n.RightHip },
|
|
131
|
+
{ id: "TotalSpine", name: n.TotalSpine },
|
|
132
|
+
{ id: "LeftShoulder", name: n.LeftShoulder },
|
|
133
|
+
{ id: "RightShoulder", name: n.RightShoulder },
|
|
134
|
+
{ id: "LeftElbow", name: n.LeftElbow },
|
|
135
|
+
{ id: "RightElbow", name: n.RightElbow },
|
|
136
|
+
{ id: "Neck", name: n.Neck }
|
|
137
|
+
], te = () => [
|
|
138
|
+
{ id: "Head", name: i.Head },
|
|
139
|
+
{ id: "LeftThigh", name: i.LeftThigh },
|
|
140
|
+
{ id: "RightThigh", name: i.RightThigh },
|
|
141
|
+
{ id: "LeftShank", name: i.LeftShank },
|
|
142
|
+
{ id: "RightShank", name: i.RightShank },
|
|
143
|
+
{ id: "LeftFoot", name: i.LeftFoot },
|
|
144
|
+
{ id: "RightFoot", name: i.RightFoot },
|
|
145
|
+
{ id: "LowerBack", name: i.LowerBack },
|
|
146
|
+
{ id: "UpperBack", name: i.UpperBack },
|
|
147
|
+
{ id: "LeftUpperArm", name: i.LeftUpperArm },
|
|
148
|
+
{ id: "RightUpperArm", name: i.RightUpperArm },
|
|
149
|
+
{ id: "LeftForearm", name: i.LeftForearm },
|
|
150
|
+
{ id: "RightForearm", name: i.RightForearm }
|
|
151
|
+
], ae = (t) => F().filter((a) => d[a.id].every((s) => t.includes(s))), ne = (t) => E().filter((a) => d[a.id].every((s) => t.includes(s))), T = (t, e, a) => {
|
|
152
|
+
if (a)
|
|
153
|
+
return ["frontal", "sagittal", "transverse"];
|
|
154
|
+
switch (t) {
|
|
155
|
+
case "LeftKnee":
|
|
156
|
+
case "RightKnee":
|
|
157
|
+
return ["sagittal"];
|
|
158
|
+
case "LeftAnkle":
|
|
159
|
+
case "RightAnkle":
|
|
160
|
+
return e && e == c.Pose ? ["sagittal"] : ["frontal", "sagittal"];
|
|
161
|
+
case "TotalSpine":
|
|
162
|
+
return e && e == c.Pose ? ["frontal"] : ["frontal", "sagittal", "transverse"];
|
|
163
|
+
case "LeftElbow":
|
|
164
|
+
case "RightElbow":
|
|
165
|
+
return e && e == c.Pose ? ["sagittal"] : ["frontal", "sagittal", "transverse"];
|
|
166
|
+
}
|
|
167
|
+
return e && e == c.Pose ? ["frontal", "sagittal"] : ["frontal", "sagittal", "transverse"];
|
|
168
|
+
}, P = (t, e) => {
|
|
169
|
+
if (e === c.Sensor)
|
|
170
|
+
return ["frontal", "sagittal", "transverse"];
|
|
171
|
+
switch (t) {
|
|
172
|
+
case "Head":
|
|
173
|
+
case "LeftThigh":
|
|
174
|
+
case "RightThigh":
|
|
175
|
+
case "LeftShank":
|
|
176
|
+
case "RightShank":
|
|
177
|
+
case "LeftUpperArm":
|
|
178
|
+
case "RightUpperArm":
|
|
179
|
+
case "LeftForearm":
|
|
180
|
+
case "RightForearm":
|
|
181
|
+
return ["frontal", "sagittal"];
|
|
182
|
+
case "LeftFoot":
|
|
183
|
+
case "RightFoot":
|
|
184
|
+
return ["sagittal"];
|
|
185
|
+
case "LowerBack":
|
|
186
|
+
return ["frontal"];
|
|
187
|
+
case "UpperBack":
|
|
188
|
+
return ["frontal", "sagittal"];
|
|
189
|
+
}
|
|
190
|
+
return [];
|
|
191
|
+
}, H = l(
|
|
192
|
+
(t, e, a) => {
|
|
193
|
+
switch (t) {
|
|
194
|
+
case "LeftAnkle":
|
|
195
|
+
case "RightAnkle":
|
|
196
|
+
switch (e) {
|
|
197
|
+
case "frontal":
|
|
198
|
+
return a < 0 ? "inversion" : "eversion";
|
|
199
|
+
case "sagittal":
|
|
200
|
+
return a < 0 ? "plantar flexion" : "dorsi flexion";
|
|
201
|
+
case "transverse":
|
|
202
|
+
return a < 0 ? "internal rotation" : "external rotation";
|
|
203
|
+
}
|
|
204
|
+
case "LeftKnee":
|
|
205
|
+
case "RightKnee":
|
|
206
|
+
switch (e) {
|
|
207
|
+
case "frontal":
|
|
208
|
+
return a < 0 ? "adduction" : "abduction";
|
|
209
|
+
case "sagittal":
|
|
210
|
+
return a < 0 ? "extension" : "flexion";
|
|
211
|
+
case "transverse":
|
|
212
|
+
return a < 0 ? "internal rotation" : "external rotation";
|
|
213
|
+
}
|
|
214
|
+
case "LeftHip":
|
|
215
|
+
case "RightHip":
|
|
216
|
+
case "LeftShoulder":
|
|
217
|
+
case "RightShoulder":
|
|
218
|
+
switch (e) {
|
|
219
|
+
case "frontal":
|
|
220
|
+
return a < 0 ? "adduction" : "abduction";
|
|
221
|
+
case "sagittal":
|
|
222
|
+
return a < 0 ? "extension" : "flexion";
|
|
223
|
+
case "transverse":
|
|
224
|
+
return a < 0 ? "internal rotation" : "external rotation";
|
|
225
|
+
}
|
|
226
|
+
case "NavalSpine":
|
|
227
|
+
case "ChestSpine":
|
|
228
|
+
case "TotalSpine":
|
|
229
|
+
case "Neck":
|
|
230
|
+
switch (e) {
|
|
231
|
+
case "frontal":
|
|
232
|
+
return a < 0 ? "right lateral flexion" : "left lateral flexion";
|
|
233
|
+
case "sagittal":
|
|
234
|
+
return a < 0 ? "extension" : "flexion";
|
|
235
|
+
case "transverse":
|
|
236
|
+
return a < 0 ? "right rotation" : "left rotation";
|
|
237
|
+
}
|
|
238
|
+
case "LeftElbow":
|
|
239
|
+
case "RightElbow":
|
|
240
|
+
switch (e) {
|
|
241
|
+
case "frontal":
|
|
242
|
+
return null;
|
|
243
|
+
case "sagittal":
|
|
244
|
+
return a < 0 ? "extension" : "flexion";
|
|
245
|
+
case "transverse":
|
|
246
|
+
return a < 0 ? "pronation" : "supination";
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
return null;
|
|
250
|
+
}
|
|
251
|
+
), N = l(
|
|
252
|
+
(t, e, a) => {
|
|
253
|
+
switch (t) {
|
|
254
|
+
case "LeftAnkle":
|
|
255
|
+
case "RightAnkle":
|
|
256
|
+
switch (e) {
|
|
257
|
+
case "frontal":
|
|
258
|
+
return a < 0 ? "Inv." : "Ev.";
|
|
259
|
+
case "sagittal":
|
|
260
|
+
return a < 0 ? "PF." : "DF.";
|
|
261
|
+
case "transverse":
|
|
262
|
+
return a < 0 ? "IR." : "ER.";
|
|
263
|
+
}
|
|
264
|
+
case "LeftKnee":
|
|
265
|
+
case "RightKnee":
|
|
266
|
+
switch (e) {
|
|
267
|
+
case "frontal":
|
|
268
|
+
return a < 0 ? "Add." : "Abd.";
|
|
269
|
+
case "sagittal":
|
|
270
|
+
return a < 0 ? "Ext." : "Flex.";
|
|
271
|
+
case "transverse":
|
|
272
|
+
return a < 0 ? "IR." : "ER.";
|
|
273
|
+
}
|
|
274
|
+
case "LeftHip":
|
|
275
|
+
case "RightHip":
|
|
276
|
+
case "LeftShoulder":
|
|
277
|
+
case "RightShoulder":
|
|
278
|
+
switch (e) {
|
|
279
|
+
case "frontal":
|
|
280
|
+
return a < 0 ? "Add." : "Abd.";
|
|
281
|
+
case "sagittal":
|
|
282
|
+
return a < 0 ? "Ext." : "Flex.";
|
|
283
|
+
case "transverse":
|
|
284
|
+
return a < 0 ? "IR." : "ER.";
|
|
285
|
+
}
|
|
286
|
+
case "NavalSpine":
|
|
287
|
+
case "ChestSpine":
|
|
288
|
+
case "TotalSpine":
|
|
289
|
+
case "Neck":
|
|
290
|
+
switch (e) {
|
|
291
|
+
case "frontal":
|
|
292
|
+
return a < 0 ? "R. Bend" : "L. Bend";
|
|
293
|
+
case "sagittal":
|
|
294
|
+
return a < 0 ? "Ext." : "Flex.";
|
|
295
|
+
case "transverse":
|
|
296
|
+
return a < 0 ? "R. Rot." : "L. Rot.";
|
|
297
|
+
}
|
|
298
|
+
case "LeftElbow":
|
|
299
|
+
case "RightElbow":
|
|
300
|
+
switch (e) {
|
|
301
|
+
case "frontal":
|
|
302
|
+
return null;
|
|
303
|
+
case "sagittal":
|
|
304
|
+
return a < 0 ? "Ext." : "Flex.";
|
|
305
|
+
case "transverse":
|
|
306
|
+
return a < 0 ? "Pro." : "Sup.";
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
return null;
|
|
310
|
+
}
|
|
311
|
+
), u = l(
|
|
312
|
+
(t, e, a) => {
|
|
313
|
+
switch (t) {
|
|
314
|
+
case "LowerBack":
|
|
315
|
+
case "LeftPelvis":
|
|
316
|
+
case "RightPelvis":
|
|
317
|
+
switch (e) {
|
|
318
|
+
case "frontal":
|
|
319
|
+
return a < 0 ? "right drop" : "left drop";
|
|
320
|
+
case "sagittal":
|
|
321
|
+
return a < 0 ? "anterior tilt" : "posterior tilt";
|
|
322
|
+
case "transverse":
|
|
323
|
+
return a < 0 ? "right rotation" : "left rotation";
|
|
324
|
+
}
|
|
325
|
+
case "Head":
|
|
326
|
+
case "UpperBack":
|
|
327
|
+
case "CenterBack":
|
|
328
|
+
case "LeftShank":
|
|
329
|
+
case "RightShank":
|
|
330
|
+
case "LeftThigh":
|
|
331
|
+
case "RightThigh":
|
|
332
|
+
case "LeftFoot":
|
|
333
|
+
case "RightFoot":
|
|
334
|
+
case "LeftUpperArm":
|
|
335
|
+
case "RightUpperArm":
|
|
336
|
+
case "LeftForearm":
|
|
337
|
+
case "RightForearm":
|
|
338
|
+
switch (e) {
|
|
339
|
+
case "frontal":
|
|
340
|
+
return a < 0 ? "right tilt" : "left tilt";
|
|
341
|
+
case "sagittal":
|
|
342
|
+
return a < 0 ? "anterior tilt" : "posterior tilt";
|
|
343
|
+
case "transverse":
|
|
344
|
+
return a < 0 ? "right rotation" : "left rotation";
|
|
345
|
+
}
|
|
346
|
+
default:
|
|
347
|
+
return null;
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
), B = l(
|
|
351
|
+
(t, e, a) => {
|
|
352
|
+
switch (t) {
|
|
353
|
+
case "LowerBack":
|
|
354
|
+
case "LeftPelvis":
|
|
355
|
+
case "RightPelvis":
|
|
356
|
+
switch (e) {
|
|
357
|
+
case "frontal":
|
|
358
|
+
return a < 0 ? "R. Drop" : "L. Drop";
|
|
359
|
+
case "sagittal":
|
|
360
|
+
return a < 0 ? "Ant. Tilt" : "Pos. Tilt";
|
|
361
|
+
case "transverse":
|
|
362
|
+
return a < 0 ? "R. Rot." : "L. Rot.";
|
|
363
|
+
}
|
|
364
|
+
case "Head":
|
|
365
|
+
case "UpperBack":
|
|
366
|
+
case "CenterBack":
|
|
367
|
+
case "LeftShank":
|
|
368
|
+
case "RightShank":
|
|
369
|
+
case "LeftThigh":
|
|
370
|
+
case "RightThigh":
|
|
371
|
+
case "LeftFoot":
|
|
372
|
+
case "RightFoot":
|
|
373
|
+
case "LeftUpperArm":
|
|
374
|
+
case "RightUpperArm":
|
|
375
|
+
case "LeftForearm":
|
|
376
|
+
case "RightForearm":
|
|
377
|
+
switch (e) {
|
|
378
|
+
case "frontal":
|
|
379
|
+
return a < 0 ? "R. Tilt" : "L. Tilt";
|
|
380
|
+
case "sagittal":
|
|
381
|
+
return a < 0 ? "Ant. Tilt" : "Pos. Tilt";
|
|
382
|
+
case "transverse":
|
|
383
|
+
return a < 0 ? "R. Rot." : "L. Rot.";
|
|
384
|
+
}
|
|
385
|
+
default:
|
|
386
|
+
return null;
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
), ie = l(
|
|
390
|
+
(t, e) => {
|
|
391
|
+
switch (t) {
|
|
392
|
+
case "LeftAnkle":
|
|
393
|
+
case "RightAnkle":
|
|
394
|
+
switch (e) {
|
|
395
|
+
case "frontal":
|
|
396
|
+
return { min: -20, max: 20 };
|
|
397
|
+
case "sagittal":
|
|
398
|
+
return { min: -30, max: 30 };
|
|
399
|
+
case "transverse":
|
|
400
|
+
return { min: -5, max: 5 };
|
|
401
|
+
}
|
|
402
|
+
case "LeftKnee":
|
|
403
|
+
case "RightKnee":
|
|
404
|
+
switch (e) {
|
|
405
|
+
case "frontal":
|
|
406
|
+
return { min: -5, max: 5 };
|
|
407
|
+
case "sagittal":
|
|
408
|
+
return { min: -5, max: 90 };
|
|
409
|
+
case "transverse":
|
|
410
|
+
return { min: -5, max: 5 };
|
|
411
|
+
}
|
|
412
|
+
case "LeftHip":
|
|
413
|
+
case "RightHip":
|
|
414
|
+
return { min: -30, max: 30 };
|
|
415
|
+
case "LeftShoulder":
|
|
416
|
+
case "RightShoulder":
|
|
417
|
+
return { min: -50, max: 50 };
|
|
418
|
+
case "NavalSpine":
|
|
419
|
+
case "ChestSpine":
|
|
420
|
+
case "TotalSpine":
|
|
421
|
+
case "Neck":
|
|
422
|
+
switch (e) {
|
|
423
|
+
case "frontal":
|
|
424
|
+
return { min: -5, max: 5 };
|
|
425
|
+
case "sagittal":
|
|
426
|
+
return { min: -5, max: 5 };
|
|
427
|
+
case "transverse":
|
|
428
|
+
return { min: -5, max: 5 };
|
|
429
|
+
}
|
|
430
|
+
case "LeftElbow":
|
|
431
|
+
case "RightElbow":
|
|
432
|
+
switch (e) {
|
|
433
|
+
case "frontal":
|
|
434
|
+
return { min: -5, max: 5 };
|
|
435
|
+
case "sagittal":
|
|
436
|
+
return { min: -5, max: 50 };
|
|
437
|
+
case "transverse":
|
|
438
|
+
return { min: -5, max: 5 };
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
return { min: -10, max: 10 };
|
|
442
|
+
}
|
|
443
|
+
), se = l(
|
|
444
|
+
(t, e) => {
|
|
445
|
+
switch (t) {
|
|
446
|
+
case "LeftFoot":
|
|
447
|
+
case "RightFoot":
|
|
448
|
+
switch (e) {
|
|
449
|
+
case "frontal":
|
|
450
|
+
return { min: -20, max: 20 };
|
|
451
|
+
case "sagittal":
|
|
452
|
+
return { min: -30, max: 30 };
|
|
453
|
+
case "transverse":
|
|
454
|
+
return { min: -5, max: 5 };
|
|
455
|
+
}
|
|
456
|
+
case "LeftShank":
|
|
457
|
+
case "RightShank":
|
|
458
|
+
switch (e) {
|
|
459
|
+
case "frontal":
|
|
460
|
+
return { min: -35, max: 35 };
|
|
461
|
+
case "sagittal":
|
|
462
|
+
return { min: -35, max: 35 };
|
|
463
|
+
case "transverse":
|
|
464
|
+
return { min: -5, max: 5 };
|
|
465
|
+
}
|
|
466
|
+
case "LeftThigh":
|
|
467
|
+
case "RightThigh":
|
|
468
|
+
switch (e) {
|
|
469
|
+
case "frontal":
|
|
470
|
+
return { min: -35, max: 35 };
|
|
471
|
+
case "sagittal":
|
|
472
|
+
return { min: -35, max: 35 };
|
|
473
|
+
case "transverse":
|
|
474
|
+
return { min: -10, max: 5 };
|
|
475
|
+
}
|
|
476
|
+
case "LeftPelvis":
|
|
477
|
+
case "RightPelvis":
|
|
478
|
+
switch (e) {
|
|
479
|
+
case "frontal":
|
|
480
|
+
return { min: -15, max: 15 };
|
|
481
|
+
case "sagittal":
|
|
482
|
+
return { min: -10, max: 10 };
|
|
483
|
+
case "transverse":
|
|
484
|
+
return { min: -10, max: 10 };
|
|
485
|
+
}
|
|
486
|
+
case "LowerBack":
|
|
487
|
+
case "CenterBack":
|
|
488
|
+
case "UpperBack":
|
|
489
|
+
case "Head":
|
|
490
|
+
return { min: -5, max: 5 };
|
|
491
|
+
case "LeftClavicle":
|
|
492
|
+
case "RightClavicle":
|
|
493
|
+
switch (e) {
|
|
494
|
+
case "frontal":
|
|
495
|
+
return { min: -15, max: 15 };
|
|
496
|
+
case "sagittal":
|
|
497
|
+
return { min: -10, max: 10 };
|
|
498
|
+
case "transverse":
|
|
499
|
+
return { min: -10, max: 10 };
|
|
500
|
+
}
|
|
501
|
+
case "LeftUpperArm":
|
|
502
|
+
case "RightUpperArm":
|
|
503
|
+
case "LeftForearm":
|
|
504
|
+
case "RightForearm":
|
|
505
|
+
switch (e) {
|
|
506
|
+
case "frontal":
|
|
507
|
+
return { min: -45, max: 45 };
|
|
508
|
+
case "sagittal":
|
|
509
|
+
return { min: -45, max: 45 };
|
|
510
|
+
case "transverse":
|
|
511
|
+
return { min: -20, max: 20 };
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
return { min: -10, max: 10 };
|
|
515
|
+
}
|
|
516
|
+
), re = l(
|
|
517
|
+
(t, e) => {
|
|
518
|
+
switch (t) {
|
|
519
|
+
case "LeftAnkle":
|
|
520
|
+
case "RightAnkle":
|
|
521
|
+
switch (e) {
|
|
522
|
+
case "frontal":
|
|
523
|
+
return { min: -40, max: 30 };
|
|
524
|
+
case "sagittal":
|
|
525
|
+
return { min: -80, max: 50 };
|
|
526
|
+
case "transverse":
|
|
527
|
+
return { min: -90, max: 90 };
|
|
528
|
+
}
|
|
529
|
+
case "LeftKnee":
|
|
530
|
+
case "RightKnee":
|
|
531
|
+
switch (e) {
|
|
532
|
+
case "frontal":
|
|
533
|
+
return { min: -15, max: 5 };
|
|
534
|
+
case "sagittal":
|
|
535
|
+
return { min: -10, max: 160 };
|
|
536
|
+
case "transverse":
|
|
537
|
+
return { min: -35, max: 45 };
|
|
538
|
+
}
|
|
539
|
+
case "LeftHip":
|
|
540
|
+
case "RightHip":
|
|
541
|
+
switch (e) {
|
|
542
|
+
case "frontal":
|
|
543
|
+
return { min: -50, max: 60 };
|
|
544
|
+
case "sagittal":
|
|
545
|
+
return { min: -50, max: 150 };
|
|
546
|
+
case "transverse":
|
|
547
|
+
return { min: -60, max: 70 };
|
|
548
|
+
}
|
|
549
|
+
case "TotalSpine":
|
|
550
|
+
switch (e) {
|
|
551
|
+
case "frontal":
|
|
552
|
+
return { min: -60, max: 60 };
|
|
553
|
+
case "sagittal":
|
|
554
|
+
return { min: -50, max: 150 };
|
|
555
|
+
case "transverse":
|
|
556
|
+
return { min: -50, max: 50 };
|
|
557
|
+
}
|
|
558
|
+
case "ChestSpine":
|
|
559
|
+
switch (e) {
|
|
560
|
+
case "frontal":
|
|
561
|
+
return { min: -25, max: 25 };
|
|
562
|
+
case "sagittal":
|
|
563
|
+
return { min: -25, max: 40 };
|
|
564
|
+
case "transverse":
|
|
565
|
+
return { min: -35, max: 35 };
|
|
566
|
+
}
|
|
567
|
+
case "NavalSpine":
|
|
568
|
+
switch (e) {
|
|
569
|
+
case "frontal":
|
|
570
|
+
return { min: -25, max: 25 };
|
|
571
|
+
case "sagittal":
|
|
572
|
+
return { min: -35, max: 60 };
|
|
573
|
+
case "transverse":
|
|
574
|
+
return { min: -15, max: 15 };
|
|
575
|
+
}
|
|
576
|
+
default:
|
|
577
|
+
return { min: -180, max: 180 };
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
), U = (t, e) => ({
|
|
581
|
+
kind: "joint",
|
|
582
|
+
value: t,
|
|
583
|
+
plane: e
|
|
584
|
+
}), K = (t, e) => ({
|
|
585
|
+
kind: "limb",
|
|
586
|
+
value: t,
|
|
587
|
+
plane: e
|
|
588
|
+
}), C = (t, e) => ({
|
|
589
|
+
kind: "acceleration",
|
|
590
|
+
value: t,
|
|
591
|
+
axis: e
|
|
592
|
+
}), j = (t, e) => ({
|
|
593
|
+
kind: "angular_velocity",
|
|
594
|
+
value: t,
|
|
595
|
+
plane: e
|
|
596
|
+
}), J = (t) => S.includes(t), oe = (t) => x.includes(t), y = (t) => typeof t == "object" && t !== null && "id" in t && "name" in t && !!k().find((e) => e.id === t.id), $ = (t) => typeof t == "object" && t !== null && "id" in t && "name" in t && !!v().find((e) => e.id === t.id), ce = (t, e, a = !1) => J(e) ? y(t) ? C(t, e) : D(
|
|
597
|
+
`Can't make acceleration part from joint: ${t} ${e}`
|
|
598
|
+
) : $(t) ? a ? j(t, e) : U(t, e) : K(t, e), le = (t) => t.kind === "acceleration" ? t.axis : t.plane, he = (t) => t?.kind === "acceleration" ? t.axis : null, me = (t) => t?.kind === "acceleration" ? null : t?.plane ?? null, D = (t) => {
|
|
599
|
+
throw new Error(t);
|
|
600
|
+
}, f = (t) => t in n ? n[t] : t in i ? i[t] : "Unknown", ge = (t) => f(t).replace(/Left|Right/g, ""), z = (t) => t in p, _ = (t, e) => {
|
|
601
|
+
if (!z(t))
|
|
602
|
+
return null;
|
|
603
|
+
const a = p[t];
|
|
604
|
+
if (e in a) {
|
|
605
|
+
const { min: r, max: s } = a[e];
|
|
606
|
+
return {
|
|
607
|
+
min: r ?? 0,
|
|
608
|
+
max: s ?? 0
|
|
609
|
+
};
|
|
610
|
+
}
|
|
611
|
+
return null;
|
|
612
|
+
}, fe = (...t) => {
|
|
613
|
+
const e = _(...t);
|
|
614
|
+
return e ? Math.abs(e.max - e.min) : 0;
|
|
615
|
+
}, I = (t, e) => {
|
|
616
|
+
const a = Object.keys(i).find((s) => s === e), r = Object.keys(n).find((s) => s === e);
|
|
617
|
+
return !a && !r ? null : a ? t.limbs[e].sensor_angle ? c.Sensor : c.Pose : t.joints[e].sensor_angle ? c.Sensor : c.Pose;
|
|
618
|
+
}, ue = (t, e, a) => {
|
|
619
|
+
const r = Object.keys(n).find((o) => o === e), s = I(t, e);
|
|
620
|
+
return s ? r ? T(e, s).includes(a) : P(e, s).includes(a) : !1;
|
|
621
|
+
}, Le = (t, e, a) => {
|
|
622
|
+
const r = Object.keys(i).find((o) => o === e), s = Object.keys(n).find((o) => o === e);
|
|
623
|
+
if (!r && !s)
|
|
624
|
+
throw new Error(
|
|
625
|
+
`Unknown partId: ${e} - this invariant should've been enforced by typescript`
|
|
626
|
+
);
|
|
627
|
+
return r ? w(t.limbs[e])?.[a] ?? null : b(
|
|
628
|
+
t.joints[e],
|
|
629
|
+
void 0,
|
|
630
|
+
t.direction
|
|
631
|
+
)?.[a] ?? null;
|
|
632
|
+
}, g = (t = !1) => t ? "Internal/External Rotation" : "External/Internal Rotation", M = (t, e, a = !1) => {
|
|
633
|
+
switch (t) {
|
|
634
|
+
case "LeftAnkle":
|
|
635
|
+
case "RightAnkle":
|
|
636
|
+
switch (e) {
|
|
637
|
+
case "frontal":
|
|
638
|
+
return a ? "Inversion/Eversion" : "Eversion/Inversion";
|
|
639
|
+
case "sagittal":
|
|
640
|
+
return a ? "Plantar/Dorsi Flexion" : "Dorsi/Plantar Flexion";
|
|
641
|
+
case "transverse":
|
|
642
|
+
return g(a);
|
|
643
|
+
}
|
|
644
|
+
case "LeftKnee":
|
|
645
|
+
case "RightKnee":
|
|
646
|
+
switch (e) {
|
|
647
|
+
case "frontal":
|
|
648
|
+
return a ? "Adduction/Abduction" : "Abduction/Adduction";
|
|
649
|
+
case "sagittal":
|
|
650
|
+
return a ? "Extension/Flexion" : "Flexion/Extension";
|
|
651
|
+
case "transverse":
|
|
652
|
+
return g(a);
|
|
653
|
+
}
|
|
654
|
+
case "LeftHip":
|
|
655
|
+
case "RightHip":
|
|
656
|
+
switch (e) {
|
|
657
|
+
case "frontal":
|
|
658
|
+
return a ? "Adduction/Abduction" : "Abduction/Adduction";
|
|
659
|
+
case "sagittal":
|
|
660
|
+
return a ? "Extension/Flexion" : "Flexion/Extension";
|
|
661
|
+
case "transverse":
|
|
662
|
+
return g(a);
|
|
663
|
+
}
|
|
664
|
+
case "NavalSpine":
|
|
665
|
+
case "ChestSpine":
|
|
666
|
+
case "TotalSpine":
|
|
667
|
+
case "Neck":
|
|
668
|
+
switch (e) {
|
|
669
|
+
case "frontal":
|
|
670
|
+
return "Lateral Bend";
|
|
671
|
+
case "sagittal":
|
|
672
|
+
return a ? "Extension/Flexion" : "Flexion/Extension";
|
|
673
|
+
case "transverse":
|
|
674
|
+
return "Rotation";
|
|
675
|
+
}
|
|
676
|
+
case "LeftShoulder":
|
|
677
|
+
case "RightShoulder":
|
|
678
|
+
switch (e) {
|
|
679
|
+
case "frontal":
|
|
680
|
+
return a ? "Adduction/Abduction" : "Abduction/Adduction";
|
|
681
|
+
case "sagittal":
|
|
682
|
+
return a ? "Extension/Flexion" : "Flexion/Extension";
|
|
683
|
+
case "transverse":
|
|
684
|
+
return g(a);
|
|
685
|
+
}
|
|
686
|
+
case "LeftElbow":
|
|
687
|
+
case "RightElbow":
|
|
688
|
+
switch (e) {
|
|
689
|
+
case "frontal":
|
|
690
|
+
return a ? "Adduction/Abduction" : "Abduction/Adduction";
|
|
691
|
+
case "sagittal":
|
|
692
|
+
return a ? "Extension/Flexion" : "Flexion/Extension";
|
|
693
|
+
case "transverse":
|
|
694
|
+
return a ? "Pronation/Supination" : "Supination/Pronation";
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
}, O = (t, e, a = !1) => {
|
|
698
|
+
const r = f(t), s = u(t, e, 1), o = u(t, e, -1);
|
|
699
|
+
if (s && o) {
|
|
700
|
+
const h = L(s), m = L(o), A = a ? `${m}/${h}` : `${h}/${m}`;
|
|
701
|
+
return `${r} (${A})`;
|
|
702
|
+
}
|
|
703
|
+
return `${r} (${e})`;
|
|
704
|
+
}, Re = (t, e) => {
|
|
705
|
+
let a;
|
|
706
|
+
switch (e) {
|
|
707
|
+
case "x":
|
|
708
|
+
a = "Med./Lat.";
|
|
709
|
+
break;
|
|
710
|
+
case "y":
|
|
711
|
+
a = "Vertical";
|
|
712
|
+
break;
|
|
713
|
+
case "z":
|
|
714
|
+
a = "Ant./Post.";
|
|
715
|
+
}
|
|
716
|
+
return `${f(t)} ${a}`;
|
|
717
|
+
}, V = (t, e, a = !1) => {
|
|
718
|
+
const r = f(t), s = M(t, e, a);
|
|
719
|
+
return s ? `${r} (${s})` : null;
|
|
720
|
+
}, pe = (t, e) => V(t, e) || O(t, e), R = (t, e, a, r = !1) => {
|
|
721
|
+
const s = r ? N : H, o = r ? B : u, [h, m] = t === "joint" ? [
|
|
722
|
+
s(e, a, 1),
|
|
723
|
+
s(e, a, -1)
|
|
724
|
+
] : [
|
|
725
|
+
o(e, a, 1),
|
|
726
|
+
o(e, a, -1)
|
|
727
|
+
];
|
|
728
|
+
return {
|
|
729
|
+
positive: h,
|
|
730
|
+
negative: m
|
|
731
|
+
};
|
|
732
|
+
}, W = (t, e = !1) => t.partKind === "joint" ? R(
|
|
733
|
+
"joint",
|
|
734
|
+
t.partId,
|
|
735
|
+
t.partDimension,
|
|
736
|
+
e
|
|
737
|
+
) : R(
|
|
738
|
+
"segment",
|
|
739
|
+
t.partId,
|
|
740
|
+
t.partDimension,
|
|
741
|
+
e
|
|
742
|
+
), de = (t, e, a = !1) => {
|
|
743
|
+
const { positive: r, negative: s } = W(
|
|
744
|
+
e,
|
|
745
|
+
a
|
|
746
|
+
);
|
|
747
|
+
return t >= 0 ? r : s;
|
|
748
|
+
};
|
|
749
|
+
export {
|
|
750
|
+
j as A,
|
|
751
|
+
J as B,
|
|
752
|
+
oe as C,
|
|
753
|
+
y as D,
|
|
754
|
+
$ as E,
|
|
755
|
+
ce as F,
|
|
756
|
+
le as G,
|
|
757
|
+
he as H,
|
|
758
|
+
me as I,
|
|
759
|
+
f as J,
|
|
760
|
+
ge as K,
|
|
761
|
+
_ as L,
|
|
762
|
+
fe as M,
|
|
763
|
+
I as N,
|
|
764
|
+
ue as O,
|
|
765
|
+
Le as P,
|
|
766
|
+
M as Q,
|
|
767
|
+
Re as R,
|
|
768
|
+
pe as S,
|
|
769
|
+
R as T,
|
|
770
|
+
W as U,
|
|
771
|
+
de as V,
|
|
772
|
+
V as a,
|
|
773
|
+
H as b,
|
|
774
|
+
u as c,
|
|
775
|
+
re as d,
|
|
776
|
+
v as e,
|
|
777
|
+
k as f,
|
|
778
|
+
O as g,
|
|
779
|
+
T as h,
|
|
780
|
+
ie as i,
|
|
781
|
+
P as j,
|
|
782
|
+
se as k,
|
|
783
|
+
d as l,
|
|
784
|
+
i as m,
|
|
785
|
+
n,
|
|
786
|
+
Z as o,
|
|
787
|
+
ee as p,
|
|
788
|
+
F as q,
|
|
789
|
+
E as r,
|
|
790
|
+
te as s,
|
|
791
|
+
ae as t,
|
|
792
|
+
ne as u,
|
|
793
|
+
N as v,
|
|
794
|
+
B as w,
|
|
795
|
+
U as x,
|
|
796
|
+
K as y,
|
|
797
|
+
C as z
|
|
798
|
+
};
|