export declare const INSTALL_VEHICLE_PROBE = "(() => {\n const G = globalThis;\n if (G.__vqaVeh) return true;\n const HW = /(wheel|rim|tyre|tire|brake|caliper|disc|disk|rotor|hub|knuckle|upright|strut|spring|damper|shock|susp|axle|driveshaft|halfshaft|cv_?joint|control_?arm|wishbone|tie_?rod)/i;\n const BODYISH = /(arch|well|liner|house|fender|guard|steer|tub|light|lamp|pedal|lever)/i;\n const WHEELISH = /(^|[^a-z])(wheel|rim|tyre|tire)s?([^a-z]|$)/i;\n const P = {};\n P.mp = () => G.__assetGym.mp;\n P.e = () => P.mp().portableVehicles.presentationRows()[0].entity;\n P.root = () => P.e().object3d;\n P.batches = () => { const out = []; P.root().traverse((o) => { if (o.isBatchedMesh && Array.isArray(o.instances)) out.push(o); }); return out; };\n P.proxies = () => { const m = new Map(); for (const b of P.batches()) for (const inst of b.instances) m.set(inst.mesh, inst); return m; };\n P.chainVisible = (o, root) => { for (let p = o; p; p = p.parent) { if (p.visible === false) return false; if (p === root) return true; } return true; };\n P.drawn = (o, proxies, root) => {\n if (!o.isMesh || o.isBatchedMesh || !o.geometry || !o.geometry.attributes || !o.geometry.attributes.position) return false;\n if (!P.chainVisible(o, root)) return false;\n const inst = proxies.get(o);\n if (inst) return inst.visibleIntent !== false;\n const ms = Array.isArray(o.material) ? o.material : [o.material];\n return ms.some((m) => m && m.visible !== false && !(m.transparent && (m.opacity ?? 1) < 0.02) && m.colorWrite !== false);\n };\n P.inv = () => { const r = P.root(); r.updateMatrixWorld(true); return r.matrixWorld.clone().invert(); };\n P.V = () => P.root().position.constructor;\n P.Q = () => P.root().quaternion.constructor;\n /** Index-referenced vertices of a mesh in BODY frame, appended flat to out. At most ~maxN unique vertices. With outBone\n * (skinned meshes), the skeleton index of each vertex's largest skin weight is appended to it, in the same order. */\n P.meshPoints = (o, inv, maxN, out, outBone) => {\n const g = o.geometry, pos = g.attributes.position;\n const M = inv.clone().multiply(o.matrixWorld); const e = M.elements;\n const idx = g.index ? g.index.array : null;\n const start = (g.drawRange && g.drawRange.start) || 0;\n const total = idx ? idx.length : pos.count;\n const count = Math.min(total - start, Number.isFinite(g.drawRange && g.drawRange.count) ? g.drawRange.count : total);\n const seen = new Uint8Array(pos.count);\n const step = Math.max(1, Math.ceil(pos.count / maxN));\n const skinned = o.isSkinnedMesh && typeof o.getVertexPosition === 'function';\n const tmp = skinned ? new (P.V())() : null;\n const si = skinned && outBone ? g.attributes.skinIndex : null, sw = skinned && outBone ? g.attributes.skinWeight : null;\n let k = 0;\n for (let i = start; i < start + count; i++) {\n const vi = idx ? idx[i] : i;\n if (seen[vi]) continue; seen[vi] = 1;\n if ((k++ % step) !== 0) continue;\n let x, y, z;\n if (skinned) { o.getVertexPosition(vi, tmp); x = tmp.x; y = tmp.y; z = tmp.z; } else { x = pos.getX(vi); y = pos.getY(vi); z = pos.getZ(vi); }\n if (!Number.isFinite(x) || !Number.isFinite(y) || !Number.isFinite(z)) continue;\n out.push(e[0] * x + e[4] * y + e[8] * z + e[12], e[1] * x + e[5] * y + e[9] * z + e[13], e[2] * x + e[6] * y + e[10] * z + e[14]);\n if (outBone) {\n let bi = -1, bw = -1;\n if (si && sw) for (let c = 0; c < 4; c++) { const w = sw.getComponent(vi, c); if (w > bw) { bw = w; bi = si.getComponent(vi, c); } }\n outBone.push(bi);\n }\n }\n return out;\n };\n /** Triangles of a mesh (body frame) whose AABB comes within reach of any hub, appended flat (9 per triangle). */\n P.meshTris = (o, inv, hubs, reach, out, outMesh, mi) => {\n const g = o.geometry, pos = g.attributes.position;\n const M = inv.clone().multiply(o.matrixWorld); const e = M.elements;\n const idx = g.index ? g.index.array : null;\n const start = (g.drawRange && g.drawRange.start) || 0;\n const total = idx ? idx.length : pos.count;\n const count = Math.min(total - start, Number.isFinite(g.drawRange && g.drawRange.count) ? g.drawRange.count : total);\n const v = new Float64Array(9);\n for (let i = start; i + 2 < start + count; i += 3) {\n for (let k = 0; k < 3; k++) {\n const vi = idx ? idx[i + k] : i + k;\n const x = pos.getX(vi), y = pos.getY(vi), z = pos.getZ(vi);\n v[3 * k] = e[0] * x + e[4] * y + e[8] * z + e[12]; v[3 * k + 1] = e[1] * x + e[5] * y + e[9] * z + e[13]; v[3 * k + 2] = e[2] * x + e[6] * y + e[10] * z + e[14];\n }\n let near = false;\n for (const h of hubs) {\n let ok = true;\n for (let a = 0; a < 3 && ok; a++) { const lo = Math.min(v[a], v[3 + a], v[6 + a]), hi = Math.max(v[a], v[3 + a], v[6 + a]); if (hi < h[a] - reach || lo > h[a] + reach) ok = false; }\n if (ok) { near = true; break; }\n }\n if (!near) continue;\n for (let k = 0; k < 9; k++) out.push(Math.round(v[k] * 10000) / 10000);\n outMesh.push(mi);\n }\n };\n P.bodyQuat = (o) => { const Q = P.Q(); const rq = P.root().getWorldQuaternion(new Q()).invert(); const q = rq.multiply(o.getWorldQuaternion(new Q())); return [q.x, q.y, q.z, q.w]; };\n P.bodyPos = (o, inv) => { const p = o.getWorldPosition(new (P.V())()).applyMatrix4(inv || P.inv()); return [p.x, p.y, p.z]; };\n P.wheelNode = (id, i) => { const ns = P.e().wheelNodes || []; return ns.find((n) => n.name === id) || ns[i] || null; };\n P.contacts = () => ((P.e().controller.tuning && P.e().controller.tuning.contacts) || []).filter((k) => k.kind === 'wheel');\n P.axleOf = (node) => { const V = P.V(); const q = P.bodyQuat(node); const Q = P.Q(); const a = new V(1, 0, 0).applyQuaternion(new Q(q[0], q[1], q[2], q[3])); return [a.x, a.y, a.z]; };\n const R = (v) => Math.round(v * 10000) / 10000;\n /** Everything the wheel/arch analysis needs, measured on the drawn geometry. */\n P.pull = () => {\n const e = P.e(), root = e.object3d, inv = P.inv(), proxies = P.proxies();\n const st = e.controller.getState();\n const contacts = P.contacts();\n const underWheel = new Set();\n for (const n of e.wheelNodes || []) n.traverse((o) => underWheel.add(o));\n // the radius each wheel actually rolls on is its axle's v2 tyre (staggered cars differ per axle), else the contact's own:\n // see vehicleClearance.wheelRollingRadius\n const v2 = e.controller.tuning && e.controller.tuning.landV2;\n const tyres = v2 && Array.isArray(v2.tyreByAxle) ? v2.tyreByAxle : null;\n const wheels = contacts.map((k, i) => {\n const node = P.wheelNode(k.id, i);\n const axle = typeof k.axle === 'number' ? k.axle : null;\n const fb = (st.wheels && st.wheels[i]) || {};\n const meshes = [], pts = [];\n if (node) node.traverse((o) => { if (P.drawn(o, proxies, root)) { meshes.push(o.name || (o.parent && o.parent.name) || '(unnamed)'); P.meshPoints(o, inv, 8000, pts); } });\n return {\n id: k.id, node: node ? node.name : null, mount: k.position, restLength: k.suspension ? k.suspension.restLength : null, travel: k.suspension ? k.suspension.travel : null,\n radius: k.radius, axle, steered: k.steered, powered: k.powered, compression: fb.compression ?? null, grounded: fb.grounded ?? null,\n steerAngleRad: fb.steerAngleRad ?? null, contactPoint: fb.contactPoint ? [fb.contactPoint.x, fb.contactPoint.y, fb.contactPoint.z] : null,\n axleNode: node ? P.axleOf(node) : null, nodePos: node ? P.bodyPos(node, inv) : null,\n meshes, points: pts.map(R),\n };\n });\n const hubs = wheels.map((w) => w.nodePos).filter(Boolean);\n const maxHubY = hubs.length ? Math.max(...hubs.map((h) => h[1])) : 0;\n const names = [], bpts = [], bmesh = [], strays = [], excluded = [], tris = [], triMesh = [];\n let bodyMeshes = 0, bodyVerts = 0;\n root.traverse((o) => {\n if (underWheel.has(o) || !P.drawn(o, proxies, root)) return;\n const nm = o.name || (o.parent && o.parent.name) || '(unnamed)';\n if (HW.test(nm) && !BODYISH.test(nm)) {\n const local = []; P.meshPoints(o, inv, 2000, local);\n let cx = 0, cy = 0, cz = 0; const n = local.length / 3;\n for (let j = 0; j < local.length; j += 3) { cx += local[j]; cy += local[j + 1]; cz += local[j + 2]; }\n const c = n ? [cx / n, cy / n, cz / n] : null;\n if (WHEELISH.test(nm)) strays.push({ mesh: nm, centre: c && c.map(R) });\n excluded.push(nm);\n return;\n }\n const local = []; P.meshPoints(o, inv, 200000, local);\n const mi = names.length; names.push(nm); bodyMeshes++;\n P.meshTris(o, inv, hubs, 1.0, tris, triMesh, mi);\n for (let j = 0; j < local.length; j += 3) {\n const x = local[j], y = local[j + 1], z = local[j + 2];\n bodyVerts++;\n let keep = y < maxHubY;\n if (!keep) for (const h of hubs) { if (Math.hypot(x - h[0], y - h[1], z - h[2]) < 1.0) { keep = true; break; } }\n if (!keep) continue;\n bpts.push(R(x), R(y), R(z)); bmesh.push(mi);\n }\n });\n return { wheels, tyreByAxle: tyres ? tyres.map((t) => ({ radius: t && typeof t.radius === 'number' ? t.radius : null })) : null, body: { names, points: bpts, mesh: bmesh }, bodyTris: { names, tris, mesh: triMesh }, strays, excludedHardware: [...new Set(excluded)].slice(0, 40), bodyMeshes, bodyVerts,\n batches: P.batches().map((b) => ({ name: b.name, instances: b.instances.length })), proxies: proxies.size,\n state: { speed: st.speed, forwardSpeed: st.forwardSpeed, grounded: st.grounded, position: [st.position.x, st.position.y, st.position.z] } };\n };\n /** Suspension compression per wheel, sampled every animation frame for ms (the car rocks for seconds after boarding). */\n P.compressionWindow = (ms) => new Promise((resolve) => {\n const e = P.e(); const out = P.contacts().map(() => []); const t0 = performance.now();\n const tick = () => {\n try { const st = e.controller.getState(); (st.wheels || []).forEach((w, i) => { if (out[i] && Number.isFinite(w.compression)) out[i].push(w.compression); }); } catch (err) { /* keep sampling */ }\n if (performance.now() - t0 < ms) requestAnimationFrame(tick); else resolve(out);\n };\n requestAnimationFrame(tick);\n });\n /** Body-frame AABB of the drawn car (geometry bounding-box corners, so slightly generous). */\n P.bounds = () => {\n const root = P.root(), inv = P.inv(), proxies = P.proxies(), V = P.V();\n const mn = [Infinity, Infinity, Infinity], mx = [-Infinity, -Infinity, -Infinity]; const c = new V();\n root.traverse((o) => {\n if (!P.drawn(o, proxies, root)) return;\n if (!o.geometry.boundingBox) o.geometry.computeBoundingBox();\n const b = o.geometry.boundingBox; if (!b) return;\n const M = inv.clone().multiply(o.matrixWorld);\n for (let i = 0; i < 8; i++) {\n c.set(i & 1 ? b.max.x : b.min.x, i & 2 ? b.max.y : b.min.y, i & 4 ? b.max.z : b.min.z).applyMatrix4(M);\n mn[0] = Math.min(mn[0], c.x); mn[1] = Math.min(mn[1], c.y); mn[2] = Math.min(mn[2], c.z);\n mx[0] = Math.max(mx[0], c.x); mx[1] = Math.max(mx[1], c.y); mx[2] = Math.max(mx[2], c.z);\n }\n });\n return { min: mn.map(R), max: mx.map(R) };\n };\n /** Body-frame AABB of named nodes' drawn meshes. */\n P.nodeBox = (names) => {\n const root = P.root(), inv = P.inv(), proxies = P.proxies();\n const pts = [];\n for (const n of names) { const o = root.getObjectByName(n); if (!o) continue; o.traverse((m) => { if (P.drawn(m, proxies, root)) P.meshPoints(m, inv, 3000, pts); }); }\n if (!pts.length) return null;\n const mn = [Infinity, Infinity, Infinity], mx = [-Infinity, -Infinity, -Infinity];\n for (let j = 0; j < pts.length; j += 3) for (let a = 0; a < 3; a++) { mn[a] = Math.min(mn[a], pts[j + a]); mx[a] = Math.max(mx[a], pts[j + a]); }\n return { min: mn.map(R), max: mx.map(R) };\n };\n P.pose = (names) => {\n const root = P.root(), inv = P.inv(); const out = {};\n for (const n of names) { const o = root.getObjectByName(n); out[n] = o ? { q: P.bodyQuat(o), p: P.bodyPos(o, inv) } : null; }\n return out;\n };\n /** Pose of node b in node a's frame (rigidity check). */\n P.rel = (a, b) => {\n const root = P.root(); const A = root.getObjectByName(a), B = root.getObjectByName(b); if (!A || !B) return null;\n root.updateMatrixWorld(true);\n const V = P.V(), Q = P.Q();\n const p = A.worldToLocal(B.getWorldPosition(new V()));\n const rel = A.getWorldQuaternion(new Q()).invert().multiply(B.getWorldQuaternion(new Q()));\n return { p: [p.x, p.y, p.z], q: [rel.x, rel.y, rel.z, rel.w] };\n };\n P.durable = () => { try { const v = P.mp().portableVehicleEvidence().vehicles[0]; return v ? (v.durableState || {}) : {}; } catch (err) { return {}; } };\n P.steering = () => {\n const e = P.e(), root = e.object3d; const st = e.controller.getState();\n const rim = (e.interior && (e.interior.steeringRim || e.interior.steering)) || root.getObjectByName('steering_rim') || root.getObjectByName('steering');\n const contacts = P.contacts();\n return {\n rimNode: rim ? rim.name : null, rimQ: rim ? P.bodyQuat(rim) : null, rimAngleRad: e.interior ? e.interior.rimAngleRad ?? null : null,\n steerInput: e.controller.input ? e.controller.input.steer : null, stateSteerRad: st.steerAngleRad,\n wheels: contacts.map((k, i) => { const n = P.wheelNode(k.id, i); return { id: k.id, steered: k.steered, axle: n ? P.axleOf(n) : null, physicsSteerRad: st.wheels && st.wheels[i] ? st.wheels[i].steerAngleRad : null }; }),\n };\n };\n /**\n * Sample the drawn wheels' rotation about their own axle every animation frame for ms. With a room guard\n * ({ origin: [x, z], dir: [x, z], limitM, decel }) sampling ends early as soon as the car, braking at decel from now, would\n * pass limitM along dir from origin; it then resolves { samples, stoppedForRoom } so the caller brakes at once.\n */\n P.sampleSpin = (ms, guard) => new Promise((resolve) => {\n const e = P.e(), root = e.object3d, proxies = P.proxies(), V = P.V();\n const contacts = P.contacts();\n let stoppedForRoom = false;\n const wheels = contacts.map((k, i) => {\n const node = P.wheelNode(k.id, i); let mesh = null;\n if (node) node.traverse((o) => { if (!mesh && P.drawn(o, proxies, root)) mesh = o; });\n return { node, mesh: mesh || node };\n });\n const qOf = (o) => { const q = P.bodyQuat(o); return new (P.Q())(q[0], q[1], q[2], q[3]); };\n // reference axis: the mesh-local axis most perpendicular to the axle, chosen once\n const refs = wheels.map((w) => {\n if (!w.mesh) return null;\n const a = new V(...P.axleOf(w.node)); const q = qOf(w.mesh);\n const cands = [new V(1, 0, 0), new V(0, 1, 0), new V(0, 0, 1)];\n let best = 0, bd = Infinity; cands.forEach((c, j) => { const d = Math.abs(c.clone().applyQuaternion(q).dot(a)); if (d < bd) { bd = d; best = j; } });\n return cands[best];\n });\n const samples = [];\n const t0 = performance.now();\n const tick = () => {\n try {\n const st = e.controller.getState(); const wp = root.getWorldPosition(new V());\n const ang = wheels.map((w, i) => {\n if (!w.mesh || !refs[i]) return NaN;\n let a = new V(...P.axleOf(w.node)); if (a.x < 0) a = a.multiplyScalar(-1);\n let up = new V(0, 1, 0).sub(a.clone().multiplyScalar(a.y)).normalize();\n const r = refs[i].clone().applyQuaternion(qOf(w.mesh));\n r.sub(a.clone().multiplyScalar(r.dot(a)));\n return Math.atan2(up.clone().cross(r).dot(a), up.dot(r));\n });\n samples.push({ t: performance.now(), x: wp.x, z: wp.z, forwardSpeed: st.forwardSpeed, ang });\n if (guard) {\n const along = (wp.x - guard.origin[0]) * guard.dir[0] + (wp.z - guard.origin[1]) * guard.dir[1];\n const v = Math.max(0, st.forwardSpeed);\n if (along + v * 0.25 + (v * v) / (2 * guard.decel) >= guard.limitM) stoppedForRoom = true;\n }\n } catch (err) { /* keep sampling */ }\n if (performance.now() - t0 < ms && !stoppedForRoom) requestAnimationFrame(tick); else resolve(guard ? { samples, stoppedForRoom } : samples);\n };\n requestAnimationFrame(tick);\n });\n /** Pin the render camera to a body-frame pose, re-applied every frame so the follow cam cannot fight it. */\n /**\n * Project body-frame points (flat xyz) through the live camera: NDC per point, and the canvas's client rect in this\n * frame, so an annotation can be drawn over the captured image exactly where the geometry is.\n */\n P.project = (flat) => {\n const cam = P.camera(); const root = P.root(); if (!cam) return null;\n root.updateMatrixWorld(true); cam.updateMatrixWorld(true);\n if (cam.matrixWorldInverse) cam.matrixWorldInverse.copy(cam.matrixWorld).invert();\n const V = P.V(); const v = new V(); const out = [];\n for (let i = 0; i < flat.length; i += 3) { v.set(flat[i], flat[i + 1], flat[i + 2]).applyMatrix4(root.matrixWorld).project(cam); out.push(v.x, v.y, v.z); }\n let best = null, area = 0;\n for (const c of document.querySelectorAll('canvas')) { const r = c.getBoundingClientRect(); if (r.width * r.height > area) { area = r.width * r.height; best = r; } }\n return { ndc: out, rect: best ? { left: best.left, top: best.top, width: best.width, height: best.height } : null };\n };\n P.camera = () => { try { return P.mp().local.services.camera.camera; } catch (err) { return G.__vqa && G.__vqa.main; } };\n P.setCam = (c) => {\n const cam = P.camera(); if (!cam) return false;\n if (!cam.__vqaPinned) {\n const orig = cam.updateMatrixWorld.bind(cam);\n cam.updateMatrixWorld = function (force) {\n const o = G.__vqaCam;\n if (o) {\n const r = P.root(); const V = P.V();\n this.position.copy(r.localToWorld(new V(...o.pos)));\n this.up.set(0, 1, 0);\n this.lookAt(r.localToWorld(new V(...o.target)));\n if (o.fov && this.fov !== o.fov) { this.fov = o.fov; this.updateProjectionMatrix(); }\n if (o.near && this.near !== o.near) { this.near = o.near; this.updateProjectionMatrix(); }\n }\n return orig(force);\n };\n cam.__vqaPinned = { fov: cam.fov, near: cam.near };\n }\n G.__vqaCam = c; return true;\n };\n P.clearCam = () => { G.__vqaCam = null; const cam = P.camera(); if (cam && cam.__vqaPinned) { cam.fov = cam.__vqaPinned.fov; cam.near = cam.__vqaPinned.near; cam.updateProjectionMatrix(); } return true; };\n /** Scene stats over the drawn car: batched proxies get their real material back for the (synchronous) count. */\n P.stats = () => {\n const swapped = [];\n for (const b of P.batches()) for (const inst of b.instances) { if (inst.mesh.material === inst.hiddenMaterial && inst.originalMaterial) { swapped.push(inst); inst.mesh.material = inst.originalMaterial; } }\n try { return G.__vqaStats(P.root(), { exclude: (o) => !!o.isBatchedMesh }); }\n finally { for (const inst of swapped) inst.mesh.material = inst.hiddenMaterial; }\n };\n // ---------------------------------------------------------------------------------------------------- seated occupant\n P.isUnder = (o, anc) => { for (let p = o; p; p = p.parent) if (p === anc) return true; return false; };\n /** Triangles (body frame, 9 per triangle) of one mesh whose AABB overlaps the box, appended flat. */\n P.meshTrisInBox = (o, inv, box, out, outMesh, mi) => {\n const g = o.geometry, pos = g.attributes.position;\n const M = inv.clone().multiply(o.matrixWorld); const e = M.elements;\n const idx = g.index ? g.index.array : null;\n const start = (g.drawRange && g.drawRange.start) || 0;\n const total = idx ? idx.length : pos.count;\n const count = Math.min(total - start, Number.isFinite(g.drawRange && g.drawRange.count) ? g.drawRange.count : total);\n const v = new Float64Array(9);\n // a mirrored node (negative determinant) flips the winding: swap two corners so the triangle's normal stays outward\n const det = e[0] * (e[5] * e[10] - e[6] * e[9]) - e[4] * (e[1] * e[10] - e[2] * e[9]) + e[8] * (e[1] * e[6] - e[2] * e[5]);\n const order = det < 0 ? [0, 2, 1] : [0, 1, 2];\n for (let i = start; i + 2 < start + count; i += 3) {\n for (let k = 0; k < 3; k++) {\n const vi = idx ? idx[i + order[k]] : i + order[k];\n const x = pos.getX(vi), y = pos.getY(vi), z = pos.getZ(vi);\n v[3 * k] = e[0] * x + e[4] * y + e[8] * z + e[12]; v[3 * k + 1] = e[1] * x + e[5] * y + e[9] * z + e[13]; v[3 * k + 2] = e[2] * x + e[6] * y + e[10] * z + e[14];\n }\n let ok = true;\n for (let a = 0; a < 3 && ok; a++) { const lo = Math.min(v[a], v[3 + a], v[6 + a]), hi = Math.max(v[a], v[3 + a], v[6 + a]); if (hi < box.min[a] || lo > box.max[a]) ok = false; }\n if (!ok) continue;\n for (let k = 0; k < 9; k++) out.push(Math.round(v[k] * 10000) / 10000);\n outMesh.push(mi);\n }\n };\n /**\n * The LOCAL occupant: every bone (body frame) and the vertices of every drawn skinned mesh on it (body, hair, hats...),\n * the steering wheel's vertices, and the car's own drawn triangles in a box around the pelvis. The car's triangles never\n * include the occupant (skinned meshes, anything under the character model) or the wheels.\n */\n P.occupantPull = () => {\n const mp = P.mp(); const local = mp.local; const model = local && local.model; if (!model) return null;\n const e = P.e(), root = e.object3d, inv = P.inv(), proxies = P.proxies();\n root.updateMatrixWorld(true); model.updateMatrixWorld(true);\n const bones = {}; const boneParents = {}; const skinned = [];\n model.traverse((o) => { if (o.isBone) { const p = P.bodyPos(o, inv); bones[o.name] = p.map(R); boneParents[o.name] = o.parent && o.parent.isBone ? o.parent.name : null; } if (o.isSkinnedMesh && P.chainVisible(o, model)) skinned.push(o); });\n const points = []; const pointBone = []; const boneNames = Object.keys(bones); const boneIx = new Map(boneNames.map((n, i) => [n, i]));\n for (const m of skinned) {\n const tmp = []; const tb = [];\n P.meshPoints(m, inv, 30000, tmp, tb);\n for (let i = 0; i < tmp.length; i++) points.push(R(tmp[i]));\n // the bone with the largest skin weight per vertex (vehiclePenetration measures each vertex against its own bone)\n const sb = (m.skeleton && m.skeleton.bones) || [];\n for (let i = 0; i < tb.length; i++) { const b = sb[tb[i]]; const k = b ? boneIx.get(b.name) : undefined; pointBone.push(k === undefined ? -1 : k); }\n }\n const pel = bones.pelvis || bones.hips || Object.values(bones)[0];\n const box = { min: [pel[0] - 0.8, pel[1] - 0.9, pel[2] - 0.95], max: [pel[0] + 0.8, pel[1] + 1.1, pel[2] + 0.95] };\n const underWheel = new Set(); for (const n of e.wheelNodes || []) n.traverse((o) => underWheel.add(o));\n const names = [], tris = [], mesh = [], meshInfo = [];\n root.traverse((o) => {\n if (underWheel.has(o) || o.isSkinnedMesh || !P.drawn(o, proxies, root) || P.isUnder(o, model)) return;\n const mi = names.length; names.push(o.name || (o.parent && o.parent.name) || '(unnamed)');\n const before = tris.length;\n P.meshTrisInBox(o, inv, box, tris, mesh, mi);\n if (tris.length > before) {\n const inst = proxies.get(o); const m0 = (inst && inst.originalMaterial) || (Array.isArray(o.material) ? o.material[0] : o.material);\n meshInfo.push({ name: names[mi], batched: !!inst, color: m0 && m0.color ? m0.color.getHexString() : null, opacity: m0 ? m0.opacity : null, transparent: m0 ? !!m0.transparent : null, side: m0 ? m0.side : null, colorWrite: m0 ? m0.colorWrite : null, tris: (tris.length - before) / 9 });\n }\n });\n let rim = null;\n const rimNode = (e.interior && (e.interior.steeringRim || e.interior.steering)) || root.getObjectByName('steering_rim') || root.getObjectByName('steering');\n if (rimNode) { const pts = []; rimNode.traverse((m) => { if (m.isMesh && !m.isSkinnedMesh && m.geometry && m.geometry.attributes && m.geometry.attributes.position) P.meshPoints(m, inv, 3000, pts); }); rim = pts.map(R); }\n let residual = null; try { const l = mp.seatEvidence && mp.seatEvidence().local; residual = l && l.seated ? l.seated.seatResidualM : null; } catch (err) { /* keep null */ }\n return { bones, boneParents, boneNames, points, pointBone, rim, cabin: { tris, mesh, names }, seatResidualM: residual, skinned: skinned.map((m) => m.name || '(unnamed)'), meshInfo, rimNode: rimNode ? rimNode.name : null };\n };\n /** Body-frame position of a seat: its named node when the model has one, else the cabin's own H-point. */\n P.seatPos = (id) => {\n const root = P.root(); root.updateMatrixWorld(true); let o = null;\n root.traverse((x) => { if (!o && x.name === id && !x.isMesh) o = x; });\n if (o) return P.bodyPos(o);\n try { const s = P.e().interior.cabin.seats.find((x) => x.id === id); return s ? [s.hipPoint[0], s.hipPoint[1], s.hipPoint[2]] : null; } catch (err) { return null; }\n };\n /** Hide (or restore) named nodes, for a labelled cutaway frame. The vehicle batch reads visibility as the AND of the ancestors up to the root. */\n /**\n * Evidence cutaway: hide every drawn mesh of the car except those named (by the same name the occupant pull records),\n * so only the occupant and the surface it clashes with are drawn. P.unisolate() puts every flag back exactly.\n */\n P.isolate = (keep) => {\n P.unisolate();\n const mp = P.mp(); const model = mp.local && mp.local.model; const root = P.root(); const proxies = P.proxies();\n const ks = new Set(keep || []); const hidden = [];\n root.traverse((o) => {\n if (!o.isMesh || (model && P.isUnder(o, model)) || !P.drawn(o, proxies, root)) return;\n const nm = o.name || (o.parent && o.parent.name) || '(unnamed)';\n if (ks.has(nm)) return;\n hidden.push([o, o.visible]); o.visible = false;\n });\n P.__isolated = hidden; return hidden.length;\n };\n P.unisolate = () => { const h = P.__isolated || []; for (const [o, v] of h) o.visible = v; P.__isolated = null; return h.length; };\n /** The names (by the occupant pull's own rule: the mesh's name, else its parent's) of every drawn mesh under any of these nodes. */\n P.meshNamesUnder = (nodes) => {\n const root = P.root(); const out = new Set();\n for (const nm of nodes || []) { const n = root.getObjectByName(nm); if (n) n.traverse((o) => { if (o.isMesh) out.add(o.name || (o.parent && o.parent.name) || '(unnamed)'); }); }\n return [...out];\n };\n P.setHidden = (names, hidden) => { const root = P.root(); let n = 0; for (const nm of names) { const o = root.getObjectByName(nm); if (o) { o.visible = !hidden; n++; } } return n; };\n /** The engine's own cabin-fit self-report (what it BELIEVES the occupant fit is), for comparison with what is drawn. */\n // ---------------------------------------------------------------------------------------------------- scenery\n /** The local player's character model (hidden for the appearance poses, never for an occupant frame). */\n P.avatar = () => { try { return P.mp().local.model || null; } catch (err) { return null; } };\n P.sceneRoot = () => { let s = P.root(); while (s.parent) s = s.parent; return s; };\n /** Is o part of the car or of a character (the local one, or anyone skinned)? Those are never scenery. */\n P.notScenery = (o, root, avatar) => P.isUnder(o, root) || (avatar && P.isUnder(o, avatar)) || o.isSkinnedMesh;\n /**\n * WORLD-frame boxes of every visible scenery mesh within radius of the car (the walls, kerbs and props of the test\n * grounds), plus the car's body->world matrix, so the clearance and occlusion maths can run outside the page.\n */\n P.sceneBoxes = (radius) => {\n const root = P.root(), scene = P.sceneRoot(), avatar = P.avatar(), V = P.V();\n root.updateMatrixWorld(true);\n const at = root.getWorldPosition(new V()); const out = []; const c = new V();\n scene.traverse((o) => {\n if (!o.isMesh || !o.geometry || !o.geometry.attributes || !o.geometry.attributes.position) return;\n if (P.notScenery(o, root, avatar)) return;\n for (let p = o; p; p = p.parent) if (p.visible === false) return;\n // effects (particles, glows, soft quads) write no depth and stop nothing: not scenery\n const ms = Array.isArray(o.material) ? o.material : [o.material];\n if (ms.every((m) => !m || m.depthWrite === false || m.visible === false || (m.transparent && (m.opacity ?? 1) < 0.35))) return;\n if (!o.geometry.boundingBox) o.geometry.computeBoundingBox();\n const b = o.geometry.boundingBox; if (!b || b.isEmpty()) return;\n const mn = [Infinity, Infinity, Infinity], mx = [-Infinity, -Infinity, -Infinity];\n for (let i = 0; i < 8; i++) {\n c.set(i & 1 ? b.max.x : b.min.x, i & 2 ? b.max.y : b.min.y, i & 4 ? b.max.z : b.min.z).applyMatrix4(o.matrixWorld);\n mn[0] = Math.min(mn[0], c.x); mn[1] = Math.min(mn[1], c.y); mn[2] = Math.min(mn[2], c.z);\n mx[0] = Math.max(mx[0], c.x); mx[1] = Math.max(mx[1], c.y); mx[2] = Math.max(mx[2], c.z);\n }\n const dx = Math.max(mn[0] - at.x, 0, at.x - mx[0]), dz = Math.max(mn[2] - at.z, 0, at.z - mx[2]);\n if (Math.hypot(dx, dz) > (radius || 60)) return;\n out.push({ id: o.uuid, name: o.name || (o.parent && o.parent.name) || '(unnamed)', min: mn.map(R), max: mx.map(R) });\n });\n return { boxes: out, bodyToWorld: Array.from(root.matrixWorld.elements) };\n };\n /** Hide (true) or restore (false) scenery meshes by uuid, for one frame; restore puts back exactly what was changed. */\n P.hideScenery = (ids, on) => {\n if (!on) { const h = P.__sceneHidden || []; for (const [o, v] of h) o.visible = v; P.__sceneHidden = null; return h.length; }\n const want = new Set(ids || []); const h = P.__sceneHidden || []; const scene = P.sceneRoot();\n scene.traverse((o) => { if (want.has(o.uuid) && o.visible !== false) { h.push([o, o.visible]); o.visible = false; } });\n P.__sceneHidden = h; return h.length;\n };\n /**\n * Appearance poses: everything but the car is hidden (scenery AND the player's own avatar) over a plain neutral\n * backdrop, lit by the world's own lights/environment. P.backdrop(false) puts every flag and the background back.\n */\n /**\n * Appearance poses: every lamp OFF and no local light, so nothing blooms over the nose (F40 round 1: a white blob over\n * pose.front and pose.top; measured, it was the test grounds' stage point lights on glossy paint, not the lamps).\n * Zeroes the emissive of every material the car draws with (its batch materials and each batched part's own material\n * too), hides additive-blended coronas under the car, and zeroes every spot/point/area light in the scene (the\n * runtime's headlamp beams and the world's practical lamps); the sun/sky and the environment stay. The engine never\n * rewrites emissive per frame, so this holds for the frames. P.lightsOff(false) restores every value exactly.\n */\n P.lightsOff = (on) => {\n if (!on) {\n const st = P.__lightsOff; if (!st) return null;\n for (const [m, i, c] of st.mats) { m.emissiveIntensity = i; if (c && m.emissive) m.emissive.copy(c); m.needsUpdate = true; }\n for (const [o, v] of st.hidden) o.visible = v;\n for (const [l, i] of st.lights) l.intensity = i;\n P.__lightsOff = null; return { materials: st.mats.length, coronas: st.hidden.length, lights: st.lights.length };\n }\n if (P.__lightsOff) return null;\n const root = P.root(), scene = P.sceneRoot(), V = P.V();\n const mats = [], hidden = [], lights = []; const seen = new Set();\n const take = (m) => {\n if (!m || seen.has(m)) return; seen.add(m);\n if (typeof m.emissiveIntensity !== 'number' && !m.emissive) return;\n const black = m.emissive ? m.emissive.clone() : null;\n mats.push([m, m.emissiveIntensity, black]);\n if (typeof m.emissiveIntensity === 'number') m.emissiveIntensity = 0;\n if (m.emissive) m.emissive.setRGB(0, 0, 0);\n m.needsUpdate = true;\n };\n const proxies = P.proxies();\n root.traverse((o) => {\n const ms = o.material ? (Array.isArray(o.material) ? o.material : [o.material]) : [];\n for (const m of ms) take(m);\n const inst = proxies.get(o); if (inst) { take(inst.originalMaterial); take(inst.hiddenMaterial); }\n if ((o.isMesh || o.isPoints || o.isSprite) && o.visible !== false && ms.some((m) => m && m.blending === 2)) { hidden.push([o, o.visible]); o.visible = false; }\n });\n // every LOCAL light off too (spot and point: the car's beams, and the world's own practical lamps; the test grounds'\n // stage lights put a white hotspot on a glossy nose): the poses are lit by the sun/sky and the environment only\n scene.traverse((o) => {\n if (!(o.isSpotLight || o.isPointLight || o.isRectAreaLight) || !(o.intensity > 0)) return;\n lights.push([o, o.intensity]); o.intensity = 0;\n });\n P.__lightsOff = { mats, hidden, lights };\n return { materials: mats.length, coronas: hidden.length, lights: lights.length };\n };\n P.backdrop = (on, hex) => {\n const scene = P.sceneRoot();\n if (!on) {\n const st = P.__backdrop; if (!st) return 0;\n for (const [o, v] of st.hidden) o.visible = v;\n scene.background = st.background; P.__backdrop = null; return st.hidden.length;\n }\n if (P.__backdrop) return P.__backdrop.hidden.length;\n const root = P.root(), avatar = P.avatar(); const hidden = [];\n scene.traverse((o) => {\n if (!(o.isMesh || o.isSprite || o.isPoints || o.isLine) || o.visible === false) return;\n if (P.isUnder(o, root) && !(avatar && P.isUnder(o, avatar))) return;\n hidden.push([o, o.visible]); o.visible = false;\n });\n if (avatar && avatar.visible !== false) { hidden.push([avatar, avatar.visible]); avatar.visible = false; }\n const st = { hidden, background: scene.background };\n let Color = null;\n root.traverse((o) => { if (!Color && o.material && !Array.isArray(o.material) && o.material.color) Color = o.material.color.constructor; });\n if (Color) scene.background = new Color(hex || 0x8c8f94);\n P.__backdrop = st; return hidden.length;\n };\n /**\n * Daylight paint sample: with the backdrop already on (every non-car mesh hidden over a flat key colour), hide every\n * drawn car mesh whose material is not body paint, so the only pixels left that are not the key colour are paint. The\n * world's lights and the lamps are NOT touched: this is the paint exactly as the Try Now frame lights it, hotspots\n * and all (the appearance poses turn the local lights off, which is why they never showed the bonnet glare).\n * A body-paint mesh is one whose material name carries \"paint\" (the __vehicle-paint-solid|metallic family\n * suffix). Batched parts follow their proxy mesh's visible flag on the next sync. P.paintOnly(false) restores.\n * Returns the paint materials as the runtime really draws them (colour, roughness, clearcoat...).\n */\n /** The lighting rig the frame is drawn with: scene environment/background/fog, every light, and what the gym exposes of the renderer. */\n P.lighting = () => {\n const scene = P.sceneRoot(), out = { background: null, environment: !!scene.environment, environmentIntensity: scene.environmentIntensity ?? null, backgroundIntensity: scene.backgroundIntensity ?? null, fog: scene.fog ? scene.fog.type || scene.fog.constructor.name : null, lights: [], gym: Object.keys(G.__assetGym || {}).slice(0, 40), renderer: null };\n const bg = scene.background; out.background = bg ? (bg.isColor ? '#' + bg.getHexString() : (bg.constructor && bg.constructor.name)) : null;\n scene.traverse((o) => { if (o.isLight) out.lights.push({ type: o.type, name: o.name || null, intensity: o.intensity, color: o.color ? '#' + o.color.getHexString() : null, visible: o.visible }); });\n const r = (G.__assetGym && (G.__assetGym.renderer || (G.__assetGym.mp && G.__assetGym.mp.renderer))) || G.__vqaRenderer || null;\n if (r) out.renderer = { toneMapping: r.toneMapping, exposure: r.toneMappingExposure, outputColorSpace: r.outputColorSpace, type: r.constructor && r.constructor.name };\n return out;\n };\n /** With paintOnly on: show (true) or hide (false) the paint meshes too, for the empty-scene reference frame the mask is taken against. */\n P.paintShow = (v) => { for (const o of P.__paintMeshes || []) o.visible = v; return (P.__paintMeshes || []).length; };\n P.paintOnly = (on) => {\n if (!on) { const h = P.__paintHidden || []; for (const [o, v] of h) o.visible = v; for (const o of P.__paintMeshes || []) o.visible = true; P.__paintHidden = null; P.__paintMeshes = null; return h.length; }\n if (P.__paintHidden) return null;\n const root = P.root(), proxies = P.proxies(); const hidden = []; const mats = new Map(); const paintMeshes = [];\n const avatar = P.avatar();\n root.traverse((o) => {\n if (!o.isMesh || o.isBatchedMesh || (avatar && P.isUnder(o, avatar))) return;\n const inst = proxies.get(o);\n const src = inst ? inst.originalMaterial : o.material;\n const ms = (Array.isArray(src) ? src : [src]).filter(Boolean);\n const paint = ms.filter((m) => /paint/i.test(m.name || ''));\n if (paint.length) { for (const m of paint) if (!mats.has(m)) mats.set(m, 0); paintMeshes.push(o); return; }\n if (o.visible !== false) { hidden.push([o, o.visible]); o.visible = false; }\n });\n P.__paintHidden = hidden; P.__paintMeshes = paintMeshes;\n const hex = (c) => c && c.isColor ? '#' + c.getHexString() : null;\n const R3 = (v) => typeof v === 'number' ? Math.round(v * 1000) / 1000 : null;\n return [...mats.keys()].map((m) => ({\n name: m.name, type: m.type, baseColorLinear: m.color ? [R3(m.color.r), R3(m.color.g), R3(m.color.b)] : null, baseColorHex: hex(m.color),\n metalness: R3(m.metalness), roughness: R3(m.roughness), clearcoat: R3(m.clearcoat), clearcoatRoughness: R3(m.clearcoatRoughness),\n ior: R3(m.ior), specularIntensity: R3(m.specularIntensity), envMapIntensity: R3(m.envMapIntensity), emissive: hex(m.emissive), emissiveIntensity: R3(m.emissiveIntensity),\n hasMap: !!m.map,\n }));\n };\n /**\n * Seat placement as authored vs as the runtime seats it: the seat's own GLB node (the authored H-point, body frame)\n * and the cabin seat the occupant is posed on after the runtime's cabin fit.\n */\n P.seatFit = (id) => {\n const root = P.root(); root.updateMatrixWorld(true); let node = null;\n root.traverse((x) => { if (!node && x.name === id && !x.isMesh) node = x; });\n let cabin = null;\n try { const s = P.e().interior.cabin.seats.find((x) => x.id === id); if (s && s.hipPoint) cabin = [s.hipPoint[0], s.hipPoint[1], s.hipPoint[2]].map(R); } catch (err) { /* none */ }\n return { node: node ? P.bodyPos(node).map(R) : null, cabin };\n };\n P.cabinFit = () => { try { const f = P.e().cabinFit; return f ? JSON.parse(JSON.stringify(f.report ?? f)) : null; } catch (err) { return null; } };\n /**\n * GRIP / STILLNESS window (vehicleGrip.ts): the local occupant's arm, hand and finger bones on each of the next n\n * animation frames, read after the engine posed them. Every finger joint is also given in its own HAND's frame\n * (rotation only, metres), so a hand that travels with the steering wheel does not read as its fingers moving. At the\n * end: the steering wheel's vertices (body frame, at most ~1500) and its rotation, and the controller's steer input.\n */\n P.occupantFrames = (n, stride) => new Promise((resolve) => {\n const every = Math.max(1, stride || 1); let tick = 0;\n let model = null; try { model = P.mp().local.model; } catch (err) { model = null; }\n if (!model) { resolve(null); return; }\n const ARM = /^(clavicle|upperarm|lowerarm|forearm|hand|thumb|index|middle|ring|pinky|pink)(_\\d+)?(_twist_?\\d*)?[_.](l|r)$/i;\n const FINGER = /^(thumb|index|middle|ring|pinky|pink)(_\\d+)?[_.](l|r)$/i;\n const bones = []; model.traverse((o) => { if (o.isBone && ARM.test(o.name)) bones.push(o); });\n const hands = {}; for (const b of bones) { const m = /^hand[_.](l|r)$/i.exec(b.name); if (m) hands[m[1].toLowerCase()] = b; }\n const V = P.V(), Q = P.Q(); const frames = []; const t0 = performance.now();\n const step = () => {\n if ((tick++ % every) !== 0) { requestAnimationFrame(step); return; }\n const inv = P.inv(); const body = {}; const inHand = {}; const localQ = {};\n for (const b of bones) { body[b.name] = P.bodyPos(b, inv).map(R); if (FINGER.test(b.name)) localQ[b.name] = [b.quaternion.x, b.quaternion.y, b.quaternion.z, b.quaternion.w].map((v) => Math.round(v * 1e5) / 1e5); }\n for (const side of Object.keys(hands)) {\n const h = hands[side]; const hp = h.getWorldPosition(new V()); const hq = h.getWorldQuaternion(new Q()).invert();\n for (const b of bones) {\n const f = FINGER.exec(b.name); if (!f || f[3].toLowerCase() !== side) continue;\n const p = b.getWorldPosition(new V()).sub(hp).applyQuaternion(hq);\n inHand[b.name] = [p.x, p.y, p.z].map(R);\n }\n }\n frames.push({ t: Math.round(performance.now() - t0), body, inHand, localQ });\n if (frames.length >= n) {\n let rim = null, rimQ = null, rimNode = null, steer = null;\n try {\n const e = P.e(), root = e.object3d; const inv2 = P.inv();\n const rn = (e.interior && (e.interior.steeringRim || e.interior.steering)) || root.getObjectByName('steering_rim') || root.getObjectByName('steering');\n if (rn) { const pts = []; rn.traverse((m) => { if (m.isMesh && !m.isSkinnedMesh && m.geometry && m.geometry.attributes && m.geometry.attributes.position) P.meshPoints(m, inv2, 1500, pts); }); rim = pts.map(R); rimQ = P.bodyQuat(rn); rimNode = rn.name; }\n steer = e.controller && e.controller.input ? e.controller.input.steer : null;\n } catch (err) { /* keep nulls */ }\n resolve({ frames, rim, rimQ, rimNode, steer, hands: Object.keys(hands) });\n return;\n }\n requestAnimationFrame(step);\n };\n requestAnimationFrame(step);\n });\n /**\n * NIGHT for the inspection frames: the test grounds have no time-of-day control, so dim the world's sun, sky,\n * environment and exposure each frame (scene.onBeforeRender). The car's own lamps (spot lights, emissive lenses) are\n * untouched. Ported from the vehicle-pipeline harness. P.setNight(false) restores every value.\n */\n P.setNight = (on, dim) => {\n // dim: the fraction of the world's exposure kept (0.08 = black night, the harness's value; the inspection uses a dusk\n // level so the body still reads beside its lit lamps)\n const k = typeof dim === 'number' && dim > 0 ? dim : 0.08;\n const sc = P.sceneRoot();\n const st = (P.__night = P.__night || (() => {\n const o = { s: sc, lights: [], envI: sc.environmentIntensity, bgI: sc.backgroundIntensity, bg: sc.background && sc.background.isColor ? sc.background.getHex() : null, fog: sc.fog && sc.fog.color ? sc.fog.color.getHex() : null, sky: null, prev: sc.onBeforeRender, on: false };\n // every light of the WORLD (sun, sky fill, the test grounds' own spot lights on the pads); the car's own lamps stay\n const car = P.root();\n sc.traverse((l) => { if (l.isLight && !P.isUnder(l, car) && !/^portable-cabin-lamp|^portable-vehicle|headlamp|headlight/i.test(l.name || '')) o.lights.push({ l, i: l.intensity }); });\n for (const m of sc.children) if (m.isMesh && m.material && m.material.name === 'HosekWilkieSkyShader') { const u = m.material.uniforms; o.sky = { m, scale: u.radianceScale ? u.radianceScale.value : undefined, disc: u.showSunDisc ? u.showSunDisc.value : undefined }; }\n return o;\n })());\n if (on && !st.on) {\n st.s.onBeforeRender = function (...a) {\n const rd = a[0];\n if (rd && typeof rd.toneMappingExposure === 'number') { if (st.lastExp === undefined || rd.toneMappingExposure !== st.lastExp) st.baseExp = rd.toneMappingExposure; rd.toneMappingExposure = st.baseExp * k; st.lastExp = rd.toneMappingExposure; st.rd = rd; }\n for (const x of st.lights) x.l.intensity = x.i * k * 0.5;\n // the environment keeps a moonlit share so the body still reads beside its lamps\n st.s.environmentIntensity = Math.max(k * 0.4, Math.min(0.3, k * 0.9)); if (typeof st.s.backgroundIntensity === 'number') st.s.backgroundIntensity = k * 0.4;\n if (st.s.background && st.s.background.isColor) st.s.background.setRGB(0.004, 0.006, 0.012);\n if (st.s.fog && st.s.fog.color) st.s.fog.color.setRGB(0.004, 0.006, 0.012);\n if (st.sky) { const u = st.sky.m.material.uniforms; if (typeof st.sky.scale === 'number') u.radianceScale.value = st.sky.scale * 0.02; if (u.showSunDisc) u.showSunDisc.value = false; }\n return st.prev ? st.prev.apply(this, a) : undefined;\n };\n st.on = true;\n } else if (!on && st.on) {\n st.s.onBeforeRender = st.prev || (() => {}); st.on = false;\n if (st.rd && st.baseExp !== undefined) st.rd.toneMappingExposure = st.baseExp; st.lastExp = undefined;\n for (const x of st.lights) x.l.intensity = x.i;\n st.s.environmentIntensity = st.envI; if (st.bgI !== undefined) st.s.backgroundIntensity = st.bgI;\n if (st.bg != null) st.s.background.setHex(st.bg); if (st.fog != null) st.s.fog.color.setHex(st.fog);\n if (st.sky) { const u = st.sky.m.material.uniforms; if (st.sky.scale !== undefined) u.radianceScale.value = st.sky.scale; if (u.showSunDisc) u.showSunDisc.value = st.sky.disc; }\n }\n return st.on;\n };\n G.__vqaVeh = P;\n return true;\n})()"; /** Hide every positioned overlay (HUD, hints, menus) that does not contain the canvas, in one frame. */ export declare const HIDE_OVERLAYS = "(() => {\n const els = document.querySelectorAll('body *');\n let n = 0;\n for (const el of els) {\n if (el.tagName === 'CANVAS' || el.tagName === 'IFRAME' || el.dataset.vqaHidden) continue;\n const pos = getComputedStyle(el).position;\n if (pos !== 'fixed' && pos !== 'absolute' && pos !== 'sticky') continue;\n if (el.querySelector('canvas,iframe')) continue;\n el.dataset.vqaHidden = '1';\n el.style.setProperty('visibility', 'hidden', 'important');\n n++;\n }\n return n;\n})()";