@fchh/fcos-suite-map
Version:
This project contains a Map component that can be used to display relevant locations of a Fab City. It is a npm package that contains a React component, which can be embedded into other web projects. It uses Mapbox GL as an interactive mapping framework a
522 lines • 2.16 MB
JavaScript
import { g as Yv } from "./FabCityMap-9QXtX-mq.js";
function Kv(Mc, hp) {
for (var Cs = 0; Cs < hp.length; Cs++) {
const Rn = hp[Cs];
if (typeof Rn != "string" && !Array.isArray(Rn)) {
for (const Ps in Rn)
if (Ps !== "default" && !(Ps in Mc)) {
const ua = Object.getOwnPropertyDescriptor(Rn, Ps);
ua && Object.defineProperty(Mc, Ps, ua.get ? ua : {
enumerable: !0,
get: () => Rn[Ps]
});
}
}
}
return Object.freeze(Object.defineProperty(Mc, Symbol.toStringTag, { value: "Module" }));
}
var up = { exports: {} }, Jv = up.exports, Zy;
function Qv() {
return Zy || (Zy = 1, function(Mc, hp) {
(function(Cs, Rn) {
Mc.exports = Rn();
})(Jv, function() {
var Cs, Rn, Ps;
function ua(o, ir) {
if (!Cs)
Cs = ir;
else if (!Rn)
Rn = ir;
else {
var Fr = "self.onerror = function() { console.error('An error occurred while parsing the WebWorker bundle. This is most likely due to improper transpilation by Babel; please see https://docs.mapbox.com/mapbox-gl-js/guides/install/#transpiling'); }; var sharedChunk = {}; (" + Cs + ")(sharedChunk); (" + Rn + ")(sharedChunk); self.onerror = null;", Si = {};
Cs(Si), Ps = ir(Si), typeof window < "u" && window && window.URL && window.URL.createObjectURL && (Ps.workerUrl = window.URL.createObjectURL(new Blob([Fr], { type: "text/javascript" })));
}
}
ua(["exports"], function(o) {
function ir(n) {
return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
}
var Fr, Si = {}, yr = {};
function Ir() {
if (Fr) return yr;
Fr = 1, Object.defineProperty(yr, "__esModule", { value: !0 }), yr.setMatrixArrayType = function(l) {
yr.ARRAY_TYPE = e = l;
}, yr.toRadian = function(l) {
return l * s;
}, yr.equals = function(l, a) {
return Math.abs(l - a) <= n * Math.max(1, Math.abs(l), Math.abs(a));
}, yr.RANDOM = yr.ARRAY_TYPE = yr.EPSILON = void 0;
var n = 1e-6;
yr.EPSILON = n;
var e = typeof Float32Array < "u" ? Float32Array : Array;
yr.ARRAY_TYPE = e;
var i = Math.random;
yr.RANDOM = i;
var s = Math.PI / 180;
return Math.hypot || (Math.hypot = function() {
for (var l = 0, a = arguments.length; a--; ) l += arguments[a] * arguments[a];
return Math.sqrt(l);
}), yr;
}
var os, _i = {};
function oi() {
if (os) return _i;
function n(a) {
return n = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(h) {
return typeof h;
} : function(h) {
return h && typeof Symbol == "function" && h.constructor === Symbol && h !== Symbol.prototype ? "symbol" : typeof h;
}, n(a);
}
os = 1, Object.defineProperty(_i, "__esModule", { value: !0 }), _i.create = function() {
var a = new e.ARRAY_TYPE(4);
return e.ARRAY_TYPE != Float32Array && (a[1] = 0, a[2] = 0), a[0] = 1, a[3] = 1, a;
}, _i.clone = function(a) {
var h = new e.ARRAY_TYPE(4);
return h[0] = a[0], h[1] = a[1], h[2] = a[2], h[3] = a[3], h;
}, _i.copy = function(a, h) {
return a[0] = h[0], a[1] = h[1], a[2] = h[2], a[3] = h[3], a;
}, _i.identity = function(a) {
return a[0] = 1, a[1] = 0, a[2] = 0, a[3] = 1, a;
}, _i.fromValues = function(a, h, m, g) {
var v = new e.ARRAY_TYPE(4);
return v[0] = a, v[1] = h, v[2] = m, v[3] = g, v;
}, _i.set = function(a, h, m, g, v) {
return a[0] = h, a[1] = m, a[2] = g, a[3] = v, a;
}, _i.transpose = function(a, h) {
if (a === h) {
var m = h[1];
a[1] = h[2], a[2] = m;
} else a[0] = h[0], a[1] = h[2], a[2] = h[1], a[3] = h[3];
return a;
}, _i.invert = function(a, h) {
var m = h[0], g = h[1], v = h[2], p = h[3], y = m * p - v * g;
return y ? (a[0] = p * (y = 1 / y), a[1] = -g * y, a[2] = -v * y, a[3] = m * y, a) : null;
}, _i.adjoint = function(a, h) {
var m = h[0];
return a[0] = h[3], a[1] = -h[1], a[2] = -h[2], a[3] = m, a;
}, _i.determinant = function(a) {
return a[0] * a[3] - a[2] * a[1];
}, _i.multiply = s, _i.rotate = function(a, h, m) {
var g = h[0], v = h[1], p = h[2], y = h[3], w = Math.sin(m), x = Math.cos(m);
return a[0] = g * x + p * w, a[1] = v * x + y * w, a[2] = g * -w + p * x, a[3] = v * -w + y * x, a;
}, _i.scale = function(a, h, m) {
var g = h[1], v = h[2], p = h[3], y = m[0], w = m[1];
return a[0] = h[0] * y, a[1] = g * y, a[2] = v * w, a[3] = p * w, a;
}, _i.fromRotation = function(a, h) {
var m = Math.sin(h), g = Math.cos(h);
return a[0] = g, a[1] = m, a[2] = -m, a[3] = g, a;
}, _i.fromScaling = function(a, h) {
return a[0] = h[0], a[1] = 0, a[2] = 0, a[3] = h[1], a;
}, _i.str = function(a) {
return "mat2(" + a[0] + ", " + a[1] + ", " + a[2] + ", " + a[3] + ")";
}, _i.frob = function(a) {
return Math.hypot(a[0], a[1], a[2], a[3]);
}, _i.LDU = function(a, h, m, g) {
return a[2] = g[2] / g[0], m[0] = g[0], m[1] = g[1], m[3] = g[3] - a[2] * m[1], [a, h, m];
}, _i.add = function(a, h, m) {
return a[0] = h[0] + m[0], a[1] = h[1] + m[1], a[2] = h[2] + m[2], a[3] = h[3] + m[3], a;
}, _i.subtract = l, _i.exactEquals = function(a, h) {
return a[0] === h[0] && a[1] === h[1] && a[2] === h[2] && a[3] === h[3];
}, _i.equals = function(a, h) {
var m = a[0], g = a[1], v = a[2], p = a[3], y = h[0], w = h[1], x = h[2], b = h[3];
return Math.abs(m - y) <= e.EPSILON * Math.max(1, Math.abs(m), Math.abs(y)) && Math.abs(g - w) <= e.EPSILON * Math.max(1, Math.abs(g), Math.abs(w)) && Math.abs(v - x) <= e.EPSILON * Math.max(1, Math.abs(v), Math.abs(x)) && Math.abs(p - b) <= e.EPSILON * Math.max(1, Math.abs(p), Math.abs(b));
}, _i.multiplyScalar = function(a, h, m) {
return a[0] = h[0] * m, a[1] = h[1] * m, a[2] = h[2] * m, a[3] = h[3] * m, a;
}, _i.multiplyScalarAndAdd = function(a, h, m, g) {
return a[0] = h[0] + m[0] * g, a[1] = h[1] + m[1] * g, a[2] = h[2] + m[2] * g, a[3] = h[3] + m[3] * g, a;
}, _i.sub = _i.mul = void 0;
var e = function(a, h) {
if (a && a.__esModule) return a;
if (a === null || n(a) !== "object" && typeof a != "function") return { default: a };
var m = i(void 0);
if (m && m.has(a)) return m.get(a);
var g = {}, v = Object.defineProperty && Object.getOwnPropertyDescriptor;
for (var p in a) if (p !== "default" && Object.prototype.hasOwnProperty.call(a, p)) {
var y = v ? Object.getOwnPropertyDescriptor(a, p) : null;
y && (y.get || y.set) ? Object.defineProperty(g, p, y) : g[p] = a[p];
}
return g.default = a, m && m.set(a, g), g;
}(Ir());
function i(a) {
if (typeof WeakMap != "function") return null;
var h = /* @__PURE__ */ new WeakMap(), m = /* @__PURE__ */ new WeakMap();
return (i = function(g) {
return g ? m : h;
})(a);
}
function s(a, h, m) {
var g = h[0], v = h[1], p = h[2], y = h[3], w = m[0], x = m[1], b = m[2], S = m[3];
return a[0] = g * w + p * x, a[1] = v * w + y * x, a[2] = g * b + p * S, a[3] = v * b + y * S, a;
}
function l(a, h, m) {
return a[0] = h[0] - m[0], a[1] = h[1] - m[1], a[2] = h[2] - m[2], a[3] = h[3] - m[3], a;
}
return _i.mul = s, _i.sub = l, _i;
}
var Ar, ai = {};
function zs() {
if (Ar) return ai;
function n(a) {
return n = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(h) {
return typeof h;
} : function(h) {
return h && typeof Symbol == "function" && h.constructor === Symbol && h !== Symbol.prototype ? "symbol" : typeof h;
}, n(a);
}
Ar = 1, Object.defineProperty(ai, "__esModule", { value: !0 }), ai.create = function() {
var a = new e.ARRAY_TYPE(6);
return e.ARRAY_TYPE != Float32Array && (a[1] = 0, a[2] = 0, a[4] = 0, a[5] = 0), a[0] = 1, a[3] = 1, a;
}, ai.clone = function(a) {
var h = new e.ARRAY_TYPE(6);
return h[0] = a[0], h[1] = a[1], h[2] = a[2], h[3] = a[3], h[4] = a[4], h[5] = a[5], h;
}, ai.copy = function(a, h) {
return a[0] = h[0], a[1] = h[1], a[2] = h[2], a[3] = h[3], a[4] = h[4], a[5] = h[5], a;
}, ai.identity = function(a) {
return a[0] = 1, a[1] = 0, a[2] = 0, a[3] = 1, a[4] = 0, a[5] = 0, a;
}, ai.fromValues = function(a, h, m, g, v, p) {
var y = new e.ARRAY_TYPE(6);
return y[0] = a, y[1] = h, y[2] = m, y[3] = g, y[4] = v, y[5] = p, y;
}, ai.set = function(a, h, m, g, v, p, y) {
return a[0] = h, a[1] = m, a[2] = g, a[3] = v, a[4] = p, a[5] = y, a;
}, ai.invert = function(a, h) {
var m = h[0], g = h[1], v = h[2], p = h[3], y = h[4], w = h[5], x = m * p - g * v;
return x ? (a[0] = p * (x = 1 / x), a[1] = -g * x, a[2] = -v * x, a[3] = m * x, a[4] = (v * w - p * y) * x, a[5] = (g * y - m * w) * x, a) : null;
}, ai.determinant = function(a) {
return a[0] * a[3] - a[1] * a[2];
}, ai.multiply = s, ai.rotate = function(a, h, m) {
var g = h[0], v = h[1], p = h[2], y = h[3], w = h[4], x = h[5], b = Math.sin(m), S = Math.cos(m);
return a[0] = g * S + p * b, a[1] = v * S + y * b, a[2] = g * -b + p * S, a[3] = v * -b + y * S, a[4] = w, a[5] = x, a;
}, ai.scale = function(a, h, m) {
var g = h[1], v = h[2], p = h[3], y = h[4], w = h[5], x = m[0], b = m[1];
return a[0] = h[0] * x, a[1] = g * x, a[2] = v * b, a[3] = p * b, a[4] = y, a[5] = w, a;
}, ai.translate = function(a, h, m) {
var g = h[0], v = h[1], p = h[2], y = h[3], w = h[4], x = h[5], b = m[0], S = m[1];
return a[0] = g, a[1] = v, a[2] = p, a[3] = y, a[4] = g * b + p * S + w, a[5] = v * b + y * S + x, a;
}, ai.fromRotation = function(a, h) {
var m = Math.sin(h), g = Math.cos(h);
return a[0] = g, a[1] = m, a[2] = -m, a[3] = g, a[4] = 0, a[5] = 0, a;
}, ai.fromScaling = function(a, h) {
return a[0] = h[0], a[1] = 0, a[2] = 0, a[3] = h[1], a[4] = 0, a[5] = 0, a;
}, ai.fromTranslation = function(a, h) {
return a[0] = 1, a[1] = 0, a[2] = 0, a[3] = 1, a[4] = h[0], a[5] = h[1], a;
}, ai.str = function(a) {
return "mat2d(" + a[0] + ", " + a[1] + ", " + a[2] + ", " + a[3] + ", " + a[4] + ", " + a[5] + ")";
}, ai.frob = function(a) {
return Math.hypot(a[0], a[1], a[2], a[3], a[4], a[5], 1);
}, ai.add = function(a, h, m) {
return a[0] = h[0] + m[0], a[1] = h[1] + m[1], a[2] = h[2] + m[2], a[3] = h[3] + m[3], a[4] = h[4] + m[4], a[5] = h[5] + m[5], a;
}, ai.subtract = l, ai.multiplyScalar = function(a, h, m) {
return a[0] = h[0] * m, a[1] = h[1] * m, a[2] = h[2] * m, a[3] = h[3] * m, a[4] = h[4] * m, a[5] = h[5] * m, a;
}, ai.multiplyScalarAndAdd = function(a, h, m, g) {
return a[0] = h[0] + m[0] * g, a[1] = h[1] + m[1] * g, a[2] = h[2] + m[2] * g, a[3] = h[3] + m[3] * g, a[4] = h[4] + m[4] * g, a[5] = h[5] + m[5] * g, a;
}, ai.exactEquals = function(a, h) {
return a[0] === h[0] && a[1] === h[1] && a[2] === h[2] && a[3] === h[3] && a[4] === h[4] && a[5] === h[5];
}, ai.equals = function(a, h) {
var m = a[0], g = a[1], v = a[2], p = a[3], y = a[4], w = a[5], x = h[0], b = h[1], S = h[2], A = h[3], C = h[4], L = h[5];
return Math.abs(m - x) <= e.EPSILON * Math.max(1, Math.abs(m), Math.abs(x)) && Math.abs(g - b) <= e.EPSILON * Math.max(1, Math.abs(g), Math.abs(b)) && Math.abs(v - S) <= e.EPSILON * Math.max(1, Math.abs(v), Math.abs(S)) && Math.abs(p - A) <= e.EPSILON * Math.max(1, Math.abs(p), Math.abs(A)) && Math.abs(y - C) <= e.EPSILON * Math.max(1, Math.abs(y), Math.abs(C)) && Math.abs(w - L) <= e.EPSILON * Math.max(1, Math.abs(w), Math.abs(L));
}, ai.sub = ai.mul = void 0;
var e = function(a, h) {
if (a && a.__esModule) return a;
if (a === null || n(a) !== "object" && typeof a != "function") return { default: a };
var m = i(void 0);
if (m && m.has(a)) return m.get(a);
var g = {}, v = Object.defineProperty && Object.getOwnPropertyDescriptor;
for (var p in a) if (p !== "default" && Object.prototype.hasOwnProperty.call(a, p)) {
var y = v ? Object.getOwnPropertyDescriptor(a, p) : null;
y && (y.get || y.set) ? Object.defineProperty(g, p, y) : g[p] = a[p];
}
return g.default = a, m && m.set(a, g), g;
}(Ir());
function i(a) {
if (typeof WeakMap != "function") return null;
var h = /* @__PURE__ */ new WeakMap(), m = /* @__PURE__ */ new WeakMap();
return (i = function(g) {
return g ? m : h;
})(a);
}
function s(a, h, m) {
var g = h[0], v = h[1], p = h[2], y = h[3], w = h[4], x = h[5], b = m[0], S = m[1], A = m[2], C = m[3], L = m[4], R = m[5];
return a[0] = g * b + p * S, a[1] = v * b + y * S, a[2] = g * A + p * C, a[3] = v * A + y * C, a[4] = g * L + p * R + w, a[5] = v * L + y * R + x, a;
}
function l(a, h, m) {
return a[0] = h[0] - m[0], a[1] = h[1] - m[1], a[2] = h[2] - m[2], a[3] = h[3] - m[3], a[4] = h[4] - m[4], a[5] = h[5] - m[5], a;
}
return ai.mul = s, ai.sub = l, ai;
}
var ha, si = {};
function da() {
if (ha) return si;
function n(a) {
return n = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(h) {
return typeof h;
} : function(h) {
return h && typeof Symbol == "function" && h.constructor === Symbol && h !== Symbol.prototype ? "symbol" : typeof h;
}, n(a);
}
ha = 1, Object.defineProperty(si, "__esModule", { value: !0 }), si.create = function() {
var a = new e.ARRAY_TYPE(9);
return e.ARRAY_TYPE != Float32Array && (a[1] = 0, a[2] = 0, a[3] = 0, a[5] = 0, a[6] = 0, a[7] = 0), a[0] = 1, a[4] = 1, a[8] = 1, a;
}, si.fromMat4 = function(a, h) {
return a[0] = h[0], a[1] = h[1], a[2] = h[2], a[3] = h[4], a[4] = h[5], a[5] = h[6], a[6] = h[8], a[7] = h[9], a[8] = h[10], a;
}, si.clone = function(a) {
var h = new e.ARRAY_TYPE(9);
return h[0] = a[0], h[1] = a[1], h[2] = a[2], h[3] = a[3], h[4] = a[4], h[5] = a[5], h[6] = a[6], h[7] = a[7], h[8] = a[8], h;
}, si.copy = function(a, h) {
return a[0] = h[0], a[1] = h[1], a[2] = h[2], a[3] = h[3], a[4] = h[4], a[5] = h[5], a[6] = h[6], a[7] = h[7], a[8] = h[8], a;
}, si.fromValues = function(a, h, m, g, v, p, y, w, x) {
var b = new e.ARRAY_TYPE(9);
return b[0] = a, b[1] = h, b[2] = m, b[3] = g, b[4] = v, b[5] = p, b[6] = y, b[7] = w, b[8] = x, b;
}, si.set = function(a, h, m, g, v, p, y, w, x, b) {
return a[0] = h, a[1] = m, a[2] = g, a[3] = v, a[4] = p, a[5] = y, a[6] = w, a[7] = x, a[8] = b, a;
}, si.identity = function(a) {
return a[0] = 1, a[1] = 0, a[2] = 0, a[3] = 0, a[4] = 1, a[5] = 0, a[6] = 0, a[7] = 0, a[8] = 1, a;
}, si.transpose = function(a, h) {
if (a === h) {
var m = h[1], g = h[2], v = h[5];
a[1] = h[3], a[2] = h[6], a[3] = m, a[5] = h[7], a[6] = g, a[7] = v;
} else a[0] = h[0], a[1] = h[3], a[2] = h[6], a[3] = h[1], a[4] = h[4], a[5] = h[7], a[6] = h[2], a[7] = h[5], a[8] = h[8];
return a;
}, si.invert = function(a, h) {
var m = h[0], g = h[1], v = h[2], p = h[3], y = h[4], w = h[5], x = h[6], b = h[7], S = h[8], A = S * y - w * b, C = -S * p + w * x, L = b * p - y * x, R = m * A + g * C + v * L;
return R ? (a[0] = A * (R = 1 / R), a[1] = (-S * g + v * b) * R, a[2] = (w * g - v * y) * R, a[3] = C * R, a[4] = (S * m - v * x) * R, a[5] = (-w * m + v * p) * R, a[6] = L * R, a[7] = (-b * m + g * x) * R, a[8] = (y * m - g * p) * R, a) : null;
}, si.adjoint = function(a, h) {
var m = h[0], g = h[1], v = h[2], p = h[3], y = h[4], w = h[5], x = h[6], b = h[7], S = h[8];
return a[0] = y * S - w * b, a[1] = v * b - g * S, a[2] = g * w - v * y, a[3] = w * x - p * S, a[4] = m * S - v * x, a[5] = v * p - m * w, a[6] = p * b - y * x, a[7] = g * x - m * b, a[8] = m * y - g * p, a;
}, si.determinant = function(a) {
var h = a[3], m = a[4], g = a[5], v = a[6], p = a[7], y = a[8];
return a[0] * (y * m - g * p) + a[1] * (-y * h + g * v) + a[2] * (p * h - m * v);
}, si.multiply = s, si.translate = function(a, h, m) {
var g = h[0], v = h[1], p = h[2], y = h[3], w = h[4], x = h[5], b = h[6], S = h[7], A = h[8], C = m[0], L = m[1];
return a[0] = g, a[1] = v, a[2] = p, a[3] = y, a[4] = w, a[5] = x, a[6] = C * g + L * y + b, a[7] = C * v + L * w + S, a[8] = C * p + L * x + A, a;
}, si.rotate = function(a, h, m) {
var g = h[0], v = h[1], p = h[2], y = h[3], w = h[4], x = h[5], b = h[6], S = h[7], A = h[8], C = Math.sin(m), L = Math.cos(m);
return a[0] = L * g + C * y, a[1] = L * v + C * w, a[2] = L * p + C * x, a[3] = L * y - C * g, a[4] = L * w - C * v, a[5] = L * x - C * p, a[6] = b, a[7] = S, a[8] = A, a;
}, si.scale = function(a, h, m) {
var g = m[0], v = m[1];
return a[0] = g * h[0], a[1] = g * h[1], a[2] = g * h[2], a[3] = v * h[3], a[4] = v * h[4], a[5] = v * h[5], a[6] = h[6], a[7] = h[7], a[8] = h[8], a;
}, si.fromTranslation = function(a, h) {
return a[0] = 1, a[1] = 0, a[2] = 0, a[3] = 0, a[4] = 1, a[5] = 0, a[6] = h[0], a[7] = h[1], a[8] = 1, a;
}, si.fromRotation = function(a, h) {
var m = Math.sin(h), g = Math.cos(h);
return a[0] = g, a[1] = m, a[2] = 0, a[3] = -m, a[4] = g, a[5] = 0, a[6] = 0, a[7] = 0, a[8] = 1, a;
}, si.fromScaling = function(a, h) {
return a[0] = h[0], a[1] = 0, a[2] = 0, a[3] = 0, a[4] = h[1], a[5] = 0, a[6] = 0, a[7] = 0, a[8] = 1, a;
}, si.fromMat2d = function(a, h) {
return a[0] = h[0], a[1] = h[1], a[2] = 0, a[3] = h[2], a[4] = h[3], a[5] = 0, a[6] = h[4], a[7] = h[5], a[8] = 1, a;
}, si.fromQuat = function(a, h) {
var m = h[0], g = h[1], v = h[2], p = h[3], y = m + m, w = g + g, x = v + v, b = m * y, S = g * y, A = g * w, C = v * y, L = v * w, R = v * x, D = p * y, k = p * w, B = p * x;
return a[0] = 1 - A - R, a[3] = S - B, a[6] = C + k, a[1] = S + B, a[4] = 1 - b - R, a[7] = L - D, a[2] = C - k, a[5] = L + D, a[8] = 1 - b - A, a;
}, si.normalFromMat4 = function(a, h) {
var m = h[0], g = h[1], v = h[2], p = h[3], y = h[4], w = h[5], x = h[6], b = h[7], S = h[8], A = h[9], C = h[10], L = h[11], R = h[12], D = h[13], k = h[14], B = h[15], V = m * w - g * y, W = m * x - v * y, Z = m * b - p * y, H = g * x - v * w, ne = g * b - p * w, Y = v * b - p * x, se = S * D - A * R, he = S * k - C * R, ce = S * B - L * R, fe = A * k - C * D, pe = A * B - L * D, ve = C * B - L * k, ge = V * ve - W * pe + Z * fe + H * ce - ne * he + Y * se;
return ge ? (a[0] = (w * ve - x * pe + b * fe) * (ge = 1 / ge), a[1] = (x * ce - y * ve - b * he) * ge, a[2] = (y * pe - w * ce + b * se) * ge, a[3] = (v * pe - g * ve - p * fe) * ge, a[4] = (m * ve - v * ce + p * he) * ge, a[5] = (g * ce - m * pe - p * se) * ge, a[6] = (D * Y - k * ne + B * H) * ge, a[7] = (k * Z - R * Y - B * W) * ge, a[8] = (R * ne - D * Z + B * V) * ge, a) : null;
}, si.projection = function(a, h, m) {
return a[0] = 2 / h, a[1] = 0, a[2] = 0, a[3] = 0, a[4] = -2 / m, a[5] = 0, a[6] = -1, a[7] = 1, a[8] = 1, a;
}, si.str = function(a) {
return "mat3(" + a[0] + ", " + a[1] + ", " + a[2] + ", " + a[3] + ", " + a[4] + ", " + a[5] + ", " + a[6] + ", " + a[7] + ", " + a[8] + ")";
}, si.frob = function(a) {
return Math.hypot(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8]);
}, si.add = function(a, h, m) {
return a[0] = h[0] + m[0], a[1] = h[1] + m[1], a[2] = h[2] + m[2], a[3] = h[3] + m[3], a[4] = h[4] + m[4], a[5] = h[5] + m[5], a[6] = h[6] + m[6], a[7] = h[7] + m[7], a[8] = h[8] + m[8], a;
}, si.subtract = l, si.multiplyScalar = function(a, h, m) {
return a[0] = h[0] * m, a[1] = h[1] * m, a[2] = h[2] * m, a[3] = h[3] * m, a[4] = h[4] * m, a[5] = h[5] * m, a[6] = h[6] * m, a[7] = h[7] * m, a[8] = h[8] * m, a;
}, si.multiplyScalarAndAdd = function(a, h, m, g) {
return a[0] = h[0] + m[0] * g, a[1] = h[1] + m[1] * g, a[2] = h[2] + m[2] * g, a[3] = h[3] + m[3] * g, a[4] = h[4] + m[4] * g, a[5] = h[5] + m[5] * g, a[6] = h[6] + m[6] * g, a[7] = h[7] + m[7] * g, a[8] = h[8] + m[8] * g, a;
}, si.exactEquals = function(a, h) {
return a[0] === h[0] && a[1] === h[1] && a[2] === h[2] && a[3] === h[3] && a[4] === h[4] && a[5] === h[5] && a[6] === h[6] && a[7] === h[7] && a[8] === h[8];
}, si.equals = function(a, h) {
var m = a[0], g = a[1], v = a[2], p = a[3], y = a[4], w = a[5], x = a[6], b = a[7], S = a[8], A = h[0], C = h[1], L = h[2], R = h[3], D = h[4], k = h[5], B = h[6], V = h[7], W = h[8];
return Math.abs(m - A) <= e.EPSILON * Math.max(1, Math.abs(m), Math.abs(A)) && Math.abs(g - C) <= e.EPSILON * Math.max(1, Math.abs(g), Math.abs(C)) && Math.abs(v - L) <= e.EPSILON * Math.max(1, Math.abs(v), Math.abs(L)) && Math.abs(p - R) <= e.EPSILON * Math.max(1, Math.abs(p), Math.abs(R)) && Math.abs(y - D) <= e.EPSILON * Math.max(1, Math.abs(y), Math.abs(D)) && Math.abs(w - k) <= e.EPSILON * Math.max(1, Math.abs(w), Math.abs(k)) && Math.abs(x - B) <= e.EPSILON * Math.max(1, Math.abs(x), Math.abs(B)) && Math.abs(b - V) <= e.EPSILON * Math.max(1, Math.abs(b), Math.abs(V)) && Math.abs(S - W) <= e.EPSILON * Math.max(1, Math.abs(S), Math.abs(W));
}, si.sub = si.mul = void 0;
var e = function(a, h) {
if (a && a.__esModule) return a;
if (a === null || n(a) !== "object" && typeof a != "function") return { default: a };
var m = i(void 0);
if (m && m.has(a)) return m.get(a);
var g = {}, v = Object.defineProperty && Object.getOwnPropertyDescriptor;
for (var p in a) if (p !== "default" && Object.prototype.hasOwnProperty.call(a, p)) {
var y = v ? Object.getOwnPropertyDescriptor(a, p) : null;
y && (y.get || y.set) ? Object.defineProperty(g, p, y) : g[p] = a[p];
}
return g.default = a, m && m.set(a, g), g;
}(Ir());
function i(a) {
if (typeof WeakMap != "function") return null;
var h = /* @__PURE__ */ new WeakMap(), m = /* @__PURE__ */ new WeakMap();
return (i = function(g) {
return g ? m : h;
})(a);
}
function s(a, h, m) {
var g = h[0], v = h[1], p = h[2], y = h[3], w = h[4], x = h[5], b = h[6], S = h[7], A = h[8], C = m[0], L = m[1], R = m[2], D = m[3], k = m[4], B = m[5], V = m[6], W = m[7], Z = m[8];
return a[0] = C * g + L * y + R * b, a[1] = C * v + L * w + R * S, a[2] = C * p + L * x + R * A, a[3] = D * g + k * y + B * b, a[4] = D * v + k * w + B * S, a[5] = D * p + k * x + B * A, a[6] = V * g + W * y + Z * b, a[7] = V * v + W * w + Z * S, a[8] = V * p + W * x + Z * A, a;
}
function l(a, h, m) {
return a[0] = h[0] - m[0], a[1] = h[1] - m[1], a[2] = h[2] - m[2], a[3] = h[3] - m[3], a[4] = h[4] - m[4], a[5] = h[5] - m[5], a[6] = h[6] - m[6], a[7] = h[7] - m[7], a[8] = h[8] - m[8], a;
}
return si.mul = s, si.sub = l, si;
}
var io, bt = {};
function as() {
if (io) return bt;
function n(p) {
return n = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(y) {
return typeof y;
} : function(y) {
return y && typeof Symbol == "function" && y.constructor === Symbol && y !== Symbol.prototype ? "symbol" : typeof y;
}, n(p);
}
io = 1, Object.defineProperty(bt, "__esModule", { value: !0 }), bt.create = function() {
var p = new e.ARRAY_TYPE(16);
return e.ARRAY_TYPE != Float32Array && (p[1] = 0, p[2] = 0, p[3] = 0, p[4] = 0, p[6] = 0, p[7] = 0, p[8] = 0, p[9] = 0, p[11] = 0, p[12] = 0, p[13] = 0, p[14] = 0), p[0] = 1, p[5] = 1, p[10] = 1, p[15] = 1, p;
}, bt.clone = function(p) {
var y = new e.ARRAY_TYPE(16);
return y[0] = p[0], y[1] = p[1], y[2] = p[2], y[3] = p[3], y[4] = p[4], y[5] = p[5], y[6] = p[6], y[7] = p[7], y[8] = p[8], y[9] = p[9], y[10] = p[10], y[11] = p[11], y[12] = p[12], y[13] = p[13], y[14] = p[14], y[15] = p[15], y;
}, bt.copy = function(p, y) {
return p[0] = y[0], p[1] = y[1], p[2] = y[2], p[3] = y[3], p[4] = y[4], p[5] = y[5], p[6] = y[6], p[7] = y[7], p[8] = y[8], p[9] = y[9], p[10] = y[10], p[11] = y[11], p[12] = y[12], p[13] = y[13], p[14] = y[14], p[15] = y[15], p;
}, bt.fromValues = function(p, y, w, x, b, S, A, C, L, R, D, k, B, V, W, Z) {
var H = new e.ARRAY_TYPE(16);
return H[0] = p, H[1] = y, H[2] = w, H[3] = x, H[4] = b, H[5] = S, H[6] = A, H[7] = C, H[8] = L, H[9] = R, H[10] = D, H[11] = k, H[12] = B, H[13] = V, H[14] = W, H[15] = Z, H;
}, bt.set = function(p, y, w, x, b, S, A, C, L, R, D, k, B, V, W, Z, H) {
return p[0] = y, p[1] = w, p[2] = x, p[3] = b, p[4] = S, p[5] = A, p[6] = C, p[7] = L, p[8] = R, p[9] = D, p[10] = k, p[11] = B, p[12] = V, p[13] = W, p[14] = Z, p[15] = H, p;
}, bt.identity = s, bt.transpose = function(p, y) {
if (p === y) {
var w = y[1], x = y[2], b = y[3], S = y[6], A = y[7], C = y[11];
p[1] = y[4], p[2] = y[8], p[3] = y[12], p[4] = w, p[6] = y[9], p[7] = y[13], p[8] = x, p[9] = S, p[11] = y[14], p[12] = b, p[13] = A, p[14] = C;
} else p[0] = y[0], p[1] = y[4], p[2] = y[8], p[3] = y[12], p[4] = y[1], p[5] = y[5], p[6] = y[9], p[7] = y[13], p[8] = y[2], p[9] = y[6], p[10] = y[10], p[11] = y[14], p[12] = y[3], p[13] = y[7], p[14] = y[11], p[15] = y[15];
return p;
}, bt.invert = function(p, y) {
var w = y[0], x = y[1], b = y[2], S = y[3], A = y[4], C = y[5], L = y[6], R = y[7], D = y[8], k = y[9], B = y[10], V = y[11], W = y[12], Z = y[13], H = y[14], ne = y[15], Y = w * C - x * A, se = w * L - b * A, he = w * R - S * A, ce = x * L - b * C, fe = x * R - S * C, pe = b * R - S * L, ve = D * Z - k * W, ge = D * H - B * W, be = D * ne - V * W, Be = k * H - B * Z, ke = k * ne - V * Z, et = B * ne - V * H, Ve = Y * et - se * ke + he * Be + ce * be - fe * ge + pe * ve;
return Ve ? (p[0] = (C * et - L * ke + R * Be) * (Ve = 1 / Ve), p[1] = (b * ke - x * et - S * Be) * Ve, p[2] = (Z * pe - H * fe + ne * ce) * Ve, p[3] = (B * fe - k * pe - V * ce) * Ve, p[4] = (L * be - A * et - R * ge) * Ve, p[5] = (w * et - b * be + S * ge) * Ve, p[6] = (H * he - W * pe - ne * se) * Ve, p[7] = (D * pe - B * he + V * se) * Ve, p[8] = (A * ke - C * be + R * ve) * Ve, p[9] = (x * be - w * ke - S * ve) * Ve, p[10] = (W * fe - Z * he + ne * Y) * Ve, p[11] = (k * he - D * fe - V * Y) * Ve, p[12] = (C * ge - A * Be - L * ve) * Ve, p[13] = (w * Be - x * ge + b * ve) * Ve, p[14] = (Z * se - W * ce - H * Y) * Ve, p[15] = (D * ce - k * se + B * Y) * Ve, p) : null;
}, bt.adjoint = function(p, y) {
var w = y[0], x = y[1], b = y[2], S = y[3], A = y[4], C = y[5], L = y[6], R = y[7], D = y[8], k = y[9], B = y[10], V = y[11], W = y[12], Z = y[13], H = y[14], ne = y[15];
return p[0] = C * (B * ne - V * H) - k * (L * ne - R * H) + Z * (L * V - R * B), p[1] = -(x * (B * ne - V * H) - k * (b * ne - S * H) + Z * (b * V - S * B)), p[2] = x * (L * ne - R * H) - C * (b * ne - S * H) + Z * (b * R - S * L), p[3] = -(x * (L * V - R * B) - C * (b * V - S * B) + k * (b * R - S * L)), p[4] = -(A * (B * ne - V * H) - D * (L * ne - R * H) + W * (L * V - R * B)), p[5] = w * (B * ne - V * H) - D * (b * ne - S * H) + W * (b * V - S * B), p[6] = -(w * (L * ne - R * H) - A * (b * ne - S * H) + W * (b * R - S * L)), p[7] = w * (L * V - R * B) - A * (b * V - S * B) + D * (b * R - S * L), p[8] = A * (k * ne - V * Z) - D * (C * ne - R * Z) + W * (C * V - R * k), p[9] = -(w * (k * ne - V * Z) - D * (x * ne - S * Z) + W * (x * V - S * k)), p[10] = w * (C * ne - R * Z) - A * (x * ne - S * Z) + W * (x * R - S * C), p[11] = -(w * (C * V - R * k) - A * (x * V - S * k) + D * (x * R - S * C)), p[12] = -(A * (k * H - B * Z) - D * (C * H - L * Z) + W * (C * B - L * k)), p[13] = w * (k * H - B * Z) - D * (x * H - b * Z) + W * (x * B - b * k), p[14] = -(w * (C * H - L * Z) - A * (x * H - b * Z) + W * (x * L - b * C)), p[15] = w * (C * B - L * k) - A * (x * B - b * k) + D * (x * L - b * C), p;
}, bt.determinant = function(p) {
var y = p[0], w = p[1], x = p[2], b = p[3], S = p[4], A = p[5], C = p[6], L = p[7], R = p[8], D = p[9], k = p[10], B = p[11], V = p[12], W = p[13], Z = p[14], H = p[15];
return (y * A - w * S) * (k * H - B * Z) - (y * C - x * S) * (D * H - B * W) + (y * L - b * S) * (D * Z - k * W) + (w * C - x * A) * (R * H - B * V) - (w * L - b * A) * (R * Z - k * V) + (x * L - b * C) * (R * W - D * V);
}, bt.multiply = l, bt.translate = function(p, y, w) {
var x, b, S, A, C, L, R, D, k, B, V, W, Z = w[0], H = w[1], ne = w[2];
return y === p ? (p[12] = y[0] * Z + y[4] * H + y[8] * ne + y[12], p[13] = y[1] * Z + y[5] * H + y[9] * ne + y[13], p[14] = y[2] * Z + y[6] * H + y[10] * ne + y[14], p[15] = y[3] * Z + y[7] * H + y[11] * ne + y[15]) : (b = y[1], S = y[2], A = y[3], C = y[4], L = y[5], R = y[6], D = y[7], k = y[8], B = y[9], V = y[10], W = y[11], p[0] = x = y[0], p[1] = b, p[2] = S, p[3] = A, p[4] = C, p[5] = L, p[6] = R, p[7] = D, p[8] = k, p[9] = B, p[10] = V, p[11] = W, p[12] = x * Z + C * H + k * ne + y[12], p[13] = b * Z + L * H + B * ne + y[13], p[14] = S * Z + R * H + V * ne + y[14], p[15] = A * Z + D * H + W * ne + y[15]), p;
}, bt.scale = function(p, y, w) {
var x = w[0], b = w[1], S = w[2];
return p[0] = y[0] * x, p[1] = y[1] * x, p[2] = y[2] * x, p[3] = y[3] * x, p[4] = y[4] * b, p[5] = y[5] * b, p[6] = y[6] * b, p[7] = y[7] * b, p[8] = y[8] * S, p[9] = y[9] * S, p[10] = y[10] * S, p[11] = y[11] * S, p[12] = y[12], p[13] = y[13], p[14] = y[14], p[15] = y[15], p;
}, bt.rotate = function(p, y, w, x) {
var b, S, A, C, L, R, D, k, B, V, W, Z, H, ne, Y, se, he, ce, fe, pe, ve, ge, be, Be, ke = x[0], et = x[1], Ve = x[2], qe = Math.hypot(ke, et, Ve);
return qe < e.EPSILON ? null : (ke *= qe = 1 / qe, et *= qe, Ve *= qe, b = Math.sin(w), S = Math.cos(w), L = y[1], R = y[2], D = y[3], B = y[5], V = y[6], W = y[7], H = y[9], ne = y[10], Y = y[11], se = ke * ke * (A = 1 - S) + S, fe = ke * et * A - Ve * b, pe = et * et * A + S, ve = Ve * et * A + ke * b, ge = ke * Ve * A + et * b, be = et * Ve * A - ke * b, Be = Ve * Ve * A + S, p[0] = (C = y[0]) * se + (k = y[4]) * (he = et * ke * A + Ve * b) + (Z = y[8]) * (ce = Ve * ke * A - et * b), p[1] = L * se + B * he + H * ce, p[2] = R * se + V * he + ne * ce, p[3] = D * se + W * he + Y * ce, p[4] = C * fe + k * pe + Z * ve, p[5] = L * fe + B * pe + H * ve, p[6] = R * fe + V * pe + ne * ve, p[7] = D * fe + W * pe + Y * ve, p[8] = C * ge + k * be + Z * Be, p[9] = L * ge + B * be + H * Be, p[10] = R * ge + V * be + ne * Be, p[11] = D * ge + W * be + Y * Be, y !== p && (p[12] = y[12], p[13] = y[13], p[14] = y[14], p[15] = y[15]), p);
}, bt.rotateX = function(p, y, w) {
var x = Math.sin(w), b = Math.cos(w), S = y[4], A = y[5], C = y[6], L = y[7], R = y[8], D = y[9], k = y[10], B = y[11];
return y !== p && (p[0] = y[0], p[1] = y[1], p[2] = y[2], p[3] = y[3], p[12] = y[12], p[13] = y[13], p[14] = y[14], p[15] = y[15]), p[4] = S * b + R * x, p[5] = A * b + D * x, p[6] = C * b + k * x, p[7] = L * b + B * x, p[8] = R * b - S * x, p[9] = D * b - A * x, p[10] = k * b - C * x, p[11] = B * b - L * x, p;
}, bt.rotateY = function(p, y, w) {
var x = Math.sin(w), b = Math.cos(w), S = y[0], A = y[1], C = y[2], L = y[3], R = y[8], D = y[9], k = y[10], B = y[11];
return y !== p && (p[4] = y[4], p[5] = y[5], p[6] = y[6], p[7] = y[7], p[12] = y[12], p[13] = y[13], p[14] = y[14], p[15] = y[15]), p[0] = S * b - R * x, p[1] = A * b - D * x, p[2] = C * b - k * x, p[3] = L * b - B * x, p[8] = S * x + R * b, p[9] = A * x + D * b, p[10] = C * x + k * b, p[11] = L * x + B * b, p;
}, bt.rotateZ = function(p, y, w) {
var x = Math.sin(w), b = Math.cos(w), S = y[0], A = y[1], C = y[2], L = y[3], R = y[4], D = y[5], k = y[6], B = y[7];
return y !== p && (p[8] = y[8], p[9] = y[9], p[10] = y[10], p[11] = y[11], p[12] = y[12], p[13] = y[13], p[14] = y[14], p[15] = y[15]), p[0] = S * b + R * x, p[1] = A * b + D * x, p[2] = C * b + k * x, p[3] = L * b + B * x, p[4] = R * b - S * x, p[5] = D * b - A * x, p[6] = k * b - C * x, p[7] = B * b - L * x, p;
}, bt.fromTranslation = function(p, y) {
return p[0] = 1, p[1] = 0, p[2] = 0, p[3] = 0, p[4] = 0, p[5] = 1, p[6] = 0, p[7] = 0, p[8] = 0, p[9] = 0, p[10] = 1, p[11] = 0, p[12] = y[0], p[13] = y[1], p[14] = y[2], p[15] = 1, p;
}, bt.fromScaling = function(p, y) {
return p[0] = y[0], p[1] = 0, p[2] = 0, p[3] = 0, p[4] = 0, p[5] = y[1], p[6] = 0, p[7] = 0, p[8] = 0, p[9] = 0, p[10] = y[2], p[11] = 0, p[12] = 0, p[13] = 0, p[14] = 0, p[15] = 1, p;
}, bt.fromRotation = function(p, y, w) {
var x, b, S, A = w[0], C = w[1], L = w[2], R = Math.hypot(A, C, L);
return R < e.EPSILON ? null : (A *= R = 1 / R, C *= R, L *= R, x = Math.sin(y), b = Math.cos(y), p[0] = A * A * (S = 1 - b) + b, p[1] = C * A * S + L * x, p[2] = L * A * S - C * x, p[3] = 0, p[4] = A * C * S - L * x, p[5] = C * C * S + b, p[6] = L * C * S + A * x, p[7] = 0, p[8] = A * L * S + C * x, p[9] = C * L * S - A * x, p[10] = L * L * S + b, p[11] = 0, p[12] = 0, p[13] = 0, p[14] = 0, p[15] = 1, p);
}, bt.fromXRotation = function(p, y) {
var w = Math.sin(y), x = Math.cos(y);
return p[0] = 1, p[1] = 0, p[2] = 0, p[3] = 0, p[4] = 0, p[5] = x, p[6] = w, p[7] = 0, p[8] = 0, p[9] = -w, p[10] = x, p[11] = 0, p[12] = 0, p[13] = 0, p[14] = 0, p[15] = 1, p;
}, bt.fromYRotation = function(p, y) {
var w = Math.sin(y), x = Math.cos(y);
return p[0] = x, p[1] = 0, p[2] = -w, p[3] = 0, p[4] = 0, p[5] = 1, p[6] = 0, p[7] = 0, p[8] = w, p[9] = 0, p[10] = x, p[11] = 0, p[12] = 0, p[13] = 0, p[14] = 0, p[15] = 1, p;
}, bt.fromZRotation = function(p, y) {
var w = Math.sin(y), x = Math.cos(y);
return p[0] = x, p[1] = w, p[2] = 0, p[3] = 0, p[4] = -w, p[5] = x, p[6] = 0, p[7] = 0, p[8] = 0, p[9] = 0, p[10] = 1, p[11] = 0, p[12] = 0, p[13] = 0, p[14] = 0, p[15] = 1, p;
}, bt.fromRotationTranslation = a, bt.fromQuat2 = function(p, y) {
var w = new e.ARRAY_TYPE(3), x = -y[0], b = -y[1], S = -y[2], A = y[3], C = y[4], L = y[5], R = y[6], D = y[7], k = x * x + b * b + S * S + A * A;
return k > 0 ? (w[0] = 2 * (C * A + D * x + L * S - R * b) / k, w[1] = 2 * (L * A + D * b + R * x - C * S) / k, w[2] = 2 * (R * A + D * S + C * b - L * x) / k) : (w[0] = 2 * (C * A + D * x + L * S - R * b), w[1] = 2 * (L * A + D * b + R * x - C * S), w[2] = 2 * (R * A + D * S + C * b - L * x)), a(p, y, w), p;
}, bt.getTranslation = function(p, y) {
return p[0] = y[12], p[1] = y[13], p[2] = y[14], p;
}, bt.getScaling = h, bt.getRotation = function(p, y) {
var w = new e.ARRAY_TYPE(3);
h(w, y);
var x = 1 / w[0], b = 1 / w[1], S = 1 / w[2], A = y[0] * x, C = y[1] * b, L = y[2] * S, R = y[4] * x, D = y[5] * b, k = y[6] * S, B = y[8] * x, V = y[9] * b, W = y[10] * S, Z = A + D + W, H = 0;
return Z > 0 ? (H = 2 * Math.sqrt(Z + 1), p[3] = 0.25 * H, p[0] = (k - V) / H, p[1] = (B - L) / H, p[2] = (C - R) / H) : A > D && A > W ? (H = 2 * Math.sqrt(1 + A - D - W), p[3] = (k - V) / H, p[0] = 0.25 * H, p[1] = (C + R) / H, p[2] = (B + L) / H) : D > W ? (H = 2 * Math.sqrt(1 + D - A - W), p[3] = (B - L) / H, p[0] = (C + R) / H, p[1] = 0.25 * H, p[2] = (k + V) / H) : (H = 2 * Math.sqrt(1 + W - A - D), p[3] = (C - R) / H, p[0] = (B + L) / H, p[1] = (k + V) / H, p[2] = 0.25 * H), p;
}, bt.fromRotationTranslationScale = function(p, y, w, x) {
var b = y[0], S = y[1], A = y[2], C = y[3], L = b + b, R = S + S, D = A + A, k = b * L, B = b * R, V = b * D, W = S * R, Z = S * D, H = A * D, ne = C * L, Y = C * R, se = C * D, he = x[0], ce = x[1], fe = x[2];
return p[0] = (1 - (W + H)) * he, p[1] = (B + se) * he, p[2] = (V - Y) * he, p[3] = 0, p[4] = (B - se) * ce, p[5] = (1 - (k + H)) * ce, p[6] = (Z + ne) * ce, p[7] = 0, p[8] = (V + Y) * fe, p[9] = (Z - ne) * fe, p[10] = (1 - (k + W)) * fe, p[11] = 0, p[12] = w[0], p[13] = w[1], p[14] = w[2], p[15] = 1, p;
}, bt.fromRotationTranslationScaleOrigin = function(p, y, w, x, b) {
var S = y[0], A = y[1], C = y[2], L = y[3], R = S + S, D = A + A, k = C + C, B = S * R, V = S * D, W = S * k, Z = A * D, H = A * k, ne = C * k, Y = L * R, se = L * D, he = L * k, ce = x[0], fe = x[1], pe = x[2], ve = b[0], ge = b[1], be = b[2], Be = (1 - (Z + ne)) * ce, ke = (V + he) * ce, et = (W - se) * ce, Ve = (V - he) * fe, qe = (1 - (B + ne)) * fe, Ne = (H + Y) * fe, lt = (W + se) * pe, Ye = (H - Y) * pe, it = (1 - (B + Z)) * pe;
return p[0] = Be, p[1] = ke, p[2] = et, p[3] = 0, p[4] = Ve, p[5] = qe, p[6] = Ne, p[7] = 0, p[8] = lt, p[9] = Ye, p[10] = it, p[11] = 0, p[12] = w[0] + ve - (Be * ve + Ve * ge + lt * be), p[13] = w[1] + ge - (ke * ve + qe * ge + Ye * be), p[14] = w[2] + be - (et * ve + Ne * ge + it * be), p[15] = 1, p;
}, bt.fromQuat = function(p, y) {
var w = y[0], x = y[1], b = y[2], S = y[3], A = w + w, C = x + x, L = b + b, R = w * A, D = x * A, k = x * C, B = b * A, V = b * C, W = b * L, Z = S * A, H = S * C, ne = S * L;
return p[0] = 1 - k - W, p[1] = D + ne, p[2] = B - H, p[3] = 0, p[4] = D - ne, p[5] = 1 - R - W, p[6] = V + Z, p[7] = 0, p[8] = B + H, p[9] = V - Z, p[10] = 1 - R - k, p[11] = 0, p[12] = 0, p[13] = 0, p[14] = 0, p[15] = 1, p;
}, bt.frustum = function(p, y, w, x, b, S, A) {
var C = 1 / (w - y), L = 1 / (b - x), R = 1 / (S - A);
return p[0] = 2 * S * C, p[1] = 0, p[2] = 0, p[3] = 0, p[4] = 0, p[5] = 2 * S * L, p[6] = 0, p[7] = 0, p[8] = (w + y) * C, p[9] = (b + x) * L, p[10] = (A + S) * R, p[11] = -1, p[12] = 0, p[13] = 0, p[14] = A * S * 2 * R, p[15] = 0, p;
}, bt.perspectiveNO = m, bt.perspectiveZO = function(p, y, w, x, b) {
var S, A = 1 / Math.tan(y / 2);
return p[0] = A / w, p[1] = 0, p[2] = 0, p[3] = 0, p[4] = 0, p[5] = A, p[6] = 0, p[7] = 0, p[8] = 0, p[9] = 0, p[11] = -1, p[12] = 0, p[13] = 0, p[15] = 0, b != null && b !== 1 / 0 ? (p[10] = b * (S = 1 / (x - b)), p[14] = b * x * S) : (p[10] = -1, p[14] = -x), p;
}, bt.perspectiveFromFieldOfView = function(p, y, w, x) {
var b = Math.tan(y.upDegrees * Math.PI / 180), S = Math.tan(y.downDegrees * Math.PI / 180), A = Math.tan(y.leftDegrees * Math.PI / 180), C = Math.tan(y.rightDegrees * Math.PI / 180), L = 2 / (A + C), R = 2 / (b + S);
return p[0] = L, p[1] = 0, p[2] = 0, p[3] = 0, p[4] = 0, p[5] = R, p[6] = 0, p[7] = 0, p[8] = -(A - C) * L * 0.5, p[9] = (b - S) * R * 0.5, p[10] = x / (w - x), p[11] = -1, p[12] = 0, p[13] = 0, p[14] = x * w / (w - x), p[15] = 0, p;
}, bt.orthoNO = g, bt.orthoZO = function(p, y, w, x, b, S, A) {
var C = 1 / (y - w), L = 1 / (x - b), R = 1 / (S - A);
return p[0] = -2 * C, p[1] = 0, p[2] = 0, p[3] = 0, p[4] = 0, p[5] = -2 * L, p[6] = 0, p[7] = 0, p[8] = 0, p[9] = 0, p[10] = R, p[11] = 0, p[12] = (y + w) * C, p[13] = (b + x) * L, p[14] = S * R, p[15] = 1, p;
}, bt.lookAt = function(p, y, w, x) {
var b, S, A, C, L, R, D, k, B, V, W = y[0], Z = y[1], H = y[2], ne = x[0], Y = x[1], se = x[2], he = w[0], ce = w[1], fe = w[2];
return Math.abs(W - he) < e.EPSILON && Math.abs(Z - ce) < e.EPSILON && Math.abs(H - fe) < e.EPSILON ? s(p) : (D = W - he, k = Z - ce, B = H - fe, b = Y * (B *= V = 1 / Math.hypot(D, k, B)) - se * (k *= V), S = se * (D *= V) - ne * B, A = ne * k - Y * D, (V = Math.hypot(b, S, A)) ? (b *= V = 1 / V, S *= V, A *= V) : (b = 0, S = 0, A = 0), C = k * A - B * S, L = B * b - D * A, R = D * S - k * b, (V = Math.hypot(C, L, R)) ? (C *= V = 1 / V, L *= V, R *= V) : (C = 0, L = 0, R = 0), p[0] = b, p[1] = C, p[2] = D, p[3] = 0, p[4] = S, p[5] = L, p[6] = k, p[7] = 0, p[8] = A, p[9] = R, p[10] = B, p[11] = 0, p[12] = -(b * W + S * Z + A * H), p[13] = -(C * W + L * Z + R * H), p[14] = -(D * W + k * Z + B * H), p[15] = 1, p);
}, bt.targetTo = function(p, y, w, x) {
var b = y[0], S = y[1], A = y[2], C = x[0], L = x[1], R = x[2], D = b - w[0], k = S - w[1], B = A - w[2], V = D * D + k * k + B * B;
V > 0 && (D *= V = 1 / Math.sqrt(V), k *= V, B *= V);
var W = L * B - R * k, Z = R * D - C * B, H = C * k - L * D;
return (V = W * W + Z * Z + H * H) > 0 && (W *= V = 1 / Math.sqrt(V), Z *= V, H *= V), p[0] = W, p[1] = Z, p[2] = H, p[3] = 0, p[4] = k * H - B * Z, p[5] = B * W - D * H, p[6] = D * Z - k * W, p[7] = 0, p[8] = D, p[9] = k, p[10] = B, p[11] = 0, p[12] = b, p[13] = S, p[14] = A, p[15] = 1, p;
}, bt.str = function(p) {
return "mat4(" + p[0] + ", " + p[1] + ", " + p[2] + ", " + p[3] + ", " + p[4] + ", " + p[5] + ", " + p[6] + ", " + p[7] + ", " + p[8] + ", " + p[9] + ", " + p[10] + ", " + p[11] + ", " + p[12] + ", " + p[13] + ", " + p[14] + ", " + p[15] + ")";
}, bt.frob = function(p) {
return Math.hypot(p[0], p[1], p[2], p[3], p[4], p[5], p[6], p[7], p[8], p[9], p[10], p[11], p[12], p[13], p[14], p[15]);
}, bt.add = function(p, y, w) {
return p[0] = y[0] + w[0], p[1] = y[1] + w[1], p[2] = y[2] + w[2], p[3] = y[3] + w[3], p[4] = y[4] + w[4], p[5] = y[5] + w[5], p[6] = y[6] + w[6], p[7] = y[7] + w[7], p[8] = y[8] + w[8], p[9] = y[9] + w[9], p[10] = y[10] + w[10], p[11] = y[11] + w[11], p[12] = y[12] + w[12], p[13] = y[13] + w[13], p[14] = y[14] + w[14], p[15] = y[15] + w[15], p;
}, bt.subtract = v, bt.multiplyScalar = function(p, y, w) {
return p[0] = y[0] * w, p[1] = y[1] * w, p[2] = y[2] * w, p[3] = y[3] * w, p[4] = y[4] * w, p[5] = y[5] * w, p[6] = y[6] * w, p[7] = y[7] * w, p[8] = y[8] * w, p[9] = y[9] * w, p[10] = y[10] * w, p[11] = y[11] * w, p[12] = y[12] * w, p[13] = y[13] * w, p[14] = y[14] * w, p[15] = y[15] * w, p;
}, bt.multiplyScalarAndAdd = function(p, y, w, x) {
return p[0] = y[0] + w[0] * x, p[1] = y[1] + w[1] * x, p[2] = y[2] + w[2] * x, p[3] = y[3] + w[3] * x, p[4] = y[4] + w[4] * x, p[5] = y[5] + w[5] * x, p[6] = y[6] + w[6] * x, p[7] = y[7] + w[7] * x, p[8] = y[8] + w[8] * x, p[9] = y[9] + w[9] * x, p[10] = y[10] + w[10] * x, p[11] = y[11] + w[11] * x, p[12] = y[12] + w[12] * x, p[13] = y[13] + w[13] * x, p[14] = y[14] + w[14] * x, p[15] = y[15] + w[15] * x, p;
}, bt.exactEquals = function(p, y) {
return p[0] === y[0] && p[1] === y[1] && p[2] === y[2] && p[3] === y[3] && p[4] === y[4] && p[5] === y[5] && p[6] === y[6] && p[7] === y[7] && p[8] === y[8] && p[9] === y[9] && p[10] === y[10] && p[11] === y[11] && p[12] === y[12] && p[13] === y[13] && p[14] === y[14] && p[15] === y[15];
}, bt.equals = function(p, y) {
var w = p[0], x = p[1], b = p[2], S = p[3], A = p[4], C = p[5], L = p[6], R = p[7], D = p[8], k = p[9], B = p[10], V = p[11], W = p[12], Z = p[13], H = p[14], ne = p[15], Y = y[0], se = y[1], he = y[2], ce = y[3], fe = y[4], pe = y[5], ve = y[6], ge = y[7], be = y[8], Be = y[9], ke = y[10], et = y[11], Ve = y[12], qe = y[13], Ne = y[14], lt = y[15];
return Math.abs(w - Y) <= e.EPSILON * Math.max(1, Math.abs(w), Math.abs(Y)) && Math.abs(x - se) <= e.EPSILON * Math.max(1, Math.abs(x), Math.abs(se)) && Math.abs(b - he) <= e.EPSILON * Math.max(1, Math.abs(b), Math.abs(he)) && Math.abs(S - ce) <= e.EPSILON * Math.max(1, Math.abs(S), Math.abs(ce)) && Math.abs(A - fe) <= e.EPSILON * Math.max(1, Math.abs(A), Math.abs(fe)) && Math.abs(C - pe) <= e.EPSILON * Math.max(1, Math.abs(C), Math.abs(pe)) && Math.abs(L - ve) <= e.EPSILON * Math.max(1, Math.abs(L), Math.abs(ve)) && Math.abs(R - ge) <= e.EPSILON * Math.max(1, Math.abs(R), Math.abs(ge)) && Math.abs(D - be) <= e.EPSILON * Math.max(1, Math.abs(D), Math.abs(be)) && Math.abs(k - Be) <= e.EPSILON * Math.max(1, Math.abs(k), Math.abs(Be)) && Math.abs(B - ke) <= e.EPSILON * Math.max(1, Math.abs(B), Math.abs(ke)) && Math.abs(V - et) <= e.EPSILON * Math.max(1, Math.abs(V), Math.abs(et)) && Math.abs(W - Ve) <= e.EPSILON * Math.max(1, Math.abs(W), Math.abs(Ve)) && Math.abs(Z - qe) <= e.EPSILON * Math.max(1, Math.abs(Z), Math.abs(qe)) && Math.abs(H - Ne) <= e.EPSILON * Math.max(1, Math.abs(H), Math.abs(Ne)) && Math.abs(ne - lt) <= e.EPSILON * Math.max(1, Math.abs(ne), Math.abs(lt));
}, bt.sub = bt.mul = bt.ortho = bt.perspective = void 0;
var e = function(p, y) {
if (p && p.__esModule) return p;
if (p === null || n(p) !== "object" && typeof p != "function") return { default: p };
var w = i(void 0);
if (w && w.has(p)) return w.get(p);
var x = {}, b = Object.defineProperty && Object.getOwnPropertyDescriptor;
for (var S in p) if (S !== "default" && Object.prototype.hasOwnProperty.call(p, S)) {
var A = b ? Object.getOwnPropertyDescriptor(p, S) : null;
A && (A.get || A.set) ? Object.defineProperty(x, S, A) : x[S] = p[S];
}
return x.default = p, w && w.set(p, x), x;
}(Ir());
function i(p) {
if (typeof WeakMap != "function") return null;
var y = /* @__PURE__ */ new WeakMap(), w = /* @__PURE__ */ new WeakMap();
return (i = function(x) {
return x ? w : y;
})(p);
}
function s(p) {
return p[0] = 1, p[1] = 0, p[2] = 0, p[3] = 0, p[4] = 0, p[5] = 1, p[6] = 0, p[7] = 0, p[8] = 0, p[9] = 0, p[10] = 1, p[11] = 0, p[12] = 0, p[13] = 0, p[14] = 0, p[15] = 1, p;
}
function l(p, y, w) {
var x = y[0], b = y[1], S = y[2], A = y[3], C = y[4], L = y[5], R = y[6], D = y[7], k = y[8], B = y[9], V = y[10], W = y[11], Z = y[12], H = y[13], ne = y[14], Y = y[15], se = w[0], he = w[1], ce = w[2], fe = w[3];
return p[0] = se * x + he * C + ce * k + fe * Z, p[1] = se * b + he * L + ce * B + fe * H, p[2] = se * S + he * R + ce * V + fe * ne, p[3] = se * A + he * D + ce * W + fe * Y, p[4] = (se = w[4]) * x + (he = w[5]) * C + (ce = w[6]) * k + (fe = w[7]) * Z, p[5] = se * b + he * L + ce * B + fe * H, p[6] = se * S + he * R + ce * V + fe * ne, p[7] = se * A + he * D + ce * W + fe * Y, p[8] = (se = w[8]) * x + (he = w[9]) * C + (ce = w[10]) * k + (fe = w[11]) * Z, p[9] = se * b + he * L + ce * B + fe * H, p[10] = se * S + he * R + ce * V + fe * ne, p[11] = se * A + he * D + ce * W + fe * Y, p[12] = (se = w[12]) * x + (he = w[13]) * C + (ce = w[14]) * k + (fe = w[15]) * Z, p[13] = se * b + he * L + ce * B + fe * H, p[14] = se * S + he * R + ce * V + fe * ne, p[15] = se * A + he * D + ce * W + fe * Y, p;
}
function a(p, y, w) {
var x = y[0], b = y[1], S = y[2], A = y[3], C = x + x, L = b + b, R = S + S, D = x * C, k = x * L, B = x * R, V = b * L, W = b * R, Z = S * R, H = A * C, ne = A * L, Y = A * R;
return p[0] = 1 - (V + Z), p[1] = k + Y, p[2] = B - ne, p[3] = 0, p[4] = k - Y, p[5] = 1 - (D + Z), p[6] = W + H, p[7] = 0, p[8] = B + ne, p[9] = W - H, p[10] = 1 - (D + V), p[11] = 0, p[12] = w[0], p[13] = w[1], p[14] = w[2], p[15] = 1, p;
}
function h(p, y) {
var w = y[4], x = y[5], b = y[6], S = y[8], A = y[9], C = y[10];
return p[0] = Math.hypot(y[0], y[1], y[2]), p[1] = Math.hypot(w, x, b), p[2] = Math.hypot(S, A, C), p;
}
function m(p, y, w, x, b) {
var S, A = 1 / Math.tan(y / 2);
return p[0] = A / w, p[1] = 0, p[2] = 0, p[3