map-sdk-lite
Version:
地图SDK - 基于Mapbox的定制开发,支持区域标绘、数据展示、3D地形等功能
950 lines • 2.95 MB
JavaScript
var pk = Object.defineProperty;
var mk = (e, s, l) => s in e ? pk(e, s, { enumerable: !0, configurable: !0, writable: !0, value: l }) : e[s] = l;
var dn = (e, s, l) => mk(e, typeof s != "symbol" ? s + "" : s, l);
var p_, m0, F0;
function px(e, s) {
if (!p_)
p_ = s;
else if (!m0)
m0 = s;
else {
var l = "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 = {}; (" + p_ + ")(sharedChunk); (" + m0 + ")(sharedChunk); self.onerror = null;", u = {};
p_(u), F0 = s(u), typeof window < "u" && window && window.URL && window.URL.createObjectURL && (F0.workerUrl = window.URL.createObjectURL(new Blob([l], { type: "text/javascript" })));
}
}
px(["exports"], function(e) {
var s = 1e-6, l = typeof Float32Array < "u" ? Float32Array : Array;
function u(i, t) {
var n = t[0], a = t[1], c = t[2], m = t[3], _ = n * m - c * a;
return _ ? (i[0] = m * (_ = 1 / _), i[1] = -a * _, i[2] = -c * _, i[3] = n * _, i) : null;
}
function f() {
var i = new l(9);
return l != Float32Array && (i[1] = 0, i[2] = 0, i[3] = 0, i[5] = 0, i[6] = 0, i[7] = 0), i[0] = 1, i[4] = 1, i[8] = 1, i;
}
function y(i, t) {
var n = t[0], a = t[1], c = t[2], m = t[3], _ = t[4], b = t[5], M = t[6], P = t[7], R = t[8];
return i[0] = _ * R - b * P, i[1] = c * P - a * R, i[2] = a * b - c * _, i[3] = b * M - m * R, i[4] = n * R - c * M, i[5] = c * m - n * b, i[6] = m * P - _ * M, i[7] = a * M - n * P, i[8] = n * _ - a * m, i;
}
function E(i, t, n) {
var a = t[0], c = t[1], m = t[2], _ = t[3], b = t[4], M = t[5], P = t[6], R = t[7], O = t[8], N = n[0], q = n[1], j = n[2], W = n[3], ee = n[4], ie = n[5], ge = n[6], de = n[7], J = n[8];
return i[0] = N * a + q * _ + j * P, i[1] = N * c + q * b + j * R, i[2] = N * m + q * M + j * O, i[3] = W * a + ee * _ + ie * P, i[4] = W * c + ee * b + ie * R, i[5] = W * m + ee * M + ie * O, i[6] = ge * a + de * _ + J * P, i[7] = ge * c + de * b + J * R, i[8] = ge * m + de * M + J * O, i;
}
function w() {
var i = new l(16);
return l != Float32Array && (i[1] = 0, i[2] = 0, i[3] = 0, i[4] = 0, i[6] = 0, i[7] = 0, i[8] = 0, i[9] = 0, i[11] = 0, i[12] = 0, i[13] = 0, i[14] = 0), i[0] = 1, i[5] = 1, i[10] = 1, i[15] = 1, i;
}
function C(i) {
return i[0] = 1, i[1] = 0, i[2] = 0, i[3] = 0, i[4] = 0, i[5] = 1, i[6] = 0, i[7] = 0, i[8] = 0, i[9] = 0, i[10] = 1, i[11] = 0, i[12] = 0, i[13] = 0, i[14] = 0, i[15] = 1, i;
}
function k(i, t) {
var n = t[0], a = t[1], c = t[2], m = t[3], _ = t[4], b = t[5], M = t[6], P = t[7], R = t[8], O = t[9], N = t[10], q = t[11], j = t[12], W = t[13], ee = t[14], ie = t[15], ge = n * b - a * _, de = n * M - c * _, J = n * P - m * _, ue = a * M - c * b, me = a * P - m * b, Ee = c * P - m * M, Pe = R * W - O * j, De = R * ee - N * j, Be = R * ie - q * j, Xe = O * ee - N * W, lt = O * ie - q * W, Ot = N * ie - q * ee, St = ge * Ot - de * lt + J * Xe + ue * Be - me * De + Ee * Pe;
return St ? (i[0] = (b * Ot - M * lt + P * Xe) * (St = 1 / St), i[1] = (c * lt - a * Ot - m * Xe) * St, i[2] = (W * Ee - ee * me + ie * ue) * St, i[3] = (N * me - O * Ee - q * ue) * St, i[4] = (M * Be - _ * Ot - P * De) * St, i[5] = (n * Ot - c * Be + m * De) * St, i[6] = (ee * J - j * Ee - ie * de) * St, i[7] = (R * Ee - N * J + q * de) * St, i[8] = (_ * lt - b * Be + P * Pe) * St, i[9] = (a * Be - n * lt - m * Pe) * St, i[10] = (j * me - W * J + ie * ge) * St, i[11] = (O * J - R * me - q * ge) * St, i[12] = (b * De - _ * Xe - M * Pe) * St, i[13] = (n * Xe - a * De + c * Pe) * St, i[14] = (W * de - j * ue - ee * ge) * St, i[15] = (R * ue - O * de + N * ge) * St, i) : null;
}
function F(i, t, n) {
var a = t[0], c = t[1], m = t[2], _ = t[3], b = t[4], M = t[5], P = t[6], R = t[7], O = t[8], N = t[9], q = t[10], j = t[11], W = t[12], ee = t[13], ie = t[14], ge = t[15], de = n[0], J = n[1], ue = n[2], me = n[3];
return i[0] = de * a + J * b + ue * O + me * W, i[1] = de * c + J * M + ue * N + me * ee, i[2] = de * m + J * P + ue * q + me * ie, i[3] = de * _ + J * R + ue * j + me * ge, i[4] = (de = n[4]) * a + (J = n[5]) * b + (ue = n[6]) * O + (me = n[7]) * W, i[5] = de * c + J * M + ue * N + me * ee, i[6] = de * m + J * P + ue * q + me * ie, i[7] = de * _ + J * R + ue * j + me * ge, i[8] = (de = n[8]) * a + (J = n[9]) * b + (ue = n[10]) * O + (me = n[11]) * W, i[9] = de * c + J * M + ue * N + me * ee, i[10] = de * m + J * P + ue * q + me * ie, i[11] = de * _ + J * R + ue * j + me * ge, i[12] = (de = n[12]) * a + (J = n[13]) * b + (ue = n[14]) * O + (me = n[15]) * W, i[13] = de * c + J * M + ue * N + me * ee, i[14] = de * m + J * P + ue * q + me * ie, i[15] = de * _ + J * R + ue * j + me * ge, i;
}
function V(i, t, n) {
var a, c, m, _, b, M, P, R, O, N, q, j, W = n[0], ee = n[1], ie = n[2];
return t === i ? (i[12] = t[0] * W + t[4] * ee + t[8] * ie + t[12], i[13] = t[1] * W + t[5] * ee + t[9] * ie + t[13], i[14] = t[2] * W + t[6] * ee + t[10] * ie + t[14], i[15] = t[3] * W + t[7] * ee + t[11] * ie + t[15]) : (c = t[1], m = t[2], _ = t[3], b = t[4], M = t[5], P = t[6], R = t[7], O = t[8], N = t[9], q = t[10], j = t[11], i[0] = a = t[0], i[1] = c, i[2] = m, i[3] = _, i[4] = b, i[5] = M, i[6] = P, i[7] = R, i[8] = O, i[9] = N, i[10] = q, i[11] = j, i[12] = a * W + b * ee + O * ie + t[12], i[13] = c * W + M * ee + N * ie + t[13], i[14] = m * W + P * ee + q * ie + t[14], i[15] = _ * W + R * ee + j * ie + t[15]), i;
}
function H(i, t, n) {
var a = n[0], c = n[1], m = n[2];
return i[0] = t[0] * a, i[1] = t[1] * a, i[2] = t[2] * a, i[3] = t[3] * a, i[4] = t[4] * c, i[5] = t[5] * c, i[6] = t[6] * c, i[7] = t[7] * c, i[8] = t[8] * m, i[9] = t[9] * m, i[10] = t[10] * m, i[11] = t[11] * m, i[12] = t[12], i[13] = t[13], i[14] = t[14], i[15] = t[15], i;
}
function Y(i, t, n) {
var a = Math.sin(n), c = Math.cos(n), m = t[4], _ = t[5], b = t[6], M = t[7], P = t[8], R = t[9], O = t[10], N = t[11];
return t !== i && (i[0] = t[0], i[1] = t[1], i[2] = t[2], i[3] = t[3], i[12] = t[12], i[13] = t[13], i[14] = t[14], i[15] = t[15]), i[4] = m * c + P * a, i[5] = _ * c + R * a, i[6] = b * c + O * a, i[7] = M * c + N * a, i[8] = P * c - m * a, i[9] = R * c - _ * a, i[10] = O * c - b * a, i[11] = N * c - M * a, i;
}
function $(i, t, n) {
var a = Math.sin(n), c = Math.cos(n), m = t[0], _ = t[1], b = t[2], M = t[3], P = t[8], R = t[9], O = t[10], N = t[11];
return t !== i && (i[4] = t[4], i[5] = t[5], i[6] = t[6], i[7] = t[7], i[12] = t[12], i[13] = t[13], i[14] = t[14], i[15] = t[15]), i[0] = m * c - P * a, i[1] = _ * c - R * a, i[2] = b * c - O * a, i[3] = M * c - N * a, i[8] = m * a + P * c, i[9] = _ * a + R * c, i[10] = b * a + O * c, i[11] = M * a + N * c, i;
}
function fe(i, t, n) {
var a = Math.sin(n), c = Math.cos(n), m = t[0], _ = t[1], b = t[2], M = t[3], P = t[4], R = t[5], O = t[6], N = t[7];
return t !== i && (i[8] = t[8], i[9] = t[9], i[10] = t[10], i[11] = t[11], i[12] = t[12], i[13] = t[13], i[14] = t[14], i[15] = t[15]), i[0] = m * c + P * a, i[1] = _ * c + R * a, i[2] = b * c + O * a, i[3] = M * c + N * a, i[4] = P * c - m * a, i[5] = R * c - _ * a, i[6] = O * c - b * a, i[7] = N * c - M * a, i;
}
function Me(i, t) {
return i[0] = t[0], i[1] = 0, i[2] = 0, i[3] = 0, i[4] = 0, i[5] = t[1], i[6] = 0, i[7] = 0, i[8] = 0, i[9] = 0, i[10] = t[2], i[11] = 0, i[12] = 0, i[13] = 0, i[14] = 0, i[15] = 1, i;
}
function Fe(i, t, n) {
var a, c, m, _ = n[0], b = n[1], M = n[2], P = Math.hypot(_, b, M);
return P < s ? null : (_ *= P = 1 / P, b *= P, M *= P, a = Math.sin(t), c = Math.cos(t), i[0] = _ * _ * (m = 1 - c) + c, i[1] = b * _ * m + M * a, i[2] = M * _ * m - b * a, i[3] = 0, i[4] = _ * b * m - M * a, i[5] = b * b * m + c, i[6] = M * b * m + _ * a, i[7] = 0, i[8] = _ * M * m + b * a, i[9] = b * M * m - _ * a, i[10] = M * M * m + c, i[11] = 0, i[12] = 0, i[13] = 0, i[14] = 0, i[15] = 1, i);
}
function le(i, t) {
var n = t[0], a = t[1], c = t[2], m = t[3], _ = n + n, b = a + a, M = c + c, P = n * _, R = a * _, O = a * b, N = c * _, q = c * b, j = c * M, W = m * _, ee = m * b, ie = m * M;
return i[0] = 1 - O - j, i[1] = R + ie, i[2] = N - ee, i[3] = 0, i[4] = R - ie, i[5] = 1 - P - j, i[6] = q + W, i[7] = 0, i[8] = N + ee, i[9] = q - W, i[10] = 1 - P - O, i[11] = 0, i[12] = 0, i[13] = 0, i[14] = 0, i[15] = 1, i;
}
Math.hypot || (Math.hypot = function() {
for (var i = 0, t = arguments.length; t--; ) i += arguments[t] * arguments[t];
return Math.sqrt(i);
});
var ke = F;
function Ne() {
var i = new l(3);
return l != Float32Array && (i[0] = 0, i[1] = 0, i[2] = 0), i;
}
function Je(i) {
var t = new l(3);
return t[0] = i[0], t[1] = i[1], t[2] = i[2], t;
}
function dt(i) {
return Math.hypot(i[0], i[1], i[2]);
}
function nt(i, t, n) {
var a = new l(3);
return a[0] = i, a[1] = t, a[2] = n, a;
}
function he(i, t, n) {
return i[0] = t[0] + n[0], i[1] = t[1] + n[1], i[2] = t[2] + n[2], i;
}
function pe(i, t, n) {
return i[0] = t[0] - n[0], i[1] = t[1] - n[1], i[2] = t[2] - n[2], i;
}
function Ae(i, t, n) {
return i[0] = t[0] * n[0], i[1] = t[1] * n[1], i[2] = t[2] * n[2], i;
}
function je(i, t, n) {
return i[0] = Math.min(t[0], n[0]), i[1] = Math.min(t[1], n[1]), i[2] = Math.min(t[2], n[2]), i;
}
function Ve(i, t, n) {
return i[0] = Math.max(t[0], n[0]), i[1] = Math.max(t[1], n[1]), i[2] = Math.max(t[2], n[2]), i;
}
function Ze(i, t, n) {
return i[0] = t[0] * n, i[1] = t[1] * n, i[2] = t[2] * n, i;
}
function He(i, t, n, a) {
return i[0] = t[0] + n[0] * a, i[1] = t[1] + n[1] * a, i[2] = t[2] + n[2] * a, i;
}
function Ke(i, t) {
var n = t[0] - i[0], a = t[1] - i[1], c = t[2] - i[2];
return n * n + a * a + c * c;
}
function Qe(i) {
var t = i[0], n = i[1], a = i[2];
return t * t + n * n + a * a;
}
function ht(i, t) {
return i[0] = -t[0], i[1] = -t[1], i[2] = -t[2], i;
}
function rt(i, t) {
var n = t[0], a = t[1], c = t[2], m = n * n + a * a + c * c;
return m > 0 && (m = 1 / Math.sqrt(m)), i[0] = t[0] * m, i[1] = t[1] * m, i[2] = t[2] * m, i;
}
function gt(i, t) {
return i[0] * t[0] + i[1] * t[1] + i[2] * t[2];
}
function _t(i, t, n) {
var a = t[0], c = t[1], m = t[2], _ = n[0], b = n[1], M = n[2];
return i[0] = c * M - m * b, i[1] = m * _ - a * M, i[2] = a * b - c * _, i;
}
function Jt(i, t, n, a) {
var c = t[0], m = t[1], _ = t[2];
return i[0] = c + a * (n[0] - c), i[1] = m + a * (n[1] - m), i[2] = _ + a * (n[2] - _), i;
}
function Kt(i, t, n) {
var a = t[0], c = t[1], m = t[2], _ = n[3] * a + n[7] * c + n[11] * m + n[15];
return i[0] = (n[0] * a + n[4] * c + n[8] * m + n[12]) / (_ = _ || 1), i[1] = (n[1] * a + n[5] * c + n[9] * m + n[13]) / _, i[2] = (n[2] * a + n[6] * c + n[10] * m + n[14]) / _, i;
}
function Ir(i, t, n) {
var a = t[0], c = t[1], m = t[2];
return i[0] = a * n[0] + c * n[3] + m * n[6], i[1] = a * n[1] + c * n[4] + m * n[7], i[2] = a * n[2] + c * n[5] + m * n[8], i;
}
function er(i, t, n) {
var a = n[0], c = n[1], m = n[2], _ = t[0], b = t[1], M = t[2], P = c * M - m * b, R = m * _ - a * M, O = a * b - c * _, N = c * O - m * R, q = m * P - a * O, j = a * R - c * P, W = 2 * n[3];
return R *= W, O *= W, q *= 2, j *= 2, i[0] = _ + (P *= W) + (N *= 2), i[1] = b + R + q, i[2] = M + O + j, i;
}
function mr(i, t) {
return i[0] === t[0] && i[1] === t[1] && i[2] === t[2];
}
var or = pe, sn = Ae, It = dt;
function ii() {
var i = new l(4);
return l != Float32Array && (i[0] = 0, i[1] = 0, i[2] = 0, i[3] = 0), i;
}
function mn(i, t, n) {
return i[0] = t[0] * n, i[1] = t[1] * n, i[2] = t[2] * n, i[3] = t[3] * n, i;
}
function br(i, t) {
var n = t[0], a = t[1], c = t[2], m = t[3], _ = n * n + a * a + c * c + m * m;
return _ > 0 && (_ = 1 / Math.sqrt(_)), i[0] = n * _, i[1] = a * _, i[2] = c * _, i[3] = m * _, i;
}
function Ye(i, t, n) {
var a = t[0], c = t[1], m = t[2], _ = t[3];
return i[0] = n[0] * a + n[4] * c + n[8] * m + n[12] * _, i[1] = n[1] * a + n[5] * c + n[9] * m + n[13] * _, i[2] = n[2] * a + n[6] * c + n[10] * m + n[14] * _, i[3] = n[3] * a + n[7] * c + n[11] * m + n[15] * _, i;
}
function Fn() {
var i = new l(4);
return l != Float32Array && (i[0] = 0, i[1] = 0, i[2] = 0), i[3] = 1, i;
}
function Nn(i) {
return i[0] = 0, i[1] = 0, i[2] = 0, i[3] = 1, i;
}
function cn(i, t, n) {
n *= 0.5;
var a = t[0], c = t[1], m = t[2], _ = t[3], b = Math.sin(n), M = Math.cos(n);
return i[0] = a * M + _ * b, i[1] = c * M + m * b, i[2] = m * M - c * b, i[3] = _ * M - a * b, i;
}
function Ki(i, t, n) {
n *= 0.5;
var a = t[0], c = t[1], m = t[2], _ = t[3], b = Math.sin(n), M = Math.cos(n);
return i[0] = a * M - m * b, i[1] = c * M + _ * b, i[2] = m * M + a * b, i[3] = _ * M - c * b, i;
}
Ne(), ii();
var hi, Rs, _r, ho, fo, Hs = br, fa = (hi = Ne(), Rs = nt(1, 0, 0), _r = nt(0, 1, 0), function(i, t, n) {
var a = gt(t, n);
return a < -0.999999 ? (_t(hi, Rs, t), It(hi) < 1e-6 && _t(hi, _r, t), rt(hi, hi), function(c, m, _) {
_ *= 0.5;
var b = Math.sin(_);
c[0] = b * m[0], c[1] = b * m[1], c[2] = b * m[2], c[3] = Math.cos(_);
}(i, hi, Math.PI), i) : a > 0.999999 ? (i[0] = 0, i[1] = 0, i[2] = 0, i[3] = 1, i) : (_t(hi, t, n), i[0] = hi[0], i[1] = hi[1], i[2] = hi[2], i[3] = 1 + a, Hs(i, i));
});
function Qr() {
var i = new l(2);
return l != Float32Array && (i[0] = 0, i[1] = 0), i;
}
function Es(i, t) {
var n = new l(2);
return n[0] = i, n[1] = t, n;
}
function Ds(i, t, n) {
return i[0] = t[0] + n[0], i[1] = t[1] + n[1], i;
}
function zo(i, t, n) {
return i[0] = t[0] - n[0], i[1] = t[1] - n[1], i;
}
function an(i, t, n) {
return i[0] = t[0] * n, i[1] = t[1] * n, i;
}
function ea(i) {
return Math.hypot(i[0], i[1]);
}
function Ur(i, t) {
var n = t[0], a = t[1], c = n * n + a * a;
return c > 0 && (c = 1 / Math.sqrt(c)), i[0] = t[0] * c, i[1] = t[1] * c, i;
}
function un(i, t) {
return i[0] * t[0] + i[1] * t[1];
}
function po(i) {
return i && i.__esModule && Object.prototype.hasOwnProperty.call(i, "default") ? i.default : i;
}
Fn(), Fn(), f(), Qr();
var Di, Cl, hn = function() {
if (fo) return ho;
function i(t, n, a, c) {
this.cx = 3 * t, this.bx = 3 * (a - t) - this.cx, this.ax = 1 - this.cx - this.bx, this.cy = 3 * n, this.by = 3 * (c - n) - this.cy, this.ay = 1 - this.cy - this.by, this.p1x = t, this.p1y = n, this.p2x = a, this.p2y = c;
}
return fo = 1, ho = i, i.prototype = { sampleCurveX: function(t) {
return ((this.ax * t + this.bx) * t + this.cx) * t;
}, sampleCurveY: function(t) {
return ((this.ay * t + this.by) * t + this.cy) * t;
}, sampleCurveDerivativeX: function(t) {
return (3 * this.ax * t + 2 * this.bx) * t + this.cx;
}, solveCurveX: function(t, n) {
if (n === void 0 && (n = 1e-6), t < 0) return 0;
if (t > 1) return 1;
for (var a = t, c = 0; c < 8; c++) {
var m = this.sampleCurveX(a) - t;
if (Math.abs(m) < n) return a;
var _ = this.sampleCurveDerivativeX(a);
if (Math.abs(_) < 1e-6) break;
a -= m / _;
}
var b = 0, M = 1;
for (a = t, c = 0; c < 20 && (m = this.sampleCurveX(a), !(Math.abs(m - t) < n)); c++) t > m ? b = a : M = a, a = 0.5 * (M - b) + b;
return a;
}, solve: function(t, n) {
return this.sampleCurveY(this.solveCurveX(t, n));
} }, ho;
}(), _c = po(hn);
function kl() {
if (Cl) return Di;
function i(t, n) {
this.x = t, this.y = n;
}
return Cl = 1, Di = i, i.prototype = { clone: function() {
return new i(this.x, this.y);
}, add: function(t) {
return this.clone()._add(t);
}, sub: function(t) {
return this.clone()._sub(t);
}, multByPoint: function(t) {
return this.clone()._multByPoint(t);
}, divByPoint: function(t) {
return this.clone()._divByPoint(t);
}, mult: function(t) {
return this.clone()._mult(t);
}, div: function(t) {
return this.clone()._div(t);
}, rotate: function(t) {
return this.clone()._rotate(t);
}, rotateAround: function(t, n) {
return this.clone()._rotateAround(t, n);
}, matMult: function(t) {
return this.clone()._matMult(t);
}, unit: function() {
return this.clone()._unit();
}, perp: function() {
return this.clone()._perp();
}, round: function() {
return this.clone()._round();
}, mag: function() {
return Math.sqrt(this.x * this.x + this.y * this.y);
}, equals: function(t) {
return this.x === t.x && this.y === t.y;
}, dist: function(t) {
return Math.sqrt(this.distSqr(t));
}, distSqr: function(t) {
var n = t.x - this.x, a = t.y - this.y;
return n * n + a * a;
}, angle: function() {
return Math.atan2(this.y, this.x);
}, angleTo: function(t) {
return Math.atan2(this.y - t.y, this.x - t.x);
}, angleWith: function(t) {
return this.angleWithSep(t.x, t.y);
}, angleWithSep: function(t, n) {
return Math.atan2(this.x * n - this.y * t, this.x * t + this.y * n);
}, _matMult: function(t) {
var n = t[2] * this.x + t[3] * this.y;
return this.x = t[0] * this.x + t[1] * this.y, this.y = n, this;
}, _add: function(t) {
return this.x += t.x, this.y += t.y, this;
}, _sub: function(t) {
return this.x -= t.x, this.y -= t.y, this;
}, _mult: function(t) {
return this.x *= t, this.y *= t, this;
}, _div: function(t) {
return this.x /= t, this.y /= t, this;
}, _multByPoint: function(t) {
return this.x *= t.x, this.y *= t.y, this;
}, _divByPoint: function(t) {
return this.x /= t.x, this.y /= t.y, this;
}, _unit: function() {
return this._div(this.mag()), this;
}, _perp: function() {
var t = this.y;
return this.y = this.x, this.x = -t, this;
}, _rotate: function(t) {
var n = Math.cos(t), a = Math.sin(t), c = a * this.x + n * this.y;
return this.x = n * this.x - a * this.y, this.y = c, this;
}, _rotateAround: function(t, n) {
var a = Math.cos(t), c = Math.sin(t), m = n.y + c * (this.x - n.x) + a * (this.y - n.y);
return this.x = n.x + a * (this.x - n.x) - c * (this.y - n.y), this.y = m, this;
}, _round: function() {
return this.x = Math.round(this.x), this.y = Math.round(this.y), this;
} }, i.convert = function(t) {
return t instanceof i ? t : Array.isArray(t) ? new i(t[0], t[1]) : t;
}, Di;
}
var Zt = po(kl());
function Ui(i, t) {
if (Array.isArray(i)) {
if (!Array.isArray(t) || i.length !== t.length) return !1;
for (let n = 0; n < i.length; n++) if (!Ui(i[n], t[n])) return !1;
return !0;
}
if (typeof i == "object" && i !== null && t !== null) {
if (typeof t != "object" || Object.keys(i).length !== Object.keys(t).length) return !1;
for (const n in i) if (!Ui(i[n], t[n])) return !1;
return !0;
}
return i === t;
}
const ut = Math.PI / 180, ne = 180 / Math.PI;
function oe(i) {
return i * ut;
}
function be(i) {
return i * ne;
}
const Ue = [[0, 0], [1, 0], [1, 1], [0, 1]];
function qe(i) {
if (i <= 0) return 0;
if (i >= 1) return 1;
const t = i * i, n = t * i;
return 4 * (i < 0.5 ? n : 3 * (i - t) + n - 0.75);
}
function st(i, t, n, a) {
const c = new _c(i, t, n, a);
return function(m) {
return c.solve(m);
};
}
const Oe = st(0.25, 0.1, 0.25, 1);
function Re(i, t, n) {
return Math.min(n, Math.max(t, i));
}
function Tt(i, t, n) {
return (n = Re((n - i) / (t - i), 0, 1)) * n * (3 - 2 * n);
}
function Ct(i, t, n) {
const a = n - t, c = ((i - t) % a + a) % a + t;
return c === t ? n : c;
}
function pt(i, t, n) {
if (!i.length) return n(null, []);
let a = i.length;
const c = new Array(i.length);
let m = null;
i.forEach((_, b) => {
t(_, (M, P) => {
M && (m = M), c[b] = P, --a === 0 && n(m, c);
});
});
}
function Ht(i, ...t) {
for (const n of t) for (const a in n) i[a] = n[a];
return i;
}
let lr = 1;
function hr() {
return lr++;
}
function Lr(i) {
return i <= 1 ? 1 : Math.pow(2, Math.ceil(Math.log(i) / Math.LN2));
}
function Nr(i, t) {
i.forEach((n) => {
t[n] && (t[n] = t[n].bind(t));
});
}
function zr(i, t, n) {
const a = {};
for (const c in i) a[c] = t.call(this, i[c], c, i);
return a;
}
function qr(i, t, n) {
const a = {};
for (const c in i) t.call(this, i[c], c, i) && (a[c] = i[c]);
return a;
}
function On(i) {
return Array.isArray(i) ? i.map(On) : typeof i == "object" && i ? zr(i, On) : i;
}
const gn = {};
function Zr(i) {
gn[i] || (typeof console < "u" && console.warn(i), gn[i] = !0);
}
function Xr(i, t, n) {
return (n.y - i.y) * (t.x - i.x) > (t.y - i.y) * (n.x - i.x);
}
function vn(i) {
let t = 0;
for (let n, a, c = 0, m = i.length, _ = m - 1; c < m; _ = c++) n = i[c], a = i[_], t += (a.x - n.x) * (n.y + a.y);
return t;
}
function wn([i, t, n]) {
const a = oe(t + 90), c = oe(n);
return { x: i * Math.cos(a) * Math.sin(c), y: i * Math.sin(a) * Math.sin(c), z: i * Math.cos(c), azimuthal: t, polar: n };
}
function $n(i) {
return (typeof self < "u" || i !== void 0) && typeof WorkerGlobalScope < "u" && (i !== void 0 ? i : self) instanceof WorkerGlobalScope;
}
function fi(i) {
const t = {};
if (i.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g, (n, a, c, m) => {
const _ = c || m;
return t[a] = !_ || _.toLowerCase(), "";
}), t["max-age"]) {
const n = parseInt(t["max-age"], 10);
isNaN(n) ? delete t["max-age"] : t["max-age"] = n;
}
return t;
}
let ki = null;
function Jn(i, t) {
return [i[4 * t], i[4 * t + 1], i[4 * t + 2], i[4 * t + 3]];
}
function da(i, t, n, a) {
for (; t < n; ) {
const c = t + n >> 1;
i[c] < a ? t = c + 1 : n = c;
}
return t;
}
function Ts(i, t, n, a) {
for (; t < n; ) {
const c = t + n >> 1;
i[c] <= a ? t = c + 1 : n = c;
}
return t;
}
function Gi(i) {
return i > 0 ? 1 / (1.001 - i) : 1 + i;
}
function Zi(i) {
return i > 0 ? 1 - 1 / (1.001 - i) : -i;
}
function mo(i, t, n) {
return (i - t.min) * (n.max - n.min) / (t.max - t.min) + n.min;
}
const Oi = { API_URL: "https://api.mapbox.com", get API_URL_REGEX() {
return /^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;
}, get API_TILEJSON_REGEX() {
return /^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/v[0-9]*\/.*\.json.*$)/i;
}, get API_SPRITE_REGEX() {
return /^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/styles\/v[0-9]*\/)(.*\/sprite.*\..*$)/i;
}, get API_FONTS_REGEX() {
return /^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/fonts\/v[0-9]*\/)(.*\.pbf.*$)/i;
}, get API_STYLE_REGEX() {
return /^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/styles\/v[0-9]*\/)(.*$)/i;
}, get API_CDN_URL_REGEX() {
return /^((https?:)?\/\/)?api\.mapbox\.c(n|om)(\/mapbox-gl-js\/)(.*$)/i;
}, get EVENTS_URL() {
if (!Oi.API_URL) return null;
try {
const i = new URL(Oi.API_URL);
return i.hostname === "api.mapbox.cn" ? "https://events.mapbox.cn/events/v2" : i.hostname === "api.mapbox.com" ? "https://events.mapbox.com/events/v2" : null;
} catch {
return null;
}
}, SESSION_PATH: "/map-sessions/v1", FEEDBACK_URL: "https://apps.mapbox.com/feedback", TILE_URL_VERSION: "v4", RASTER_URL_PREFIX: "raster/v1", RASTERARRAYS_URL_PREFIX: "rasterarrays/v1", REQUIRE_ACCESS_TOKEN: !0, ACCESS_TOKEN: null, DEFAULT_STYLE: "mapbox://styles/mapbox/standard", MAX_PARALLEL_IMAGE_REQUESTS: 16, DRACO_URL: "https://api.mapbox.com/mapbox-gl-js/draco_decoder_gltf_v1.5.6.wasm", MESHOPT_URL: "https://api.mapbox.com/mapbox-gl-js/meshopt_base_v0.20.wasm", MESHOPT_SIMD_URL: "https://api.mapbox.com/mapbox-gl-js/meshopt_simd_v0.20.wasm", GLYPHS_URL: "mapbox://fonts/mapbox/{fontstack}/{range}.pbf", TILES3D_URL_PREFIX: "3dtiles/v1" };
function Na(i) {
return Oi.API_URL_REGEX.test(i);
}
function Ba(i) {
return Oi.API_SPRITE_REGEX.test(i);
}
let Is, go, tl, Fo, ta, Ll;
function yc() {
return Is == null && (Is = self.OffscreenCanvas && new OffscreenCanvas(1, 1).getContext("2d") && typeof self.createImageBitmap == "function"), Is;
}
const _o = { now: () => Fo !== void 0 ? Fo : performance.now(), setNow(i) {
Fo = i;
}, restoreNow() {
Fo = void 0;
}, frame(i) {
const t = requestAnimationFrame(i);
return { cancel: () => cancelAnimationFrame(t) };
}, getImageData(i, t = 0) {
const { width: n, height: a } = i;
ta || (ta = document.createElement("canvas"));
const c = ta.getContext("2d", { willReadFrequently: !0 });
if (!c) throw new Error("failed to create canvas 2d context");
return (n > ta.width || a > ta.height) && (ta.width = n, ta.height = a), c.clearRect(-t, -t, n + 2 * t, a + 2 * t), c.drawImage(i, 0, 0, n, a), c.getImageData(-t, -t, n + 2 * t, a + 2 * t);
}, resolveURL: (i) => (go || (go = document.createElement("a")), go.href = i, go.href), get devicePixelRatio() {
return window.devicePixelRatio;
}, get prefersReducedMotion() {
return !!window.matchMedia && (tl == null && (tl = window.matchMedia("(prefers-reduced-motion: reduce)")), tl.matches);
}, hasCanvasFingerprintNoise() {
if (Ll !== void 0) return Ll;
if (!yc()) return Ll = !1, !1;
const i = new OffscreenCanvas(85, 1), t = i.getContext("2d", { willReadFrequently: !0 });
let n = 0;
for (let c = 0; c < i.width; ++c) t.fillStyle = "rgba(".concat(n++, ",").concat(n++, ",").concat(n++, ", 255)"), t.fillRect(c, 0, 1, 1);
const a = t.getImageData(0, 0, i.width, i.height);
n = 0;
for (let c = 0; c < a.data.length; ++c) if (c % 4 != 3 && n++ !== a.data[c]) return Ll = !0, !0;
return Ll = !1, !1;
} };
function vc(i, t) {
const n = i.indexOf("?");
if (n < 0) return "".concat(i, "?").concat(new URLSearchParams(t).toString());
const a = new URLSearchParams(i.slice(n));
for (const c in t) a.set(c, t[c]);
return "".concat(i.slice(0, n), "?").concat(a.toString());
}
function Ss(i, t = { persistentParams: [] }) {
const n = i.indexOf("?");
if (n < 0) return i;
const a = new URLSearchParams(), c = new URLSearchParams(i.slice(n));
for (const _ of t.persistentParams) {
const b = c.get(_);
b && a.set(_, b);
}
const m = a.toString();
return "".concat(i.slice(0, n)).concat(m.length > 0 ? "?".concat(m) : "");
}
let Ms;
function Hi() {
return Ms || (Ms = new Promise((i, t) => {
const n = indexedDB.open("map-tiles", 1);
n.onerror = (a) => {
console.error("indexDB 初始化失败", a), t(new Error("indexDB 初始化失败"));
}, n.onupgradeneeded = () => {
n.result.createObjectStore("tiles", { keyPath: "url" });
}, n.onsuccess = () => {
i(n.result);
};
})), Ms.then((i) => i.transaction("tiles", "readwrite").objectStore("tiles"));
}
const os = "map-tiles";
let No = 1e4, Bo = 1e3;
const _u = Date.now() + 31536e8, yu = ["language", "worldview", "jobid"];
let Os, rl;
function vu() {
try {
return caches;
} catch {
}
}
function pa() {
const i = vu();
i && Os == null && (Os = i.open(os));
}
let zs = 1 / 0;
const xc = { supported: !1, testSupport: function(i) {
!Rl && Vo && (Ti ? xn(i) : ma = i);
} };
let ma, Vo, Rl = !1, Ti = !1;
const ra = typeof self < "u" ? self : {};
function xn(i) {
const t = i.createTexture();
i.bindTexture(i.TEXTURE_2D, t);
try {
if (i.texImage2D(i.TEXTURE_2D, 0, i.RGBA, i.RGBA, i.UNSIGNED_BYTE, Vo), i.isContextLost()) return;
xc.supported = !0;
} catch {
}
i.deleteTexture(t), Rl = !0;
}
ra.document && (Vo = ra.document.createElement("img"), Vo.onload = function() {
ma && xn(ma), ma = null, Ti = !0;
}, Vo.onerror = function() {
Rl = !0, ma = null;
}, Vo.src = "data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");
const Va = { Unknown: "Unknown", Style: "Style", Source: "Source", Tile: "Tile", Glyphs: "Glyphs", SpriteImage: "SpriteImage", SpriteJSON: "SpriteJSON", Iconset: "Iconset", Image: "Image", Model: "Model" };
typeof Object.freeze == "function" && Object.freeze(Va);
class As extends Error {
constructor(t, n, a) {
n === 401 && Na(a) && (t += ": you may have provided an invalid Mapbox access token. See https://docs.mapbox.com/api/overview/#access-tokens-and-token-scopes"), super(t), this.status = n, this.url = a;
}
toString() {
return "".concat(this.name, ": ").concat(this.message, " (").concat(this.status, "): ").concat(this.url);
}
}
const Fs = $n() ? () => self.worker.referrer : () => (location.protocol === "blob:" ? parent : self).location.href, Dl = "xzcacheurl", ga = function(i, t) {
if (!(/^file:/.test(n = i.url) || /^file:/.test(Fs()) && !/^\w+:/.test(n))) {
if (self.fetch && self.Request && self.AbortController && Request.prototype.hasOwnProperty("signal")) return function(a, c) {
const m = new AbortController(), _ = function(W, ee) {
const ie = W.indexOf("?");
return ie < 0 ? null : new URLSearchParams(W.slice(ie)).get(ee);
}(a.url, Dl);
a.url = function(W, ee) {
const ie = W.indexOf("?");
if (ie < 0) return W;
const ge = new URLSearchParams(W.slice(ie));
ee.forEach((J) => {
ge.delete(J);
});
const de = ge.toString();
return "".concat(W.slice(0, ie)).concat(de.length > 0 ? "?".concat(de) : "");
}(a.url, [Dl]);
const b = new Request(a.url, { method: a.method || "GET", body: a.body, credentials: a.credentials, headers: a.headers, referrer: Fs(), referrerPolicy: a.referrerPolicy, signal: m.signal });
let M = !1, P = !1;
const R = _ || (O = b.url).indexOf("sku=") > 0 && Na(O);
var O;
const N = b.url.indexOf("ignoring=save") > 0;
a.type === "json" && b.headers.set("Accept", "application/json");
const q = (W, ee, ie) => {
if (P) return;
if (W && W.message !== "SecurityError" && Zr(W.toString()), ee && ie) return j(ee);
const ge = Date.now();
fetch(b).then((de) => {
if (de.ok) {
const J = R && !N ? de.clone() : null;
return j(de, J, ge);
}
return c(new As(de.statusText, de.status, a.url));
}).catch((de) => {
de.name !== "AbortError" && c(new Error("".concat(de.message, " ").concat(a.url)));
});
}, j = (W, ee, ie) => {
(a.type === "arrayBuffer" ? W.arrayBuffer() : a.type === "json" ? W.json() : W.text()).then((ge) => {
P || (ee && ie && (_ && b.headers.set("CacheUrl", _), function(de, J, ue) {
pa();
const me = de.headers.get("CacheUrl") || de.url;
if (de.headers.delete("CacheUrl"), Os == null) return void function(Xe, lt) {
const Ot = { status: lt.status, statusText: lt.statusText, headers: {} };
lt.headers.forEach((St, Dt) => {
Dt !== "max-age" && (Ot.headers[Dt] = St);
}), lt.blob().then((St) => {
Hi().then((Dt) => {
var Nt;
Dt.put({ data: (Nt = lt.status, Nt !== 200 && Nt !== 404 && [101, 103, 204, 205, 304].includes(Nt) ? null : St), url: Xe, options: Ot });
});
});
}(me, J);
const Ee = fi(J.headers.get("Cache-Control") || "");
if (Ee["no-store"]) return;
const Pe = { status: J.status, statusText: J.statusText, headers: new Headers() };
J.headers.forEach((Xe, lt) => Pe.headers.set(lt, Xe)), Ee["max-age"] && Pe.headers.set("Expires", new Date(ue + 1e3 * Ee["max-age"]).toUTCString());
const De = Pe.headers.get("Expires") || _u;
if (!De || new Date(De).getTime() - ue < 42e4) return;
let Be = Ss(me, { persistentParams: yu });
if (J.status === 206) {
const Xe = de.headers.get("Range");
if (!Xe) return;
Pe.status = 200, Be = vc(Be, { range: Xe });
}
(function(Xe, lt) {
if (rl === void 0) try {
new Response(new ReadableStream()), rl = !0;
} catch {
rl = !1;
}
rl ? lt(Xe.body) : Xe.blob().then(lt).catch((Ot) => Zr(Ot.message));
})(J, (Xe) => {
const lt = new Response((Ot = J.status) !== 200 && Ot !== 404 && [101, 103, 204, 205, 304].includes(Ot) ? null : Xe, Pe);
var Ot;
pa(), Os != null && Os.then((St) => St.put(Be, lt)).catch((St) => Zr(St.message));
});
}(b, ee, ie)), M = !0, c(null, ge, W.headers.get("Cache-Control"), W.headers.get("Expires")));
}).catch((ge) => {
P || c(new Error(ge.message));
});
};
return R ? (_ && b.headers.set("CacheUrl", _), function(W, ee) {
pa();
const ie = W.headers.get("CacheUrl") || W.url;
if (W.headers.delete("CacheUrl"), Os == null) return function(ge, de) {
let J = !1;
const ue = setTimeout(() => {
J = !0, de(null);
}, 2e3);
Hi().then((me) => {
if (clearTimeout(ue), J) return de(null);
const Ee = me.get(ge);
Ee.onerror = (Pe) => {
console.error(Pe), de(Pe);
}, Ee.onsuccess = () => {
const Pe = Ee.result;
if (Pe) {
const De = new Response(Pe.data, Pe.options);
de(null, De, !0);
} else de(null);
};
}).catch((me) => {
console.log(me);
});
}(ie, ee);
Os.then((ge) => {
let de = Ss(ie, { persistentParams: yu });
const J = W.headers.get("Range");
J && (de = vc(de, { range: J })), ge.match(de).then((ue) => {
const me = function(Ee) {
if (!Ee) return !1;
const Pe = new Date(Ee.headers.get("Expires") || _u), De = fi(Ee.headers.get("Cache-Control") || "");
return Number(Pe) > Date.now() && !De["no-cache"];
}(ue);
ge.delete(de).catch(ee), me && ge.put(de, ue.clone()).catch(ee), ee(null, ue, me);
}).catch(ee);
}).catch(ee);
}(b, q)) : q(null, null), { cancel: () => {
P = !0, M || m.abort();
} };
}(i, t);
if ($n(self) && self.worker.actor) return self.worker.actor.send("getResource", i, t, void 0, !0);
}
var n;
return function(a, c) {
const m = new XMLHttpRequest();
m.open(a.method || "GET", a.url, !0), a.type === "arrayBuffer" && (m.responseType = "arraybuffer");
for (const _ in a.headers) m.setRequestHeader(_, a.headers[_]);
return a.type === "json" && (m.responseType = "text", m.setRequestHeader("Accept", "application/json")), m.withCredentials = a.credentials === "include", m.onerror = () => {
c(new Error(m.statusText));
}, m.onload = () => {
if ((m.status >= 200 && m.status < 300 || m.status === 0) && m.response !== null) {
let _ = m.response;
if (a.type === "json") try {
_ = JSON.parse(m.response);
} catch (b) {
return c(b);
}
c(null, _, m.getResponseHeader("Cache-Control"), m.getResponseHeader("Expires"));
} else c(new As(m.statusText, m.status, a.url));
}, m.send(a.body), { cancel: () => m.abort() };
}(i, t);
}, _a = function(i, t) {
return ga(Ht(i, { type: "arrayBuffer" }), t);
};
function Ol(i) {
const t = document.createElement("a");
return t.href = i, t.protocol === location.protocol && t.host === location.host;
}
const zl = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";
function xu(i, t) {
const n = new Image();
n.onload = () => {
t(null, n), URL.revokeObjectURL(n.src), n.onload = null, requestAnimationFrame(() => {
n.src = zl;
});
}, n.onerror = () => t(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));
const a = new Blob([new Uint8Array(i)], { type: "image/png" });
n.src = i.byteLength ? URL.createObjectURL(a) : zl;
}
let Fl, qn;
Fl = [], qn = 0;
const Ps = function(i, t) {
if (xc.supported && (i.headers || (i.headers = {}), i.headers.accept = "image/webp,*/*"), qn >= Oi.MAX_PARALLEL_IMAGE_REQUESTS) {
const m = { requestParameters: i, callback: t, cancelled: !1, cancel() {
this.cancelled = !0;
} };
return Fl.push(m), m;
}
qn++;
let n = !1;
const a = () => {
if (!n) for (n = !0, qn--; Fl.length && qn < Oi.MAX_PARALLEL_IMAGE_REQUESTS; ) {
const m = Fl.shift(), { requestParameters: _, callback: b, cancelled: M } = m;
M || (m.cancel = Ps(_, b).cancel);
}
}, c = _a(i, (m, _, b, M) => {
a(), m ? t(m) : _ && (self.createImageBitmap ? function(P, R) {
const O = new Blob([new Uint8Array(P)], { type: "image/png" });
createImageBitmap(O).then((N) => {
R(null, N);
}).catch((N) => {
R(new Error("Could not load image because of ".concat(N.message, ". Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.")));
});
}(_, (P, R) => t(P, R, b, M)) : Image && !i.returnArraybuffer ? xu(_, (P, R) => t(P, R, b, M)) : t(m, _, b, M));
});
return { cancel: () => {
c.cancel(), a();
} };
};
var nl, Xs, Ua, il = { exports: {} }, hs = { exports: {} }, bc = { exports: {} }, wc = function() {
if (Ua) return il.exports;
Ua = 1;
var i = (nl || (nl = 1, hs.exports = function(n, a) {
var c, m, _, b, M, P, R, O;
for (m = n.length - (c = 3 & n.length), _ = a, M = 3432918353, P = 461845907, O = 0; O < m; ) R = 255 & n.charCodeAt(O) | (255 & n.charCodeAt(++O)) << 8 | (255 & n.charCodeAt(++O)) << 16 | (255 & n.charCodeAt(++O)) << 24, ++O, _ = 27492 + (65535 & (b = 5 * (65535 & (_ = (_ ^= R = (65535 & (R = (R = (65535 & R) * M + (((R >>> 16) * M & 65535) << 16) & 4294967295) << 15 | R >>> 17)) * P + (((R >>> 16) * P & 65535) << 16) & 4294967295) << 13 | _ >>> 19)) + ((5 * (_ >>> 16) & 65535) << 16) & 4294967295)) + (((b >>> 16) + 58964 & 65535) << 16);
switch (R = 0, c) {
case 3:
R ^= (255 & n.charCodeAt(O + 2)) << 16;
case 2:
R ^= (255 & n.charCodeAt(O + 1)) << 8;
case 1:
_ ^= R = (65535 & (R = (R = (65535 & (R ^= 255 & n.charCodeAt(O))) * M + (((R >>> 16) * M & 65535) << 16) & 4294967295) << 15 | R >>> 17)) * P + (((R >>> 16) * P & 65535) << 16) & 4294967295;
}
return _ ^= n.length, _ = 2246822507 * (65535 & (_ ^= _ >>> 16)) + ((2246822507 * (_ >>> 16) & 65535) << 16) & 4294967295, _ = 3266489909 * (65535 & (_ ^= _ >>> 13)) + ((3266489909 * (_ >>> 16) & 65535) << 16) & 4294967295, (_ ^= _ >>> 16) >>> 0;
}), hs.exports), t = (Xs || (Xs = 1, bc.exports = function(n, a) {
for (var c, m = n.length, _ = a ^ m, b = 0; m >= 4; ) c = 1540483477 * (65535 & (c = 255 & n.charCodeAt(b) | (255 & n.charCodeAt(++b)) << 8 | (255 & n.charCodeAt(++b)) << 16 | (255 & n.charCodeAt(++b)) << 24)) + ((1540483477 * (c >>> 16) & 65535) << 16), _ = 1540483477 * (65535 & _) + ((1540483477 * (_ >>> 16) & 65535) << 16) ^ (c = 1540483477 * (65535 & (c ^= c >>> 24)) + ((1540483477 * (c >>> 16) & 65535) << 16)), m -= 4, ++b;
switch (m) {
case 3:
_ ^= (255 & n.charCodeAt(b + 2)) << 16;
case 2:
_ ^= (255 & n.charCodeAt(b + 1)) << 8;
case 1:
_ = 1540483477 * (65535 & (_ ^= 255 & n.charCodeAt(b))) + ((1540483477 * (_ >>> 16) & 65535) << 16);
}
return _ = 1540483477 * (65535 & (_ ^= _ >>> 13)) + ((1540483477 * (_ >>> 16) & 65535) << 16), (_ ^= _ >>> 15) >>> 0;
}), bc.exports);
return il.exports = i, il.exports.murmur3 = i, il.exports.murmur2 = t, il.exports;
}(), sl = po(wc);
class na {
constructor(t, ...n) {
Ht(this, n[0] || {}), this.type = t;
}
}
class Ec extends na {
constructor(t, n = {}) {
super("error", Ht({ error: t }, n));
}
}
function ol(i, t, n) {
n[i] && n[i].indexOf(t) !== -1 || (n[i] = n[i] || [], n[i].push(t));
}
function gs(i, t, n) {
if (n && n[i]) {
const a = n[i].indexOf(t);
a !== -1 && n[i].splice(a, 1);
}
}
class Uo {
on(t, n) {
return this._listeners = this._listeners || {}, ol(t, n, this._listeners), this;
}
off(t, n) {
return gs(t, n, this._listeners), gs(t, n, this._oneTimeListeners), this;
}
once(t, n) {
return n ? (this._oneTimeListeners = this._oneTimeListeners || {}, ol(t, n, this._oneTimeListeners), this) : new Promise((a) => {
this.once(t, a);
});
}
fire(t, n) {
const a = typeof t == "string" ? new na(t, n) : t, c = a.type;
if (this.listens(c)) {
a.target = this;
const m = this._listeners && this._listeners[c] ? this._listeners[c].slice() : [];
for (const M of m) M.call(this, a);
const _ = this._oneTimeListeners && this._oneTimeListeners[c] ? this._oneTimeListeners[c].slice() : [];
for (const M of _) gs(c, M, this._oneTimeListeners), M.call(this, a);
const b = this._eventedParent;
b && (Ht(a, typeof this._eventedParentData == "function" ? this._eventedParentData() : this._eventedParentData), b.fire(a));
} else a instanceof Ec && console.error(a.error);
return this;
}
listens(t) {
return !!(this._listeners && this._listeners[t] && this._listeners[t].length > 0 || this._oneTimeListeners && this._oneTimeListeners[t] && this._oneTimeListeners[t].length > 0 || this._eventedParent && this._eventedParent.listens(t));
}
setEventedParent(t, n) {
return this._eventedParent = t, this._eventedParentData = n, this;
}
}
class zi {
constructor(t) {
typeof t == "string" ? this.name = t : (this.name = t.name, this.iconsetId = t.iconsetId);
}
static from(t) {
return new zi(t);
}
static toString(t) {
return t.iconsetId ? "".concat(t.name).concat("").concat(t.iconsetId) : t.name;
}
static parse(t) {
const [n, a] = t.split("");
return new zi({ name: n, iconsetId: a });
}
static isEqual(t, n) {
return t.name === n.name && t.iconsetId === n.iconsetId;
}
toString() {
return zi.toString(this);
}
serialize() {
return { name: this.name, iconsetId: this.iconsetId };
}
}
var Ws, Go = {}, ph = function() {
if (Ws) return Go;
Ws = 1;
var i = { transparent: [0, 0, 0, 0], aliceblue: [240, 248, 255, 1], antiquewhite: [250, 235, 215, 1], aqua: [0, 255, 255, 1], aquamarine: [127, 255, 212, 1], azure: [240, 255, 255, 1], beige: [245, 245, 220, 1], bisque: [255, 228, 196, 1], black: [0, 0, 0, 1], blanchedalmond: [255, 235, 205, 1], blue: [0, 0, 255, 1], blueviolet: [138, 43, 226, 1], brown: [165, 42, 42, 1], burlywood: [222, 184, 135, 1], cadetblue: [95, 158, 160, 1], chartreuse: [127, 255, 0, 1], chocolate: [210, 105, 30, 1], coral: [255, 127, 80, 1], cornflowerblue: [100, 149, 237, 1], cornsilk: [255, 248, 220, 1], crimson: [220, 20, 60, 1], cyan: [0, 255, 255, 1], darkblue: [0, 0, 139, 1], darkcyan: [0, 139, 139, 1], darkgoldenrod: [184, 134, 11, 1], darkgray: [169, 169, 169, 1], darkgreen: [0, 100, 0, 1], darkgrey: [169, 169, 169, 1], darkkhaki: [189, 183, 107, 1], darkmagenta: [139, 0, 139, 1], darkolivegreen: [85, 107, 47, 1], darkorange: [255, 140, 0, 1], darkorchid: [153, 50, 204, 1], darkred: [139, 0, 0, 1], darksalmon: [233, 150, 122, 1], darkseagreen: [143, 188, 143, 1], darkslateblue: [72, 61, 139, 1], darkslategray: [47, 79, 79, 1], darkslategrey: [47, 79, 79, 1], darkturquoise: [0, 206, 209, 1], darkviolet: [148, 0, 211, 1], deeppink: [255, 20, 147, 1], deepskyblue: [0, 191, 255, 1], dimgray: [105, 105, 105, 1], dimgrey: [105, 105, 105, 1], dodgerblue: [30, 144, 255, 1], firebrick: [178, 34, 34, 1], floralwhite: [255, 250, 240, 1], forestgreen: [34, 139, 34, 1], fuchsia: [255, 0, 255, 1], gainsboro: [220, 220, 220, 1], ghostwhite: [248, 248, 255, 1], gold: [255, 215, 0, 1], goldenrod: [218, 165, 32, 1], gray: [128, 128, 128, 1], green: [0, 128, 0, 1], greenyellow: [173, 255, 47, 1], grey: [128, 128, 128, 1], honeydew: [240, 255, 240, 1], hotpink: [255, 105, 180, 1], indianred: [205, 92, 92, 1], indigo: [75, 0, 130, 1], ivory: [255, 255, 240, 1], khaki: [240, 230, 140, 1], lavender: [230, 230, 250, 1], lavenderblush: [255, 240, 245, 1], lawngreen: [124, 252, 0, 1], lemonchiffon: [255, 250, 205, 1], lightblue: [173, 216, 230, 1], lightcoral: [240, 128, 128, 1], lightcyan: [224, 255, 255, 1], lightgoldenrodyellow: [250, 250, 210, 1], lightgray: [211, 211, 211, 1], lightgreen: [144, 238, 144, 1], lightgrey: [211, 211, 211, 1], lightpink: [255, 182, 193, 1], lightsalmon: [255, 160, 122, 1], lightseagreen: [32, 178, 170, 1], lightskyblue: [135, 206, 250, 1], lightslategray: [119, 136, 153, 1], lightslategrey: [119, 136, 153, 1], lightsteelblue: [176, 196, 222, 1], lightyellow: [255, 255, 224, 1], lime: [0, 255, 0, 1], limegreen: [50, 205, 50, 1], linen: [250, 240, 230, 1], magenta: [255, 0, 255, 1], maroon: [128, 0, 0, 1], mediumaquamarine: [102, 205, 170, 1], mediumblue: [0, 0, 205, 1], mediumorchid: [186, 85, 211, 1], mediumpurple: [147, 112, 219, 1], mediumseagreen: [60, 179, 113, 1], mediumslateblue: [123, 104, 238, 1], mediumspringgreen: [0, 250, 154, 1], mediumturquoise: [72, 209, 204, 1], mediumvioletred: [199, 21, 133, 1], midnightblue: [25, 25, 112, 1], mintcream: [245, 255, 250, 1], mistyrose: [255, 228, 225, 1], moccasin: [255, 228, 181, 1], navajowhite: [255, 222, 173, 1], navy: [0, 0, 128, 1], oldlace: [253, 245, 230, 1], olive: [128, 128, 0, 1], olivedrab: [107, 142, 35, 1], orange: [255, 165, 0, 1], orangered: [255, 69, 0, 1], orchid: [218, 112, 214, 1], palegoldenrod: [238, 232, 170, 1], palegreen: [152, 251, 152, 1], paleturquoise: [175, 238, 238, 1], palevioletred: [219, 112, 147, 1], papayawhip: [255, 239, 213, 1], peachpuff: [255, 218, 185, 1], peru: [205, 133, 63, 1], pink: [255, 192, 203, 1], plum: [221, 160, 221, 1], powderblue: [176, 224, 230, 1], purple: [128, 0, 128, 1], rebeccapurple: [102, 51, 153, 1], red: [255, 0, 0, 1], rosybrown: [188, 143, 143, 1], royalblue: [65, 105, 225, 1], saddlebrown: [139, 69, 19, 1], salmon: [250, 128, 114, 1], sandybrown: [244, 164, 96, 1], seagreen: [46, 139, 87, 1], seashell: [255, 245, 238, 1], sienna: [160, 82, 45, 1], silver: [192, 192, 192, 1], skyblue: [135, 206, 235, 1], slateblue: [106, 90, 205, 1], slategray: [112, 128, 144, 1], slategrey: [112, 128, 144, 1], snow: [255, 250, 250, 1], springgreen: [0, 255, 127, 1], steelblue: [70, 130, 180, 1], tan: [210, 180, 140, 1], teal: [0, 128, 128, 1], thistle: [216, 191, 216, 1], tomato: [255, 99, 71, 1], turquoise: [64, 224, 208, 1], violet: [238, 130, 238, 1], wheat: [245, 222, 179, 1], white: [255, 255, 255, 1], whitesmoke: [245, 245, 245, 1], yellow: [255, 255, 0, 1], yellowgreen: [154, 205, 50, 1] };
function t(m) {
return (m = Math.round(m)) < 0 ? 0 : m > 255 ? 255 : m;
}
function n(m) {
return t(m[m.length - 1] === "%" ? parseFloat(m) / 100 * 255 : parseInt(m));
}
function a(m) {
return (_ = m[m.length - 1] === "%" ? parseFloat(m) / 100 : parseFloat(m)) < 0 ? 0 : _ > 1 ? 1 : _;
var _;
}
function c(m, _, b) {
return b < 0 ? b += 1 : b > 1 && (b -= 1), 6 * b < 1 ? m + (_ - m) * b * 6 : 2 * b < 1 ? _ : 3 * b < 2 ? m + (_ - m) * (2 / 3 - b) * 6 : m;
}
try {
Go.parseCSSColor = function(m) {
var _, b = m.replace(/ /g, "").toLowerCase();
if (b in i) return i[b].slice();
if (b[0] === "#") return b.length === 4 ? (_ = parseInt(b.substr(1), 16)) >= 0 && _ <= 4095 ? [(3840 & _) >> 4 | (3840 & _) >> 8, 240 & _ | (240 & _) >> 4, 15 & _ | (15 & _) << 4, 1] : null : b.length === 7 && (_ = parseInt(b.substr(1), 16)) >= 0 && _ <= 16777215 ? [(16711680 & _) >> 16, (65280 & _) >> 8, 255 & _, 1] : null;
var M = b.indexOf("("), P = b.indexOf(")");
if (M !== -1 && P + 1 === b.length) {
var R = b.substr(0, M), O = b.substr(M + 1, P - (M + 1)).split(","), N = 1;
switch (R) {
case "rgba":
if (O.length !== 4) return null;
N = a(O.pop());
case "rgb":
return O.length !== 3 ? null : [n(O[0]), n(O[1]), n(O[2]), N];
case "hsla":
if (O.length !== 4) return null;
N = a(O.pop());
case "hsl":
if (O.length !== 3) return null;
var q = (parseFloat(O[0]) % 360 + 360) % 360 / 360, j = a(O[1]), W = a(O[2]), ee = W <= 0.5 ? W * (j + 1) : W + j - W * j, ie = 2 * W - ee;
return [t(255 * c(i