@nebula-spatial/viewer 0.5.3 → 0.5.4

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.
@@ -1,844 +0,0 @@
1
- var Ge = Object.defineProperty;
2
- var Re = (s, e, o) => e in s ? Ge(s, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : s[e] = o;
3
- var $ = (s, e, o) => Re(s, typeof e != "symbol" ? e + "" : e, o);
4
- import { b as X, S as Z } from "./stage-C7B1_qJ0.js";
5
- import { U as fe, a as Ue, b as Ce, i as Pe, c as Le, d as Te } from "./index-DmGuwbBM.js";
6
- import { LineBasicMaterial as De, WireframeGeometry as Fe, LineSegments as Ne, EdgesGeometry as Q, Vector3 as me, Color as Ie, LinearSRGBColorSpace as $e, SRGBColorSpace as we, MeshPhysicalMaterial as Be, Float32BufferAttribute as H, DataTexture as ze, RGBAFormat as ke, UnsignedByteType as xe, NoColorSpace as qe, RepeatWrapping as Ve, LinearFilter as Je, LinearMipmapLinearFilter as He, BufferGeometry as re, Group as de, Mesh as pe, PlaneGeometry as je, BoxGeometry as Se, SphereGeometry as ee, Matrix4 as We, CylinderGeometry as Me, CapsuleGeometry as ve, BufferAttribute as te } from "three";
7
- function he(s, e, o) {
8
- if (e.throwIfAborted(), s instanceof Error && (s.name === "AbortError" || ["E_ABORTED", "E_SUPERSEDED"].includes(String(s.code)))) throw s;
9
- const t = s && typeof s == "object" && "code" in s && typeof s.code == "string" ? s.code : "E_PHYSICS_INITIALIZE", r = s instanceof Error ? s.message : String(s);
10
- return { code: t, source: o, message: `无法启用物理仿真(${o}):${r}` };
11
- }
12
- class _e {
13
- constructor(e, o) {
14
- $(this, "root");
15
- $(this, "bodies", /* @__PURE__ */ new Map());
16
- $(this, "links", /* @__PURE__ */ new Map());
17
- $(this, "disposed", !1);
18
- this.runtime = e, this.root = o.root;
19
- const t = e.mujoco, r = e.model;
20
- for (const [l, n] of o.bindings) {
21
- const u = t.mj_name2id(r, t.mjtObj.mjOBJ_BODY.value, l);
22
- if (u < 0) throw ge(`Physics body missing for visual link: ${l}`, "E_SIMULATION_BIND");
23
- this.links.set(l, n), n.userData.bodyId = u, this.bodies.set(u, n);
24
- }
25
- if (this.bodies.size !== o.expectedLinkCount) throw ge("Visual body binding count mismatch.", "E_SIMULATION_BIND");
26
- this.sync();
27
- }
28
- objectForLink(e) {
29
- return this.links.get(e) ?? null;
30
- }
31
- bodyPoses() {
32
- return new Map([...this.bodies.values()].map((e) => [e.name, { position: e.position.clone(), quaternion: e.quaternion.clone() }]));
33
- }
34
- sync() {
35
- if (this.disposed || !this.runtime.data) return;
36
- const { xpos: e, xquat: o } = this.runtime.data;
37
- for (const [t, r] of this.bodies) {
38
- const l = t * 3, n = t * 4;
39
- r.position.set(e[l], e[l + 1], e[l + 2]), r.quaternion.set(o[n + 1], o[n + 2], o[n + 3], o[n]);
40
- }
41
- this.root.updateMatrixWorld(!0);
42
- }
43
- dispose() {
44
- this.disposed || (this.disposed = !0, this.bodies.clear(), this.links.clear(), X(this.root));
45
- }
46
- }
47
- function ge(s, e) {
48
- return Object.assign(new Error(s), { code: e });
49
- }
50
- class Xe {
51
- constructor(e) {
52
- $(this, "entries", /* @__PURE__ */ new Map());
53
- $(this, "objectUrls", /* @__PURE__ */ new Map());
54
- /**
55
- * Reads that already failed, so a missing resource is not requested again by
56
- * the visual adapter after the reference prefetch has recorded it.
57
- */
58
- $(this, "failures", /* @__PURE__ */ new Map());
59
- this.source = e;
60
- const o = e.original;
61
- if (Ke(o))
62
- for (const t of o.files) this.entries.set(L(t.path), t.file);
63
- else typeof Blob < "u" && o instanceof Blob ? this.entries.set(e.entryPath ?? e.filename ?? "asset", o) : o instanceof ArrayBuffer ? this.entries.set(e.entryPath ?? e.filename ?? "asset", new Blob([o])) : typeof o == "object" && o !== null && "kind" in o && o.kind === "buffer" && this.entries.set(e.entryPath ?? e.filename ?? "asset", new Blob([o.buffer]));
64
- }
65
- paths() {
66
- return [...this.entries.keys()];
67
- }
68
- hasLocalFiles() {
69
- return this.entries.size > 0;
70
- }
71
- put(e, o) {
72
- this.entries.set(L(e), o);
73
- }
74
- asSourceRecord(e = "", o = !1) {
75
- const t = L(e), r = t ? `${t}/` : "", l = {};
76
- for (const [n, u] of this.entries)
77
- if (!r || n.startsWith(r)) l[r ? n.slice(r.length) : n] = u;
78
- else if (o) {
79
- const i = t.split("/"), a = n.split("/");
80
- let f = 0;
81
- for (; f < i.length && i[f] === a[f]; ) f++;
82
- l[[...i.slice(f).map(() => ".."), ...a.slice(f)].join("/")] = u;
83
- }
84
- return l;
85
- }
86
- resolve(e, o = "") {
87
- const t = this.find(e, o);
88
- if (t) return t;
89
- const r = L(o).split("/").slice(0, -1).join("/");
90
- if (this.source.url) return L(`${r}/${e.replace(/^package:\/\//, "")}`);
91
- throw B(`Simulation resource not found: ${e}`, "E_ASSET_RESOURCE_NOT_FOUND");
92
- }
93
- find(e, o = "") {
94
- const t = L(e.replace(/^package:\/\//, ""));
95
- if (W(t)) return this.entries.has(t) ? t : null;
96
- const r = L(o).split("/").slice(0, -1).join("/");
97
- for (const n of [L(`${r}/${e.replace(/^package:\/\//, "")}`), t])
98
- if (this.entries.has(n)) return n;
99
- const l = this.paths().filter(
100
- (n) => !W(n) && (n === t || n.endsWith(`/${t}`) || t.endsWith(`/${n}`))
101
- );
102
- return l.length === 1 ? l[0] : null;
103
- }
104
- async text(e) {
105
- await this.ensure(e);
106
- const o = this.entries.get(this.resolve(e));
107
- if (!o) throw B(`Simulation resource not found: ${e}`, "E_ASSET_RESOURCE_NOT_FOUND");
108
- return o.text();
109
- }
110
- async bytes(e) {
111
- await this.ensure(e);
112
- const o = this.entries.get(this.resolve(e));
113
- if (!o) throw B(`Simulation resource not found: ${e}`, "E_ASSET_RESOURCE_NOT_FOUND");
114
- return new Uint8Array(await o.arrayBuffer());
115
- }
116
- getBlob(e) {
117
- const o = this.resolve(e), t = this.entries.get(o);
118
- if (!t) throw B(`Simulation resource not found: ${e}`, "E_ASSET_RESOURCE_NOT_FOUND");
119
- return t;
120
- }
121
- async ensure(e) {
122
- const o = L(e);
123
- if (this.entries.has(o)) return;
124
- const t = this.failures.get(o);
125
- if (t) throw t;
126
- try {
127
- const r = await this.source.resolve(o);
128
- if (!/^https?:\/\//i.test(r) && !/^blob:/i.test(r))
129
- throw B(`Simulation resource not found: ${e}. Upload the complete asset folder or provide a resourceResolver/baseUrl.`, fe);
130
- const l = await fetch(r, { signal: this.source.signal });
131
- if (!l.ok) {
132
- const i = l.status === 401 || l.status === 403 ? Ue : l.status === 404 || l.status === 410 ? fe : Ce;
133
- throw B(`Simulation resource request failed (${l.status}): ${r}`, i);
134
- }
135
- const n = await l.blob();
136
- this.source.signal.throwIfAborted();
137
- const u = await Pe(n);
138
- if (u) throw B(`Simulation resource is not usable (${u}): ${r}`, Le);
139
- this.entries.set(o, n);
140
- } catch (r) {
141
- throw Te(r) === "aborted" || this.failures.set(o, r instanceof Error ? r : new Error(String(r))), r;
142
- }
143
- }
144
- /** The recorded failure for a resource, if a previous read already failed. */
145
- failureOf(e) {
146
- return this.failures.get(L(e));
147
- }
148
- objectUrl(e) {
149
- const o = this.resolve(e);
150
- let t = this.objectUrls.get(o);
151
- return t || (t = URL.createObjectURL(this.getBlob(o)), this.objectUrls.set(o, t)), t;
152
- }
153
- objectUrlIfPresent(e, o = "") {
154
- if (W(e)) return this.entries.has(e) ? this.objectUrl(e) : null;
155
- const t = L(o), r = t ? `${t}/` : "", l = L(e), n = r ? this.paths().filter((i) => {
156
- if (!i.startsWith(r)) return !1;
157
- const a = i.slice(r.length);
158
- return a === l || l.endsWith(`/${a}`);
159
- }) : [], u = n.length === 1 ? n[0] : this.find(e);
160
- return u ? this.objectUrl(u) : null;
161
- }
162
- dispose() {
163
- for (const e of this.objectUrls.values()) URL.revokeObjectURL(e);
164
- this.objectUrls.clear(), this.entries.clear(), this.failures.clear();
165
- }
166
- }
167
- async function Ye(s, e) {
168
- if (e.hasLocalFiles()) return e.text(s.entryPath ?? s.filename ?? e.paths()[0]);
169
- const o = await fetch(s.url ?? await s.resolve(s.entryPath ?? ""), { signal: s.signal });
170
- if (!o.ok) throw B(`Simulation asset request failed: ${o.status}`, "E_ASSET_FETCH");
171
- return o.text();
172
- }
173
- function Lt(s) {
174
- return L(s);
175
- }
176
- function L(s) {
177
- if (W(s)) return s;
178
- const e = [];
179
- for (const o of s.replaceAll("\\", "/").split("/"))
180
- !o || o === "." || (o === ".." && e.length && e.at(-1) !== ".." ? e.pop() : e.push(o));
181
- return e.join("/");
182
- }
183
- function W(s) {
184
- return /^[a-z][a-z\d+.-]*:/i.test(s) && !/^package:\/\//i.test(s);
185
- }
186
- function Ke(s) {
187
- return typeof s == "object" && s !== null && "kind" in s && s.kind === "files";
188
- }
189
- function B(s, e) {
190
- return Object.assign(new Error(s), { code: e });
191
- }
192
- function Ze() {
193
- return { errors: [], warnings: [], approximations: [], droppedFeatures: [] };
194
- }
195
- function Qe(s, e = {}) {
196
- const o = Object.freeze({ schemaVersion: 1, ...s });
197
- return et(o, e), o;
198
- }
199
- function et(s, e = {}) {
200
- if (!s.id.trim() || !s.name.trim()) throw V("Asset IR id and name are required.", "E_ASSET_IR_INVALID");
201
- if (s.source.format !== "usd" && s.links.length === 0) throw V("Asset IR requires at least one link.", "E_ASSET_IR_INVALID");
202
- const o = /* @__PURE__ */ new Set();
203
- for (const r of s.links) {
204
- if (!r.id || o.has(r.id)) throw V(`Invalid or duplicate link: ${r.id}`, "E_ASSET_IR_INVALID");
205
- o.add(r.id);
206
- }
207
- const t = /* @__PURE__ */ new Set();
208
- for (const r of s.joints) {
209
- if (!r.id || t.has(r.id) || !e.allowInvalidGraph && (!o.has(r.parent) || !o.has(r.child)))
210
- throw V(`Invalid joint: ${r.id}`, "E_ASSET_IR_INVALID");
211
- t.add(r.id);
212
- }
213
- }
214
- function V(s, e) {
215
- return Object.assign(new Error(s), { code: e });
216
- }
217
- async function tt(s, e, o) {
218
- var i;
219
- const t = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Set(), l = /* @__PURE__ */ new Set(), n = async (a, f) => {
220
- if (l.has(a)) throw se(`MJCF include cycle: ${a}`, "E_MJCF_INCLUDE_CYCLE");
221
- l.add(a);
222
- const b = it(f, a);
223
- t.set(a, b);
224
- for (const S of b.querySelectorAll("worldbody body[name]")) r.add(S.getAttribute("name"));
225
- for (const S of b.querySelectorAll("include[file]")) {
226
- const E = o.resolve(S.getAttribute("file"), a);
227
- await n(E, await o.text(E));
228
- }
229
- l.delete(a);
230
- };
231
- await n(e, s);
232
- const u = (i = t.get(e)) == null ? void 0 : i.querySelector("mujoco");
233
- if (!u || r.size === 0) throw se("MJCF requires a mujoco root and at least one named body.", "E_MJCF_PARSE");
234
- return Qe({
235
- id: u.getAttribute("model") || e,
236
- name: u.getAttribute("model") || e,
237
- source: { format: "mjcf", uri: e },
238
- links: [...r].map((a) => ({ id: a, name: a, visuals: [], collisions: [] })),
239
- joints: [],
240
- diagnostics: Ze(),
241
- extension: { files: o, xml: s, documents: t }
242
- });
243
- }
244
- async function st(s) {
245
- const e = s.extension.files, o = s.source.uri, t = o.split("/").slice(0, -1).join("/"), r = /* @__PURE__ */ new Map(), l = s.extension.documents;
246
- for (const [i, a] of l) {
247
- const f = a.querySelector("compiler");
248
- for (const b of a.querySelectorAll("asset [file]")) {
249
- const S = (f == null ? void 0 : f.getAttribute(b.tagName === "texture" ? "texturedir" : "meshdir")) ?? (f == null ? void 0 : f.getAttribute("assetdir")) ?? "", E = e.resolve(`${S}/${b.getAttribute("file")}`, i);
250
- await e.bytes(E);
251
- }
252
- }
253
- for (const i of nt(e.paths(), l)) {
254
- if (i === o) continue;
255
- const a = t && i.startsWith(`${t}/`) ? i.slice(t.length + 1) : i;
256
- r.set(a, await e.bytes(i));
257
- }
258
- const n = s.extension.xml;
259
- return { format: "mjcf", xml: ot(l) ? rt(n) : n, files: r };
260
- }
261
- function ot(s) {
262
- return s.size === 0 || ![...s.values()].some((o) => o.querySelector("freejoint, actuator") ? !0 : [...o.querySelectorAll("joint")].some(
263
- (t) => (t.getAttribute("type") ?? "hinge").toLowerCase() !== "fixed"
264
- )) ? !1 : ![...s.values()].some(
265
- (o) => [...o.querySelectorAll("worldbody geom")].some((t) => {
266
- var r;
267
- return ((r = t.getAttribute("type")) == null ? void 0 : r.toLowerCase()) === "plane";
268
- })
269
- );
270
- }
271
- function rt(s) {
272
- const e = '<geom name="__viewer_default_ground__" type="plane" size="5 5 0.1" contype="1" conaffinity="1" friction="0.8 0.01 0.0002"/>';
273
- return /<worldbody\b[^>]*>/i.test(s) ? s.replace(/(<worldbody\b[^>]*>)/i, `$1${e}`) : s.replace(/<\/mujoco\s*>/i, `<worldbody>${e}</worldbody></mujoco>`);
274
- }
275
- function nt(s, e) {
276
- const o = (u) => u.replaceAll("\\", "/").split("/").pop() ?? "", t = /* @__PURE__ */ new Map();
277
- for (const u of s) {
278
- const i = o(u), a = t.get(i) ?? [];
279
- a.push(u), t.set(i, a);
280
- }
281
- const r = new Set(e.keys()), l = /* @__PURE__ */ new Set(["include", "mesh", "texture", "hfield", "skin"]), n = /* @__PURE__ */ new Set(["fileleft", "fileright", "fileup", "filedown", "filefront", "fileback"]);
282
- for (const u of e.values()) {
283
- if (u.querySelector("plugin, extension, model, attach")) return s;
284
- for (const i of u.querySelectorAll("*"))
285
- for (const a of i.attributes) {
286
- if (!a.name.startsWith("file")) continue;
287
- if (a.name === "file") {
288
- if (!l.has(i.tagName)) return s;
289
- } else if (!(i.tagName === "texture" && n.has(a.name)))
290
- return s;
291
- if (!a.value) continue;
292
- const f = t.get(o(a.value));
293
- if (!f) return s;
294
- for (const b of f) r.add(b);
295
- }
296
- }
297
- return s.filter((u) => r.has(u));
298
- }
299
- function it(s, e) {
300
- const o = new DOMParser().parseFromString(s, "application/xml"), t = o.querySelector("parsererror");
301
- if (t) throw se(`MJCF XML parse failed (${e}): ${t.textContent ?? ""}`, "E_MJCF_PARSE");
302
- return o;
303
- }
304
- function se(s, e) {
305
- return Object.assign(new Error(s), { code: e });
306
- }
307
- const at = 1476466, lt = 0.72, ut = 20, ct = 1;
308
- function ft() {
309
- return new De({
310
- color: at,
311
- transparent: !0,
312
- opacity: lt,
313
- depthTest: !1
314
- });
315
- }
316
- function mt(s, e, o = "feature") {
317
- const t = o === "mesh" ? new Fe(s) : dt(s), r = new Ne(t, e);
318
- return r.renderOrder = 9, r;
319
- }
320
- function dt(s) {
321
- let e = new Q(s, ut);
322
- return ye(s, e) || (e.dispose(), e = new Q(s, ct)), ye(s, e) || (e.dispose(), e = new Q(s, 0)), e;
323
- }
324
- const pt = 256, ht = 0.5;
325
- function ye(s, e) {
326
- var u, i;
327
- const o = e.getAttribute("position");
328
- if (!o || o.count === 0) return !1;
329
- const t = s.getAttribute("position");
330
- if (!t || t.count < pt) return !0;
331
- s.computeBoundingBox(), e.computeBoundingBox();
332
- const r = (u = s.boundingBox) == null ? void 0 : u.getSize(new me()), l = (i = e.boundingBox) == null ? void 0 : i.getSize(new me());
333
- if (!r || !l) return !1;
334
- const n = r.length();
335
- return !Number.isFinite(n) || n <= 0 ? !0 : l.length() / n >= ht;
336
- }
337
- const Y = 0.5, k = (s, e) => Number.isFinite(s) ? Math.min(1, Math.max(0, s)) : e;
338
- function be(s, e) {
339
- return s !== void 0 && Number.isFinite(s) && s >= 0 ? k(s, Y) : e !== void 0 && Number.isFinite(e) && e >= 0 ? 1 - k(e, 0.5) : Y;
340
- }
341
- function _t(s = {}) {
342
- const e = s.color ?? [0.68, 0.72, 0.7, 1], o = new Ie().setRGB(e[0], e[1], e[2], s.colorSpace === "linear" ? $e : we), t = k(e[3] ?? 1, 1), r = k(s.specular ?? 0.5, 0.5), l = Math.sqrt(0.08 * r);
343
- return new Be({
344
- color: o,
345
- opacity: t,
346
- transparent: t < 1,
347
- depthWrite: t === 1,
348
- roughness: k(s.roughness ?? Y, Y),
349
- metalness: k(s.metalness ?? 0, 0),
350
- // Legacy specular 0.5 corresponds to the standard dielectric response.
351
- specularIntensity: r <= 0.5 ? r * 2 : 1,
352
- ior: r <= 0.5 ? 1.5 : (1 + l) / (1 - l),
353
- emissive: o.clone().multiplyScalar(Math.max(0, s.emission ?? 0)),
354
- map: s.map ?? null
355
- });
356
- }
357
- function gt(s, e) {
358
- var S, E;
359
- const o = [], t = [], r = [], l = s.mesh_vertadr[e], n = s.mesh_faceadr[e], u = s.mesh_normaladr[e], i = s.mesh_texcoordadr[e];
360
- let a = u >= 0, f = i >= 0;
361
- for (let h = 0; h < s.mesh_facenum[e]; h++) for (let w = 0; w < 3; w++) {
362
- const d = (n + h) * 3 + w, _ = (l + s.mesh_face[d]) * 3;
363
- o.push(...s.mesh_vert.slice(_, _ + 3));
364
- const y = ((S = s.mesh_facenormal) == null ? void 0 : S[d]) ?? -1;
365
- u >= 0 && y >= 0 ? t.push(...s.mesh_normal.slice((u + y) * 3, (u + y) * 3 + 3)) : a = !1;
366
- const j = ((E = s.mesh_facetexcoord) == null ? void 0 : E[d]) ?? -1;
367
- i >= 0 && j >= 0 ? r.push(...s.mesh_texcoord.slice((i + j) * 2, (i + j) * 2 + 2)) : f = !1;
368
- }
369
- const b = new re();
370
- return b.setAttribute("position", new H(o, 3)), a && t.length === o.length ? b.setAttribute("normal", new H(t, 3)) : b.computeVertexNormals(), f && r.length === o.length / 3 * 2 && b.setAttribute("uv", new H(r, 2)), b;
371
- }
372
- function yt(s) {
373
- const e = /* @__PURE__ */ new Map();
374
- if (!s.model.ntex) return e;
375
- const o = s.mujoco, t = s.model, r = new o.MjvScene(t, Math.max(1e3, t.ngeom * 2)), l = new o.MjvOption(), n = new o.MjvPerturb(), u = new o.MjvCamera();
376
- try {
377
- l.geomgroup.fill(1), o.mjv_updateScene(t, s.data, l, n, u, o.mjtCatBit.mjCAT_ALL.value, r);
378
- for (let i = 0; i < r.ngeom; i++) {
379
- const a = r.geoms.get(i);
380
- try {
381
- a.objtype === o.mjtObj.mjOBJ_GEOM.value && e.set(a.objid, a.texuniform !== 0);
382
- } finally {
383
- a.delete();
384
- }
385
- }
386
- return e;
387
- } finally {
388
- r.delete(), l.delete(), n.delete(), u.delete();
389
- }
390
- }
391
- function bt(s, e, o, t, r, l = /* @__PURE__ */ new Map()) {
392
- var w;
393
- const n = s.model, u = s.mujoco, i = n.geom_matid[e];
394
- if (i < 0) return;
395
- const a = (d, _) => {
396
- r != null && r.droppedFeatures.some((y) => y.code === d && y.source === `material:${i}`) || r == null || r.droppedFeatures.push({ code: d, message: _, source: `material:${i}` });
397
- };
398
- n.mat_reflectance[i] > 0 && a("MJCF_REFLECTANCE_UNSUPPORTED", "Legacy planar reflection is not reproduced by the PBR material.");
399
- const f = u.mjtTextureRole.mjNTEXROLE.value;
400
- if (!Array.from(n.mat_texid.slice(i * f, (i + 1) * f)).some((d) => Number(d) >= 0)) return;
401
- const E = !(n.geom_type[e] === u.mjtGeom.mjGEOM_MESH.value) || !o.getAttribute("uv"), h = l.get(e);
402
- if (h === void 0) throw new Error(`Missing compiled texture projection for geom ${e}`);
403
- if (E) {
404
- const d = o.getAttribute("position"), _ = [], y = n.geom_size[e * 3] || 1, j = n.geom_size[e * 3 + 1] || y;
405
- for (let O = 0; O < d.count; O++) _.push(d.getX(O) / (2 * (h ? 1 : y)), -d.getY(O) / (2 * (h ? 1 : j)));
406
- o.setAttribute("uv", new H(_, 2));
407
- }
408
- for (let d = 0; d < f; d++) {
409
- const _ = n.mat_texid[i * f + d];
410
- if (_ < 0) continue;
411
- if (n.tex_type[_] !== u.mjtTexture.mjTEXTURE_2D.value) {
412
- a("MJCF_TEXTURE_PROJECTION_UNSUPPORTED", "Cube/skybox surface textures require a dedicated projection and are not substituted with a 2D map.");
413
- continue;
414
- }
415
- if (d === 0) {
416
- a("MJCF_USER_TEXTURE_UNSUPPORTED", "User texture role has no defined PBR material slot.");
417
- continue;
418
- }
419
- const y = n.tex_width[_], j = n.tex_height[_], O = n.tex_nchannel[_];
420
- if (![1, 2, 3, 4].includes(O)) {
421
- a("MJCF_TEXTURE_CHANNELS_UNSUPPORTED", "Unsupported texture channel count.");
422
- continue;
423
- }
424
- const v = Number(n.tex_adr[_]), c = new Uint8Array(y * j * 4);
425
- for (let G = 0; G < y * j; G++) {
426
- const C = v + G * O, P = G * 4, D = n.tex_data[C];
427
- c[P] = D, c[P + 1] = O >= 3 ? n.tex_data[C + 1] : D, c[P + 2] = O >= 3 ? n.tex_data[C + 2] : D, c[P + 3] = O === 4 ? n.tex_data[C + 3] : O === 2 ? n.tex_data[C + 1] : 255, [2, 3, 4, 6].includes(d) && (c[P] = c[P + 1] = c[P + 2] = D);
428
- }
429
- const m = new ze(c, y, j, ke, xe);
430
- m.colorSpace = [1, 7, 8].includes(d) && n.tex_colorspace[_] === u.mjtColorSpace.mjCOLORSPACE_SRGB.value ? we : qe, m.wrapS = m.wrapT = Ve, m.magFilter = Je, m.minFilter = He, m.generateMipmaps = !0;
431
- const A = n.mat_texrepeat[i * 2], R = n.mat_texrepeat[i * 2 + 1];
432
- if (m.repeat.set(A, R), E ? m.offset.set(-0.5, -0.5) : h && m.repeat.set(A * (n.geom_size[e * 3] || 1), R * (n.geom_size[e * 3 + 1] || 1)), m.needsUpdate = !0, d === 1 || d === 8)
433
- (w = t.map) == null || w.dispose(), t.map = m, d === 8 && (t.transparent = !0, t.depthWrite = !1);
434
- else if (d === 2) t.aoMap = m;
435
- else if (d === 3)
436
- t.roughnessMap = m, t.roughness = n.mat_roughness[i] >= 0 ? t.roughness : 1;
437
- else if (d === 4)
438
- t.metalnessMap = m, t.metalness = n.mat_metallic[i] >= 0 ? t.metalness : 1;
439
- else if (d === 5) t.normalMap = m;
440
- else if (d === 6)
441
- t.alphaMap = m, t.transparent = !0, t.depthWrite = !1;
442
- else if (d === 7)
443
- t.emissiveMap = m, t.emissive.setRGB(1, 1, 1), O === 4 && a("MJCF_EMISSIVE_EXPOSURE_UNSUPPORTED", "Emissive RGB is preserved; per-pixel exposure weight is not supported.");
444
- else if (d === 9) {
445
- for (const G of /* @__PURE__ */ new Set([t.aoMap, t.roughnessMap, t.metalnessMap])) G == null || G.dispose();
446
- t.aoMap = t.roughnessMap = t.metalnessMap = m, t.roughness = n.mat_roughness[i] >= 0 ? t.roughness : 1, t.metalness = n.mat_metallic[i] >= 0 ? t.metalness : 1;
447
- }
448
- }
449
- }
450
- function Et(s, e) {
451
- return e < 0 ? be() : be(s.mat_roughness[e], s.mat_shininess[e]);
452
- }
453
- function wt(s, e) {
454
- if (e < 0) return 0;
455
- const o = s.mat_metallic[e];
456
- return Number.isFinite(o) && o >= 0 ? o : 0;
457
- }
458
- function Ee(s, e = !1, o) {
459
- const t = s.model, r = s.mujoco, l = new de();
460
- l.name = "MuJoCo scene";
461
- const n = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Map();
462
- for (let i = 1; i < t.nbody; i += 1) {
463
- const a = r.mj_id2name(t, r.mjtObj.mjOBJ_BODY.value, i);
464
- if (!a) continue;
465
- const f = new de();
466
- f.name = a, f.userData.bodyId = i, n.set(i, f), u.set(a, f), l.add(f);
467
- }
468
- try {
469
- if (n.set(0, l), e) {
470
- const i = ft();
471
- let a = 0;
472
- for (let f = 0; f < t.ngeom; f += 1) {
473
- const b = r.mj_id2name(t, r.mjtObj.mjOBJ_GEOM.value, f);
474
- if (b === "__viewer_default_ground__" || !Mt(t, f)) continue;
475
- const S = n.get(t.geom_bodyid[f]), E = jt(s, f);
476
- if (!S) continue;
477
- if (!E) {
478
- o == null || o.droppedFeatures.push({
479
- code: "E_MJCF_COLLISION_DEBUG_GEOMETRY_UNAVAILABLE",
480
- message: `MJCF geom ${b ?? `#${f}`} 的 compiled type=${t.geom_type[f]} 无法准确还原为碰撞线框。`,
481
- source: "mjcf-collision-debug"
482
- });
483
- continue;
484
- }
485
- const h = St(s, f) ? "mesh" : "feature", w = mt(E, i, h);
486
- E.dispose(), w.userData.geomId = f, a += 1;
487
- const d = f * 3, _ = f * 4;
488
- w.position.fromArray(t.geom_pos, d), w.quaternion.set(t.geom_quat[_ + 1], t.geom_quat[_ + 2], t.geom_quat[_ + 3], t.geom_quat[_]), S.add(w);
489
- }
490
- a === 0 && i.dispose();
491
- } else {
492
- const i = yt(s);
493
- for (let a = 0; a < t.ngeom; a += 1) {
494
- if (t.geom_group[a] > 2 || r.mj_id2name(t, r.mjtObj.mjOBJ_GEOM.value, a) === "__viewer_default_ground__") continue;
495
- const f = n.get(t.geom_bodyid[a]), b = At(s, a);
496
- if (!f || !b) continue;
497
- const S = a * 4, E = t.geom_matid[a], h = Array.from(t.geom_rgba.slice(S, S + 4));
498
- E >= 0 && [0.5, 0.5, 0.5, 1].every((j, O) => h[O] === j) && h.splice(0, 4, ...Array.from(t.mat_rgba.slice(E * 4, E * 4 + 4)));
499
- const w = _t({
500
- color: h,
501
- roughness: Et(t, E),
502
- metalness: wt(t, E),
503
- specular: E >= 0 ? t.mat_specular[E] : void 0,
504
- emission: E >= 0 ? t.mat_emission[E] : void 0
505
- });
506
- try {
507
- bt(s, a, b, w, o, i);
508
- } catch (j) {
509
- throw X(new pe(b, w)), j;
510
- }
511
- const d = new pe(b, w), _ = a * 3, y = a * 4;
512
- t.geom_bodyid[a] === 0 && t.geom_type[a] === r.mjtGeom.mjGEOM_PLANE.value && (d.userData.excludeFromSimulationFit = !0), d.position.fromArray(t.geom_pos, _), d.quaternion.set(t.geom_quat[y + 1], t.geom_quat[y + 2], t.geom_quat[y + 3], t.geom_quat[y]), f.add(d);
513
- }
514
- }
515
- return { root: l, bindings: u, expectedLinkCount: u.size };
516
- } catch (i) {
517
- throw X(l), i;
518
- }
519
- }
520
- function jt(s, e) {
521
- const o = s.model, t = s.mujoco, r = e * 3, l = o.geom_size[r], n = o.geom_size[r + 1], u = o.geom_size[r + 2], i = o.geom_type[e];
522
- if (i === t.mjtGeom.mjGEOM_PLANE.value) return new je(Math.max(l * 2, 2), Math.max(n * 2, 2), 10, 10);
523
- if (i === t.mjtGeom.mjGEOM_BOX.value) return new Se(l * 2, n * 2, u * 2);
524
- if (i === t.mjtGeom.mjGEOM_SPHERE.value) return new ee(l, 20, 12);
525
- if (i === t.mjtGeom.mjGEOM_ELLIPSOID.value) {
526
- const a = new ee(1, 24, 16);
527
- return a.applyMatrix4(new We().makeScale(l, n, u)), a;
528
- }
529
- if (i === t.mjtGeom.mjGEOM_CYLINDER.value) {
530
- const a = new Me(l, l, n * 2, 24);
531
- return a.rotateX(Math.PI / 2), a;
532
- }
533
- if (i === t.mjtGeom.mjGEOM_CAPSULE.value) {
534
- const a = new ve(l, n * 2, 6, 16);
535
- return a.rotateX(Math.PI / 2), a;
536
- }
537
- return i === t.mjtGeom.mjGEOM_MESH.value ? vt(s, o.geom_dataid[e]) : i === t.mjtGeom.mjGEOM_HFIELD.value ? Ot(s, o.geom_dataid[e]) : null;
538
- }
539
- function St(s, e) {
540
- const o = s.model.geom_type[e];
541
- return o === s.mujoco.mjtGeom.mjGEOM_MESH.value || o === s.mujoco.mjtGeom.mjGEOM_HFIELD.value;
542
- }
543
- function Mt(s, e) {
544
- if (s.geom_contype[e] !== 0 || s.geom_conaffinity[e] !== 0) return !0;
545
- for (let o = 0; o < s.npair; o += 1) if (s.pair_geom1[o] === e || s.pair_geom2[o] === e) return !0;
546
- return !1;
547
- }
548
- function vt(s, e) {
549
- const o = s.model, t = o.mesh_graphadr[e];
550
- if (t < 0) return null;
551
- const r = o.mesh_vertadr[e], l = o.mesh_vertnum[e], n = o.mesh_graph[t], u = o.mesh_graph[t + 1];
552
- if (n < 4 || u < 4) return null;
553
- const i = t + 2 + 3 * n + 3 * u, a = new re();
554
- return a.setAttribute("position", new te(Float32Array.from(o.mesh_vert.subarray(r * 3, (r + l) * 3)), 3)), a.setIndex(new te(Uint32Array.from(o.mesh_graph.subarray(i, i + u * 3)), 1)), a.computeVertexNormals(), a;
555
- }
556
- function Ot(s, e) {
557
- const o = s.model, t = o.hfield_nrow[e], r = o.hfield_ncol[e];
558
- if (t < 2 || r < 2) return null;
559
- const l = o.hfield_adr[e], n = e * 4, u = o.hfield_size[n], i = o.hfield_size[n + 1], a = o.hfield_size[n + 2], f = o.hfield_size[n + 3], b = t * r, S = [];
560
- for (let A = 0; A < t; A += 1) for (let R = 0; R < r; R += 1)
561
- S.push(
562
- -u + 2 * u * R / (r - 1),
563
- -i + 2 * i * A / (t - 1),
564
- o.hfield_data[l + A * r + R] * a
565
- );
566
- const E = [
567
- [-u, -i, -f],
568
- [u, -i, -f],
569
- [-u, i, -f],
570
- [u, i, -f]
571
- ];
572
- for (const A of E) S.push(...A);
573
- const h = [];
574
- for (let A = 0; A < t - 1; A += 1) for (let R = 0; R < r - 1; R += 1) {
575
- const G = A * r + R, C = G + 1, P = G + r, D = P + 1;
576
- h.push(G, P, C, C, P, D);
577
- }
578
- const w = b, d = b + 1, _ = b + 2, y = b + 3;
579
- h.push(w, d, _, d, y, _);
580
- const j = 0, O = r - 1, v = (t - 1) * r, c = t * r - 1;
581
- h.push(w, j, d, d, j, O), h.push(_, y, v, y, c, v), h.push(w, _, j, _, v, j), h.push(d, O, y, y, O, c);
582
- const m = new re();
583
- return m.setAttribute("position", new te(Float32Array.from(S), 3)), m.setIndex(h), m.computeVertexNormals(), m;
584
- }
585
- function At(s, e) {
586
- const o = s.model, t = s.mujoco, r = e * 3, l = o.geom_size[r], n = o.geom_size[r + 1], u = o.geom_size[r + 2], i = o.geom_type[e];
587
- if (i === t.mjtGeom.mjGEOM_PLANE.value) return new je((l || 5) * 2, (n || 5) * 2);
588
- if (i === t.mjtGeom.mjGEOM_BOX.value) return new Se(l * 2, n * 2, u * 2);
589
- if (i === t.mjtGeom.mjGEOM_SPHERE.value) return new ee(l, 24, 16);
590
- if (i === t.mjtGeom.mjGEOM_CYLINDER.value) {
591
- const a = new Me(l, l, n * 2, 24);
592
- return a.rotateX(Math.PI / 2), a;
593
- }
594
- if (i === t.mjtGeom.mjGEOM_CAPSULE.value) {
595
- const a = new ve(l, n * 2, 6, 16);
596
- return a.rotateX(Math.PI / 2), a;
597
- }
598
- return i !== t.mjtGeom.mjGEOM_MESH.value ? null : gt(o, o.geom_dataid[e]);
599
- }
600
- function Gt(s, e) {
601
- const o = new Xe(s);
602
- let t = null, r = null, l = null, n = null, u = null, i = null, a = null, f = null, b = null, S = null, E = null, h = !1, w = !0, d = !1, _ = !1, y = null, j = null, O, v = null, c = null, m = null, A = "z", R = !1;
603
- const G = () => {
604
- c && (A = e.options.upAxis ?? "z", R = !0, c.setUpAxis(A) && (r == null || r.sync(), m == null || m.sync()));
605
- }, C = (g, M) => {
606
- var T;
607
- const U = he(g, e.signal, `${e.format}:${M}`);
608
- w = !1, d = !1, j = { ...U, stage: M };
609
- try {
610
- c == null || c.endGrab();
611
- } catch {
612
- }
613
- (T = e.reportSessionState) == null || T.call(e), e.reportError(g, { fatal: !1, stage: M, code: U.code });
614
- }, P = () => {
615
- h = !0, w = !1;
616
- }, D = (async () => {
617
- var g, M, U, T, I, ne, ie, ae, le;
618
- try {
619
- const F = e.format;
620
- if (F === "usd" || F === "usda" || F === "usdc" || F === "usdz") {
621
- (g = e.reportProgress) == null || g.call(e, "usd", "正在解析 USD 场景与物理刚体...");
622
- const p = await (await import("./usd-session-DFbFB8bP.js")).loadUsdSimulation(s, e, o);
623
- if (h || e.signal.aborted)
624
- throw p.dispose(), oe();
625
- v = p.asset, r = p.binding, l = p.dispose, _ = p.hasAnimation === !0, n = p.hasPhysics || _ ? p.step : null, u = p.reset, w = p.hasPhysics || _, d = p.hasPhysics, y = p.fallback ? { ...p.fallback, stage: "physics-fallback" } : p.visualWarning ? { ...p.visualWarning, stage: "visual-adaptation" } : null, (M = e.reportProgress) == null || M.call(e, "stage", "正在构建三维场景与环境光影..."), c = new Z(r.root, e.options.simulationTheme, p.runtime), p.runtime && (t = p.runtime), m = p.collision ?? null, m && (m.root.visible = !1, c.attachAuxiliary(m.root)), G();
626
- return;
627
- }
628
- if (F === "urdf" || F === "xacro") {
629
- (U = e.reportProgress) == null || U.call(e, "urdf", "正在解析 URDF 场景与运动学结构...");
630
- const p = await (await import("./urdf-session-BleSrYNu.js")).loadUrdfSimulation(s, e, o);
631
- if (h || e.signal.aborted)
632
- throw p.dispose(), oe();
633
- v = p.asset, c = p.stage, b = p.inspection, l = p.dispose, n = p.step, u = p.reset, i = p.play, a = p.pause, f = p.isPlaying, S = () => p.capabilities, E = () => p.physics, w = !1, d = !1, y = p.warning ?? null, G();
634
- return;
635
- }
636
- let x = s.entryPath ?? s.filename;
637
- if (!x && F === "mjcf") {
638
- const N = o.paths().filter((p) => p.toLowerCase().endsWith(".xml"));
639
- for (const p of ["scene.xml", "model.xml", "main.xml"]) {
640
- const q = N.find((z) => z.toLowerCase().endsWith(`/${p}`) || z.toLowerCase() === p);
641
- if (q) {
642
- x = q;
643
- break;
644
- }
645
- }
646
- }
647
- x ?? (x = "asset.xml"), (T = e.reportProgress) == null || T.call(e, "fetch", "正在读取模型描述与依赖资源...");
648
- const Oe = await Ye(s, o);
649
- J(h, e.signal), (I = e.reportProgress) == null || I.call(e, "parse", "正在解析 MJCF 场景与连杆..."), v = await tt(Oe, x, o);
650
- try {
651
- (ne = e.reportProgress) == null || ne.call(e, "compile", "正在编译物理模型与参数...");
652
- const N = await st(v);
653
- J(h, e.signal), (ie = e.reportProgress) == null || ie.call(e, "runtime", "正在初始化物理内核...");
654
- const { MujocoRuntime: p } = await import("./mujoco-runtime-7xiBQNJm.js");
655
- t = new p(), await t.initialize(N, e.options.mujocoBaseUrl);
656
- } catch (N) {
657
- const p = he(N, e.signal, "mjcf-physics");
658
- t == null || t.dispose(), t = null;
659
- const { compileMjcfPreview: q } = await import("./mjcf-visual-CFXIhVyT.js");
660
- let z;
661
- try {
662
- z = q(v);
663
- } catch (K) {
664
- throw new Error(`${p.message};独立视觉预览也不可用:${K instanceof Error ? K.message : String(K)}`);
665
- }
666
- r = { root: z, sync() {
667
- }, dispose() {
668
- X(z);
669
- } }, y = { ...p, stage: "physics-fallback" }, c = new Z(z, e.options.simulationTheme), w = !1, G();
670
- return;
671
- }
672
- d = !0, J(h, e.signal), (ae = e.reportProgress) == null || ae.call(e, "visual", "正在构建视觉渲染网格...");
673
- const Ae = Ee(t, !1, v.diagnostics), ue = v.diagnostics.droppedFeatures.find((N) => N.code.startsWith("MJCF_"));
674
- ue && (y = { ...ue, stage: "visual-material" }), J(h, e.signal), (le = e.reportProgress) == null || le.call(e, "stage", "正在构建三维场景与环境光影..."), r = new _e(t, Ae), c = new Z(r.root, e.options.simulationTheme, t);
675
- const ce = Ee(t, !0, v.diagnostics);
676
- ce.root.children.length > 0 ? (m = new _e(t, ce), m.root.visible = !1) : m = null, m && c.attachAuxiliary(m.root), G();
677
- } catch (F) {
678
- throw c == null || c.dispose(), c = null, l ? (l(), l = null) : (m == null || m.dispose(), r == null || r.dispose(), t == null || t.dispose()), m = null, r = null, t = null, o.dispose(), F;
679
- }
680
- })();
681
- return D.catch(() => {
682
- }), {
683
- id: `simulation-${Math.random().toString(36).slice(2)}`,
684
- get autoPlay() {
685
- return e.format === "urdf" || e.format === "xacro" ? !1 : void 0;
686
- },
687
- get inspection() {
688
- return b;
689
- },
690
- isPlaying() {
691
- return (f == null ? void 0 : f()) ?? w;
692
- },
693
- opened: D,
694
- get root() {
695
- return (c == null ? void 0 : c.root) ?? null;
696
- },
697
- getFitBounds() {
698
- return (c == null ? void 0 : c.getModelBounds()) ?? null;
699
- },
700
- beforeRender(g, M, U) {
701
- return c == null ? void 0 : c.beforeRender(g, M, U);
702
- },
703
- get capabilities() {
704
- return j ? { canPlay: !1, canPause: !1, canReset: !1, hasPhysics: !1, hasAnimation: !1, canToggleGround: !0, canToggleCollision: m !== null, canReorientUpAxis: !0 } : (S == null ? void 0 : S()) ?? { canPlay: d || _, canPause: d || _, canReset: d || _, hasPhysics: d, hasAnimation: _, canToggleGround: !0, canToggleCollision: m !== null, canReorientUpAxis: !0 };
705
- },
706
- get warning() {
707
- return y;
708
- },
709
- get physics() {
710
- return j ? { status: "unavailable", issue: j } : E ? E() : d ? { status: "ready" } : (y == null ? void 0 : y.stage) === "physics-fallback" ? { status: "unavailable", issue: y } : { status: "not-authored" };
711
- },
712
- setTheme(g) {
713
- c == null || c.setTheme(g);
714
- },
715
- setGroundVisible(g) {
716
- c == null || c.setGroundVisible(g);
717
- },
718
- getGroundVisible() {
719
- return (c == null ? void 0 : c.getGroundVisible()) ?? !0;
720
- },
721
- getUpAxis() {
722
- return c && R ? A : null;
723
- },
724
- setUpAxis(g) {
725
- if (!(h || !c))
726
- try {
727
- if (!c.setUpAxis(g)) return;
728
- A = g, r == null || r.sync(), m == null || m.sync(), e.requestRender();
729
- } catch (M) {
730
- C(M, "up-axis");
731
- }
732
- },
733
- presentation: { preferredViewMode: "3d", interactionMode: "simulation", uiProfile: "simulation", fitPolicy: "fit-on-ready" },
734
- beginDispose: P,
735
- setCollisionVisible(g) {
736
- if (!h) {
737
- if (S) {
738
- const M = b;
739
- M == null || M.setOverlay("collision", g);
740
- return;
741
- }
742
- if (!m) throw new Error("This asset has no collision display.");
743
- m.root.visible = g;
744
- }
745
- },
746
- getVisualDiagnostics() {
747
- return h || !v || v.source.format !== "usd" ? null : structuredClone({ report: v.extension.visualAdaptation, diagnostics: v.diagnostics });
748
- },
749
- getPhysicsProperties() {
750
- if (h || !d || !(t != null && t.model) || !t.mujoco) return null;
751
- const g = t.model, M = t.mujoco;
752
- return structuredClone({
753
- units: { length: "m", mass: "kg", time: "s" },
754
- timestep: g.opt.timestep,
755
- gravity: Array.from(g.opt.gravity),
756
- bodyCount: g.nbody - 1,
757
- jointCount: g.njnt,
758
- geomCount: g.ngeom,
759
- bodies: Array.from({ length: g.nbody - 1 }, (U, T) => {
760
- const I = T + 1;
761
- return { id: I, name: M.mj_id2name(g, M.mjtObj.mjOBJ_BODY.value, I), mass: g.body_mass[I], inertia: Array.from(g.body_inertia.slice(I * 3, I * 3 + 3)) };
762
- }),
763
- diagnostics: v == null ? void 0 : v.diagnostics
764
- });
765
- },
766
- get update() {
767
- return t != null && t.model || n ? (g) => {
768
- if (j || h || !((f == null ? void 0 : f()) ?? w) || !r && !n) return !1;
769
- try {
770
- if (n) {
771
- const U = n(g);
772
- return U && (m == null || m.sync()), U;
773
- }
774
- const M = t.step(g);
775
- return M && (r.sync(), m == null || m.sync(), c == null || c.updateForceLine()), M;
776
- } catch (M) {
777
- return C(M, "step"), !1;
778
- }
779
- } : void 0;
780
- },
781
- play() {
782
- h || j || (i ? (i(), w = (f == null ? void 0 : f()) ?? !1) : (d || _) && (w = !0));
783
- },
784
- pause() {
785
- j || (a && a(), w = !1);
786
- },
787
- reset() {
788
- if (!(j || h || !r && !u))
789
- try {
790
- u ? u() : (t == null || t.reset(), r.sync()), m == null || m.sync(), c == null || c.updateForceLine();
791
- } catch (g) {
792
- C(g, "reset");
793
- }
794
- },
795
- beginGrab(g, M, U) {
796
- if (h || !d && !E) return !1;
797
- try {
798
- return (c == null ? void 0 : c.beginGrab(g, M, U)) ?? !1;
799
- } catch (T) {
800
- return C(T, "grab"), !1;
801
- }
802
- },
803
- moveGrab(g, M, U) {
804
- if (!(h || !d && !E))
805
- try {
806
- c == null || c.moveGrab(g, M, U);
807
- } catch (T) {
808
- C(T, "grab");
809
- }
810
- },
811
- endGrab() {
812
- c == null || c.endGrab();
813
- },
814
- dispose() {
815
- return P(), O ?? (O = D.catch(() => {
816
- }).then(() => {
817
- l ? (l(), l = null, c = null, r = null, m = null) : (c == null || c.dispose(), c = null, m == null || m.root.removeFromParent(), m == null || m.dispose(), m = null, r == null || r.dispose(), r = null, t == null || t.dispose()), o.dispose(), v = null, b = null, n = null, u = null, i = null, a = null, f = null, S = null, E = null, d = !1, _ = !1, y = null, R = !1;
818
- })), O;
819
- }
820
- };
821
- }
822
- function J(s, e) {
823
- if (s || e.aborted) throw oe();
824
- }
825
- function oe() {
826
- return Object.assign(new Error("Simulation load aborted."), { name: "AbortError", code: "E_ABORTED" });
827
- }
828
- const Tt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
829
- __proto__: null,
830
- createSimulationSession: Gt
831
- }, Symbol.toStringTag, { value: "Module" }));
832
- export {
833
- _e as S,
834
- mt as a,
835
- Qe as b,
836
- ft as c,
837
- Ze as d,
838
- _t as e,
839
- Tt as f,
840
- Lt as n,
841
- he as p,
842
- Ye as r,
843
- be as s
844
- };