tianditu-map
Version:
1,857 lines (1,856 loc) • 264 kB
JavaScript
!(function() {
function n(n, t) {
return t > n ? -1 : n > t ? 1 : n >= t ? 0 : 0 / 0;
}
function t(n) {
return n === null ? 0 / 0 : +n;
}
function e(n) {
return !isNaN(n);
}
function r(n) {
return {
left: function(t, e, r, u) {
for (arguments.length < 3 && (r = 0),
arguments.length < 4 && (u = t.length); u > r;) {
const i = r + u >>> 1;
n(t[i], e) < 0 ? r = i + 1 : u = i;
}
return r;
},
right: function(t, e, r, u) {
for (arguments.length < 3 && (r = 0),
arguments.length < 4 && (u = t.length); u > r;) {
const i = r + u >>> 1;
n(t[i], e) > 0 ? u = i : r = i + 1;
}
return r;
},
};
}
function u(n) {
return n.length;
}
function i(n) {
for (var t = 1; n * t % 1;) { t *= 10; }
return t;
}
function o(n, t) {
for (const e in t) {
Object.defineProperty(n.prototype, e, {
value: t[e],
enumerable: !1,
});
}
}
function a() {
this._ = Object.create(null);
}
function c(n) {
return (n += '') === da || n[0] === ma ? ma + n : n;
}
function l(n) {
return (n += '')[0] === ma ? n.slice(1) : n;
}
function s(n) {
return c(n) in this._;
}
function f(n) {
return (n = c(n)) in this._ && delete this._[n];
}
function h() {
const n = [];
for (const t in this._) { n.push(l(t)); }
return n;
}
function g() {
let n = 0;
for (const t in this._) { ++n; }
return n;
}
function p() {
for (const n in this._) { return !1; }
return !0;
}
function v() {
this._ = Object.create(null);
}
function d(n, t, e) {
return function() {
const r = e.apply(t, arguments);
return r === t ? n : r;
};
}
function m(n, t) {
if (t in n) { return t; }
t = t.charAt(0).toUpperCase() + t.slice(1);
for (let e = 0, r = ya.length; r > e; ++e) {
const u = ya[e] + t;
if (u in n) { return u; }
}
}
function y() {}
function M() {}
function x(n) {
function t() {
for (var t, r = e, u = -1, i = r.length; ++u < i;) { (t = r[u].on) && t.apply(this, arguments); }
return n;
}
var e = [];
const r = new a();
return t.on = function(t, u) {
let i; const o = r.get(t);
return arguments.length < 2 ? o && o.on : (o && (o.on = null,
e = e.slice(0, i = e.indexOf(o)).concat(e.slice(i + 1)),
r.remove(t)),
u && e.push(r.set(t, {
on: u,
})),
n);
}
,
t;
}
function b() {
ta.event.preventDefault();
}
function _() {
for (var n, t = ta.event; n = t.sourceEvent;) { t = n; }
return t;
}
function w(n) {
for (var t = new M(), e = 0, r = arguments.length; ++e < r;) { t[arguments[e]] = x(t); }
return t.of = function(e, r) {
return function(u) {
try {
var i = u.sourceEvent = ta.event;
u.target = n,
ta.event = u,
t[u.type].apply(e, r);
} finally {
ta.event = i;
}
};
}
,
t;
}
function S(n) {
return xa(n, ka),
n;
}
function k(n) {
return typeof n === 'function' ? n : function() {
return ba(n, this);
};
}
function E(n) {
return typeof n === 'function' ? n : function() {
return _a(n, this);
};
}
function A(n, t) {
function e() {
this.removeAttribute(n);
}
function r() {
this.removeAttributeNS(n.space, n.local);
}
function u() {
this.setAttribute(n, t);
}
function i() {
this.setAttributeNS(n.space, n.local, t);
}
function o() {
const e = t.apply(this, arguments);
e == null ? this.removeAttribute(n) : this.setAttribute(n, e);
}
function a() {
const e = t.apply(this, arguments);
e == null ? this.removeAttributeNS(n.space, n.local) : this.setAttributeNS(n.space, n.local, e);
}
return n = ta.ns.qualify(n),
t == null ? n.local ? r : e : typeof t === 'function' ? n.local ? a : o : n.local ? i : u;
}
function N(n) {
return n.trim().replace(/\s+/g, ' ');
}
function C(n) {
return new RegExp('(?:^|\\s+)' + ta.requote(n) + '(?:\\s+|$)', 'g');
}
function z(n) {
return (n + '').trim().split(/^|\s+/);
}
function q(n, t) {
function e() {
for (let e = -1; ++e < u;) { n[e](this, t); }
}
function r() {
for (let e = -1, r = t.apply(this, arguments); ++e < u;) { n[e](this, r); }
}
n = z(n).map(L);
var u = n.length;
return typeof t === 'function' ? r : e;
}
function L(n) {
const t = C(n);
return function(e, r) {
if (u = e.classList) { return r ? u.add(n) : u.remove(n); }
var u = e.getAttribute('class') || '';
r ? (t.lastIndex = 0,
t.test(u) || e.setAttribute('class', N(u + ' ' + n))) : e.setAttribute('class', N(u.replace(t, ' ')));
};
}
function T(n, t, e) {
function r() {
this.style.removeProperty(n);
}
function u() {
this.style.setProperty(n, t, e);
}
function i() {
const r = t.apply(this, arguments);
r == null ? this.style.removeProperty(n) : this.style.setProperty(n, r, e);
}
return t == null ? r : typeof t === 'function' ? i : u;
}
function R(n, t) {
function e() {
delete this[n];
}
function r() {
this[n] = t;
}
function u() {
const e = t.apply(this, arguments);
e == null ? delete this[n] : this[n] = e;
}
return t == null ? e : typeof t === 'function' ? u : r;
}
function D(n) {
return typeof n === 'function' ? n : (n = ta.ns.qualify(n)).local ? function() {
return this.ownerDocument.createElementNS(n.space, n.local);
}
: function() {
return this.ownerDocument.createElementNS(this.namespaceURI, n);
};
}
function P() {
const n = this.parentNode;
n && n.removeChild(this);
}
function U(n) {
return {
__data__: n,
};
}
function j(n) {
return function() {
return Sa(this, n);
};
}
function F(t) {
return arguments.length || (t = n),
function(n, e) {
return n && e ? t(n.__data__, e.__data__) : !n - !e;
};
}
function H(n, t) {
for (let e = 0, r = n.length; r > e; e++) {
for (var u, i = n[e], o = 0, a = i.length; a > o; o++) { (u = i[o]) && t(u, o, e); }
}
return n;
}
function O(n) {
return xa(n, Aa),
n;
}
function Y(n) {
let t, e;
return function(r, u, i) {
let o; const a = n[i].update; const c = a.length;
for (i != e && (e = i,
t = 0),
u >= t && (t = u + 1); !(o = a[t]) && ++t < c;)
;
return o;
};
}
function I(n, t, e) {
function r() {
const t = this[o];
t && (this.removeEventListener(n, t, t.$),
delete this[o]);
}
function u() {
const u = c(t, ra(arguments));
r.call(this),
this.addEventListener(n, this[o] = u, u.$ = e),
u._ = t;
}
function i() {
let t; const e = new RegExp('^__on([^.]+)' + ta.requote(n) + '$');
for (const r in this) {
if (t = r.match(e)) {
const u = this[r];
this.removeEventListener(t[1], u, u.$),
delete this[r];
}
}
}
var o = '__on' + n;
const a = n.indexOf('.');
var c = Z;
a > 0 && (n = n.slice(0, a));
const l = Ca.get(n);
return l && (n = l,
c = V),
a ? t ? u : r : t ? y : i;
}
function Z(n, t) {
return function(e) {
const r = ta.event;
ta.event = e,
t[0] = this.__data__;
try {
n.apply(this, t);
} finally {
ta.event = r;
}
};
}
function V(n, t) {
const e = Z(n, t);
return function(n) {
const t = this;
const r = n.relatedTarget;
r && (r === t || 8 & r.compareDocumentPosition(t)) || e.call(t, n);
};
}
function X() {
const n = '.dragsuppress-' + ++qa;
const t = 'click' + n;
const e = ta.select(oa).on('touchmove' + n, b).on('dragstart' + n, b).on('selectstart' + n, b);
if (za) {
var r = ia.style;
var u = r[za];
r[za] = 'none';
}
return function(i) {
if (e.on(n, null),
za && (r[za] = u),
i) {
const o = function() {
e.on(t, null);
};
e.on(t, function() {
b(),
o();
}, !0),
setTimeout(o, 0);
}
};
}
function $(n, t) {
t.changedTouches && (t = t.changedTouches[0]);
let e = n.ownerSVGElement || n;
if (e.createSVGPoint) {
let r = e.createSVGPoint();
if (La < 0 && (oa.scrollX || oa.scrollY)) {
e = ta.select('body').append('svg').style({
position: 'absolute',
top: 0,
left: 0,
margin: 0,
padding: 0,
border: 'none',
}, 'important');
const u = e[0][0].getScreenCTM();
La = !(u.f || u.e),
e.remove();
}
return La ? (r.x = t.pageX,
r.y = t.pageY) : (r.x = t.clientX,
r.y = t.clientY),
r = r.matrixTransform(n.getScreenCTM().inverse()),
[r.x, r.y];
}
const i = n.getBoundingClientRect();
return [t.clientX - i.left - n.clientLeft, t.clientY - i.top - n.clientTop];
}
function B() {
return ta.event.changedTouches[0].identifier;
}
function W() {
return ta.event.target;
}
function J() {
return oa;
}
function G(n) {
return n > 0 ? 1 : n < 0 ? -1 : 0;
}
function K(n, t, e) {
return (t[0] - n[0]) * (e[1] - n[1]) - (t[1] - n[1]) * (e[0] - n[0]);
}
function Q(n) {
return n > 1 ? 0 : n < -1 ? Da : Math.acos(n);
}
function nt(n) {
return n > 1 ? ja : n < -1 ? -ja : Math.asin(n);
}
function tt(n) {
return ((n = Math.exp(n)) - 1 / n) / 2;
}
function et(n) {
return ((n = Math.exp(n)) + 1 / n) / 2;
}
function rt(n) {
return ((n = Math.exp(2 * n)) - 1) / (n + 1);
}
function ut(n) {
return (n = Math.sin(n / 2)) * n;
}
function it() {}
function ot(n, t, e) {
return this instanceof ot ? (this.h = +n,
this.s = +t,
void (this.l = +e)) : arguments.length < 2 ? n instanceof ot ? new ot(n.h, n.s, n.l) : xt('' + n, bt, ot) : new ot(n, t, e);
}
function at(n, t, e) {
function r(n) {
return n > 360 ? n -= 360 : n < 0 && (n += 360),
n < 60 ? i + (o - i) * n / 60 : n < 180 ? o : n < 240 ? i + (o - i) * (240 - n) / 60 : i;
}
function u(n) {
return Math.round(255 * r(n));
}
let i, o;
return n = isNaN(n) ? 0 : (n %= 360) < 0 ? n + 360 : n,
t = isNaN(t) ? 0 : t < 0 ? 0 : t > 1 ? 1 : t,
e = e < 0 ? 0 : e > 1 ? 1 : e,
o = e <= 0.5 ? e * (1 + t) : e + t - e * t,
i = 2 * e - o,
new dt(u(n + 120), u(n), u(n - 120));
}
function ct(n, t, e) {
return this instanceof ct ? (this.h = +n,
this.c = +t,
void (this.l = +e)) : arguments.length < 2 ? n instanceof ct ? new ct(n.h, n.c, n.l) : n instanceof st ? ht(n.l, n.a, n.b) : ht((n = _t((n = ta.rgb(n)).r, n.g, n.b)).l, n.a, n.b) : new ct(n, t, e);
}
function lt(n, t, e) {
return isNaN(n) && (n = 0),
isNaN(t) && (t = 0),
new st(e, Math.cos(n *= Fa) * t, Math.sin(n) * t);
}
function st(n, t, e) {
return this instanceof st ? (this.l = +n,
this.a = +t,
void (this.b = +e)) : arguments.length < 2 ? n instanceof st ? new st(n.l, n.a, n.b) : n instanceof ct ? lt(n.h, n.c, n.l) : _t((n = dt(n)).r, n.g, n.b) : new st(n, t, e);
}
function ft(n, t, e) {
let r = (n + 16) / 116;
let u = r + t / 500;
let i = r - e / 200;
return u = gt(u) * Ja,
r = gt(r) * Ga,
i = gt(i) * Ka,
new dt(vt(3.2404542 * u - 1.5371385 * r - 0.4985314 * i), vt(-0.969266 * u + 1.8760108 * r + 0.041556 * i), vt(0.0556434 * u - 0.2040259 * r + 1.0572252 * i));
}
function ht(n, t, e) {
return n > 0 ? new ct(Math.atan2(e, t) * Ha, Math.sqrt(t * t + e * e), n) : new ct(0 / 0, 0 / 0, n);
}
function gt(n) {
return n > 0.206893034 ? n * n * n : (n - 4 / 29) / 7.787037;
}
function pt(n) {
return n > 0.008856 ? Math.pow(n, 1 / 3) : 7.787037 * n + 4 / 29;
}
function vt(n) {
return Math.round(255 * (n <= 0.00304 ? 12.92 * n : 1.055 * Math.pow(n, 1 / 2.4) - 0.055));
}
function dt(n, t, e) {
return this instanceof dt ? (this.r = ~~n,
this.g = ~~t,
void (this.b = ~~e)) : arguments.length < 2 ? n instanceof dt ? new dt(n.r, n.g, n.b) : xt('' + n, dt, at) : new dt(n, t, e);
}
function mt(n) {
return new dt(n >> 16, 255 & n >> 8, 255 & n);
}
function yt(n) {
return mt(n) + '';
}
function Mt(n) {
return n < 16 ? '0' + Math.max(0, n).toString(16) : Math.min(255, n).toString(16);
}
function xt(n, t, e) {
let r; let u; let i; let o = 0; let a = 0; let c = 0;
if (r = /([a-z]+)\((.*)\)/i.exec(n)) {
switch (u = r[2].split(','),
r[1]) {
case 'hsl':
return e(parseFloat(u[0]), parseFloat(u[1]) / 100, parseFloat(u[2]) / 100);
case 'rgb':
return t(St(u[0]), St(u[1]), St(u[2]));
}
}
return (i = tc.get(n)) ? t(i.r, i.g, i.b) : (n == null || n.charAt(0) !== '#' || isNaN(i = parseInt(n.slice(1), 16)) || (n.length === 4 ? (o = (3840 & i) >> 4,
o = o >> 4 | o,
a = 240 & i,
a = a >> 4 | a,
c = 15 & i,
c = c << 4 | c) : n.length === 7 && (o = (16711680 & i) >> 16,
a = (65280 & i) >> 8,
c = 255 & i)),
t(o, a, c));
}
function bt(n, t, e) {
let r; let u; const i = Math.min(n /= 255, t /= 255, e /= 255); const o = Math.max(n, t, e); const a = o - i; const c = (o + i) / 2;
return a ? (u = c < 0.5 ? a / (o + i) : a / (2 - o - i),
r = n == o ? (t - e) / a + (e > t ? 6 : 0) : t == o ? (e - n) / a + 2 : (n - t) / a + 4,
r *= 60) : (r = 0 / 0,
u = c > 0 && c < 1 ? 0 : r),
new ot(r, u, c);
}
function _t(n, t, e) {
n = wt(n),
t = wt(t),
e = wt(e);
const r = pt((0.4124564 * n + 0.3575761 * t + 0.1804375 * e) / Ja);
const u = pt((0.2126729 * n + 0.7151522 * t + 0.072175 * e) / Ga);
const i = pt((0.0193339 * n + 0.119192 * t + 0.9503041 * e) / Ka);
return st(116 * u - 16, 500 * (r - u), 200 * (u - i));
}
function wt(n) {
return (n /= 255) <= 0.04045 ? n / 12.92 : Math.pow((n + 0.055) / 1.055, 2.4);
}
function St(n) {
const t = parseFloat(n);
return n.charAt(n.length - 1) === '%' ? Math.round(2.55 * t) : t;
}
function kt(n) {
return typeof n === 'function' ? n : function() {
return n;
};
}
function Et(n) {
return n;
}
function At(n) {
return function(t, e, r) {
return arguments.length === 2 && typeof e === 'function' && (r = e,
e = null),
Nt(t, e, n, r);
};
}
function Nt(n, t, e, r) {
function u() {
let n; const t = c.status;
if (!t && zt(c) || t >= 200 && t < 300 || t === 304) {
try {
n = e.call(i, c);
} catch (r) {
return o.error.call(i, r),
void 0;
}
o.load.call(i, n);
} else { o.error.call(i, c); }
}
var i = {};
var o = ta.dispatch('beforesend', 'progress', 'load', 'error');
const a = {};
var c = new XMLHttpRequest()
; let l = null;
return !oa.XDomainRequest || 'withCredentials' in c || !/^(http(s)?:)?\/\//.test(n) || (c = new XDomainRequest()),
'onload' in c ? c.onload = c.onerror = u : c.onreadystatechange = function() {
c.readyState > 3 && u();
}
,
c.onprogress = function(n) {
const t = ta.event;
ta.event = n;
try {
o.progress.call(i, c);
} finally {
ta.event = t;
}
}
,
i.header = function(n, t) {
return n = (n + '').toLowerCase(),
arguments.length < 2 ? a[n] : (t == null ? delete a[n] : a[n] = t + '',
i);
}
,
i.mimeType = function(n) {
return arguments.length ? (t = n == null ? null : n + '',
i) : t;
}
,
i.responseType = function(n) {
return arguments.length ? (l = n,
i) : l;
}
,
i.response = function(n) {
return e = n,
i;
}
,
['get', 'post'].forEach(function(n) {
i[n] = function() {
return i.send.apply(i, [n].concat(ra(arguments)));
};
}),
i.send = function(e, r, u) {
if (arguments.length === 2 && typeof r === 'function' && (u = r,
r = null),
c.open(e, n, !0),
t == null || 'accept' in a || (a.accept = t + ',*/*'),
c.setRequestHeader) {
for (const s in a) { c.setRequestHeader(s, a[s]); }
}
return t != null && c.overrideMimeType && c.overrideMimeType(t),
l != null && (c.responseType = l),
u != null && i.on('error', u).on('load', function(n) {
u(null, n);
}),
o.beforesend.call(i, c),
c.send(r == null ? null : r),
i;
}
,
i.abort = function() {
return c.abort(),
i;
}
,
ta.rebind(i, o, 'on'),
r == null ? i : i.get(Ct(r));
}
function Ct(n) {
return n.length === 1 ? function(t, e) {
n(t == null ? e : null);
}
: n;
}
function zt(n) {
const t = n.responseType;
return t && t !== 'text' ? n.response : n.responseText;
}
function qt() {
const n = Lt();
const t = Tt() - n;
t > 24 ? (isFinite(t) && (clearTimeout(ic),
ic = setTimeout(qt, t)),
uc = 0) : (uc = 1,
ac(qt));
}
function Lt() {
const n = Date.now();
for (oc = ec; oc;) {
n >= oc.t && (oc.f = oc.c(n - oc.t)),
oc = oc.n;
}
return n;
}
function Tt() {
for (var n, t = ec, e = 1 / 0; t;) {
t.f ? t = n ? n.n = t.n : ec = t.n : (t.t < e && (e = t.t),
t = (n = t).n);
}
return rc = n,
e;
}
function Rt(n, t) {
return t - (n ? Math.ceil(Math.log(n) / Math.LN10) : 1);
}
function Dt(n, t) {
const e = Math.pow(10, 3 * va(8 - t));
return {
scale: t > 8 ? function(n) {
return n / e;
}
: function(n) {
return n * e;
},
symbol: n,
};
}
function Pt(n) {
const t = n.decimal;
const e = n.thousands;
const r = n.grouping;
const u = n.currency;
const i = r && e ? function(n, t) {
for (var u = n.length, i = [], o = 0, a = r[0], c = 0; u > 0 && a > 0 && (c + a + 1 > t && (a = Math.max(1, t - c)),
i.push(n.substring(u -= a, u + a)),
!((c += a + 1) > t));) { a = r[o = (o + 1) % r.length]; }
return i.reverse().join(e);
}
: Et;
return function(n) {
const e = lc.exec(n);
let r = e[1] || ' '
; let o = e[2] || '>'
; const a = e[3] || '-'
; const c = e[4] || ''
; let l = e[5];
const s = +e[6];
let f = e[7];
let h = e[8];
let g = e[9];
let p = 1;
let v = ''
; let d = ''
; let m = !1;
let y = !0;
switch (h && (h = +h.substring(1)),
(l || r === '0' && o === '=') && (l = r = '0',
o = '='),
g) {
case 'n':
f = !0,
g = 'g';
break;
case '%':
p = 100,
d = '%',
g = 'f';
break;
case 'p':
p = 100,
d = '%',
g = 'r';
break;
case 'b':
case 'o':
case 'x':
case 'X':
c === '#' && (v = '0' + g.toLowerCase());
case 'c':
y = !1;
case 'd':
m = !0,
h = 0;
break;
case 's':
p = -1,
g = 'r';
}
c === '$' && (v = u[0],
d = u[1]),
g != 'r' || h || (g = 'g'),
h != null && (g == 'g' ? h = Math.max(1, Math.min(21, h)) : (g == 'e' || g == 'f') && (h = Math.max(0, Math.min(20, h)))),
g = sc.get(g) || Ut;
const M = l && f;
return function(n) {
let e = d;
if (m && n % 1) { return ''; }
let u = n < 0 || n === 0 && 1 / n < 0 ? (n = -n,
'-') : a === '-' ? '' : a;
if (p < 0) {
const c = ta.formatPrefix(n, h);
n = c.scale(n),
e = c.symbol + d;
} else { n *= p; }
n = g(n, h);
let x; let b; const _ = n.lastIndexOf('.');
if (_ < 0) {
const w = y ? n.lastIndexOf('e') : -1;
w < 0 ? (x = n,
b = '') : (x = n.substring(0, w),
b = n.substring(w));
} else {
x = n.substring(0, _),
b = t + n.substring(_ + 1);
}
!l && f && (x = i(x, 1 / 0));
let S = v.length + x.length + b.length + (M ? 0 : u.length);
const k = s > S ? new Array(S = s - S + 1).join(r) : '';
return M && (x = i(k + x, k.length ? s - b.length : 1 / 0)),
u += v,
n = x + b,
(o === '<' ? u + n + k : o === '>' ? k + u + n : o === '^' ? k.substring(0, S >>= 1) + u + n + k.substring(S) : u + (M ? n : k + n)) + e;
};
};
}
function Ut(n) {
return n + '';
}
function jt() {
this._ = new Date(arguments.length > 1 ? Date.UTC.apply(this, arguments) : arguments[0]);
}
function Ft(n, t, e) {
function r(t) {
const e = n(t);
const r = i(e, 1);
return r - t > t - e ? e : r;
}
function u(e) {
return t(e = n(new hc(e - 1)), 1),
e;
}
function i(n, e) {
return t(n = new hc(+n), e),
n;
}
function o(n, r, i) {
const o = u(n);
const a = [];
if (i > 1) {
for (; r > o;) {
e(o) % i || a.push(new Date(+o)),
t(o, 1);
}
} else {
for (; r > o;) {
a.push(new Date(+o)),
t(o, 1);
}
}
return a;
}
function a(n, t, e) {
try {
hc = jt;
const r = new jt();
return r._ = n,
o(r, t, e);
} finally {
hc = Date;
}
}
n.floor = n,
n.round = r,
n.ceil = u,
n.offset = i,
n.range = o;
const c = n.utc = Ht(n);
return c.floor = c,
c.round = Ht(r),
c.ceil = Ht(u),
c.offset = Ht(i),
c.range = a,
n;
}
function Ht(n) {
return function(t, e) {
try {
hc = jt;
const r = new jt();
return r._ = t,
n(r, e)._;
} finally {
hc = Date;
}
};
}
function Ot(n) {
function t(n) {
function t(t) {
for (var e, u, i, o = [], a = -1, c = 0; ++a < r;) {
n.charCodeAt(a) === 37 && (o.push(n.slice(c, a)),
(u = pc[e = n.charAt(++a)]) != null && (e = n.charAt(++a)),
(i = N[e]) && (e = i(t, u == null ? e === 'e' ? ' ' : '0' : u)),
o.push(e),
c = a + 1);
}
return o.push(n.slice(c, a)),
o.join('');
}
var r = n.length;
return t.parse = function(t) {
const r = {
y: 1900,
m: 0,
d: 1,
H: 0,
M: 0,
S: 0,
L: 0,
Z: null,
};
const u = e(r, n, t, 0);
if (u != t.length) { return null; }
'p' in r && (r.H = r.H % 12 + 12 * r.p);
const i = r.Z != null && hc !== jt;
const o = new (i ? jt : hc)();
return 'j' in r ? o.setFullYear(r.y, 0, r.j) : 'w' in r && ('W' in r || 'U' in r) ? (o.setFullYear(r.y, 0, 1),
o.setFullYear(r.y, 0, 'W' in r ? (r.w + 6) % 7 + 7 * r.W - (o.getDay() + 5) % 7 : r.w + 7 * r.U - (o.getDay() + 6) % 7)) : o.setFullYear(r.y, r.m, r.d),
o.setHours(r.H + (0 | r.Z / 100), r.M + r.Z % 100, r.S, r.L),
i ? o._ : o;
}
,
t.toString = function() {
return n;
}
,
t;
}
function e(n, t, e, r) {
for (var u, i, o, a = 0, c = t.length, l = e.length; c > a;) {
if (r >= l) { return -1; }
if (u = t.charCodeAt(a++),
u === 37) {
if (o = t.charAt(a++),
i = C[o in pc ? t.charAt(a++) : o],
!i || (r = i(n, e, r)) < 0) { return -1; }
} else if (u != e.charCodeAt(r++)) { return -1; }
}
return r;
}
function r(n, t, e) {
_.lastIndex = 0;
const r = _.exec(t.slice(e));
return r ? (n.w = w.get(r[0].toLowerCase()),
e + r[0].length) : -1;
}
function u(n, t, e) {
x.lastIndex = 0;
const r = x.exec(t.slice(e));
return r ? (n.w = b.get(r[0].toLowerCase()),
e + r[0].length) : -1;
}
function i(n, t, e) {
E.lastIndex = 0;
const r = E.exec(t.slice(e));
return r ? (n.m = A.get(r[0].toLowerCase()),
e + r[0].length) : -1;
}
function o(n, t, e) {
S.lastIndex = 0;
const r = S.exec(t.slice(e));
return r ? (n.m = k.get(r[0].toLowerCase()),
e + r[0].length) : -1;
}
function a(n, t, r) {
return e(n, N.c.toString(), t, r);
}
function c(n, t, r) {
return e(n, N.x.toString(), t, r);
}
function l(n, t, r) {
return e(n, N.X.toString(), t, r);
}
function s(n, t, e) {
const r = M.get(t.slice(e, e += 2).toLowerCase());
return r == null ? -1 : (n.p = r,
e);
}
const f = n.dateTime;
const h = n.date;
const g = n.time;
const p = n.periods;
const v = n.days;
const d = n.shortDays;
const m = n.months;
const y = n.shortMonths;
t.utc = function(n) {
function e(n) {
try {
hc = jt;
const t = new hc();
return t._ = n,
r(t);
} finally {
hc = Date;
}
}
var r = t(n);
return e.parse = function(n) {
try {
hc = jt;
const t = r.parse(n);
return t && t._;
} finally {
hc = Date;
}
}
,
e.toString = r.toString,
e;
}
,
t.multi = t.utc.multi = ae;
var M = ta.map();
var x = It(v);
var b = Zt(v);
var _ = It(d);
var w = Zt(d);
var S = It(m);
var k = Zt(m);
var E = It(y);
var A = Zt(y);
p.forEach(function(n, t) {
M.set(n.toLowerCase(), t);
});
var N = {
a: function(n) {
return d[n.getDay()];
},
A: function(n) {
return v[n.getDay()];
},
b: function(n) {
return y[n.getMonth()];
},
B: function(n) {
return m[n.getMonth()];
},
c: t(f),
d: function(n, t) {
return Yt(n.getDate(), t, 2);
},
e: function(n, t) {
return Yt(n.getDate(), t, 2);
},
H: function(n, t) {
return Yt(n.getHours(), t, 2);
},
I: function(n, t) {
return Yt(n.getHours() % 12 || 12, t, 2);
},
j: function(n, t) {
return Yt(1 + fc.dayOfYear(n), t, 3);
},
L: function(n, t) {
return Yt(n.getMilliseconds(), t, 3);
},
m: function(n, t) {
return Yt(n.getMonth() + 1, t, 2);
},
M: function(n, t) {
return Yt(n.getMinutes(), t, 2);
},
p: function(n) {
return p[+(n.getHours() >= 12)];
},
S: function(n, t) {
return Yt(n.getSeconds(), t, 2);
},
U: function(n, t) {
return Yt(fc.sundayOfYear(n), t, 2);
},
w: function(n) {
return n.getDay();
},
W: function(n, t) {
return Yt(fc.mondayOfYear(n), t, 2);
},
x: t(h),
X: t(g),
y: function(n, t) {
return Yt(n.getFullYear() % 100, t, 2);
},
Y: function(n, t) {
return Yt(n.getFullYear() % 1e4, t, 4);
},
Z: ie,
'%': function() {
return '%';
},
};
var C = {
a: r,
A: u,
b: i,
B: o,
c: a,
d: Qt,
e: Qt,
H: te,
I: te,
j: ne,
L: ue,
m: Kt,
M: ee,
p: s,
S: re,
U: Xt,
w: Vt,
W: $t,
x: c,
X: l,
y: Wt,
Y: Bt,
Z: Jt,
'%': oe,
};
return t;
}
function Yt(n, t, e) {
const r = n < 0 ? '-' : '';
const u = (r ? -n : n) + '';
const i = u.length;
return r + (e > i ? new Array(e - i + 1).join(t) + u : u);
}
function It(n) {
return new RegExp('^(?:' + n.map(ta.requote).join('|') + ')', 'i');
}
function Zt(n) {
for (var t = new a(), e = -1, r = n.length; ++e < r;) { t.set(n[e].toLowerCase(), e); }
return t;
}
function Vt(n, t, e) {
vc.lastIndex = 0;
const r = vc.exec(t.slice(e, e + 1));
return r ? (n.w = +r[0],
e + r[0].length) : -1;
}
function Xt(n, t, e) {
vc.lastIndex = 0;
const r = vc.exec(t.slice(e));
return r ? (n.U = +r[0],
e + r[0].length) : -1;
}
function $t(n, t, e) {
vc.lastIndex = 0;
const r = vc.exec(t.slice(e));
return r ? (n.W = +r[0],
e + r[0].length) : -1;
}
function Bt(n, t, e) {
vc.lastIndex = 0;
const r = vc.exec(t.slice(e, e + 4));
return r ? (n.y = +r[0],
e + r[0].length) : -1;
}
function Wt(n, t, e) {
vc.lastIndex = 0;
const r = vc.exec(t.slice(e, e + 2));
return r ? (n.y = Gt(+r[0]),
e + r[0].length) : -1;
}
function Jt(n, t, e) {
return /^[+-]\d{4}$/.test(t = t.slice(e, e + 5)) ? (n.Z = -t,
e + 5) : -1;
}
function Gt(n) {
return n + (n > 68 ? 1900 : 2e3);
}
function Kt(n, t, e) {
vc.lastIndex = 0;
const r = vc.exec(t.slice(e, e + 2));
return r ? (n.m = r[0] - 1,
e + r[0].length) : -1;
}
function Qt(n, t, e) {
vc.lastIndex = 0;
const r = vc.exec(t.slice(e, e + 2));
return r ? (n.d = +r[0],
e + r[0].length) : -1;
}
function ne(n, t, e) {
vc.lastIndex = 0;
const r = vc.exec(t.slice(e, e + 3));
return r ? (n.j = +r[0],
e + r[0].length) : -1;
}
function te(n, t, e) {
vc.lastIndex = 0;
const r = vc.exec(t.slice(e, e + 2));
return r ? (n.H = +r[0],
e + r[0].length) : -1;
}
function ee(n, t, e) {
vc.lastIndex = 0;
const r = vc.exec(t.slice(e, e + 2));
return r ? (n.M = +r[0],
e + r[0].length) : -1;
}
function re(n, t, e) {
vc.lastIndex = 0;
const r = vc.exec(t.slice(e, e + 2));
return r ? (n.S = +r[0],
e + r[0].length) : -1;
}
function ue(n, t, e) {
vc.lastIndex = 0;
const r = vc.exec(t.slice(e, e + 3));
return r ? (n.L = +r[0],
e + r[0].length) : -1;
}
function ie(n) {
const t = n.getTimezoneOffset();
const e = t > 0 ? '-' : '+'
; const r = 0 | va(t) / 60;
const u = va(t) % 60;
return e + Yt(r, '0', 2) + Yt(u, '0', 2);
}
function oe(n, t, e) {
dc.lastIndex = 0;
const r = dc.exec(t.slice(e, e + 1));
return r ? e + r[0].length : -1;
}
function ae(n) {
for (let t = n.length, e = -1; ++e < t;) { n[e][0] = this(n[e][0]); }
return function(t) {
for (var e = 0, r = n[e]; !r[1](t);) { r = n[++e]; }
return r[0](t);
};
}
function ce() {}
function le(n, t, e) {
const r = e.s = n + t;
const u = r - n;
const i = r - u;
e.t = n - i + (t - u);
}
function se(n, t) {
n && xc.hasOwnProperty(n.type) && xc[n.type](n, t);
}
function fe(n, t, e) {
let r; let u = -1; const i = n.length - e;
for (t.lineStart(); ++u < i;) {
r = n[u],
t.point(r[0], r[1], r[2]);
}
t.lineEnd();
}
function he(n, t) {
let e = -1;
const r = n.length;
for (t.polygonStart(); ++e < r;) { fe(n[e], t, 1); }
t.polygonEnd();
}
function ge() {
function n(n, t) {
n *= Fa,
t = t * Fa / 2 + Da / 4;
const e = n - r;
const o = e >= 0 ? 1 : -1;
const a = o * e;
const c = Math.cos(t);
const l = Math.sin(t);
const s = i * l;
const f = u * c + s * Math.cos(a);
const h = s * o * Math.sin(a);
_c.add(Math.atan2(h, f)),
r = n,
u = c,
i = l;
}
let t, e, r, u, i;
wc.point = function(o, a) {
wc.point = n,
r = (t = o) * Fa,
u = Math.cos(a = (e = a) * Fa / 2 + Da / 4),
i = Math.sin(a);
}
,
wc.lineEnd = function() {
n(t, e);
};
}
function pe(n) {
const t = n[0];
const e = n[1];
const r = Math.cos(e);
return [r * Math.cos(t), r * Math.sin(t), Math.sin(e)];
}
function ve(n, t) {
return n[0] * t[0] + n[1] * t[1] + n[2] * t[2];
}
function de(n, t) {
return [n[1] * t[2] - n[2] * t[1], n[2] * t[0] - n[0] * t[2], n[0] * t[1] - n[1] * t[0]];
}
function me(n, t) {
n[0] += t[0],
n[1] += t[1],
n[2] += t[2];
}
function ye(n, t) {
return [n[0] * t, n[1] * t, n[2] * t];
}
function Me(n) {
const t = Math.sqrt(n[0] * n[0] + n[1] * n[1] + n[2] * n[2]);
n[0] /= t,
n[1] /= t,
n[2] /= t;
}
function xe(n) {
return [Math.atan2(n[1], n[0]), nt(n[2])];
}
function be(n, t) {
return va(n[0] - t[0]) < Ta && va(n[1] - t[1]) < Ta;
}
function _e(n, t) {
n *= Fa;
const e = Math.cos(t *= Fa);
we(e * Math.cos(n), e * Math.sin(n), Math.sin(t));
}
function we(n, t, e) {
++Sc,
Ec += (n - Ec) / Sc,
Ac += (t - Ac) / Sc,
Nc += (e - Nc) / Sc;
}
function Se() {
function n(n, u) {
n *= Fa;
const i = Math.cos(u *= Fa);
const o = i * Math.cos(n);
const a = i * Math.sin(n);
const c = Math.sin(u);
var l = Math.atan2(Math.sqrt((l = e * c - r * a) * l + (l = r * o - t * c) * l + (l = t * a - e * o) * l), t * o + e * a + r * c);
kc += l,
Cc += l * (t + (t = o)),
zc += l * (e + (e = a)),
qc += l * (r + (r = c)),
we(t, e, r);
}
let t, e, r;
Dc.point = function(u, i) {
u *= Fa;
const o = Math.cos(i *= Fa);
t = o * Math.cos(u),
e = o * Math.sin(u),
r = Math.sin(i),
Dc.point = n,
we(t, e, r);
};
}
function ke() {
Dc.point = _e;
}
function Ee() {
function n(n, t) {
n *= Fa;
const e = Math.cos(t *= Fa);
const o = e * Math.cos(n);
const a = e * Math.sin(n);
const c = Math.sin(t);
const l = u * c - i * a;
const s = i * o - r * c;
const f = r * a - u * o;
const h = Math.sqrt(l * l + s * s + f * f);
const g = r * o + u * a + i * c;
const p = h && -Q(g) / h;
const v = Math.atan2(h, g);
Lc += p * l,
Tc += p * s,
Rc += p * f,
kc += v,
Cc += v * (r + (r = o)),
zc += v * (u + (u = a)),
qc += v * (i + (i = c)),
we(r, u, i);
}
let t, e, r, u, i;
Dc.point = function(o, a) {
t = o,
e = a,
Dc.point = n,
o *= Fa;
const c = Math.cos(a *= Fa);
r = c * Math.cos(o),
u = c * Math.sin(o),
i = Math.sin(a),
we(r, u, i);
}
,
Dc.lineEnd = function() {
n(t, e),
Dc.lineEnd = ke,
Dc.point = _e;
};
}
function Ae(n, t) {
function e(e, r) {
return e = n(e, r),
t(e[0], e[1]);
}
return n.invert && t.invert && (e.invert = function(e, r) {
return e = t.invert(e, r),
e && n.invert(e[0], e[1]);
}
),
e;
}
function Ne() {
return !0;
}
function Ce(n, t, e, r, u) {
const i = [];
const o = [];
if (n.forEach(function(n) {
if (!((t = n.length - 1) <= 0)) {
var t; let e = n[0]; const r = n[t];
if (be(e, r)) {
u.lineStart();
for (let a = 0; t > a; ++a) { u.point((e = n[a])[0], e[1]); }
return u.lineEnd(),
void 0;
}
let c = new qe(e, n, null, !0);
let l = new qe(e, null, c, !1);
c.o = l,
i.push(c),
o.push(l),
c = new qe(r, n, null, !1),
l = new qe(r, null, c, !0),
c.o = l,
i.push(c),
o.push(l);
}
}),
o.sort(t),
ze(i),
ze(o),
i.length) {
for (var a = 0, c = e, l = o.length; l > a; ++a) { o[a].e = c = !c; }
for (var s, f, h = i[0]; ;) {
for (var g = h, p = !0; g.v;) {
if ((g = g.n) === h) { return; }
}
s = g.z,
u.lineStart();
do {
if (g.v = g.o.v = !0,
g.e) {
if (p) {
for (var a = 0, l = s.length; l > a; ++a) { u.point((f = s[a])[0], f[1]); }
} else { r(g.x, g.n.x, 1, u); }
g = g.n;
} else {
if (p) {
s = g.p.z;
for (var a = s.length - 1; a >= 0; --a) { u.point((f = s[a])[0], f[1]); }
} else { r(g.x, g.p.x, -1, u); }
g = g.p;
}
g = g.o,
s = g.z,
p = !p;
} while (!g.v);
u.lineEnd();
}
}
}
function ze(n) {
if (t = n.length) {
for (var t, e, r = 0, u = n[0]; ++r < t;) {
u.n = e = n[r],
e.p = u,
u = e;
}
u.n = e = n[0],
e.p = u;
}
}
function qe(n, t, e, r) {
this.x = n,
this.z = t,
this.o = e,
this.e = r,
this.v = !1,
this.n = this.p = null;
}
function Le(n, t, e, r) {
return function(u, i) {
function o(t, e) {
const r = u(t, e);
n(t = r[0], e = r[1]) && i.point(t, e);
}
function a(n, t) {
const e = u(n, t);
d.point(e[0], e[1]);
}
function c() {
y.point = a,
d.lineStart();
}
function l() {
y.point = o,
d.lineEnd();
}
function s(n, t) {
v.push([n, t]);
const e = u(n, t);
x.point(e[0], e[1]);
}
function f() {
x.lineStart(),
v = [];
}
function h() {
s(v[0][0], v[0][1]),
x.lineEnd();
let n; const t = x.clean(); const e = M.buffer(); var r = e.length;
if (v.pop(),
p.push(v),
v = null,
r) {
if (1 & t) {
n = e[0];
let u; var r = n.length - 1; let o = -1;
if (r > 0) {
for (b || (i.polygonStart(),
b = !0),
i.lineStart(); ++o < r;) { i.point((u = n[o])[0], u[1]); }
i.lineEnd();
}
} else {
r > 1 && 2 & t && e.push(e.pop().concat(e.shift())),
g.push(e.filter(Te));
}
}
}
let g; let p; let v; var d = t(i); const m = u.invert(r[0], r[1]); var y = {
point: o,
lineStart: c,
lineEnd: l,
polygonStart: function() {
y.point = s,
y.lineStart = f,
y.lineEnd = h,
g = [],
p = [];
},
polygonEnd: function() {
y.point = o,
y.lineStart = c,
y.lineEnd = l,
g = ta.merge(g);
const n = Fe(m, p);
g.length ? (b || (i.polygonStart(),
b = !0),
Ce(g, De, n, e, i)) : n && (b || (i.polygonStart(),
b = !0),
i.lineStart(),
e(null, null, 1, i),
i.lineEnd()),
b && (i.polygonEnd(),
b = !1),
g = p = null;
},
sphere: function() {
i.polygonStart(),
i.lineStart(),
e(null, null, 1, i),
i.lineEnd(),
i.polygonEnd();
},
}; var M = Re(); var x = t(M); var b = !1;
return y;
};
}
function Te(n) {
return n.length > 1;
}
function Re() {
let n; let t = [];
return {
lineStart: function() {
t.push(n = []);
},
point: function(t, e) {
n.push([t, e]);
},
lineEnd: y,
buffer: function() {
const e = t;
return t = [],
n = null,
e;
},
rejoin: function() {
t.length > 1 && t.push(t.pop().concat(t.shift()));
},
};
}
function De(n, t) {
return ((n = n.x)[0] < 0 ? n[1] - ja - Ta : ja - n[1]) - ((t = t.x)[0] < 0 ? t[1] - ja - Ta : ja - t[1]);
}
function Pe(n) {
let t; let e = 0 / 0; let r = 0 / 0; let u = 0 / 0;
return {
lineStart: function() {
n.lineStart(),
t = 1;
},
point: function(i, o) {
const a = i > 0 ? Da : -Da;
const c = va(i - e);
va(c - Da) < Ta ? (n.point(e, r = (r + o) / 2 > 0 ? ja : -ja),
n.point(u, r),
n.lineEnd(),
n.lineStart(),
n.point(a, r),
n.point(i, r),
t = 0) : u !== a && c >= Da && (va(e - u) < Ta && (e -= u * Ta),
va(i - a) < Ta && (i -= a * Ta),
r = Ue(e, r, i, o),
n.point(u, r),
n.lineEnd(),
n.lineStart(),
n.point(a, r),
t = 0),
n.point(e = i, r = o),
u = a;
},
lineEnd: function() {
n.lineEnd(),
e = r = 0 / 0;
},
clean: function() {
return 2 - t;
},
};
}
function Ue(n, t, e, r) {
let u; let i; const o = Math.sin(n - e);
return va(o) > Ta ? Math.atan((Math.sin(t) * (i = Math.cos(r)) * Math.sin(e) - Math.sin(r) * (u = Math.cos(t)) * Math.sin(n)) / (u * i * o)) : (t + r) / 2;
}
function je(n, t, e, r) {
let u;
if (n == null) {
u = e * ja,
r.point(-Da, u),
r.point(0, u),
r.point(Da, u),
r.point(Da, 0),
r.point(Da, -u),
r.point(0, -u),
r.point(-Da, -u),
r.point(-Da, 0),
r.point(-Da, u);
} else if (va(n[0] - t[0]) > Ta) {
const i = n[0] < t[0] ? Da : -Da;
u = e * i / 2,
r.point(-i, u),
r.point(0, u),
r.point(i, u);
} else { r.point(t[0], t[1]); }
}
function Fe(n, t) {
const e = n[0];
const r = n[1];
const u = [Math.sin(e), -Math.cos(e), 0];
let i = 0;
let o = 0;
_c.reset();
for (let a = 0, c = t.length; c > a; ++a) {
const l = t[a];
const s = l.length;
if (s) {
for (let f = l[0], h = f[0], g = f[1] / 2 + Da / 4, p = Math.sin(g), v = Math.cos(g), d = 1; ;) {
d === s && (d = 0),
n = l[d];
const m = n[0];
const y = n[1] / 2 + Da / 4;
const M = Math.sin(y);
const x = Math.cos(y);
const b = m - h;
const _ = b >= 0 ? 1 : -1;
const w = _ * b;
const S = w > Da;
const k = p * M;
if (_c.add(Math.atan2(k * _ * Math.sin(w), v * x + k * Math.cos(w))),
i += S ? b + _ * Pa : b,
S ^ h >= e ^ m >= e) {
const E = de(pe(f), pe(n));
Me(E);
const A = de(u, E);
Me(A);
const N = (S ^ b >= 0 ? -1 : 1) * nt(A[2]);
(r > N || r === N && (E[0] || E[1])) && (o += S ^ b >= 0 ? 1 : -1);
}
if (!d++) { break; }
h = m,
p = M,
v = x,
f = n;
}
}
}
return (-Ta > i || Ta > i && _c < 0) ^ 1 & o;
}
function He(n) {
function t(n, t) {
return Math.cos(n) * Math.cos(t) > i;
}
function e(n) {
let e, i, c, l, s;
return {
lineStart: function() {
l = c = !1,
s = 1;
},
point: function(f, h) {
let g; const p = [f, h]; let v = t(f, h); const d = o ? v ? 0 : u(f, h) : v ? u(f + (f < 0 ? Da : -Da), h) : 0;
if (!e && (l = c = v) && n.lineStart(),
v !== c && (g = r(e, p),
(be(e, g) || be(p, g)) && (p[0] += Ta,
p[1] += Ta,
v = t(p[0], p[1]))),
v !== c) {
s = 0,
v ? (n.lineStart(),
g = r(p, e),
n.point(g[0], g[1])) : (g = r(e, p),
n.point(g[0], g[1]),
n.lineEnd()),
e = g;
} else if (a && e && o ^ v) {
let m;
d & i || !(m = r(p, e, !0)) || (s = 0,
o ? (n.lineStart(),
n.point(m[0][0], m[0][1]),
n.point(m[1][0], m[1][1]),
n.lineEnd()) : (n.point(m[1][0], m[1][1]),
n.lineEnd(),
n.lineStart(),
n.point(m[0][0], m[0][1])));
}
!v || e && be(e, p) || n.point(p[0], p[1]),
e = p,
c = v,
i = d;
},
lineEnd: function() {
c && n.lineEnd(),
e = null;
},
clean: function() {
return s | (l && c) << 1;
},
};
}
function r(n, t, e) {
const r = pe(n);
const u = pe(t);
const o = [1, 0, 0];
const a = de(r, u);
const c = ve(a, a);
const l = a[0];
const s = c - l * l;
if (!s) { return !e && n; }
const f = i * c / s;
const h = -i * l / s;
const g = de(o, a);
const p = ye(o, f);
const v = ye(a, h);
me(p, v);
const d = g;
const m = ve(p, d);
const y = ve(d, d);
const M = m * m - y * (ve(p, p) - 1);
if (!(M < 0)) {
const x = Math.sqrt(M);
let b = ye(d, (-m - x) / y);
if (me(b, p),
b = xe(b),
!e) { return b; }
let _; let w = n[0]; let S = t[0]; let k = n[1]; let E = t[1];
w > S && (_ = w,
w = S,
S = _);
const A = S - w;
const N = va(A - Da) < Ta;
const C = N || Ta > A;
if (!N && k > E && (_ = k,
k = E,
E = _),
C ? N ? k + E > 0 ^ b[1] < (va(b[0] - w) < Ta ? k : E) : k <= b[1] && b[1] <= E : A > Da ^ (w <= b[0] && b[0] <= S)) {
const z = ye(d, (-m + x) / y);
return me(z, p),
[b, xe(z)];
}
}
}
function u(t, e) {
const r = o ? n : Da - n;
let u = 0;
return -r > t ? u |= 1 : t > r && (u |= 2),
-r > e ? u |= 4 : e > r && (u |= 8),
u;
}
var i = Math.cos(n);
var o = i > 0;
var a = va(i) > Ta;
const c = gr(n, 6 * Fa);
return Le(t, e, c, o ? [0, -n] : [-Da, n - Da]);
}
function Oe(n, t, e, r) {
return function(u) {
let i; const o = u.a; const a = u.b; const c = o.x; const l = o.y; const s = a.x; const f = a.y; let h = 0; let g = 1; const p = s - c; const v = f - l;
if (i = n - c,
p || !(i > 0)) {
if (i /= p,
p < 0) {
if (h > i) { return; }
g > i && (g = i);
} else if (p > 0) {
if (i > g) { return; }
i > h && (h = i);
}
if (i = e - c,
p || !(i < 0)) {
if (i /= p,
p < 0) {
if (i > g) { return; }
i > h && (h = i);
} else if (p > 0) {
if (h > i) { return; }
g > i && (g = i);
}
if (i = t - l,
v || !(i > 0)) {
if (i /= v,
v < 0) {
if (h > i) { return; }
g > i && (g = i);
} else if (v > 0) {
if (i > g) { return; }
i > h && (h = i);
}
if (i = r - l,
v || !(i < 0)) {
if (i /= v,
v < 0) {
if (i > g) { return; }
i > h && (h = i);
} else if (v > 0) {
if (h > i) { return; }
g > i && (g = i);
}
return h > 0 && (u.a = {
x: c + h * p,
y: l + h * v,
}),
g < 1 && (u.b = {
x: c + g * p,
y: l + g * v,
}),
u;
}
}
}
}
};
}
function Ye(n, t, e, r) {
function u(r, u) {
return va(r[0] - n) < Ta ? u > 0 ? 0 : 3 : va(r[0] - e) < Ta ? u > 0 ? 2 : 1 : va(r[1] - t) < Ta ? u > 0 ? 1 : 0 : u > 0 ? 3 : 2;
}
function i(n, t) {
return o(n.x, t.x);
}
function o(n, t) {
const e = u(n, 1);
const r = u(t, 1);
return e !== r ? e - r : e === 0 ? t[1] - n[1] : e === 1 ? n[0] - t[0] : e === 2 ? n[1] - t[1] : t[0] - n[0];
}
return function(a) {
function c(n) {
for (var t = 0, e = d.length, r = n[1], u = 0; e > u; ++u) {
for (var i, o = 1, a = d[u], c = a.length, l = a[0]; c > o; ++o) {
i = a[o],
l[1] <= r ? i[1] > r && K(l, i, n) > 0 && ++t : i[1] <= r && K(l, i, n) < 0 && --t,
l = i;
}
}
return t !== 0;